FTEQW
Documentation of the FTE engine source tree.
wad.h
Go to the documentation of this file.
1/*
2Copyright (C) 1996-1997 Id Software, Inc.
3
4This program is free software; you can redistribute it and/or
5modify it under the terms of the GNU General Public License
6as published by the Free Software Foundation; either version 2
7of the License, or (at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19*/
20// wad.h
21
22//===============
23// TYPES
24//===============
25
26#define CMP_NONE 0
27#define CMP_LZSS 1
28
29#define TYP_NONE 0
30#define TYP_LABEL 1
31
32#define TYP_LUMPY 64 // 64 + grab command number
33#define TYP_PALETTE 64
34#define TYP_QTEX 65
35#define TYP_QPIC 66
36#define TYP_SOUND 67
37#define TYP_MIPTEX 68
38#define TYP_HLFONT 70
39
40//on disk representation of most q1 images.
41typedef struct
42{
44 qbyte data[4]; // variably sized
45} qpic_t;
46
47typedef struct shader_s shader_t;
48#define material_t shader_t //the material
49#define rshader_t shader_t //the shader the material will draw with
50#define mpic_t shader_t
51
52//atlased images within some larger atlas
53//must not be tiled etc
54typedef struct apic_s
55{
56 mpic_t *atlas;
57 float sl, tl, sh, th;
58 unsigned short x;
59 unsigned short y;
60 unsigned short width;
61 unsigned short height;
62
63 struct apic_s *next;
65
66extern mpic_t *draw_disc; // also used on sbar
67
68
69typedef struct
70{
71 char identification[4]; // should be WAD2 or 2DAW
74} wadinfo_t;
75
76typedef struct
77{
80 int size; // uncompressed
81 char type;
83 char pad1, pad2;
84 char name[16]; // must be null terminated
86
87extern int wad_numlumps;
88extern lumpinfo_t *wad_lumps;
89extern qbyte *wad_base;
90
91void W_Shutdown (void);
92void W_LoadWadFile (char *filename);
93void W_CleanupName (const char *in, char *out);
94//lumpinfo_t *W_GetLumpinfo (char *name);
95void *W_GetLumpName (const char *name, size_t *size, qbyte *lumptype);
96//void *W_GetLumpNum (int num);
97void Wads_Flush (void);
98extern void *wadmutex;
99
100void SwapPic (qpic_t *pic);
101
102struct model_s;
103
105qbyte *W_ConvertWAD3Texture(miptex_t *tex, size_t lumpsize, int *width, int *height, uploadfmt_t *format);
106void Mod_ParseInfoFromEntityLump(struct model_s *wmodel);
108qbyte *W_GetTexture(const char *name, int *width, int *height, uploadfmt_t *format);
109miptex_t *W_GetMipTex(const char *name);
qboolean
Definition: api_menu.h:34
unsigned int width
Definition: bymorphed.h:4
unsigned int height
Definition: bymorphed.h:5
unsigned char qbyte
Definition: common.h:127
char filename[64]
Definition: generatebuiltin.c:8
GLuint GLcharARB * name
Definition: glquake.h:155
GLint size
Definition: glquake.h:157
GLenum format
Definition: glsupp.h:502
char ** data
Definition: p_script.c:63
texid_t tex
Definition: r_2d.c:52
enum uploadfmt uploadfmt_t
static spx_int16_t * in
Definition: snd_dma.c:488
static SpeexBits spx_int16_t * out
Definition: snd_dma.c:492
Definition: wad.h:55
float sl
Definition: wad.h:57
float th
Definition: wad.h:57
unsigned short y
Definition: wad.h:59
unsigned short height
Definition: wad.h:61
float tl
Definition: wad.h:57
float sh
Definition: wad.h:57
mpic_t * atlas
Definition: wad.h:56
unsigned short x
Definition: wad.h:58
struct apic_s * next
Definition: wad.h:63
unsigned short width
Definition: wad.h:60
Definition: wad.h:77
char type
Definition: wad.h:81
int disksize
Definition: wad.h:79
char compression
Definition: wad.h:82
int filepos
Definition: wad.h:78
char pad1
Definition: wad.h:83
int size
Definition: wad.h:80
Definition: bspfile.h:133
Definition: gl_model.h:972
Definition: wad.h:42
int height
Definition: wad.h:43
Definition: shader.h:602
Definition: wad.h:70
int numlumps
Definition: wad.h:72
int infotableofs
Definition: wad.h:73
void Mod_ParseInfoFromEntityLump(struct model_s *wmodel)
Definition: wad.c:810
lumpinfo_t * wad_lumps
Definition: wad.c:38
void W_CleanupName(const char *in, char *out)
Definition: wad.c:56
void * W_GetLumpName(const char *name, size_t *size, qbyte *lumptype)
Definition: wad.c:30
qboolean Wad_NextDownload(void)
Definition: wad.c:29
void W_Shutdown(void)
Definition: wad.c:33
struct apic_s apic_t
qbyte * wad_base
Definition: wad.c:39
void Mod_ParseWadsFromEntityLump(char *data)
void * wadmutex
Definition: wad.c:25
qbyte * W_GetTexture(const char *name, int *width, int *height, uploadfmt_t *format)
Definition: wad.c:31
qbyte * W_ConvertWAD3Texture(miptex_t *tex, size_t lumpsize, int *width, int *height, uploadfmt_t *format)
Definition: wad.c:375
void W_LoadWadFile(char *filename)
Definition: wad.c:32
miptex_t * W_GetMipTex(const char *name)
Definition: wad.c:593
int wad_numlumps
Definition: wad.c:37
void SwapPic(qpic_t *pic)
Definition: wad.c:176
void Wads_Flush(void)
Definition: wad.c:28
mpic_t * draw_disc
Definition: r_2d.c:24