forked from ZDoom/gzdoom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoomstat.h
247 lines (172 loc) · 5.49 KB
/
doomstat.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
//-----------------------------------------------------------------------------
//
// Copyright 1993-1996 id Software
// Copyright 1999-2016 Randy Heit
// Copyright 2002-2016 Christoph Oelckers
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see http://www.gnu.org/licenses/
//
//-----------------------------------------------------------------------------
//
// DESCRIPTION:
// All the global variables that store the internal state.
// Theoretically speaking, the internal state of the engine
// should be found by looking at the variables collected
// here, and every relevant module will have to include
// this header file.
// In practice, things are a bit messy.
//
//-----------------------------------------------------------------------------
#ifndef __D_STATE__
#define __D_STATE__
#include "c_cvars.h"
// -----------------------
// Game speed.
//
enum EGameSpeed
{
SPEED_Normal,
SPEED_Fast,
};
extern EGameSpeed GameSpeed;
// ------------------------
// Command line parameters.
//
extern bool devparm; // DEBUG: launched with -devparm
// -----------------------------------------------------
// Game Mode - identify IWAD as shareware, retail etc.
//
// -------------------------------------------
// Selected skill type, map etc.
//
extern FString startmap; // [RH] Actual map name now
extern bool autostart;
// Selected by user.
EXTERN_CVAR (Int, gameskill);
extern int NextSkill; // [RH] Skill to use at next level load
// Netgame? Only true if >1 player.
extern bool netgame;
// Bot game? Like netgame, but doesn't involve network communication.
extern bool multiplayer;
// [SP] Map dm/coop implementation - invokes fake multiplayer without bots
extern bool multiplayernext;
// Flag: true only if started as net deathmatch.
EXTERN_CVAR (Int, deathmatch)
// [RH] Pretend as deathmatch for purposes of dmflags
EXTERN_CVAR (Bool, alwaysapplydmflags)
// [RH] Teamplay mode
EXTERN_CVAR (Bool, teamplay)
// [RH] Friendly fire amount
EXTERN_CVAR (Float, teamdamage)
// [RH] The class the player will spawn as in single player,
// in case using a random class with Hexen.
extern int SinglePlayerClass[/*MAXPLAYERS*/];
// -------------------------
// Internal parameters for sound rendering.
EXTERN_CVAR (Float, snd_mastervolume) // maximum master volume
EXTERN_CVAR (Float, snd_sfxvolume) // maximum volume for sound
EXTERN_CVAR (Float, snd_musicvolume) // maximum volume for music
// -------------------------
// Status flags for refresh.
//
#include "menustate.h"
extern bool automapactive; // In AutoMap mode?
extern bool viewactive;
extern bool nodrawers;
extern bool noblit;
extern int viewwindowx;
extern int viewwindowy;
extern int viewheight;
extern int viewwidth;
// Player taking events. i.e. The local player.
extern int consoleplayer;
// --------------------------------------
// DEMO playback/recording related stuff.
// No demo, there is a human player in charge?
// Disable save/end game?
extern bool usergame;
extern FString newdemoname;
extern FString newdemomap;
extern bool demoplayback;
extern bool demorecording;
extern int demover;
// Quit after playing a demo from cmdline.
extern bool singledemo;
extern int SaveVersion;
//-----------------------------
// Internal parameters, fixed.
// These are set by the engine, and not changed
// according to user inputs. Partly load from
// WAD, partly set at startup time.
extern int gametic;
// Alive? Disconnected?
extern bool playeringame[/*MAXPLAYERS*/];
//-----------------------------------------
// Internal parameters, used for engine.
//
// File handling stuff.
extern FILE* debugfile;
// if true, load all graphics at level load
extern bool precache;
//-------
//REFRESH
//-------
extern bool setsizeneeded;
//?
// debug flag to cancel adaptiveness
extern bool singletics;
// Needed to store the number of the dummy sky flat.
// Used for rendering,
// as well as tracking projectiles etc.
// ---- [RH] ----
EXTERN_CVAR (Int, developer)
extern bool ToggleFullscreen;
extern int Net_Arbitrator;
EXTERN_CVAR (Bool, var_friction)
// [RH] Miscellaneous info for DeHackEd support
struct DehInfo
{
int StartHealth;
int StartBullets;
int MaxHealth;
int MaxArmor;
int GreenAC;
int BlueAC;
int MaxSoulsphere;
int SoulsphereHealth;
int MegasphereHealth;
int GodHealth;
int FAArmor;
int FAAC;
int KFAArmor;
int KFAAC;
char PlayerSprite[5];
uint8_t ExplosionStyle;
double ExplosionAlpha;
int NoAutofreeze;
int BFGCells;
};
extern DehInfo deh;
EXTERN_CVAR (Int, infighting)
// [RH] Deathmatch flags
EXTERN_CVAR (Int, dmflags);
EXTERN_CVAR (Int, dmflags2); // [BC]
EXTERN_CVAR (Int, dmflags3); // [Nash]
EXTERN_CVAR (Int, compatflags);
EXTERN_CVAR (Int, compatflags2);
// Filters from AddAutoloadFiles(). Used to filter files from archives.
extern FString LumpFilterIWAD;
// These control whether certain items use generic text output instead of game-specific one.
extern bool generic_ui;
#endif