summaryrefslogtreecommitdiff
path: root/src/npc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/npc.cpp')
-rw-r--r--src/npc.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/npc.cpp b/src/npc.cpp
index d2e3f93f..a961420f 100644
--- a/src/npc.cpp
+++ b/src/npc.cpp
@@ -24,10 +24,13 @@
#include "npc.h"
#include "animatedsprite.h"
+#include "graphics.h"
#include "net/messageout.h"
#include "net/protocol.h"
+#include "gui/gui.h"
+
class Spriteset;
extern Spriteset *npcset;
@@ -47,6 +50,17 @@ NPC::getType() const
}
void
+NPC::drawName(Graphics *graphics, Sint32 offsetX, Sint32 offsetY)
+{
+ int px = mPx + offsetX;
+ int py = mPy + offsetY;
+
+ graphics->setFont(speechFont);
+ graphics->setColor(gcn::Color(200, 200, 255));
+ graphics->drawText(mName, px + 15, py + 30, gcn::Graphics::CENTER);
+}
+
+void
NPC::talk()
{
MessageOut outMsg(mNetwork);