summaryrefslogtreecommitdiff
path: root/src/gui
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
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')
-rw-r--r--src/gui/popups/statuspopup.cpp2
-rw-r--r--src/gui/viewport.cpp25
-rw-r--r--src/gui/viewport.h12
-rw-r--r--src/gui/windows/statuswindow.cpp2
4 files changed, 22 insertions, 19 deletions
diff --git a/src/gui/popups/statuspopup.cpp b/src/gui/popups/statuspopup.cpp
index a1e0b502c..f2f934d1b 100644
--- a/src/gui/popups/statuspopup.cpp
+++ b/src/gui/popups/statuspopup.cpp
@@ -154,7 +154,7 @@ void StatusPopup::updateLabels() const
InputAction::SWITCH_QUICK_DROP);
setLabelText(7, player_node->getPickUpTypeString(),
InputAction::CHANGE_PICKUP_TYPE);
- setLabelText(8, LocalPlayer::getDebugPathString(),
+ setLabelText(8, LocalPlayer::getMapDrawTypeString(),
InputAction::PATHFIND);
setLabelText(9, player_node->getMagicAttackString(),
InputAction::SWITCH_MAGIC_ATTACK);
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()
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index d401a3af4..4a7abea93 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -96,7 +96,7 @@ class Viewport final : public WindowContainer,
* debug with all images and grid, debug with out big images
* and with out grid.
*/
- void toggleDebugPath();
+ void toggleMapDrawType();
void toggleCameraMode();
@@ -242,11 +242,11 @@ class Viewport final : public WindowContainer,
void scrollBy(const int x, const int y)
{ mPixelViewX += x; mPixelViewY += y; }
- int getDebugPath() const A_WARN_UNUSED
- { return mShowDebugPath; }
+ int getMapDrawType() const A_WARN_UNUSED
+ { return mMapDrawType; }
- void setDebugPath(const int n)
- { mShowDebugPath = n; }
+ void setMapDrawType(const int n)
+ { mMapDrawType = n; }
int getCameraMode() const A_WARN_UNUSED
{ return mCameraMode; }
@@ -344,7 +344,7 @@ class Viewport final : public WindowContainer,
int mMousePressY;
int mPixelViewX; /**< Current viewpoint in pixels. */
int mPixelViewY; /**< Current viewpoint in pixels. */
- int mShowDebugPath; /**< Show a path from player to pointer. */
+ int mMapDrawType; /**< Show a path from player to pointer. */
int mCameraMode; /**< Camera mode. */
int mLocalWalkTime; /**< Timestamp before the next walk can be sent. */
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 4a4c82cf6..bf2e92e0b 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -654,7 +654,7 @@ void StatusWindow::updateStatusBar(ProgressBar *const bar,
player_node->getQuickDropCounterString()))
.append(translateLetter2(player_node->getPickUpTypeString()))
.append(" ").append(translateLetter2(
- LocalPlayer::getDebugPathString()))
+ LocalPlayer::getMapDrawTypeString()))
.append(" ").append(translateLetter2(
player_node->getImitationModeString()))
.append(translateLetter2(LocalPlayer::getCameraModeString()))