From 9d32e513a5cfa0b75a349f628cf5f89d4384fd26 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 24 Mar 2006 20:40:08 +0000 Subject: Call W_GenerateHashTable to generate the lumpname hashtable. Do not constantly look up MAP01 to see if this is a store demo. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 438 --- src/w_wad.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/w_wad.h') diff --git a/src/w_wad.h b/src/w_wad.h index 548c2a54..659c0b40 100644 --- a/src/w_wad.h +++ b/src/w_wad.h @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: w_wad.h 362 2006-02-03 18:41:26Z fraggle $ +// $Id: w_wad.h 438 2006-03-24 20:40:08Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -44,7 +44,6 @@ typedef struct char identification[4]; int numlumps; int infotableofs; - } wadinfo_t; @@ -53,20 +52,26 @@ typedef struct int filepos; int size; char name[8]; - } filelump_t; // // WADFILE I/O related stuff. // -typedef struct + +typedef struct lumpinfo_s lumpinfo_t; + +struct lumpinfo_s { char name[8]; FILE *handle; int position; int size; void *cache; -} lumpinfo_t; + + // Used for hash table lookups + + lumpinfo_t *next; +}; extern void** lumpcache; @@ -85,7 +90,7 @@ void W_ReadLump (int lump, void *dest); void* W_CacheLumpNum (int lump, int tag); void* W_CacheLumpName (char* name, int tag); - +void W_GenerateHashTable(void); #endif -- cgit v1.2.3