summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-12 13:32:49 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-17 14:53:41 +0300
commit8571843f1405e676142e7bb289f9879d10a888ed (patch)
treee414c90b31979372220fa5c78f9ebb6cc05cd024 /src/map.h
parent3d8682618f0b46a334f9db5dd0c780f671e7f072 (diff)
downloadplus-8571843f1405e676142e7bb289f9879d10a888ed.tar.gz
plus-8571843f1405e676142e7bb289f9879d10a888ed.tar.bz2
plus-8571843f1405e676142e7bb289f9879d10a888ed.tar.xz
plus-8571843f1405e676142e7bb289f9879d10a888ed.zip
add walkmaps support.
Fast detecting between two targets is they in same walkable area.
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h11
1 files changed, 11 insertions, 0 deletions
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<Tileset*> Tilesets;
typedef std::vector<MapLayer*> 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;