summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-09 11:49:46 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-09 11:49:46 +0300
commit6e052536a2dfb7f877a356477bc86c904aae1e71 (patch)
treecfe31d967d591a99609eea758bb2823769ab9edb /src/gui/viewport.cpp
parentacb8d0c088c2d4368b73b3c1c1d7eb13bad49aa0 (diff)
downloadplus-6e052536a2dfb7f877a356477bc86c904aae1e71.tar.gz
plus-6e052536a2dfb7f877a356477bc86c904aae1e71.tar.bz2
plus-6e052536a2dfb7f877a356477bc86c904aae1e71.tar.xz
plus-6e052536a2dfb7f877a356477bc86c904aae1e71.zip
Add empty map mode without collisions.
Mode can be switched from yellow bar. Also renamed map draw type related variables and methods.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 225b88f30..1c0694ca3 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -79,7 +79,7 @@ Viewport::Viewport() :
mMousePressY(0),
mPixelViewX(0),
mPixelViewY(0),
- mShowDebugPath(MapType::NORMAL),
+ mMapDrawType(MapType::NORMAL),
mCameraMode(0),
mLocalWalkTime(-1),
mCameraRelativeX(0),
@@ -122,7 +122,7 @@ Viewport::~Viewport()
void Viewport::setMap(Map *const map)
{
if (mMap && map)
- map->setDebugFlags(mMap->getDebugFlags());
+ map->setDrawLayersFlags(mMap->getDrawLayersFlags());
mMap = map;
}
@@ -237,11 +237,14 @@ void Viewport::draw(Graphics *graphics)
// Draw tiles and sprites
mMap->draw(graphics, mPixelViewX, mPixelViewY);
- if (mShowDebugPath)
+ if (mMapDrawType != MapType::NORMAL)
{
- mMap->drawCollision(graphics, mPixelViewX,
- mPixelViewY, mShowDebugPath);
- if (mShowDebugPath == MapType::DEBUG)
+ if (mMapDrawType != MapType::SPECIAL4)
+ {
+ mMap->drawCollision(graphics, mPixelViewX,
+ mPixelViewY, mMapDrawType);
+ }
+ if (mMapDrawType == MapType::DEBUG)
drawDebugPath(graphics);
}
@@ -990,13 +993,13 @@ void Viewport::mouseMoved(MouseEvent &event A_UNUSED)
}
}
-void Viewport::toggleDebugPath()
+void Viewport::toggleMapDrawType()
{
- mShowDebugPath++;
- if (mShowDebugPath > MapType::BLACKWHITE)
- mShowDebugPath = MapType::NORMAL;
+ mMapDrawType++;
+ if (mMapDrawType > MapType::BLACKWHITE)
+ mMapDrawType = MapType::NORMAL;
if (mMap)
- mMap->setDebugFlags(mShowDebugPath);
+ mMap->setDrawLayersFlags(mMapDrawType);
}
void Viewport::toggleCameraMode()