[ Home ]

wolfcore_map.c File Reference

Wolfenstein 3-D map file decoder. More...

#include <stdio.h>
#include <string.h>
#include "wolfcore.h"
#include "../../common/platform.h"
#include "../../common/common_utils.h"
#include "../../memory/memory.h"
#include "../../string/wtstring.h"
#include "../../filesys/file.h"
#include "../wolfcore_decoder.h"

Include dependency graph for wolfcore_map.c:


Functions

PUBLIC wtBoolean MapFile_Setup (const char *headFileName, const char *mapFileName, W16 *RLEWtag, W32 *nTotalMaps)
 Setup map files for decoding.
PUBLIC void MapFile_Shutdown (void)
 Shutdown map file processing.
PUBLIC void * MapFile_getMapData (W32 chunkOffset, W32 chunkLength)
 Get map data chunk.
PUBLIC wtBoolean MapFile_ReduxDecodeMapData (const char *fmaphead, const char *fmap, const char *path, W8 *palette, W32 *ceilingColour, char *musicFileName[], parTimes_t *parTimes, char *format)
 Convert map to Redux file format.

Variables

PRIVATE FILE * map_file_handle = NULL
PRIVATE W32 headerOffsets [256]

Detailed Description

Wolfenstein 3-D map file decoder.

Author:
Michael Liebscher
Date:
2007

Function Documentation

PUBLIC void* MapFile_getMapData ( W32  chunkOffset,
W32  chunkLength 
)

Get map data chunk.

Parameters:
[in] chunkOffset Source buffer to convert from
[in] chunkLength Size of chunk data.
Returns:
NULL on error, otherwise pointer to map data.
Note:
Caller must free allocated data.

PUBLIC wtBoolean MapFile_ReduxDecodeMapData ( const char *  fmaphead,
const char *  fmap,
const char *  path,
W8 *  palette,
W32 *  ceilingColour,
char *  musicFileName[],
parTimes_t *  parTimes,
char *  format 
)

Convert map to Redux file format.

Parameters:
[in] fmaphead Map header file name.
[in] fmap Map file name.
[in] path Path to save redux map to.
[in] palette Pointer to palette array.
[in] ceilingColour Array of ceiling colours.
[in] musicFileName Array of music titles.
[in] parTimes Struct with the parTimes.
Returns:
On success true, otherwise false.
Note:
Caller must free allocated data.

Here is the call graph for this function:

Here is the caller graph for this function:

PUBLIC wtBoolean MapFile_Setup ( const char *  headFileName,
const char *  mapFileName,
W16 *  RLEWtag,
W32 *  nTotalMaps 
)

Setup map files for decoding.

Parameters:
[in] headFileName Name of file with header offsets.
[in] mapFileName Name of file with map data.
[in,out] RLEWtag Run length encoded word tag.
[in,out] nTotalMaps Number of maps in file.
Returns:
On success true, otherwise false.
Note:
Must call function MapFile_Shutdown() when done.

Here is the call graph for this function:

Here is the caller graph for this function: