void CA_Startup() { CAL_SetupMapFile(); CAL_SetupGrFile(); CAL_SetupAudioFile(); mapon = -1; }
/* ----------------------------------------------------------------------------- Function: MapRipper -Re-encode map data. Parameters: extension -[in] file extension for map data files. Returns: Nothing. Notes: ----------------------------------------------------------------------------- */ PUBLIC _boolean MapRipper( const char *fextension, W16 version ) { W32 i; char fname[ 32 ]; gameversion = version; // // Setup // if( 0 == FS_Mkdir( MAPDIR ) ) { printf( "[%s] Could not create directory (%s)!\n", "wolf_map.c", MAPDIR ); return false; } if( ! CAL_SetupMapFile( fextension ) ) { CAL_ShutdownMapFile(); return false; } // // Decode Map data // printf( "Decoding Map Data...\n" ); for( i = 0 ; i < TotalMaps ; ++i ) { cs_snprintf( fname, sizeof( fname ), "%s/%c%.2d.map", MAPDIR, TOLOWER( fextension[ 1 ] ), i ); CA_CacheMap( headeroffsets[ i ], headeroffsets[ i + 1 ] - headeroffsets[ i ], fname, i ); } // // Shutdown // CAL_ShutdownMapFile(); return true; }