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 #define DP_FUNC_PRINTF(n) __attribute__ ((format (printf, n, n+1)))
28 #define DP_FUNC_PRINTF(n)
31 #include <sys/types.h>
42 extern char *buildstring;
43 extern char engineversion[128];
45 #define GAMENAME "id1"
47 #define MAX_NUM_ARGVS 50
50 #define MAX_QPATH 128 // max length of a quake game pathname
51 #define MAX_OSPATH 1024 // max length of a filesystem pathname
53 #define ON_EPSILON 0.1 // point on plane side epsilon
55 #define MAX_PACKETFRAGMENT 1024 // max length of packet fragment
56 #define NET_MAXMESSAGE 65536
57 #define NET_MINRATE 1000 // limits "rate" and "sv_maxrate" cvars
62 // LordHavoc: increased entity limit to 2048 from 600
63 #define MAX_EDICTS 32768 // FIXME: ouch! ouch! ouch!
64 #define MAX_LIGHTSTYLES 256 // LordHavoc: increased from 64, NOTE special consideration is needed in savegames!
65 // LordHavoc: increased model and sound limits from 256 and 256 to 4096 and 4096 (and added protocol extensions accordingly to break the 256 barrier)
66 #define MAX_MODELS 4096
67 #define MAX_SOUNDS 4096
69 #define SAVEGAME_COMMENT_LENGTH 39
71 #define MAX_STYLESTRING 64
74 // stats are integers communicated to the client by the server
76 #define MAX_CL_STATS 256
82 #define STAT_WEAPONFRAME 5
85 #define STAT_ROCKETS 8
87 #define STAT_ACTIVEWEAPON 10
88 #define STAT_TOTALSECRETS 11
89 #define STAT_TOTALMONSTERS 12
90 #define STAT_SECRETS 13 // bumped on client side by svc_foundsecret
91 #define STAT_MONSTERS 14 // bumped by svc_killedmonster
92 #define STAT_ITEMS 15 // FTE, DP
93 #define STAT_VIEWHEIGHT 16 // FTE, DP
94 //#define STAT_TIME 17 // FTE
95 //#define STAT_VIEW2 20 // FTE
96 #define STAT_VIEWZOOM 21 // DP
101 #define IT_SUPER_SHOTGUN 2
103 #define IT_SUPER_NAILGUN 8
104 #define IT_GRENADE_LAUNCHER 16
105 #define IT_ROCKET_LAUNCHER 32
106 #define IT_LIGHTNING 64
107 #define IT_SUPER_LIGHTNING 128
108 #define IT_SHELLS 256
110 #define IT_ROCKETS 1024
111 #define IT_CELLS 2048
113 #define IT_ARMOR1 8192
114 #define IT_ARMOR2 16384
115 #define IT_ARMOR3 32768
116 #define IT_SUPERHEALTH 65536
117 #define IT_KEY1 131072
118 #define IT_KEY2 262144
119 #define IT_INVISIBILITY 524288
120 #define IT_INVULNERABILITY 1048576
121 #define IT_SUIT 2097152
122 #define IT_QUAD 4194304
123 #define IT_SIGIL1 (1<<28)
124 #define IT_SIGIL2 (1<<29)
125 #define IT_SIGIL3 (1<<30)
126 #define IT_SIGIL4 (1<<31)
128 //===========================================
129 // AK nexuiz changed and added defines
132 #define NEX_IT_SHOTGUN 2
133 #define NEX_IT_GRENADE_LAUNCHER 4
134 #define NEX_IT_ELECTRO 8
135 #define NEX_IT_CRYLINK 16
136 #define NEX_IT_NEX 32
137 #define NEX_IT_HAGAR 64
138 #define NEX_IT_ROCKET_LAUNCHER 128
139 #define NEX_IT_SHELLS 256
140 #define NEX_IT_BULLETS 512
141 #define NEX_IT_ROCKETS 1024
142 #define NEX_IT_CELLS 2048
143 #define NEX_IT_LASER 4094
144 #define NEX_IT_STRENGTH 8192
145 #define NEX_IT_INVINCIBLE 16384
146 #define NEX_IT_SPEED 32768
147 #define NEX_IT_SLOWMO 65536
149 //===========================================
150 //rogue changed and added defines
152 #define RIT_SHELLS 128
153 #define RIT_NAILS 256
154 #define RIT_ROCKETS 512
155 #define RIT_CELLS 1024
157 #define RIT_LAVA_NAILGUN 4096
158 #define RIT_LAVA_SUPER_NAILGUN 8192
159 #define RIT_MULTI_GRENADE 16384
160 #define RIT_MULTI_ROCKET 32768
161 #define RIT_PLASMA_GUN 65536
162 #define RIT_ARMOR1 8388608
163 #define RIT_ARMOR2 16777216
164 #define RIT_ARMOR3 33554432
165 #define RIT_LAVA_NAILS 67108864
166 #define RIT_PLASMA_AMMO 134217728
167 #define RIT_MULTI_ROCKETS 268435456
168 #define RIT_SHIELD 536870912
169 #define RIT_ANTIGRAV 1073741824
170 #define RIT_SUPERHEALTH 2147483648
172 //MED 01/04/97 added hipnotic defines
173 //===========================================
174 //hipnotic added defines
175 #define HIT_PROXIMITY_GUN_BIT 16
176 #define HIT_MJOLNIR_BIT 7
177 #define HIT_LASER_CANNON_BIT 23
178 #define HIT_PROXIMITY_GUN (1<<HIT_PROXIMITY_GUN_BIT)
179 #define HIT_MJOLNIR (1<<HIT_MJOLNIR_BIT)
180 #define HIT_LASER_CANNON (1<<HIT_LASER_CANNON_BIT)
181 #define HIT_WETSUIT (1<<(23+2))
182 #define HIT_EMPATHY_SHIELDS (1<<(23+3))
184 //===========================================
186 // LordHavoc: increased player limit from 16 to 255
187 #define MAX_SCOREBOARD 255
188 // LordHavoc: increased name limit from 32 to 64 characters
189 #define MAX_SCOREBOARDNAME 64
190 // infostring sizes used by QuakeWorld support
192 #define MAX_USERINFO_STRING 1280
194 #define MAX_SERVERINFO_STRING 1280
195 #define MAX_LOCALINFO_STRING 32768
206 #include "r_textures.h"
211 #include "protocol.h"
215 #include "model_shared.h"
232 extern qboolean noclip_anglehack;
234 extern char engineversion[128];
235 extern cvar_t developer;
237 // incremented every frame, never reset
238 extern int host_framecount;
239 // not bounded in any way, changed at start of every frame, never reset
240 extern double realtime;
242 void Host_InitCommands(void);
243 void Host_Main(void);
244 void Host_Shutdown(void);
245 void Host_StartVideo(void);
246 void Host_Error(const char *error, ...) DP_FUNC_PRINTF(1);
247 void Host_Quit_f(void);
248 void Host_ClientCommands(const char *fmt, ...) DP_FUNC_PRINTF(1);
249 void Host_ShutdownServer(void);
250 void Host_Reconnect_f(void);
252 void Host_AbortCurrentFrame(void);
254 // 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)
255 extern int current_skill;
260 extern cvar_t chase_active;
261 extern cvar_t cl_viewmodel_scale;
263 void Chase_Init (void);
264 void Chase_Reset (void);
265 void Chase_Update (void);
267 void fractalnoise(unsigned char *noise, int size, int startgrid);
268 void fractalnoisequick(unsigned char *noise, int size, int startgrid);
270 void Sys_Shared_Init(void);