2 Copyright (C) 1996-1997 Id Software, Inc.
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 // quakedef.h -- primary header for client
25 #define QUAKE_GAME // as opposed to utilities
34 extern char *buildstring;
36 typedef unsigned char qbyte;
41 typedef enum {false, true} qboolean;
44 #define NULL ((void *)0)
52 //define PARANOID // speed sapping error checking
54 #define ASSERT(condition) if (!(condition)) Sys_Error("assertion (##condition) failed at " __FILE__ ":" __LINE__ "\n");
56 #define ASSERT(condition)
59 #define GAMENAME "id1"
61 #define MAX_NUM_ARGVS 50
73 #define MAX_QPATH 128 // max length of a quake game pathname
74 #define MAX_OSPATH 1024 // max length of a filesystem pathname
76 #define ON_EPSILON 0.1 // point on plane side epsilon
78 // LordHavoc: these were 8000 and 1024 respectively, now 64000 and 8000
79 #define MAX_MSGLEN 64000 // max length of a reliable message
80 #define MAX_DATAGRAM 8000 // max length of unreliable message
85 // LordHavoc: increased entity limit to 2048 from 600
86 #define MAX_EDICTS 2048 // FIXME: ouch! ouch! ouch!
87 #define MAX_LIGHTSTYLES 64
88 // LordHavoc: increased model and sound limits from 256 and 256 to 1024 and 1024 (and added protocol extensions accordingly)
89 #define MAX_MODELS 1024 // these are sent over the net as bytes
90 #define MAX_SOUNDS 1024 // so they cannot be blindly increased
92 #define SAVEGAME_COMMENT_LENGTH 39
94 #define MAX_STYLESTRING 64
97 // stats are integers communicated to the client by the server
99 #define MAX_CL_STATS 32
100 #define STAT_HEALTH 0
102 #define STAT_WEAPON 2
105 #define STAT_WEAPONFRAME 5
106 #define STAT_SHELLS 6
108 #define STAT_ROCKETS 8
110 #define STAT_ACTIVEWEAPON 10
111 #define STAT_TOTALSECRETS 11
112 #define STAT_TOTALMONSTERS 12
113 #define STAT_SECRETS 13 // bumped on client side by svc_foundsecret
114 #define STAT_MONSTERS 14 // bumped by svc_killedmonster
119 #define IT_SUPER_SHOTGUN 2
121 #define IT_SUPER_NAILGUN 8
122 #define IT_GRENADE_LAUNCHER 16
123 #define IT_ROCKET_LAUNCHER 32
124 #define IT_LIGHTNING 64
125 #define IT_SUPER_LIGHTNING 128
126 #define IT_SHELLS 256
128 #define IT_ROCKETS 1024
129 #define IT_CELLS 2048
131 #define IT_ARMOR1 8192
132 #define IT_ARMOR2 16384
133 #define IT_ARMOR3 32768
134 #define IT_SUPERHEALTH 65536
135 #define IT_KEY1 131072
136 #define IT_KEY2 262144
137 #define IT_INVISIBILITY 524288
138 #define IT_INVULNERABILITY 1048576
139 #define IT_SUIT 2097152
140 #define IT_QUAD 4194304
141 #define IT_SIGIL1 (1<<28)
142 #define IT_SIGIL2 (1<<29)
143 #define IT_SIGIL3 (1<<30)
144 #define IT_SIGIL4 (1<<31)
146 //===========================================
147 //rogue changed and added defines
149 #define RIT_SHELLS 128
150 #define RIT_NAILS 256
151 #define RIT_ROCKETS 512
152 #define RIT_CELLS 1024
154 #define RIT_LAVA_NAILGUN 4096
155 #define RIT_LAVA_SUPER_NAILGUN 8192
156 #define RIT_MULTI_GRENADE 16384
157 #define RIT_MULTI_ROCKET 32768
158 #define RIT_PLASMA_GUN 65536
159 #define RIT_ARMOR1 8388608
160 #define RIT_ARMOR2 16777216
161 #define RIT_ARMOR3 33554432
162 #define RIT_LAVA_NAILS 67108864
163 #define RIT_PLASMA_AMMO 134217728
164 #define RIT_MULTI_ROCKETS 268435456
165 #define RIT_SHIELD 536870912
166 #define RIT_ANTIGRAV 1073741824
167 #define RIT_SUPERHEALTH 2147483648
169 //MED 01/04/97 added hipnotic defines
170 //===========================================
171 //hipnotic added defines
172 #define HIT_PROXIMITY_GUN_BIT 16
173 #define HIT_MJOLNIR_BIT 7
174 #define HIT_LASER_CANNON_BIT 23
175 #define HIT_PROXIMITY_GUN (1<<HIT_PROXIMITY_GUN_BIT)
176 #define HIT_MJOLNIR (1<<HIT_MJOLNIR_BIT)
177 #define HIT_LASER_CANNON (1<<HIT_LASER_CANNON_BIT)
178 #define HIT_WETSUIT (1<<(23+2))
179 #define HIT_EMPATHY_SHIELDS (1<<(23+3))
181 //===========================================
183 // LordHavoc: increased player limit from 16 to 64
184 #define MAX_SCOREBOARD 64
185 #define MAX_SCOREBOARDNAME 32
187 #define SOUND_CHANNELS 8
198 #include "r_textures.h"
204 #include "protocol.h"
208 #include "model_shared.h"
228 //=============================================================================
230 // the host system specifies the base of the directory tree, the
231 // command line parms passed to the program, and the amount of memory
232 // available for the program to use
238 char *cachedir; // for development over ISDN lines
245 //=============================================================================
249 extern qboolean noclip_anglehack;
255 extern quakeparms_t host_parms;
257 extern cvar_t sys_ticrate;
258 extern cvar_t developer;
260 extern qboolean host_initialized; // true if into command execution
261 extern double host_frametime;
262 extern double host_realframetime; // LordHavoc: the real frametime, before slowmo and clamping are applied (used for console scrolling)
263 extern int host_framecount; // incremented every frame, never reset
264 extern double realtime; // not bounded in any way, changed at
265 // start of every frame, never reset
267 void Host_ClearMemory (void);
268 void Host_ServerFrame (void);
269 void Host_InitCommands (void);
270 void Host_Init (void);
271 void Host_Shutdown(void);
272 void Host_Error (char *error, ...);
273 void Host_EndGame (char *message, ...);
274 void Host_Frame (float time);
275 void Host_Quit_f (void);
276 void Host_ClientCommands (char *fmt, ...);
277 void Host_ShutdownServer (qboolean crash);
279 extern qboolean msg_suppress_1; // suppresses resolution and cache size console output
280 // an fullscreen DIB focus gain/loss
281 extern int current_skill; // skill level for currently loaded level (in case
282 // the user changes the cvar while the level is
283 // running, this reflects the level actually in use)
285 extern int minimum_memory;
290 extern cvar_t chase_active;
292 void Chase_Init (void);
293 void Chase_Reset (void);
294 void Chase_Update (void);
296 void fractalnoise(unsigned char *noise, int size, int startgrid);
297 void fractalnoisequick(unsigned char *noise, int size, int startgrid);
302 void Sys_Shared_Init(void);