Move c/h files implementing/defining standard library stuff into a new libc directory...
[kugel-rb.git] / apps / plugins / doom / doomstat.h
blob5a5a87c3c56903705034783792cd07baa71d889f
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 automapmode_e {
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 extern enum automapmode_e automapmode; // Mode that the automap is in
64 // -----------------------------------------------------
65 // Game Mode - identify IWAD as shareware, retail etc.
67 extern GameMode_t gamemode;
68 extern GameMission_t gamemission;
70 // Set if homebrew PWAD stuff has been added.
71 extern boolean modifiedgame;
73 // CPhipps - new compatibility handling
74 extern complevel_t compatibility_level, default_compatibility_level;
76 // CPhipps - old compatibility testing flags aliased to new handling
77 #define compatibility (compatibility_level<=boom_compatibility_compatibility)
78 #define demo_compatibility (compatibility_level <= doom_demo_compatibility)
79 #define mbf_features (compatibility_level>=mbf_compatibility)
81 extern int default_translucency;
82 extern boolean general_translucency; // true if translucency is ok // phares
84 extern int demo_insurance, default_demo_insurance; // killough 4/5/98
86 // -------------------------------------------
87 // killough 10/98: compatibility vector
89 enum {
90 comp_telefrag,
91 comp_dropoff,
92 comp_vile,
93 comp_pain,
94 comp_skull,
95 comp_blazing,
96 comp_doorlight,
97 comp_model,
98 comp_god,
99 comp_falloff,
100 comp_floors,
101 comp_skymap,
102 comp_pursuit,
103 comp_doorstuck,
104 comp_staylift,
105 comp_zombie,
106 comp_stairs,
107 comp_infcheat,
108 comp_zerotags,
109 comp_moveblock,
110 comp_respawn, /* cph - this is the inverse of comp_respawnfix from eternity */
111 comp_sound,
112 COMP_NUM, /* cph - should be last in sequence */
113 COMP_TOTAL=32 // Some extra room for additional variables
116 extern int comp[COMP_TOTAL], default_comp[COMP_TOTAL];
118 extern boolean enable_sound;
119 extern boolean rockblock;
121 // -------------------------------------------
122 // Language.
123 extern Language_t language;
126 // -------------------------------------------
127 // Selected skill type, map etc.
130 // Defaults for menu, methinks.
131 extern skill_t startskill;
132 extern int startepisode;
133 extern int startmap;
135 extern boolean autostart;
137 // Selected by user.
138 extern skill_t gameskill;
139 extern int gameepisode;
140 extern int gamemap;
142 // Nightmare mode flag, single player.
143 extern boolean respawnmonsters;
145 // Netgame? Only true if >1 player.
146 extern boolean netgame;
148 // Flag: true only if started as net deathmatch.
149 // An enum might handle altdeath/cooperative better.
150 extern boolean deathmatch;
152 // -------------------------
153 // Internal parameters for sound rendering.
154 // These have been taken from the DOS version,
155 // but are not (yet) supported with Linux
156 // (e.g. no sound volume adjustment with menu.
158 // These are not used, but should be (menu).
159 // From m_menu.c:
160 // Sound FX volume has default, 0 - 15
161 // Music volume has default, 0 - 15
162 // These are multiplied by 8.
163 extern int snd_SfxVolume; // maximum volume for sound
164 extern int snd_MusicVolume; // maximum volume for music
166 // Current music/sfx card - index useless
167 // w/o a reference LUT in a sound module.
168 // Ideally, this would use indices found
169 // in: /usr/include/linux/soundcard.h
170 extern int snd_MusicDevice;
171 extern int snd_SfxDevice;
172 // Config file? Same disclaimer as above.
173 extern int snd_DesiredMusicDevice;
174 extern int snd_DesiredSfxDevice;
177 // -------------------------
178 // Status flags for refresh.
181 // Depending on view size - no status bar?
182 // Note that there is no way to disable the
183 // status bar explicitely.
184 extern boolean statusbaractive;
186 extern boolean automapactive; // In AutoMap mode?
187 extern boolean menuactive; // Menu overlayed?
188 extern boolean paused; // Game Pause?
191 extern boolean viewactive;
193 extern boolean nodrawers;
194 extern boolean noblit;
196 extern int viewwindowx;
197 extern int viewwindowy;
198 extern int viewheight;
199 extern int viewwidth;
200 extern int scaledviewwidth;
202 // This one is related to the 3-screen display mode.
203 // ANG90 = left side, ANG270 = right
204 extern int viewangleoffset;
206 // Player taking events, and displaying.
207 extern int consoleplayer;
208 extern int displayplayer;
211 // -------------------------------------
212 // Scores, rating.
213 // Statistics on a given map, for intermission.
215 extern int totalkills, totallive;
216 extern int totalitems;
217 extern int totalsecret;
219 // Timer, for scores.
220 extern int levelstarttic; // gametic at level start
221 extern int basetic; /* killough 9/29/98: levelstarttic, adjusted */
222 extern int leveltime; // tics in game play for par
226 // --------------------------------------
227 // DEMO playback/recording related stuff.
228 // No demo, there is a human player in charge?
229 // Disable save/end game?
230 extern boolean usergame;
233 extern boolean demoplayback;
234 extern boolean demorecording;
236 // Quit after playing a demo from cmdline.
237 extern boolean singledemo;
243 extern gamestate_t gamestate;
245 //-----------------------------
246 // Internal parameters, fixed.
247 // These are set by the engine, and not changed
248 // according to user inputs. Partly load from
249 // WAD, partly set at startup time.
251 extern int gametic;
253 // Bookkeeping on players - state.
254 extern player_t players[MAXPLAYERS];
256 // Alive? Disconnected?
257 extern boolean playeringame[MAXPLAYERS];
260 // Player spawn spots for deathmatch.
261 #define MAX_DM_STARTS 10
262 //extern mapthing_t deathmatchstarts[MAX_DM_STARTS];
263 extern mapthing_t *deathmatchstarts; // killough
264 extern size_t num_deathmatchstarts; // killough
265 extern mapthing_t* deathmatch_p;
267 // Player spawn spots.
268 extern mapthing_t playerstarts[MAXPLAYERS];
270 // Intermission stats.
271 // Parameters for world map / intermission.
272 extern wbstartstruct_t wminfo;
275 // LUT of ammunition limits for each kind.
276 // This doubles with BackPack powerup item.
277 extern int maxammo[NUMAMMO];
279 //-----------------------------------------
280 // Internal parameters, used for engine.
283 // File handling stuff.
284 extern char basedefault[];
285 extern int debugfile;
287 // if true, load all graphics at level load
288 extern boolean precache;
291 // wipegamestate can be set to -1
292 // to force a wipe on the next draw
293 extern gamestate_t wipegamestate;
295 extern int mouseSensitivity;
297 // debug flag to cancel adaptiveness
298 extern boolean singletics;
300 extern int bodyqueslot;
304 // Needed to store the number of the dummy sky flat.
305 // Used for rendering,
306 // as well as tracking projectiles etc.
307 extern int skyflatnum;
309 // Netgame stuff (buffers and pointers, i.e. indices).
310 extern doomcom_t* doomcom;
311 extern doomdata_t* netbuffer; // This points inside doomcom.
313 extern int rndindex;
315 extern int maketic;
317 extern ticcmd_t netcmds[][BACKUPTICS];
319 extern int ticdup;
321 extern int nettics[MAXNETNODES];
323 //-----------------------------------------------------------------------------
325 // v1.1-like pitched sounds
326 extern int pitched_sounds; // killough 2/21/98
328 extern int allow_pushers; // MT_PUSH Things // phares 3/10/98
329 extern int default_allow_pushers;
331 extern int variable_friction; // ice & mud // phares 3/10/98
332 extern int default_variable_friction;
334 extern int monsters_remember; // killough 3/1/98
335 extern int default_monsters_remember;
337 extern int weapon_recoil; // weapon recoil // phares
338 extern int default_weapon_recoil;
340 extern int player_bobbing; // whether player bobs or not // phares 2/25/98
341 extern int default_player_bobbing; // killough 3/1/98: make local to each game
343 #ifdef DOGS
344 extern int dogs, default_dogs; // killough 7/19/98: Marine's best friend :)
345 extern int dog_jumping, default_dog_jumping; // killough 10/98
346 #endif
348 /* killough 8/8/98: distance friendly monsters tend to stay from player */
349 extern int distfriend, default_distfriend;
351 /* killough 9/8/98: whether monsters are allowed to strafe or retreat */
352 extern int monster_backing, default_monster_backing;
354 /* killough 9/9/98: whether monsters intelligently avoid hazards */
355 extern int monster_avoid_hazards, default_monster_avoid_hazards;
357 /* killough 10/98: whether monsters are affected by friction */
358 extern int monster_friction, default_monster_friction;
360 /* killough 9/9/98: whether monsters help friends */
361 extern int help_friends, default_help_friends;
363 extern int flashing_hom; // killough 10/98
365 extern int doom_weapon_toggles; // killough 10/98
367 /* killough 7/19/98: whether monsters should fight against each other */
368 extern int monster_infighting, default_monster_infighting;
370 extern int monkeys, default_monkeys;
373 #endif