summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-04-19 12:14:54 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-04-19 12:14:54 +0000
commit5d173ead6ef86886cf5d87b36213d1e357a146c2 (patch)
tree616da7876df8499bfe13040d60a0f76becd49373
parent15dfe87f9606a191707d5c7b3b33b21963510f53 (diff)
downloadrockbox-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/SOURCES2
-rw-r--r--apps/plugins/bitmaps/native/SOURCES2
-rw-r--r--apps/plugins/brickmania.c17
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
invadrox.c
#endif
-#if LCD_WIDTH != 128 && !defined(SANSA_E200)
+#if LCD_WIDTH != 128
/* These need adjusting for the iRiver if'p screen */
brickmania.c
#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
brickmania_pads.160x128x16.bmp
brickmania_powerups.160x128x16.bmp
brickmania_break.160x128x16.bmp
-#elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 132) && (LCD_DEPTH == 16)
+#elif (LCD_WIDTH == 176)/* && (LCD_HEIGHT == 132) */&& (LCD_DEPTH == 16)
brickmania_menu_items.176x132x16.bmp
brickmania_ball.176x132x16.bmp
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
#define SELECT BUTTON_SELECT
#define UP BUTTON_SCROLL_UP
#define DOWN BUTTON_SCROLL_DOWN
+#define SCROLL_FWD(x) (0)
+#define SCROLL_BACK(x) (0)
#elif CONFIG_KEYPAD == IRIVER_H10_PAD /* grayscale at the moment */
@@ -416,18 +418,24 @@ extern const fb_data brickmania_bricks[];
#define STRINGPOS_navi 44
#define STRINGPOS_flipsides 44
-#elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 132) && (LCD_DEPTH==16)
+/* nano and sansa */
+#elif (LCD_WIDTH == 176) && (LCD_HEIGHT >= 132) && (LCD_DEPTH==16)
/* The time (in ms) for one iteration through the game loop - decrease this
to speed up the game - note that current_tick is (currently) only accurate
to 10ms.
*/
+
#define CYCLETIME 30
+#if (LCD_HEIGHT == 220)
+#define GAMESCREEN_HEIGHT 132
+#else
#define GAMESCREEN_HEIGHT LCD_HEIGHT
+#endif
#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 7
#define BRICK_WIDTH 17
#define BALL 5
@@ -1278,6 +1286,11 @@ int game_loop(void)
rb->lcd_set_drawmode(DRMODE_SOLID);
rb->lcd_clear_display();
rb->lcd_set_background(LCD_BLACK);
+#if LCD_HEIGHT > GAMESCREEN_HEIGHT
+ rb->lcd_set_foreground(rb->global_settings->bg_color);
+ rb->lcd_fillrect(0, GAMESCREEN_HEIGHT, LCD_WIDTH,
+ LCD_HEIGHT - GAMESCREEN_HEIGHT);
+#endif
rb->lcd_set_foreground(LCD_WHITE);
#else
rb->lcd_clear_display();