mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 05:41:42 +00:00
Cleanup as per ZZZ's suggestion
This commit is contained in:
parent
a8a8103ab2
commit
e03b4c3e7e
1 changed files with 10 additions and 8 deletions
|
@ -1549,15 +1549,16 @@ static void ST_drawPowerupHUD(void)
|
||||||
{
|
{
|
||||||
shieldoffs[q] = ICONSEP;
|
shieldoffs[q] = ICONSEP;
|
||||||
|
|
||||||
if ((stplyr->powers[pw_shield] & SH_NOSTACK & ~SH_FORCEHP) == SH_FORCE)
|
if ((stplyr->powers[pw_shield] & SH_NOSTACK & ~SH_FORCEHP) == SH_FORCE
|
||||||
|
&& (stplyr->powers[pw_shield] & SH_FORCEHP) > 0) // Special handling for >1HP Force Shields
|
||||||
{
|
{
|
||||||
UINT8 i, max = (stplyr->powers[pw_shield] & SH_FORCEHP);
|
UINT8 max = (stplyr->powers[pw_shield] & SH_FORCEHP);
|
||||||
for (i = 0; i <= max && i < 2; i++) // only layer two icons, otherwise it becomes hard to read
|
|
||||||
{
|
V_DrawSmallScaledPatch(offs, hudinfo[HUD_POWERUPS].y, V_PERPLAYER|hudinfo[HUD_POWERUPS].f|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);
|
V_DrawSmallScaledPatch(offs-2, hudinfo[HUD_POWERUPS].y-2, V_PERPLAYER|hudinfo[HUD_POWERUPS].f|V_HUDTRANS, forceshield);
|
||||||
}
|
|
||||||
if (i < max + 1) // if the shield has more than 2 hits, show the extra n hits as "+n"
|
if (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));
|
V_DrawRightAlignedThinString(offs+16, hudinfo[HUD_POWERUPS].y, V_PERPLAYER|hudinfo[HUD_POWERUPS].f|V_HUDTRANS, va("+%d", max - 1));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1567,6 +1568,7 @@ static void ST_drawPowerupHUD(void)
|
||||||
case SH_ELEMENTAL: p = watershield; break;
|
case SH_ELEMENTAL: p = watershield; break;
|
||||||
case SH_ARMAGEDDON: p = bombshield; break;
|
case SH_ARMAGEDDON: p = bombshield; break;
|
||||||
case SH_ATTRACT: p = ringshield; break;
|
case SH_ATTRACT: p = ringshield; break;
|
||||||
|
case SH_FORCE: p = forceshield; break;
|
||||||
case SH_PITY: p = pityshield; break;
|
case SH_PITY: p = pityshield; break;
|
||||||
case SH_PINK: p = pinkshield; break;
|
case SH_PINK: p = pinkshield; break;
|
||||||
case SH_FLAMEAURA: p = flameshield; break;
|
case SH_FLAMEAURA: p = flameshield; break;
|
||||||
|
|
Loading…
Reference in a new issue