diff options
Diffstat (limited to 'src/renderer.cpp')
-rw-r--r-- | src/renderer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/renderer.cpp b/src/renderer.cpp index 94be197..b90372e 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp | |||
@@ -370,19 +370,19 @@ void Renderer::renderGame( | |||
370 | 370 | ||
371 | if (game.moving) { | 371 | if (game.moving) { |
372 | if (game.player_x > game.player_oldx) { | 372 | if (game.player_x > game.player_oldx) { |
373 | oldRect.x += game.moveProgress.getProgress(0, TILE_WIDTH); | ||
374 | zoomRect.x += game.moveProgress.getProgress(0, TILE_WIDTH); | ||
375 | } else if (game.player_x < game.player_oldx) { | ||
376 | oldRect.x -= game.moveProgress.getProgress(TILE_WIDTH, 0); | 373 | oldRect.x -= game.moveProgress.getProgress(TILE_WIDTH, 0); |
377 | zoomRect.x -= game.moveProgress.getProgress(TILE_WIDTH, 0); | 374 | zoomRect.x -= game.moveProgress.getProgress(TILE_WIDTH, 0); |
375 | } else if (game.player_x < game.player_oldx) { | ||
376 | oldRect.x += game.moveProgress.getProgress(TILE_WIDTH, 0); | ||
377 | zoomRect.x += game.moveProgress.getProgress(TILE_WIDTH, 0); | ||
378 | } | 378 | } |
379 | 379 | ||
380 | if (game.player_y > game.player_oldy) { | 380 | if (game.player_y > game.player_oldy) { |
381 | oldRect.y += game.moveProgress.getProgress(0, TILE_HEIGHT); | ||
382 | zoomRect.y += game.moveProgress.getProgress(0, TILE_HEIGHT); | ||
383 | } else if (game.player_y < game.player_oldy) { | ||
384 | oldRect.y -= game.moveProgress.getProgress(TILE_HEIGHT, 0); | 381 | oldRect.y -= game.moveProgress.getProgress(TILE_HEIGHT, 0); |
385 | zoomRect.y -= game.moveProgress.getProgress(TILE_HEIGHT, 0); | 382 | zoomRect.y -= game.moveProgress.getProgress(TILE_HEIGHT, 0); |
383 | } else if (game.player_y < game.player_oldy) { | ||
384 | oldRect.y += game.moveProgress.getProgress(TILE_HEIGHT, 0); | ||
385 | zoomRect.y += game.moveProgress.getProgress(TILE_HEIGHT, 0); | ||
386 | } | 386 | } |
387 | } | 387 | } |
388 | 388 | ||