summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 5bbe2d07..af9c2c39 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -979,3 +979,19 @@ void Game::changeMap(const std::string &mapPath)
event.setString("mapPath", mapPath);
event.trigger(Event::GameChannel);
}
+
+int Game::getCurrentTileWidth() const
+{
+ if (mCurrentMap)
+ return mCurrentMap->getTileWidth();
+
+ return DEFAULT_TILE_LENGTH;
+}
+
+int Game::getCurrentTileHeight() const
+{
+ if (mCurrentMap)
+ return mCurrentMap->getTileHeight();
+
+ return DEFAULT_TILE_LENGTH;
+}