summaryrefslogtreecommitdiff
path: root/src/actor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/actor.h')
-rw-r--r--src/actor.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/actor.h b/src/actor.h
index 654141221..9afaff93d 100644
--- a/src/actor.h
+++ b/src/actor.h
@@ -88,6 +88,12 @@ public:
{ return static_cast<int>(mPos.y); }
/**
+ * Returns the pixel Y coordinate of the actor for sorting only.
+ */
+ virtual int getSortPixelY() const
+ { return static_cast<int>(mPos.y) - mYDiff; }
+
+ /**
* Returns the x coordinate in tiles of the actor.
*/
virtual int getTileX() const;
@@ -121,6 +127,7 @@ public:
protected:
Map *mMap;
Vector mPos; /**< Position in pixels relative to map. */
+ int mYDiff;
private:
Actors::iterator mMapActor;