From: knghtbrd Date: Sun, 2 Jun 2002 13:43:41 +0000 (+0000) Subject: DP code cleanup, stage one - all headers that can be protected by ifdef X-Git-Tag: RELEASE_0_2_0_RC1~485 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=0256e57e16a302ad45090618b8d6eb5930788809;ds=sidebyside DP code cleanup, stage one - all headers that can be protected by ifdef and define now are. Some dead code found in them was also removed. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1889 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/bspfile.h b/bspfile.h index 24c3c148..f1e27880 100644 --- a/bspfile.h +++ b/bspfile.h @@ -308,7 +308,6 @@ typedef struct epair_t *epairs; } entity_t; -//extern int num_entities; extern entity_t entities[MAX_MAP_ENTITIES]; void ParseEntities (void); @@ -324,3 +323,4 @@ void GetVectorForKey (entity_t *ent, char *key, vec3_t vec); epair_t *ParseEpair (void); #endif + diff --git a/cdaudio.h b/cdaudio.h index e8519cd6..09c0d300 100644 --- a/cdaudio.h +++ b/cdaudio.h @@ -25,3 +25,4 @@ void CDAudio_Pause(void); void CDAudio_Resume(void); void CDAudio_Shutdown(void); void CDAudio_Update(void); + diff --git a/cg_math.h b/cg_math.h index e7921e83..d06eb75b 100644 --- a/cg_math.h +++ b/cg_math.h @@ -99,3 +99,4 @@ void AngleMatrix (vec3_t angles, vec3_t translate, vec_t matrix[][4]); void VectorVectors(const vec3_t forward, vec3_t right, vec3_t up); #endif + diff --git a/cgame_api.h b/cgame_api.h index 02edf0ee..8e7c4a57 100644 --- a/cgame_api.h +++ b/cgame_api.h @@ -66,3 +66,4 @@ void CG_Frame(double time); // more might be added #endif + diff --git a/cl_light.h b/cl_light.h index f29c25bf..d717025d 100644 --- a/cl_light.h +++ b/cl_light.h @@ -1,4 +1,7 @@ +#ifndef CL_LIGHT_H +#define CL_LIGHT_H + // LordHavoc: 256 dynamic lights #define MAX_DLIGHTS 256 typedef struct @@ -25,3 +28,6 @@ extern dlight_t cl_dlights[MAX_DLIGHTS]; 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 + diff --git a/cl_screen.h b/cl_screen.h index 212783d4..42575f03 100644 --- a/cl_screen.h +++ b/cl_screen.h @@ -1,4 +1,7 @@ +#ifndef CL_SCREEN_H +#define CL_SCREEN_H + // drawqueue stuff for use by client to feed 2D art to renderer #define MAX_DRAWQUEUE 262144 @@ -33,3 +36,6 @@ extern cvar_t scr_2dresolution; void CL_Screen_NewMap(void); void CL_Screen_Init(void); void CL_UpdateScreen(void); + +#endif + diff --git a/client.h b/client.h index 4b7eab45..3edc6f98 100644 --- a/client.h +++ b/client.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // client.h +#ifndef CLIENT_H +#define CLIENT_H + typedef struct frameblend_s { int frame; @@ -306,7 +309,6 @@ typedef struct // 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 @@ -474,22 +476,6 @@ void CL_InitTEnts (void); #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); @@ -539,9 +525,6 @@ typedef struct int numentities; entity_render_t **entities; - //int numparticles; - //struct renderparticle_s *particles; - qbyte drawqueue[MAX_DRAWQUEUE]; int drawqueuesize; } @@ -552,3 +535,6 @@ refdef_t r_refdef; extern mempool_t *cl_refdef_mempool; #include "cgamevm.h" + +#endif + diff --git a/cmd.h b/cmd.h index 640afc57..f4965187 100644 --- a/cmd.h +++ b/cmd.h @@ -34,6 +34,8 @@ The game starts with a Cbuf_AddText ("exec quake.rc\n"); Cbuf_Execute (); */ +#ifndef CMD_H +#define CMD_H void Cbuf_Init (void); // allocates an initial text buffer that will grow as needed @@ -133,3 +135,5 @@ void Cmd_Print (char *text); // used by command functions to send output to either the graphics console or // passed as a print message to the client +#endif + diff --git a/common.h b/common.h index 91835e73..95f94fb0 100644 --- a/common.h +++ b/common.h @@ -17,7 +17,9 @@ along with this program; if not, write to the Free Software 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 @@ -99,8 +101,6 @@ extern int msg_readcount; 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); @@ -108,11 +108,8 @@ char *MSG_ReadString (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); @@ -125,24 +122,8 @@ extern int dpprotocol; //============================================================================ -/* -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); -*/ //============================================================================ @@ -209,3 +190,6 @@ typedef struct stringlist_s int matchpattern(char *in, char *pattern); stringlist_t *listdirectory(char *path); void freedirectory(stringlist_t *list); + +#endif + diff --git a/conproc.h b/conproc.h index 743526f8..8fe112a1 100644 --- a/conproc.h +++ b/conproc.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // conproc.h +#ifndef CONPROC_H +#define CONPROC_H + #define CCOM_WRITE_TEXT 0x2 // Param1 : Text @@ -35,3 +38,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void InitConProc (HANDLE hFile, HANDLE heventParent, HANDLE heventChild); void DeinitConProc (void); +#endif + diff --git a/console.h b/console.h index 43a538f7..83149f26 100644 --- a/console.h +++ b/console.h @@ -18,6 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef CONSOLE_H +#define CONSOLE_H + // // console // @@ -52,3 +55,5 @@ void Con_CompleteCommandLine(void); // formatted in columns on the console void Con_DisplayList(char **list); +#endif + diff --git a/crc.h b/crc.h index 7bf4092a..ec12ce84 100644 --- a/crc.h +++ b/crc.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* 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 @@ -26,3 +29,6 @@ void CRC_ProcessBytes(unsigned short *crcvalue, qbyte *data, int size); unsigned short CRC_Value(unsigned short crcvalue); // LordHavoc: further speed and usability improvement unsigned short CRC_Block(qbyte *data, int size); + +#endif + diff --git a/cvar.h b/cvar.h index 936553e2..4e3e9790 100644 --- a/cvar.h +++ b/cvar.h @@ -53,6 +53,9 @@ Cvars are restricted from having the same names as commands to keep this interface from being ambiguous. */ +#ifndef CVAR_H +#define CVAR_H + // cvar flags #define CVAR_SAVE 1 #define CVAR_NOTIFY 2 @@ -95,8 +98,6 @@ typedef struct cvar_s 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]; @@ -159,3 +160,5 @@ void Cvar_List_f (void); // Added by EvilTypeGuy eviltypeguy@qeradiant.com // Thanks to Matthias "Maddes" Buecher, http://www.inside3d.com/qip/ +#endif + diff --git a/draw.h b/draw.h index a1896c01..085259cb 100644 --- a/draw.h +++ b/draw.h @@ -21,6 +21,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // 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 { @@ -39,3 +42,6 @@ void Draw_Init (void); cachepic_t *Draw_CachePic (char *path); void R_DrawQueue(void); + +#endif + diff --git a/gl_backend.h b/gl_backend.h index ae142129..9476312b 100644 --- a/gl_backend.h +++ b/gl_backend.h @@ -1,4 +1,7 @@ +#ifndef GL_BACKEND_H +#define GL_BACKEND_H + #define MAX_TEXTUREUNITS 8 extern int c_meshtris, c_meshs, c_transtris, c_transmeshs; @@ -92,3 +95,6 @@ qboolean SCR_ScreenShot(char *filename, int x, int y, int width, int height); void R_ClearScreen(void); // invoke refresh of frame void SCR_UpdateScreen (void); + +#endif + diff --git a/gl_warp_sin.h b/gl_warp_sin.h index 22976a73..fdf12267 100644 --- a/gl_warp_sin.h +++ b/gl_warp_sin.h @@ -17,6 +17,9 @@ along with this program; if not, write to the Free Software 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, @@ -49,3 +52,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -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, + diff --git a/glquake.h b/glquake.h index d9acfe70..3a0dfff2 100644 --- a/glquake.h +++ b/glquake.h @@ -17,12 +17,13 @@ along with this program; if not, write to the Free Software 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 @@ -35,7 +36,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #endif #include -//#include extern qboolean isG200; extern qboolean isRagePro; @@ -251,3 +251,6 @@ void GL_PrintError(int errornumber, char *filename, int linenumber); #else #define CHECKGLERROR #endif + +#endif + diff --git a/image.h b/image.h index 85adc1d5..214d4dd1 100644 --- a/image.h +++ b/image.h @@ -46,3 +46,4 @@ void Image_Resample (void *indata, int inwidth, int inheight, void *outdata, int void Image_MipReduce(qbyte *in, qbyte *out, int *width, int *height, int destwidth, int destheight, int bytesperpixel); #endif + diff --git a/input.h b/input.h index a44a5eec..9bff65e8 100644 --- a/input.h +++ b/input.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // 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; @@ -40,3 +43,5 @@ void IN_Mouse(usercmd_t *cmd, float mx, float my); void IN_ClearStates (void); // restores all button and position states to defaults +#endif + diff --git a/keys.h b/keys.h index d49d5e37..7e9b9dd5 100644 --- a/keys.h +++ b/keys.h @@ -18,6 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef KEYS_H +#define KEYS_H + // these are the key numbers that should be passed to Key_Event typedef enum { @@ -158,3 +161,5 @@ void Key_WriteBindings (QFile *f); void Key_SetBinding (int keynum, char *binding); void Key_ClearStates (void); +#endif + diff --git a/makefile b/makefile index b834db88..786d59fd 100644 --- a/makefile +++ b/makefile @@ -3,11 +3,11 @@ #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 diff --git a/mathlib.h b/mathlib.h index 28e4d051..30144539 100644 --- a/mathlib.h +++ b/mathlib.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // mathlib.h +#ifndef MATHLIB_H +#define MATHLIB_H + #ifndef M_PI #define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h #endif @@ -167,8 +170,6 @@ void PlaneClassify(struct mplane_s *p); #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 @@ -184,3 +185,6 @@ typedef struct tinydoubleplane_t; void RotatePointAroundVector(vec3_t dst, const vec3_t dir, const vec3_t point, float degrees); + +#endif + diff --git a/menu.h b/menu.h index 4e3d3346..44081dd9 100644 --- a/menu.h +++ b/menu.h @@ -18,6 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#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 @@ -60,4 +63,5 @@ void M_Keydown (int key); void M_Draw (void); void M_ToggleMenu_f (void); +#endif diff --git a/model_alias.h b/model_alias.h index 664c7e30..e45abc34 100644 --- a/model_alias.h +++ b/model_alias.h @@ -18,6 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef MODEL_ALIAS_H +#define MODEL_ALIAS_H + /* ============================================================================== @@ -29,38 +32,6 @@ Alias models are position independent, so the cache manager can move them. #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; @@ -165,3 +136,6 @@ extern void Mod_LoadQ2AliasModel (struct model_s *mod, void *buffer); extern void Mod_AliasInit(void); #include "model_zymotic.h" + +#endif + diff --git a/model_brush.h b/model_brush.h index 40ea1a64..554a5980 100644 --- a/model_brush.h +++ b/model_brush.h @@ -18,6 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef MODEL_BRUSH_H +#define MODEL_BRUSH_H + /* ============================================================================== @@ -71,11 +74,8 @@ texture_t; #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 @@ -300,3 +300,6 @@ struct model_s; void Mod_LoadBrushModel (struct model_s *mod, void *buffer); void Mod_BrushInit(void); void Mod_FindNonSolidLocation(vec3_t pos, struct model_s *mod); + +#endif + diff --git a/model_shared.h b/model_shared.h index d55844e3..480e1f64 100644 --- a/model_shared.h +++ b/model_shared.h @@ -236,9 +236,7 @@ void Mod_PurgeUnused(void); 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__ + diff --git a/model_sprite.h b/model_sprite.h index 394fb830..3304f2eb 100644 --- a/model_sprite.h +++ b/model_sprite.h @@ -18,6 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef MODEL_SPRITE_H +#define MODEL_SPRITE_H + /* ============================================================================== @@ -37,3 +40,6 @@ typedef struct mspriteframe_s extern void Mod_LoadSpriteModel (struct model_s *mod, void *buffer); extern void Mod_SpriteInit(void); + +#endif + diff --git a/model_zymotic.h b/model_zymotic.h index ff3f4b3d..60f48d46 100644 --- a/model_zymotic.h +++ b/model_zymotic.h @@ -1,4 +1,7 @@ +#ifndef MODEL_ZYMOTIC_H +#define MODEL_ZYMOTIC_H + typedef struct zymlump_s { int start; @@ -62,3 +65,6 @@ typedef struct zymvertex_s zymvertex_t; extern void Mod_LoadZymoticModel (struct model_s *mod, void *buffer); + +#endif + diff --git a/modelgen.h b/modelgen.h index 3b5fd543..7439c281 100644 --- a/modelgen.h +++ b/modelgen.h @@ -27,6 +27,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // * pass data from one to the other via model files. * // ********************************************************* +#ifndef MODELGEN_H +#define MODELGEN_H + #define ALIAS_VERSION 6 #define ALIAS_ONSEAM 0x0020 @@ -107,3 +110,6 @@ typedef struct { typedef struct { aliasskintype_t type; } daliasskintype_t; + +#endif + diff --git a/net.h b/net.h index 9684aa68..126dbe03 100644 --- a/net.h +++ b/net.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // net.h -- quake's interface to the networking layer +#ifndef NET_H +#define NET_H + struct qsockaddr { short sa_family; @@ -149,9 +152,6 @@ typedef struct qsocket_s } 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 @@ -330,3 +330,6 @@ extern qboolean slistLocal; extern cvar_t hostname; void NET_Slist_f (void); + +#endif + diff --git a/net_dgrm.h b/net_dgrm.h index da052e70..af401392 100644 --- a/net_dgrm.h +++ b/net_dgrm.h @@ -19,6 +19,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // net_dgrm.h +#ifndef NET_DGRM_H +#define NET_DGRM_H int Datagram_Init (void); void Datagram_Listen (qboolean state); @@ -32,3 +34,6 @@ qboolean Datagram_CanSendMessage (qsocket_t *sock); qboolean Datagram_CanSendUnreliableMessage (qsocket_t *sock); void Datagram_Close (qsocket_t *sock); void Datagram_Shutdown (void); + +#endif + diff --git a/net_loop.h b/net_loop.h index 90cdb2c5..4f248f49 100644 --- a/net_loop.h +++ b/net_loop.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // 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); @@ -31,3 +34,6 @@ qboolean Loop_CanSendMessage (qsocket_t *sock); qboolean Loop_CanSendUnreliableMessage (qsocket_t *sock); void Loop_Close (qsocket_t *sock); void Loop_Shutdown (void); + +#endif + diff --git a/net_udp.h b/net_udp.h index 87ab879d..bc58657d 100644 --- a/net_udp.h +++ b/net_udp.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // net_udp.h +#ifndef NET_UDP_H +#define NET_UDP_H + int UDP_Init (void); void UDP_Shutdown (void); void UDP_Listen (qboolean state); @@ -37,3 +40,6 @@ int UDP_GetAddrFromName (char *name, struct qsockaddr *addr); int UDP_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2); int UDP_GetSocketPort (struct qsockaddr *addr); int UDP_SetSocketPort (struct qsockaddr *addr, int port); + +#endif + diff --git a/net_wins.h b/net_wins.h index d9072485..c04a5c7c 100644 --- a/net_wins.h +++ b/net_wins.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // net_wins.h +#ifndef NET_WINS_H +#define NET_WINS_H + int WINS_Init (void); void WINS_Shutdown (void); void WINS_Listen (qboolean state); @@ -37,3 +40,6 @@ int WINS_GetAddrFromName (char *name, struct qsockaddr *addr); int WINS_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2); int WINS_GetSocketPort (struct qsockaddr *addr); int WINS_SetSocketPort (struct qsockaddr *addr, int port); + +#endif + diff --git a/net_wipx.h b/net_wipx.h index 109120ea..c5983530 100644 --- a/net_wipx.h +++ b/net_wipx.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // net_wipx.h +#ifndef NET_WIPX_H +#define NET_WIPX_H + int WIPX_Init (void); void WIPX_Shutdown (void); void WIPX_Listen (qboolean state); @@ -37,3 +40,6 @@ int WIPX_GetAddrFromName (char *name, struct qsockaddr *addr); int WIPX_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2); int WIPX_GetSocketPort (struct qsockaddr *addr); int WIPX_SetSocketPort (struct qsockaddr *addr, int port); + +#endif + diff --git a/palette.h b/palette.h index f6e862e0..8013e989 100644 --- a/palette.h +++ b/palette.h @@ -1,4 +1,7 @@ +#ifndef PALLETE_H +#define PALLETE_H + extern cvar_t v_gamma; extern cvar_t v_contrast; extern cvar_t v_brightness; @@ -18,3 +21,6 @@ void BuildGammaTable16(float prescale, float gamma, float scale, float base, uns void Gamma_Init(void); void Palette_Init(void); + +#endif + diff --git a/portals.h b/portals.h index 80f88a11..02e7642c 100644 --- a/portals.h +++ b/portals.h @@ -1,3 +1,9 @@ +#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 + diff --git a/pr_comp.h b/pr_comp.h index 614881ac..87999997 100644 --- a/pr_comp.h +++ b/pr_comp.h @@ -20,6 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // this file is shared by quake and qcc +#ifndef PR_COMP_H +#define PR_COMP_H + typedef int func_t; typedef int string_t; @@ -178,3 +181,5 @@ typedef struct int entityfields; } dprograms_t; +#endif + diff --git a/pr_execprogram.h b/pr_execprogram.h index 838a0036..fd306cf2 100644 --- a/pr_execprogram.h +++ b/pr_execprogram.h @@ -1,3 +1,6 @@ + +// This code isn't #ifdef/#define protectable, don't try. + while (1) { st++; @@ -599,3 +602,4 @@ PR_RunError ("Bad opcode %i", st->op); } } + diff --git a/progdefs.h b/progdefs.h index 633e6d4c..14e2e919 100644 --- a/progdefs.h +++ b/progdefs.h @@ -20,6 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /* file generated by qcc, do not modify */ +#ifndef PROGDEFS_H +#define PROGDEFS_H + typedef struct { int pad[28]; @@ -161,3 +164,6 @@ typedef struct } entvars_t; #define PROGHEADER_CRC 5927 + +#endif + diff --git a/progs.h b/progs.h index 166d2eab..f8e15136 100644 --- a/progs.h +++ b/progs.h @@ -18,6 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef PROGS_H +#define PROGS_H + #include "pr_comp.h" // defs shared with qcc #include "progdefs.h" // generated by program cdefs @@ -53,8 +56,6 @@ typedef struct edict_s 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; @@ -138,10 +139,7 @@ void ED_LoadFromFile (char *data); 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)) @@ -183,5 +181,5 @@ void PR_RunError (char *error, ...); void ED_PrintEdicts (void); void ED_PrintNum (int ent); -//eval_t *GetEdictFieldValue(edict_t *ed, char *field); +#endif diff --git a/protocol.h b/protocol.h index 0f70aabf..c90867b3 100644 --- a/protocol.h +++ b/protocol.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // protocol.h -- communications protocols +#ifndef PROTOCOL_H +#define PROTOCOL_H + #define PROTOCOL_VERSION 15 #define DPPROTOCOL_VERSION1 96 #define DPPROTOCOL_VERSION2 97 @@ -416,12 +419,8 @@ void EntityFrame_AddFrame(entity_database_t *d, entity_frame_t *f); 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 + diff --git a/quakedef.h b/quakedef.h index dbaf99cc..8209817a 100644 --- a/quakedef.h +++ b/quakedef.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // quakedef.h -- primary header for client +#ifndef QUAKEDEF_H +#define QUAKEDEF_H + #define QUAKE_GAME // as opposed to utilities #include @@ -297,3 +300,6 @@ void fractalnoisequick(unsigned char *noise, int size, int startgrid); #include "image.h" void Sys_Shared_Init(void); + +#endif + diff --git a/r_clip.h b/r_clip.h index 6c3c02fa..d9457034 100644 --- a/r_clip.h +++ b/r_clip.h @@ -1,8 +1,9 @@ +#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 @@ -12,3 +13,6 @@ void R_Clip_EndFrame(void); // 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 + diff --git a/r_lerpanim.h b/r_lerpanim.h index a90101cf..2a24e0c2 100644 --- a/r_lerpanim.h +++ b/r_lerpanim.h @@ -1,2 +1,8 @@ +#ifndef R_LERPANIM_H +#define R_LERPANIM_H + void R_LerpAnimation(entity_render_t *r); + +#endif + diff --git a/r_light.h b/r_light.h index c3899f45..cdbde025 100644 --- a/r_light.h +++ b/r_light.h @@ -1,4 +1,7 @@ +#ifndef R_LIGHT_H +#define R_LIGHT_H + typedef struct { vec3_t origin; @@ -19,3 +22,6 @@ void R_MarkLights(void); 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 + diff --git a/r_modules.h b/r_modules.h index 93c8d3f4..6ff74efc 100644 --- a/r_modules.h +++ b/r_modules.h @@ -1,7 +1,13 @@ +#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 + diff --git a/r_textures.h b/r_textures.h index 5d810b93..3abbe583 100644 --- a/r_textures.h +++ b/r_textures.h @@ -1,4 +1,7 @@ +#ifndef R_TEXTURES_H +#define R_TEXTURES_H + // transparent #define TEXF_ALPHA 0x00000001 // mipmapped @@ -68,3 +71,6 @@ int R_TextureWidth(rtexture_t *rt); // returns height of texture, as was specified when it was uploaded int R_TextureHeight(rtexture_t *rt); + +#endif + diff --git a/render.h b/render.h index 76777d16..ef2e59c0 100644 --- a/render.h +++ b/render.h @@ -18,7 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// refresh.h -- public interface to refresh functions +#ifndef RENDER_H +#define RENDER_H // 1.0f / N table extern float ixtable[4096]; @@ -64,15 +65,11 @@ extern float *aliasvertcolor; // 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]; @@ -100,16 +97,12 @@ extern cvar_t r_wateralpha; 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); @@ -129,7 +122,7 @@ void R_DrawExplosions(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) @@ -138,7 +131,6 @@ void R_DrawExplosions(void); 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))) @@ -190,3 +182,6 @@ void R_TimeReport_End(void); // 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 + diff --git a/sbar.c b/sbar.c index 82305a38..9e1deae4 100644 --- a/sbar.c +++ b/sbar.c @@ -84,6 +84,9 @@ cvar_t showfps = {CVAR_SAVE, "showfps", "0"}; void Sbar_MiniDeathmatchOverlay (void); void Sbar_DeathmatchOverlay (void); +void Sbar_IntermissionOverlay (void); +void Sbar_FinaleOverlay (void); + /* =============== diff --git a/sbar.h b/sbar.h index 4a9a60e2..8be484c2 100644 --- a/sbar.h +++ b/sbar.h @@ -18,6 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef SBAR_H +#define SBAR_H + #define SBAR_HEIGHT 24 extern int sb_lines; // scan lines to draw @@ -27,7 +30,5 @@ void Sbar_Init (void); 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); diff --git a/screen.h b/screen.h index 252b120c..86b9e10b 100644 --- a/screen.h +++ b/screen.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // screen.h +#ifndef SCREEN_H +#define SCREEN_H + void CL_Screen_Init (void); void CL_UpdateScreen (void); void SCR_CenterPrint (char *str); @@ -40,3 +43,6 @@ extern cvar_t showfps; extern cvar_t crosshair; extern cvar_t crosshair_size; + +#endif + diff --git a/server.h b/server.h index 5a330ffe..88813efc 100644 --- a/server.h +++ b/server.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // server.h +#ifndef SERVER_H +#define SERVER_H + typedef struct { int maxclients; @@ -166,7 +169,6 @@ typedef struct client_s // 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 @@ -265,3 +267,6 @@ void SV_CheckForNewClients (void); void SV_RunClients (void); void SV_SaveSpawnparms (void); void SV_SpawnServer (char *server); + +#endif + diff --git a/sound.h b/sound.h index 8f34de9a..a37b2e8d 100644 --- a/sound.h +++ b/sound.h @@ -178,3 +178,4 @@ void S_AmbientOff (void); void S_AmbientOn (void); #endif + diff --git a/spritegn.h b/spritegn.h index 79c18d0e..027e64e2 100644 --- a/spritegn.h +++ b/spritegn.h @@ -27,6 +27,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // * 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: @@ -104,3 +107,6 @@ typedef enum { SPR_SINGLE=0, SPR_GROUP } spriteframetype_t; typedef struct { spriteframetype_t type; } dspriteframetype_t; + +#endif + diff --git a/sys.h b/sys.h index 4b5372ea..e8de6bb1 100644 --- a/sys.h +++ b/sys.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // sys.h -- non-portable functions +#ifndef SYS_H +#define SYS_H + // // file IO // @@ -64,3 +67,6 @@ void Sys_SendKeyEvents (void); void Sys_Shared_EarlyInit (void); // called after Host_init void Sys_Shared_LateInit (void); + +#endif + diff --git a/transform.h b/transform.h index 2cfe37ba..a5e7a091 100644 --- a/transform.h +++ b/transform.h @@ -1,4 +1,7 @@ +#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]; @@ -64,3 +67,6 @@ void softwaretransformforentity (entity_render_t *r); out[2] = DotProduct(soft_v, softwaretransform_invmatrix[2]);\ }\ } + +#endif + diff --git a/ui.h b/ui.h index 71b4ec91..91f9de8f 100644 --- a/ui.h +++ b/ui.h @@ -81,3 +81,4 @@ int ui_uiactive(ui_t *ui); void ui_activate(ui_t *ui, int yes); #endif + diff --git a/vid.h b/vid.h index 2df5d6fc..5b078578 100644 --- a/vid.h +++ b/vid.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // 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 @@ -26,7 +29,6 @@ typedef struct int realy; int realwidth; int realheight; -// int recalc_refdef; // if true, recalc vid-based stuff int conwidth; int conheight; @@ -62,3 +64,6 @@ int VID_SetGamma (float prescale, float gamma, float scale, float base); void VID_GetWindowSize (int *x, int *y, int *width, int *height); void VID_Finish (void); + +#endif + diff --git a/wad.h b/wad.h index ac8199bf..cbcdcd6f 100644 --- a/wad.h +++ b/wad.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // wad.h +#ifndef WAD_H +#define WAD_H + //=============== // TYPES //=============== @@ -76,3 +79,6 @@ extern int image_width, image_height; 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 + diff --git a/winquake.h b/winquake.h index 0584ccfb..72e0652f 100644 --- a/winquake.h +++ b/winquake.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // winquake.h: Win32-specific Quake header file +#ifndef WINQUAKE_H +#define WINQUAKE_H + #include #ifndef SERVERONLY @@ -44,7 +47,6 @@ extern LPDIRECTSOUND pDS; extern LPDIRECTSOUNDBUFFER pDSBuf; extern DWORD gSndBufSize; -//#define SNDBUFSIZE 65536 void VID_LockBuffer (void); void VID_UnlockBuffer (void); @@ -99,3 +101,6 @@ struct hostent FAR * (PASCAL FAR *pgethostbyaddr)(const char FAR * addr, int len, int type); int (PASCAL FAR *pgetsockname)(SOCKET s, struct sockaddr FAR *name, int FAR * namelen); + +#endif + diff --git a/world.h b/world.h index 624b9431..81c662ce 100644 --- a/world.h +++ b/world.h @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // world.h +#ifndef WORLD_H +#define WORLD_H + #include "collision.h" #define MOVE_NORMAL 0 @@ -41,8 +44,6 @@ void SV_LinkEdict (edict_t *ent, qboolean touch_triggers); // 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 @@ -62,3 +63,6 @@ trace_t SV_Move (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int type, e // shouldn't be considered solid objects // passedict is explicitly excluded from clipping checks (normally NULL) + +#endif + diff --git a/zone.h b/zone.h index 7a069181..d50265fb 100644 --- a/zone.h +++ b/zone.h @@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #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) @@ -116,4 +117,6 @@ void Memory_Init_Commands (void); extern mempool_t *zonemempool; #define Z_Malloc(size) Mem_Alloc(zonemempool,size) #define Z_Free(data) Mem_Free(data) + #endif +