diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index 9694ff5605..4966266eca 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c @@ -362,10 +362,12 @@ CONFIG_KEYPAD == SANSA_M200_PAD #define PAD_POS_Y (GAMESCREEN_HEIGHT - PAD_HEIGHT - 1) /* change to however many levels there are, i.e. how many arrays there are total */ -int levels_num = 40; +#define NUM_LEVELS 40 +#define NUM_BRICKS_ROWS 8 +#define NUM_BRICKS_COLS 10 -/* change the first number in [ ] to however many levels there are (levels_num) */ -static unsigned char levels[40][8][10] = +/* change the first number in [ ] to however many levels there are */ +static unsigned char levels[NUM_LEVELS][NUM_BRICKS_ROWS][NUM_BRICKS_COLS] = /* You can set up new levels with the level editor ( http://plugbox.rockbox-lounge.com/brickmania.htm ). With 0x1, it refers to the first brick in the bitmap, 0x2 would refer to the @@ -996,9 +998,9 @@ static void brickmania_init_game(bool new_game) fire[i].top=-1; } - for(i=0;i<=7;i++) { - for(j=0;j<=9;j++) { - int bnum = i*10+j; + for(i=0;irand()%25; @@ -1442,12 +1444,12 @@ static int brickmania_game_loop(void) pad_line.p2.y = PAD_POS_Y; /* handle all of the bricks/powerups */ - for (i=0; i<=7; i++) + for (i=0; i