summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 13c0a8cc0..3086a027f 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -56,7 +56,7 @@
extern volatile int tick_time;
Viewport::Viewport():
- mMap(0),
+ mMap(nullptr),
mMouseX(0),
mMouseY(0),
mPixelViewX(0.0f),
@@ -65,9 +65,9 @@ Viewport::Viewport():
mCameraMode(0),
mPlayerFollowMouse(false),
mLocalWalkTime(-1),
- mHoverBeing(0),
- mHoverItem(0),
- mHoverSign(0),
+ mHoverBeing(nullptr),
+ mHoverItem(nullptr),
+ mHoverSign(nullptr),
mCameraRelativeX(0),
mCameraRelativeY(0)
{
@@ -104,11 +104,11 @@ Viewport::~Viewport()
config.removeListener("enableLazyScrolling", this);
delete mPopupMenu;
- mPopupMenu = 0;
+ mPopupMenu = nullptr;
delete mBeingPopup;
- mBeingPopup = 0;
+ mBeingPopup = nullptr;
delete mTextPopup;
- mTextPopup = 0;
+ mTextPopup = nullptr;
}
void Viewport::setMap(Map *map)
@@ -699,7 +699,7 @@ void Viewport::showUndressPopup(int x, int y, Being *being, Item *item)
void Viewport::closePopupMenu()
{
if (mPopupMenu)
- mPopupMenu->handleLink("cancel", 0);
+ mPopupMenu->handleLink("cancel", nullptr);
}
void Viewport::optionChanged(const std::string &name A_UNUSED)
@@ -738,7 +738,7 @@ void Viewport::mouseMoved(gcn::MouseEvent &event A_UNUSED)
mBeingPopup->setVisible(false);
}
- mHoverItem = 0;
+ mHoverItem = nullptr;
if (!mHoverBeing && actorSpriteManager)
{
mHoverItem = actorSpriteManager->findItem(x / mMap->getTileWidth(),
@@ -844,17 +844,17 @@ void Viewport::hideBeingPopup()
void Viewport::clearHover(ActorSprite *actor)
{
if (mHoverBeing == actor)
- mHoverBeing = 0;
+ mHoverBeing = nullptr;
if (mHoverItem == actor)
- mHoverItem = 0;
+ mHoverItem = nullptr;
}
void Viewport::cleanHoverItems()
{
- mHoverBeing = 0;
- mHoverItem = 0;
- mHoverSign = 0;
+ mHoverBeing = nullptr;
+ mHoverItem = nullptr;
+ mHoverSign = nullptr;
}
void Viewport::moveCamera(int dx, int dy)