git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5750
d7cf8633-e32d-0410-b094-
e92efae38249
46 files changed:
#define BSPVERSION 29
#define MCBSPVERSION 2
#define BSPVERSION 29
#define MCBSPVERSION 2
{
int fileofs, filelen;
} lump_t;
{
int fileofs, filelen;
} lump_t;
#define LUMP_MODELS 14
#define HEADER_LUMPS 15
#define LUMP_MODELS 14
#define HEADER_LUMPS 15
+typedef struct hullinfo_s
{
int numhulls;
int filehulls;
float hullsizes[MAX_MAP_HULLS][2][3];
} hullinfo_t;
{
int numhulls;
int filehulls;
float hullsizes[MAX_MAP_HULLS][2][3];
} hullinfo_t;
{
float mins[3], maxs[3];
float origin[3];
{
float mins[3], maxs[3];
float origin[3];
int firstface, numfaces;
} dmodel_t;
int firstface, numfaces;
} dmodel_t;
+typedef struct dheader_s
{
int version;
lump_t lumps[HEADER_LUMPS];
} dheader_t;
{
int version;
lump_t lumps[HEADER_LUMPS];
} dheader_t;
+typedef struct dmiptexlump_s
{
int nummiptex;
int dataofs[4]; // [nummiptex]
{
int nummiptex;
int dataofs[4]; // [nummiptex]
+typedef struct dvertex_s
{
float point[3];
} dvertex_t;
{
float point[3];
} dvertex_t;
#define PLANE_ANYY 4
#define PLANE_ANYZ 5
#define PLANE_ANYY 4
#define PLANE_ANYZ 5
{
float normal[3];
float dist;
{
float normal[3];
float dist;
{
int planenum;
short children[2]; // negative numbers are -(leafs+1), not nodes
{
int planenum;
short children[2]; // negative numbers are -(leafs+1), not nodes
unsigned short numfaces; // counting both sides
} dnode_t;
unsigned short numfaces; // counting both sides
} dnode_t;
+typedef struct dclipnode_s
{
int planenum;
short children[2]; // negative numbers are contents
} dclipnode_t;
{
int planenum;
short children[2]; // negative numbers are contents
} dclipnode_t;
+typedef struct texinfo_s
{
float vecs[2][4]; // [s/t][xyz offset]
int miptex;
{
float vecs[2][4]; // [s/t][xyz offset]
int miptex;
// note that edge 0 is never used, because negative edge nums are used for
// counterclockwise use of the edge in a face
// note that edge 0 is never used, because negative edge nums are used for
// counterclockwise use of the edge in a face
{
unsigned short v[2]; // vertex numbers
} dedge_t;
#define MAXLIGHTMAPS 4
{
unsigned short v[2]; // vertex numbers
} dedge_t;
#define MAXLIGHTMAPS 4
{
// LordHavoc: changed from short to unsigned short for q2 support
unsigned short planenum;
{
// LordHavoc: changed from short to unsigned short for q2 support
unsigned short planenum;
// leaf 0 is the generic CONTENTS_SOLID leaf, used for all solid areas
// all other leafs need visibility info
// leaf 0 is the generic CONTENTS_SOLID leaf, used for all solid areas
// all other leafs need visibility info
{
int contents;
int visofs; // -1 = no visibility info
{
int contents;
int visofs; // -1 = no visibility info
#define MAX_PARTICLETEXTURES 64
// particletexture_t is a rectangle in the particlefonttexture
#define MAX_PARTICLETEXTURES 64
// particletexture_t is a rectangle in the particlefonttexture
+typedef struct particletexture_s
{
rtexture_t *texture;
float s1, t1, s2, t2;
{
rtexture_t *texture;
float s1, t1, s2, t2;
{
int entity;
// draw this as lightning polygons, or a model?
{
int entity;
// draw this as lightning polygons, or a model?
+typedef struct usercmd_s
int sequence;
} usercmd_t;
int sequence;
} usercmd_t;
+typedef struct lightstyle_s
{
int length;
char map[MAX_STYLESTRING];
} lightstyle_t;
{
int length;
char map[MAX_STYLESTRING];
} lightstyle_t;
+typedef struct scoreboard_s
{
char name[MAX_SCOREBOARDNAME];
int frags;
int colors; // two 4 bit fields
} scoreboard_t;
{
char name[MAX_SCOREBOARDNAME];
int frags;
int colors; // two 4 bit fields
} scoreboard_t;
{
int destcolor[3];
int percent; // 0-256
{
int destcolor[3];
int percent; // 0-256
// the client_static_t structure is persistent through an arbitrary number
// of server connections
//
// the client_static_t structure is persistent through an arbitrary number
// of server connections
//
+typedef struct client_static_s
// the client_state_t structure is wiped completely at every
// server signon
//
// the client_state_t structure is wiped completely at every
// server signon
//
+typedef struct client_state_s
{
// true if playing in a local game and no one else is connected
int islocalgame;
{
// true if playing in a local game and no one else is connected
int islocalgame;
+typedef struct kbutton_s
{
int down[2]; // key nums holding it down
int state; // low bit is down state
{
int down[2]; // key nums holding it down
int state; // low bit is down state
{
// area to render in
int x, y, width, height;
{
// area to render in
int x, y, width, height;
/* file generated by qcc, do not modify */
/* file generated by qcc, do not modify */
+typedef struct cl_globalvars_s
{
int pad[28];
} cl_globalvars_t;
{
int pad[28];
} cl_globalvars_t;
+/*typedef struct cl_entvars_s
+typedef struct gamemode_info_s
{
const char* prog_name;
const char* cmdline;
{
const char* prog_name;
const char* cmdline;
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
See the GNU General Public License for more details.
#define MAX_CVAROPTIONS 16
#define MAX_CVAROPTIONS 16
+typedef struct cvaroption_s
{
int value;
const char *name;
}
cvaroption_t;
{
int value;
const char *name;
}
cvaroption_t;
+typedef struct menucvar_s
{
int type;
float valuemin, valuemax, valuestep;
{
int type;
float valuemin, valuemax, valuestep;
//#define HZREADBLOCKSIZE 16000
#define HZREADBLOCKSIZE 1048576
//#define HZREADBLOCKSIZE 16000
#define HZREADBLOCKSIZE 1048576
+typedef struct hz_bitstream_read_s
{
qfile_t *file;
int endoffile;
{
qfile_t *file;
int endoffile;
}
hz_bitstream_readblock_t;
}
hz_bitstream_readblock_t;
+typedef struct hz_bitstream_readblocks_s
{
hz_bitstream_readblock_t *blocks;
hz_bitstream_readblock_t *current;
{
hz_bitstream_readblock_t *blocks;
hz_bitstream_readblock_t *current;
// You can get the complete ZIP format description from PKWARE website
// You can get the complete ZIP format description from PKWARE website
+typedef struct pk3_endOfCentralDir_s
{
unsigned int signature;
unsigned short disknum;
{
unsigned int signature;
unsigned short disknum;
// ------ PAK files on disk ------ //
// ------ PAK files on disk ------ //
+typedef struct dpackfile_s
{
char name[56];
int filepos, filelen;
} dpackfile_t;
{
char name[56];
int filepos, filelen;
} dpackfile_t;
+typedef struct dpackheader_s
{
char id[4];
int dirofs;
{
char id[4];
int dirofs;
// file compressed using the deflate algorithm
#define PACKFILE_FLAG_DEFLATED (1 << 1)
// file compressed using the deflate algorithm
#define PACKFILE_FLAG_DEFLATED (1 << 1)
+typedef struct packfile_s
{
char name [MAX_QPATH];
int flags;
{
char name [MAX_QPATH];
int flags;
+static struct gl_state_s
{
int blendfunc1;
int blendfunc2;
{
int blendfunc1;
int blendfunc2;
extern cvar_t gl_printcheckerror;
//input to R_Mesh_State
extern cvar_t gl_printcheckerror;
//input to R_Mesh_State
+typedef struct rmeshstate_s
{
// textures
int tex1d[MAX_TEXTUREUNITS];
{
// textures
int tex1d[MAX_TEXTUREUNITS];
// size of images which hold fragment textures, ignores picmip and max_size
static int block_size;
// size of images which hold fragment textures, ignores picmip and max_size
static int block_size;
+typedef struct textypeinfo_s
{
int textype;
int inputbytesperpixel;
{
int textype;
int inputbytesperpixel;
{
char *name;
int minification, magnification;
{
char *name;
int minification, magnification;
=================================================================
*/
=================================================================
*/
{
char manufacturer;
char version;
{
char manufacturer;
char version;
{
char name[32];
unsigned width, height;
{
char name[32];
unsigned width, height;
extern qboolean in_client_mouse;
extern float in_mouse_x, in_mouse_y;
extern qboolean in_client_mouse;
extern float in_mouse_x, in_mouse_y;
-//enum {input_game,input_message,input_menu} input_dest;
+//enum input_dest_e {input_game,input_message,input_menu} input_dest;
void IN_Move (void);
// add additional movement on top of the keyboard move cmd
void IN_Move (void);
// add additional movement on top of the keyboard move cmd
static int key_bmap, key_bmap2;
static qbyte keydown[MAX_KEYS]; // 0 = up, 1 = down, 2 = repeating
static int key_bmap, key_bmap2;
static qbyte keydown[MAX_KEYS]; // 0 = up, 1 = down, 2 = repeating
+typedef struct keyname_s
+{
const char *name;
int keynum;
const char *name;
int keynum;
static const keyname_t keynames[] = {
{"TAB", K_TAB},
static const keyname_t keynames[] = {
{"TAB", K_TAB},
//
// these are the key numbers that should be passed to Key_Event
//
//
// these are the key numbers that should be passed to Key_Event
//
K_TAB = 9,
K_ENTER = 13,
K_ESCAPE = 27,
K_TAB = 9,
K_ENTER = 13,
K_ESCAPE = 27,
-typedef enum { key_game, key_message, key_menu } keydest_t;
+typedef enum keydest_e { key_game, key_message, key_menu } keydest_t;
#define MAX_INPUTLINES 32
#define MAX_INPUTLINE 256
#define MAX_INPUTLINES 32
#define MAX_INPUTLINE 256
#define PlaneDiff(point,plane) (((plane)->type < 3 ? (point)[(plane)->type] : DotProduct((point), (plane)->normal)) - (plane)->dist)
// LordHavoc: minimal plane structure
#define PlaneDiff(point,plane) (((plane)->type < 3 ? (point)[(plane)->type] : DotProduct((point), (plane)->normal)) - (plane)->dist)
// LordHavoc: minimal plane structure
+typedef struct tinyplane_s
{
float normal[3], dist;
}
tinyplane_t;
{
float normal[3], dist;
}
tinyplane_t;
+typedef struct tinydoubleplane_s
{
double normal[3], dist;
}
{
double normal[3], dist;
}
// Nehahra
#define NumberOfNehahraDemos 34
// Nehahra
#define NumberOfNehahraDemos 34
+typedef struct nehahrademonames_s
{
char *name;
char *desc;
{
char *name;
char *desc;
//=============================================================================
/* GAME OPTIONS MENU */
//=============================================================================
/* GAME OPTIONS MENU */
{
char *name;
char *description;
} level_t;
{
char *name;
char *description;
} level_t;
+typedef struct episode_s
{
char *description;
int firstLevel;
int levels;
} episode_t;
{
char *description;
int firstLevel;
int levels;
} episode_t;
+typedef struct gamelevels_s
{
char *gamename;
level_t *levels;
{
char *gamename;
level_t *levels;
gamelevels_t openquartzgame = {"OpenQuartz", openquartzlevels, openquartzepisodes, 3};
gamelevels_t defeatindetail2game = {"Defeat In Detail 2", defeatindetail2levels, defeatindetail2episodes, 1};
gamelevels_t openquartzgame = {"OpenQuartz", openquartzlevels, openquartzepisodes, 3};
gamelevels_t defeatindetail2game = {"Defeat In Detail 2", defeatindetail2levels, defeatindetail2episodes, 1};
+typedef struct gameinfo_s
{
gamemode_t gameid;
gamelevels_t *notregistered;
{
gamemode_t gameid;
gamelevels_t *notregistered;
+typedef struct daliashdr_s
+{
int ident;
int version;
vec3_t scale;
int ident;
int version;
vec3_t scale;
synctype_t synctype;
int flags;
float size;
synctype_t synctype;
int flags;
float size;
/*
========================================================================
/*
========================================================================
#define MD2ALIAS_VERSION 8
#define MD2_SKINNAME 64
#define MD2ALIAS_VERSION 8
#define MD2_SKINNAME 64
+typedef struct md2stvert_s
{
short s;
short t;
} md2stvert_t;
{
short s;
short t;
} md2stvert_t;
+typedef struct md2triangle_s
{
short index_xyz[3];
short index_st[3];
} md2triangle_t;
{
short index_xyz[3];
short index_st[3];
} md2triangle_t;
+typedef struct md2frame_s
{
float scale[3]; // multiply byte verts by this
float translate[3]; // then add this
{
float scale[3]; // multiply byte verts by this
float translate[3]; // then add this
// and an integer vertex index.
// and an integer vertex index.
{
int ident;
int version;
{
int ident;
int version;
+typedef struct RecursiveHullCheckTraceInfo_s
{
// the hull we're tracing through
const hull_t *hull;
{
// the hull we're tracing through
const hull_t *hull;
//
// in memory representation
//
//
// in memory representation
//
+typedef struct mvertex_s
// probably used only on q1bsp water
#define MATERIALFLAG_LIGHTBOTHSIDES 1024
// probably used only on q1bsp water
#define MATERIALFLAG_LIGHTBOTHSIDES 1024
{
dclipnode_t *clipnodes;
mplane_t *planes;
{
dclipnode_t *clipnodes;
mplane_t *planes;
#define Q2LUMP_AREAPORTALS 18
#define Q2HEADER_LUMPS 19
#define Q2LUMP_AREAPORTALS 18
#define Q2HEADER_LUMPS 19
+typedef struct q2dheader_s
{
int ident;
int version;
lump_t lumps[HEADER_LUMPS];
} q2dheader_t;
{
int ident;
int version;
lump_t lumps[HEADER_LUMPS];
} q2dheader_t;
+typedef struct q2dmodel_s
{
float mins[3], maxs[3];
float origin[3]; // for sounds or lights
{
float mins[3], maxs[3];
float origin[3]; // for sounds or lights
+typedef struct q2dnode_s
{
int planenum;
int children[2]; // negative numbers are -(leafs+1), not nodes
{
int planenum;
int children[2]; // negative numbers are -(leafs+1), not nodes
+typedef struct q2texinfo_s
{
float vecs[2][4]; // [s/t][xyz offset]
int flags; // miptex flags + overrides
{
float vecs[2][4]; // [s/t][xyz offset]
int flags; // miptex flags + overrides
int nexttexinfo; // for animations, -1 = end of chain
} q2texinfo_t;
int nexttexinfo; // for animations, -1 = end of chain
} q2texinfo_t;
+typedef struct q2dleaf_s
{
int contents; // OR of all brushes (not needed?)
{
int contents; // OR of all brushes (not needed?)
unsigned short numleafbrushes;
} q2dleaf_t;
unsigned short numleafbrushes;
} q2dleaf_t;
+typedef struct q2dbrushside_s
{
unsigned short planenum; // facing out of the leaf
short texinfo;
} q2dbrushside_t;
{
unsigned short planenum; // facing out of the leaf
short texinfo;
} q2dbrushside_t;
+typedef struct q2dbrush_s
{
int firstside;
int numsides;
{
int firstside;
int numsides;
// compressed bit vectors
#define Q2DVIS_PVS 0
#define Q2DVIS_PHS 1
// compressed bit vectors
#define Q2DVIS_PVS 0
#define Q2DVIS_PHS 1
{
int numclusters;
int bitofs[8][2]; // bitofs[numclusters][2]
{
int numclusters;
int bitofs[8][2]; // bitofs[numclusters][2]
// each area has a list of portals that lead into other areas
// when portals are closed, other areas may not be visible or
// hearable even if the vis info says that it should be
// each area has a list of portals that lead into other areas
// when portals are closed, other areas may not be visible or
// hearable even if the vis info says that it should be
+typedef struct q2dareaportal_s
{
int portalnum;
int otherarea;
} q2dareaportal_t;
{
int portalnum;
int otherarea;
} q2dareaportal_t;
+typedef struct q2darea_s
{
int numareaportals;
int firstareaportal;
{
int numareaportals;
int firstareaportal;
#define Q3LUMP_PVS 16 // potentially visible set; bit[clusters][clusters] (used by rendering)
#define Q3HEADER_LUMPS 17
#define Q3LUMP_PVS 16 // potentially visible set; bit[clusters][clusters] (used by rendering)
#define Q3HEADER_LUMPS 17
+typedef struct q3dheader_s
{
int ident;
int version;
lump_t lumps[HEADER_LUMPS];
} q3dheader_t;
{
int ident;
int version;
lump_t lumps[HEADER_LUMPS];
} q3dheader_t;
+typedef struct q3dtexture_s
{
char name[Q3PATHLENGTH];
int surfaceflags;
{
char name[Q3PATHLENGTH];
int surfaceflags;
q3dtexture_t;
// note: planes are paired, the pair of planes with i and i ^ 1 are opposites.
q3dtexture_t;
// note: planes are paired, the pair of planes with i and i ^ 1 are opposites.
+typedef struct q3dplane_s
{
float normal[3];
float dist;
}
q3dplane_t;
{
float normal[3];
float dist;
}
q3dplane_t;
+typedef struct q3dnode_s
{
int planeindex;
int childrenindex[2];
{
int planeindex;
int childrenindex[2];
+typedef struct q3dleaf_s
{
int clusterindex; // pvs index
int areaindex; // area index
{
int clusterindex; // pvs index
int areaindex; // area index
+typedef struct q3dmodel_s
{
float mins[3];
float maxs[3];
{
float mins[3];
float maxs[3];
+typedef struct q3dbrush_s
{
int firstbrushside;
int numbrushsides;
{
int firstbrushside;
int numbrushsides;
+typedef struct q3dbrushside_s
{
int planeindex;
int textureindex;
}
q3dbrushside_t;
{
int planeindex;
int textureindex;
}
q3dbrushside_t;
+typedef struct q3dvertex_s
{
float origin3f[3];
float texcoord2f[2];
{
float origin3f[3];
float texcoord2f[2];
+typedef struct q3dmeshvertex_s
{
int offset; // first vertex index of mesh
}
{
int offset; // first vertex index of mesh
}
#define Q3FACETYPE_MESH 3 // common
#define Q3FACETYPE_FLARE 4 // rare (is this ever used?)
#define Q3FACETYPE_MESH 3 // common
#define Q3FACETYPE_FLARE 4 // rare (is this ever used?)
+typedef struct q3dface_s
{
int textureindex;
int effectindex; // -1 if none
{
int textureindex;
int effectindex; // -1 if none
+typedef struct q3dlightmap_s
{
unsigned char rgb[128*128*3];
}
q3dlightmap_t;
{
unsigned char rgb[128*128*3];
}
q3dlightmap_t;
+typedef struct q3dlightgrid_s
{
unsigned char ambientrgb[3];
unsigned char diffusergb[3];
{
unsigned char ambientrgb[3];
unsigned char diffusergb[3];
{
int numclusters;
int chainlength;
{
int numclusters;
int chainlength;
#ifndef MODEL_SHARED_H
#define MODEL_SHARED_H
#ifndef MODEL_SHARED_H
#define MODEL_SHARED_H
-typedef enum {ST_SYNC=0, ST_RAND } synctype_t;
+typedef enum synctype_e {ST_SYNC=0, ST_RAND } synctype_t;
-typedef enum {mod_invalid, mod_brushq1, mod_sprite, mod_alias, mod_brushq2, mod_brushq3} modtype_t;
+typedef enum modtype_e {mod_invalid, mod_brushq1, mod_sprite, mod_alias, mod_brushq2, mod_brushq3} modtype_t;
typedef struct animscene_s
{
typedef struct animscene_s
{
+typedef struct mtexinfo_s
{
float vecs[2][4];
texture_t *texture;
{
float vecs[2][4];
texture_t *texture;
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
See the GNU General Public License for more details.
#define ALIAS_ONSEAM 0x0020
#define ALIAS_ONSEAM 0x0020
-typedef enum { ALIAS_SINGLE=0, ALIAS_GROUP } aliasframetype_t;
+typedef enum aliasframetype_e { ALIAS_SINGLE=0, ALIAS_GROUP } aliasframetype_t;
-typedef enum { ALIAS_SKIN_SINGLE=0, ALIAS_SKIN_GROUP } aliasskintype_t;
+typedef enum aliasskintype_e { ALIAS_SKIN_SINGLE=0, ALIAS_SKIN_GROUP } aliasskintype_t;
int ident;
int version;
vec3_t scale;
int ident;
int version;
vec3_t scale;
synctype_t synctype;
int flags;
float size;
synctype_t synctype;
int flags;
float size;
+typedef struct stvert_s
+{
int onseam;
int s;
int t;
int onseam;
int s;
int t;
-typedef struct dtriangle_s {
+typedef struct dtriangle_s
+{
int facesfront;
int vertindex[3];
int facesfront;
int vertindex[3];
#define DT_FACES_FRONT 0x0010
// This mirrors trivert_t in trilib.h, is present so Quake knows how to
// load this data
#define DT_FACES_FRONT 0x0010
// This mirrors trivert_t in trilib.h, is present so Quake knows how to
// load this data
+typedef struct trivertx_s
+{
qbyte v[3];
qbyte lightnormalindex;
qbyte v[3];
qbyte lightnormalindex;
+typedef struct daliasframe_s
+{
trivertx_t bboxmin; // lightnormal isn't used
trivertx_t bboxmax; // lightnormal isn't used
char name[16]; // frame name from grabbing
trivertx_t bboxmin; // lightnormal isn't used
trivertx_t bboxmax; // lightnormal isn't used
char name[16]; // frame name from grabbing
+typedef struct daliasgroup_s
+{
int numframes;
trivertx_t bboxmin; // lightnormal isn't used
trivertx_t bboxmax; // lightnormal isn't used
int numframes;
trivertx_t bboxmin; // lightnormal isn't used
trivertx_t bboxmax; // lightnormal isn't used
+typedef struct daliasskingroup_s
+{
+typedef struct daliasinterval_s
+{
+typedef struct daliasskininterval_s
+{
+}
+daliasskininterval_t;
+typedef struct daliasframetype_s
+{
+typedef struct daliasskintype_s
+{
/* file generated by qcc, do not modify */
/* file generated by qcc, do not modify */
+typedef struct m_globalvars_s
+{
int pad[28];
int self;
} m_globalvars_t;
int pad[28];
int self;
} m_globalvars_t;
+/*typedef struct m_entvars_s
#define SERVERLIST_ANDMASKCOUNT 5
#define SERVERLIST_ORMASKCOUNT 5
#define SERVERLIST_ANDMASKCOUNT 5
#define SERVERLIST_ORMASKCOUNT 5
+typedef enum serverlist_maskop_e
{
// SLMO_CONTAINS is the default for strings
// SLMO_GREATEREQUAL is the default for numbers (also used when OP == CONTAINS or NOTCONTAINS
{
// SLMO_CONTAINS is the default for strings
// SLMO_GREATEREQUAL is the default for numbers (also used when OP == CONTAINS or NOTCONTAINS
} serverlist_maskop_t;
// struct with all fields that you can search for or sort by
} serverlist_maskop_t;
// struct with all fields that you can search for or sort by
+typedef struct serverlist_info_s
{
// address for connecting
char cname[128];
{
// address for connecting
char cname[128];
SQS_TIMEDOUT
} serverlist_query_state;
SQS_TIMEDOUT
} serverlist_query_state;
+typedef struct serverlist_entry_s
{
// used to determine whether this entry should be included into the final view
serverlist_query_state query;
{
// used to determine whether this entry should be included into the final view
serverlist_query_state query;
char line2[128];
} serverlist_entry_t;
char line2[128];
} serverlist_entry_t;
+typedef struct serverlist_mask_s
{
qboolean active;
serverlist_maskop_t tests[SLIF_COUNT];
{
qboolean active;
serverlist_maskop_t tests[SLIF_COUNT];
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
See the GNU General Public License for more details.
typedef unsigned int func_t;
typedef int string_t;
typedef unsigned int func_t;
typedef int string_t;
-typedef enum {ev_void, ev_string, ev_float, ev_vector, ev_entity, ev_field, ev_function, ev_pointer} etype_t;
+typedef enum etype_e {ev_void, ev_string, ev_float, ev_vector, ev_entity, ev_field, ev_function, ev_pointer} etype_t;
OP_DONE,
OP_MUL_F,
OP_MUL_V,
OP_DONE,
OP_MUL_F,
OP_MUL_V,
OP_ADD_V,
OP_SUB_F,
OP_SUB_V,
OP_ADD_V,
OP_SUB_F,
OP_SUB_V,
OP_EQ_F,
OP_EQ_V,
OP_EQ_S,
OP_EQ_E,
OP_EQ_FNC,
OP_EQ_F,
OP_EQ_V,
OP_EQ_S,
OP_EQ_E,
OP_EQ_FNC,
OP_NE_F,
OP_NE_V,
OP_NE_S,
OP_NE_E,
OP_NE_FNC,
OP_NE_F,
OP_NE_V,
OP_NE_S,
OP_NE_E,
OP_NE_FNC,
{
unsigned short op;
signed short a,b,c;
{
unsigned short op;
signed short a,b,c;
{
unsigned short type; // if DEF_SAVEGLOBGAL bit is set
// the variable needs to be saved in savegames
unsigned short ofs;
int s_name;
{
unsigned short type; // if DEF_SAVEGLOBGAL bit is set
// the variable needs to be saved in savegames
unsigned short ofs;
int s_name;
#define DEF_SAVEGLOBAL (1<<15)
#define MAX_PARMS 8
#define DEF_SAVEGLOBAL (1<<15)
#define MAX_PARMS 8
+typedef struct dfunction_s
{
int first_statement; // negative numbers are builtins
int parm_start;
{
int first_statement; // negative numbers are builtins
int parm_start;
int numparms;
qbyte parm_size[MAX_PARMS];
int numparms;
qbyte parm_size[MAX_PARMS];
+typedef struct mfunction_s
{
int first_statement; // negative numbers are builtins
int parm_start;
{
int first_statement; // negative numbers are builtins
int parm_start;
int numparms;
qbyte parm_size[MAX_PARMS];
int numparms;
qbyte parm_size[MAX_PARMS];
+typedef struct dprograms_s
{
int version;
int crc; // check of header file
{
int version;
int crc; // check of header file
int numglobals;
int entityfields;
int numglobals;
int entityfields;
// LordHavoc: prints every opcode as it executes - warning: this is significant spew
cvar_t pr_traceqc = {0, "pr_traceqc", "0"};
// LordHavoc: prints every opcode as it executes - warning: this is significant spew
cvar_t pr_traceqc = {0, "pr_traceqc", "0"};
-#define MAX_FIELD_LEN 64
-#define GEFV_CACHESIZE 2
-
-typedef struct {
- ddef_t *pcache;
- char field[MAX_FIELD_LEN];
-} gefv_cache;
-
-static gefv_cache gefvCache[GEFV_CACHESIZE] = {{NULL, ""}, {NULL, ""}};
-
ddef_t *ED_FindField (const char *name);
mfunction_t *PRVM_ED_FindFunction (const char *name);
ddef_t *ED_FindField (const char *name);
mfunction_t *PRVM_ED_FindFunction (const char *name);
if (!progsname || !*progsname)
Host_Error("PR_LoadProgs: passed empty progsname");
if (!progsname || !*progsname)
Host_Error("PR_LoadProgs: passed empty progsname");
-// flush the non-C variable lookup cache
- for (i=0 ; i<GEFV_CACHESIZE ; i++)
- gefvCache[i].field[0] = 0;
-
PR_FreeAll();
progs = (dprograms_t *)FS_LoadFile (progsname, serverprogs_mempool, false);
PR_FreeAll();
progs = (dprograms_t *)FS_LoadFile (progsname, serverprogs_mempool, false);
+typedef struct prstack_s
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
See the GNU General Public License for more details.
#ifndef PROGDEFS_H
#define PROGDEFS_H
#ifndef PROGDEFS_H
#define PROGDEFS_H
+typedef struct globalvars_s
func_t SetChangeParms;
} globalvars_t;
func_t SetChangeParms;
} globalvars_t;
+typedef struct entvars_s
{
float modelindex;
vec3_t absmin;
{
float modelindex;
vec3_t absmin;
// LordHavoc: I own protocol ranges 96, 97, 3500-3599
// LordHavoc: I own protocol ranges 96, 97, 3500-3599
+struct protocolversioninfo_s
{
int number;
const char *name;
{
int number;
const char *name;
#define RENDER_TRANSPARENT 262144 // can't light during opaque stage
// this is 80 bytes
#define RENDER_TRANSPARENT 262144 // can't light during opaque stage
// this is 80 bytes
+typedef struct entity_state_s
{
// ! means this is not sent to client
double time; // ! time this state was built (used on client for interpolation)
{
// ! means this is not sent to client
double time; // ! time this state was built (used on client for interpolation)
server updates entities in looping ranges, a frame consists of a range of visible entities (not always all visible entities),
*/
server updates entities in looping ranges, a frame consists of a range of visible entities (not always all visible entities),
*/
+typedef struct entity_frameinfo_s
{
double time;
int framenum;
{
double time;
int framenum;
#define MAX_ENTITY_HISTORY 64
#define MAX_ENTITY_DATABASE (MAX_EDICTS * 2)
#define MAX_ENTITY_HISTORY 64
#define MAX_ENTITY_DATABASE (MAX_EDICTS * 2)
+typedef struct entityframe_database_s
{
// note: these can be far out of range, modulo with MAX_ENTITY_DATABASE to get a valid range (which may wrap)
// start and end of used area, when adding a new update to database, store at endpos, and increment endpos
{
// note: these can be far out of range, modulo with MAX_ENTITY_DATABASE to get a valid range (which may wrap)
// start and end of used area, when adding a new update to database, store at endpos, and increment endpos
entityframe_database_t;
// build entity data in this, to pass to entity read/write functions
entityframe_database_t;
// build entity data in this, to pass to entity read/write functions
+typedef struct entity_frame_s
{
double time;
int framenum;
{
double time;
int framenum;
#undef false
#ifndef __cplusplus
#undef false
#ifndef __cplusplus
-typedef enum {false, true} qboolean;
+typedef enum qboolean_e {false, true} qboolean;
#else
typedef bool qboolean;
#endif
#else
typedef bool qboolean;
#endif
+typedef struct nearlight_s
{
vec3_t origin;
//vec_t cullradius2;
{
vec3_t origin;
//vec_t cullradius2;
float particlex, particley, particlexv, particleyv, dx, dy, s, maxpathstrength;
qbyte *pixels;
int *image;
float particlex, particley, particlexv, particleyv, dx, dy, s, maxpathstrength;
qbyte *pixels;
int *image;
- struct {float x, y, strength;} path[PATHPOINTS], temppath;
+ struct lightningpathnode_s
+ {
+ float x, y, strength;
+ }
+ path[PATHPOINTS], temppath;
image = Mem_Alloc(tempmempool, BEAMWIDTH * BEAMHEIGHT * sizeof(int));
pixels = Mem_Alloc(tempmempool, BEAMWIDTH * BEAMHEIGHT * sizeof(qbyte[4]));
image = Mem_Alloc(tempmempool, BEAMWIDTH * BEAMHEIGHT * sizeof(int));
pixels = Mem_Alloc(tempmempool, BEAMWIDTH * BEAMHEIGHT * sizeof(qbyte[4]));
#define TEXTYPE_DSDT 4
// contents of this structure are mostly private to gl_textures.c
#define TEXTYPE_DSDT 4
// contents of this structure are mostly private to gl_textures.c
+typedef struct rtexture_s
{
// this is exposed (rather than private) for speed reasons only
int texnum;
{
// this is exposed (rather than private) for speed reasons only
int texnum;
rtexture_t;
// contents of this structure are private to gl_textures.c
rtexture_t;
// contents of this structure are private to gl_textures.c
+typedef struct rtexturepool_s
+typedef struct sbarpic_s
#ifndef SERVER_H
#define SERVER_H
#ifndef SERVER_H
#define SERVER_H
+typedef struct server_static_s
{
// number of svs.clients slots (updated by maxplayers command)
int maxclients;
{
// number of svs.clients slots (updated by maxplayers command)
int maxclients;
//=============================================================================
//=============================================================================
-typedef enum {ss_loading, ss_active} server_state_t;
+typedef enum server_state_e {ss_loading, ss_active} server_state_t;
{
// false if only a net client
qboolean active;
{
// false if only a net client
qboolean active;
+typedef struct sfxbuffer_s
{
unsigned int length;
unsigned int offset;
qbyte data[4]; // variable sized
} sfxbuffer_t;
{
unsigned int length;
unsigned int offset;
qbyte data[4]; // variable sized
} sfxbuffer_t;
+typedef struct snd_format_s
{
unsigned int speed;
unsigned int width;
{
unsigned int speed;
unsigned int width;
void *fetcher_data; // Per-sfx data for the sound fetching functions
};
void *fetcher_data; // Per-sfx data for the sound fetching functions
};
{
snd_format_t format;
int samples; // mono samples in buffer
{
snd_format_t format;
int samples; // mono samples in buffer
int bufferlength; // used only by certain drivers
} dma_t;
int bufferlength; // used only by certain drivers
} dma_t;
+typedef struct channel_s
{
sfx_t *sfx; // sfx number
unsigned int flags; // cf CHANNELFLAG_* defines
{
sfx_t *sfx; // sfx number
unsigned int flags; // cf CHANNELFLAG_* defines
#include "quakedef.h"
#include "snd_main.h"
#include "quakedef.h"
#include "snd_main.h"
+typedef struct portable_samplepair_s
+typedef struct wavinfo_s
// DirectSound output: 64KB in 1 buffer
#define SECONDARY_BUFFER_SIZE (64 * 1024)
// DirectSound output: 64KB in 1 buffer
#define SECONDARY_BUFFER_SIZE (64 * 1024)
-typedef enum {SIS_SUCCESS, SIS_FAILURE, SIS_NOTAVAIL} sndinitstat;
+typedef enum sndinitstat_e {SIS_SUCCESS, SIS_FAILURE, SIS_NOTAVAIL} sndinitstat;
static qboolean wavonly;
static qboolean dsound_init;
static qboolean wavonly;
static qboolean dsound_init;
#define SPRITE2_VERSION 2
#define SPRITE2_VERSION 2
+typedef struct dsprite_s
{
int ident;
int version;
{
int ident;
int version;
synctype_t synctype;
} dsprite_t;
synctype_t synctype;
} dsprite_t;
+typedef struct dspritehl_s
{
int ident;
int version;
{
int ident;
int version;
synctype_t synctype;
} dspritehl_t;
synctype_t synctype;
} dspritehl_t;
+typedef struct dsprite2frame_s
{
int width, height;
int origin_x, origin_y; // raster coordinates inside pic
char name[64]; // name of pcx file
} dsprite2frame_t;
{
int width, height;
int origin_x, origin_y; // raster coordinates inside pic
char name[64]; // name of pcx file
} dsprite2frame_t;
+typedef struct dsprite2_s
{
int ident;
int version;
{
int ident;
int version;
#define SPRHL_INDEXALPHA 2
#define SPRHL_ALPHATEST 3
#define SPRHL_INDEXALPHA 2
#define SPRHL_ALPHATEST 3
+typedef struct dspriteframe_s {
int origin[2];
int width;
int height;
} dspriteframe_t;
int origin[2];
int width;
int height;
} dspriteframe_t;
+typedef struct dspritegroup_s {
int numframes;
} dspritegroup_t;
int numframes;
} dspritegroup_t;
+typedef struct dspriteinterval_s {
float interval;
} dspriteinterval_t;
float interval;
} dspriteinterval_t;
-typedef enum { SPR_SINGLE=0, SPR_GROUP } spriteframetype_t;
+typedef enum spriteframetype_e { SPR_SINGLE=0, SPR_GROUP } spriteframetype_t;
+typedef struct dspriteframetype_s {
spriteframetype_t type;
} dspriteframetype_t;
spriteframetype_t type;
} dspriteframetype_t;
typedef void* dllhandle_t;
#endif
typedef void* dllhandle_t;
#endif
+typedef struct dllfunction_s
{
const char *name;
void **funcvariable;
{
const char *name;
void **funcvariable;
#define UI_EVENT_QUEUE_SIZE 32
#define UI_EVENT_QUEUE_SIZE 32
-typedef enum { UI_BUTTON, UI_LABEL } ui_control_type;
+typedef enum ui_control_type_e { UI_BUTTON, UI_LABEL } ui_control_type;
typedef struct ui_message_s ui_message_t;
typedef struct ui_item_s *ui_item_t;
typedef struct ui_message_s ui_message_t;
typedef struct ui_item_s *ui_item_t;
{
// these are set by VID_Mode
int width;
{
// these are set by VID_Mode
int width;
// LordHavoc: added alternate WAD2/WAD3 system for HalfLife texture wads
#define TEXWAD_MAXIMAGES 16384
// LordHavoc: added alternate WAD2/WAD3 system for HalfLife texture wads
#define TEXWAD_MAXIMAGES 16384
+typedef struct texwadlump_s
{
char name[16];
qfile_t *file;
{
char name[16];
qfile_t *file;
#define TYP_SOUND 67
#define TYP_MIPTEX 68
#define TYP_SOUND 67
#define TYP_MIPTEX 68
{
int width, height;
qbyte data[4]; // variably sized
{
int width, height;
qbyte data[4]; // variably sized
+typedef struct wadinfo_s
{
char identification[4]; // should be WAD2 or 2DAW
int numlumps;
int infotableofs;
} wadinfo_t;
{
char identification[4]; // should be WAD2 or 2DAW
int numlumps;
int infotableofs;
} wadinfo_t;
+typedef struct lumpinfo_s
{
int filepos;
int disksize;
{
int filepos;
int disksize;