From 5d173ead6ef86886cf5d87b36213d1e357a146c2 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Thu, 19 Apr 2007 12:14:54 +0000 Subject: 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 --- apps/plugins/SOURCES | 2 +- apps/plugins/bitmaps/native/SOURCES | 2 +- 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 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(); -- cgit v1.2.3