-
Notifications
You must be signed in to change notification settings - Fork 2
/
doomstat.h
412 lines (328 loc) · 12.4 KB
/
doomstat.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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id: doomstat.h,v 1.2 2000-08-12 21:29:24 fraggle Exp $
//
// Copyright (C) 1993-1996 by id Software, Inc.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// DESCRIPTION:
// All the global variables that store the internal state.
// Theoretically speaking, the internal state of the engine
// should be found by looking at the variables collected
// here, and every relevant module will have to include
// this header file.
// In practice, things are a bit messy.
//
//-----------------------------------------------------------------------------
#ifndef __D_STATE__
#define __D_STATE__
// We need globally shared data structures,
// for defining the global state variables.
#include "doomdata.h"
#include "d_net.h"
// We need the playr data structure as well.
#include "d_player.h"
// ------------------------
// Command line parameters.
//
extern boolean nomonsters; // checkparm of -nomonsters
extern boolean respawnparm; // checkparm of -respawn
extern boolean fastparm; // checkparm of -fast
extern boolean devparm; // DEBUG: launched with -devparm
extern boolean ssgparm; // checkparm of -ssg GB 2013
extern boolean nolfbparm; // checkparm of -nolfb GB 2014
extern boolean nopmparm; // checkparm of -nopm GB 2014
extern boolean noasmparm; // checkparm of -noasm GB 2014
extern boolean noasmxparm; // checkparm of -noasmx GB 2014
extern boolean asmp6parm; // checkparm of -asmp6 GB 2014
extern boolean safeparm; // checkparm of -safe GB 2014
extern boolean stdvidparm; // checkparm of -stdvid GB 2014
extern boolean bestvidparm; // checkparm of -bestvid GB 2014
extern boolean lowdetparm; // checkparm of -lowdet GB 2015
extern boolean v12_compat; // GB 2014
extern int statusbar_dirty; // GB 2014, only draw when necessary
extern int screenblocks; // killough 11/98
// -----------------------------------------------------
// Game Mode - identify IWAD as shareware, retail etc.
//
extern GameMode_t gamemode;
extern GameMission_t gamemission;
// Set if homebrew PWAD stuff has been added to the number of PWADs requested.
extern int modifiedgame;
// compatibility with old engines (monster behavior, metrics, etc.)
extern int compatibility, default_compatibility; // killough 1/31/98
extern int demo_version; // killough 7/19/98: Version of demo
// Only true when playing back an old demo -- used only in "corner cases"
// which break playback but are otherwise unnoticable or are just desirable:
#define demo_compatibility (demo_version < 200) /* killough 11/98: macroized */
// killough 7/19/98: whether monsters should fight against each other
extern int monster_infighting, default_monster_infighting;
extern int monkeys, default_monkeys;
// v1.1-like pitched sounds
extern int pitched_sounds;
extern int general_translucency;
extern int demo_insurance, default_demo_insurance; // killough 4/5/98
// -------------------------------------------
// killough 10/98: compatibility vector
enum {
comp_telefrag,
comp_dropoff,
comp_vile,
comp_pain,
comp_skull,
comp_blazing,
comp_doorlight,
comp_model,
comp_god,
comp_falloff,
comp_floors,
comp_skymap,
comp_pursuit,
comp_doorstuck,
comp_staylift,
comp_zombie,
comp_stairs,
comp_infcheat,
comp_zerotags,
COMP_TOTAL=32 // Some extra room for additional variables
};
extern int comp[COMP_TOTAL], default_comp[COMP_TOTAL];
// -------------------------------------------
// Language.
extern Language_t language;
// -------------------------------------------
// Selected skill type, map etc.
//
// Defaults for menu, methinks.
extern skill_t startskill;
extern int startepisode;
extern int startmap;
extern boolean autostart;
// Selected by user.
extern skill_t gameskill;
extern int gameepisode;
extern int gamemap;
// Nightmare mode flag, single player.
extern boolean respawnmonsters;
// Netgame? Only true if >1 player.
extern boolean netgame;
// Flag: true only if started as net deathmatch.
// An enum might handle altdeath/cooperative better.
extern boolean deathmatch;
// ------------------------------------------
// Internal parameters for sound rendering.
// These have been taken from the DOS version,
// but are not (yet) supported with Linux
// (e.g. no sound volume adjustment with menu.
// These are not used, but should be (menu).
// From m_menu.c:
// Sound FX volume has default, 0 - 15
// Music volume has default, 0 - 15
// These are multiplied by 8.
extern int snd_SfxVolume; // maximum volume for sound
extern int snd_MusicVolume; // maximum volume for music
// Current music/sfx card - index useless
// w/o a reference LUT in a sound module.
// Ideally, this would use indices found
// in: /usr/include/linux/soundcard.h
//extern int snd_MusicDevice;
//extern int snd_SfxDevice;
// Config file? Same disclaimer as above.
//extern int snd_DesiredMusicDevice;
//extern int snd_DesiredSfxDevice;
// -------------------------
// Status flags for refresh.
//
// Depending on view size - no status bar?
// Note that there is no way to disable the
// status bar explicitely.
extern boolean statusbaractive;
extern boolean inhelpscreens; // GB 2014 In fullscreen menu?
extern boolean automapactive; // In AutoMap mode?
extern boolean menuactive; // Menu overlayed?
extern boolean paused; // Game Pause?
extern int hud_active; //jff 2/17/98 toggles heads-up status display
extern boolean viewactive;
extern boolean nodrawers;
extern boolean noblit;
extern int viewwindowx;
extern int viewwindowy;
extern int viewheight;
extern int viewwidth;
extern int scaledviewwidth;
extern int scaledviewheight; // killough 11/98
// This one is related to the 3-screen display mode.
// ANG90 = left side, ANG270 = right
extern int viewangleoffset;
// Player taking events, and displaying.
extern int consoleplayer;
extern int displayplayer;
// -------------------------------------
// Scores, rating.
// Statistics on a given map, for intermission.
//
extern int totalkills;
extern int totalitems;
extern int totalsecret;
// Timer, for scores.
extern int levelstarttic; // gametic at level start
extern int basetic; // killough 9/29/98: levelstarttic, adjusted
extern int leveltime; // tics in game play for par
// --------------------------------------
// DEMO playback/recording related stuff.
extern boolean usergame;
extern boolean demoplayback;
extern boolean demorecording;
// Quit after playing a demo from cmdline.
extern boolean singledemo;
// Print timing information after quitting. killough
extern boolean timingdemo;
// Run tick clock at fastest speed possible while playing demo. killough
extern boolean fastdemo;
extern gamestate_t gamestate;
//-----------------------------
// Internal parameters, fixed.
// These are set by the engine, and not changed
// according to user inputs. Partly load from
// WAD, partly set at startup time.
extern int gametic;
// Bookkeeping on players - state.
extern player_t players[MAXPLAYERS];
// Alive? Disconnected?
extern boolean playeringame[];
extern mapthing_t *deathmatchstarts; // killough
extern size_t num_deathmatchstarts; // killough
extern mapthing_t *deathmatch_p;
// Player spawn spots.
extern mapthing_t playerstarts[];
// Intermission stats.
// Parameters for world map / intermission.
extern wbstartstruct_t wminfo;
// LUT of ammunition limits for each kind.
// This doubles with BackPack powerup item.
extern int maxammo[];
//-----------------------------------------
// Internal parameters, used for engine.
//
// File handling stuff.
extern char basedefault[];
extern FILE *debugfile;
// if true, load all graphics at level load
extern boolean precache;
// wipegamestate can be set to -1
// to force a wipe on the next draw
extern gamestate_t wipegamestate;
extern int mouseSensitivity_horiz; // killough
extern int mouseSensitivity_vert;
// debug flag to cancel adaptiveness
extern boolean singletics;
extern int bodyqueslot;
// Needed to store the number of the dummy sky flat.
// Used for rendering, as well as tracking projectiles etc.
extern int skyflatnum;
// Netgame stuff (buffers and pointers, i.e. indices).
extern doomcom_t *doomcom;
extern doomdata_t *netbuffer; // This points inside doomcom.
extern ticcmd_t localcmds[];
extern int rndindex;
extern int maketic;
extern int nettics[];
extern ticcmd_t netcmds[][BACKUPTICS];
extern int ticdup;
extern thinker_t thinkercap; // Both the head and tail of the thinker list
//-----------------------------------------------------------------------------
// v1.1-like pitched sounds
extern int pitched_sounds, default_pitched_sounds; // killough 2/21/98
extern int allow_pushers; // MT_PUSH Things // phares 3/10/98
extern int default_allow_pushers;
extern int variable_friction; // ice & mud // phares 3/10/98
extern int default_variable_friction;
extern int monsters_remember; // killough 3/1/98
extern int default_monsters_remember;
extern int weapon_recoil; // weapon recoil // phares
extern int default_weapon_recoil;
extern int player_bobbing; // whether player bobs or not // phares 2/25/98
extern int default_player_bobbing; // killough 3/1/98: make local to each game
#ifdef BETA
// killough 7/19/98: Classic Pre-Beta BFG
extern int classic_bfg, default_classic_bfg;
// killough 7/24/98: Emulation of Press Release version of Doom
extern int beta_emulation;
#endif
#ifdef DOGS
extern int dogs, default_dogs; // killough 7/19/98: Marine's best friend :)
extern int dog_jumping, default_dog_jumping; // killough 10/98
#endif
// killough 8/8/98: distance friendly monsters tend to stay from player
extern int distfriend, default_distfriend;
// killough 9/8/98: whether monsters are allowed to strafe or retreat
extern int monster_backing, default_monster_backing;
// killough 9/9/98: whether monsters intelligently avoid hazards
extern int monster_avoid_hazards, default_monster_avoid_hazards;
// killough 10/98: whether monsters are affected by friction
extern int monster_friction, default_monster_friction;
// killough 9/9/98: whether monsters help friends
extern int help_friends, default_help_friends;
extern int flashing_hom; // killough 10/98
extern int doom_weapon_toggles; // killough 10/98
#endif
//----------------------------------------------------------------------------
//
// $Log: doomstat.h,v $
// Revision 1.2 2000-08-12 21:29:24 fraggle
// change license header
//
// Revision 1.1.1.1 2000/07/29 13:20:41 fraggle
// imported sources
//
// Revision 1.13 1998/05/12 12:47:28 phares
// Removed OVER_UNDER code
//
// Revision 1.12 1998/05/06 16:05:34 jim
// formatting and documenting
//
// Revision 1.11 1998/05/05 16:28:51 phares
// Removed RECOIL and OPT_BOBBING defines
//
// Revision 1.10 1998/05/03 23:12:52 killough
// beautify, move most global switch variable decls here
//
// Revision 1.9 1998/04/06 04:54:55 killough
// Add demo_insurance
//
// Revision 1.8 1998/03/02 11:26:25 killough
// Remove now-dead monster_ai mask idea
//
// Revision 1.7 1998/02/23 04:17:38 killough
// fix bad translucency flag
//
// Revision 1.5 1998/02/20 21:56:29 phares
// Preliminarey sprite translucency
//
// Revision 1.4 1998/02/19 16:55:30 jim
// Optimized HUD and made more configurable
//
// Revision 1.3 1998/02/18 00:58:54 jim
// Addition of HUD
//
// Revision 1.2 1998/01/26 19:26:41 phares
// First rev with no ^Ms
//
// Revision 1.1.1.1 1998/01/19 14:03:09 rand
// Lee's Jan 19 sources
//
//----------------------------------------------------------------------------