diff options
| author | Marianne Arnold <pixelma@rockbox.org> | 2007-09-28 21:16:35 +0000 |
|---|---|---|
| committer | Marianne Arnold <pixelma@rockbox.org> | 2007-09-28 21:16:35 +0000 |
| commit | 7cbc161d517eb9bfbd2a251d82f62b07c1752168 (patch) | |
| tree | 9a11bb0a4ab2e67628d27f1b6d5d93f58064b07e | |
| parent | c0e34fad91d4b17e8d419a6cc9669c9d8b9b7537 (diff) | |
| download | rockbox-7cbc161d517eb9bfbd2a251d82f62b07c1752168.zip rockbox-7cbc161d517eb9bfbd2a251d82f62b07c1752168.tar.gz rockbox-7cbc161d517eb9bfbd2a251d82f62b07c1752168.tar.bz2 rockbox-7cbc161d517eb9bfbd2a251d82f62b07c1752168.tar.xz | |
Make bubbles use one background picture that is the size of the display instead of combining a 'left' and sometimes a 'right' bmp. This way it's clearer how the background is generated and adapting to new display sizes should be easier.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14893 a1c6a512-1295-4272-9138-f99709370657
19 files changed, 31 insertions, 40 deletions
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index 55ad839..5e66779 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES @@ -60,37 +60,37 @@ brickmania_break.176x132x16.bmp jackpot_slots.30x420x1.bmp /* Bubbles */ -#if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) -bubbles_emblem.112x64x1.bmp -#elif (LCD_WIDTH == 138) && (LCD_HEIGHT == 110) -bubbles_emblem.138x110x2.bmp -#elif (LCD_WIDTH == 160) && (LCD_HEIGHT == 128) && !defined(HAVE_LCD_COLOR) -bubbles_emblem.160x128x2.bmp -#elif (LCD_WIDTH == 160) && (LCD_HEIGHT == 128) && defined(HAVE_LCD_COLOR) +#ifdef HAVE_LCD_COLOR +#if (LCD_WIDTH >= 320) && (LCD_HEIGHT >= 240) +bubbles_emblem.320x240x16.bmp +bubbles_background.320x240x16.bmp +#elif (LCD_WIDTH >= 240) && (LCD_HEIGHT >= 320) +bubbles_emblem.320x240x16.bmp +bubbles_background.240x320x16.bmp +#elif (LCD_WIDTH >= 220) && (LCD_HEIGHT >= 176) +bubbles_emblem.220x176x16.bmp +bubbles_background.220x176x16.bmp +#elif (LCD_WIDTH >= 176) && (LCD_HEIGHT >= 220) +bubbles_emblem.220x176x16.bmp +bubbles_background.176x220x16.bmp +#elif (LCD_WIDTH >= 176) && (LCD_HEIGHT >= 132) bubbles_emblem.160x128x16.bmp -bubbles_left.160x128x16.bmp -bubbles_right.160x128x16.bmp -#elif (LCD_WIDTH == 128) && (LCD_HEIGHT == 128) +bubbles_background.176x132x16.bmp +#elif (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) bubbles_emblem.160x128x16.bmp -bubbles_left.160x128x16.bmp -#elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 132) +bubbles_background.160x128x16.bmp +#elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 128) bubbles_emblem.160x128x16.bmp -bubbles_left.176x132x16.bmp -bubbles_right.176x132x16.bmp -#elif (LCD_WIDTH == 220) && (LCD_HEIGHT == 176) -bubbles_emblem.220x176x16.bmp -bubbles_left.220x176x16.bmp -bubbles_right.220x176x16.bmp -#elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 220) -bubbles_emblem.220x176x16.bmp -bubbles_left.176x220x16.bmp -#elif (LCD_WIDTH == 320) && (LCD_HEIGHT == 240) -bubbles_emblem.320x240x16.bmp -bubbles_left.320x240x16.bmp -bubbles_right.320x240x16.bmp -#elif (LCD_WIDTH == 240) && (LCD_HEIGHT == 320) -bubbles_emblem.320x240x16.bmp -bubbles_left.240x320x16.bmp +bubbles_background.128x128x16.bmp +#endif +#elif LCD_DEPTH <= 2 /* greyscale, mono */ +#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) +bubbles_emblem.160x128x2.bmp +#elif (LCD_WIDTH >= 138) && (LCD_HEIGHT >= 110) +bubbles_emblem.138x110x2.bmp +#elif (LCD_WIDTH >= 112) && (LCD_HEIGHT >= 64) +bubbles_emblem.112x64x1.bmp +#endif #endif /* ChessBox */ diff --git a/apps/plugins/bitmaps/native/bubbles_background.128x128x16.bmp b/apps/plugins/bitmaps/native/bubbles_background.128x128x16.bmp Binary files differnew file mode 100644 index 0000000..38afb6e --- /dev/null +++ b/apps/plugins/bitmaps/native/bubbles_background.128x128x16.bmp diff --git a/apps/plugins/bitmaps/native/bubbles_background.160x128x16.bmp b/apps/plugins/bitmaps/native/bubbles_background.160x128x16.bmp Binary files differnew file mode 100644 index 0000000..a77b7b1 --- /dev/null +++ b/apps/plugins/bitmaps/native/bubbles_background.160x128x16.bmp diff --git a/apps/plugins/bitmaps/native/bubbles_background.176x132x16.bmp b/apps/plugins/bitmaps/native/bubbles_background.176x132x16.bmp Binary files differnew file mode 100644 index 0000000..d7a006b --- /dev/null +++ b/apps/plugins/bitmaps/native/bubbles_background.176x132x16.bmp diff --git a/apps/plugins/bitmaps/native/bubbles_background.176x220x16.bmp b/apps/plugins/bitmaps/native/bubbles_background.176x220x16.bmp Binary files differnew file mode 100644 index 0000000..1b20464 --- /dev/null +++ b/apps/plugins/bitmaps/native/bubbles_background.176x220x16.bmp diff --git a/apps/plugins/bitmaps/native/bubbles_background.220x176x16.bmp b/apps/plugins/bitmaps/native/bubbles_background.220x176x16.bmp Binary files differnew file mode 100644 index 0000000..957d0b9 --- /dev/null +++ b/apps/plugins/bitmaps/native/bubbles_background.220x176x16.bmp diff --git a/apps/plugins/bitmaps/native/bubbles_background.240x320x16.bmp b/apps/plugins/bitmaps/native/bubbles_background.240x320x16.bmp Binary files differnew file mode 100644 index 0000000..3397b3f --- /dev/null +++ b/apps/plugins/bitmaps/native/bubbles_background.240x320x16.bmp diff --git a/apps/plugins/bitmaps/native/bubbles_background.320x240x16.bmp b/apps/plugins/bitmaps/native/bubbles_background.320x240x16.bmp Binary files differnew file mode 100644 index 0000000..f19278b --- /dev/null +++ b/apps/plugins/bitmaps/native/bubbles_background.320x240x16.bmp diff --git a/apps/plugins/bitmaps/native/bubbles_left.160x128x16.bmp b/apps/plugins/bitmaps/native/bubbles_left.160x128x16.bmp Binary files differdeleted file mode 100644 index 15f78cf..0000000 --- a/apps/plugins/bitmaps/native/bubbles_left.160x128x16.bmp +++ /dev/null diff --git a/apps/plugins/bitmaps/native/bubbles_left.176x132x16.bmp b/apps/plugins/bitmaps/native/bubbles_left.176x132x16.bmp Binary files differdeleted file mode 100644 index dbad054..0000000 --- a/apps/plugins/bitmaps/native/bubbles_left.176x132x16.bmp +++ /dev/null diff --git a/apps/plugins/bitmaps/native/bubbles_left.176x220x16.bmp b/apps/plugins/bitmaps/native/bubbles_left.176x220x16.bmp Binary files differdeleted file mode 100755 index 7d66663..0000000 --- a/apps/plugins/bitmaps/native/bubbles_left.176x220x16.bmp +++ /dev/null diff --git a/apps/plugins/bitmaps/native/bubbles_left.220x176x16.bmp b/apps/plugins/bitmaps/native/bubbles_left.220x176x16.bmp Binary files differdeleted file mode 100644 index cbe38ca..0000000 --- a/apps/plugins/bitmaps/native/bubbles_left.220x176x16.bmp +++ /dev/null diff --git a/apps/plugins/bitmaps/native/bubbles_left.240x320x16.bmp b/apps/plugins/bitmaps/native/bubbles_left.240x320x16.bmp Binary files differdeleted file mode 100644 index 6e4bb45..0000000 --- a/apps/plugins/bitmaps/native/bubbles_left.240x320x16.bmp +++ /dev/null diff --git a/apps/plugins/bitmaps/native/bubbles_left.320x240x16.bmp b/apps/plugins/bitmaps/native/bubbles_left.320x240x16.bmp Binary files differdeleted file mode 100644 index 194bea0..0000000 --- a/apps/plugins/bitmaps/native/bubbles_left.320x240x16.bmp +++ /dev/null diff --git a/apps/plugins/bitmaps/native/bubbles_right.160x128x16.bmp b/apps/plugins/bitmaps/native/bubbles_right.160x128x16.bmp Binary files differdeleted file mode 100644 index d065365..0000000 --- a/apps/plugins/bitmaps/native/bubbles_right.160x128x16.bmp +++ /dev/null diff --git a/apps/plugins/bitmaps/native/bubbles_right.176x132x16.bmp b/apps/plugins/bitmaps/native/bubbles_right.176x132x16.bmp Binary files differdeleted file mode 100644 index 1093c17..0000000 --- a/apps/plugins/bitmaps/native/bubbles_right.176x132x16.bmp +++ /dev/null diff --git a/apps/plugins/bitmaps/native/bubbles_right.220x176x16.bmp b/apps/plugins/bitmaps/native/bubbles_right.220x176x16.bmp Binary files differdeleted file mode 100644 index c0d8bef..0000000 --- a/apps/plugins/bitmaps/native/bubbles_right.220x176x16.bmp +++ /dev/null diff --git a/apps/plugins/bitmaps/native/bubbles_right.320x240x16.bmp b/apps/plugins/bitmaps/native/bubbles_right.320x240x16.bmp Binary files differdeleted file mode 100644 index 5872fdc..0000000 --- a/apps/plugins/bitmaps/native/bubbles_right.320x240x16.bmp +++ /dev/null diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index 4d49c3f..812a88f 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c @@ -202,11 +202,7 @@ PLUGIN_HEADER extern const fb_data bubbles_bubble[]; extern const fb_data bubbles_emblem[]; #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 +extern const fb_data bubbles_background[]; #endif /* global rockbox api */ @@ -1418,14 +1414,9 @@ static void bubbles_drawboard(struct game_context* bb) { /* clear screen */ rb->lcd_clear_display(); - /* draw sidebars */ + /* draw background */ #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 + rb->lcd_bitmap(bubbles_background, 0, 0, LCD_WIDTH, LCD_HEIGHT); #endif /* display play board */ |