summaryrefslogtreecommitdiff
path: root/apps/plugins/doom/doomstat.h
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-03-28 15:44:01 +0000
committerDave Chapman <dave@dchapman.com>2006-03-28 15:44:01 +0000
commit47f4a458d636a889e955e68f896708f1276febc0 (patch)
tree99f770c02ef606f0abbdcd332ac39e69830d8007 /apps/plugins/doom/doomstat.h
parentfff7d6157d56f233cad5c2003475e47a5ff809a7 (diff)
downloadrockbox-47f4a458d636a889e955e68f896708f1276febc0.tar.gz
rockbox-47f4a458d636a889e955e68f896708f1276febc0.zip
Patch #2969 - Doom! Currently only working on the H300.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9312 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/doom/doomstat.h')
-rw-r--r--apps/plugins/doom/doomstat.h373
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//
49extern boolean nomonsters; // checkparm of -nomonsters
50extern boolean respawnparm; // checkparm of -respawn
51extern boolean fastparm; // checkparm of -fast
52
53extern boolean devparm; // DEBUG: launched with -devparm
54
55enum 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};
62extern enum automapmode_e automapmode; // Mode that the automap is in
63
64// -----------------------------------------------------
65// Game Mode - identify IWAD as shareware, retail etc.
66//
67extern GameMode_t gamemode;
68extern GameMission_t gamemission;
69
70// Set if homebrew PWAD stuff has been added.
71extern boolean modifiedgame;
72
73// CPhipps - new compatibility handling
74extern 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
81extern int default_translucency;
82extern boolean general_translucency; // true if translucency is ok // phares
83
84extern int demo_insurance, default_demo_insurance; // killough 4/5/98
85
86// -------------------------------------------
87// killough 10/98: compatibility vector
88
89enum {
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
116extern int comp[COMP_TOTAL], default_comp[COMP_TOTAL];
117
118extern boolean nosfxparm;
119extern boolean rockblock;
120
121// -------------------------------------------
122// Language.
123extern Language_t language;
124
125
126// -------------------------------------------
127// Selected skill type, map etc.
128//
129
130// Defaults for menu, methinks.
131extern skill_t startskill;
132extern int startepisode;
133extern int startmap;
134
135extern boolean autostart;
136
137// Selected by user.
138extern skill_t gameskill;
139extern int gameepisode;
140extern int gamemap;
141
142// Nightmare mode flag, single player.
143extern boolean respawnmonsters;
144
145// Netgame? Only true if >1 player.
146extern boolean netgame;
147
148// Flag: true only if started as net deathmatch.
149// An enum might handle altdeath/cooperative better.
150extern 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.
163extern int snd_SfxVolume; // maximum volume for sound
164extern 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
170extern int snd_MusicDevice;
171extern int snd_SfxDevice;
172// Config file? Same disclaimer as above.
173extern int snd_DesiredMusicDevice;
174extern 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.
184extern boolean statusbaractive;
185
186extern boolean automapactive; // In AutoMap mode?
187extern boolean menuactive; // Menu overlayed?
188extern boolean paused; // Game Pause?
189
190
191extern boolean viewactive;
192
193extern boolean nodrawers;
194extern boolean noblit;
195
196extern int viewwindowx;
197extern int viewwindowy;
198extern int viewheight;
199extern int viewwidth;
200extern int scaledviewwidth;
201
202// This one is related to the 3-screen display mode.
203// ANG90 = left side, ANG270 = right
204extern int viewangleoffset;
205
206// Player taking events, and displaying.
207extern int consoleplayer;
208extern int displayplayer;
209
210
211// -------------------------------------
212// Scores, rating.
213// Statistics on a given map, for intermission.
214//
215extern int totalkills, totallive;
216extern int totalitems;
217extern int totalsecret;
218
219// Timer, for scores.
220extern int levelstarttic; // gametic at level start
221extern int basetic; /* killough 9/29/98: levelstarttic, adjusted */
222extern 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?
230extern boolean usergame;
231
232//?
233extern boolean demoplayback;
234extern boolean demorecording;
235
236// Quit after playing a demo from cmdline.
237extern boolean singledemo;
238
239
240
241
242//?
243extern 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
251extern int gametic;
252
253// Bookkeeping on players - state.
254extern player_t players[MAXPLAYERS];
255
256// Alive? Disconnected?
257extern 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];
263extern mapthing_t *deathmatchstarts; // killough
264extern size_t num_deathmatchstarts; // killough
265extern mapthing_t* deathmatch_p;
266
267// Player spawn spots.
268extern mapthing_t playerstarts[MAXPLAYERS];
269
270// Intermission stats.
271// Parameters for world map / intermission.
272extern wbstartstruct_t wminfo;
273
274
275// LUT of ammunition limits for each kind.
276// This doubles with BackPack powerup item.
277extern int maxammo[NUMAMMO];
278
279//-----------------------------------------
280// Internal parameters, used for engine.
281//
282
283// File handling stuff.
284extern char basedefault[];
285extern int debugfile;
286
287// if true, load all graphics at level load
288extern boolean precache;
289
290
291// wipegamestate can be set to -1
292// to force a wipe on the next draw
293extern gamestate_t wipegamestate;
294
295extern int mouseSensitivity;
296//?
297// debug flag to cancel adaptiveness
298extern boolean singletics;
299
300extern 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.
307extern int skyflatnum;
308
309// Netgame stuff (buffers and pointers, i.e. indices).
310extern doomcom_t* doomcom;
311extern doomdata_t* netbuffer; // This points inside doomcom.
312
313extern int rndindex;
314
315extern int maketic;
316
317extern ticcmd_t netcmds[][BACKUPTICS];
318
319extern int ticdup;
320
321extern int nettics[MAXNETNODES];
322
323//-----------------------------------------------------------------------------
324
325// v1.1-like pitched sounds
326extern int pitched_sounds; // killough 2/21/98
327
328extern int allow_pushers; // MT_PUSH Things // phares 3/10/98
329extern int default_allow_pushers;
330
331extern int variable_friction; // ice & mud // phares 3/10/98
332extern int default_variable_friction;
333
334extern int monsters_remember; // killough 3/1/98
335extern int default_monsters_remember;
336
337extern int weapon_recoil; // weapon recoil // phares
338extern int default_weapon_recoil;
339
340extern int player_bobbing; // whether player bobs or not // phares 2/25/98
341extern int default_player_bobbing; // killough 3/1/98: make local to each game
342
343#ifdef DOGS
344extern int dogs, default_dogs; // killough 7/19/98: Marine's best friend :)
345extern 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 */
349extern int distfriend, default_distfriend;
350
351/* killough 9/8/98: whether monsters are allowed to strafe or retreat */
352extern int monster_backing, default_monster_backing;
353
354/* killough 9/9/98: whether monsters intelligently avoid hazards */
355extern int monster_avoid_hazards, default_monster_avoid_hazards;
356
357/* killough 10/98: whether monsters are affected by friction */
358extern int monster_friction, default_monster_friction;
359
360/* killough 9/9/98: whether monsters help friends */
361extern int help_friends, default_help_friends;
362
363extern int flashing_hom; // killough 10/98
364
365extern int doom_weapon_toggles; // killough 10/98
366
367/* killough 7/19/98: whether monsters should fight against each other */
368extern int monster_infighting, default_monster_infighting;
369
370extern int monkeys, default_monkeys;
371
372
373#endif