From 9d8e07a3fc1e298f4e619dac1d9a50d8c3dae9bf Mon Sep 17 00:00:00 2001 From: Tomer Shalev Date: Fri, 19 Feb 2010 07:16:09 +0000 Subject: Brickmania: Use constant for number of fires Part of FS#10485 by Asael Reiter git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24764 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/brickmania.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'apps/plugins') diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index 568d310..9694ff5 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c @@ -778,6 +778,7 @@ static unsigned char levels[40][8][10] = }; #define MAX_BALLS 10 +#define MAX_FIRES 30 enum difficulty_options { EASY, NORMAL @@ -838,7 +839,7 @@ typedef struct sfire { int top; /* This stores the fire y position, it is a fixed point num */ int x_pos; /* This stores the fire x position, it is a whole number */ } sfire; -sfire fire[30]; +sfire fire[MAX_FIRES]; #define CONFIG_FILE_NAME "brickmania.cfg" #define SAVE_FILE PLUGIN_GAMES_DIR "/brickmania.save" @@ -990,7 +991,7 @@ static void brickmania_init_game(bool new_game) } } - for(i=0;i<30;i++) { + for(i=0;i0 inactive) */ if (fire[i].top >= 0) @@ -1622,7 +1623,7 @@ 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 */ - for (k=0;k<30;k++) + for (k=0;k 0) { -- cgit v1.1