Skip to content

Commit

Permalink
fix lag on big worlds
Browse files Browse the repository at this point in the history
  • Loading branch information
MESYETI committed Sep 1, 2022
1 parent 40b7288 commit 0a9a6b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/game.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ void Game::Render(App& app) {
start.y = camera.y > 0? camera.y : 0;

for (
ssize_t i = start.y / GAME_BLOCK_SIZE; (i < max.y) && (i < level.size.y); ++i
ssize_t i = start.y; (i < max.y) && (i < level.size.y); ++i
) {
for (
ssize_t j = start.x / GAME_BLOCK_SIZE; (j < max.x) && (j < level.size.x);
ssize_t j = start.x; (j < max.x) && (j < level.size.x);
++j
) {

Expand Down

0 comments on commit 0a9a6b7

Please sign in to comment.