From 8571843f1405e676142e7bb289f9879d10a888ed Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 12 Mar 2013 13:32:49 +0300 Subject: add walkmaps support. Fast detecting between two targets is they in same walkable area. --- src/map.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/map.h') diff --git a/src/map.h b/src/map.h index 3f922471d..2c5e0ff9c 100644 --- a/src/map.h +++ b/src/map.h @@ -41,6 +41,7 @@ class Tileset; class SpecialLayer; class MapItem; class ObjectsLayer; +class WalkLayer; typedef std::vector Tilesets; typedef std::vector Layers; @@ -404,6 +405,15 @@ class Map final : public Properties, public ConfigListener void setAtlas(Resource *const atlas) { mAtlas = atlas; } + const MetaTile *getMetaTiles() const + { return mMetaTiles; } + + WalkLayer *getWalkLayer() + { return mWalkLayer; } + + void setWalkLayer(WalkLayer *l) + { mWalkLayer = l; } + protected: friend class Actor; friend class Minimap; @@ -451,6 +461,7 @@ class Map final : public Properties, public ConfigListener int mTileWidth, mTileHeight; int mMaxTileHeight; MetaTile *mMetaTiles; + WalkLayer *mWalkLayer; Layers mLayers; Tilesets mTilesets; Actors mActors; -- cgit v1.2.3-70-g09d2