summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-01 01:08:30 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-01 01:08:30 +0300
commit16f6f636aee6acaf52439643502f5ff9cb4ccffc (patch)
tree9f291e5257e20b0090405d4594553f38a69767ce /src/being/being.cpp
parent3fc7fd8473e545265c705504ee0d5f2a70268282 (diff)
downloadmv-16f6f636aee6acaf52439643502f5ff9cb4ccffc.tar.gz
mv-16f6f636aee6acaf52439643502f5ff9cb4ccffc.tar.bz2
mv-16f6f636aee6acaf52439643502f5ff9cb4ccffc.tar.xz
mv-16f6f636aee6acaf52439643502f5ff9cb4ccffc.zip
Convert UserColorId enum into strong typed enum.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index e30a1e477..3503b5259 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -2594,11 +2594,16 @@ void Being::drawSpriteAt(Graphics *const graphics,
if (!maxHP)
maxHP = mInfo->getMaxHP();
- drawHpBar(graphics, maxHP, mHP, mDamageTaken,
- UserColorId::MONSTER_HP, UserColorId::MONSTER_HP2,
+ drawHpBar(graphics,
+ maxHP,
+ mHP,
+ mDamageTaken,
+ UserColorId::MONSTER_HP,
+ UserColorId::MONSTER_HP2,
x - 50 + mapTileSize / 2 + mInfo->getHpBarOffsetX(),
y + mapTileSize - 6 + mInfo->getHpBarOffsetY(),
- 2 * 50, 4);
+ 2 * 50,
+ 4);
}
if (mShowOwnHP
&& mInfo
@@ -2614,9 +2619,15 @@ void Being::drawSpriteAt(Graphics *const graphics,
}
}
-void Being::drawHpBar(Graphics *const graphics, const int maxHP, const int hp,
- const int damage, const int color1, const int color2,
- const int x, const int y, const int width,
+void Being::drawHpBar(Graphics *const graphics,
+ const int maxHP,
+ const int hp,
+ const int damage,
+ const UserColorIdT color1,
+ const UserColorIdT color2,
+ const int x,
+ const int y,
+ const int width,
const int height) const
{
if (maxHP <= 0 || !userPalette)