From d7904f7b7e25bbdd7205e5c18e06d184b2078732 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 14 Jun 2005 09:27:43 +0000 Subject: Added support for map properties, which minimap and background music functionality can be based upon. --- src/map.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/map.h') 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 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 properties; // Pathfinding members int onClosedList, onOpenList; -- cgit v1.2.3-70-g09d2