summaryrefslogtreecommitdiff
path: root/src/gui/viewport.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/viewport.h')
-rw-r--r--src/gui/viewport.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index a03137761..fa02f244b 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -154,10 +154,10 @@ class Viewport final : public WindowContainer,
{ return mCameraRelativeY; }
void setCameraRelativeX(const int n)
- { mCameraRelativeX = n; }
+ { mCameraRelativeX = n; updateMidVars(); }
void setCameraRelativeY(const int n)
- { mCameraRelativeY = n; }
+ { mCameraRelativeY = n; updateMidVars(); }
void moveCameraToActor(const BeingId actorId,
const int x = 0,
@@ -171,6 +171,8 @@ class Viewport final : public WindowContainer,
void getMouseTile(int &destX, int &destY) const;
+ void videoResized();
+
int mMouseX; /**< Current mouse position in pixels. */
int mMouseY; /**< Current mouse position in pixels. */
@@ -180,6 +182,8 @@ class Viewport final : public WindowContainer,
/// Clears any matching hovers
void clearHover(const ActorSprite *const actor);
+ void updateMidVars();
+
static void validateSpeed();
private:
@@ -227,6 +231,8 @@ class Viewport final : public WindowContainer,
int mMousePressY;
int mPixelViewX; /**< Current viewpoint in pixels. */
int mPixelViewY; /**< Current viewpoint in pixels. */
+ int mMidTileX;
+ int mMidTileY;
int mLocalWalkTime; /**< Timestamp before the next walk can be sent. */