aboutsummaryrefslogtreecommitdiff
path: root/src/doomstat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/doomstat.h')
-rw-r--r--src/doomstat.h332
1 files changed, 332 insertions, 0 deletions
diff --git a/src/doomstat.h b/src/doomstat.h
new file mode 100644
index 0000000..88f7b8d
--- /dev/null
+++ b/src/doomstat.h
@@ -0,0 +1,332 @@
1/* Emacs style mode select -*- C++ -*-
2 *-----------------------------------------------------------------------------
3 *
4 *
5 * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 * based on BOOM, a modified and improved DOOM engine
7 * Copyright (C) 1999 by
8 * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 * Copyright (C) 1999-2006 by
10 * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 * Copyright 2005, 2006 by
12 * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 * 02111-1307, USA.
28 *
29 * DESCRIPTION:
30 * All the global variables that store the internal state.
31 * Theoretically speaking, the internal state of the engine
32 * should be found by looking at the variables collected
33 * here, and every relevant module will have to include
34 * this header file.
35 * In practice, things are a bit messy.
36 *
37 *-----------------------------------------------------------------------------*/
38
39#ifndef __D_STATE__
40#define __D_STATE__
41
42// We need the playr data structure as well.
43#include "d_player.h"
44
45#ifdef __GNUG__
46#pragma interface
47#endif
48
49// ------------------------
50// Command line parameters.
51//
52
53extern boolean nomonsters; // checkparm of -nomonsters
54extern boolean respawnparm; // checkparm of -respawn
55extern boolean fastparm; // checkparm of -fast
56extern boolean devparm; // DEBUG: launched with -devparm
57
58// -----------------------------------------------------
59// Game Mode - identify IWAD as shareware, retail etc.
60//
61
62extern GameMode_t gamemode;
63extern GameMission_t gamemission;
64
65// Set if homebrew PWAD stuff has been added.
66extern boolean modifiedgame;
67
68// CPhipps - new compatibility handling
69extern complevel_t compatibility_level, default_compatibility_level;
70
71// CPhipps - old compatibility testing flags aliased to new handling
72#define compatibility (compatibility_level<=boom_compatibility_compatibility)
73#define demo_compatibility (compatibility_level < boom_compatibility_compatibility)
74#define mbf_features (compatibility_level>=mbf_compatibility)
75
76// v1.1-like pitched sounds
77extern int pitched_sounds; // killough
78
79extern int default_translucency; // config file says // phares
80extern boolean general_translucency; // true if translucency is ok // phares
81
82extern int demo_insurance, default_demo_insurance; // killough 4/5/98
83
84// -------------------------------------------
85// killough 10/98: compatibility vector
86
87enum {
88 comp_telefrag,
89 comp_dropoff,
90 comp_vile,
91 comp_pain,
92 comp_skull,
93 comp_blazing,
94 comp_doorlight,
95 comp_model,
96 comp_god,
97 comp_falloff,
98 comp_floors,
99 comp_skymap,
100 comp_pursuit,
101 comp_doorstuck,
102 comp_staylift,
103 comp_zombie,
104 comp_stairs,
105 comp_infcheat,
106 comp_zerotags,
107 comp_moveblock,
108 comp_respawn, /* cph - this is the inverse of comp_respawnfix from eternity */
109 comp_sound,
110 comp_666,
111 comp_soul,
112 comp_maskedanim,
113 COMP_NUM, /* cph - should be last in sequence */
114 COMP_TOTAL=32 // Some extra room for additional variables
115};
116
117extern int comp[COMP_TOTAL], default_comp[COMP_TOTAL];
118
119// -------------------------------------------
120// Language.
121extern Language_t language;
122
123// -------------------------------------------
124// Selected skill type, map etc.
125//
126
127// Defaults for menu, methinks.
128extern skill_t startskill;
129extern int startepisode;
130extern int startmap;
131
132extern boolean autostart;
133
134// Selected by user.
135extern skill_t gameskill;
136extern int gameepisode;
137extern int gamemap;
138
139// Nightmare mode flag, single player.
140extern boolean respawnmonsters;
141
142// Netgame? Only true if >1 player.
143extern boolean netgame;
144
145// Flag: true only if started as net deathmatch.
146// An enum might handle altdeath/cooperative better.
147extern boolean deathmatch;
148
149// ------------------------------------------
150// Internal parameters for sound rendering.
151// These have been taken from the DOS version,
152// but are not (yet) supported with Linux
153// (e.g. no sound volume adjustment with menu.
154
155// These are not used, but should be (menu).
156// From m_menu.c:
157// Sound FX volume has default, 0 - 15
158// Music volume has default, 0 - 15
159// These are multiplied by 8.
160extern int snd_SfxVolume; // maximum volume for sound
161extern int snd_MusicVolume; // maximum volume for music
162
163// CPhipps - screen parameters
164extern unsigned int desired_screenwidth, desired_screenheight;
165
166// -------------------------
167// Status flags for refresh.
168//
169
170enum automapmode_e {
171 am_active = 1, // currently shown
172 am_overlay= 2, // covers the screen, i.e. not overlay mode
173 am_rotate = 4, // rotates to the player facing direction
174 am_follow = 8, // keep the player centred
175 am_grid =16, // show grid
176};
177extern enum automapmode_e automapmode; // Mode that the automap is in
178
179extern boolean menuactive; // Menu overlayed?
180extern boolean paused; // Game Pause?
181extern boolean nodrawers;
182extern boolean noblit;
183
184// This one is related to the 3-screen display mode.
185// ANG90 = left side, ANG270 = right
186extern int viewangleoffset;
187
188// Player taking events, and displaying.
189extern int consoleplayer;
190extern int displayplayer;
191
192// -------------------------------------
193// Scores, rating.
194// Statistics on a given map, for intermission.
195//
196extern int totalkills, totallive;
197extern int totalitems;
198extern int totalsecret;
199
200// Timer, for scores.
201extern int basetic; /* killough 9/29/98: levelstarttic, adjusted */
202extern int leveltime; // tics in game play for par
203
204// --------------------------------------
205// DEMO playback/recording related stuff.
206
207extern boolean usergame;
208extern boolean demoplayback;
209extern boolean demorecording;
210extern int demover;
211
212// Quit after playing a demo from cmdline.
213extern boolean singledemo;
214// Print timing information after quitting. killough
215extern boolean timingdemo;
216// Run tick clock at fastest speed possible while playing demo. killough
217extern boolean fastdemo;
218
219extern gamestate_t gamestate;
220
221//-----------------------------
222// Internal parameters, fixed.
223// These are set by the engine, and not changed
224// according to user inputs. Partly load from
225// WAD, partly set at startup time.
226
227extern int gametic;
228
229
230// Bookkeeping on players - state.
231extern player_t players[MAXPLAYERS];
232
233// Alive? Disconnected?
234extern boolean playeringame[MAXPLAYERS];
235extern boolean realplayeringame[MAXPLAYERS];
236
237extern mapthing_t *deathmatchstarts; // killough
238extern size_t num_deathmatchstarts; // killough
239
240extern mapthing_t *deathmatch_p;
241
242// Player spawn spots.
243extern mapthing_t playerstarts[];
244
245// Intermission stats.
246// Parameters for world map / intermission.
247extern wbstartstruct_t wminfo;
248
249//-----------------------------------------
250// Internal parameters, used for engine.
251//
252
253// File handling stuff.
254extern FILE *debugfile;
255
256// if true, load all graphics at level load
257extern boolean precache;
258
259// wipegamestate can be set to -1
260// to force a wipe on the next draw
261extern gamestate_t wipegamestate;
262
263extern int mouseSensitivity_horiz; // killough
264extern int mouseSensitivity_vert;
265
266// debug flag to cancel adaptiveness
267extern boolean singletics;
268
269extern int bodyqueslot;
270
271// Needed to store the number of the dummy sky flat.
272// Used for rendering, as well as tracking projectiles etc.
273
274extern int skyflatnum;
275
276extern int maketic;
277
278// Networking and tick handling related.
279#define BACKUPTICS 12
280
281extern ticcmd_t netcmds[][BACKUPTICS];
282extern int ticdup;
283
284//-----------------------------------------------------------------------------
285
286extern int allow_pushers; // MT_PUSH Things // phares 3/10/98
287extern int default_allow_pushers;
288
289extern int variable_friction; // ice & mud // phares 3/10/98
290extern int default_variable_friction;
291
292extern int monsters_remember; // killough 3/1/98
293extern int default_monsters_remember;
294
295extern int weapon_recoil; // weapon recoil // phares
296extern int default_weapon_recoil;
297
298extern int player_bobbing; // whether player bobs or not // phares 2/25/98
299extern int default_player_bobbing; // killough 3/1/98: make local to each game
300
301#ifdef DOGS
302extern int dogs, default_dogs; // killough 7/19/98: Marine's best friend :)
303extern int dog_jumping, default_dog_jumping; // killough 10/98
304#endif
305
306/* killough 8/8/98: distance friendly monsters tend to stay from player */
307extern int distfriend, default_distfriend;
308
309/* killough 9/8/98: whether monsters are allowed to strafe or retreat */
310extern int monster_backing, default_monster_backing;
311
312/* killough 9/9/98: whether monsters intelligently avoid hazards */
313extern int monster_avoid_hazards, default_monster_avoid_hazards;
314
315/* killough 10/98: whether monsters are affected by friction */
316extern int monster_friction, default_monster_friction;
317
318/* killough 9/9/98: whether monsters help friends */
319extern int help_friends, default_help_friends;
320
321extern int flashing_hom; // killough 10/98
322
323extern int doom_weapon_toggles; // killough 10/98
324
325/* killough 7/19/98: whether monsters should fight against each other */
326extern int monster_infighting, default_monster_infighting;
327
328extern int monkeys, default_monkeys;
329
330extern int HelperThing; // type of thing to use for helper
331
332#endif