diff options
author | Lloyd Bryant <lloyd_bryant@netzero.net> | 2008-07-18 00:48:14 +0000 |
---|---|---|
committer | Lloyd Bryant <lloyd_bryant@netzero.net> | 2008-07-18 00:48:14 +0000 |
commit | 159285c5aa24611ceee7e3847a87bf9ea5f7fb7a (patch) | |
tree | fa48eb8bb8ed1e62ede1e7a2f95632c2243facab /src/being.h | |
parent | 4dbc9b7af344d3ff006a40e3e0c06ce160f365f9 (diff) | |
download | mana-159285c5aa24611ceee7e3847a87bf9ea5f7fb7a.tar.gz mana-159285c5aa24611ceee7e3847a87bf9ea5f7fb7a.tar.bz2 mana-159285c5aa24611ceee7e3847a87bf9ea5f7fb7a.tar.xz mana-159285c5aa24611ceee7e3847a87bf9ea5f7fb7a.zip |
Import of client tree
Diffstat (limited to 'src/being.h')
-rw-r--r-- | src/being.h | 30 |
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; |