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
26 #include <sys/types.h>
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 #define MAX_PACKETFRAGMENT 1024 // max length of packet fragment
49 #define NET_MAXMESSAGE 65536
50 #define NET_MINRATE 1000 // limits "rate" and "sv_maxrate" cvars
51 #define NET_MAXRATE 25000 // limits "rate" and "sv_maxrate" cvars
56 // LordHavoc: increased entity limit to 2048 from 600
57 #define MAX_EDICTS 32768 // FIXME: ouch! ouch! ouch!
58 #define MAX_LIGHTSTYLES 64
59 // LordHavoc: increased model and sound limits from 256 and 256 to 4096 and 4096 (and added protocol extensions accordingly to break the 256 barrier)
60 #define MAX_MODELS 4096
61 #define MAX_SOUNDS 4096
63 #define SAVEGAME_COMMENT_LENGTH 39
65 #define MAX_STYLESTRING 64
68 // stats are integers communicated to the client by the server
70 #define MAX_CL_STATS 32
76 #define STAT_WEAPONFRAME 5
79 #define STAT_ROCKETS 8
81 #define STAT_ACTIVEWEAPON 10
82 #define STAT_TOTALSECRETS 11
83 #define STAT_TOTALMONSTERS 12
84 #define STAT_SECRETS 13 // bumped on client side by svc_foundsecret
85 #define STAT_MONSTERS 14 // bumped by svc_killedmonster
90 #define IT_SUPER_SHOTGUN 2
92 #define IT_SUPER_NAILGUN 8
93 #define IT_GRENADE_LAUNCHER 16
94 #define IT_ROCKET_LAUNCHER 32
95 #define IT_LIGHTNING 64
96 #define IT_SUPER_LIGHTNING 128
99 #define IT_ROCKETS 1024
100 #define IT_CELLS 2048
102 #define IT_ARMOR1 8192
103 #define IT_ARMOR2 16384
104 #define IT_ARMOR3 32768
105 #define IT_SUPERHEALTH 65536
106 #define IT_KEY1 131072
107 #define IT_KEY2 262144
108 #define IT_INVISIBILITY 524288
109 #define IT_INVULNERABILITY 1048576
110 #define IT_SUIT 2097152
111 #define IT_QUAD 4194304
112 #define IT_SIGIL1 (1<<28)
113 #define IT_SIGIL2 (1<<29)
114 #define IT_SIGIL3 (1<<30)
115 #define IT_SIGIL4 (1<<31)
117 //===========================================
118 // AK nexuiz changed and added defines
121 #define NEX_IT_SHOTGUN 2
122 #define NEX_IT_GRENADE_LAUNCHER 4
123 #define NEX_IT_ELECTRO 8
124 #define NEX_IT_CRYLINK 16
125 #define NEX_IT_NEX 32
126 #define NEX_IT_HAGAR 64
127 #define NEX_IT_ROCKET_LAUNCHER 128
128 #define NEX_IT_SHELLS 256
129 #define NEX_IT_BULLETS 512
130 #define NEX_IT_ROCKETS 1024
131 #define NEX_IT_CELLS 2048
132 #define NEX_IT_LASER 4094
133 #define NEX_IT_STRENGTH 8192
134 #define NEX_IT_INVINCIBLE 16384
135 #define NEX_IT_SPEED 32768
136 #define NEX_IT_SLOWMO 65536
138 //===========================================
139 //rogue changed and added defines
141 #define RIT_SHELLS 128
142 #define RIT_NAILS 256
143 #define RIT_ROCKETS 512
144 #define RIT_CELLS 1024
146 #define RIT_LAVA_NAILGUN 4096
147 #define RIT_LAVA_SUPER_NAILGUN 8192
148 #define RIT_MULTI_GRENADE 16384
149 #define RIT_MULTI_ROCKET 32768
150 #define RIT_PLASMA_GUN 65536
151 #define RIT_ARMOR1 8388608
152 #define RIT_ARMOR2 16777216
153 #define RIT_ARMOR3 33554432
154 #define RIT_LAVA_NAILS 67108864
155 #define RIT_PLASMA_AMMO 134217728
156 #define RIT_MULTI_ROCKETS 268435456
157 #define RIT_SHIELD 536870912
158 #define RIT_ANTIGRAV 1073741824
159 #define RIT_SUPERHEALTH 2147483648
161 //MED 01/04/97 added hipnotic defines
162 //===========================================
163 //hipnotic added defines
164 #define HIT_PROXIMITY_GUN_BIT 16
165 #define HIT_MJOLNIR_BIT 7
166 #define HIT_LASER_CANNON_BIT 23
167 #define HIT_PROXIMITY_GUN (1<<HIT_PROXIMITY_GUN_BIT)
168 #define HIT_MJOLNIR (1<<HIT_MJOLNIR_BIT)
169 #define HIT_LASER_CANNON (1<<HIT_LASER_CANNON_BIT)
170 #define HIT_WETSUIT (1<<(23+2))
171 #define HIT_EMPATHY_SHIELDS (1<<(23+3))
173 //===========================================
175 // LordHavoc: increased player limit from 16 to 64
176 #define MAX_SCOREBOARD 64
177 // LordHavoc: increased name limit from 32 to 64 characters
178 #define MAX_SCOREBOARDNAME 64
189 #include "r_textures.h"
194 #include "protocol.h"
198 #include "model_shared.h"
215 extern qboolean noclip_anglehack;
217 extern cvar_t developer;
219 // true if into command execution
220 extern qboolean host_initialized;
221 extern double host_frametime;
222 // the real frametime, before slowmo and clamping are applied (used for console scrolling)
223 extern double host_realframetime;
224 // incremented every frame, never reset
225 extern int host_framecount;
226 // not bounded in any way, changed at start of every frame, never reset
227 extern double realtime;
229 void Host_ClearMemory(void);
230 void Host_InitCommands(void);
231 void Host_Init(void);
232 void Host_Shutdown(void);
233 void Host_Error(const char *error, ...);
234 void Host_Frame(float time);
235 void Host_Quit_f(void);
236 void Host_ClientCommands(const char *fmt, ...);
237 void Host_ShutdownServer(qboolean crash);
238 void Host_Reconnect_f(void);
240 // 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)
241 extern int current_skill;
246 extern cvar_t chase_active;
248 void Chase_Init (void);
249 void Chase_Reset (void);
250 void Chase_Update (void);
252 void fractalnoise(unsigned char *noise, int size, int startgrid);
253 void fractalnoisequick(unsigned char *noise, int size, int startgrid);
255 void Sys_Shared_Init(void);