mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
Powerup counter color (#166)
This commit is contained in:
parent
4423164ca5
commit
3fbb171990
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue