From bd0a58997677f4a73a2f5a3c5f4a30835d79c91b Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 27 Aug 2006 16:23:56 +0000 Subject: Introduced Point class to replace the confusing and clumsy usage of std::pair. --- src/map.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/map.cpp') diff --git a/src/map.cpp b/src/map.cpp index 8a768e07..6487b700 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -41,7 +41,7 @@ Location::Location(int x, int y, MetaTile *tile): bool Location::operator< (const Location &loc) const { - return tile->Fcost > loc.tile->Fcost; + return tile->Fcost > loc.tile->Fcost; } @@ -281,9 +281,3 @@ Map::findPath(int startX, int startY, int destX, int destY) return path; } - -bool areAround(unsigned x1, unsigned y1, unsigned x2, unsigned y2) -{ - return (abs(x1 - x2) <= (int)AROUND_AREA && - abs(y1 - y2) <= (int)AROUND_AREA); -} -- cgit v1.2.3-70-g09d2