]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
DP code cleanup, stage one - all headers that can be protected by ifdef
authorknghtbrd <knghtbrd@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 2 Jun 2002 13:43:41 +0000 (13:43 +0000)
committerknghtbrd <knghtbrd@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 2 Jun 2002 13:43:41 +0000 (13:43 +0000)
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

63 files changed:
bspfile.h
cdaudio.h
cg_math.h
cgame_api.h
cl_light.h
cl_screen.h
client.h
cmd.h
common.h
conproc.h
console.h
crc.h
cvar.h
draw.h
gl_backend.h
gl_warp_sin.h
glquake.h
image.h
input.h
keys.h
makefile
mathlib.h
menu.h
model_alias.h
model_brush.h
model_shared.h
model_sprite.h
model_zymotic.h
modelgen.h
net.h
net_dgrm.h
net_loop.h
net_udp.h
net_wins.h
net_wipx.h
palette.h
portals.h
pr_comp.h
pr_execprogram.h
progdefs.h
progs.h
protocol.h
quakedef.h
r_clip.h
r_lerpanim.h
r_light.h
r_modules.h
r_textures.h
render.h
sbar.c
sbar.h
screen.h
server.h
sound.h
spritegn.h
sys.h
transform.h
ui.h
vid.h
wad.h
winquake.h
world.h
zone.h

index 24c3c1483915e97deb8307356ee4d09710fce56c..f1e27880b23ec45e2f0e0cf20cd7cf5f30d8513c 100644 (file)
--- 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
+
index e8519cd6d7efe695df40f7c92756628ac0589ff1..09c0d3002a3aa1b71a514837f4f01ba772d05c35 100644 (file)
--- 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);
+
index e7921e836804da5410f334c3649b3eef91edb23c..d06eb75b510cfc870b82d12fec10418bad9101fe 100644 (file)
--- 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
+
index 02edf0ee184fcc5c5a9a6bf6656993949cedb171..8e7c4a572145a6934cc21df7c5ccd1c66c7582bf 100644 (file)
@@ -66,3 +66,4 @@ void CG_Frame(double time);
 // more might be added
 
 #endif
+
index f29c25bff904a97c47f439c8c4262462f60a4f3b..d717025d5da36b867573fbdc31041a569a75483b 100644 (file)
@@ -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
+
index 212783d416fe0d00972b83eef82247b10f150b09..42575f0341028cc75850d516524ff7b78aec73cd 100644 (file)
@@ -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
+
index 4b7eab4587e2b56510e73d9c5b067ecb852ea54f..3edc6f9898b79623a409757041550fa6f0d32517 100644 (file)
--- 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 640afc57a567b24efbc945e9053f443d1852558f..f496518774f7496ed291ba14db11d32839b25ab3 100644 (file)
--- 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
+
index 91835e73c04ac009ddd3e638d4da3dd6d1147e8b..95f94fb0f4534cb960bf55ec791ea841d41f8a12 100644 (file)
--- 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
+
index 743526f87839ef0ff8d6453e7de0979586127aca..8fe112a1c44e1c29109f4758e27f9b77a9b58d48 100644 (file)
--- 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
+
index 43a538f7067ded0fdf60e163761b55c2240c9645..83149f26abfb7eba4fee1d5ef63576ed31de002d 100644 (file)
--- 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 7bf4092ae37aa2a984e034534f9b59025bf38889..ec12ce847fcc94b30d4093c62607e0b8eb6e9b87 100644 (file)
--- 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 936553e298bfe2d1b668e5626fcffe22f88a008a..4e3e97901817f46f8b8461e75831bdb05705dc14 100644 (file)
--- 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 a1896c0123e2b1f07456f1f8e36fd419b7c15d98..085259cb14a3565f324872e9c6d581b8c320e18d 100644 (file)
--- 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
+
index ae14212956ff6837cfc9f9ce6b78b1e35e164791..9476312b9a32feda9221ff0bec01e9b7116ee840 100644 (file)
@@ -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
+
index 22976a7360a2a6b9f4912d348e9cd2f98344b493..fdf12267fd054de5e2c3f23f86d2b38a2aa41ba1 100644 (file)
@@ -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,
+
index d9acfe700bbe91244979aa5fd5fa57e21733872c..3a0dfff2e726bd9ac13051c54f6f46a1fa9a9576 100644 (file)
--- 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 <GL/gl.h>
-//#include <GL/glu.h>
 
 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 85adc1d5007d2f4b7828f2f8a6f28a58a512673a..214d4dd162795d62a1a507ca0ca9c2b851a36dd8 100644 (file)
