summaryrefslogtreecommitdiff
path: root/src/tileset.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-09 23:16:24 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-12 01:30:01 +0300
commit0671c9981e922e37b8caacc84abfceb60b32aaff (patch)
tree7e5b40d7131e0b6b091475df0ed27766b6845391 /src/tileset.h
parent5692fe8584be17966f7bed2e97d22139f71619e3 (diff)
downloadManaVerse-0671c9981e922e37b8caacc84abfceb60b32aaff.tar.gz
ManaVerse-0671c9981e922e37b8caacc84abfceb60b32aaff.tar.bz2
ManaVerse-0671c9981e922e37b8caacc84abfceb60b32aaff.tar.xz
ManaVerse-0671c9981e922e37b8caacc84abfceb60b32aaff.zip
Add support for tileset properties.
Diffstat (limited to 'src/tileset.h')
-rw-r--r--src/tileset.h20
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