epair_t *epairs;
} entity_t;
-//extern int num_entities;
extern entity_t entities[MAX_MAP_ENTITIES];
void ParseEntities (void);
epair_t *ParseEpair (void);
#endif
+
void CDAudio_Resume(void);
void CDAudio_Shutdown(void);
void CDAudio_Update(void);
+
void VectorVectors(const vec3_t forward, vec3_t right, vec3_t up);
#endif
+
// more might be added
#endif
+
+#ifndef CL_LIGHT_H
+#define CL_LIGHT_H
+
// LordHavoc: 256 dynamic lights
#define MAX_DLIGHTS 256
typedef struct
extern void CL_AllocDlight (entity_render_t *ent, vec3_t org, float radius, float red, float green, float blue, float decay, float lifetime);
extern void CL_DecayLights (void);
+
+#endif
+
+#ifndef CL_SCREEN_H
+#define CL_SCREEN_H
+
// drawqueue stuff for use by client to feed 2D art to renderer
#define MAX_DRAWQUEUE 262144
void CL_Screen_NewMap(void);
void CL_Screen_Init(void);
void CL_UpdateScreen(void);
+
+#endif
+
*/
// client.h
+#ifndef CLIENT_H
+#define CLIENT_H
+
typedef struct frameblend_s
{
int frame;
// refresh related state
struct model_s *worldmodel; // cl_entitites[0].model
-// int num_entities; // held in cl_entities array
int num_statics; // held in cl_staticentities array
entity_t viewent; // the gun model
#define PARTICLE_UPRIGHT_FACING 2
#define PARTICLE_ORIENTED_DOUBLESIDED 3
-/*
-typedef struct renderparticle_s
-{
- int tex;
- int orientation;
- int additive;
- int dynlight;
- float scalex;
- float scaley;
- float org[3];
- float dir[3];
- float color[4];
-}
-renderparticle_t;
-*/
-
void CL_Particles_Clear(void);
void CL_Particles_Init(void);
int numentities;
entity_render_t **entities;
- //int numparticles;
- //struct renderparticle_s *particles;
-
qbyte drawqueue[MAX_DRAWQUEUE];
int drawqueuesize;
}
extern mempool_t *cl_refdef_mempool;
#include "cgamevm.h"
+
+#endif
+
*/
+#ifndef CMD_H
+#define CMD_H
void Cbuf_Init (void);
// allocates an initial text buffer that will grow as needed
// used by command functions to send output to either the graphics console or
// passed as a print message to the client
+#endif
+
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-// comndef.h -- general definitions
+
+#ifndef COMMON_H
+#define COMMON_H
// LordHavoc: MSVC has a different name for snprintf
#ifdef WIN32
extern qboolean msg_badread; // set if a read goes beyond end of message
void MSG_BeginReading (void);
-//int MSG_ReadChar (void);
-//int MSG_ReadByte (void);
int MSG_ReadShort (void);
int MSG_ReadLong (void);
float MSG_ReadFloat (void);
#define MSG_ReadChar() (msg_readcount >= net_message.cursize ? (msg_badread = true, -1) : (signed char)net_message.data[msg_readcount++])
#define MSG_ReadByte() (msg_readcount >= net_message.cursize ? (msg_badread = true, -1) : (unsigned char)net_message.data[msg_readcount++])
-//#define MSG_ReadShort() ((msg_readcount + 2) > net_message.cursize ? (msg_badread = true, -1) : (short)net_message.data[msg_readcount+=2, msg_readcount-2] | (net_message.data[msg_readcount-1] << 8))
-//#define MSG_ReadLong() ((msg_readcount + 4) > net_message.cursize ? (msg_badread = true, -1) : (int)net_message.data[msg_readcount+=4, msg_readcount-4] | (net_message.data[msg_readcount-3] << 8) | (net_message.data[msg_readcount-2] << 16) | (net_message.data[msg_readcount-1] << 24))
float MSG_ReadCoord (void);
-//float MSG_ReadAngle (void);
float MSG_ReadDPCoord (void);
//============================================================================
-/*
-void Q_memset (void *dest, int fill, int count);
-void Q_memcpy (void *dest, void *src, int count);
-int Q_memcmp (void *m1, void *m2, int count);
-void Q_strcpy (char *dest, char *src);
-void Q_strncpy (char *dest, char *src, int count);
-int Q_strlen (char *str);
-char *Q_strrchr (char *s, char c);
-void Q_strcat (char *dest, char *src);
-int Q_strcmp (char *s1, char *s2);
-int Q_strncmp (char *s1, char *s2, int count);
-*/
int Q_strcasecmp (char *s1, char *s2);
int Q_strncasecmp (char *s1, char *s2, int n);
-/*
-int Q_atoi (char *str);
-float Q_atof (char *str);
-*/
//============================================================================
int matchpattern(char *in, char *pattern);
stringlist_t *listdirectory(char *path);
void freedirectory(stringlist_t *list);
+
+#endif
+
*/
// conproc.h
+#ifndef CONPROC_H
+#define CONPROC_H
+
#define CCOM_WRITE_TEXT 0x2
// Param1 : Text
void InitConProc (HANDLE hFile, HANDLE heventParent, HANDLE heventChild);
void DeinitConProc (void);
+#endif
+
*/
+#ifndef CONSOLE_H
+#define CONSOLE_H
+
//
// console
//
// formatted in columns on the console
void Con_DisplayList(char **list);
+#endif
+
*/
/* crc.h */
+#ifndef CRC_H
+#define CRC_H
+
void CRC_Init(unsigned short *crcvalue);
void CRC_ProcessByte(unsigned short *crcvalue, qbyte data);
// LordHavoc: added this for speed reasons
unsigned short CRC_Value(unsigned short crcvalue);
// LordHavoc: further speed and usability improvement
unsigned short CRC_Block(qbyte *data, int size);
+
+#endif
+
interface from being ambiguous.
*/
+#ifndef CVAR_H
+#define CVAR_H
+
// cvar flags
#define CVAR_SAVE 1
#define CVAR_NOTIFY 2
int flags;
char *name;
char *string;
-// qboolean archive; // set to true to cause it to be saved to vars.rc
-// qboolean server; // notifies players when changed
int integer;
float value;
float vector[3];
// Added by EvilTypeGuy eviltypeguy@qeradiant.com
// Thanks to Matthias "Maddes" Buecher, http://www.inside3d.com/qip/
+#endif
+
// draw.h -- these are the only functions outside the refresh allowed
// to touch the vid buffer
+#ifndef DRAW_H
+#define DRAW_H
+
// FIXME: move this stuff to cl_screen
typedef struct cachepic_s
{
cachepic_t *Draw_CachePic (char *path);
void R_DrawQueue(void);
+
+#endif
+
+#ifndef GL_BACKEND_H
+#define GL_BACKEND_H
+
#define MAX_TEXTUREUNITS 8
extern int c_meshtris, c_meshs, c_transtris, c_transmeshs;
void R_ClearScreen(void);
// invoke refresh of frame
void SCR_UpdateScreen (void);
+
+#endif
+
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
+// This thing is a table, don't include it normally, okay?
+
0, 0.19633, 0.392541, 0.588517, 0.784137, 0.979285, 1.17384, 1.3677,
1.56072, 1.75281, 1.94384, 2.1337, 2.32228, 2.50945, 2.69512, 2.87916,
3.06147, 3.24193, 3.42044, 3.59689, 3.77117, 3.94319, 4.11282, 4.27998,
-4.44456, -4.27998, -4.11282, -3.94319, -3.77117, -3.59689, -3.42044, -3.24193,
-3.06147, -2.87916, -2.69512, -2.50945, -2.32228, -2.1337, -1.94384, -1.75281,
-1.56072, -1.3677, -1.17384, -0.979285, -0.784137, -0.588517, -0.392541, -0.19633,
+
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
+#ifndef GLQUAKE_H
+#define GLQUAKE_H
+
// disable data conversion warnings
#ifdef _MSC_VER
-//#pragma warning(disable : 4244) // MIPS
-//#pragma warning(disable : 4136) // X86
-//#pragma warning(disable : 4051) // ALPHA
#pragma warning(disable : 4244) // LordHavoc: MSVC++ 4 x86, double/float
#pragma warning(disable : 4305) // LordHavoc: MSVC++ 6 x86, double/float
#pragma warning(disable : 4018) // LordHavoc: MSVC++ 4 x86, signed/unsigned mismatch
#endif
#include <GL/gl.h>
-//#include <GL/glu.h>
extern qboolean isG200;
extern qboolean isRagePro;
#else
#define CHECKGLERROR
#endif
+
+#endif
+
void Image_MipReduce(qbyte *in, qbyte *out, int *width, int *height, int destwidth, int destheight, int bytesperpixel);
#endif
+
*/
// input.h -- external (non-keyboard) input devices
+#ifndef INPUT_H
+#define INPUT_H
+
extern cvar_t in_pitch_min;
extern cvar_t in_pitch_max;
void IN_ClearStates (void);
// restores all button and position states to defaults
+#endif
+
*/
+#ifndef KEYS_H
+#define KEYS_H
+
// these are the key numbers that should be passed to Key_Event
typedef enum {
void Key_SetBinding (int keynum, char *binding);
void Key_ClearStates (void);
+#endif
+
#SND=snd_alsa_0_9.o
#SOUNDLIB=-lasound
#if you use ALSA version 0.5.x
-SND=snd_alsa_0_5.o
-SOUNDLIB=-lasound
+#SND=snd_alsa_0_5.o
+#SOUNDLIB=-lasound
#if you use the kernel sound driver or OSS
-#SND=snd_oss.o
-#SOUNDLIB=
+SND=snd_oss.o
+SOUNDLIB=
OBJECTS= builddate.o cd_linux.o chase.o cl_demo.o cl_input.o cl_main.o cl_parse.o cl_tent.o cmd.o common.o console.o crc.o cvar.o fractalnoise.o gl_draw.o r_sky.o gl_rmain.o gl_rsurf.o host.o host_cmd.o image.o keys.o mathlib.o menu.o model_alias.o model_brush.o model_shared.o model_sprite.o net_bsd.o net_udp.o net_dgrm.o net_loop.o net_main.o pr_cmds.o pr_edict.o pr_exec.o r_light.o r_explosion.o sbar.o snd_dma.o snd_mem.o snd_mix.o $(SND) sv_main.o sv_move.o sv_phys.o sv_user.o sv_light.o sys_linux.o transform.o view.o wad.o world.o zone.o vid_shared.o palette.o r_crosshairs.o gl_textures.o gl_models.o r_sprites.o r_modules.o r_explosion.o r_lerpanim.o protocol.o quakeio.o r_clip.o ui.o portals.o sys_shared.o cl_light.o gl_backend.o cl_particles.o cl_screen.o cgamevm.o cgame.o filematch.o collision.o cl_collision.o
*/
// mathlib.h
+#ifndef MATHLIB_H
+#define MATHLIB_H
+
#ifndef M_PI
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
#endif
#define PlaneDist(point,plane) ((plane)->type < 3 ? (point)[(plane)->type] : DotProduct((point), (plane)->normal))
#define PlaneDiff(point,plane) (((plane)->type < 3 ? (point)[(plane)->type] : DotProduct((point), (plane)->normal)) - (plane)->dist)
-//#define PlaneDist(point,plane) (DotProduct((point), (plane)->normal))
-//#define PlaneDiff(point,plane) (DotProduct((point), (plane)->normal) - (plane)->dist)
// LordHavoc: minimal plane structure
typedef struct
tinydoubleplane_t;
void RotatePointAroundVector(vec3_t dst, const vec3_t dir, const vec3_t point, float degrees);
+
+#endif
+
*/
+#ifndef MENU_H
+#define MENU_H
+
//
// the net drivers should just set the apropriate bits in m_activenet,
// instead of having the menu code look through their internal tables
void M_Draw (void);
void M_ToggleMenu_f (void);
+#endif
*/
+#ifndef MODEL_ALIAS_H
+#define MODEL_ALIAS_H
+
/*
==============================================================================
#include "modelgen.h"
-/*
-typedef struct
-{
- int firstpose;
- int numposes;
- float interval;
- trivertx_t bboxmin;
- trivertx_t bboxmax;
- int frame;
- char name[16];
-} maliasframedesc_t;
-
-typedef struct
-{
- trivertx_t bboxmin;
- trivertx_t bboxmax;
- int frame;
-} maliasgroupframedesc_t;
-
-typedef struct
-{
- int numframes;
- int intervals;
- maliasgroupframedesc_t frames[1];
-} maliasgroup_t;
-
-typedef struct mtriangle_s {
- int facesfront;
- int vertindex[3];
-} mtriangle_t;
-*/
-
typedef struct {
int ident;
int version;
extern void Mod_AliasInit(void);
#include "model_zymotic.h"
+
+#endif
+
*/
+#ifndef MODEL_BRUSH_H
+#define MODEL_BRUSH_H
+
/*
==============================================================================
#define SURF_PLANEBACK 2
#define SURF_DRAWSKY 4
-//#define SURF_DRAWSPRITE 8
#define SURF_DRAWTURB 0x10
#define SURF_LIGHTMAP 0x20
-//#define SURF_DRAWBACKGROUND 0x40
-//#define SURF_UNDERWATER 0x80
#define SURF_DRAWNOALPHA 0x100
#define SURF_DRAWFULLBRIGHT 0x200
#define SURF_LIGHTBOTHSIDES 0x400
void Mod_LoadBrushModel (struct model_s *mod, void *buffer);
void Mod_BrushInit(void);
void Mod_FindNonSolidLocation(vec3_t pos, struct model_s *mod);
+
+#endif
+
extern model_t *loadmodel;
extern char loadname[32]; // for hunk tags
-//extern model_t *Mod_LoadModel (model_t *mod, qboolean crash);
-
-//extern float RadiusFromBounds (vec3_t mins, vec3_t maxs);
extern model_t *Mod_FindName (char *name);
#endif // __MODEL__
+
*/
+#ifndef MODEL_SPRITE_H
+#define MODEL_SPRITE_H
+
/*
==============================================================================
extern void Mod_LoadSpriteModel (struct model_s *mod, void *buffer);
extern void Mod_SpriteInit(void);
+
+#endif
+
+#ifndef MODEL_ZYMOTIC_H
+#define MODEL_ZYMOTIC_H
+
typedef struct zymlump_s
{
int start;
zymvertex_t;
extern void Mod_LoadZymoticModel (struct model_s *mod, void *buffer);
+
+#endif
+
// * pass data from one to the other via model files. *
// *********************************************************
+#ifndef MODELGEN_H
+#define MODELGEN_H
+
#define ALIAS_VERSION 6
#define ALIAS_ONSEAM 0x0020
typedef struct {
aliasskintype_t type;
} daliasskintype_t;
+
+#endif
+
*/
// net.h -- quake's interface to the networking layer
+#ifndef NET_H
+#define NET_H
+
struct qsockaddr
{
short sa_family;
} qsocket_t;
extern qsocket_t *net_activeSockets;
-// LordHavoc: sockets are dynamically allocated now
-//extern qsocket_t *net_freeSockets;
-//extern int net_numsockets;
extern mempool_t *net_mempool;
typedef struct
extern cvar_t hostname;
void NET_Slist_f (void);
+
+#endif
+
*/
// net_dgrm.h
+#ifndef NET_DGRM_H
+#define NET_DGRM_H
int Datagram_Init (void);
void Datagram_Listen (qboolean state);
qboolean Datagram_CanSendUnreliableMessage (qsocket_t *sock);
void Datagram_Close (qsocket_t *sock);
void Datagram_Shutdown (void);
+
+#endif
+
*/
// net_loop.h
+#ifndef NET_LOOP_H
+#define NET_LOOP_H
+
int Loop_Init (void);
void Loop_Listen (qboolean state);
void Loop_SearchForHosts (qboolean xmit);
qboolean Loop_CanSendUnreliableMessage (qsocket_t *sock);
void Loop_Close (qsocket_t *sock);
void Loop_Shutdown (void);
+
+#endif
+
*/
// net_udp.h
+#ifndef NET_UDP_H
+#define NET_UDP_H
+
int UDP_Init (void);
void UDP_Shutdown (void);
void UDP_Listen (qboolean state);
int UDP_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2);
int UDP_GetSocketPort (struct qsockaddr *addr);
int UDP_SetSocketPort (struct qsockaddr *addr, int port);
+
+#endif
+
*/
// net_wins.h
+#ifndef NET_WINS_H
+#define NET_WINS_H
+
int WINS_Init (void);
void WINS_Shutdown (void);
void WINS_Listen (qboolean state);
int WINS_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2);
int WINS_GetSocketPort (struct qsockaddr *addr);
int WINS_SetSocketPort (struct qsockaddr *addr, int port);
+
+#endif
+
*/
// net_wipx.h
+#ifndef NET_WIPX_H
+#define NET_WIPX_H
+
int WIPX_Init (void);
void WIPX_Shutdown (void);
void WIPX_Listen (qboolean state);
int WIPX_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2);
int WIPX_GetSocketPort (struct qsockaddr *addr);
int WIPX_SetSocketPort (struct qsockaddr *addr, int port);
+
+#endif
+
+#ifndef PALLETE_H
+#define PALLETE_H
+
extern cvar_t v_gamma;
extern cvar_t v_contrast;
extern cvar_t v_brightness;
void Gamma_Init(void);
void Palette_Init(void);
+
+#endif
+
+#ifndef PORTALS_H
+#define PORTALS_H
+
int Portal_CheckPolygon(model_t *model, vec3_t eye, float *polypoints, int numpoints);
int Portal_CheckBox(model_t *model, vec3_t eye, vec3_t a, vec3_t b);
+
+#endif
+
// this file is shared by quake and qcc
+#ifndef PR_COMP_H
+#define PR_COMP_H
+
typedef int func_t;
typedef int string_t;
int entityfields;
} dprograms_t;
+#endif
+
+
+// This code isn't #ifdef/#define protectable, don't try.
+
while (1)
{
st++;
PR_RunError ("Bad opcode %i", st->op);
}
}
+
/* file generated by qcc, do not modify */
+#ifndef PROGDEFS_H
+#define PROGDEFS_H
+
typedef struct
{
int pad[28];
} entvars_t;
#define PROGHEADER_CRC 5927
+
+#endif
+
*/
+#ifndef PROGS_H
+#define PROGS_H
+
#include "pr_comp.h" // defs shared with qcc
#include "progdefs.h" // generated by program cdefs
entvars_t v; // C exported fields from progs
// other fields from progs come immediately after
} edict_t;
-//#define EDICT_FROM_AREA(l) ((edict_t *)((qbyte *)l - (int)&(((edict_t *)0)->area)))
-//#define EDICT_FROM_AREA(l) STRUCT_FROM_LINK(l,edict_t,area)
// LordHavoc: in an effort to eliminate time wasted on GetEdictFieldValue... see pr_edict.c for the functions which use these.
extern int eval_gravity;
edict_t *EDICT_NUM_ERROR(int n);
#define EDICT_NUM(n) (n >= 0 ? (n < sv.max_edicts ? (edict_t *)((qbyte *)sv.edicts + (n) * pr_edict_size) : EDICT_NUM_ERROR(n)) : EDICT_NUM_ERROR(n))
-//define EDICT_NUM(n) ((edict_t *)(sv.edicts+ (n)*pr_edict_size))
-//define NUM_FOR_EDICT(e) (((qbyte *)(e) - sv.edicts)/pr_edict_size)
-//edict_t *EDICT_NUM(int n);
int NUM_FOR_EDICT(edict_t *e);
#define NEXT_EDICT(e) ((edict_t *)( (qbyte *)e + pr_edict_size))
void ED_PrintEdicts (void);
void ED_PrintNum (int ent);
-//eval_t *GetEdictFieldValue(edict_t *ed, char *field);
+#endif
*/
// protocol.h -- communications protocols
+#ifndef PROTOCOL_H
+#define PROTOCOL_H
+
#define PROTOCOL_VERSION 15
#define DPPROTOCOL_VERSION1 96
#define DPPROTOCOL_VERSION2 97
void EntityFrame_Write(entity_database_t *d, entity_frame_t *f, sizebuf_t *msg);
// (client) reads a frame from network stream
void EntityFrame_Read(entity_database_t *d);
-// (client) reads (and interpolates) the eye location from the database,
-// given a current time
-//int EntityFrame_FetchEye(entity_database_t *d, vec3_t eye, double time);
-// (client) fetchs an entity from the frame by index into the entity list
-//int EntityFrame_FetchEntityByIndex(entity_frame_t *f, entity_state_t *e, int index);
-// (client) fetchs an entity from the frame by entity number
-//int EntityFrame_FetchEntityByNumber(entity_frame_t *f, entity_state_t *e, int number);
// (client) returns the frame number of the most recent frame recieved
int EntityFrame_MostRecentlyRecievedFrameNum(entity_database_t *d);
+
+#endif
+
*/
// quakedef.h -- primary header for client
+#ifndef QUAKEDEF_H
+#define QUAKEDEF_H
+
#define QUAKE_GAME // as opposed to utilities
#include <math.h>
#include "image.h"
void Sys_Shared_Init(void);
+
+#endif
+
+#ifndef R_CLIP_H
+#define R_CLIP_H
+
void R_Clip_StartFrame(void);
void R_Clip_EndFrame(void);
-//int R_Clip_Polygon(float *inv, int numpoints, int stride, int solid);
-//int R_Clip_Portal(float *inv, int numpoints, int stride);
// This takes a polygon in the form of vec_t triplets, at a caller specified
// stride (structure size), it can be solid (obscures other geometry) or not,
// a callback and two parameters must be provided (will be called if it is
// does not, but it is inadvisable)
void R_Clip_AddPolygon (vec_t *points, int numverts, int stride, int solid, void (*callback)(void *nativedata, void *nativedata2), void *nativedata, void *nativedata2, tinyplane_t *polyplane);
void R_Clip_AddBox(float *mins, float *maxs, void (*callback)(void *nativedata, void *nativedata2), void *nativedata, void *nativedata2);
+
+#endif
+
+#ifndef R_LERPANIM_H
+#define R_LERPANIM_H
+
void R_LerpAnimation(entity_render_t *r);
+
+#endif
+
+#ifndef R_LIGHT_H
+#define R_LIGHT_H
+
typedef struct
{
vec3_t origin;
void R_DrawCoronas(void);
void R_CompleteLightPoint(vec3_t color, vec3_t p, int dynamic, mleaf_t *leaf);
void R_LightModel(int numverts, float colorr, float colorg, float colorb, int worldcoords);
+
+#endif
+
+#ifndef R_MODULES_H
+#define R_MODULES_H
+
void R_Modules_Init(void);
void R_RegisterModule(char *name, void(*start)(void), void(*shutdown)(void), void(*newmap)(void));
void R_Modules_Start(void);
void R_Modules_Shutdown(void);
void R_Modules_NewMap(void);
void R_Modules_Restart(void);
+
+#endif
+
+#ifndef R_TEXTURES_H
+#define R_TEXTURES_H
+
// transparent
#define TEXF_ALPHA 0x00000001
// mipmapped
// returns height of texture, as was specified when it was uploaded
int R_TextureHeight(rtexture_t *rt);
+
+#endif
+
*/
-// refresh.h -- public interface to refresh functions
+#ifndef RENDER_H
+#define RENDER_H
// 1.0f / N table
extern float ixtable[4096];
// vis stuff
extern cvar_t r_novis;
-// model transform stuff
-//extern cvar_t gl_transform;
-
#define TOP_RANGE 16 // soldier uniform colors
#define BOTTOM_RANGE 96
//=============================================================================
-//extern qboolean r_cache_thrash; // compatability
extern entity_render_t *currentrenderentity;
extern int r_framecount;
extern mplane_t frustum[4];
extern cvar_t r_dynamic;
extern cvar_t r_waterripple;
-//extern float r_world_matrix[16];
-
void R_Init (void);
void R_RenderView (void); // must set r_refdef first
void R_InitSky (qbyte *src, int bytesperpixel); // called at level load
-//int R_VisibleCullBox (vec3_t mins, vec3_t maxs);
-
void R_NewMap (void);
void R_DrawWorld(void);
#define gl_solid_format 3
#define gl_alpha_format 4
-//#define PARANOID
+//#define PARANOID 1
// LordHavoc: was a major time waster
#define R_CullBox(mins,maxs) (frustum[0].BoxOnPlaneSideFunc(mins, maxs, &frustum[0]) == 2 || frustum[1].BoxOnPlaneSideFunc(mins, maxs, &frustum[1]) == 2 || frustum[2].BoxOnPlaneSideFunc(mins, maxs, &frustum[2]) == 2 || frustum[3].BoxOnPlaneSideFunc(mins, maxs, &frustum[3]) == 2)
extern qboolean fogenabled;
extern vec3_t fogcolor;
extern vec_t fogdensity;
-//#define calcfog(v) (exp(-(fogdensity*fogdensity*(((v)[0] - r_origin[0]) * vpn[0] + ((v)[1] - r_origin[1]) * vpn[1] + ((v)[2] - r_origin[2]) * vpn[2])*(((v)[0] - r_origin[0]) * vpn[0] + ((v)[1] - r_origin[1]) * vpn[1] + ((v)[2] - r_origin[2]) * vpn[2]))))
#define calcfog(v) (exp(-(fogdensity*fogdensity*(((v)[0] - r_origin[0])*((v)[0] - r_origin[0])+((v)[1] - r_origin[1])*((v)[1] - r_origin[1])+((v)[2] - r_origin[2])*((v)[2] - r_origin[2])))))
#define calcfogbyte(v) ((qbyte) (bound(0, ((int) ((float) (calcfog((v)) * 255.0f))), 255)))
// r_stain
void R_Stain (vec3_t origin, float radius, int cr1, int cg1, int cb1, int ca1, int cr2, int cg2, int cb2, int ca2);
+
+#endif
+
void Sbar_MiniDeathmatchOverlay (void);
void Sbar_DeathmatchOverlay (void);
+void Sbar_IntermissionOverlay (void);
+void Sbar_FinaleOverlay (void);
+
/*
===============
*/
+#ifndef SBAR_H
+#define SBAR_H
+
#define SBAR_HEIGHT 24
extern int sb_lines; // scan lines to draw
void Sbar_Draw (void);
// called every frame by screen
-void Sbar_IntermissionOverlay (void);
-// called each frame after the level has been completed
+#endif
-void Sbar_FinaleOverlay (void);
*/
// screen.h
+#ifndef SCREEN_H
+#define SCREEN_H
+
void CL_Screen_Init (void);
void CL_UpdateScreen (void);
void SCR_CenterPrint (char *str);
extern cvar_t crosshair;
extern cvar_t crosshair_size;
+
+#endif
+
*/
// server.h
+#ifndef SERVER_H
+#define SERVER_H
+
typedef struct
{
int maxclients;
// edict->flags
#define FL_FLY 1
#define FL_SWIM 2
-//#define FL_GLIMPSE 4
#define FL_CONVEYOR 4
#define FL_CLIENT 8
#define FL_INWATER 16
void SV_RunClients (void);
void SV_SaveSpawnparms (void);
void SV_SpawnServer (char *server);
+
+#endif
+
void S_AmbientOn (void);
#endif
+
// * pass data from one to the other via .spr files. *
// **********************************************************
+#ifndef SPRITEGEN_H
+#define SPRITEGEN_H
+
//-------------------------------------------------------
// This program generates .spr sprite package files.
// The format of the files is as follows:
typedef struct {
spriteframetype_t type;
} dspriteframetype_t;
+
+#endif
+
*/
// sys.h -- non-portable functions
+#ifndef SYS_H
+#define SYS_H
+
//
// file IO
//
void Sys_Shared_EarlyInit (void);
// called after Host_init
void Sys_Shared_LateInit (void);
+
+#endif
+
+#ifndef TRANSFORM_H
+#define TRANSFORM_H
+
extern vec_t softwaretransform_rotatematrix[3][4];
extern vec_t softwaretransform_matrix[3][4];
extern vec_t softwaretransform_invmatrix[3][4];
out[2] = DotProduct(soft_v, softwaretransform_invmatrix[2]);\
}\
}
+
+#endif
+
void ui_activate(ui_t *ui, int yes);
#endif
+
*/
// vid.h -- video driver defs
+#ifndef VID_H
+#define VID_H
+
typedef struct
{
// these are set with VID_GetWindowSize and can change from frame to frame
int realy;
int realwidth;
int realheight;
-// int recalc_refdef; // if true, recalc vid-based stuff
int conwidth;
int conheight;
void VID_GetWindowSize (int *x, int *y, int *width, int *height);
void VID_Finish (void);
+
+#endif
+
*/
// wad.h
+#ifndef WAD_H
+#define WAD_H
+
//===============
// TYPES
//===============
void W_LoadTextureWadFile (char *filename, int complain);
qbyte *W_GetTexture (char *name); // returns tempmempool allocated image data, width and height are in image_width and image_height
qbyte *W_ConvertWAD3Texture(miptex_t *tex); // returns tempmempool allocated image data, width and height are in image_width and image_height
+
+#endif
+
*/
// winquake.h: Win32-specific Quake header file
+#ifndef WINQUAKE_H
+#define WINQUAKE_H
+
#include <windows.h>
#ifndef SERVERONLY
extern LPDIRECTSOUNDBUFFER pDSBuf;
extern DWORD gSndBufSize;
-//#define SNDBUFSIZE 65536
void VID_LockBuffer (void);
void VID_UnlockBuffer (void);
int len, int type);
int (PASCAL FAR *pgetsockname)(SOCKET s, struct sockaddr FAR *name,
int FAR * namelen);
+
+#endif
+
*/
// world.h
+#ifndef WORLD_H
+#define WORLD_H
+
#include "collision.h"
#define MOVE_NORMAL 0
// if touchtriggers, calls prog functions for the intersected triggers
extern int SV_HullPointContents (hull_t *hull, int num, vec3_t p);
-// LordHavoc: waste of time to wrap it
-//int SV_PointContents (vec3_t p);
#define SV_PointContents(testpoint) SV_HullPointContents(&sv.worldmodel->hulls[0], 0, (testpoint))
// returns the CONTENTS_* value from the world at the given point.
// does not check any entities at all
// shouldn't be considered solid objects
// passedict is explicitly excluded from clipping checks (normally NULL)
+
+#endif
+
#ifndef ZONE_H
#define ZONE_H
+
#define POOLNAMESIZE 128
// give malloc padding so we can't waste most of a page at the end
#define MEMCLUMPSIZE (65536 - 1536)
extern mempool_t *zonemempool;
#define Z_Malloc(size) Mem_Alloc(zonemempool,size)
#define Z_Free(data) Mem_Free(data)
+
#endif
+