void RTS_Init(const char *filename) { // open all the files, load headers, and count lumps rts_numlumps = 0; rts_lumpinfo = NULL; // will be realloced as lumps are added if (RTS_AddFile(filename)) return; if (rts_numlumps == 0) return; rts_lumpcache = (void **)Xcalloc(rts_numlumps, sizeof(rts_lumpcache[0])); RTS_Started = TRUE; }
void RTS_Init (char *filename) { int32 length; // // open all the files, load headers, and count lumps // numlumps = 0; lumpinfo = NULL; // will be realloced as lumps are added initprintf("RTS Manager Started.\n"); if (RTS_AddFile (filename)) return; if (!numlumps) return; // // set up caching // length = (numlumps) * sizeof( *lumpcache ); lumpcache = SafeMalloc(length); memset(lumpcache,0,length); RTS_Started = true; }