diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-06-14 09:27:43 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-06-14 09:27:43 +0000 |
commit | d7904f7b7e25bbdd7205e5c18e06d184b2078732 (patch) | |
tree | 7f19693da61eb4a5944c220d3085530fd2e2a407 /src/map.h | |
parent | 24b1c618a11170e825598c5e22bf71f9238eae52 (diff) | |
download | mana-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.h | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -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; |