diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/game.cpp b/src/game.cpp index beabc55..fc57acc 100644 --- a/src/game.cpp +++ b/src/game.cpp | |||
@@ -523,8 +523,10 @@ void Game::setZoom(size_t zoom) | |||
523 | return; | 523 | return; |
524 | } | 524 | } |
525 | 525 | ||
526 | zoomProgress = 0; | 526 | /*zoomProgress = 0; |
527 | zoomLength = std::abs(static_cast<long>(zoom - curZoom)) * TILE_WIDTH; | 527 | zoomLength = std::abs(static_cast<long>(zoom - curZoom)) * TILE_WIDTH;*/ |
528 | zoomProgress.start(62 * std::abs(static_cast<long>(zoom - curZoom)) * TILE_WIDTH); | ||
529 | oldZoom = curZoom; | ||
528 | curZoom = zoom; | 530 | curZoom = zoom; |
529 | zooming = true; | 531 | zooming = true; |
530 | loadMap(); | 532 | loadMap(); |
@@ -824,7 +826,7 @@ void Game::update(size_t frameTime) { | |||
824 | recalculateRender(); | 826 | recalculateRender(); |
825 | } | 827 | } |
826 | 828 | ||
827 | zoomTimer.accumulate(frameTime); | 829 | /*zoomTimer.accumulate(frameTime); |
828 | while (zoomTimer.step()) | 830 | while (zoomTimer.step()) |
829 | { | 831 | { |
830 | if (zooming) | 832 | if (zooming) |
@@ -836,6 +838,12 @@ void Game::update(size_t frameTime) { | |||
836 | zooming = false; | 838 | zooming = false; |
837 | } | 839 | } |
838 | } | 840 | } |
841 | }*/ | ||
842 | if (zooming) { | ||
843 | zoomProgress.tick(frameTime); | ||
844 | if (zoomProgress.isComplete()) { | ||
845 | zooming = false; | ||
846 | } | ||
839 | } | 847 | } |
840 | 848 | ||
841 | playerAnim.update(frameTime); | 849 | playerAnim.update(frameTime); |