- Exhumed: Added air meter to alt HUD and fixed the one on the status bar.

Fixes #383
Fixes #259
This commit is contained in:
Christoph Oelckers 2020-09-11 20:07:42 +02:00
parent b4c297da2e
commit e1291ad756

View file

@ -638,7 +638,7 @@ private:
//---------------------------------------------------------------------------
//
// Frag display - very ugly and may have to be redone if multiplayer suppoer gets added.
// Frag display - very ugly and may have to be redone if multiplayer support gets added.
//
//---------------------------------------------------------------------------
@ -748,6 +748,17 @@ private:
SBar_DrawString(this, &numberFont, format, 20, -numberFont.mFont->GetHeight()+2, DI_TEXT_ALIGN_LEFT, CR_UNTRANSLATED, 1, 0, 0, 1, 1);
}
//
// Air
//
if (SectFlag[nPlayerViewSect[nLocalPlayer]] & kSectUnderwater)
{
img = GetStatusSequencePic(nStatusSeqOffset + 133, airframe);
imgScale = baseScale / img->GetDisplayHeight();
DrawGraphic(img, -4, -22, DI_ITEM_RIGHT_BOTTOM, 1., -1, -1, imgScale, imgScale);
}
//
// Magic
//
@ -827,13 +838,6 @@ private:
val += 4;
x += 20;
}
#if 0
DisplayKeys(pp, -25, -38, 0.8625, 0.8625);
PrintLevelStats(int(baseScale + 4));
#endif
}
@ -880,12 +884,16 @@ private:
if (nItemSeq >= 0) {
DrawStatusSequence(nItemSeq + nStatusSeqOffset, nItemFrame, 0);
}
// draw the blue air level meter when underwater (but not responsible for animating the breathing lungs otherwise)
DrawStatusSequence(nStatusSeqOffset + 133, airframe, 0, -32);
// draws health level dots, animates breathing lungs and other things
DrawStatusAnims();
// draw the blue air level meter when underwater (but not responsible for animating the breathing lungs otherwise)
if (SectFlag[nPlayerViewSect[nLocalPlayer]] & kSectUnderwater)
{
DrawStatusSequence(nStatusSeqOffset + 133, airframe, 0, -32);
}
// draw compass
if (hud_size <= Hud_StbarOverlay) DrawStatusSequence(nStatusSeqOffset + 35, ((inita + 128) & kAngleMask) >> 8, 0);