From: Ricardo Cruz Date: Tue, 11 May 2004 23:37:12 +0000 (+0000) Subject: Bottom tiles were not being drawn right when vertical scrolling was enabled. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=3801943d825bf1f9293d4ea769bc1a55073d6b00;p=supertux.git Bottom tiles were not being drawn right when vertical scrolling was enabled. SVN-Revision: 1120 --- diff --git a/src/world.cpp b/src/world.cpp index b05c1421f..d539bfee4 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -197,7 +197,7 @@ World::draw() } /* Draw background: */ - for (y = 0; y < 15; ++y) + for (y = 0; y < 16 && y < level->height; ++y) { for (x = 0; x < 21; ++x) { @@ -207,7 +207,7 @@ World::draw() } /* Draw interactive tiles: */ - for (y = 0; y < 15; ++y) + for (y = 0; y < 16 && y < level->height; ++y) { for (x = 0; x < 21; ++x) { @@ -241,7 +241,7 @@ World::draw() broken_bricks[i]->draw(); /* Draw foreground: */ - for (y = 0; y < 15; ++y) + for (y = 0; y < 16 && y < level->height; ++y) { for (x = 0; x < 21; ++x) {