From 769d6a825593071bfc3e11b9f8e5a1c80c9e31f5 Mon Sep 17 00:00:00 2001 From: Adam Boot Date: Fri, 19 Jan 2007 23:03:41 +0000 Subject: Bubbles: Fix for gigabeat and add sansa e200 support git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12075 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/SOURCES | 2 - apps/plugins/bitmaps/mono/SOURCES | 5 ++- apps/plugins/bitmaps/native/SOURCES | 8 ++-- .../bitmaps/native/bubbles_left.176x220x16.bmp | Bin 0 -> 31734 bytes .../bitmaps/native/bubbles_left.240x320x16.bmp | Bin 53814 -> 61494 bytes .../bitmaps/native/bubbles_right.240x320x16.bmp | Bin 55094 -> 0 bytes apps/plugins/bubbles.c | 41 +++++++++++++++------ 7 files changed, 38 insertions(+), 18 deletions(-) create mode 100755 apps/plugins/bitmaps/native/bubbles_left.176x220x16.bmp delete mode 100644 apps/plugins/bitmaps/native/bubbles_right.240x320x16.bmp (limited to 'apps') diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index ffa01f1f77..d22b3af423 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES @@ -45,9 +45,7 @@ plasma.c blackjack.c bounce.c -#ifndef SANSA_E200 bubbles.c -#endif #if LCD_WIDTH != 128 && !defined(SANSA_E200) /* These need adjusting for the iRiver if'p screen */ diff --git a/apps/plugins/bitmaps/mono/SOURCES b/apps/plugins/bitmaps/mono/SOURCES index c5c26cdc0b..6c8218de77 100644 --- a/apps/plugins/bitmaps/mono/SOURCES +++ b/apps/plugins/bitmaps/mono/SOURCES @@ -11,9 +11,10 @@ bubbles_bubble.160x128x1.bmp #elif (LCD_WIDTH == 138) && (LCD_HEIGHT == 110) bubbles_bubble.138x110x1.bmp #elif ((LCD_WIDTH == 220) && (LCD_HEIGHT == 176)) || \ - ((LCD_WIDTH == 240) && (LCD_HEIGHT == 320)) + ((LCD_WIDTH == 176) && (LCD_HEIGHT == 220)) bubbles_bubble.220x176x1.bmp -#elif (LCD_WIDTH == 320) && (LCD_HEIGHT == 240) +#elif ((LCD_WIDTH == 320) && (LCD_HEIGHT == 240)) || \ + ((LCD_WIDTH == 240) && (LCD_HEIGHT == 320)) bubbles_bubble.320x240x1.bmp #endif diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index b98377e846..6fb8a20e71 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES @@ -22,14 +22,16 @@ bubbles_right.176x132x16.bmp bubbles_emblem.220x176x16.bmp bubbles_left.220x176x16.bmp bubbles_right.220x176x16.bmp -#elif (LCD_WIDTH == 240) && (LCD_HEIGHT == 320) +#elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 220) bubbles_emblem.220x176x16.bmp -bubbles_left.240x320x16.bmp -bubbles_right.240x320x16.bmp +bubbles_left.176x220x16.bmp #elif (LCD_WIDTH == 320) && (LCD_HEIGHT == 240) bubbles_emblem.320x240x16.bmp bubbles_left.320x240x16.bmp bubbles_right.320x240x16.bmp +#elif (LCD_WIDTH == 240) && (LCD_HEIGHT == 320) +bubbles_emblem.320x240x16.bmp +bubbles_left.240x320x16.bmp #endif /* ChessBox */ diff --git a/apps/plugins/bitmaps/native/bubbles_left.176x220x16.bmp b/apps/plugins/bitmaps/native/bubbles_left.176x220x16.bmp new file mode 100755 index 0000000000..7d66663a0a Binary files /dev/null and b/apps/plugins/bitmaps/native/bubbles_left.176x220x16.bmp differ diff --git a/apps/plugins/bitmaps/native/bubbles_left.240x320x16.bmp b/apps/plugins/bitmaps/native/bubbles_left.240x320x16.bmp index 25cf12ddbf..6e4bb4533e 100644 Binary files a/apps/plugins/bitmaps/native/bubbles_left.240x320x16.bmp and b/apps/plugins/bitmaps/native/bubbles_left.240x320x16.bmp differ diff --git a/apps/plugins/bitmaps/native/bubbles_right.240x320x16.bmp b/apps/plugins/bitmaps/native/bubbles_right.240x320x16.bmp deleted file mode 100644 index 7f08389cc0..0000000000 Binary files a/apps/plugins/bitmaps/native/bubbles_right.240x320x16.bmp and /dev/null differ diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index 2ff145b5f7..f3a03cbd7b 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c @@ -59,10 +59,10 @@ PLUGIN_HEADER #define BUBBLES_LEFT_REP PLA_LEFT_REPEAT #define BUBBLES_RIGHT PLA_RIGHT #define BUBBLES_RIGHT_REP PLA_RIGHT_REPEAT -#define BUBBLES_QUIT PLA_QUIT -#define BUBBLES_START PLA_START -#define BUBBLES_SELECT PLA_FIRE -#define BUBBLES_RESUME PLA_MENU +#define BUBBLES_QUIT PLA_QUIT +#define BUBBLES_START PLA_START +#define BUBBLES_SELECT PLA_FIRE +#define BUBBLES_RESUME PLA_MENU #if CONFIG_KEYPAD != ONDIO_PAD @@ -81,8 +81,8 @@ PLUGIN_HEADER #endif -/* bubbles will consume height of 10*ROW_HEIGHT+2*(BUBBLE_HEIGHT-1)+BUBBLE_HEIGHT/2 */ -/* 24x24 bubbles (iPod Video) */ +/* bubbles will consume height of ROW_HEIGHT*(BB_HEIGHT-1)+BUBBLE_HEIGHT*3/2 */ +/* 22x22 bubbles (iPod Video) */ #if (LCD_HEIGHT == 240) && (LCD_WIDTH == 320) #define BUBBLE_WIDTH 22 #define BUBBLE_HEIGHT 22 @@ -93,6 +93,17 @@ PLUGIN_HEADER #define ROW_INDENT 11 #define MAX_FPS 40 +/* 22x22 bubbles (Gigabeat) */ +#elif (LCD_HEIGHT == 320) && (LCD_WIDTH == 240) +#define BUBBLE_WIDTH 22 +#define BUBBLE_HEIGHT 22 +#define EMBLEM_WIDTH 16 +#define EMBLEM_HEIGHT 16 +#define XOFS 64 +#define ROW_HEIGHT 18 +#define ROW_INDENT 11 +#define MAX_FPS 20 + /* 16x16 bubbles (H300, iPod Color) */ #elif (LCD_HEIGHT == 176) && (LCD_WIDTH == 220) #define BUBBLE_WIDTH 16 @@ -104,18 +115,18 @@ PLUGIN_HEADER #define ROW_INDENT 8 #define MAX_FPS 30 -/* 16x16 bubbles (Gigabeat) */ -#elif (LCD_HEIGHT == 320) && (LCD_WIDTH == 240) +/* 16x16 bubbles (Sansa E200) */ +#elif (LCD_HEIGHT == 220) && (LCD_WIDTH == 176) #define BUBBLE_WIDTH 16 #define BUBBLE_HEIGHT 16 #define EMBLEM_WIDTH 12 #define EMBLEM_HEIGHT 12 -#define XOFS 56 +#define XOFS 48 #define ROW_HEIGHT 14 #define ROW_INDENT 8 -#define MAX_FPS 20 +#define MAX_FPS 30 -/* 12x12 bubbles (iPod Nano) */ +/* 12x12 bubbles (iPod Nano, Sansa E200) */ #elif (LCD_HEIGHT == 132) && (LCD_WIDTH == 176) #define BUBBLE_WIDTH 12 #define BUBBLE_HEIGHT 12 @@ -2491,6 +2502,14 @@ static int bubbles(struct game_context* bb) { rb->lcd_puts(0, 6, " and show high scores"); rb->lcd_puts(0, 7, "LEFT/RIGHT to aim"); rb->lcd_puts(0, 8, "UP/DOWN to change level"); +#elif CONFIG_KEYPAD == SANSA_E200_PAD + rb->lcd_puts(0, 2, "PLAY to start/pause"); + rb->lcd_puts(0, 3, "SUBMENU to save/resume"); + rb->lcd_puts(0, 4, "POWER to exit"); + rb->lcd_puts(0, 5, "SELECT to fire"); + rb->lcd_puts(0, 6, " and show high scores"); + rb->lcd_puts(0, 7, "LEFT/RIGHT to aim"); + rb->lcd_puts(0, 8, "SCROLL to change level"); #endif #if LCD_WIDTH >= 138 rb->snprintf(str, 28, "Start on level %d of %d", startlevel+1, -- cgit v1.2.3