diff --git a/src/am_map.cpp b/src/am_map.cpp index 54e7698834..4a5520a9e5 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -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" diff --git a/src/b_bot.cpp b/src/b_bot.cpp index 39067dfa9e..54e8991c43 100644 --- a/src/b_bot.cpp +++ b/src/b_bot.cpp @@ -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" diff --git a/src/c_cvars.cpp b/src/c_cvars.cpp index 0345a7bd1b..667e811a02 100644 --- a/src/c_cvars.cpp +++ b/src/c_cvars.cpp @@ -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" diff --git a/src/c_dispatch.cpp b/src/c_dispatch.cpp index feccd2d8ba..127f5f2f65 100644 --- a/src/c_dispatch.cpp +++ b/src/c_dispatch.cpp @@ -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" diff --git a/src/ct_chat.cpp b/src/ct_chat.cpp index ec3c4f4e21..5a8878eb24 100644 --- a/src/ct_chat.cpp +++ b/src/ct_chat.cpp @@ -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" diff --git a/src/doomdef.h b/src/doomdef.h index b324fa90f9..a8f0250d55 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -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; /* diff --git a/src/events.cpp b/src/events.cpp index e85706a85f..74afb1b672 100755 --- a/src/events.cpp +++ b/src/events.cpp @@ -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; diff --git a/src/g_game.h b/src/g_game.h index 96ca6d8e2f..a21c80cc65 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -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; diff --git a/src/g_statusbar/shared_sbar.cpp b/src/g_statusbar/shared_sbar.cpp index 6a17fda2f7..2c012c81d4 100644 --- a/src/g_statusbar/shared_sbar.cpp +++ b/src/g_statusbar/shared_sbar.cpp @@ -56,6 +56,7 @@ #include "p_acs.h" #include "sbarinfo.h" #include "events.h" +#include "g_game.h" #include "../version.h" diff --git a/src/hu_scores.cpp b/src/hu_scores.cpp index ceddaca238..2906218847 100644 --- a/src/hu_scores.cpp +++ b/src/hu_scores.cpp @@ -49,6 +49,7 @@ #include "d_net.h" #include "c_dispatch.h" #include "g_levellocals.h" +#include "g_game.h" #include "sbar.h" // MACROS ------------------------------------------------------------------ diff --git a/src/intermission/intermission.cpp b/src/intermission/intermission.cpp index 2c014c78b2..2d395a48e4 100644 --- a/src/intermission/intermission.cpp +++ b/src/intermission/intermission.cpp @@ -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" diff --git a/src/intermission/intermission.h b/src/intermission/intermission.h index f159ebb7ab..435b38ed6c 100644 --- a/src/intermission/intermission.h +++ b/src/intermission/intermission.h @@ -7,6 +7,7 @@ #include "textures/textures.h" #include "s_sound.h" #include "v_font.h" +#include "g_game.h" struct event_t; diff --git a/src/intermission/intermission_parse.cpp b/src/intermission/intermission_parse.cpp index c0fa4a337a..50fd050a2d 100644 --- a/src/intermission/intermission_parse.cpp +++ b/src/intermission/intermission_parse.cpp @@ -37,7 +37,7 @@ #include "intermission/intermission.h" #include "g_level.h" #include "w_wad.h" - + static void ReplaceIntermission(FName intname,FIntermissionDescriptor *desc) { diff --git a/src/p_effect.cpp b/src/p_effect.cpp index ce93fcdead..689191e5b0 100644 --- a/src/p_effect.cpp +++ b/src/p_effect.cpp @@ -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); diff --git a/src/p_tick.cpp b/src/p_tick.cpp index 6b7b42b1cb..8d1b7481d3 100644 --- a/src/p_tick.cpp +++ b/src/p_tick.cpp @@ -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; diff --git a/src/p_user.cpp b/src/p_user.cpp index d4e20a79fb..4fb9a0f6d3 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -89,6 +89,7 @@ #include "actorinlines.h" #include "p_acs.h" #include "events.h" +#include "g_game.h" static FRandom pr_skullpop ("SkullPop"); diff --git a/src/r_utility.cpp b/src/r_utility.cpp index e44ca7c4c1..ebe1e9ef47 100644 --- a/src/r_utility.cpp +++ b/src/r_utility.cpp @@ -62,6 +62,7 @@ #include "vm.h" #include "i_time.h" #include "actorinlines.h" +#include "g_game.h" // EXTERNAL DATA DECLARATIONS ---------------------------------------------- diff --git a/src/s_sound.cpp b/src/s_sound.cpp index fd609cabe5..7bcff4d675 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -82,6 +82,7 @@ #include "d_player.h" #include "g_levellocals.h" #include "vm.h" +#include "g_game.h" // MACROS ------------------------------------------------------------------ diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index 878ba29a16..40115490c8 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -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" diff --git a/src/win32/i_mouse.cpp b/src/win32/i_mouse.cpp index 00103d7462..749940824f 100644 --- a/src/win32/i_mouse.cpp +++ b/src/win32/i_mouse.cpp @@ -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"