XenevaOS
Loading...
Searching...
No Matches
w_wad.h
Go to the documentation of this file.
1//
2// Copyright(C) 1993-1996 Id Software, Inc.
3// Copyright(C) 2005-2014 Simon Howard
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// DESCRIPTION:
16// WAD I/O functions.
17//
18
19
20#ifndef __W_WAD__
21#define __W_WAD__
22
23#include <stdio.h>
24
25#include "doomtype.h"
26#include "d_mode.h"
27
28#include "w_file.h"
29
30
31//
32// TYPES
33//
34
35//
36// WADFILE I/O related stuff.
37//
38
39typedef struct lumpinfo_s lumpinfo_t;
40
42{
43 char name[8];
46 int size;
47 void *cache;
48
49 // Used for hash table lookups
50
52};
53
54
55extern lumpinfo_t *lumpinfo;
56extern unsigned int numlumps;
57
58wad_file_t *W_AddFile (char *filename);
59
60int W_CheckNumForName (char* name);
61int W_GetNumForName (char* name);
62
63int W_LumpLength (unsigned int lump);
64void W_ReadLump (unsigned int lump, void *dest);
65
66void* W_CacheLumpNum (int lump, int tag);
67void* W_CacheLumpName (char* name, int tag);
68
69void W_GenerateHashTable(void);
70
71extern unsigned int W_LumpNameHash(const char *s);
72
73void W_ReleaseLumpNum(int lump);
74void W_ReleaseLumpName(char *name);
75
77
78#endif
GameMission_t mission
Definition d_mode.c:28
GameMission_t
Definition d_mode.h:28
struct drm_crtc struct drm_plane struct drm_plane const struct drm_crtc_funcs const char * name
Definition drm_crtc.h:1242
Definition w_file.h:47
Definition w_wad.h:42
wad_file_t * wad_file
Definition w_wad.h:44
char name[8]
Definition w_wad.h:43
lumpinfo_t * next
Definition w_wad.h:51
int size
Definition w_wad.h:46
int position
Definition w_wad.h:45
void * cache
Definition w_wad.h:47
lumpinfo_t * lumpinfo
Definition w_wad.c:61
int W_LumpLength(unsigned int lump)
Definition w_wad.c:325
void W_CheckCorrectIWAD(GameMission_t mission)
Definition w_wad.c:586
void * W_CacheLumpNum(int lump, int tag)
Definition w_wad.c:382
void W_GenerateHashTable(void)
Definition w_wad.c:539
unsigned int numlumps
Definition w_wad.c:62
void W_ReleaseLumpName(char *name)
Definition w_wad.c:465
int W_CheckNumForName(char *name)
Definition w_wad.c:256
void * W_CacheLumpName(char *name, int tag)
Definition w_wad.c:429
void W_ReadLump(unsigned int lump, void *dest)
Definition w_wad.c:342
int W_GetNumForName(char *name)
Definition w_wad.c:306
void W_ReleaseLumpNum(int lump)
Definition w_wad.c:444
unsigned int W_LumpNameHash(const char *s)
Definition w_wad.c:70
wad_file_t * W_AddFile(char *filename)
Definition w_wad.c:139