From fe452a0de38b3dfc5fa7d698e890cb234e635487 Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Fri, 18 Dec 2009 03:37:28 +0000 Subject: Accept FS #10568 by Asael Reiter: Brickmania Lasers not working properly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24061 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/brickmania.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'apps/plugins') diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index 5ea9ae7c60..52bfcd2727 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c @@ -1589,9 +1589,9 @@ static int brickmania_game_loop(void) rght_brick.p2.y = brick[bnum].powertop + BRICK_HEIGHT; /* Check if any of the active fires hit a brick */ - if (pad_type == SHOOTER) + for (k=0;k<30;k++) { - for (k=0;k<30;k++) + if(fire[k].top > 0) { /* Use misc_line to check if fire hit brick */ misc_line.p1.x = fire[k].x_pos; @@ -1601,8 +1601,7 @@ static int brickmania_game_loop(void) misc_line.p2.y = fire[k].top + SPEED_FIRE; /* If the fire hit the brick take care of it */ - if (fire[k].top > 0 && - check_lines(&misc_line, &bot_brick, + if (check_lines(&misc_line, &bot_brick, &pt_hit)) { score+=13; @@ -1612,7 +1611,7 @@ static int brickmania_game_loop(void) } } } - + /* Draw the brick */ rb->lcd_bitmap_part(brickmania_bricks,0, INT3(BRICK_HEIGHT)*brick[bnum].color, -- cgit v1.2.3