Skip to content

Commit

Permalink
- Exhumed: fixed jumping icons on the status bar.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
coelckers committed May 17, 2021
1 parent 61d81ef commit 4d226d1
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions wadsrc/static/zscript/games/exhumed/ui/sbar.zs
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 4d226d1

Please sign in to comment.