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)
downloadrockbox-f3dd56791a58c6342d15691c67946d7cbaacf4ab.tar.gz
rockbox-f3dd56791a58c6342d15691c67946d7cbaacf4ab.zip
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
35plasma.c 35plasma.c
36 36
37bounce.c 37bounce.c
38#ifndef IRIVER_H10_5GB
39bubbles.c 38bubbles.c
40#endif 39
41#if LCD_WIDTH != 128 40#if LCD_WIDTH != 128
42/* These need adjusting for the iRiver if'p screen */ 41/* These need adjusting for the iRiver if'p screen */
43brickmania.c 42brickmania.c
44#endif 43#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 @@
3/* Bubbles */ 3/* Bubbles */
4#if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) 4#if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64)
5bubbles_bubble.112x64x1.bmp 5bubbles_bubble.112x64x1.bmp
6#elif (LCD_WIDTH == 160) && (LCD_HEIGHT == 128) 6#elif ((LCD_WIDTH == 160) && (LCD_HEIGHT == 128)) || \
7 ((LCD_WIDTH == 128) && (LCD_HEIGHT == 128))
7bubbles_bubble.160x128x1.bmp 8bubbles_bubble.160x128x1.bmp
8#elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 132) 9#elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 132)
9bubbles_bubble.160x128x1.bmp 10bubbles_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
11bubbles_emblem.160x128x16.bmp 11bubbles_emblem.160x128x16.bmp
12bubbles_left.160x128x16.bmp 12bubbles_left.160x128x16.bmp
13bubbles_right.160x128x16.bmp 13bubbles_right.160x128x16.bmp
14#elif (LCD_WIDTH == 128) && (LCD_HEIGHT == 128)
15bubbles_emblem.160x128x16.bmp
16bubbles_left.160x128x16.bmp
14#elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 132) 17#elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 132)
15bubbles_emblem.160x128x16.bmp 18bubbles_emblem.160x128x16.bmp
16bubbles_left.176x132x16.bmp 19bubbles_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
175#define ROW_INDENT 6 175#define ROW_INDENT 6
176#define MAX_FPS 40 176#define MAX_FPS 40
177 177
178/* 12x12 bubbles (H100, iAudio X5, iPod 3G, iPod 4G grayscale) */ 178/* 12x12 bubbles (H100, H10, iAudio X5, iPod 3G, iPod 4G grayscale) */
179#elif (LCD_HEIGHT == 128) && (LCD_WIDTH == 160) 179#elif (LCD_HEIGHT == 128) && ((LCD_WIDTH == 160) || (LCD_WIDTH == 128))
180#define BUBBLE_WIDTH 12 180#define BUBBLE_WIDTH 12
181#define BUBBLE_HEIGHT 12 181#define BUBBLE_HEIGHT 12
182#define EMBLEM_WIDTH 8 182#define EMBLEM_WIDTH 8
@@ -224,10 +224,13 @@ PLUGIN_HEADER
224/* external bitmaps */ 224/* external bitmaps */
225extern const fb_data bubbles_bubble[]; 225extern const fb_data bubbles_bubble[];
226extern const fb_data bubbles_emblem[]; 226extern const fb_data bubbles_emblem[];
227#ifdef HAVE_LCD_COLOR 227#ifdef HAVE_LCD_COLOR
228extern const fb_data bubbles_left[]; 228extern const fb_data bubbles_left[];
229/* skip right border for square screens */
230#if (LCD_WIDTH > LCD_HEIGHT)
229extern const fb_data bubbles_right[]; 231extern const fb_data bubbles_right[];
230#endif 232#endif
233#endif
231 234
232/* global rockbox api */ 235/* global rockbox api */
233static struct plugin_api* rb; 236static struct plugin_api* rb;
@@ -1506,9 +1509,12 @@ static void bubbles_drawboard(struct game_context* bb) {
1506 /* draw sidebars */ 1509 /* draw sidebars */
1507#ifdef HAVE_LCD_COLOR 1510#ifdef HAVE_LCD_COLOR
1508 rb->lcd_bitmap(bubbles_left, 0, 0, XOFS, LCD_HEIGHT); 1511 rb->lcd_bitmap(bubbles_left, 0, 0, XOFS, LCD_HEIGHT);
1512 /* skip right border for square screens */
1513#if (LCD_WIDTH > LCD_HEIGHT)
1509 rb->lcd_bitmap(bubbles_right, XOFS-1+BB_WIDTH*BUBBLE_WIDTH, 0, 1514 rb->lcd_bitmap(bubbles_right, XOFS-1+BB_WIDTH*BUBBLE_WIDTH, 0,
1510 LCD_WIDTH-(XOFS-1+BB_WIDTH*BUBBLE_WIDTH), LCD_HEIGHT); 1515 LCD_WIDTH-(XOFS-1+BB_WIDTH*BUBBLE_WIDTH), LCD_HEIGHT);
1511#endif 1516#endif
1517#endif
1512 1518
1513 /* display play board */ 1519 /* display play board */
1514 for(i=0; i<BB_HEIGHT; i++) { 1520 for(i=0; i<BB_HEIGHT; i++) {
@@ -2523,14 +2529,6 @@ static int bubbles(struct game_context* bb) {
2523 "UP to fire and show high scores, " 2529 "UP to fire and show high scores, "
2524 "LEFT/RIGHT to aim and to change level."); 2530 "LEFT/RIGHT to aim and to change level.");
2525#elif CONFIG_KEYPAD == IRIVER_H10_PAD 2531#elif CONFIG_KEYPAD == IRIVER_H10_PAD
2526#define BUBBLES_LEFT BUTTON_LEFT
2527#define BUBBLES_RIGHT BUTTON_RIGHT
2528#define BUBBLES_UP BUTTON_SCROLL_UP
2529#define BUBBLES_DOWN BUTTON_SCROLL_DOWN
2530#define BUBBLES_QUIT BUTTON_POWER
2531#define BUBBLES_START BUTTON_PLAY
2532#define BUBBLES_SELECT BUTTON_REW
2533#define BUBBLES_RESUME BUTTON_FF
2534 rb->lcd_puts(0, 2, "PLAY to start/pause"); 2532 rb->lcd_puts(0, 2, "PLAY to start/pause");
2535 rb->lcd_puts(0, 3, "FF to save/resume"); 2533 rb->lcd_puts(0, 3, "FF to save/resume");
2536 rb->lcd_puts(0, 4, "POWER to exit"); 2534 rb->lcd_puts(0, 4, "POWER to exit");