From: havoc Date: Sat, 20 Jan 2007 22:52:03 +0000 (+0000) Subject: very minor cleaning X-Git-Tag: xonotic-v0.1.0preview~3697 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=1de56226c3b1b939655d66e0aa260b1243a4ab15 very minor cleaning git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6709 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/wad.c b/wad.c index 48e87bd6..12978f38 100644 --- a/wad.c +++ b/wad.c @@ -55,6 +55,10 @@ static void W_CleanupName (const char *in, char *out) 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; @@ -63,16 +67,11 @@ unsigned char *W_GetLumpName(const char *name) 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)) diff --git a/wad.h b/wad.h index 982a49fe..f1790db5 100644 --- a/wad.h +++ b/wad.h @@ -65,10 +65,6 @@ typedef struct lumpinfo_s 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);