diff options
Diffstat (limited to 'apps/plugins/doom/doomstat.h')
-rw-r--r-- | apps/plugins/doom/doomstat.h | 373 |
1 files changed, 373 insertions, 0 deletions
diff --git a/apps/plugins/doom/doomstat.h b/apps/plugins/doom/doomstat.h new file mode 100644 index 0000000000..42cd4f5716 --- /dev/null +++ b/apps/plugins/doom/doomstat.h | |||
@@ -0,0 +1,373 @@ | |||
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. | ||
12 | // | ||
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. | ||
17 | // | ||
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. | ||
25 | // | ||
26 | //----------------------------------------------------------------------------- | ||
27 | |||
28 | |||
29 | #ifndef __D_STATE__ | ||
30 | #define __D_STATE__ | ||
31 | |||
32 | // We need globally shared data structures, | ||
33 | // for defining the global state variables. | ||
34 | #include "doomdata.h" | ||
35 | #include "d_net.h" | ||
36 | |||
37 | // We need the playr data structure as well. | ||
38 | #include "d_player.h" | ||
39 | |||
40 | |||
41 | #ifdef __GNUG__ | ||
42 | #pragma interface | ||
43 | #endif | ||
44 | |||
45 | |||
46 | // ------------------------ | ||
47 | // Command line parameters. | ||
48 | // | ||
49 | extern boolean nomonsters; // checkparm of -nomonsters | ||
50 | extern boolean respawnparm; // checkparm of -respawn | ||
51 | extern boolean fastparm; // checkparm of -fast | ||
52 | |||
53 | extern boolean devparm; // DEBUG: launched with -devparm | ||
54 | |||
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 | ||
61 | }; | ||
62 | extern enum automapmode_e automapmode; // Mode that the automap is in | ||
63 | |||
64 | // ----------------------------------------------------- | ||
65 | // Game Mode - identify IWAD as shareware, retail etc. | ||
66 | // | ||
67 | extern GameMode_t gamemode; | ||
68 | extern GameMission_t gamemission; | ||
69 | |||
70 | // Set if homebrew PWAD stuff has been added. | ||
71 | extern boolean modifiedgame; | ||
72 | |||
73 | // CPhipps - new compatibility handling | ||
74 | extern complevel_t compatibility_level, default_compatibility_level; | ||
75 | |||
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) | ||
80 | |||
81 | extern int default_translucency; | ||
82 | extern boolean general_translucency; // true if translucency is ok // phares | ||
83 | |||
84 | extern int demo_insurance, default_demo_insurance; // killough 4/5/98 | ||
85 | |||
86 | // ------------------------------------------- | ||
87 | // killough 10/98: compatibility vector | ||
88 | |||
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 | ||
114 | }; | ||
115 | |||
116 | extern int comp[COMP_TOTAL], default_comp[COMP_TOTAL]; | ||
117 | |||
118 | extern boolean nosfxparm; | ||
119 | extern boolean rockblock; | ||
120 | |||
121 | // ------------------------------------------- | ||
122 | // Language. | ||
123 | extern Language_t language; | ||
124 | |||
125 | |||
126 | // ------------------------------------------- | ||
127 | // Selected skill type, map etc. | ||
128 | // | ||
129 | |||
130 | // Defaults for menu, methinks. | ||
131 | extern skill_t startskill; | ||
132 | extern int startepisode; | ||
133 | extern int startmap; | ||
134 | |||
135 | extern boolean autostart; | ||
136 | |||
137 | // Selected by user. | ||
138 | extern skill_t gameskill; | ||
139 | extern int gameepisode; | ||
140 | extern int gamemap; | ||
141 | |||
142 | // Nightmare mode flag, single player. | ||
143 | extern boolean respawnmonsters; | ||
144 | |||
145 | // Netgame? Only true if >1 player. | ||
146 | extern boolean netgame; | ||
147 | |||
148 | // Flag: true only if started as net deathmatch. | ||
149 | // An enum might handle altdeath/cooperative better. | ||
150 | extern boolean deathmatch; | ||
151 | |||
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. | ||
157 | |||
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 | ||
165 | |||
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; | ||
175 | |||
176 | |||
177 | // ------------------------- | ||
178 | // Status flags for refresh. | ||
179 | // | ||
180 | |||
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; | ||
185 | |||
186 | extern boolean automapactive; // In AutoMap mode? | ||
187 | extern boolean menuactive; // Menu overlayed? | ||
188 | extern boolean paused; // Game Pause? | ||
189 | |||
190 | |||
191 | extern boolean viewactive; | ||
192 | |||
193 | extern boolean nodrawers; | ||
194 | extern boolean noblit; | ||
195 | |||
196 | extern int viewwindowx; | ||
197 | extern int viewwindowy; | ||
198 | extern int viewheight; | ||
199 | extern int viewwidth; | ||
200 | extern int scaledviewwidth; | ||
201 | |||
202 | // This one is related to the 3-screen display mode. | ||
203 | // ANG90 = left side, ANG270 = right | ||
204 | extern int viewangleoffset; | ||
205 | |||
206 | // Player taking events, and displaying. | ||
207 | extern int consoleplayer; | ||
208 | extern int displayplayer; | ||
209 | |||
210 | |||
211 | // ------------------------------------- | ||
212 | // Scores, rating. | ||
213 | // Statistics on a given map, for intermission. | ||
214 | // | ||
215 | extern int totalkills, totallive; | ||
216 | extern int totalitems; | ||
217 | extern int totalsecret; | ||
218 | |||
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 | ||
223 | |||
224 | |||
225 | |||
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; | ||
231 | |||
232 | //? | ||
233 | extern boolean demoplayback; | ||
234 | extern boolean demorecording; | ||
235 | |||
236 | // Quit after playing a demo from cmdline. | ||
237 | extern boolean singledemo; | ||
238 | |||
239 | |||
240 | |||
241 | |||
242 | //? | ||
243 | extern gamestate_t gamestate; | ||
244 | |||
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. | ||
250 | |||
251 | extern int gametic; | ||
252 | |||
253 | // Bookkeeping on players - state. | ||
254 | extern player_t players[MAXPLAYERS]; | ||
255 | |||
256 | // Alive? Disconnected? | ||
257 | extern boolean playeringame[MAXPLAYERS]; | ||
258 | |||
259 | |||
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; | ||
266 | |||
267 | // Player spawn spots. | ||
268 | extern mapthing_t playerstarts[MAXPLAYERS]; | ||
269 | |||
270 | // Intermission stats. | ||
271 | // Parameters for world map / intermission. | ||
272 | extern wbstartstruct_t wminfo; | ||
273 | |||
274 | |||
275 | // LUT of ammunition limits for each kind. | ||
276 | // This doubles with BackPack powerup item. | ||
277 | extern int maxammo[NUMAMMO]; | ||
278 | |||
279 | //----------------------------------------- | ||
280 | // Internal parameters, used for engine. | ||
281 | // | ||
282 | |||
283 | // File handling stuff. | ||
284 | extern char basedefault[]; | ||
285 | extern int debugfile; | ||
286 | |||
287 | // if true, load all graphics at level load | ||
288 | extern boolean precache; | ||
289 | |||
290 | |||
291 | // wipegamestate can be set to -1 | ||
292 | // to force a wipe on the next draw | ||
293 | extern gamestate_t wipegamestate; | ||
294 | |||
295 | extern int mouseSensitivity; | ||
296 | //? | ||
297 | // debug flag to cancel adaptiveness | ||
298 | extern boolean singletics; | ||
299 | |||
300 | extern int bodyqueslot; | ||
301 | |||
302 | |||
303 | |||
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; | ||
308 | |||
309 | // Netgame stuff (buffers and pointers, i.e. indices). | ||
310 | extern doomcom_t* doomcom; | ||
311 | extern doomdata_t* netbuffer; // This points inside doomcom. | ||
312 | |||
313 | extern int rndindex; | ||
314 | |||
315 | extern int maketic; | ||
316 | |||
317 | extern ticcmd_t netcmds[][BACKUPTICS]; | ||
318 | |||
319 | extern int ticdup; | ||
320 | |||
321 | extern int nettics[MAXNETNODES]; | ||
322 | |||
323 | //----------------------------------------------------------------------------- | ||
324 | |||
325 | // v1.1-like pitched sounds | ||
326 | extern int pitched_sounds; // killough 2/21/98 | ||
327 | |||
328 | extern int allow_pushers; // MT_PUSH Things // phares 3/10/98 | ||
329 | extern int default_allow_pushers; | ||
330 | |||
331 | extern int variable_friction; // ice & mud // phares 3/10/98 | ||
332 | extern int default_variable_friction; | ||
333 | |||
334 | extern int monsters_remember; // killough 3/1/98 | ||
335 | extern int default_monsters_remember; | ||
336 | |||
337 | extern int weapon_recoil; // weapon recoil // phares | ||
338 | extern int default_weapon_recoil; | ||
339 | |||
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 | ||
342 | |||
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 | ||
347 | |||
348 | /* killough 8/8/98: distance friendly monsters tend to stay from player */ | ||
349 | extern int distfriend, default_distfriend; | ||
350 | |||
351 | /* killough 9/8/98: whether monsters are allowed to strafe or retreat */ | ||
352 | extern int monster_backing, default_monster_backing; | ||
353 | |||
354 | /* killough 9/9/98: whether monsters intelligently avoid hazards */ | ||
355 | extern int monster_avoid_hazards, default_monster_avoid_hazards; | ||
356 | |||
357 | /* killough 10/98: whether monsters are affected by friction */ | ||
358 | extern int monster_friction, default_monster_friction; | ||
359 | |||
360 | /* killough 9/9/98: whether monsters help friends */ | ||
361 | extern int help_friends, default_help_friends; | ||
362 | |||
363 | extern int flashing_hom; // killough 10/98 | ||
364 | |||
365 | extern int doom_weapon_toggles; // killough 10/98 | ||
366 | |||
367 | /* killough 7/19/98: whether monsters should fight against each other */ | ||
368 | extern int monster_infighting, default_monster_infighting; | ||
369 | |||
370 | extern int monkeys, default_monkeys; | ||
371 | |||
372 | |||
373 | #endif | ||