summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map.h b/src/map.h
index 116daf40..f5f74995 100644
--- a/src/map.h
+++ b/src/map.h
@@ -256,12 +256,14 @@ class Map : public Properties
/**
* Returns the tile width of this map.
*/
- int getTileWidth() const { return mTileWidth; }
+ int getTileWidth() const
+ { return mTileWidth > 0 ? mTileWidth : DEFAULT_TILE_SIDE_LENGTH; }
/**
* Returns the tile height used by this map.
*/
- int getTileHeight() const { return mTileHeight; }
+ int getTileHeight() const
+ { return mTileHeight > 0 ? mTileHeight : DEFAULT_TILE_SIDE_LENGTH; }
const std::string &getMusicFile() const;
const std::string &getName() const;