From 456122f5f0086ed0dbe1b784266b96e9624aa8e1 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 6 Jun 2018 16:44:25 -0400 Subject: zooming fixes when zooming out, the view center stays the same (shifted by map edges). when zooming in, the view center becomes the player position at the start of zoom. the boundary of player movement is now also set to the target view area at start of zoom. --- src/game.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/game.h') diff --git a/src/game.h b/src/game.h index 6d8a64f..200b691 100644 --- a/src/game.h +++ b/src/game.h @@ -92,12 +92,19 @@ public: int player_y = 0; bool renderPlayer = true; - int curZoom = INIT_ZOOM; int maxZoom = INIT_ZOOM; + int curZoom = INIT_ZOOM; + int curBoundX = map.getLeft(); + int curBoundY = map.getTop(); + bool zooming = false; - //size_t oldZoom; int zoomProgress = 0; + int zoomLength; + int lastZoomTop; + int lastZoomLeft; + int lastZoomWidth; + int lastZoomHeight; bool firstInput = false; Input lastInput; -- cgit 1.4.1