]> git.lizzy.rs Git - plan9front.git/blob - sys/src/games/doom/w_wad.h
games/doom: fix the french problem, remove debug prints
[plan9front.git] / sys / src / games / doom / w_wad.h
1 // Emacs style mode select   -*- C++ -*- 
2 //-----------------------------------------------------------------------------
3 //
4 // $Id:$
5 //
6 // Copyright (C) 1993-1996 by id Software, Inc.
7 //
8 // This source is available for distribution and/or modification
9 // only under the terms of the DOOM Source Code License as
10 // published by id Software. All rights reserved.
11 //
12 // The source is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
15 // for more details.
16 //
17 // DESCRIPTION:
18 //      WAD I/O functions.
19 //
20 //-----------------------------------------------------------------------------
21
22
23 #ifndef __W_WAD__
24 #define __W_WAD__
25
26
27 /* TYPES */
28 typedef struct
29 {
30         /* Should be "IWAD" or "PWAD" */
31         char    identification[4];              
32         int     numlumps;
33         int     infotableofs;
34 } wadinfo_t;
35
36
37 typedef struct
38 {
39         int     filepos;
40         int     size;
41         char    name[8];
42 } filelump_t;
43
44 /* WADFILE I/O related stuff */
45 typedef struct
46 {
47         char    name[8];
48         int     handle;
49         int     position;
50         int     size;
51 } lumpinfo_t;
52
53
54 extern  void**          lumpcache;
55 extern  lumpinfo_t*     lumpinfo;
56 extern  int             numlumps;
57
58 void    W_InitMultipleFiles (char** filenames);
59 void    W_Reload (void);
60
61 int     W_CheckNumForName (char* name);
62 int     W_GetNumForName (char* name);
63
64 int     W_LumpLength (int lump);
65 void    W_ReadLump (int lump, void *dest);
66
67 void*   W_CacheLumpNum (int lump, int tag);
68 void*   W_CacheLumpName (char* name, int tag);
69
70
71
72
73 #endif
74 //-----------------------------------------------------------------------------
75 //
76 // $Log:$
77 //
78 //-----------------------------------------------------------------------------