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 #include "darkplaces.h"
27 #define GAMENAME "id1"
28 #define STARTCONFIGFILENAME "quake.rc"
29 #define CONFIGFILENAME "config.cfg"
32 #define MOVEFLAG_VALID 0x80000000
33 #define MOVEFLAG_Q2AIRACCELERATE 0x00000001
34 #define MOVEFLAG_NOGRAVITYONGROUND 0x00000002
35 #define MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE 0x00000004
39 #define IT_SUPER_SHOTGUN 2
41 #define IT_SUPER_NAILGUN 8
42 #define IT_GRENADE_LAUNCHER 16
43 #define IT_ROCKET_LAUNCHER 32
44 #define IT_LIGHTNING 64
45 #define IT_SUPER_LIGHTNING 128
48 #define IT_ROCKETS 1024
51 #define IT_ARMOR1 8192
52 #define IT_ARMOR2 16384
53 #define IT_ARMOR3 32768
54 #define IT_SUPERHEALTH 65536
55 #define IT_KEY1 131072
56 #define IT_KEY2 262144
57 #define IT_INVISIBILITY 524288
58 #define IT_INVULNERABILITY 1048576
59 #define IT_SUIT 2097152
60 #define IT_QUAD 4194304
61 #define IT_SIGIL1 (1u<<28)
62 #define IT_SIGIL2 (1u<<29)
63 #define IT_SIGIL3 (1u<<30)
64 #define IT_SIGIL4 (1u<<31)
65 // UBSan: unsigned literals because left shifting by 31 causes signed overflow, although it works as expected on x86.
67 //===========================================
68 // AK nexuiz changed and added defines
71 #define NEX_IT_SHOTGUN 2
72 #define NEX_IT_GRENADE_LAUNCHER 4
73 #define NEX_IT_ELECTRO 8
74 #define NEX_IT_CRYLINK 16
76 #define NEX_IT_HAGAR 64
77 #define NEX_IT_ROCKET_LAUNCHER 128
78 #define NEX_IT_SHELLS 256
79 #define NEX_IT_BULLETS 512
80 #define NEX_IT_ROCKETS 1024
81 #define NEX_IT_CELLS 2048
82 #define NEX_IT_LASER 4094
83 #define NEX_IT_STRENGTH 8192
84 #define NEX_IT_INVINCIBLE 16384
85 #define NEX_IT_SPEED 32768
86 #define NEX_IT_SLOWMO 65536
88 //===========================================
89 //rogue changed and added defines
91 #define RIT_SHELLS 128
93 #define RIT_ROCKETS 512
94 #define RIT_CELLS 1024
96 #define RIT_LAVA_NAILGUN 4096
97 #define RIT_LAVA_SUPER_NAILGUN 8192
98 #define RIT_MULTI_GRENADE 16384
99 #define RIT_MULTI_ROCKET 32768
100 #define RIT_PLASMA_GUN 65536
101 #define RIT_ARMOR1 8388608
102 #define RIT_ARMOR2 16777216
103 #define RIT_ARMOR3 33554432
104 #define RIT_LAVA_NAILS 67108864
105 #define RIT_PLASMA_AMMO 134217728
106 #define RIT_MULTI_ROCKETS 268435456
107 #define RIT_SHIELD 536870912
108 #define RIT_ANTIGRAV 1073741824
109 #define RIT_SUPERHEALTH 2147483648
111 //MED 01/04/97 added hipnotic defines
112 //===========================================
113 //hipnotic added defines
114 #define HIT_PROXIMITY_GUN_BIT 16
115 #define HIT_MJOLNIR_BIT 7
116 #define HIT_LASER_CANNON_BIT 23
117 #define HIT_PROXIMITY_GUN (1<<HIT_PROXIMITY_GUN_BIT)
118 #define HIT_MJOLNIR (1<<HIT_MJOLNIR_BIT)
119 #define HIT_LASER_CANNON (1<<HIT_LASER_CANNON_BIT)
120 #define HIT_WETSUIT (1<<(23+2))
121 #define HIT_EMPATHY_SHIELDS (1<<(23+3))
123 //===========================================
127 #include "r_textures.h"
133 #include "protocol.h"
136 #include "model_shared.h"
154 extern qbool noclip_anglehack;
156 /// 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)
157 extern int current_skill;
162 extern cvar_t chase_active;
163 extern cvar_t cl_viewmodel_scale;
165 void Chase_Init (void);
166 void Chase_Reset (void);
167 void Chase_Update (void);
169 void fractalnoise(unsigned char *noise, int size, int startgrid);
170 void fractalnoisequick(unsigned char *noise, int size, int startgrid);
171 float noise4f(float x, float y, float z, float w);
173 void Sys_Shared_Init(void);
175 // Flag in size field of demos to indicate a client->server packet. Demo
176 // playback will ignore this, but it may be useful to make DP sniff packets to
177 // debug protocol exploits.
178 #define DEMOMSG_CLIENT_TO_SERVER 0x80000000