From 98db78be9552b039090ce5dfc53803df2dd54b41 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 3 Feb 2012 18:59:37 +0300 Subject: Add some missing getters. --- src/map.h | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'src/map.h') diff --git a/src/map.h b/src/map.h index f336a7a72..e157628cc 100644 --- a/src/map.h +++ b/src/map.h @@ -192,7 +192,7 @@ class MapLayer: public ConfigListener const Actors *actors, int mDebugFlags, int yFix) const; - bool isFringeLayer() + bool isFringeLayer() const { return mIsFringeLayer; } void setSpecialLayer(SpecialLayer *val) @@ -201,10 +201,10 @@ class MapLayer: public ConfigListener void setTempLayer(SpecialLayer *val) { mTempLayer = val; } - int getWidth() + int getWidth() const { return mWidth; } - int getHeight() + int getHeight() const { return mHeight; } // void setTileInfo(int x, int y, int width, int cnt); @@ -356,12 +356,14 @@ class Map : public Properties, public ConfigListener /** * Returns the width of this map in tiles. */ - int getWidth() const { return mWidth; } + int getWidth() const + { return mWidth; } /** * Returns the height of this map in tiles. */ - int getHeight() const { return mHeight; } + int getHeight() const + { return mHeight; } /** * Returns the tile width of this map. @@ -376,6 +378,7 @@ class Map : public Properties, public ConfigListener { return mTileHeight; } const std::string getMusicFile() const; + const std::string getName() const; /** @@ -435,16 +438,16 @@ class Map : public Properties, public ConfigListener void saveExtraLayer(); - SpecialLayer *getTempLayer() + SpecialLayer *getTempLayer() const { return mTempLayer; } - SpecialLayer *getSpecialLayer() + SpecialLayer *getSpecialLayer() const { return mSpecialLayer; } void setHasWarps(bool n) { mHasWarps = n; } - bool getHasWarps() + bool getHasWarps() const { return mHasWarps; } std::string getUserMapDirectory() const; @@ -477,7 +480,7 @@ class Map : public Properties, public ConfigListener void setPvpMode(int mode); - ObjectsLayer* getObjectsLayer() + ObjectsLayer* getObjectsLayer() const { return mObjects; } std::string getObjectData(unsigned x, unsigned y, int type); @@ -489,7 +492,7 @@ class Map : public Properties, public ConfigListener void setActorsFix(int x, int y) { mActorFixX = x; mActorFixY = y; } - int getVersion() + int getVersion() const { return mVersion; } void setVersion(int n) @@ -499,7 +502,7 @@ class Map : public Properties, public ConfigListener void redrawMap(); - bool empty() + bool empty() const { return mLayers.empty(); } protected: -- cgit v1.2.3-60-g2f50