diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-06-06 16:44:25 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-06-06 16:44:25 -0400 |
commit | 456122f5f0086ed0dbe1b784266b96e9624aa8e1 (patch) | |
tree | e67b3715b579164e92b9ce4c99d5ce676ae05596 /src/game.h | |
parent | d851eae8e7cb4192dcd7213dd1a8b60064156b15 (diff) | |
download | ether-456122f5f0086ed0dbe1b784266b96e9624aa8e1.tar.gz ether-456122f5f0086ed0dbe1b784266b96e9624aa8e1.tar.bz2 ether-456122f5f0086ed0dbe1b784266b96e9624aa8e1.zip |
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.
Diffstat (limited to 'src/game.h')
-rw-r--r-- | src/game.h | 11 |
1 files changed, 9 insertions, 2 deletions
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: | |||
92 | int player_y = 0; | 92 | int player_y = 0; |
93 | bool renderPlayer = true; | 93 | bool renderPlayer = true; |
94 | 94 | ||
95 | int curZoom = INIT_ZOOM; | ||
96 | int maxZoom = INIT_ZOOM; | 95 | int maxZoom = INIT_ZOOM; |
97 | 96 | ||
97 | int curZoom = INIT_ZOOM; | ||
98 | int curBoundX = map.getLeft(); | ||
99 | int curBoundY = map.getTop(); | ||
100 | |||
98 | bool zooming = false; | 101 | bool zooming = false; |
99 | //size_t oldZoom; | ||
100 | int zoomProgress = 0; | 102 | int zoomProgress = 0; |
103 | int zoomLength; | ||
104 | int lastZoomTop; | ||
105 | int lastZoomLeft; | ||
106 | int lastZoomWidth; | ||
107 | int lastZoomHeight; | ||
101 | 108 | ||
102 | bool firstInput = false; | 109 | bool firstInput = false; |
103 | Input lastInput; | 110 | Input lastInput; |