summaryrefslogtreecommitdiff
path: root/src/npc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/npc.cpp')
-rw-r--r--src/npc.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/npc.cpp b/src/npc.cpp
index c2b266ff..a7302e0d 100644
--- a/src/npc.cpp
+++ b/src/npc.cpp
@@ -69,15 +69,15 @@ NPC::getType() const
return Being::NPC;
}
-void
-NPC::drawName(Graphics *graphics, Sint32 offsetX, Sint32 offsetY)
+void NPC::drawName(Graphics *graphics, Sint32 offsetX, Sint32 offsetY)
{
- int px = mPx + offsetX;
- int py = mPy + offsetY;
+ const Vector &pos = getPosition();
+ const int px = (int) pos.x + offsetX;
+ const int py = (int) pos.y + offsetY;
graphics->setFont(speechFont);
graphics->setColor(gcn::Color(200, 200, 255));
- graphics->drawText(mName, px + 15, py + 30, gcn::Graphics::CENTER);
+ graphics->drawText(mName, px, py, gcn::Graphics::CENTER);
}
void