mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- c_dispatch header cleanup and splitting of gamestate into a separate header, to avoid polluting low level code with game specific headers.
This commit is contained in:
parent
b7ff7302e5
commit
31fbff85f4
7 changed files with 39 additions and 38 deletions
|
@ -39,6 +39,12 @@ extern "C" int myvsnprintf(char* buffer, size_t count, const char* format, va_li
|
|||
#define TEXTCOLOR_SAPPHIRE "\034Y"
|
||||
#define TEXTCOLOR_TEAL "\034Z"
|
||||
|
||||
#define TEXTCOLOR_NORMAL "\034-"
|
||||
#define TEXTCOLOR_BOLD "\034+"
|
||||
|
||||
#define TEXTCOLOR_CHAT "\034*"
|
||||
#define TEXTCOLOR_TEAMCHAT "\034!"
|
||||
|
||||
// game print flags
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -40,22 +40,20 @@
|
|||
#include <ctype.h>
|
||||
|
||||
#include "templates.h"
|
||||
#include "doomtype.h"
|
||||
#include "cmdlib.h"
|
||||
#include "c_console.h"
|
||||
#include "c_dispatch.h"
|
||||
#include "m_argv.h"
|
||||
#include "g_game.h"
|
||||
#include "d_player.h"
|
||||
#include "gamestate.h"
|
||||
#include "configfile.h"
|
||||
#include "v_text.h"
|
||||
#include "printf.h"
|
||||
#include "c_cvars.h"
|
||||
#include "c_buttons.h"
|
||||
|
||||
// Todo: Get rid of
|
||||
#include "d_net.h"
|
||||
#include "d_main.h"
|
||||
#include "serializer.h"
|
||||
#include "menu/menu.h"
|
||||
#include "vm.h"
|
||||
#include "g_levellocals.h"
|
||||
#include "c_buttons.h"
|
||||
|
||||
|
||||
// MACROS ------------------------------------------------------------------
|
||||
|
||||
|
@ -1089,7 +1087,7 @@ bool C_ExecFile (const char *file)
|
|||
exec->ExecCommands();
|
||||
if (exec->Pullins.Size() > 0)
|
||||
{
|
||||
Printf(TEXTCOLOR_BOLD "Notice: Pullin files were ignored.\n");
|
||||
Printf(TEXTCOLOR_RED "Notice: Pullin files were ignored.\n");
|
||||
}
|
||||
delete exec;
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ struct FExecList
|
|||
};
|
||||
|
||||
extern bool ParsingKeyConf, UnsafeExecutionContext;
|
||||
extern FString StoredWarp; // [RH] +warp at the command line
|
||||
|
||||
|
||||
extern bool CheckCheatmode (bool printmsg = true);
|
||||
|
|
|
@ -64,8 +64,6 @@ extern FString startmap; // [RH] Actual map name now
|
|||
|
||||
extern bool autostart;
|
||||
|
||||
extern FString StoredWarp; // [RH] +warp at the command line
|
||||
|
||||
// Selected by user.
|
||||
EXTERN_CVAR (Int, gameskill);
|
||||
extern int NextSkill; // [RH] Skill to use at next level load
|
||||
|
|
22
src/g_game.h
22
src/g_game.h
|
@ -32,28 +32,8 @@ struct event_t;
|
|||
|
||||
#include "dobjgc.h"
|
||||
#include "name.h"
|
||||
#include "gamestate.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
|
||||
|
|
|
@ -46,11 +46,6 @@ struct FBrokenLines
|
|||
#define TEXTCOLOR_ESCAPE '\034'
|
||||
#define TEXTCOLOR_ESCAPESTR "\034"
|
||||
|
||||
#define TEXTCOLOR_NORMAL "\034-"
|
||||
#define TEXTCOLOR_BOLD "\034+"
|
||||
|
||||
#define TEXTCOLOR_CHAT "\034*"
|
||||
#define TEXTCOLOR_TEAMCHAT "\034!"
|
||||
|
||||
TArray<FBrokenLines> V_BreakLines (FFont *font, int maxwidth, const uint8_t *str, bool preservecolor = false);
|
||||
inline TArray<FBrokenLines> V_BreakLines (FFont *font, int maxwidth, const char *str, bool preservecolor = false)
|
||||
|
|
23
src/gamestate.h
Normal file
23
src/gamestate.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#pragma once
|
||||
|
||||
// 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;
|
Loading…
Reference in a new issue