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
36 extern char *buildstring;
38 #define GAMENAME "id1"
40 #define MAX_NUM_ARGVS 50
43 #define MAX_QPATH 128 // max length of a quake game pathname
44 #define MAX_OSPATH 1024 // max length of a filesystem pathname
46 #define ON_EPSILON 0.1 // point on plane side epsilon
48 // LordHavoc: this was 1024, now 65536
49 #define MAX_DATAGRAM 65536 // max length of message
54 // LordHavoc: increased entity limit to 2048 from 600
55 #define MAX_EDICTS 32768 // FIXME: ouch! ouch! ouch!
56 #define MAX_LIGHTSTYLES 64
57 // LordHavoc: increased model and sound limits from 256 and 256 to 4096 and 4096 (and added protocol extensions accordingly to break the 256 barrier)
58 #define MAX_MODELS 4096
59 #define MAX_SOUNDS 4096
61 #define SAVEGAME_COMMENT_LENGTH 39
63 #define MAX_STYLESTRING 64
66 // stats are integers communicated to the client by the server
68 #define MAX_CL_STATS 32
74 #define STAT_WEAPONFRAME 5
77 #define STAT_ROCKETS 8
79 #define STAT_ACTIVEWEAPON 10
80 #define STAT_TOTALSECRETS 11
81 #define STAT_TOTALMONSTERS 12
82 #define STAT_SECRETS 13 // bumped on client side by svc_foundsecret
83 #define STAT_MONSTERS 14 // bumped by svc_killedmonster
88 #define IT_SUPER_SHOTGUN 2
90 #define IT_SUPER_NAILGUN 8
91 #define IT_GRENADE_LAUNCHER 16
92 #define IT_ROCKET_LAUNCHER 32
93 #define IT_LIGHTNING 64
94 #define IT_SUPER_LIGHTNING 128
97 #define IT_ROCKETS 1024
100 #define IT_ARMOR1 8192
101 #define IT_ARMOR2 16384
102 #define IT_ARMOR3 32768
103 #define IT_SUPERHEALTH 65536
104 #define IT_KEY1 131072
105 #define IT_KEY2 262144
106 #define IT_INVISIBILITY 524288
107 #define IT_INVULNERABILITY 1048576
108 #define IT_SUIT 2097152
109 #define IT_QUAD 4194304
110 #define IT_SIGIL1 (1<<28)
111 #define IT_SIGIL2 (1<<29)
112 #define IT_SIGIL3 (1<<30)
113 #define IT_SIGIL4 (1<<31)
115 //===========================================
116 //rogue changed and added defines
118 #define RIT_SHELLS 128
119 #define RIT_NAILS 256
120 #define RIT_ROCKETS 512
121 #define RIT_CELLS 1024
123 #define RIT_LAVA_NAILGUN 4096
124 #define RIT_LAVA_SUPER_NAILGUN 8192
125 #define RIT_MULTI_GRENADE 16384
126 #define RIT_MULTI_ROCKET 32768
127 #define RIT_PLASMA_GUN 65536
128 #define RIT_ARMOR1 8388608
129 #define RIT_ARMOR2 16777216
130 #define RIT_ARMOR3 33554432
131 #define RIT_LAVA_NAILS 67108864
132 #define RIT_PLASMA_AMMO 134217728
133 #define RIT_MULTI_ROCKETS 268435456
134 #define RIT_SHIELD 536870912
135 #define RIT_ANTIGRAV 1073741824
136 #define RIT_SUPERHEALTH 2147483648
138 //MED 01/04/97 added hipnotic defines
139 //===========================================
140 //hipnotic added defines
141 #define HIT_PROXIMITY_GUN_BIT 16
142 #define HIT_MJOLNIR_BIT 7
143 #define HIT_LASER_CANNON_BIT 23
144 #define HIT_PROXIMITY_GUN (1<<HIT_PROXIMITY_GUN_BIT)
145 #define HIT_MJOLNIR (1<<HIT_MJOLNIR_BIT)
146 #define HIT_LASER_CANNON (1<<HIT_LASER_CANNON_BIT)
147 #define HIT_WETSUIT (1<<(23+2))
148 #define HIT_EMPATHY_SHIELDS (1<<(23+3))
150 //===========================================
152 // LordHavoc: increased player limit from 16 to 64
153 #define MAX_SCOREBOARD 64
154 #define MAX_SCOREBOARDNAME 32
156 #define SOUND_CHANNELS 8
167 #include "r_textures.h"
173 #include "protocol.h"
177 #include "model_shared.h"
195 extern qboolean noclip_anglehack;
200 extern cvar_t sys_ticrate;
201 extern cvar_t developer;
203 // true if into command execution
204 extern qboolean host_initialized;
205 extern double host_frametime;
206 // LordHavoc: the real frametime, before slowmo and clamping are applied (used for console scrolling)
207 extern double host_realframetime;
208 // incremented every frame, never reset
209 extern int host_framecount;
210 // not bounded in any way, changed at start of every frame, never reset
211 extern double realtime;
213 void Host_ClearMemory (void);
214 void Host_ServerFrame (void);
215 void Host_InitCommands (void);
216 void Host_Init (void);
217 void Host_Shutdown(void);
218 void Host_Error (const char *error, ...);
219 void Host_EndGame (const char *message, ...);
220 void Host_Frame (float time);
221 void Host_Quit_f (void);
222 void Host_ClientCommands (const char *fmt, ...);
223 void Host_ShutdownServer (qboolean crash);
225 // skill level for currently loaded level (in case the user changes the cvar while the level is running, this reflects the level actually in use)
226 extern int current_skill;
228 extern int minimum_memory;
233 extern cvar_t chase_active;
235 void Chase_Init (void);
236 void Chase_Reset (void);
237 void Chase_Update (void);
239 void fractalnoise(unsigned char *noise, int size, int startgrid);
240 void fractalnoisequick(unsigned char *noise, int size, int startgrid);
244 void Sys_Shared_Init(void);