very minor cleaning
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 20 Jan 2007 22:52:03 +0000 (22:52 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 20 Jan 2007 22:52:03 +0000 (22:52 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6709 d7cf8633-e32d-0410-b094-e92efae38249

wad.c
wad.h

diff --git a/wad.c b/wad.c
index 48e87bd..12978f3 100644 (file)
--- 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 982a49f..f1790db 100644 (file)
--- 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);