Powerup counter color (#166)

This commit is contained in:
CommonLoon102 2019-09-14 06:48:42 +00:00 committed by Christoph Oelckers
parent 4423164ca5
commit 3fbb171990

View file

@ -1219,6 +1219,7 @@ void viewDrawPowerUps(PLAYER* pPlayer)
sortPowerUps(powerups);
const int warningTime = 5;
const int x = 15;
int y = 50;
for (int i = 0; i < 5; i++)
@ -1226,12 +1227,12 @@ void viewDrawPowerUps(PLAYER* pPlayer)
if (powerups[i].remainingDuration)
{
int remainingSeconds = powerups[i].remainingDuration / 100;
if (remainingSeconds > 5 || ((int)totalclock & 32))
if (remainingSeconds > warningTime || ((int)totalclock & 32))
{
DrawStatMaskedSprite(powerups[i].nTile, x, y + powerups[i].yOffset, 0, 0, 256, (int)(65536 * powerups[i].nScaleRatio));
}
DrawStatNumber("%d", remainingSeconds, kSBarNumberInv, x + 15, y, 0, 0, 256, 65536 * 0.5);
DrawStatNumber("%d", remainingSeconds, kSBarNumberInv, x + 15, y, 0, remainingSeconds > warningTime ? 0 : 2, 256, 65536 * 0.5);
y += 20;
}
}