- gamecontrol.h: Define GAMEFLAG_WHALL as bitwise or of GAMEFLAG_WH and GAMEFLAG_WH2.

This commit is contained in:
Mitchell Richters 2020-11-08 21:59:46 +11:00
parent 7881dc9907
commit f7e30acf85
5 changed files with 6 additions and 5 deletions

View file

@ -116,11 +116,11 @@ void FNotifyBuffer::DrawNative()
FFont* font = g_gameType & GAMEFLAG_BLOOD ? SmallFont2 : SmallFont;
int line = (g_gameType & GAMEFLAG_BLOOD)? Top : (g_gameType & GAMEFLAG_SW) ? 40 : (g_gameType & (GAMEFLAG_WH | GAMEFLAG_WH2))? 18 : font->GetDisplacement();
int line = (g_gameType & GAMEFLAG_BLOOD)? Top : (g_gameType & GAMEFLAG_SW) ? 40 : (g_gameType & GAMEFLAG_WHALL)? 18 : font->GetDisplacement();
bool canskip = (g_gameType & GAMEFLAG_BLOOD);
double scale = 1 / (NotifyFontScale * con_notifyscale);
int lineadv = font->GetHeight() / NotifyFontScale;
int textleft = (g_gameType & (GAMEFLAG_WH | GAMEFLAG_WH2)) ? 18 : 0;
int textleft = (g_gameType & GAMEFLAG_WHALL) ? 18 : 0;
for (unsigned i = topline; i < Text.Size(); ++i)
{

View file

@ -489,7 +489,7 @@ void CheckFrontend(int flags)
{
gi = Exhumed::CreateInterface();
}
else if (flags & (GAMEFLAG_WH| GAMEFLAG_WH2))
else if (flags & GAMEFLAG_WHALL)
{
gi = Witchaven::CreateInterface();
}

View file

@ -124,6 +124,7 @@ enum
GAMEFLAG_DUKEDC = 0x00010000,
GAMEFLAG_WH = 0x00020000,
GAMEFLAG_WH2 = 0x00040000,
GAMEFLAG_WHALL = GAMEFLAG_WH | GAMEFLAG_WH2,
GAMEFLAGMASK = 0x0000FFFF, // flags allowed from grpinfo
// We still need these for the parsers.

View file

@ -589,7 +589,7 @@ void SetDefaultMenuColors()
gameinfo.mSliderColor = "Yellow";
cls = PClass::FindClass("ExhumedMenuDelegate");
}
else if (g_gameType & (GAMEFLAG_WH | GAMEFLAG_WH2))
else if (g_gameType & GAMEFLAG_WHALL)
{
OptionSettings.mFontColorHeader = CR_DARKGREEN;
OptionSettings.mFontColorHighlight = CR_GRAY;

View file

@ -562,7 +562,7 @@ static TArray<GrpInfo> ParseGrpInfo(const char *fn, FileReader &fr, TMap<FString
else sc.ScriptError(nullptr);
}
if (grp.dependencyCRC == 0 && (grp.flags & (GAMEFLAG_DUKE | GAMEFLAG_NAM | GAMEFLAG_NAPALM | GAMEFLAG_WW2GI | GAMEFLAG_RRALL |
GAMEFLAG_BLOOD | GAMEFLAG_SW | GAMEFLAG_PSEXHUMED | GAMEFLAG_WH | GAMEFLAG_WH2)) == 0)
GAMEFLAG_BLOOD | GAMEFLAG_SW | GAMEFLAG_PSEXHUMED | GAMEFLAG_WHALL)) == 0)
{
sc.ScriptMessage("Warning: GRP without game defined. Ignoring");
groups.Pop();