From e2f6fa95d43437c4d703ecbe8761c1e96a259a1d Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sat, 20 Oct 2018 13:22:11 -0400 Subject: [PATCH 1/2] - fixed: attaching a new status bar to a player now calls 'setsizeneeded' - fixes an issue where the screen geometry is out of sync with the characteristics of the new status bar. --- src/g_statusbar/shared_sbar.cpp | 7 +++++++ wadsrc/static/zscript/statusbar/statusbar.txt | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/g_statusbar/shared_sbar.cpp b/src/g_statusbar/shared_sbar.cpp index 6be4abf9f..4fc4720a0 100644 --- a/src/g_statusbar/shared_sbar.cpp +++ b/src/g_statusbar/shared_sbar.cpp @@ -588,6 +588,13 @@ DEFINE_ACTION_FUNCTION(DBaseStatusBar, BeginHUD) return 0; } +DEFINE_ACTION_FUNCTION(DBaseStatusBar, UpdateScreenGeometry) +{ + PARAM_SELF_PROLOGUE(DBaseStatusBar); + setsizeneeded = true; + return 0; +} + //--------------------------------------------------------------------------- // // PROC AttachToPlayer diff --git a/wadsrc/static/zscript/statusbar/statusbar.txt b/wadsrc/static/zscript/statusbar/statusbar.txt index 6b74e3d01..385db36bf 100644 --- a/wadsrc/static/zscript/statusbar/statusbar.txt +++ b/wadsrc/static/zscript/statusbar/statusbar.txt @@ -318,6 +318,8 @@ class BaseStatusBar native ui native void BeginStatusBar(bool forceScaled = false, int resW = -1, int resH = -1, int rel = -1); native void BeginHUD(double Alpha = 1., bool forcescaled = false, int resW = -1, int resH = -1); + native void UpdateScreenGeometry(); + virtual void Init() { mSmallFont = HUDFont.Create("SmallFont"); @@ -330,7 +332,7 @@ class BaseStatusBar native ui native virtual clearscope void SetMugShotState (String state_name, bool wait_till_done=false, bool reset=false); virtual void FlashItem (class itemtype) { artiflashTick = 4; itemflashFade = 0.75; } - virtual void AttachToPlayer (PlayerInfo player) { CPlayer = player; } + virtual void AttachToPlayer (PlayerInfo player) { CPlayer = player; UpdateScreenGeometry(); } virtual void FlashCrosshair () { CrosshairSize = XHAIRPICKUPSIZE; } virtual void NewGame () { if (CPlayer != null) AttachToPlayer(CPlayer); } virtual void ShowPop (int popnum) { ShowLog = (popnum == POP_Log && !ShowLog); } From 89059a2acc2abce09bfd30ca1161ac838ce73ec6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 21 Oct 2018 20:26:57 +0200 Subject: [PATCH 2/2] - added a compatibility fix for Hacx's MAP05. This is by no means perfect and looks different than what was originally intended, but at least this doesn't totally fail to render properly with the OpenGL renderer. --- wadsrc/static/zscript/level_compatibility.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/wadsrc/static/zscript/level_compatibility.txt b/wadsrc/static/zscript/level_compatibility.txt index e007e98dd..e7bd242be 100644 --- a/wadsrc/static/zscript/level_compatibility.txt +++ b/wadsrc/static/zscript/level_compatibility.txt @@ -5,6 +5,22 @@ class LevelCompatibility play { switch (checksum) { + case '9527DD0809FDA39CCFC316A21D135783': // HACX.WAD map05 + { + // fix non-functional self-referencing sector hack. + for(int i = 578; i < 582; i++) + SetLineSectorRef(i, Line.back, 91); + + for(int i = 707; i < 714; i++) + SetLineSectorRef(i, Line.back, 91); + + SetLineSectorRef(736, Line.front, 91); + SetLineSectorRef(659, Line.front, 91); + SetLineSpecial(659, Transfer_Heights, 60); + break; + } + + case 'E2B5D1400279335811C1C1C0B437D9C8': // Deathknights of the Dark Citadel, map54 { // This map has two gear boxes which are flagged for player cross