summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 5f522dfb..24c9b5b4 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -177,6 +177,28 @@ int Map::getTileHeight()
return tileHeight;
}
+std::string Map::getProperty(const std::string &name)
+{
+ std::map<std::string,std::string>::iterator i = properties.find(name);
+
+ if (i != properties.end())
+ {
+ return (*i).second;
+ }
+
+ return "";
+}
+
+bool Map::hasProperty(const std::string &name)
+{
+ return (properties.find(name) != properties.end());
+}
+
+void Map::setProperty(const std::string &name, const std::string &value)
+{
+ properties[name] = value;
+}
+
std::list<PATH_NODE> Map::findPath(
int startX, int startY, int destX, int destY)
{