summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-26 14:20:50 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-26 14:20:50 +0000
commit7f819e46b584145e2cf2ea742ced9fab0ffc233e (patch)
tree9aa8ee99a4b4dd653917155282e82e6b9a64f718 /src/being.h
parentcc86266f4b59420a155df8c1aa01b9ce20b6585d (diff)
downloadmana-7f819e46b584145e2cf2ea742ced9fab0ffc233e.tar.gz
mana-7f819e46b584145e2cf2ea742ced9fab0ffc233e.tar.bz2
mana-7f819e46b584145e2cf2ea742ced9fab0ffc233e.tar.xz
mana-7f819e46b584145e2cf2ea742ced9fab0ffc233e.zip
Made Being::mDirection protected, forcing the use of setDirection. Defaulted
variant argument to 0 since this is the most common situation. Some SpriteDef refactoring, splitting up the loading into several methods, in preparation of adding support for including other sprites.
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/being.h b/src/being.h
index 3c497b75..81f7bc07 100644
--- a/src/being.h
+++ b/src/being.h
@@ -100,7 +100,6 @@ class Being : public Sprite
Uint16 mJob; /**< Job (player job, npc, monster, ) */
Uint16 mX, mY; /**< Tile coordinates */
- Uint8 mDirection; /**< Facing direction */
Uint8 mAction; /**< Action the being is performing */
Uint8 mFrame;
Uint16 mWalkTime;
@@ -294,6 +293,11 @@ class Being : public Sprite
void setAction(Uint8 action);
/**
+ * Returns the current direction.
+ */
+ Uint8 getDirection() const { return mDirection; }
+
+ /**
* Sets the current direction.
*/
void setDirection(Uint8 direction);
@@ -356,6 +360,7 @@ class Being : public Sprite
Uint32 mId; /**< Unique sprite id */
Uint16 mWeapon; /**< Weapon picture id */
Uint16 mWalkSpeed; /**< Walking speed */
+ Uint8 mDirection; /**< Facing direction */
Map *mMap; /**< Map on which this being resides */
std::string mName; /**< Name of character */
SpriteIterator mSpriteIterator;