summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/being/being.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 2401e6cc3..1a9ce201f 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -4285,8 +4285,8 @@ void Being::drawHpBar(Graphics *restrict const graphics,
const int maxHP,
const int hp,
const int damage,
- const UserColorIdT color1,
- const UserColorIdT color2,
+ const UserColorIdT colorFG,
+ const UserColorIdT colorBG,
const int x,
const int y,
const int width,
@@ -4322,13 +4322,13 @@ void Being::drawHpBar(Graphics *restrict const graphics,
if ((damage == 0 && (this != localPlayer || hp == maxHP))
|| (hp == 0 && maxHP == damage))
{
- graphics->setColor(userPalette->getColorWithAlpha(color1));
+ graphics->setColor(userPalette->getColorWithAlpha(colorFG));
graphics->fillRectangle(Rect(x, y, dx, height));
return;
}
else if (width - dx <= 0)
{
- graphics->setColor(userPalette->getColorWithAlpha(color2));
+ graphics->setColor(userPalette->getColorWithAlpha(colorBG));
graphics->fillRectangle(Rect(x, y, width, height));
return;
}
@@ -4338,22 +4338,23 @@ void Being::drawHpBar(Graphics *restrict const graphics,
{
if (hp == maxHP)
{
- graphics->setColor(userPalette->getColorWithAlpha(color1));
+ graphics->setColor(userPalette->getColorWithAlpha(colorFG));
graphics->fillRectangle(Rect(x, y, dx, height));
return;
}
else if (width - dx <= 0)
{
- graphics->setColor(userPalette->getColorWithAlpha(color2));
+ graphics->setColor(userPalette->getColorWithAlpha(colorBG));
graphics->fillRectangle(Rect(x, y, width, height));
return;
}
}
- graphics->setColor(userPalette->getColorWithAlpha(color1));
+ // foreground
+ graphics->setColor(userPalette->getColorWithAlpha(colorFG));
graphics->fillRectangle(Rect(x, y, dx, height));
-
- graphics->setColor(userPalette->getColorWithAlpha(color2));
+ // background
+ graphics->setColor(userPalette->getColorWithAlpha(colorBG));
graphics->fillRectangle(Rect(x + dx, y, width - dx, height));
}