summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp30
1 files changed, 6 insertions, 24 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 89c34ee6..8a768e07 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -123,30 +123,6 @@ Map::getMetaTile(int x, int y)
return &metaTiles[x + y * width];
}
-int
-Map::getWidth()
-{
- return width;
-}
-
-int
-Map::getHeight()
-{
- return height;
-}
-
-int
-Map::getTileWidth()
-{
- return tileWidth;
-}
-
-int
-Map::getTileHeight()
-{
- return tileHeight;
-}
-
std::list<PATH_NODE>
Map::findPath(int startX, int startY, int destX, int destY)
{
@@ -305,3 +281,9 @@ 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);
+}