diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-14 16:24:01 -0400 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-14 16:24:01 -0400 |
| commit | 7e89f42c388b92f264f58c4750e8529745a1f9f4 (patch) | |
| tree | 0500087bcb7101ab2ee9b015d7330131bf4c69ff | |
| parent | 20c59e13e88da77bf2e231a4ad3c94f5d218ac0a (diff) | |
| download | ether-7e89f42c388b92f264f58c4750e8529745a1f9f4.tar.gz ether-7e89f42c388b92f264f58c4750e8529745a1f9f4.tar.bz2 ether-7e89f42c388b92f264f58c4750e8529745a1f9f4.zip | |
a lot faster now thanks to only ticking on-screen every loop
flickering while moving now though
| -rw-r--r-- | src/game.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
| diff --git a/src/game.cpp b/src/game.cpp index 62e755b..af57b56 100644 --- a/src/game.cpp +++ b/src/game.cpp | |||
| @@ -807,9 +807,14 @@ void Game::update(size_t frameTime) { | |||
| 807 | } | 807 | } |
| 808 | } | 808 | } |
| 809 | 809 | ||
| 810 | tick(true); | 810 | int x1 = player_x - curZoom * ZOOM_X_FACTOR / 2 - 1; |
| 811 | tick(true); | 811 | int y1 = player_y - curZoom * ZOOM_Y_FACTOR / 2 - 1; |
| 812 | tick(true); | 812 | int x2 = player_x + curZoom * ZOOM_X_FACTOR / 2 + 2; |
| 813 | int y2 = player_y + curZoom * ZOOM_Y_FACTOR / 2 + 2; | ||
| 814 | |||
| 815 | tick(x1, y1, x2, y2, false, true); | ||
| 816 | tick(x1, y1, x2, y2, false, true); | ||
| 817 | tick(x1, y1, x2, y2, false, true); | ||
| 813 | 818 | ||
| 814 | // TODO: better zoom algorithm | 819 | // TODO: better zoom algorithm |
| 815 | setZoom(litSpots / 1500 + INIT_ZOOM); | 820 | setZoom(litSpots / 1500 + INIT_ZOOM); |
