From 4d226d19e79c68d3565eccff7d71ec5a290f8fb6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 17 May 2021 19:22:57 +0200 Subject: [PATCH] - Exhumed: fixed jumping icons on the status bar. Unfortunately, due to the utterly broken design of the sequences the fullscreen HUD is not fixed. This would require graphics replacements that fix the bad offsetting in the torch. --- wadsrc/static/zscript/games/exhumed/ui/sbar.zs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/wadsrc/static/zscript/games/exhumed/ui/sbar.zs b/wadsrc/static/zscript/games/exhumed/ui/sbar.zs index f30afc367..bb913906d 100644 --- a/wadsrc/static/zscript/games/exhumed/ui/sbar.zs +++ b/wadsrc/static/zscript/games/exhumed/ui/sbar.zs @@ -92,7 +92,7 @@ class ExhumedStatusBar : RazeStatusBar // //--------------------------------------------------------------------------- - void DrawStatusSequence(int nSequence, int frameindex, double yoffset, double xoffset = 0) + void DrawStatusSequence(int nSequence, int frameindex, double yoffset, double xoffset = 0, bool trueadjust = false) { int nFrameBase, nFrameSize; [nFrameBase, nFrameSize] = Exhumed.GetStatusSequence(nSequence, frameindex); @@ -134,8 +134,16 @@ class ExhumedStatusBar : RazeStatusBar else { let tsiz = TexMan.GetScaledSize(chunk.tex); - x -= tsiz.x * .5; - y -= tsiz.y * .5; + if (trueadjust) + { + x -= tsiz.x * 0.5; + y -= tsiz.y * 0.5; + } + else + { + x -= int(tsiz.x) / 2; + y -= int(tsiz.y) / 2; + } flags |= DI_ITEM_OFFSETS; } @@ -372,7 +380,7 @@ class ExhumedStatusBar : RazeStatusBar { if (pp.keys & (4096 << i)) { - DrawStatusSequence(KeySeq + 2 * i, keyanims[i], 0.5, 0.5); + DrawStatusSequence(KeySeq + 2 * i, keyanims[i], 0.5, 0.5, true); } }