Renamed button description layer to 'Text'.
[kugel-rb.git] / apps / plugins / doom / doomstat.h
blob089f93b356a802a64fe28ae70dd05c9338d7615a
1 // Emacs style mode select -*- C++ -*-
2 //-----------------------------------------------------------------------------
3 //
4 // $Id$
5 //
6 // Copyright (C) 1993-1996 by id Software, Inc.
7 //
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License
10 // as published by the Free Software Foundation; either version 2
11 // of the License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // DESCRIPTION:
19 // All the global variables that store the internal state.
20 // Theoretically speaking, the internal state of the engine
21 // should be found by looking at the variables collected
22 // here, and every relevant module will have to include
23 // this header file.
24 // In practice, things are a bit messy.
26 //-----------------------------------------------------------------------------
29 #ifndef __D_STATE__
30 #define __D_STATE__
32 // We need globally shared data structures,
33 // for defining the global state variables.
34 #include "doomdata.h"
35 #include "d_net.h"
37 // We need the playr data structure as well.
38 #include "d_player.h"
41 #ifdef __GNUG__
42 #pragma interface
43 #endif
46 // ------------------------
47 // Command line parameters.
49 extern boolean nomonsters; // checkparm of -nomonsters
50 extern boolean respawnparm; // checkparm of -respawn
51 extern boolean fastparm; // checkparm of -fast
53 extern boolean devparm; // DEBUG: launched with -devparm
55 enum {
56 am_active = 1, // currently shown
57 am_overlay= 2, // covers the screen, i.e. not overlay mode
58 am_rotate = 4, // rotates to the player facing direction
59 am_follow = 8, // keep the player centred
60 am_grid =16, // show grid
62 typedef unsigned automapmode_e;
63 extern automapmode_e automapmode; // Mode that the automap is in
65 // -----------------------------------------------------
66 // Game Mode - identify IWAD as shareware, retail etc.
68 extern GameMode_t gamemode;
69 extern GameMission_t gamemission;
71 // Set if homebrew PWAD stuff has been added.
72 extern boolean modifiedgame;
74 // CPhipps - new compatibility handling
75 extern complevel_t compatibility_level, default_compatibility_level;
77 // CPhipps - old compatibility testing flags aliased to new handling
78 #define compatibility (compatibility_level<=boom_compatibility_compatibility)
79 #define demo_compatibility (compatibility_level <= doom_demo_compatibility)
80 #define mbf_features (compatibility_level>=mbf_compatibility)
82 extern int default_translucency;
83 extern boolean general_translucency; // true if translucency is ok // phares
85 extern int demo_insurance, default_demo_insurance; // killough 4/5/98
87 // -------------------------------------------
88 // killough 10/98: compatibility vector
90 enum {
91 comp_telefrag,
92 comp_dropoff,
93 comp_vile,
94 comp_pain,
95 comp_skull,
96 comp_blazing,
97 comp_doorlight,
98 comp_model,
99 comp_god,
100 comp_falloff,
101 comp_floors,
102 comp_skymap,
103 comp_pursuit,
104 comp_doorstuck,
105 comp_staylift,
106 comp_zombie,
107 comp_stairs,
108 comp_infcheat,
109 comp_zerotags,
110 comp_moveblock,
111 comp_respawn, /* cph - this is the inverse of comp_respawnfix from eternity */
112 comp_sound,
113 COMP_NUM, /* cph - should be last in sequence */
114 COMP_TOTAL=32 // Some extra room for additional variables
117 extern int comp[COMP_TOTAL], default_comp[COMP_TOTAL];
119 extern boolean enable_sound;
120 extern boolean rockblock;
122 // -------------------------------------------
123 // Language.
124 extern Language_t language;
127 // -------------------------------------------
128 // Selected skill type, map etc.
131 // Defaults for menu, methinks.
132 extern skill_t startskill;
133 extern int startepisode;
134 extern int startmap;
136 extern boolean autostart;
138 // Selected by user.
139 extern skill_t gameskill;
140 extern int gameepisode;
141 extern int gamemap;
143 // Nightmare mode flag, single player.
144 extern boolean respawnmonsters;
146 // Netgame? Only true if >1 player.
147 extern boolean netgame;
149 // Flag: true only if started as net deathmatch.
150 // An enum might handle altdeath/cooperative better.
151 extern boolean deathmatch;
153 // -------------------------
154 // Internal parameters for sound rendering.
155 // These have been taken from the DOS version,
156 // but are not (yet) supported with Linux
157 // (e.g. no sound volume adjustment with menu.
159 // These are not used, but should be (menu).
160 // From m_menu.c:
161 // Sound FX volume has default, 0 - 15
162 // Music volume has default, 0 - 15
163 // These are multiplied by 8.
164 extern int snd_SfxVolume; // maximum volume for sound
165 extern int snd_MusicVolume; // maximum volume for music
167 // Current music/sfx card - index useless
168 // w/o a reference LUT in a sound module.
169 // Ideally, this would use indices found
170 // in: /usr/include/linux/soundcard.h
171 extern int snd_MusicDevice;
172 extern int snd_SfxDevice;
173 // Config file? Same disclaimer as above.
174 extern int snd_DesiredMusicDevice;
175 extern int snd_DesiredSfxDevice;
178 // -------------------------
179 // Status flags for refresh.
182 // Depending on view size - no status bar?
183 // Note that there is no way to disable the
184 // status bar explicitely.
185 extern boolean statusbaractive;
187 extern boolean automapactive; // In AutoMap mode?
188 extern boolean menuactive; // Menu overlayed?
189 extern boolean paused; // Game Pause?
192 extern boolean viewactive;
194 extern boolean nodrawers;
195 extern boolean noblit;
197 extern int viewwindowx;
198 extern int viewwindowy;
199 extern int viewheight;
200 extern int viewwidth;
201 extern int scaledviewwidth;
203 // This one is related to the 3-screen display mode.
204 // ANG90 = left side, ANG270 = right
205 extern int viewangleoffset;
207 // Player taking events, and displaying.
208 extern int consoleplayer;
209 extern int displayplayer;
212 // -------------------------------------
213 // Scores, rating.
214 // Statistics on a given map, for intermission.
216 extern int totalkills, totallive;
217 extern int totalitems;
218 extern int totalsecret;
220 // Timer, for scores.
221 extern int levelstarttic; // gametic at level start
222 extern int basetic; /* killough 9/29/98: levelstarttic, adjusted */
223 extern int leveltime; // tics in game play for par
227 // --------------------------------------
228 // DEMO playback/recording related stuff.
229 // No demo, there is a human player in charge?
230 // Disable save/end game?
231 extern boolean usergame;
234 extern boolean demoplayback;
235 extern boolean demorecording;
237 // Quit after playing a demo from cmdline.
238 extern boolean singledemo;
244 extern gamestate_t gamestate;
246 //-----------------------------
247 // Internal parameters, fixed.
248 // These are set by the engine, and not changed
249 // according to user inputs. Partly load from
250 // WAD, partly set at startup time.
252 extern int gametic;
254 // Bookkeeping on players - state.
255 extern player_t players[MAXPLAYERS];
257 // Alive? Disconnected?
258 extern boolean playeringame[MAXPLAYERS];
261 // Player spawn spots for deathmatch.
262 #define MAX_DM_STARTS 10
263 //extern mapthing_t deathmatchstarts[MAX_DM_STARTS];
264 extern mapthing_t *deathmatchstarts; // killough
265 extern size_t num_deathmatchstarts; // killough
266 extern mapthing_t* deathmatch_p;
268 // Player spawn spots.
269 extern mapthing_t playerstarts[MAXPLAYERS];
271 // Intermission stats.
272 // Parameters for world map / intermission.
273 extern wbstartstruct_t wminfo;
276 // LUT of ammunition limits for each kind.
277 // This doubles with BackPack powerup item.
278 extern int maxammo[NUMAMMO];
280 //-----------------------------------------
281 // Internal parameters, used for engine.
284 // File handling stuff.
285 extern char basedefault[];
286 extern int debugfile;
288 // if true, load all graphics at level load
289 extern boolean precache;
292 // wipegamestate can be set to -1
293 // to force a wipe on the next draw
294 extern gamestate_t wipegamestate;
296 extern int mouseSensitivity;
298 // debug flag to cancel adaptiveness
299 extern boolean singletics;
301 extern int bodyqueslot;
305 // Needed to store the number of the dummy sky flat.
306 // Used for rendering,
307 // as well as tracking projectiles etc.
308 extern int skyflatnum;
310 // Netgame stuff (buffers and pointers, i.e. indices).
311 extern doomcom_t* doomcom;
312 extern doomdata_t* netbuffer; // This points inside doomcom.
314 extern int rndindex;
316 extern int maketic;
318 extern ticcmd_t netcmds[][BACKUPTICS];
320 extern int ticdup;
322 extern int nettics[MAXNETNODES];
324 //-----------------------------------------------------------------------------
326 // v1.1-like pitched sounds
327 extern int pitched_sounds; // killough 2/21/98
329 extern int allow_pushers; // MT_PUSH Things // phares 3/10/98
330 extern int default_allow_pushers;
332 extern int variable_friction; // ice & mud // phares 3/10/98
333 extern int default_variable_friction;
335 extern int monsters_remember; // killough 3/1/98
336 extern int default_monsters_remember;
338 extern int weapon_recoil; // weapon recoil // phares
339 extern int default_weapon_recoil;
341 extern int player_bobbing; // whether player bobs or not // phares 2/25/98
342 extern int default_player_bobbing; // killough 3/1/98: make local to each game
344 #ifdef DOGS
345 extern int dogs, default_dogs; // killough 7/19/98: Marine's best friend :)
346 extern int dog_jumping, default_dog_jumping; // killough 10/98
347 #endif
349 /* killough 8/8/98: distance friendly monsters tend to stay from player */
350 extern int distfriend, default_distfriend;
352 /* killough 9/8/98: whether monsters are allowed to strafe or retreat */
353 extern int monster_backing, default_monster_backing;
355 /* killough 9/9/98: whether monsters intelligently avoid hazards */
356 extern int monster_avoid_hazards, default_monster_avoid_hazards;
358 /* killough 10/98: whether monsters are affected by friction */
359 extern int monster_friction, default_monster_friction;
361 /* killough 9/9/98: whether monsters help friends */
362 extern int help_friends, default_help_friends;
364 extern int flashing_hom; // killough 10/98
366 extern int doom_weapon_toggles; // killough 10/98
368 /* killough 7/19/98: whether monsters should fight against each other */
369 extern int monster_infighting, default_monster_infighting;
371 extern int monkeys, default_monkeys;
374 #endif