summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomer Shalev <shalev.tomer@gmail.com>2010-04-20 09:08:21 +0000
committerTomer Shalev <shalev.tomer@gmail.com>2010-04-20 09:08:21 +0000
commitdd8b40701ee4b4d12d162adf2bf153342f35d7ba (patch)
treee98ad4b09b10bdc51236a7e5c36eb163c383323b
parent5c7a76d596154d8861c4ee43860dbe688dcf1a6f (diff)
downloadrockbox-dd8b40701ee4b4d12d162adf2bf153342f35d7ba.tar.gz
rockbox-dd8b40701ee4b4d12d162adf2bf153342f35d7ba.tar.bz2
rockbox-dd8b40701ee4b4d12d162adf2bf153342f35d7ba.zip
Brickmania: Fix bogus fires
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25690 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/brickmania.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c
index 2fda2d3ec0..bc446df179 100644
--- a/apps/plugins/brickmania.c
+++ b/apps/plugins/brickmania.c
@@ -1631,7 +1631,8 @@ static int brickmania_game_loop(void)
j = (fire[k].x_pos - LEFTMARGIN) / BRICK_WIDTH;
for (i=NUM_BRICKS_ROWS-1;i>=0;i--)
{
-
+ if (TOPMARGIN + i*BRICK_HEIGHT<=fire[k].top)
+ break;
if (brick[i][j].used)
{
score += SCORE_FIRE_HIT_BRICK;
@@ -1642,8 +1643,6 @@ static int brickmania_game_loop(void)
k--;
break;
}
- if (TOPMARGIN + i*BRICK_HEIGHT<=fire[k].top)
- break;
}
}
}