From 9e7d90f2c93e0158e4c6312f8cf77fe9dd1583fd Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 21 Oct 2015 22:53:37 +0300 Subject: Add support for layers with conditional tiles. For enable this mode for layer need add property: TileCondition and set value to one of BlockMask bits. --- src/resources/map/map.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/resources/map/map.cpp') diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index de6090dc2..d05bb2c23 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -1645,3 +1645,17 @@ void Map::setActorsFix(const int x, const int y) if (mFringeLayer) mFringeLayer->setActorsFix(y); } + +void Map::updateConditionLayers() +{ + mRedrawMap = true; + + FOR_EACH (LayersCIter, it, mLayers) + { + MapLayer *const layer = *it; + if (!layer || layer->mTileCondition == -1) + continue; + layer->updateConditionTiles(mMetaTiles, + mWidth, mHeight); + } +} -- cgit v1.2.3-70-g09d2