summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/being.h b/src/being.h
index 38c62dbb..7c08ab81 100644
--- a/src/being.h
+++ b/src/being.h
@@ -324,13 +324,13 @@ class Being : public Sprite
* Get the current X pixel offset.
*/
int
- getXOffset() const { return getOffset(LEFT, RIGHT); }
+ getXOffset() const { return getOffset(mStepX); }
/**
* Get the current Y pixel offset.
*/
int
- getYOffset() const { return getOffset(UP, DOWN); }
+ getYOffset() const { return getOffset(mStepY); }
std::auto_ptr<Equipment> mEquipment;
int mVisibleEquipment[6]; /**< Visible equipments */
@@ -343,12 +343,6 @@ class Being : public Sprite
setPath(const Path &path);
/**
- * Calculates the offset in the given directions.
- * If walking in direction 'neg' the value is negated.
- */
- int getOffset(char pos, char neg) const;
-
- /**
* Returns the sprite direction of this being.
*/
SpriteDirection
@@ -371,6 +365,11 @@ class Being : public Sprite
Sint32 mPx, mPy; /**< Pixel coordinates */
std::vector<AnimatedSprite*> mSprites;
+
+ private:
+ Sint16 mStepX, mStepY;
+ Uint16 mStepTime;
+ int getOffset(int) const;
};
#endif