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
22 #define QUAKE_GAME // as opposed to utilities
31 //define PARANOID // speed sapping error checking
33 #define ASSERT(condition) if (!(condition)) Sys_Error("assertion (##condition) failed at " __FILE__ ":" __LINE__ "\n");
35 #define ASSERT(condition)
38 #define GAMENAME "id1"
47 #define UNUSED(x) (x = x) // for pesky compiler / lint warnings
49 #define MINIMUM_MEMORY 0x550000
50 #define MINIMUM_MEMORY_LEVELPAK (MINIMUM_MEMORY + 0x100000)
52 #define MAX_NUM_ARGVS 50
64 #define MAX_QPATH 64 // max length of a quake game pathname
65 #define MAX_OSPATH 128 // max length of a filesystem pathname
67 #define ON_EPSILON 0.1 // point on plane side epsilon
69 // LordHavoc: these were 8000 and 1024 respectively, now 64000 and 8000
70 #define MAX_MSGLEN 64000 // max length of a reliable message
71 #define MAX_DATAGRAM 8000 // max length of unreliable message
76 // LordHavoc: increased entity limit to 2048 from 600
77 #define MAX_EDICTS 2048 // FIXME: ouch! ouch! ouch!
78 #define MAX_LIGHTSTYLES 64
79 #define MAX_MODELS 256 // these are sent over the net as bytes
80 #define MAX_SOUNDS 256 // so they cannot be blindly increased
82 #define SAVEGAME_COMMENT_LENGTH 39
84 #define MAX_STYLESTRING 64
87 // stats are integers communicated to the client by the server
89 #define MAX_CL_STATS 32
95 #define STAT_WEAPONFRAME 5
98 #define STAT_ROCKETS 8
100 #define STAT_ACTIVEWEAPON 10
101 #define STAT_TOTALSECRETS 11
102 #define STAT_TOTALMONSTERS 12
103 #define STAT_SECRETS 13 // bumped on client side by svc_foundsecret
104 #define STAT_MONSTERS 14 // bumped by svc_killedmonster
109 #define IT_SUPER_SHOTGUN 2
111 #define IT_SUPER_NAILGUN 8
112 #define IT_GRENADE_LAUNCHER 16
113 #define IT_ROCKET_LAUNCHER 32
114 #define IT_LIGHTNING 64
115 #define IT_SUPER_LIGHTNING 128
116 #define IT_SHELLS 256
118 #define IT_ROCKETS 1024
119 #define IT_CELLS 2048
121 #define IT_ARMOR1 8192
122 #define IT_ARMOR2 16384
123 #define IT_ARMOR3 32768
124 #define IT_SUPERHEALTH 65536
125 #define IT_KEY1 131072
126 #define IT_KEY2 262144
127 #define IT_INVISIBILITY 524288
128 #define IT_INVULNERABILITY 1048576
129 #define IT_SUIT 2097152
130 #define IT_QUAD 4194304
131 #define IT_SIGIL1 (1<<28)
132 #define IT_SIGIL2 (1<<29)
133 #define IT_SIGIL3 (1<<30)
134 #define IT_SIGIL4 (1<<31)
136 //===========================================
137 //rogue changed and added defines
139 #define RIT_SHELLS 128
140 #define RIT_NAILS 256
141 #define RIT_ROCKETS 512
142 #define RIT_CELLS 1024
144 #define RIT_LAVA_NAILGUN 4096
145 #define RIT_LAVA_SUPER_NAILGUN 8192
146 #define RIT_MULTI_GRENADE 16384
147 #define RIT_MULTI_ROCKET 32768
148 #define RIT_PLASMA_GUN 65536
149 #define RIT_ARMOR1 8388608
150 #define RIT_ARMOR2 16777216
151 #define RIT_ARMOR3 33554432
152 #define RIT_LAVA_NAILS 67108864
153 #define RIT_PLASMA_AMMO 134217728
154 #define RIT_MULTI_ROCKETS 268435456
155 #define RIT_SHIELD 536870912
156 #define RIT_ANTIGRAV 1073741824
157 #define RIT_SUPERHEALTH 2147483648
159 //MED 01/04/97 added hipnotic defines
160 //===========================================
161 //hipnotic added defines
162 #define HIT_PROXIMITY_GUN_BIT 16
163 #define HIT_MJOLNIR_BIT 7
164 #define HIT_LASER_CANNON_BIT 23
165 #define HIT_PROXIMITY_GUN (1<<HIT_PROXIMITY_GUN_BIT)
166 #define HIT_MJOLNIR (1<<HIT_MJOLNIR_BIT)
167 #define HIT_LASER_CANNON (1<<HIT_LASER_CANNON_BIT)
168 #define HIT_WETSUIT (1<<(23+2))
169 #define HIT_EMPATHY_SHIELDS (1<<(23+3))
171 //===========================================
173 // LordHavoc: increased player limit from 16 to 64
174 #define MAX_SCOREBOARD 64
175 #define MAX_SCOREBOARDNAME 32
177 #define SOUND_CHANNELS 8
186 // LordHavoc: made this more compact, and added some more fields
209 #include "protocol.h"
218 #include "model_shared.h"
231 //=============================================================================
233 // the host system specifies the base of the directory tree, the
234 // command line parms passed to the program, and the amount of memory
235 // available for the program to use
240 char *cachedir; // for development over ISDN lines
248 //=============================================================================
252 extern qboolean noclip_anglehack;
258 extern quakeparms_t host_parms;
260 extern cvar_t sys_ticrate;
261 extern cvar_t sys_nostdout;
262 extern cvar_t developer;
264 extern qboolean host_initialized; // true if into command execution
265 extern double host_frametime;
266 extern int host_framecount; // incremented every frame, never reset
267 extern double realtime; // not bounded in any way, changed at
268 // start of every frame, never reset
270 extern double sv_frametime;
272 void Host_ClearMemory (void);
273 void Host_ServerFrame (void);
274 void Host_InitCommands (void);
276 void Host_Shutdown(void);
277 void Host_Error (char *error, ...);
278 void Host_EndGame (char *message, ...);
279 void Host_Frame (float time);
280 void Host_Quit_f (void);
281 void Host_ClientCommands (char *fmt, ...);
282 void Host_ShutdownServer (qboolean crash);
284 extern qboolean msg_suppress_1; // suppresses resolution and cache size console output
285 // an fullscreen DIB focus gain/loss
286 extern int current_skill; // skill level for currently loaded level (in case
287 // the user changes the cvar while the level is
288 // running, this reflects the level actually in use)
290 extern qboolean isDedicated;
292 extern int minimum_memory;
297 extern cvar_t chase_active;
299 void Chase_Init (void);
300 void Chase_Reset (void);
301 void Chase_Update (void);
303 void fractalnoise(unsigned char *noise, int size, int startgrid);