diff options
Diffstat (limited to 'src/tileset.h')
-rw-r--r-- | src/tileset.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/tileset.h b/src/tileset.h index c21d6948a..5c21e8835 100644 --- a/src/tileset.h +++ b/src/tileset.h @@ -47,8 +47,28 @@ class Tileset : public ImageSet int getFirstGid() const { return mFirstGid; } + /** + * Set tileset property. + */ + void setProperties(std::map<std::string, std::string> props) + { mProperties = props; } + + /** + * Returns property value. + */ + std::string getProperty(std::string name) + { + std::map<std::string, std::string>::const_iterator + it = mProperties.find(name); + if (it == mProperties.end()) + return ""; + return mProperties[name]; + } + private: int mFirstGid; + + std::map<std::string, std::string> mProperties; }; #endif |