summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2010-02-09 01:42:50 +0100
committerBertram <bertram@cegetel.net>2010-02-09 01:42:50 +0100
commit56f501c8148b1061a02547d37b20eeeeb64029db (patch)
tree718e48289066706bc3851830f3c6b03150e66b97 /src/map.h
parent8b4d9f9b5eaf175baf0c4209c312133bb457742c (diff)
downloadmana-client-56f501c8148b1061a02547d37b20eeeeb64029db.tar.gz
mana-client-56f501c8148b1061a02547d37b20eeeeb64029db.tar.bz2
mana-client-56f501c8148b1061a02547d37b20eeeeb64029db.tar.xz
mana-client-56f501c8148b1061a02547d37b20eeeeb64029db.zip
Made the Beings' logic be able to handle any tile height/width.
This is the First step to get rid of most hardcoded 32 values.
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;