mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-23 20:01:20 +00:00
- do unity data status bar correction only if stbar is in an iwad
# Conflicts: # src/d_main.cpp # wadsrc_extra/static/iwadinfo.txt
This commit is contained in:
parent
258d9dde25
commit
904926e778
2 changed files with 26 additions and 3 deletions
|
@ -2402,6 +2402,29 @@ static void NewFailure ()
|
|||
I_FatalError ("Failed to allocate memory from system heap");
|
||||
}
|
||||
|
||||
static void FixUnityStatusBar()
|
||||
{
|
||||
if (gameinfo.flags & GI_ALWAYSCENTERSBAR)
|
||||
{
|
||||
FTexture* sbartex = TexMan.FindTexture("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 < Wads.GetNumLumps())
|
||||
{
|
||||
int wadno = Wads.GetLumpFile(lumpnum);
|
||||
if (wadno != Wads.GetIwadNum())
|
||||
return;
|
||||
}
|
||||
|
||||
fixunitystatusbar = true;
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// D_DoomMain
|
||||
|
@ -2641,8 +2664,7 @@ static int D_DoomMain_Internal (void)
|
|||
TexMan.Init();
|
||||
C_InitConback();
|
||||
|
||||
if (gameinfo.flags & GI_ALWAYSCENTERSBAR)
|
||||
fixunitystatusbar = true;
|
||||
FixUnityStatusBar();
|
||||
|
||||
StartScreen->Progress();
|
||||
V_InitFonts();
|
||||
|
|
|
@ -335,6 +335,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"
|
||||
AlwaysCenterStatusbar = 1
|
||||
}
|
||||
|
@ -502,7 +503,7 @@ IWad
|
|||
Compatibility = "Shorttex"
|
||||
MustContain = "MAP01", "DMENUPIC"
|
||||
BannerColors = "00 7c 00", "a8 a8 a8"
|
||||
Load = "nerveunity.wad"
|
||||
Load = "nerveunity.wad", "extras.wad", "soundtrack"
|
||||
AlwaysCenterStatusbar = 1
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue