From 159285c5aa24611ceee7e3847a87bf9ea5f7fb7a Mon Sep 17 00:00:00 2001 From: Lloyd Bryant Date: Fri, 18 Jul 2008 00:48:14 +0000 Subject: Import of client tree --- src/being.h | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'src/being.h') 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; } /** @@ -234,24 +235,12 @@ class Being : public Sprite virtual void 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. */ @@ -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 mEquipment; @@ -369,6 +362,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. */ @@ -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; -- cgit v1.2.3-60-g2f50