summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-09 16:27:05 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-09 16:27:05 +0000
commit2327c5a7c3b054e52b69286da906f8e5c4432d1c (patch)
tree28a566d4d54b8c046b18f18c1fb592c31f83f5dd /src/being.h
parentff4d98eeee5a5a799039549c6df885a5208b792f (diff)
downloadmana-client-2327c5a7c3b054e52b69286da906f8e5c4432d1c.tar.gz
mana-client-2327c5a7c3b054e52b69286da906f8e5c4432d1c.tar.bz2
mana-client-2327c5a7c3b054e52b69286da906f8e5c4432d1c.tar.xz
mana-client-2327c5a7c3b054e52b69286da906f8e5c4432d1c.zip
Fixed player names overlapping other players and more cleanups.
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h62
1 files changed, 34 insertions, 28 deletions
diff --git a/src/being.h b/src/being.h
index d5ec7fab..67c8c6b6 100644
--- a/src/being.h
+++ b/src/being.h
@@ -88,7 +88,6 @@ class Being : public Sprite
Uint8 mFrame;
Sint32 speech_color;
Uint16 walk_time;
- Uint16 speed;
Uint8 emotion; /**< Currently showing emotion */
Uint8 emotion_time; /**< Time until emotion disappears */
@@ -152,14 +151,14 @@ class Being : public Sprite
void setHairColor(Uint16 color);
/**
- * Sets the hair style for this being.
+ * Gets the hair color for this being.
*/
- void setHairStyle(Uint16 style);
+ Uint16 getHairColor();
/**
- * Gets the hair color for this being.
+ * Sets the hair style for this being.
*/
- Uint16 getHairColor();
+ void setHairStyle(Uint16 style);
/**
* Gets the hair style for this being.
@@ -169,38 +168,32 @@ class Being : public Sprite
/**
* Makes this being take the next step of his path.
*/
- void nextStep();
+ void
+ nextStep();
/**
* Performs being logic.
*/
- void logic();
+ void
+ logic();
/**
* Draws the speech text above the being.
*/
- void drawSpeech(Graphics *graphics, Sint32 offsetX, Sint32 offsetY);
+ void
+ drawSpeech(Graphics *graphics, Sint32 offsetX, Sint32 offsetY);
/**
* Returns the type of the being.
*/
Type getType() const;
- // ACCES METHODS
-
/**
* Gets the weapon picture id.
*/
Uint16 getWeapon() const { return mWeapon; }
/**
- * Gets the sprite id.
- */
- Uint32 getId() const { return mId; }
-
- // MODIFICATION METHODS
-
- /**
* Sets the weapon picture id.
*
* @param weapon the picture id
@@ -213,7 +206,26 @@ class Being : public Sprite
*
* @param weapon the weapon id
*/
- void setWeaponById(Uint16 weapon);
+ void
+ setWeaponById(Uint16 weapon);
+
+ /**
+ * Gets the walk speed.
+ */
+ Uint16
+ getWalkSpeed() const { return mWalkSpeed; }
+
+ /**
+ * Sets the walk speed.
+ */
+ void
+ setWalkSpeed(Uint16 speed) { mWalkSpeed = speed; }
+
+ /**
+ * Gets the sprite id.
+ */
+ Uint32
+ getId() const { return mId; }
/**
* Sets the sprite id.
@@ -226,8 +238,6 @@ class Being : public Sprite
*/
void setMap(Map *map);
- // SPRITE METHODS
-
/**
* Draws this being to the given graphics context.
*
@@ -269,8 +279,9 @@ class Being : public Sprite
void
setPath(std::list<PATH_NODE> path);
+ Uint32 mId; /**< Unique sprite id */
Uint16 mWeapon; /**< Weapon picture id */
- Uint32 mId; /**< Unique id */
+ Uint16 mWalkSpeed; /**< Walking speed */
Map *mMap; /**< Map on which this being resides */
std::string mName; /**< Name of character */
Sprites::iterator mSpriteIterator;
@@ -315,14 +326,9 @@ createBeing(Uint32 id, Uint16 job, Map *map);
void
remove_node(Being *being);
-/**
- * Sort beings in vertical order
- */
-void
-sort();
-
extern Being *player_node;
-extern std::list<Being*> beings;
+typedef std::list<Being*> Beings;
+extern Beings beings;
#endif