diff --git a/source/core/gameconfigfile.cpp b/source/core/gameconfigfile.cpp index 2d544663c..d8db65e0d 100644 --- a/source/core/gameconfigfile.cpp +++ b/source/core/gameconfigfile.cpp @@ -45,7 +45,7 @@ #include "gamecontrol.h" #include "version.h" -#define LASTRUNVERSION "2" +#define LASTRUNVERSION "3" #if !defined _MSC_VER && !defined __APPLE__ #include "i_system.h" // for SHARE_DIR @@ -297,6 +297,17 @@ void FGameConfigFile::DoGlobalSetup () UCVarValue v = var->GetGenericRep(CVAR_Float); v.Float /= 4.f; if (v.Float < 1.f) v.Float = 1.f; + var->SetGenericRep(v, CVAR_Float); + } + } + if (last < 3) + { + auto var = FindCVar("hud_size", NULL); + if (var != NULL) + { + UCVarValue v = var->GetGenericRep(CVAR_Int); + if(v.Int == Hud_Althud) v.Int = Hud_Nothing; + var->SetGenericRep(v, CVAR_Int); } } } diff --git a/source/core/gamecvars.h b/source/core/gamecvars.h index b43b9c876..821d17b0f 100644 --- a/source/core/gamecvars.h +++ b/source/core/gamecvars.h @@ -135,7 +135,8 @@ enum EHudSize Hud_Stbar, Hud_StbarOverlay, Hud_Mini, - Hud_full, + Hud_Full, + Hud_Althud, Hud_Nothing, Hud_MAX }; diff --git a/source/core/shared_hud.cpp b/source/core/shared_hud.cpp index cbc867a9b..6dc49e226 100644 --- a/source/core/shared_hud.cpp +++ b/source/core/shared_hud.cpp @@ -48,7 +48,7 @@ CVAR(Int,hud_althudscale, 0, CVAR_ARCHIVE) // Scale the hud to 640x400? -CVAR(Bool,hud_althud, false, CVAR_ARCHIVE) // Enable/Disable the alternate HUD +//CVAR(Bool,hud_althud, false, CVAR_ARCHIVE) // Enable/Disable the alternate HUD CVAR(Int, am_showtotaltime, 0, CVAR_ARCHIVE); // Show time on automap CVAR(Int, am_showtime, 0, CVAR_ARCHIVE); // Show time on automap diff --git a/source/core/statusbar2.cpp b/source/core/statusbar2.cpp index f65769808..a0f744ea0 100644 --- a/source/core/statusbar2.cpp +++ b/source/core/statusbar2.cpp @@ -73,7 +73,6 @@ EXTERN_CVAR (Bool, am_showtotaltime) EXTERN_CVAR (Bool, noisedebug) EXTERN_CVAR(Bool, vid_fps) EXTERN_CVAR(Bool, inter_subtitles) -EXTERN_CVAR(Bool, hud_althud) extern int setblocks; @@ -186,7 +185,7 @@ void DrawAltHUD(SummaryInfo* info); void UpdateStatusBar(SummaryInfo* info) { - if (hud_althud) + if (hud_size == Hud_Althud) { DrawAltHUD(info); return; diff --git a/wadsrc/static/zscript/games/blood/ui/sbar.zs b/wadsrc/static/zscript/games/blood/ui/sbar.zs index 0cf16b46e..77431fad2 100644 --- a/wadsrc/static/zscript/games/blood/ui/sbar.zs +++ b/wadsrc/static/zscript/games/blood/ui/sbar.zs @@ -725,7 +725,7 @@ class BloodStatusBar : RazeStatusBar nPalette = Translation.MakeID(Translation_Remap, nPalette); } - if (hud_size == Hud_full) + if (hud_size == Hud_Full) { y = DrawHUD2(pPlayer); } diff --git a/wadsrc/static/zscript/games/duke/ui/sbar_d.zs b/wadsrc/static/zscript/games/duke/ui/sbar_d.zs index 66d4581ed..1f374c7e6 100644 --- a/wadsrc/static/zscript/games/duke/ui/sbar_d.zs +++ b/wadsrc/static/zscript/games/duke/ui/sbar_d.zs @@ -473,7 +473,7 @@ class DukeStatusBar : DukeCommonStatusBar let p = Duke.GetViewPlayer(); if (hud_size >= Hud_Mini) { - DrawHud(p, hud_size == Hud_Nothing ? 0 : hud_size == Hud_full ? 1 : 2, info); + DrawHud(p, hud_size == Hud_Nothing ? 0 : hud_size == Hud_Full ? 1 : 2, info); } else { diff --git a/wadsrc/static/zscript/games/duke/ui/sbar_r.zs b/wadsrc/static/zscript/games/duke/ui/sbar_r.zs index e27acff02..144b1efcb 100644 --- a/wadsrc/static/zscript/games/duke/ui/sbar_r.zs +++ b/wadsrc/static/zscript/games/duke/ui/sbar_r.zs @@ -439,7 +439,7 @@ class RedneckStatusBar : DukeCommonStatusBar let p = Duke.GetViewPlayer(); if (hud_size >= Hud_Mini) { - DrawHud(p, hud_size == Hud_Nothing ? 0 : hud_size == Hud_full ? 1 : 2, info); + DrawHud(p, hud_size == Hud_Nothing ? 0 : hud_size == Hud_Full ? 1 : 2, info); } else { diff --git a/wadsrc/static/zscript/games/exhumed/ui/sbar.zs b/wadsrc/static/zscript/games/exhumed/ui/sbar.zs index 3c9137509..279a3f0db 100644 --- a/wadsrc/static/zscript/games/exhumed/ui/sbar.zs +++ b/wadsrc/static/zscript/games/exhumed/ui/sbar.zs @@ -389,7 +389,7 @@ class ExhumedStatusBar : RazeStatusBar DrawImage("hud_l", (0, 0), DI_ITEM_LEFT_BOTTOM | DI_SCREEN_LEFT_BOTTOM); DrawImage("hud_r", (0, 0), DI_ITEM_RIGHT_BOTTOM | DI_SCREEN_RIGHT_BOTTOM); } - else if (hud_size == Hud_full) + else if (hud_size == Hud_Full) { DrawHUD2(pp); return; @@ -436,7 +436,7 @@ class ExhumedStatusBar : RazeStatusBar // draw compass if (hud_size <= Hud_StbarOverlay) DrawStatusSequence(35, ((pp.GetAngle() + 128) & Raze.kAngleMask) >> 8, 0, 0.5, true); - //if (hud_size < Hud_full) + //if (hud_size < Hud_Full) { // draw ammo count DrawStatusSequence(44, nDigit[2], 0, 0.5, true); @@ -803,11 +803,11 @@ class ExhumedStatusBar : RazeStatusBar override void UpdateStatusBar(SummaryInfo info) { - if (hud_size <= Hud_full) + if (hud_size <= Hud_Full) { DrawStatus(Exhumed.GetViewPlayer()); } - DoLevelStats(hud_size == Hud_Nothing ? 0 : hud_size == Hud_full ? 20 : 45, info); + DoLevelStats(hud_size == Hud_Nothing ? 0 : hud_size == Hud_Full ? 20 : 45, info); } diff --git a/wadsrc/static/zscript/games/sw/ui/sbar.zs b/wadsrc/static/zscript/games/sw/ui/sbar.zs index 14c62d553..083855090 100644 --- a/wadsrc/static/zscript/games/sw/ui/sbar.zs +++ b/wadsrc/static/zscript/games/sw/ui/sbar.zs @@ -931,7 +931,7 @@ class SWStatusBar : RazeStatusBar inv_y = -28; DoLevelStats(2, info); } - else if (hud_size == Hud_full) + else if (hud_size == Hud_Full) { align = DI_SCREEN_CENTER_BOTTOM; inv_x = -80; diff --git a/wadsrc/static/zscript/razebase.zs b/wadsrc/static/zscript/razebase.zs index 60d305a89..e3bb0754b 100644 --- a/wadsrc/static/zscript/razebase.zs +++ b/wadsrc/static/zscript/razebase.zs @@ -52,7 +52,8 @@ enum EHudSize Hud_Stbar, Hud_StbarOverlay, Hud_Mini, - Hud_full, + Hud_Full, + Hud_Althud, Hud_Nothing, Hud_MAX }