- SetupMenuColors restored.

This commit is contained in:
Christoph Oelckers 2020-10-04 22:21:11 +02:00
parent 6a4b72cfef
commit 16431e9f0a
4 changed files with 39 additions and 10 deletions

View file

@ -49,6 +49,7 @@
#include <zmusic.h> #include <zmusic.h>
#include "texturemanager.h" #include "texturemanager.h"
#include "printf.h" #include "printf.h"
#include "i_interface.h"
bool CheckSkipGameOptionBlock(FScanner& sc); bool CheckSkipGameOptionBlock(FScanner& sc);
@ -189,7 +190,7 @@ static bool CheckSkipGameBlock(FScanner &sc, bool yes = true)
do do
{ {
sc.MustGetString(); sc.MustGetString();
filter |= CheckGame(sc.String, false); if (sysCallbacks.CheckGame) filter |= sysCallbacks.CheckGame(sc.String);
} }
while (sc.CheckString(",")); while (sc.CheckString(","));
sc.MustGetStringName(")"); sc.MustGetStringName(")");

View file

@ -867,6 +867,7 @@ int RunGame()
SetupGameButtons(); SetupGameButtons();
gi->app_init(); gi->app_init();
SetDefaultMenuColors();
M_Init(); M_Init();
if (!(paletteloaded & PALETTE_MAIN)) if (!(paletteloaded & PALETTE_MAIN))
I_FatalError("No palette found."); I_FatalError("No palette found.");

View file

@ -55,6 +55,7 @@
#include "st_start.h" #include "st_start.h"
#include "i_system.h" #include "i_system.h"
#include "gameconfigfile.h" #include "gameconfigfile.h"
#include "gamecontrol.h"
EXTERN_CVAR(Int, cl_gfxlocalization) EXTERN_CVAR(Int, cl_gfxlocalization)
EXTERN_CVAR(Bool, m_quickexit) EXTERN_CVAR(Bool, m_quickexit)
@ -1107,15 +1108,40 @@ bool CheckSkipGameOptionBlock(FScanner &sc)
else if (sc.Compare("Swapmenu")) filter |= gameinfo.swapmenu; else if (sc.Compare("Swapmenu")) filter |= gameinfo.swapmenu;
return filter; return filter;
} }
#endif
void SetDefaultMenuColors() void SetDefaultMenuColors()
{ {
OptionSettings.mTitleColor = V_FindFontColor(gameinfo.mTitleColor); //OptionSettings.mTitleColor = CR_RED;// V_FindFontColor(gameinfo.mTitleColor);
OptionSettings.mFontColor = V_FindFontColor(gameinfo.mFontColor); OptionSettings.mFontColor = CR_RED;
OptionSettings.mFontColorValue = V_FindFontColor(gameinfo.mFontColorValue); OptionSettings.mFontColorValue = CR_GRAY;
OptionSettings.mFontColorMore = V_FindFontColor(gameinfo.mFontColorMore); OptionSettings.mFontColorMore = CR_GRAY;
OptionSettings.mFontColorHeader = V_FindFontColor(gameinfo.mFontColorHeader); OptionSettings.mFontColorHeader = CR_GOLD;
OptionSettings.mFontColorHighlight = V_FindFontColor(gameinfo.mFontColorHighlight); OptionSettings.mFontColorHighlight = CR_YELLOW;
OptionSettings.mFontColorSelection = V_FindFontColor(gameinfo.mFontColorSelection); OptionSettings.mFontColorSelection = CR_BRICK;
if (g_gameType & (GAMEFLAG_NAM | GAMEFLAG_NAPALM | GAMEFLAG_WW2GI))
{
OptionSettings.mFontColor = CR_DARKGREEN;
OptionSettings.mFontColorHeader = CR_DARKGRAY;
OptionSettings.mFontColorHighlight = CR_WHITE;
OptionSettings.mFontColorSelection = CR_DARKGREEN;
}
else if (g_gameType & GAMEFLAG_BLOOD)
{
OptionSettings.mFontColorHeader = CR_DARKGRAY;
OptionSettings.mFontColorHighlight = CR_WHITE;
OptionSettings.mFontColorSelection = CR_DARKRED;
}
else if (g_gameType & GAMEFLAG_RRALL)
{
OptionSettings.mFontColor = CR_BROWN;
OptionSettings.mFontColorHeader = CR_DARKBROWN;
OptionSettings.mFontColorHighlight = CR_ORANGE;
OptionSettings.mFontColorSelection = CR_TAN;
}
else if (g_gameType & GAMEFLAG_SW)
{
OptionSettings.mFontColorHeader = CR_DARKRED;
OptionSettings.mFontColorHighlight = CR_WHITE;
}
} }
#endif

View file

@ -10,6 +10,7 @@ extern FNewGameStartup NewGameStartupInfo;
void M_StartupEpisodeMenu(FNewGameStartup *gs); void M_StartupEpisodeMenu(FNewGameStartup *gs);
void M_StartupSkillMenu(FNewGameStartup *gs); void M_StartupSkillMenu(FNewGameStartup *gs);
void M_CreateGameMenus(); void M_CreateGameMenus();
void SetDefaultMenuColors();
// The savegame manager contains too much code that is game specific. Parts are shareable but need more work first. // The savegame manager contains too much code that is game specific. Parts are shareable but need more work first.