diff options
author | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-02-14 22:59:36 +0000 |
---|---|---|
committer | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-02-14 22:59:36 +0000 |
commit | 5a29fe18d4ca1c96a4d962a6494a7ff4c481b5ad (patch) | |
tree | 75026e10e8d491e46182b5a5b2b32a4733277185 /apps/plugins/brickmania.c | |
parent | 7a395a23bfb17bc7d2df5950fda1b16530efd68d (diff) | |
download | rockbox-5a29fe18d4ca1c96a4d962a6494a7ff4c481b5ad.tar.gz rockbox-5a29fe18d4ca1c96a4d962a6494a7ff4c481b5ad.zip |
Brickmania update for the Gigabeat: fixed menu and smaller game area to make the gameplay closer to targets
with landscape oriented displays (and more challenging too).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12310 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/brickmania.c')
-rw-r--r-- | apps/plugins/brickmania.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index 66ae99a7fe..110bac09a4 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c @@ -183,6 +183,8 @@ extern const fb_data brickmania_bricks[]; */ #define CYCLETIME 30 +#define GAMESCREEN_HEIGHT LCD_HEIGHT + #define PAD_WIDTH 56 #define PAD_HEIGHT 7 #define PAD_POS_Y LCD_HEIGHT - 7 @@ -227,19 +229,22 @@ extern const fb_data brickmania_bricks[]; #define CYCLETIME 30 /* Offsets for LCDS > 220x176 */ -#define XOFS ((LCD_WIDTH-220)/2) -#define YOFS ((LCD_HEIGHT-176)/2) + +#define GAMESCREEN_HEIGHT 176 #define PAD_WIDTH 40 #define PAD_HEIGHT 5 -#define PAD_POS_Y LCD_HEIGHT - 7 +#define PAD_POS_Y GAMESCREEN_HEIGHT - 7 #define BRICK_HEIGHT 8 #define BRICK_WIDTH 21 #define BALL 5 #define HALFBALL 3 -#define LEFTMARGIN 5 +#define LEFTMARGIN (LCD_WIDTH-220)/2 + 5 #define TOPMARGIN 30 +#define XOFS ((LCD_WIDTH-220)/BRICK_WIDTH/2)*BRICK_WIDTH +#define YOFS ((LCD_HEIGHT-176)/BRICK_HEIGHT/2)*BRICK_HEIGHT + #define MENU_BMPHEIGHT 20 #define MENU_BMPWIDTH 112 @@ -272,6 +277,8 @@ extern const fb_data brickmania_bricks[]; */ #define CYCLETIME 50 +#define GAMESCREEN_HEIGHT LCD_HEIGHT + #define PAD_WIDTH 30 #define PAD_HEIGHT 5 #define PAD_POS_Y LCD_HEIGHT - 7 @@ -330,6 +337,8 @@ extern const fb_data brickmania_bricks[]; */ #define CYCLETIME 50 +#define GAMESCREEN_HEIGHT LCD_HEIGHT + #define PAD_WIDTH 30 #define PAD_HEIGHT 5 #define PAD_POS_Y LCD_HEIGHT - 5 @@ -373,6 +382,8 @@ extern const fb_data brickmania_bricks[]; */ #define CYCLETIME 75 +#define GAMESCREEN_HEIGHT LCD_HEIGHT + #define PAD_WIDTH 30 #define PAD_HEIGHT 3 #define PAD_POS_Y LCD_HEIGHT - 5 @@ -412,6 +423,8 @@ extern const fb_data brickmania_bricks[]; */ #define CYCLETIME 30 +#define GAMESCREEN_HEIGHT LCD_HEIGHT + #define PAD_WIDTH 40 #define PAD_HEIGHT 5 #define PAD_POS_Y LCD_HEIGHT - 7 @@ -1634,7 +1647,7 @@ int game_loop(void) if (ball[k].pos_y<= 0) ball[k].y = ball[k].y*-1; /* bottom line */ - else if (ball[k].pos_y+BALL >= LCD_HEIGHT) { + else if (ball[k].pos_y+BALL >= GAMESCREEN_HEIGHT) { if (used_balls>1) { used_balls--; ball[k].pos_x = ball[used_balls].pos_x; |