From 6e052536a2dfb7f877a356477bc86c904aae1e71 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 9 Jul 2014 11:49:46 +0300 Subject: Add empty map mode without collisions. Mode can be switched from yellow bar. Also renamed map draw type related variables and methods. --- src/resources/map/map.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/resources/map/map.cpp') diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index 3d13ba2e5..e588d12bc 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -89,7 +89,7 @@ Map::Map(const int width, const int height, mTilesets(), mActors(), mHasWarps(false), - mDebugFlags(MapType::NORMAL), + mDrawLayersFlags(MapType::NORMAL), mOnClosedList(1), mOnOpenList(2), mBackgrounds(), @@ -340,7 +340,7 @@ void Map::draw(Graphics *const graphics, int scrollX, int scrollY) // Draw backgrounds drawAmbientLayers(graphics, BACKGROUND_LAYERS, mOverlayDetail); - if (mDebugFlags == MapType::BLACKWHITE && userPalette) + if (mDrawLayersFlags == MapType::BLACKWHITE && userPalette) { graphics->setColor(userPalette->getColorWithAlpha( UserPalette::WALKABLE_HIGHLIGHT)); @@ -378,14 +378,16 @@ void Map::draw(Graphics *const graphics, int scrollX, int scrollY) } #endif - if (mDebugFlags == MapType::SPECIAL3 || mDebugFlags == MapType::BLACKWHITE) + if (mDrawLayersFlags == MapType::SPECIAL3 + || mDrawLayersFlags == MapType::SPECIAL4 + || mDrawLayersFlags == MapType::BLACKWHITE) { if (mFringeLayer) { mFringeLayer->setSpecialLayer(mSpecialLayer); mFringeLayer->setTempLayer(mTempLayer); mFringeLayer->drawFringe(graphics, startX, startY, endX, endY, - scrollX, scrollY, &mActors, mDebugFlags, mActorFixY); + scrollX, scrollY, &mActors, mDrawLayersFlags, mActorFixY); } } else @@ -403,11 +405,11 @@ void Map::draw(Graphics *const graphics, int scrollX, int scrollY) { layer->setSpecialLayer(mSpecialLayer); layer->setTempLayer(mTempLayer); - if (mDebugFlags == MapType::SPECIAL2) + if (mDrawLayersFlags == MapType::SPECIAL2) overFringe = true; layer->drawFringe(graphics, startX, startY, endX, endY, - scrollX, scrollY, &mActors, mDebugFlags, mActorFixY); + scrollX, scrollY, &mActors, mDrawLayersFlags, mActorFixY); } else { @@ -419,7 +421,7 @@ void Map::draw(Graphics *const graphics, int scrollX, int scrollY) if (updateFlag) { layer->updateOGL(graphics, startX, startY, - endX, endY, scrollX, scrollY, mDebugFlags); + endX, endY, scrollX, scrollY, mDrawLayersFlags); } layer->drawOGL(graphics); @@ -428,7 +430,7 @@ void Map::draw(Graphics *const graphics, int scrollX, int scrollY) #endif { layer->draw(graphics, startX, startY, endX, endY, - scrollX, scrollY, mDebugFlags); + scrollX, scrollY, mDrawLayersFlags); } } } -- cgit v1.2.3-70-g09d2