diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-04-19 12:14:54 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-04-19 12:14:54 +0000 |
commit | 5d173ead6ef86886cf5d87b36213d1e357a146c2 (patch) | |
tree | 616da7876df8499bfe13040d60a0f76becd49373 | |
parent | 15dfe87f9606a191707d5c7b3b33b21963510f53 (diff) | |
download | rockbox-5d173ead6ef86886cf5d87b36213d1e357a146c2.tar.gz rockbox-5d173ead6ef86886cf5d87b36213d1e357a146c2.zip |
brickmania for the e200. (screen cant rotate, so using half the screen is better than nothing)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13210 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/SOURCES | 2 | ||||
-rw-r--r-- | apps/plugins/bitmaps/native/SOURCES | 2 | ||||
-rw-r--r-- | apps/plugins/brickmania.c | 17 |
3 files changed, 17 insertions, 4 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index 6490b0897d..a8272b451e 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES | |||
@@ -52,7 +52,7 @@ bubbles.c | |||
52 | invadrox.c | 52 | invadrox.c |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | #if LCD_WIDTH != 128 && !defined(SANSA_E200) | 55 | #if LCD_WIDTH != 128 |
56 | /* These need adjusting for the iRiver if'p screen */ | 56 | /* These need adjusting for the iRiver if'p screen */ |
57 | brickmania.c | 57 | brickmania.c |
58 | #endif | 58 | #endif |
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index f9f6bfaa2c..90a635ef01 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES | |||
@@ -45,7 +45,7 @@ brickmania_menu_bg.160x128x16.bmp | |||
45 | brickmania_pads.160x128x16.bmp | 45 | brickmania_pads.160x128x16.bmp |
46 | brickmania_powerups.160x128x16.bmp | 46 | brickmania_powerups.160x128x16.bmp |
47 | brickmania_break.160x128x16.bmp | 47 | brickmania_break.160x128x16.bmp |
48 | #elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 132) && (LCD_DEPTH == 16) | 48 | #elif (LCD_WIDTH == 176)/* && (LCD_HEIGHT == 132) */&& (LCD_DEPTH == 16) |
49 | brickmania_menu_items.176x132x16.bmp | 49 | brickmania_menu_items.176x132x16.bmp |
50 | brickmania_ball.176x132x16.bmp | 50 | brickmania_ball.176x132x16.bmp |
51 | brickmania_bricks.176x132x16.bmp | 51 | brickmania_bricks.176x132x16.bmp |
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index 38014e73a6..b434c77e25 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c | |||
@@ -123,6 +123,8 @@ PLUGIN_HEADER | |||
123 | #define SELECT BUTTON_SELECT | 123 | #define SELECT BUTTON_SELECT |
124 | #define UP BUTTON_SCROLL_UP | 124 | #define UP BUTTON_SCROLL_UP |
125 | #define DOWN BUTTON_SCROLL_DOWN | 125 | #define DOWN BUTTON_SCROLL_DOWN |
126 | #define SCROLL_FWD(x) (0) | ||
127 | #define SCROLL_BACK(x) (0) | ||
126 | 128 | ||
127 | #elif CONFIG_KEYPAD == IRIVER_H10_PAD /* grayscale at the moment */ | 129 | #elif CONFIG_KEYPAD == IRIVER_H10_PAD /* grayscale at the moment */ |
128 | 130 | ||
@@ -416,18 +418,24 @@ extern const fb_data brickmania_bricks[]; | |||
416 | #define STRINGPOS_navi 44 | 418 | #define STRINGPOS_navi 44 |
417 | #define STRINGPOS_flipsides 44 | 419 | #define STRINGPOS_flipsides 44 |
418 | 420 | ||
419 | #elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 132) && (LCD_DEPTH==16) | 421 | /* nano and sansa */ |
422 | #elif (LCD_WIDTH == 176) && (LCD_HEIGHT >= 132) && (LCD_DEPTH==16) | ||
420 | /* The time (in ms) for one iteration through the game loop - decrease this | 423 | /* The time (in ms) for one iteration through the game loop - decrease this |
421 | to speed up the game - note that current_tick is (currently) only accurate | 424 | to speed up the game - note that current_tick is (currently) only accurate |
422 | to 10ms. | 425 | to 10ms. |
423 | */ | 426 | */ |
427 | |||
424 | #define CYCLETIME 30 | 428 | #define CYCLETIME 30 |
425 | 429 | ||
430 | #if (LCD_HEIGHT == 220) | ||
431 | #define GAMESCREEN_HEIGHT 132 | ||
432 | #else | ||
426 | #define GAMESCREEN_HEIGHT LCD_HEIGHT | 433 | #define GAMESCREEN_HEIGHT LCD_HEIGHT |
434 | #endif | ||
427 | 435 | ||
428 | #define PAD_WIDTH 40 | 436 | #define PAD_WIDTH 40 |
429 | #define PAD_HEIGHT 5 | 437 | #define PAD_HEIGHT 5 |
430 | #define PAD_POS_Y LCD_HEIGHT - 7 | 438 | #define PAD_POS_Y GAMESCREEN_HEIGHT - 7 |
431 | #define BRICK_HEIGHT 7 | 439 | #define BRICK_HEIGHT 7 |
432 | #define BRICK_WIDTH 17 | 440 | #define BRICK_WIDTH 17 |
433 | #define BALL 5 | 441 | #define BALL 5 |
@@ -1278,6 +1286,11 @@ int game_loop(void) | |||
1278 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1286 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1279 | rb->lcd_clear_display(); | 1287 | rb->lcd_clear_display(); |
1280 | rb->lcd_set_background(LCD_BLACK); | 1288 | rb->lcd_set_background(LCD_BLACK); |
1289 | #if LCD_HEIGHT > GAMESCREEN_HEIGHT | ||
1290 | rb->lcd_set_foreground(rb->global_settings->bg_color); | ||
1291 | rb->lcd_fillrect(0, GAMESCREEN_HEIGHT, LCD_WIDTH, | ||
1292 | LCD_HEIGHT - GAMESCREEN_HEIGHT); | ||
1293 | #endif | ||
1281 | rb->lcd_set_foreground(LCD_WHITE); | 1294 | rb->lcd_set_foreground(LCD_WHITE); |
1282 | #else | 1295 | #else |
1283 | rb->lcd_clear_display(); | 1296 | rb->lcd_clear_display(); |