summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/being.h b/src/being.h
index c4f34503..d5fe7790 100644
--- a/src/being.h
+++ b/src/being.h
@@ -47,6 +47,7 @@ class Map;
class Graphics;
class ImageSet;
class Particle;
+class Text;
/**
* A position along a being's path.
@@ -187,7 +188,7 @@ class Being : public Sprite
*
* @param name The name that should appear.
*/
- void
+ virtual void
setName(const std::string &name) { mName = name; }
/**
@@ -239,24 +240,12 @@ class Being : public Sprite
logic();
/**
- * Draws the speech text above the being.
- */
- void
- drawSpeech(Graphics *graphics, int offsetX, int offsetY);
-
- /**
* Draws the emotion picture above the being.
*/
void
drawEmotion(Graphics *graphics, int offsetX, int offsetY);
/**
- * Draws the name text below the being.
- */
- virtual void
- drawName(Graphics *, int, int) {};
-
- /**
* Returns the type of the being.
*/
virtual Type getType() const;
@@ -363,7 +352,11 @@ class Being : public Sprite
*/
void controlParticle(Particle *particle);
- void setEmote(Uint8 emotion, Uint8 emote_time) { mEmotion = emotion; mEmotionTime = emote_time; }
+ void setEmote(Uint8 emotion, Uint8 emote_time)
+ {
+ mEmotion = emotion;
+ mEmotionTime = emote_time;
+ }
/**
* Triggers a visual effect, such as `level up'
@@ -384,6 +377,11 @@ class Being : public Sprite
void setPath(const Path &path);
/**
+ * Let the sub-classes react to a replacement
+ */
+ virtual void updateCoords() {}
+
+ /**
* Returns the sprite direction of this being.
*/
SpriteDirection getSpriteDirection() const;
@@ -409,7 +407,7 @@ class Being : public Sprite
const ItemInfo* mEquippedWeapon;
Path mPath;
- std::string mSpeech;
+ Text *mSpeech;
Uint16 mHairStyle, mHairColor;
Uint8 mGender;
Uint32 mSpeechTime;