summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomer Shalev <shalev.tomer@gmail.com>2010-04-20 08:46:44 +0000
committerTomer Shalev <shalev.tomer@gmail.com>2010-04-20 08:46:44 +0000
commit5c7a76d596154d8861c4ee43860dbe688dcf1a6f (patch)
treea7cdb8b996201fc3af804a5345195668aed14ddb
parent4761efa57357f8f0f07f7b1cb192d7f905355a53 (diff)
downloadrockbox-5c7a76d596154d8861c4ee43860dbe688dcf1a6f.tar.gz
rockbox-5c7a76d596154d8861c4ee43860dbe688dcf1a6f.zip
Brickmania: Use defined constant instead of hard-coded value
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25689 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/brickmania.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c
index c36aa0ad9e..2fda2d3ec0 100644
--- a/apps/plugins/brickmania.c
+++ b/apps/plugins/brickmania.c
@@ -284,6 +284,9 @@ CONFIG_KEYPAD == SANSA_M200_PAD
#endif
+#define NUM_BRICKS_ROWS 8
+#define NUM_BRICKS_COLS 10
+
/*
*
* Geometric dimensions
@@ -311,7 +314,7 @@ CONFIG_KEYPAD == SANSA_M200_PAD
#define LONG_PAD_WIDTH FIXED3(BMPWIDTH_brickmania_long_pads)
#define BRICK_HEIGHT FIXED3(BMPHEIGHT_brickmania_bricks/7)
#define BRICK_WIDTH FIXED3(BMPWIDTH_brickmania_bricks)
-#define LEFTMARGIN ((GAMESCREEN_WIDTH-10*BRICK_WIDTH)/2)
+#define LEFTMARGIN ((GAMESCREEN_WIDTH-NUM_BRICKS_COLS*BRICK_WIDTH)/2)
#define POWERUP_WIDTH FIXED3(BMPWIDTH_brickmania_powerups)
#define BALL FIXED3(BMPHEIGHT_brickmania_ball)
#define HALFBALL (BALL / 2)
@@ -434,9 +437,6 @@ CONFIG_KEYPAD == SANSA_M200_PAD
*
*/
-#define NUM_BRICKS_ROWS 8
-#define NUM_BRICKS_COLS 10
-
/* change to however many levels there are, i.e. how many arrays there are total */
#define NUM_LEVELS 40