From 56f501c8148b1061a02547d37b20eeeeb64029db Mon Sep 17 00:00:00 2001 From: Bertram Date: Tue, 9 Feb 2010 01:42:50 +0100 Subject: 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. --- src/map.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/map.h') 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; -- cgit v1.2.3-70-g09d2