- moved gamestate_t to g_game.h.

This made reviewing the code for accessing the global state hard, because the doomdef.h contains mainly constants, this particular item was the only thing in there that represents actual engine state.
This commit is contained in:
Christoph Oelckers 2019-01-31 00:28:43 +01:00
parent c18a0e7736
commit fa3312e2a9
20 changed files with 45 additions and 35 deletions

View File

@ -46,6 +46,7 @@
#include "sbar.h"
#include "d_player.h"
#include "p_blockmap.h"
#include "g_game.h"
#include "m_cheat.h"
#include "c_dispatch.h"

View File

@ -40,7 +40,7 @@
#include "c_cvars.h"
#include "c_dispatch.h"
#include "b_bot.h"
#include "doomstat.h"
#include "g_game.h"
#include "p_local.h"
#include "cmdlib.h"
#include "teaminfo.h"

View File

@ -40,7 +40,7 @@
#include "c_console.h"
#include "c_dispatch.h"
#include "doomstat.h"
#include "g_game.h"
#include "d_player.h"
#include "d_netinf.h"

View File

@ -45,7 +45,7 @@
#include "c_console.h"
#include "c_dispatch.h"
#include "m_argv.h"
#include "doomstat.h"
#include "g_game.h"
#include "d_player.h"
#include "configfile.h"
#include "v_text.h"

View File

@ -27,7 +27,7 @@
#include "m_swap.h"
#include "hu_stuff.h"
#include "s_sound.h"
#include "doomstat.h"
#include "g_game.h"
#include "st_stuff.h"
#include "c_console.h"
#include "c_dispatch.h"

View File

@ -71,33 +71,6 @@ enum
};
// The current state of the game: whether we are
// playing, gazing at the intermission screen,
// the game final animation, or a demo.
enum gamestate_t : int
{
GS_LEVEL,
GS_INTERMISSION,
GS_FINALE,
GS_DEMOSCREEN,
GS_FULLCONSOLE, // [RH] Fullscreen console
GS_HIDECONSOLE, // [RH] The menu just did something that should hide fs console
GS_STARTUP, // [RH] Console is fullscreen, and game is just starting
GS_TITLELEVEL, // [RH] A combination of GS_LEVEL and GS_DEMOSCREEN
GS_FORCEWIPE = -1,
GS_FORCEWIPEFADE = -2,
GS_FORCEWIPEBURN = -3,
GS_FORCEWIPEMELT = -4
};
extern gamestate_t gamestate;
// wipegamestate can be set to -1
// to force a wipe on the next draw
extern gamestate_t wipegamestate;
typedef float skill_t;
/*

View File

@ -39,6 +39,7 @@
#include "actor.h"
#include "c_dispatch.h"
#include "d_net.h"
#include "g_game.h"
#include "info.h"
DStaticEventHandler* E_FirstEventHandler = nullptr;

View File

@ -32,6 +32,33 @@ struct event_t;
#include "dobjgc.h"
// The current state of the game: whether we are
// playing, gazing at the intermission screen,
// the game final animation, or a demo.
enum gamestate_t : int
{
GS_LEVEL,
GS_INTERMISSION,
GS_FINALE,
GS_DEMOSCREEN,
GS_FULLCONSOLE, // [RH] Fullscreen console
GS_HIDECONSOLE, // [RH] The menu just did something that should hide fs console
GS_STARTUP, // [RH] Console is fullscreen, and game is just starting
GS_TITLELEVEL, // [RH] A combination of GS_LEVEL and GS_DEMOSCREEN
GS_FORCEWIPE = -1,
GS_FORCEWIPEFADE = -2,
GS_FORCEWIPEBURN = -3,
GS_FORCEWIPEMELT = -4
};
extern gamestate_t gamestate;
// wipegamestate can be set to -1
// to force a wipe on the next draw
extern gamestate_t wipegamestate;
class AActor;
struct FLevelLocals;

View File

@ -56,6 +56,7 @@
#include "p_acs.h"
#include "sbarinfo.h"
#include "events.h"
#include "g_game.h"
#include "../version.h"

View File

@ -49,6 +49,7 @@
#include "d_net.h"
#include "c_dispatch.h"
#include "g_levellocals.h"
#include "g_game.h"
#include "sbar.h"
// MACROS ------------------------------------------------------------------

View File

@ -33,7 +33,7 @@
*/
#include "doomtype.h"
#include "doomstat.h"
#include "g_game.h"
#include "d_event.h"
#include "w_wad.h"
#include "gi.h"

View File

@ -7,6 +7,7 @@
#include "textures/textures.h"
#include "s_sound.h"
#include "v_font.h"
#include "g_game.h"
struct event_t;

View File

@ -37,7 +37,7 @@
#include "intermission/intermission.h"
#include "g_level.h"
#include "w_wad.h"
static void ReplaceIntermission(FName intname,FIntermissionDescriptor *desc)
{

View File

@ -48,6 +48,7 @@
#include "g_levellocals.h"
#include "vm.h"
#include "actorinlines.h"
#include "g_game.h"
CVAR (Int, cl_rockettrails, 1, CVAR_ARCHIVE);
CVAR (Bool, r_rail_smartspiral, 0, CVAR_ARCHIVE);

View File

@ -37,6 +37,7 @@
#include "g_levellocals.h"
#include "events.h"
#include "actorinlines.h"
#include "g_game.h"
extern gamestate_t wipegamestate;
extern uint8_t globalfreeze, globalchangefreeze;

View File

@ -89,6 +89,7 @@
#include "actorinlines.h"
#include "p_acs.h"
#include "events.h"
#include "g_game.h"
static FRandom pr_skullpop ("SkullPop");

View File

@ -62,6 +62,7 @@
#include "vm.h"
#include "i_time.h"
#include "actorinlines.h"
#include "g_game.h"
// EXTERNAL DATA DECLARATIONS ----------------------------------------------

View File

@ -82,6 +82,7 @@
#include "d_player.h"
#include "g_levellocals.h"
#include "vm.h"
#include "g_game.h"
// MACROS ------------------------------------------------------------------

View File

@ -67,7 +67,7 @@
#include "i_input.h"
#include "w_wad.h"
#include "cmdlib.h"
#include "doomstat.h"
#include "g_game.h"
#include "r_utility.h"
#include "g_levellocals.h"
#include "s_sound.h"

View File

@ -42,7 +42,7 @@
#include "i_input.h"
#include "d_event.h"
#include "d_gui.h"
#include "doomstat.h"
#include "g_game.h"
#include "hardware.h"
#include "rawinput.h"
#include "menu/menu.h"