mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- fixed the number pulsing on Duke's and RR's HUD.
This commit is contained in:
parent
98557947da
commit
00d35bc42c
2 changed files with 8 additions and 8 deletions
|
@ -133,11 +133,10 @@ public:
|
|||
{
|
||||
int s = -8;
|
||||
if (althud_flashing && p->last_extra > max_player_health)
|
||||
s += (sintable[(gameclock << 5) & 2047] >> 10);
|
||||
int intens = clamp(255 - 4 * s, 0, 255);
|
||||
auto pe = PalEntry(255, intens, intens, intens);
|
||||
s += (sintable[(gameclock << 6) & 2047] >> 10);
|
||||
int intens = clamp(255 - 6 * s, 0, 255);
|
||||
format.Format("%d", p->last_extra);
|
||||
SBar_DrawString(this, &numberFont, format, 25, texty, DI_TEXT_ALIGN_LEFT, CR_UNTRANSLATED, 1, 0, 0, 1, 1);
|
||||
SBar_DrawString(this, &numberFont, format, 25, texty, DI_TEXT_ALIGN_LEFT, CR_UNTRANSLATED, intens / 255., 0, 0, 1, 1);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -106,15 +106,16 @@ public:
|
|||
imgScale = baseScale / img->GetDisplayHeight();
|
||||
DrawGraphic(img, 2, -2, DI_ITEM_LEFT_BOTTOM, 1, 0, 0, imgScale, imgScale);
|
||||
|
||||
int gameclock = I_GetBuildTime();
|
||||
|
||||
if (!althud_flashing || p->last_extra > (max_player_health >> 2) || (gameclock & 32) || (sprite[p->i].pal == 1 && p->last_extra < 2))
|
||||
{
|
||||
int s = -8;
|
||||
if (althud_flashing && p->last_extra > max_player_health)
|
||||
s += (sintable[(gameclock << 5) & 2047] >> 10);
|
||||
int intens = clamp(255 - 4 * s, 0, 255);
|
||||
auto pe = PalEntry(255, intens, intens, intens);
|
||||
s += (sintable[(gameclock << 6) & 2047] >> 10);
|
||||
int intens = clamp(255 - 6 * s, 0, 255);
|
||||
format.Format("%d", p->last_extra);
|
||||
SBar_DrawString(this, &numberFont, format, 26.5, -numberFont.mFont->GetHeight() * scale + 4, DI_TEXT_ALIGN_LEFT, CR_UNTRANSLATED, 1, 0, 0, scale, scale);
|
||||
SBar_DrawString(this, &numberFont, format, 26.5, -numberFont.mFont->GetHeight() * scale + 4, DI_TEXT_ALIGN_LEFT, CR_UNTRANSLATED, intens / 255., 0, 0, scale, scale);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue