diff options
Diffstat (limited to 'apps/plugins/bubbles.c')
-rw-r--r-- | apps/plugins/bubbles.c | 69 |
1 files changed, 26 insertions, 43 deletions
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index 05ce15d75b..85cde59188 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c | |||
@@ -95,14 +95,21 @@ PLUGIN_HEADER | |||
95 | 95 | ||
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | /* external bitmaps */ | ||
99 | #ifdef HAVE_LCD_COLOR | ||
100 | #include "bubbles_background.h" | ||
101 | #endif | ||
102 | #include "bubbles_bubble.h" | ||
103 | #include "bubbles_emblem.h" | ||
104 | |||
105 | #define BUBBLE_WIDTH BMPWIDTH_bubbles_bubble | ||
106 | #define BUBBLE_HEIGHT BMPHEIGHT_bubbles_bubble | ||
107 | #define EMBLEM_WIDTH BMPWIDTH_bubbles_emblem | ||
108 | #define EMBLEM_HEIGHT (BMPHEIGHT_bubbles_emblem/8) | ||
98 | 109 | ||
99 | /* bubbles will consume height of ROW_HEIGHT*(BB_HEIGHT-1)+BUBBLE_HEIGHT*3/2 */ | 110 | /* bubbles will consume height of ROW_HEIGHT*(BB_HEIGHT-1)+BUBBLE_HEIGHT*3/2 */ |
100 | /* 22x22 bubbles (iPod Video) */ | 111 | /* 22x22 bubbles (iPod Video) */ |
101 | #if (LCD_HEIGHT == 240) && (LCD_WIDTH == 320) | 112 | #if (LCD_HEIGHT == 240) && (LCD_WIDTH == 320) |
102 | #define BUBBLE_WIDTH 22 | ||
103 | #define BUBBLE_HEIGHT 22 | ||
104 | #define EMBLEM_WIDTH 16 | ||
105 | #define EMBLEM_HEIGHT 16 | ||
106 | #define XOFS 72 | 113 | #define XOFS 72 |
107 | #define ROW_HEIGHT 18 | 114 | #define ROW_HEIGHT 18 |
108 | #define ROW_INDENT 11 | 115 | #define ROW_INDENT 11 |
@@ -110,10 +117,6 @@ PLUGIN_HEADER | |||
110 | 117 | ||
111 | /* 22x22 bubbles (Gigabeat) */ | 118 | /* 22x22 bubbles (Gigabeat) */ |
112 | #elif (LCD_HEIGHT == 320) && (LCD_WIDTH == 240) | 119 | #elif (LCD_HEIGHT == 320) && (LCD_WIDTH == 240) |
113 | #define BUBBLE_WIDTH 22 | ||
114 | #define BUBBLE_HEIGHT 22 | ||
115 | #define EMBLEM_WIDTH 16 | ||
116 | #define EMBLEM_HEIGHT 16 | ||
117 | #define XOFS 64 | 120 | #define XOFS 64 |
118 | #define ROW_HEIGHT 18 | 121 | #define ROW_HEIGHT 18 |
119 | #define ROW_INDENT 11 | 122 | #define ROW_INDENT 11 |
@@ -121,10 +124,6 @@ PLUGIN_HEADER | |||
121 | 124 | ||
122 | /* 16x16 bubbles (H300, iPod Color) */ | 125 | /* 16x16 bubbles (H300, iPod Color) */ |
123 | #elif (LCD_HEIGHT == 176) && (LCD_WIDTH == 220) | 126 | #elif (LCD_HEIGHT == 176) && (LCD_WIDTH == 220) |
124 | #define BUBBLE_WIDTH 16 | ||
125 | #define BUBBLE_HEIGHT 16 | ||
126 | #define EMBLEM_WIDTH 12 | ||
127 | #define EMBLEM_HEIGHT 12 | ||
128 | #define XOFS 46 | 127 | #define XOFS 46 |
129 | #define ROW_HEIGHT 14 | 128 | #define ROW_HEIGHT 14 |
130 | #define ROW_INDENT 8 | 129 | #define ROW_INDENT 8 |
@@ -132,10 +131,6 @@ PLUGIN_HEADER | |||
132 | 131 | ||
133 | /* 16x16 bubbles (Sansa E200) */ | 132 | /* 16x16 bubbles (Sansa E200) */ |
134 | #elif (LCD_HEIGHT == 220) && (LCD_WIDTH == 176) | 133 | #elif (LCD_HEIGHT == 220) && (LCD_WIDTH == 176) |
135 | #define BUBBLE_WIDTH 16 | ||
136 | #define BUBBLE_HEIGHT 16 | ||
137 | #define EMBLEM_WIDTH 12 | ||
138 | #define EMBLEM_HEIGHT 12 | ||
139 | #define XOFS 48 | 134 | #define XOFS 48 |
140 | #define ROW_HEIGHT 14 | 135 | #define ROW_HEIGHT 14 |
141 | #define ROW_INDENT 8 | 136 | #define ROW_INDENT 8 |
@@ -143,10 +138,6 @@ PLUGIN_HEADER | |||
143 | 138 | ||
144 | /* 12x12 bubbles (iPod Nano) */ | 139 | /* 12x12 bubbles (iPod Nano) */ |
145 | #elif (LCD_HEIGHT == 132) && (LCD_WIDTH == 176) | 140 | #elif (LCD_HEIGHT == 132) && (LCD_WIDTH == 176) |
146 | #define BUBBLE_WIDTH 12 | ||
147 | #define BUBBLE_HEIGHT 12 | ||
148 | #define EMBLEM_WIDTH 8 | ||
149 | #define EMBLEM_HEIGHT 8 | ||
150 | #define XOFS 40 | 141 | #define XOFS 40 |
151 | #define ROW_HEIGHT 10 | 142 | #define ROW_HEIGHT 10 |
152 | #define ROW_INDENT 6 | 143 | #define ROW_INDENT 6 |
@@ -154,10 +145,6 @@ PLUGIN_HEADER | |||
154 | 145 | ||
155 | /* 12x12 bubbles (H100, H10, iAudio X5, iPod 3G, iPod 4G grayscale) */ | 146 | /* 12x12 bubbles (H100, H10, iAudio X5, iPod 3G, iPod 4G grayscale) */ |
156 | #elif (LCD_HEIGHT == 128) && ((LCD_WIDTH == 160) || (LCD_WIDTH == 128)) | 147 | #elif (LCD_HEIGHT == 128) && ((LCD_WIDTH == 160) || (LCD_WIDTH == 128)) |
157 | #define BUBBLE_WIDTH 12 | ||
158 | #define BUBBLE_HEIGHT 12 | ||
159 | #define EMBLEM_WIDTH 8 | ||
160 | #define EMBLEM_HEIGHT 8 | ||
161 | #define XOFS 33 | 148 | #define XOFS 33 |
162 | #define ROW_HEIGHT 10 | 149 | #define ROW_HEIGHT 10 |
163 | #define ROW_INDENT 6 | 150 | #define ROW_INDENT 6 |
@@ -165,21 +152,20 @@ PLUGIN_HEADER | |||
165 | 152 | ||
166 | /* 10x10 bubbles (iPod Mini) */ | 153 | /* 10x10 bubbles (iPod Mini) */ |
167 | #elif (LCD_HEIGHT == 110) && (LCD_WIDTH == 138) | 154 | #elif (LCD_HEIGHT == 110) && (LCD_WIDTH == 138) |
168 | #define BUBBLE_WIDTH 10 | ||
169 | #define BUBBLE_HEIGHT 10 | ||
170 | #define EMBLEM_WIDTH 6 | ||
171 | #define EMBLEM_HEIGHT 6 | ||
172 | #define XOFS 33 | 155 | #define XOFS 33 |
173 | #define ROW_HEIGHT 8 | 156 | #define ROW_HEIGHT 8 |
174 | #define ROW_INDENT 5 | 157 | #define ROW_INDENT 5 |
175 | #define MAX_FPS 30 | 158 | #define MAX_FPS 30 |
176 | 159 | ||
160 | /* 9x9 bubbles (iAudio M3) */ | ||
161 | #elif (LCD_HEIGHT == 96) && (LCD_WIDTH == 128) | ||
162 | #define XOFS 45 | ||
163 | #define ROW_HEIGHT 7 | ||
164 | #define ROW_INDENT 4 | ||
165 | #define MAX_FPS 30 | ||
166 | |||
177 | /* 8x8 bubbles (Sansa C200) */ | 167 | /* 8x8 bubbles (Sansa C200) */ |
178 | #elif (LCD_HEIGHT == 80) && (LCD_WIDTH == 132) | 168 | #elif (LCD_HEIGHT == 80) && (LCD_WIDTH == 132) |
179 | #define BUBBLE_WIDTH 8 | ||
180 | #define BUBBLE_HEIGHT 8 | ||
181 | #define EMBLEM_WIDTH 6 | ||
182 | #define EMBLEM_HEIGHT 6 | ||
183 | #define XOFS 45 | 169 | #define XOFS 45 |
184 | #define ROW_HEIGHT 6 | 170 | #define ROW_HEIGHT 6 |
185 | #define ROW_INDENT 4 | 171 | #define ROW_INDENT 4 |
@@ -187,10 +173,6 @@ PLUGIN_HEADER | |||
187 | 173 | ||
188 | /* 8x7 bubbles (Archos recorder, Ondio) */ | 174 | /* 8x7 bubbles (Archos recorder, Ondio) */ |
189 | #elif (LCD_HEIGHT == 64) && (LCD_WIDTH == 112) | 175 | #elif (LCD_HEIGHT == 64) && (LCD_WIDTH == 112) |
190 | #define BUBBLE_WIDTH 8 | ||
191 | #define BUBBLE_HEIGHT 7 | ||
192 | #define EMBLEM_WIDTH 7 | ||
193 | #define EMBLEM_HEIGHT 5 | ||
194 | #define XOFS 33 | 176 | #define XOFS 33 |
195 | #define ROW_HEIGHT 5 | 177 | #define ROW_HEIGHT 5 |
196 | #define ROW_INDENT 4 | 178 | #define ROW_INDENT 4 |
@@ -209,13 +191,6 @@ PLUGIN_HEADER | |||
209 | /* collision distance squared */ | 191 | /* collision distance squared */ |
210 | #define MIN_DISTANCE ((BUBBLE_WIDTH*8)/10)*((BUBBLE_HEIGHT*8)/10) | 192 | #define MIN_DISTANCE ((BUBBLE_WIDTH*8)/10)*((BUBBLE_HEIGHT*8)/10) |
211 | 193 | ||
212 | /* external bitmaps */ | ||
213 | extern const fb_data bubbles_bubble[]; | ||
214 | extern const fb_data bubbles_emblem[]; | ||
215 | #ifdef HAVE_LCD_COLOR | ||
216 | extern const fb_data bubbles_background[]; | ||
217 | #endif | ||
218 | |||
219 | /* global rockbox api */ | 194 | /* global rockbox api */ |
220 | static struct plugin_api* rb; | 195 | static struct plugin_api* rb; |
221 | 196 | ||
@@ -2473,6 +2448,14 @@ static int bubbles(struct game_context* bb) { | |||
2473 | rb->lcd_puts(0, 4, "POWER to exit"); | 2448 | rb->lcd_puts(0, 4, "POWER to exit"); |
2474 | rb->lcd_puts_scroll(0, 5, "SELECT to fire and show high scores, " | 2449 | rb->lcd_puts_scroll(0, 5, "SELECT to fire and show high scores, " |
2475 | "LEFT/RIGHT to aim and change level"); | 2450 | "LEFT/RIGHT to aim and change level"); |
2451 | #elif CONFIG_KEYPAD == IAUDIO_M3_PAD | ||
2452 | rb->lcd_puts(0, 2, "PLAY to start/pause"); | ||
2453 | rb->lcd_puts(0, 3, "MENU to save/resume"); | ||
2454 | rb->lcd_puts(0, 4, "REC to exit"); | ||
2455 | rb->lcd_puts(0, 5, "MODE to fire"); | ||
2456 | rb->lcd_puts(0, 6, " and show high scores"); | ||
2457 | rb->lcd_puts(0, 7, "REW/FF to aim"); | ||
2458 | rb->lcd_puts(0, 8, "VOL UP/DN to change level"); | ||
2476 | #endif | 2459 | #endif |
2477 | #if LCD_WIDTH >= 138 | 2460 | #if LCD_WIDTH >= 138 |
2478 | rb->snprintf(str, 28, "Start on level %d of %d", startlevel+1, | 2461 | rb->snprintf(str, 28, "Start on level %d of %d", startlevel+1, |