mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-23 20:52:26 +00:00
- do unity data status bar correction only if stbar is in an iwad
This commit is contained in:
parent
d1a6831f06
commit
91a4e6aed4
2 changed files with 15 additions and 1 deletions
|
@ -2967,8 +2967,21 @@ static void FixUnityStatusBar()
|
|||
if (gameinfo.flags & GI_ALWAYSCENTERSBAR)
|
||||
{
|
||||
FGameTexture* sbartex = TexMan.FindGameTexture("stbar", ETextureType::MiscPatch);
|
||||
|
||||
// texture not found, we're not here to operate on a non-existent texture so just exit
|
||||
if (!sbartex)
|
||||
return;
|
||||
|
||||
// where is this texture located? if it's not in an iwad, then exit
|
||||
int lumpnum = sbartex->GetSourceLump();
|
||||
if (lumpnum >= 0 && lumpnum < fileSystem.GetNumEntries())
|
||||
{
|
||||
int wadno = fileSystem.GetFileContainer(lumpnum);
|
||||
if (!(wadno >= fileSystem.GetIwadNum() && wadno <= fileSystem.GetMaxIwadNum()))
|
||||
return;
|
||||
}
|
||||
|
||||
// only adjust offsets if none already exist
|
||||
if (sbartex->GetTexelWidth() > 320 &&
|
||||
!sbartex->GetTexelLeftOffset(0) && !sbartex->GetTexelTopOffset(0))
|
||||
{
|
||||
|
|
|
@ -348,6 +348,7 @@ IWad
|
|||
"E3M1","E3M2","E3M3","E3M4","E3M5","E3M6","E3M7","E3M8","E3M9",
|
||||
"DPHOOF","BFGGA0","HEADA1","CYBRA1","SPIDA1D1", "E4M2",
|
||||
"DMENUPIC"
|
||||
Load = "extras.wad", "soundtrack"
|
||||
BannerColors = "00 7c 00", "a8 a8 a8"
|
||||
IgnoreTitlePatches = 1
|
||||
AlwaysCenterStatusbar = 1
|
||||
|
@ -512,7 +513,7 @@ IWad
|
|||
MustContain = "MAP01", "DMENUPIC"
|
||||
BannerColors = "00 7c 00", "a8 a8 a8"
|
||||
IgnoreTitlePatches = 1
|
||||
Load = "nerveunity.wad"
|
||||
Load = "nerveunity.wad", "extras.wad", "soundtrack"
|
||||
AlwaysCenterStatusbar = 1
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue