summaryrefslogtreecommitdiff
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
parent7a395a23bfb17bc7d2df5950fda1b16530efd68d (diff)
downloadrockbox-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
-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
9brickmania_break.320x240x16.bmp 9brickmania_break.320x240x16.bmp
10brickmania_powerups.320x240x16.bmp 10brickmania_powerups.320x240x16.bmp
11#else 11#else
12#if (LCD_WIDTH == 240) && (LCD_HEIGHT == 320)
13brickmania_menu_bg.240x320x16.bmp
14#else
12brickmania_menu_bg.220x176x16.bmp 15brickmania_menu_bg.220x176x16.bmp
16#endif
13brickmania_bricks.220x176x16.bmp 17brickmania_bricks.220x176x16.bmp
14brickmania_pads.220x176x16.bmp 18brickmania_pads.220x176x16.bmp
15brickmania_break.220x176x16.bmp 19brickmania_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[];
183*/ 183*/
184#define CYCLETIME 30 184#define CYCLETIME 30
185 185
186#define GAMESCREEN_HEIGHT LCD_HEIGHT
187
186#define PAD_WIDTH 56 188#define PAD_WIDTH 56
187#define PAD_HEIGHT 7 189#define PAD_HEIGHT 7
188#define PAD_POS_Y LCD_HEIGHT - 7 190#define PAD_POS_Y LCD_HEIGHT - 7
@@ -227,19 +229,22 @@ extern const fb_data brickmania_bricks[];
227#define CYCLETIME 30 229#define CYCLETIME 30
228 230
229/* Offsets for LCDS > 220x176 */ 231/* Offsets for LCDS > 220x176 */
230#define XOFS ((LCD_WIDTH-220)/2) 232
231#define YOFS ((LCD_HEIGHT-176)/2) 233#define GAMESCREEN_HEIGHT 176
232 234
233#define PAD_WIDTH 40 235#define PAD_WIDTH 40
234#define PAD_HEIGHT 5 236#define PAD_HEIGHT 5
235#define PAD_POS_Y LCD_HEIGHT - 7 237#define PAD_POS_Y GAMESCREEN_HEIGHT - 7
236#define BRICK_HEIGHT 8 238#define BRICK_HEIGHT 8
237#define BRICK_WIDTH 21 239#define BRICK_WIDTH 21
238#define BALL 5 240#define BALL 5
239#define HALFBALL 3 241#define HALFBALL 3
240#define LEFTMARGIN 5 242#define LEFTMARGIN (LCD_WIDTH-220)/2 + 5
241#define TOPMARGIN 30 243#define TOPMARGIN 30
242 244
245#define XOFS ((LCD_WIDTH-220)/BRICK_WIDTH/2)*BRICK_WIDTH
246#define YOFS ((LCD_HEIGHT-176)/BRICK_HEIGHT/2)*BRICK_HEIGHT
247
243#define MENU_BMPHEIGHT 20 248#define MENU_BMPHEIGHT 20
244#define MENU_BMPWIDTH 112 249#define MENU_BMPWIDTH 112
245 250
@@ -272,6 +277,8 @@ extern const fb_data brickmania_bricks[];
272*/ 277*/
273#define CYCLETIME 50 278#define CYCLETIME 50
274 279
280#define GAMESCREEN_HEIGHT LCD_HEIGHT
281
275#define PAD_WIDTH 30 282#define PAD_WIDTH 30
276#define PAD_HEIGHT 5 283#define PAD_HEIGHT 5
277#define PAD_POS_Y LCD_HEIGHT - 7 284#define PAD_POS_Y LCD_HEIGHT - 7
@@ -330,6 +337,8 @@ extern const fb_data brickmania_bricks[];
330*/ 337*/
331#define CYCLETIME 50 338#define CYCLETIME 50
332 339
340#define GAMESCREEN_HEIGHT LCD_HEIGHT
341
333#define PAD_WIDTH 30 342#define PAD_WIDTH 30
334#define PAD_HEIGHT 5 343#define PAD_HEIGHT 5
335#define PAD_POS_Y LCD_HEIGHT - 5 344#define PAD_POS_Y LCD_HEIGHT - 5
@@ -373,6 +382,8 @@ extern const fb_data brickmania_bricks[];
373*/ 382*/
374#define CYCLETIME 75 383#define CYCLETIME 75
375 384
385#define GAMESCREEN_HEIGHT LCD_HEIGHT
386
376#define PAD_WIDTH 30 387#define PAD_WIDTH 30
377#define PAD_HEIGHT 3 388#define PAD_HEIGHT 3
378#define PAD_POS_Y LCD_HEIGHT - 5 389#define PAD_POS_Y LCD_HEIGHT - 5
@@ -412,6 +423,8 @@ extern const fb_data brickmania_bricks[];
412*/ 423*/
413#define CYCLETIME 30 424#define CYCLETIME 30
414 425
426#define GAMESCREEN_HEIGHT LCD_HEIGHT
427
415#define PAD_WIDTH 40 428#define PAD_WIDTH 40
416#define PAD_HEIGHT 5 429#define PAD_HEIGHT 5
417#define PAD_POS_Y LCD_HEIGHT - 7 430#define PAD_POS_Y LCD_HEIGHT - 7
@@ -1634,7 +1647,7 @@ int game_loop(void)
1634 if (ball[k].pos_y<= 0) 1647 if (ball[k].pos_y<= 0)
1635 ball[k].y = ball[k].y*-1; 1648 ball[k].y = ball[k].y*-1;
1636 /* bottom line */ 1649 /* bottom line */
1637 else if (ball[k].pos_y+BALL >= LCD_HEIGHT) { 1650 else if (ball[k].pos_y+BALL >= GAMESCREEN_HEIGHT) {
1638 if (used_balls>1) { 1651 if (used_balls>1) {
1639 used_balls--; 1652 used_balls--;
1640 ball[k].pos_x = ball[used_balls].pos_x; 1653 ball[k].pos_x = ball[used_balls].pos_x;