--- 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 a44a5eec615afe0ac3ea112922f5d4d82c78c6ef..9bff65e8c92558e435ed16906ef56bc0fb57acf6 100644 (file)
--- 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 d49d5e371aca212f216a1c8df150e1140bcc6717..7e9b9dd5327c9d849e667c7644b680d719014e46 100644 (file)
--- 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
+
index b834db8862fbd6e835a39db510ce74118dda4a6c..786d59fd8b852026b1c53726d66b78143e092f3a 100644 (file)
--- 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
 
index 28e4d05164986cef40e93299839198513be8a3e0..3014453997411dcde20ce9c14e02f3e4498fdf26 100644 (file)
--- 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 4e3d334625abbd65d205c688093162641fad5172..44081dd9b8af37dd5475a7c1cd31fccd26529d4f 100644 (file)
--- 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
 
index 664c7e30375004ca89a6373c5ab8a2ece8baf727..e45abc344b2c58f0332696f770af9a9cd3f74cfd 100644 (file)
@@ -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
+
index 40ea1a64bbffd69de9199805b9323205f73e00c3..554a5980aff16cb4a7619f03058f117f1b2a2506 100644 (file)
@@ -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
+
index d55844e37433a94fc15b38a7b4b801d6b3f24b9f..480e1f644f6c9ac3150f177c94f869020002e718 100644 (file)
@@ -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__
+
index 394fb830c3c52c48d83542cfb488cc6a208f6776..3304f2ebce7e4f56edda51310761880430419948 100644 (file)
@@ -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
+
index ff3f4b3df181a821e03d29417f29e7fcae013dcf..60f48d469e93730ab4333dead30b92ffbe2532bd 100644 (file)
@@ -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
+
index 3b5fd543878a39f9550a6bde505dfb3d885e0bed..7439c2818f467784983c17964d7891474f98d725 100644 (file)
@@ -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 9684aa68dbcb579e75d91896066cec017822d5a3..126dbe03834dcf251f6f1b6a96dc6438246fa203 100644 (file)
--- 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
+
index da052e70116394defe2886df57e4704721e6305a..af4013928ceb81227007445c933ef3daca3d72d7 100644 (file)
@@ -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
+
index 90cdb2c50df2f8ffd1b041a37a938396dec80ec2..4f248f494c39cffdd32792659f945a479d7ec916 100644 (file)
@@ -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
+
index 87ab879d9976d0703074bd458c68c0dd15485520..bc58657da1e6b60a080f2fe7304c7d02b0852df7 100644 (file)
--- 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
+
index d907248515e828fa60d5205cc8c85223702cf675..c04a5c7cee41fa4f457480b6ad767743fb0cb151 100644 (file)
@@ -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
+
index 109120ea3d88befd443253a70cbc34c254afa264..c5983530d15427f644c9c9cb2bc83f81847a710d 100644 (file)
@@ -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
+
index f6e862e05c5c7d4049113fa39511b17c050b6342..8013e9892f8026fff4ee4a29db39dcbfdf2f0454 100644 (file)
--- 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
+
index 80f88a11ae5b2de3708b5a908d7d3f1a339f8abb..02e7642c30fddb1762e8064b5f0e4f2e03052490 100644 (file)
--- 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
+
index 614881ac3d10b052e4bfb1a42b00a0cba36fd91b..879999970d1fceb5004919cbed28a4276ebc0caf 100644 (file)
--- 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
+
index 838a0036511664769746fbf7fe71f1f723aa3d40..fd306cf2154a0fc1bcbb1a0c2f1963374369be22 100644 (file)
@@ -1,3 +1,6 @@
+
+// This code isn't #ifdef/#define protectable, don't try.
+
                while (1)
                {
                        st++;
                                PR_RunError ("Bad opcode %i", st->op);
                        }
                }
+
index 633e6d4c88ecfac603edf7aa59508f15fa46888e..14e2e919cbc1abff7818b0a07fcc1ce9abf4079a 100644 (file)
@@ -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 166d2eabf3c68a86654ec5f1058d952200402851..f8e15136bdcbe9d0978723a735da799db975ab1a 100644 (file)
--- 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
 
