diff options
author | Dimitar Dimitrov <mitakas@gmail.com> | 2012-03-02 22:26:16 +0100 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2012-03-03 02:54:26 +0100 |
commit | 3f82f3aca14eb954e55f761721ffdd2684f0e812 (patch) | |
tree | 12a49560145a39ec1bc2afd7b21c4e43a6563f3f | |
parent | 57264cef43f89421278740dbab86c838b2cebb07 (diff) |
Sansa Clip Zip: Bubble now shows a proper background image
Change-Id: If595378d58a4602bdc6b101c062c6974f6debf62
Reviewed-on: http://gerrit.rockbox.org/167
Reviewed-by: Dimitar Dimitrov <mitakas@gmail.com>
Tested-by: Dimitar Dimitrov <mitakas@gmail.com>
Tested-by: Bertrik Sikken <bertrik@sikken.nl>
Reviewed-by: Bertrik Sikken <bertrik@sikken.nl>
Reviewed-by: Rafaël Carré <rafael.carre@gmail.com>
-rw-r--r-- | apps/plugins/bitmaps/native/SOURCES | 2 | ||||
-rw-r--r-- | apps/plugins/bitmaps/native/bubbles_background.96x96x16.bmp | bin | 0 -> 27702 bytes | |||
-rw-r--r-- | apps/plugins/bubbles.c | 26 |
3 files changed, 25 insertions, 3 deletions
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index a523405552..de347fd1aa 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES @@ -151,7 +151,7 @@ bubbles_emblem.132x80x16.bmp bubbles_background.132x80x16.bmp #elif (LCD_WIDTH >= 96) && (LCD_HEIGHT >= 96) bubbles_emblem.132x80x16.bmp -bubbles_background.128x96x16.bmp +bubbles_background.96x96x16.bmp #endif #elif LCD_DEPTH <= 2 /* greyscale, mono */ #if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) diff --git a/apps/plugins/bitmaps/native/bubbles_background.96x96x16.bmp b/apps/plugins/bitmaps/native/bubbles_background.96x96x16.bmp Binary files differnew file mode 100644 index 0000000000..f52642e19b --- /dev/null +++ b/apps/plugins/bitmaps/native/bubbles_background.96x96x16.bmp diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index 9f860d43ee..eef4f4dc19 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c @@ -198,7 +198,7 @@ enum { #define MAX_FPS 30 /* 7x7 bubbles (Sansa Clip/m200) */ -#elif (LCD_HEIGHT == 64 && LCD_WIDTH == 128) || (LCD_HEIGHT == 96 && LCD_WIDTH == 96) +#elif (LCD_HEIGHT == 64 && LCD_WIDTH == 128) #define XOFS 33 #define ROW_HEIGHT 5 #define MAX_FPS 30 @@ -209,6 +209,23 @@ enum { #define ROW_HEIGHT 5 #define MAX_FPS 20 +/* 7x7 bubbles (Sansa Clip Zip) */ +#elif (LCD_HEIGHT == 96 && LCD_WIDTH == 96) +#define XOFS 33 +#define ROW_HEIGHT 5 +#define MAX_FPS 30 + +/* custom text positioning */ +#define LEVEL_TXT_X 1 +#define LEVEL_TXT_WIDTH 31 +#define LEVEL_TXT_Y 4 +#define SCORE_TXT_X 1 +#define SCORE_TXT_WIDTH 31 +#define SCORE_TXT_Y 31 +#define NEXT_BB_X 1 +#define NEXT_BB_WIDTH 31 +#define NEXT_BB_Y 72 + #else #error BUBBLES: Unsupported LCD type #endif @@ -1570,7 +1587,12 @@ static void bubbles_drawboard(struct game_context* bb) { if(bb->elapsedshot >= (MAX_SHOTTIME*7)/10) { rb->lcd_getstringsize(hurry, &w1, &h); - rb->lcd_putsxy(LCD_WIDTH/2-w1/2, LCD_HEIGHT/2-h/2, hurry); + /* screen is too small for the message to be centered (Clip Zip) */ + #if (LCD_WIDTH <= 96) + rb->lcd_putsxy(LCD_WIDTH/2-w1/2+LCD_WIDTH/6, LCD_HEIGHT/2-h/2, hurry); + #else + rb->lcd_putsxy(LCD_WIDTH/2-w1/2, LCD_HEIGHT/2-h/2, hurry); + #endif } } |