diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/jewels.c | 79 |
1 files changed, 11 insertions, 68 deletions
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index 6c436cfb24..e3dfcc3866 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "lib/display_text.h" | 25 | #include "lib/display_text.h" |
26 | #include "lib/highscore.h" | 26 | #include "lib/highscore.h" |
27 | #include "lib/playback_control.h" | 27 | #include "lib/playback_control.h" |
28 | #include "pluginbitmaps/jewels.h" | ||
28 | 29 | ||
29 | #ifdef HAVE_LCD_BITMAP | 30 | #ifdef HAVE_LCD_BITMAP |
30 | 31 | ||
@@ -272,81 +273,23 @@ CONFIG_KEYPAD == MROBE500_PAD | |||
272 | #endif | 273 | #endif |
273 | #endif | 274 | #endif |
274 | 275 | ||
275 | /* use 30x30 tiles (iPod Video, Gigabeat, Onda VX747) */ | ||
276 | #if (LCD_HEIGHT == 240) && (LCD_WIDTH == 320) || \ | ||
277 | ((LCD_HEIGHT == 320) && (LCD_WIDTH == 240)) || \ | ||
278 | ((LCD_HEIGHT == 400) && (LCD_WIDTH == 240)) | ||
279 | #define TILE_WIDTH 30 | ||
280 | #define TILE_HEIGHT 30 | ||
281 | #define YOFS 0 | ||
282 | #define NUM_SCORES 10 | ||
283 | |||
284 | /* use 22x22 tiles (H300, iPod Color) */ | ||
285 | #elif ((LCD_HEIGHT == 176) && (LCD_WIDTH == 220)) || \ | ||
286 | ((LCD_HEIGHT == 220) && (LCD_WIDTH == 176)) | ||
287 | #define TILE_WIDTH 22 | ||
288 | #define TILE_HEIGHT 22 | ||
289 | #define YOFS 0 | ||
290 | #define NUM_SCORES 5 | ||
291 | |||
292 | /* use 16x16 tiles (iPod Nano) */ | ||
293 | #elif (LCD_HEIGHT == 132) && (LCD_WIDTH == 176) | ||
294 | #define TILE_WIDTH 16 | ||
295 | #define TILE_HEIGHT 16 | ||
296 | #define YOFS 4 | ||
297 | #define NUM_SCORES 5 | ||
298 | |||
299 | /* use 16x16 tiles (H100, iAudio X5, iPod 3G, iPod 4G grayscale) */ | ||
300 | #elif (LCD_HEIGHT == 128) && (LCD_WIDTH == 160) | ||
301 | #define TILE_WIDTH 16 | ||
302 | #define TILE_HEIGHT 16 | ||
303 | #define YOFS 0 | ||
304 | #define NUM_SCORES 5 | ||
305 | |||
306 | /* use 14x14 tiles (H10 5/6 GB) */ | ||
307 | #elif (LCD_HEIGHT == 128) && (LCD_WIDTH == 128) | ||
308 | #define TILE_WIDTH 14 | ||
309 | #define TILE_HEIGHT 14 | ||
310 | #define YOFS 0 | ||
311 | #define NUM_SCORES 5 | ||
312 | |||
313 | /* use 13x13 tiles (iPod Mini) */ | ||
314 | #elif (LCD_HEIGHT == 110) && (LCD_WIDTH == 138) | ||
315 | #define TILE_WIDTH 13 | ||
316 | #define TILE_HEIGHT 13 | ||
317 | #define YOFS 6 | ||
318 | #define NUM_SCORES 5 | ||
319 | |||
320 | /* use 12x12 tiles (iAudio M3) */ | ||
321 | #elif (LCD_HEIGHT == 96) && (LCD_WIDTH == 128) | ||
322 | #define TILE_WIDTH 12 | ||
323 | #define TILE_HEIGHT 12 | ||
324 | #define YOFS 0 | ||
325 | #define NUM_SCORES 5 | ||
326 | |||
327 | /* use 10x10 tiles (Sansa c200) */ | ||
328 | #elif (LCD_HEIGHT == 80) && (LCD_WIDTH == 132) | ||
329 | #define TILE_WIDTH 10 | ||
330 | #define TILE_HEIGHT 10 | ||
331 | #define YOFS 0 | ||
332 | #define NUM_SCORES 5 | ||
333 | |||
334 | /* use 10x8 tiles (iFP 700) */ | 276 | /* use 10x8 tiles (iFP 700) */ |
335 | #elif (LCD_HEIGHT == 64) && (LCD_WIDTH == 128) | 277 | #if (LCD_HEIGHT == 64) && (LCD_WIDTH == 128) |
336 | #define TILE_WIDTH 10 | ||
337 | #define TILE_HEIGHT 8 | ||
338 | #define YOFS 0 | ||
339 | #define NUM_SCORES 5 | 278 | #define NUM_SCORES 5 |
340 | 279 | ||
341 | /* use 10x8 tiles (Recorder, Ondio) */ | 280 | /* use 10x8 tiles (Recorder, Ondio) */ |
342 | #elif (LCD_HEIGHT == 64) && (LCD_WIDTH == 112) | 281 | #elif (LCD_HEIGHT == 64) && (LCD_WIDTH == 112) |
343 | #define TILE_WIDTH 10 | ||
344 | #define TILE_HEIGHT 8 | ||
345 | #define YOFS 0 | ||
346 | #define NUM_SCORES 5 | 282 | #define NUM_SCORES 5 |
283 | #endif | ||
347 | 284 | ||
348 | #else | 285 | #define TILE_WIDTH BMPWIDTH_jewels |
349 | #error JEWELS: Unsupported LCD | 286 | #define TILE_HEIGHT (BMPHEIGHT_jewels/23) |
287 | |||
288 | /* This calculation assumes integer division w/ LCD_HEIGHT/TILE_HEIGHT */ | ||
289 | #define YOFS LCD_HEIGHT-((LCD_HEIGHT/TILE_HEIGHT)*TILE_HEIGHT) | ||
290 | |||
291 | #if !defined(NUM_SCORES) | ||
292 | #define NUM_SCORES LCD_HEIGHT/10 | ||
350 | #endif | 293 | #endif |
351 | 294 | ||
352 | /* swap directions */ | 295 | /* swap directions */ |