summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 3570fe30..9a0e6d2f 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -22,15 +22,12 @@
*/
#include "being.h"
-#include <algorithm>
#include <sstream>
#include "game.h"
#include "graphics.h"
#include "log.h"
#include "map.h"
-#include "monster.h"
-#include "player.h"
#include "graphic/spriteset.h"
@@ -58,7 +55,8 @@ Being::Being(Uint32 id, Uint16 job, Map *map):
hairStyle(1), hairColor(1),
speech_time(0),
damage_time(0),
- showSpeech(false), showDamage(false)
+ showSpeech(false), showDamage(false),
+ mSpriteset(NULL), mSpriteFrame(0)
{
setMap(map);
}
@@ -217,6 +215,17 @@ Being::logic()
}
}
+void Being::draw(Graphics *graphics, int offsetX, int offsetY)
+{
+ if (!mSpriteset)
+ return;
+
+ int px = mPx + offsetX;
+ int py = mPy + offsetY;
+
+ graphics->drawImage(mSpriteset->spriteset[mSpriteFrame], px, py);
+}
+
void
Being::drawEmotion(Graphics *graphics, Sint32 offsetX, Sint32 offsetY)
{