summaryrefslogtreecommitdiff
path: root/apps/plugins/bubbles.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-09-18 21:21:12 +0000
committerJens Arnold <amiconn@rockbox.org>2006-09-18 21:21:12 +0000
commitf3dd56791a58c6342d15691c67946d7cbaacf4ab (patch)
tree56d2c77732f9034c34d3c3d68cec40b8c34fe125 /apps/plugins/bubbles.c
parent10ad0a2a942f0dc2a31374135440c25a1a4f05bb (diff)
downloadrockbox-f3dd56791a58c6342d15691c67946d7cbaacf4ab.zip
rockbox-f3dd56791a58c6342d15691c67946d7cbaacf4ab.tar.gz
rockbox-f3dd56791a58c6342d15691c67946d7cbaacf4ab.tar.bz2
rockbox-f3dd56791a58c6342d15691c67946d7cbaacf4ab.tar.xz
Bubbles adapted to H10-5GB by Marianne Arnold.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10997 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/bubbles.c')
-rwxr-xr-xapps/plugins/bubbles.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c
index be3783c..196587a 100755
--- a/apps/plugins/bubbles.c
+++ b/apps/plugins/bubbles.c
@@ -175,8 +175,8 @@ PLUGIN_HEADER
#define ROW_INDENT 6
#define MAX_FPS 40
-/* 12x12 bubbles (H100, iAudio X5, iPod 3G, iPod 4G grayscale) */
-#elif (LCD_HEIGHT == 128) && (LCD_WIDTH == 160)
+/* 12x12 bubbles (H100, H10, iAudio X5, iPod 3G, iPod 4G grayscale) */
+#elif (LCD_HEIGHT == 128) && ((LCD_WIDTH == 160) || (LCD_WIDTH == 128))
#define BUBBLE_WIDTH 12
#define BUBBLE_HEIGHT 12
#define EMBLEM_WIDTH 8
@@ -224,10 +224,13 @@ PLUGIN_HEADER
/* external bitmaps */
extern const fb_data bubbles_bubble[];
extern const fb_data bubbles_emblem[];
-#ifdef HAVE_LCD_COLOR
+#ifdef HAVE_LCD_COLOR
extern const fb_data bubbles_left[];
+/* skip right border for square screens */
+#if (LCD_WIDTH > LCD_HEIGHT)
extern const fb_data bubbles_right[];
#endif
+#endif
/* global rockbox api */
static struct plugin_api* rb;
@@ -1506,9 +1509,12 @@ static void bubbles_drawboard(struct game_context* bb) {
/* draw sidebars */
#ifdef HAVE_LCD_COLOR
rb->lcd_bitmap(bubbles_left, 0, 0, XOFS, LCD_HEIGHT);
+ /* skip right border for square screens */
+#if (LCD_WIDTH > LCD_HEIGHT)
rb->lcd_bitmap(bubbles_right, XOFS-1+BB_WIDTH*BUBBLE_WIDTH, 0,
LCD_WIDTH-(XOFS-1+BB_WIDTH*BUBBLE_WIDTH), LCD_HEIGHT);
#endif
+#endif
/* display play board */
for(i=0; i<BB_HEIGHT; i++) {
@@ -2523,14 +2529,6 @@ static int bubbles(struct game_context* bb) {
"UP to fire and show high scores, "
"LEFT/RIGHT to aim and to change level.");
#elif CONFIG_KEYPAD == IRIVER_H10_PAD
-#define BUBBLES_LEFT BUTTON_LEFT
-#define BUBBLES_RIGHT BUTTON_RIGHT
-#define BUBBLES_UP BUTTON_SCROLL_UP
-#define BUBBLES_DOWN BUTTON_SCROLL_DOWN
-#define BUBBLES_QUIT BUTTON_POWER
-#define BUBBLES_START BUTTON_PLAY
-#define BUBBLES_SELECT BUTTON_REW
-#define BUBBLES_RESUME BUTTON_FF
rb->lcd_puts(0, 2, "PLAY to start/pause");
rb->lcd_puts(0, 3, "FF to save/resume");
rb->lcd_puts(0, 4, "POWER to exit");