summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-07-31 19:42:48 +0300
committerAndrei Karas <akaras@inbox.ru>2017-07-31 19:42:48 +0300
commit6a64f7e58501280751d6cbe4f3a474cdb1a93f46 (patch)
tree260514513a71fa12aef307c596fbe13be670f320 /src/being
parent97109e6260af3eab9c2fd7bae7dbcd0935f70da7 (diff)
downloadplus-6a64f7e58501280751d6cbe4f3a474cdb1a93f46.tar.gz
plus-6a64f7e58501280751d6cbe4f3a474cdb1a93f46.tar.bz2
plus-6a64f7e58501280751d6cbe4f3a474cdb1a93f46.tar.xz
plus-6a64f7e58501280751d6cbe4f3a474cdb1a93f46.zip
Improve a bit settings.playerNameOffset usage.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index c051d3038..bf1b2db59 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -2292,8 +2292,7 @@ void Being::drawEmotion(Graphics *restrict const graphics,
}
else
{
- int height = settings.playerNameOffset;
- y = py + height + 16;
+ y = py + settings.playerNameOffset + 16;
}
}
else
@@ -2315,7 +2314,7 @@ void Being::drawEmotion(Graphics *restrict const graphics,
else if (mShowBadges == BadgeDrawType::Bottom)
{
x = px + 8 - mBadgesCount * 8;
- int height = settings.playerNameOffset;
+ const int height = settings.playerNameOffset;
if (mVisibleNamePos == VisibleNamePos::Buttom)
y = py + height;
else
@@ -2453,8 +2452,7 @@ void Being::updateCoords() restrict2
if (mType == ActorType::Monster ||
mVisibleNamePos == VisibleNamePos::Top)
{
- int height = settings.playerNameOffset;
- offsetY += - height - mDispName->getHeight();
+ offsetY += - settings.playerNameOffset - mDispName->getHeight();
}
mDispName->adviseXY(offsetX, offsetY, mMoveNames);