- add support for the (as of now) newest version of the Unity re-releases

This commit is contained in:
Rachael Alexanderson 2020-09-03 23:36:19 -04:00
parent e740e00e07
commit 0204051381
6 changed files with 30 additions and 2 deletions

View file

@ -184,6 +184,13 @@ void FIWadManager::ParseIWadInfo(const char *fn, const char *data, int datasize,
if (sc.Number) iwad->flags |= GI_IGNORETITLEPATCHES;
else iwad->flags &= ~GI_IGNORETITLEPATCHES;
}
else if (sc.Compare("AlwaysCenterStatusBar"))
{
sc.MustGetStringName("=");
sc.MustGetNumber();
if (sc.Number) iwad->flags |= GI_ALWAYSCENTERSBAR;
else iwad->flags &= ~GI_ALWAYSCENTERSBAR;
}
else if (sc.Compare("Load"))
{
sc.MustGetStringName("=");

View file

@ -2962,6 +2962,18 @@ static void CheckForHacks(BuildInfo& buildinfo)
}
}
static void FixUnityStatusBar()
{
if (gameinfo.flags & GI_ALWAYSCENTERSBAR)
{
FGameTexture* sbartex = TexMan.FindGameTexture("stbar", ETextureType::MiscPatch);
if (!sbartex)
return;
sbartex->SetOffsets(0, (sbartex->GetTexelWidth() - 320) / 2, 0);
sbartex->SetOffsets(1, (sbartex->GetTexelWidth() - 320) / 2, 0);
}
}
//==========================================================================
//
//
@ -3352,6 +3364,8 @@ static int D_DoomMain_Internal (void)
TexAnim.Init();
C_InitConback();
FixUnityStatusBar();
StartScreen->Progress();
V_InitFonts();
V_LoadTranslations();

View file

@ -50,6 +50,7 @@ enum
GI_COMPATPOLY1 = 0x00000040, // Hexen's MAP36 needs old polyobject drawing
GI_COMPATPOLY2 = 0x00000080, // so does HEXDD's MAP47
GI_IGNORETITLEPATCHES = 0x00000200, // Ignore the map name graphics when not runnning in English language
GI_ALWAYSCENTERSBAR = 0x00000400, // Always center the status bar
};
#include "gametype.h"

View file

@ -199,7 +199,9 @@ TArray<FString> I_GetSteamPath()
"hexen deathkings of the dark citadel/base",
"ultimate doom/base",
"DOOM 3 BFG Edition/base/wads",
"Strife"
"Strife",
"Ultimate Doom/rerelease/DOOM_Data/StreamingAssets",
"Doom 2/rerelease/DOOM II_Data/StreamingAssets"
};
FString path;

View file

@ -3,7 +3,7 @@ include "mapinfo/doom2.txt"
gameinfo
{
titlepage = "DMENUPIC"
}
clearepisodes

View file

@ -350,6 +350,7 @@ IWad
"DMENUPIC"
BannerColors = "00 7c 00", "a8 a8 a8"
IgnoreTitlePatches = 1
AlwaysCenterStatusbar = 1
}
IWad
@ -438,6 +439,7 @@ IWad
MustContain = "MAP01", "REDTNT2", "DMAPINFO"
BannerColors = "00 7c 00", "a8 a8 a8"
IgnoreTitlePatches = 1
AlwaysCenterStatusbar = 1
}
IWad
@ -466,6 +468,7 @@ IWad
MustContain = "MAP01", "CAMO1", "DMAPINFO"
BannerColors = "00 7c 00", "a8 a8 a8"
IgnoreTitlePatches = 1
AlwaysCenterStatusbar = 1
}
IWad
@ -510,6 +513,7 @@ IWad
BannerColors = "00 7c 00", "a8 a8 a8"
IgnoreTitlePatches = 1
Load = "nerveunity.wad"
AlwaysCenterStatusbar = 1
}
IWad