summaryrefslogtreecommitdiff
path: root/src/being/being.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-17 21:09:37 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-17 21:12:04 +0300
commit17f2adad3ba9e6a5c64d2d923d9cbb190f234b6f (patch)
tree7599d726f1c640cb94c675f4e889b91a9fabe67b /src/being/being.h
parent01e2baa778318150bdd1829836cfff9e677cf72c (diff)
downloadmv-17f2adad3ba9e6a5c64d2d923d9cbb190f234b6f.tar.gz
mv-17f2adad3ba9e6a5c64d2d923d9cbb190f234b6f.tar.bz2
mv-17f2adad3ba9e6a5c64d2d923d9cbb190f234b6f.tar.xz
mv-17f2adad3ba9e6a5c64d2d923d9cbb190f234b6f.zip
fix beings draw order with tile heights.
Diffstat (limited to 'src/being/being.h')
-rw-r--r--src/being/being.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/being/being.h b/src/being/being.h
index 8ac288137..f6e2d3f49 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -897,6 +897,9 @@ class Being : public ActorSprite, public ConfigListener
*/
void setPath(const Path &path);
+ int getSortPixelY() const A_WARN_UNUSED
+ { return static_cast<int>(mPos.y) - mYDiff - mSortOffsetY; }
+
protected:
/**
* Updates name's location.
@@ -1001,10 +1004,10 @@ class Being : public ActorSprite, public ConfigListener
Being *mOwner;
Particle *mSpecialParticle;
- int mX; // position in tiles
- int mY; // position in tiles
- int mOffsetX; // offset in pixels
- int mOffsetY; // offset in pixels
+ int mX; // position in tiles
+ int mY; // position in tiles
+ int mSortOffsetY; // caculated offset in pixels based on mOffsetY
+ int mOffsetY; // fixed tile height offset in pixels
uint8_t mOldHeight;
int mDamageTaken;