summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/being.h b/src/being.h
index 5ea8c0be..2f711fb8 100644
--- a/src/being.h
+++ b/src/being.h
@@ -18,7 +18,7 @@
* along with The Mana World; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id$
+ * $Id: being.h 4321 2008-06-02 11:42:26Z b_lindeijer $
*/
#ifndef _TMW_BEING_H
@@ -47,6 +47,7 @@ class Map;
class Graphics;
class ImageSet;
class Particle;
+class Text;
/**
* A position along a being's path.
@@ -183,7 +184,7 @@ class Being : public Sprite
*
* @param name The name that should appear.
*/
- void
+ virtual void
setName(const std::string &name) { mName = name; }
/**
@@ -235,24 +236,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;
@@ -359,7 +348,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;
+ }
const std::auto_ptr<Equipment> mEquipment;
@@ -370,6 +363,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;
@@ -385,7 +383,7 @@ class Being : public Sprite
const ItemInfo* mEquippedWeapon;
Path mPath;
- std::string mSpeech;
+ Text *mSpeech;
Uint16 mHairStyle, mHairColor;
Uint8 mGender;
Uint32 mSpeechTime;