summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-04-15 12:30:37 +0000
committerJens Arnold <amiconn@rockbox.org>2006-04-15 12:30:37 +0000
commit13ade06d4a2d3ae39198c569b319bcdd155fae57 (patch)
tree9b20dfb5404182c82621461a3c3a640cadbe6bce
parent7b22e99bd82a751f542fd8a1290d923510cfb381 (diff)
downloadrockbox-13ade06d4a2d3ae39198c569b319bcdd155fae57.tar.gz
rockbox-13ade06d4a2d3ae39198c569b319bcdd155fae57.zip
Patch #5102 by Anton Romanov: Bubbles for ipod mini.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9677 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/SOURCES2
-rw-r--r--apps/plugins/bitmaps/mono/SOURCES2
-rwxr-xr-xapps/plugins/bitmaps/mono/bubbles_bubble.138x110x1.bmpbin0 -> 374 bytes
-rw-r--r--apps/plugins/bitmaps/native/SOURCES2
-rwxr-xr-xapps/plugins/bitmaps/native/bubbles_emblem.138x110x2.bmpbin0 -> 1014 bytes
-rwxr-xr-xapps/plugins/bubbles.c17
6 files changed, 22 insertions, 1 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index a40be68063..9ca5f89ad1 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -36,7 +36,7 @@ plasma.c
36#endif 36#endif
37 37
38bounce.c 38bounce.c
39#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) 39#if ((LCD_WIDTH >= 138) && (LCD_HEIGHT >= 110))
40bubbles.c 40bubbles.c
41#endif 41#endif
42#if LCD_WIDTH != 128 42#if LCD_WIDTH != 128
diff --git a/apps/plugins/bitmaps/mono/SOURCES b/apps/plugins/bitmaps/mono/SOURCES
index 34f0f4254b..0e8abd86f6 100644
--- a/apps/plugins/bitmaps/mono/SOURCES
+++ b/apps/plugins/bitmaps/mono/SOURCES
@@ -5,6 +5,8 @@
5bubbles_bubble.160x128x1.bmp 5bubbles_bubble.160x128x1.bmp
6#elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 132) 6#elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 132)
7bubbles_bubble.160x128x1.bmp 7bubbles_bubble.160x128x1.bmp
8#elif (LCD_WIDTH == 138) && (LCD_HEIGHT == 110)
9bubbles_bubble.138x110x1.bmp
8#elif ((LCD_WIDTH == 220) && (LCD_HEIGHT == 176)) || \ 10#elif ((LCD_WIDTH == 220) && (LCD_HEIGHT == 176)) || \
9 ((LCD_WIDTH == 240) && (LCD_HEIGHT == 320)) 11 ((LCD_WIDTH == 240) && (LCD_HEIGHT == 320))
10bubbles_bubble.220x176x1.bmp 12bubbles_bubble.220x176x1.bmp
diff --git a/apps/plugins/bitmaps/mono/bubbles_bubble.138x110x1.bmp b/apps/plugins/bitmaps/mono/bubbles_bubble.138x110x1.bmp
new file mode 100755
index 0000000000..914e98669f
--- /dev/null
+++ b/apps/plugins/bitmaps/mono/bubbles_bubble.138x110x1.bmp
Binary files differ
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES
index fdded32a92..92c2f751aa 100644
--- a/apps/plugins/bitmaps/native/SOURCES
+++ b/apps/plugins/bitmaps/native/SOURCES
@@ -3,6 +3,8 @@
3/* Bubbles */ 3/* Bubbles */
4#if (LCD_WIDTH == 160) && (LCD_HEIGHT == 128) && !defined(HAVE_LCD_COLOR) 4#if (LCD_WIDTH == 160) && (LCD_HEIGHT == 128) && !defined(HAVE_LCD_COLOR)
5bubbles_emblem.160x128x2.bmp 5bubbles_emblem.160x128x2.bmp
6#elif (LCD_WIDTH == 138) && (LCD_HEIGHT == 110)
7bubbles_emblem.138x110x2.bmp
6#elif (LCD_WIDTH == 160) && (LCD_HEIGHT == 128) && defined(HAVE_LCD_COLOR) 8#elif (LCD_WIDTH == 160) && (LCD_HEIGHT == 128) && defined(HAVE_LCD_COLOR)
7bubbles_emblem.160x128x16.bmp 9bubbles_emblem.160x128x16.bmp
8bubbles_left.160x128x16.bmp 10bubbles_left.160x128x16.bmp
diff --git a/apps/plugins/bitmaps/native/bubbles_emblem.138x110x2.bmp b/apps/plugins/bitmaps/native/bubbles_emblem.138x110x2.bmp
new file mode 100755
index 0000000000..9f993e3565
--- /dev/null
+++ b/apps/plugins/bitmaps/native/bubbles_emblem.138x110x2.bmp
Binary files differ
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c
index 7ff8b62554..19bc7a12f1 100755
--- a/apps/plugins/bubbles.c
+++ b/apps/plugins/bubbles.c
@@ -144,6 +144,15 @@ PLUGIN_HEADER
144#define ROW_INDENT 6 144#define ROW_INDENT 6
145#define MAX_FPS 30 145#define MAX_FPS 30
146 146
147/* 10x10 bubbles (iPod Mini) */
148#elif (LCD_HEIGHT == 110) && (LCD_WIDTH == 138)
149#define BUBBLE_SZ 10
150#define EMBLEM_SZ 6
151#define XOFS 33
152#define ROW_HEIGHT 8
153#define ROW_INDENT 6
154#define MAX_FPS 30
155
147#else 156#else
148 #error BUBBLES: Unsupported LCD type 157 #error BUBBLES: Unsupported LCD type
149#endif 158#endif
@@ -2436,10 +2445,18 @@ static int bubbles(struct game_context* bb) {
2436 rb->snprintf(str, 28, "Start on level %d of %d", startlevel+1, 2445 rb->snprintf(str, 28, "Start on level %d of %d", startlevel+1,
2437 bb->highlevel+1); 2446 bb->highlevel+1);
2438 rb->lcd_puts(0, 10, str); 2447 rb->lcd_puts(0, 10, str);
2448#if LCD_HEIGHT > 110
2439 rb->lcd_puts(0, 12, "High Score:"); 2449 rb->lcd_puts(0, 12, "High Score:");
2450#else
2451 rb->lcd_puts(0, 11, "High Score:");
2452#endif
2440 rb->snprintf(str, 30, "%d, Lvl %d", 2453 rb->snprintf(str, 30, "%d, Lvl %d",
2441 bb->highscores[0].score, bb->highscores[0].level); 2454 bb->highscores[0].score, bb->highscores[0].level);
2455#if LCD_HEIGHT > 110
2442 rb->lcd_puts(2, 13, str); 2456 rb->lcd_puts(2, 13, str);
2457#else
2458 rb->lcd_puts(2, 12, str);
2459#endif
2443 } else { 2460 } else {
2444 /* show high scores */ 2461 /* show high scores */
2445 rb->snprintf(str, 12, "%s", "High Scores"); 2462 rb->snprintf(str, 12, "%s", "High Scores");