summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-02-14 22:59:36 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-02-14 22:59:36 +0000
commit5a29fe18d4ca1c96a4d962a6494a7ff4c481b5ad (patch)
tree75026e10e8d491e46182b5a5b2b32a4733277185 /apps
parent7a395a23bfb17bc7d2df5950fda1b16530efd68d (diff)
downloadrockbox-5a29fe18d4ca1c96a4d962a6494a7ff4c481b5ad.tar.gz
rockbox-5a29fe18d4ca1c96a4d962a6494a7ff4c481b5ad.tar.bz2
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')
-rw-r--r--apps/plugins/bitmaps/native/SOURCES4
-rw-r--r--apps/plugins/bitmaps/native/brickmania_menu_bg.240x320x16.bmpbin0 -> 230454 bytes
-rw-r--r--apps/plugins/brickmania.c23
3 files changed, 22 insertions, 5 deletions
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES
index 9781e49b12..232b2b90f0 100644
--- a/apps/plugins/bitmaps/native/SOURCES
+++ b/apps/plugins/bitmaps/native/SOURCES
@@ -9,7 +9,11 @@ brickmania_pads.320x240x16.bmp
brickmania_break.320x240x16.bmp
brickmania_powerups.320x240x16.bmp
#else
+#if (LCD_WIDTH == 240) && (LCD_HEIGHT == 320)
+brickmania_menu_bg.240x320x16.bmp
+#else
brickmania_menu_bg.220x176x16.bmp
+#endif
brickmania_bricks.220x176x16.bmp
brickmania_pads.220x176x16.bmp
brickmania_break.220x176x16.bmp
diff --git a/apps/plugins/bitmaps/native/brickmania_menu_bg.240x320x16.bmp b/apps/plugins/bitmaps/native/brickmania_menu_bg.240x320x16.bmp
new file mode 100644
index 0000000000..93856e02a7
--- /dev/null
+++ b/apps/plugins/bitmaps/native/brickmania_menu_bg.240x320x16.bmp
Binary files differ
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;