mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Show extra Force Shield hits using text instead of stacking more icons
This commit is contained in:
parent
8ccc4d60ab
commit
a8a8103ab2
1 changed files with 4 additions and 2 deletions
|
@ -1552,10 +1552,12 @@ static void ST_drawPowerupHUD(void)
|
|||
if ((stplyr->powers[pw_shield] & SH_NOSTACK & ~SH_FORCEHP) == SH_FORCE)
|
||||
{
|
||||
UINT8 i, max = (stplyr->powers[pw_shield] & SH_FORCEHP);
|
||||
for (i = 0; i <= max; i++)
|
||||
for (i = 0; i <= max && i < 2; i++) // only layer two icons, otherwise it becomes hard to read
|
||||
{
|
||||
V_DrawSmallScaledPatch(offs-(i<<1), hudinfo[HUD_POWERUPS].y-(i<<1), (V_PERPLAYER|hudinfo[HUD_POWERUPS].f)|((i == max) ? V_HUDTRANS : V_HUDTRANSHALF), forceshield);
|
||||
V_DrawSmallScaledPatch(offs-(i<<1), hudinfo[HUD_POWERUPS].y-(i<<1), (V_PERPLAYER|hudinfo[HUD_POWERUPS].f)|((i == 1 || i == max) ? V_HUDTRANS : V_HUDTRANSHALF), forceshield);
|
||||
}
|
||||
if (i < max + 1) // if the shield has more than 2 hits, show the extra n hits as "+n"
|
||||
V_DrawRightAlignedThinString(offs + 16, hudinfo[HUD_POWERUPS].y, V_PERPLAYER|hudinfo[HUD_POWERUPS].f|V_HUDTRANS, va("+%d", max + 1 - i));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue