out[i] = 0;
}
+static int wad_numlumps = 0;
+static lumpinfo_t *wad_lumps = NULL;
+static unsigned char *wad_base = NULL;
+
unsigned char *W_GetLumpName(const char *name)
{
int i;
char clean[16];
wadinfo_t *header;
int infotableofs;
- static int wad_loaded = false;
- static int wad_numlumps = 0;
- static lumpinfo_t *wad_lumps = NULL;
- static unsigned char *wad_base = NULL;
W_CleanupName (name, clean);
- if (!wad_loaded)
+ if (!wad_base)
{
- wad_loaded = true;
if ((wad_base = FS_LoadFile ("gfx.wad", cls.permanentmempool, false, &filesize)))
{
if (memcmp(wad_base, "WAD2", 4))
char name[16]; // must be null terminated
} lumpinfo_t;
-extern int wad_numlumps;
-extern lumpinfo_t *wad_lumps;
-extern unsigned char *wad_base;
-
unsigned char *W_GetLumpName (const char *name);