diff options
Diffstat (limited to 'src/object.cpp')
-rw-r--r-- | src/object.cpp | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/object.cpp b/src/object.cpp index 2418f086..ce1b2bc1 100644 --- a/src/object.cpp +++ b/src/object.cpp @@ -32,9 +32,9 @@ namespace tmwserv * Default constructor. */ Object::Object(void) - : mX(0), - mY(0), - mNeedUpdate(false) + : mNeedUpdate(false), + mX(0), + mY(0) { mStats.health = 0; mStats.attack = 0; @@ -96,6 +96,27 @@ Object::getY(void) const /** + * Set the coordinates. + */ +void +Object::setXY(unsigned int x, unsigned int y) +{ + mX = x; + mY = y; +} + + +/** + * Get the coordinates. + */ +std::pair<unsigned int, unsigned int> +Object::getXY(void) const +{ + return std::make_pair(mX, mY); +} + + +/** * Set the statistics. */ void |