index 0f70aabfdfb68dfd9f5f2556d75ea027b92f3293..c90867b343dfc2877f7a15f09904d93c63ae9f02 100644 (file)
@@ -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
+
index dbaf99cc4a82c37d1513a31ca2a1d54bb0612ad9..8209817ab8916757645110185dbbbb76b731edfc 100644 (file)
@@ -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 <math.h>
@@ -297,3 +300,6 @@ void fractalnoisequick(unsigned char *noise, int size, int startgrid);
 #include "image.h"
 
 void Sys_Shared_Init(void);
+
+#endif
+
index 6c3c02fa254b28539069cd82c9af194608d8e122..d94570341216d6e2c025ebeeff76aaae1072a72d 100644 (file)
--- 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
+
index a90101cfa3a54375310e1e1abac9fbb4c9e93202..2a24e0c2c41ec289bcb3634b2b56601778187c7d 100644 (file)
@@ -1,2 +1,8 @@
 
+#ifndef R_LERPANIM_H
+#define R_LERPANIM_H
+
 void R_LerpAnimation(entity_render_t *r);
+
+#endif
+
index c3899f45b58ffef16e60b57b1e6f2c35120ebe79..cdbde025da835a2f1135960eaab9b3232eef8033 100644 (file)
--- 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
+
index 93c8d3f45a64f0e0aea27b14a41a8526c0b9c368..6ff74efc9e5b4005539498875164ac5e6b6f3b31 100644 (file)
@@ -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
+
index 5d810b930b954c027eed3b005b5b4383ccdf49f4..3abbe5839a951e47cb7b6de7cd00056ae394a011 100644 (file)
@@ -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
+
index 76777d16c6a1a7acba822cc0c4503c6c2795f97f..ef2e59c0282906630601e910e5e52848542124b4 100644 (file)
--- 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 82305a38fbf1c1bddac1630af623a6ca85f21bf9..9e1deae46a616213acd777cca6f4c30bfd50868d 100644 (file)
--- 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 4a9a60e2e93bf4f05bda7255f442d27c6f3aa3eb..8be484c29ca58f1d59f11c9c5494531295ec20f0 100644 (file)
--- 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);
index 252b120c0519b8f66e8eb56df416c0de7e0b0a68..86b9e10bfc2cc59d43a19455d1e932da3e0ac355 100644 (file)
--- 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
+
index 5a330ffefdd8b190f4e18b33cb4a2f2b03762fbb..88813efca45472849ee3b3dcc269fe70ca14fca1 100644 (file)
--- 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 8f34de9a542218f2ebfa0472b2c11f9c2043fb6b..a37b2e8d0958dc7007624be0d94e9b343971ba37 100644 (file)
--- a/sound.h
+++ b/sound.h
@@ -178,3 +178,4 @@ void S_AmbientOff (void);
 void S_AmbientOn (void);
 
 #endif
+
index 79c18d0ead72084718336478676eb099c803112e..027e64e25160bbaae72d7d369776699bdcb4e3f9 100644 (file)
@@ -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 4b5372ea931c47a803dade47f74953f5ed497dd4..e8de6bb1aa9615220f7a8c3859db845e32f29fd8 100644 (file)
--- 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
+
index 2cfe37ba27160f9ae194ff8f3668893310ecdb10..a5e7a091a05da2975b40cdd41c2e5ac7f05eea0f 100644 (file)
@@ -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 71b4ec91406510ac618494e39a4be07aefc05b2f..91f9de8ff4a959f985f8991d3e52bae5d50e918c 100644 (file)
--- 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 2df5d6fc0fc6c99b862e64384f5a77351164f24a..5b078578ecd8e1278b12ee99ac0a994ea57052a9 100644 (file)
--- 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 ac8199bf530bda1e371d300dc9a127ef78eacd0b..cbcdcd6fb958cbad598f477c06e4f62fbbaed24e 100644 (file)
--- 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
+
index 0584ccfb3522ffefffb54028dac1016f96ff214b..72e0652ff7a256d4de81e6ebe61008d5bafdcd76 100644 (file)
@@ -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 <windows.h>
 
 #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 624b94314a18c7b24cd431f3cd2a041b248b0a08..81c662ce93565df6fa49f842c930826255e66add 100644 (file)
--- 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 7a0691811eb72e0a3b9572f6038063ad6405d0a3..d50265fbdc263feda5777f82e122d54db901e843 100644 (file)
--- 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
+