From 3fbb171990bb4400e4ec8591b13114dd6c89bf6b Mon Sep 17 00:00:00 2001 From: CommonLoon102 <321850+CommonLoon102@users.noreply.github.com> Date: Sat, 14 Sep 2019 06:48:42 +0000 Subject: [PATCH] Powerup counter color (#166) --- source/blood/src/view.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/blood/src/view.cpp b/source/blood/src/view.cpp index 01457049d..8f8e4951a 100644 --- a/source/blood/src/view.cpp +++ b/source/blood/src/view.cpp @@ -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; } }