summaryrefslogtreecommitdiff
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
parent10ad0a2a942f0dc2a31374135440c25a1a4f05bb (diff)
Bubbles adapted to H10-5GB by Marianne Arnold.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10997 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/SOURCES5
-rw-r--r--apps/plugins/bitmaps/mono/SOURCES3
-rw-r--r--apps/plugins/bitmaps/native/SOURCES3
-rwxr-xr-xapps/plugins/bubbles.c20
4 files changed, 16 insertions, 15 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index 4485f87c72..76859dfa94 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -35,10 +35,9 @@ mandelbrot.c
plasma.c
bounce.c
-#ifndef IRIVER_H10_5GB
bubbles.c
-#endif
-#if LCD_WIDTH != 128
+
+#if LCD_WIDTH != 128
/* These need adjusting for the iRiver if'p screen */
brickmania.c
#endif
diff --git a/apps/plugins/bitmaps/mono/SOURCES b/apps/plugins/bitmaps/mono/SOURCES
index bdc0693129..be23b4f519 100644
--- a/apps/plugins/bitmaps/mono/SOURCES
+++ b/apps/plugins/bitmaps/mono/SOURCES
@@ -3,7 +3,8 @@
/* Bubbles */
#if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64)
bubbles_bubble.112x64x1.bmp
-#elif (LCD_WIDTH == 160) && (LCD_HEIGHT == 128)
+#elif ((LCD_WIDTH == 160) && (LCD_HEIGHT == 128)) || \
+ ((LCD_WIDTH == 128) && (LCD_HEIGHT == 128))
bubbles_bubble.160x128x1.bmp
#elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 132)
bubbles_bubble.160x128x1.bmp
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES
index 37182d2026..7d4e79a584 100644
--- a/apps/plugins/bitmaps/native/SOURCES
+++ b/apps/plugins/bitmaps/native/SOURCES
@@ -11,6 +11,9 @@ bubbles_emblem.160x128x2.bmp
bubbles_emblem.160x128x16.bmp
bubbles_left.160x128x16.bmp
bubbles_right.160x128x16.bmp
+#elif (LCD_WIDTH == 128) && (LCD_HEIGHT == 128)
+bubbles_emblem.160x128x16.bmp
+bubbles_left.160x128x16.bmp
#elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 132)
bubbles_emblem.160x128x16.bmp
bubbles_left.176x132x16.bmp
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c
index be3783cdc9..196587a9d9 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");