From 5a27795be5450add2cf3da3c03b2fe8771325e3e Mon Sep 17 00:00:00 2001 From: Chuck Miller Date: Mon, 27 Jul 2009 19:32:32 -0400 Subject: Makes mX and mY in the being class private --- src/being.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/being.h') diff --git a/src/being.h b/src/being.h index 9213a2dc..e16e464d 100644 --- a/src/being.h +++ b/src/being.h @@ -149,7 +149,6 @@ class Being : public Sprite, public ConfigListener enum { DOWN = 1, LEFT = 2, UP = 4, RIGHT = 8 }; #ifdef EATHENA_SUPPORT - Uint16 mX, mY; /**< Tile coordinates */ int mFrame; int mWalkTime; #endif @@ -209,6 +208,21 @@ class Being : public Sprite, public ConfigListener const Vector &getDestination() const { return mDest; } #endif + /** + * Returns the tile x or y coord + */ + int getTileX() const + { return mX; } + + int getTileY() const + { return mY; } + + /** + * Sets the tile x or y coord + */ + void setTileCoords(int x, int y) + { mX = x; mY = y; } + /** * Puts a "speech balloon" above this being for the specified amount * of time. @@ -603,6 +617,7 @@ class Being : public Sprite, public ConfigListener Vector mPos; Vector mDest; int mPx, mPy; /**< Position in pixels */ + int mX, mY; /**< Position on tile */ /** Target cursor being used */ SimpleAnimation* mUsedTargetCursor; -- cgit v1.2.3-70-g09d2