diff options
-rw-r--r-- | src/map.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/map.cpp b/src/map.cpp index 3e83f2e6c..ee4aae14a 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -54,8 +54,6 @@ #include "debug.h" -bool actorCompare(const Actor *a, const Actor *b); - /** * A location on a tile map. Used for pathfinding, open list. */ @@ -80,6 +78,17 @@ struct Location MetaTile *tile; }; +class ActorFunctuator +{ + public: + bool operator()(const Actor *a, const Actor *b) const + { + if (!a || !b) + return false; + return a->getPixelY() < b->getPixelY(); + } +} actorCompare; + TileAnimation::TileAnimation(Animation *ani): mLastImage(NULL) { @@ -779,14 +788,6 @@ void Map::addTileset(Tileset *tileset) mMaxTileHeight = tileset->getHeight(); } -bool actorCompare(const Actor *a, const Actor *b) -{ - if (!a || !b) - return false; - - return a->getPixelY() < b->getPixelY(); -} - void Map::update(int ticks) { // Update animated tiles |