-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquakedef.h
211 lines (184 loc) · 4.5 KB
/
quakedef.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
#pragma once
#include <u.h>
#include <libc.h>
#include <stdio.h>
#include <ctype.h>
#ifdef __plan9__
typedef enum {false, true} bool;
#define RAND_MAX ((2<<15)-1)
#endif
#define QUAKE_GAME // as opposed to utilities
#define VERSION 1.09
//#define PARANOID // speed sapping error checking
#define GAMENAME "id1" // directory to look in by default
enum {
MAX_DATAGRAM = 1400, // max length of unreliable message
MAX_DATAGRAM_LOCAL = 65000, // on loopback we don't care
PITCH = 0, // up / down
YAW, // left / right
ROLL, // fall over
// limits
MAX_EDICTS = 65536,
MAX_MODELS = 4096,
MAX_SOUNDS = 2048,
MAX_STYLESTRING = 64,
MAX_SCOREBOARD = 16,
MAX_SCOREBOARDNAME = 32,
Nlights = 64,
// stats are integers communicated to the client by the server
MAX_CL_STATS = 256,
STAT_HEALTH = 0,
STAT_FRAGS,
STAT_WEAPON,
STAT_AMMO,
STAT_ARMOR,
STAT_WEAPONFRAME,
STAT_SHELLS,
STAT_NAILS,
STAT_ROCKETS,
STAT_CELLS,
STAT_ACTIVEWEAPON,
STAT_TOTALSECRETS,
STAT_TOTALMONSTERS,
STAT_SECRETS, // bumped on client side by svc_foundsecret
STAT_MONSTERS, // bumped by svc_killedmonster
// stock
IT_SHOTGUN = 1<<0,
IT_SUPER_SHOTGUN = 1<<1,
IT_NAILGUN = 1<<2,
IT_SUPER_NAILGUN = 1<<3,
IT_GRENADE_LAUNCHER = 1<<4,
IT_ROCKET_LAUNCHER = 1<<5,
IT_LIGHTNING = 1<<6,
IT_SUPER_LIGHTNING = 1<<7,
IT_SHELLS = 1<<8,
IT_NAILS = 1<<9,
IT_ROCKETS = 1<<10,
IT_CELLS = 1<<11,
IT_AXE = 1<<12,
IT_ARMOR1 = 1<<13,
IT_ARMOR2 = 1<<14,
IT_ARMOR3 = 1<<15,
IT_SUPERHEALTH = 1<<16,
IT_KEY1 = 1<<17,
IT_KEY2 = 1<<18,
IT_INVISIBILITY = 1<<19,
IT_INVULNERABILITY = 1<<20,
IT_SUIT = 1<<21,
IT_QUAD = 1<<22,
IT_SIGIL1 = 1<<28,
IT_SIGIL2 = 1<<29,
IT_SIGIL3 = 1<<30,
IT_SIGIL4 = 1<<31,
// rogue changed and added defines
RIT_SHELLS = 1<<7,
RIT_NAILS = 1<<8,
RIT_ROCKETS = 1<<9,
RIT_CELLS = 1<<10,
RIT_AXE = 1<<11,
RIT_LAVA_NAILGUN = 1<<12,
RIT_LAVA_SUPER_NAILGUN = 1<<13,
RIT_MULTI_GRENADE = 1<<14,
RIT_MULTI_ROCKET = 1<<15,
RIT_PLASMA_GUN = 1<<16,
RIT_ARMOR1 = 1<<23,
RIT_ARMOR2 = 1<<24,
RIT_ARMOR3 = 1<<25,
RIT_LAVA_NAILS = 1<<26,
RIT_PLASMA_AMMO = 1<<27,
RIT_MULTI_ROCKETS = 1<<28,
RIT_SHIELD = 1<<29,
RIT_ANTIGRAV = 1<<30,
RIT_SUPERHEALTH = 1<<31,
// hipnotic added defines,
HIT_PROXIMITY_GUN_BIT = 16,
HIT_MJOLNIR_BIT = 7,
HIT_LASER_CANNON_BIT = 23,
HIT_PROXIMITY_GUN = 1<<HIT_PROXIMITY_GUN_BIT,
HIT_MJOLNIR = 1<<HIT_MJOLNIR_BIT,
HIT_LASER_CANNON = 1<<HIT_LASER_CANNON_BIT,
HIT_WETSUIT = 1<<(23+2),
HIT_EMPATHY_SHIELDS = 1<<(23+3),
};
//===========================================
typedef u8int byte;
#include "cvar.h"
#include "common.h"
#include "zone.h"
#include "dat.h"
#include "mathlib.h"
#include "fns.h"
#include "bspfile.h"
#include "vid.h"
typedef struct
{
vec3_t origin;
vec3_t angles;
int modelindex;
int frame;
int colormap;
int skin;
int effects;
byte alpha;
} entity_state_t;
#include "wad.h"
#include "draw.h"
#include "screen.h"
#include "net.h"
#include "protocol.h"
#include "cmd.h"
#include "sbar.h"
extern cvar_t bgmvolume;
extern cvar_t volume;
#include "render.h"
#include "client.h"
#include "progs.h"
#include "server.h"
#include "model.h"
#include "d_iface.h"
#include "input.h"
#include "world.h"
#include "keys.h"
#include "console.h"
#include "view.h"
#include "menu.h"
#include "r_local.h"
#include "d_local.h"
extern bool noclip_anglehack;
//
// host
//
extern cvar_t sys_ticrate;
extern cvar_t developer;
extern bool host_initialized; // true if into command execution
extern double host_frametime;
extern byte *host_basepal;
extern byte *host_colormap;
extern int host_framecount; // incremented every frame, never reset
extern double realtime; // not bounded in any way, changed at
// start of every frame, never reset
void Host_ClearMemory (void);
void Host_ServerFrame (void);
void Host_InitCommands (void);
void Host_Init (int argc, char **argv, char **paths);
void Host_Shutdown(void);
_Noreturn void Host_Error (char *error, ...);
void Host_EndGame (char *message, ...);
void Host_Frame (float time);
void Host_Quit_f (void);
void Host_ClientCommands (char *fmt, ...);
void Host_ShutdownServer (bool crash);
extern cvar_t pausable;
extern int current_skill; // 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)
//
// chase
//
extern cvar_t chase_active;
void Chase_Init (void);
void Chase_Reset (void);
void Chase_Update (void);
#pragma varargck argpos Host_Error 1
#pragma varargck argpos Host_EndGame 1
#pragma varargck argpos Host_ClientCommands 1