summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 2c7524a4..f172ad56 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -89,6 +89,7 @@ bool Location::operator< (const Location &loc) const
Map::Map():
width(0), height(0),
+ tileWidth(32), tileHeight(32),
onClosedList(1), onOpenList(2)
{
tiles = new Tile[width * height];
@@ -96,6 +97,7 @@ Map::Map():
Map::Map(int width, int height):
width(width), height(height),
+ tileWidth(32), tileHeight(32),
onClosedList(1), onOpenList(2)
{
tiles = new Tile[width * height];
@@ -227,6 +229,16 @@ int Map::getHeight()
return height;
}
+int Map::getTileWidth()
+{
+ return tileWidth;
+}
+
+int Map::getTileHeight()
+{
+ return tileHeight;
+}
+
PATH_NODE *Map::findPath(int startX, int startY, int destX, int destY)
{
// Declare open list, a list with open tiles sorted on F cost