summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-06-14 09:27:43 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-06-14 09:27:43 +0000
commitd7904f7b7e25bbdd7205e5c18e06d184b2078732 (patch)
tree7f19693da61eb4a5944c220d3085530fd2e2a407 /src/map.h
parent24b1c618a11170e825598c5e22bf71f9238eae52 (diff)
downloadmana-d7904f7b7e25bbdd7205e5c18e06d184b2078732.tar.gz
mana-d7904f7b7e25bbdd7205e5c18e06d184b2078732.tar.bz2
mana-d7904f7b7e25bbdd7205e5c18e06d184b2078732.tar.xz
mana-d7904f7b7e25bbdd7205e5c18e06d184b2078732.zip
Added support for map properties, which minimap and background music
functionality can be based upon.
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/map.h b/src/map.h
index d3bf20b1..02bea4a2 100644
--- a/src/map.h
+++ b/src/map.h
@@ -159,11 +159,30 @@ class Map
std::list<PATH_NODE> findPath(
int startX, int startY, int destX, int destY);
+ /**
+ * Get a map property.
+ *
+ * @return the value of the given property or an empty string when it
+ * doesn't exist.
+ */
+ std::string getProperty(const std::string &name);
+
+ /**
+ * Returns whether a certain property is available.
+ */
+ bool hasProperty(const std::string &name);
+
+ /**
+ * Set a map property.
+ */
+ void setProperty(const std::string &name, const std::string &value);
+
private:
int width, height;
int tileWidth, tileHeight;
MetaTile *metaTiles;
Image **tiles;
+ std::map<std::string,std::string> properties;
// Pathfinding members
int onClosedList, onOpenList;