From 7cbc161d517eb9bfbd2a251d82f62b07c1752168 Mon Sep 17 00:00:00 2001 From: Marianne Arnold Date: Fri, 28 Sep 2007 21:16:35 +0000 Subject: 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 --- apps/plugins/bitmaps/native/SOURCES | 56 ++++++++++----------- .../native/bubbles_background.128x128x16.bmp | Bin 0 -> 49206 bytes .../native/bubbles_background.160x128x16.bmp | Bin 0 -> 61494 bytes .../native/bubbles_background.176x132x16.bmp | Bin 0 -> 69750 bytes .../native/bubbles_background.176x220x16.bmp | Bin 0 -> 116214 bytes .../native/bubbles_background.220x176x16.bmp | Bin 0 -> 116214 bytes .../native/bubbles_background.240x320x16.bmp | Bin 0 -> 230454 bytes .../native/bubbles_background.320x240x16.bmp | Bin 0 -> 230454 bytes .../bitmaps/native/bubbles_left.160x128x16.bmp | Bin 12854 -> 0 bytes .../bitmaps/native/bubbles_left.176x132x16.bmp | Bin 15894 -> 0 bytes .../bitmaps/native/bubbles_left.176x220x16.bmp | Bin 31734 -> 0 bytes .../bitmaps/native/bubbles_left.220x176x16.bmp | Bin 24694 -> 0 bytes .../bitmaps/native/bubbles_left.240x320x16.bmp | Bin 61494 -> 0 bytes .../bitmaps/native/bubbles_left.320x240x16.bmp | Bin 51894 -> 0 bytes .../bitmaps/native/bubbles_right.160x128x16.bmp | Bin 12342 -> 0 bytes .../bitmaps/native/bubbles_right.176x132x16.bmp | Bin 16422 -> 0 bytes .../bitmaps/native/bubbles_right.220x176x16.bmp | Bin 25398 -> 0 bytes .../bitmaps/native/bubbles_right.320x240x16.bmp | Bin 52854 -> 0 bytes apps/plugins/bubbles.c | 15 ++---- 19 files changed, 31 insertions(+), 40 deletions(-) create mode 100644 apps/plugins/bitmaps/native/bubbles_background.128x128x16.bmp create mode 100644 apps/plugins/bitmaps/native/bubbles_background.160x128x16.bmp create mode 100644 apps/plugins/bitmaps/native/bubbles_background.176x132x16.bmp create mode 100644 apps/plugins/bitmaps/native/bubbles_background.176x220x16.bmp create mode 100644 apps/plugins/bitmaps/native/bubbles_background.220x176x16.bmp create mode 100644 apps/plugins/bitmaps/native/bubbles_background.240x320x16.bmp create mode 100644 apps/plugins/bitmaps/native/bubbles_background.320x240x16.bmp delete mode 100644 apps/plugins/bitmaps/native/bubbles_left.160x128x16.bmp delete mode 100644 apps/plugins/bitmaps/native/bubbles_left.176x132x16.bmp delete mode 100755 apps/plugins/bitmaps/native/bubbles_left.176x220x16.bmp delete mode 100644 apps/plugins/bitmaps/native/bubbles_left.220x176x16.bmp delete mode 100644 apps/plugins/bitmaps/native/bubbles_left.240x320x16.bmp delete mode 100644 apps/plugins/bitmaps/native/bubbles_left.320x240x16.bmp delete mode 100644 apps/plugins/bitmaps/native/bubbles_right.160x128x16.bmp delete mode 100644 apps/plugins/bitmaps/native/bubbles_right.176x132x16.bmp delete mode 100644 apps/plugins/bitmaps/native/bubbles_right.220x176x16.bmp delete mode 100644 apps/plugins/bitmaps/native/bubbles_right.320x240x16.bmp (limited to 'apps/plugins') diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index 55ad8392c3..5e66779abb 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 new file mode 100644 index 0000000000..38afb6ea75 Binary files /dev/null and b/apps/plugins/bitmaps/native/bubbles_background.128x128x16.bmp differ diff --git a/apps/plugins/bitmaps/native/bubbles_background.160x128x16.bmp b/apps/plugins/bitmaps/native/bubbles_background.160x128x16.bmp new file mode 100644 index 0000000000..a77b7b1909 Binary files /dev/null and b/apps/plugins/bitmaps/native/bubbles_background.160x128x16.bmp differ diff --git a/apps/plugins/bitmaps/native/bubbles_background.176x132x16.bmp b/apps/plugins/bitmaps/native/bubbles_background.176x132x16.bmp new file mode 100644 index 0000000000..d7a006b2fa Binary files /dev/null and b/apps/plugins/bitmaps/native/bubbles_background.176x132x16.bmp differ diff --git a/apps/plugins/bitmaps/native/bubbles_background.176x220x16.bmp b/apps/plugins/bitmaps/native/bubbles_background.176x220x16.bmp new file mode 100644 index 0000000000..1b20464185 Binary files /dev/null and b/apps/plugins/bitmaps/native/bubbles_background.176x220x16.bmp differ diff --git a/apps/plugins/bitmaps/native/bubbles_background.220x176x16.bmp b/apps/plugins/bitmaps/native/bubbles_background.220x176x16.bmp new file mode 100644 index 0000000000..957d0b93b5 Binary files /dev/null and b/apps/plugins/bitmaps/native/bubbles_background.220x176x16.bmp differ diff --git a/apps/plugins/bitmaps/native/bubbles_background.240x320x16.bmp b/apps/plugins/bitmaps/native/bubbles_background.240x320x16.bmp new file mode 100644 index 0000000000..3397b3f432 Binary files /dev/null and b/apps/plugins/bitmaps/native/bubbles_background.240x320x16.bmp differ diff --git a/apps/plugins/bitmaps/native/bubbles_background.320x240x16.bmp b/apps/plugins/bitmaps/native/bubbles_background.320x240x16.bmp new file mode 100644 index 0000000000..f19278b018 Binary files /dev/null and b/apps/plugins/bitmaps/native/bubbles_background.320x240x16.bmp differ diff --git a/apps/plugins/bitmaps/native/bubbles_left.160x128x16.bmp b/apps/plugins/bitmaps/native/bubbles_left.160x128x16.bmp deleted file mode 100644 index 15f78cfdf2..0000000000 Binary files a/apps/plugins/bitmaps/native/bubbles_left.160x128x16.bmp and /dev/null differ diff --git a/apps/plugins/bitmaps/native/bubbles_left.176x132x16.bmp b/apps/plugins/bitmaps/native/bubbles_left.176x132x16.bmp deleted file mode 100644 index dbad0543a3..0000000000 Binary files a/apps/plugins/bitmaps/native/bubbles_left.176x132x16.bmp and /dev/null differ diff --git a/apps/plugins/bitmaps/native/bubbles_left.176x220x16.bmp b/apps/plugins/bitmaps/native/bubbles_left.176x220x16.bmp deleted file mode 100755 index 7d66663a0a..0000000000 Binary files a/apps/plugins/bitmaps/native/bubbles_left.176x220x16.bmp and /dev/null differ diff --git a/apps/plugins/bitmaps/native/bubbles_left.220x176x16.bmp b/apps/plugins/bitmaps/native/bubbles_left.220x176x16.bmp deleted file mode 100644 index cbe38ca53c..0000000000 Binary files a/apps/plugins/bitmaps/native/bubbles_left.220x176x16.bmp and /dev/null differ diff --git a/apps/plugins/bitmaps/native/bubbles_left.240x320x16.bmp b/apps/plugins/bitmaps/native/bubbles_left.240x320x16.bmp deleted file mode 100644 index 6e4bb4533e..0000000000 Binary files a/apps/plugins/bitmaps/native/bubbles_left.240x320x16.bmp and /dev/null differ diff --git a/apps/plugins/bitmaps/native/bubbles_left.320x240x16.bmp b/apps/plugins/bitmaps/native/bubbles_left.320x240x16.bmp deleted file mode 100644 index 194bea0ff0..0000000000 Binary files a/apps/plugins/bitmaps/native/bubbles_left.320x240x16.bmp and /dev/null differ diff --git a/apps/plugins/bitmaps/native/bubbles_right.160x128x16.bmp b/apps/plugins/bitmaps/native/bubbles_right.160x128x16.bmp deleted file mode 100644 index d065365e82..0000000000 Binary files a/apps/plugins/bitmaps/native/bubbles_right.160x128x16.bmp and /dev/null differ diff --git a/apps/plugins/bitmaps/native/bubbles_right.176x132x16.bmp b/apps/plugins/bitmaps/native/bubbles_right.176x132x16.bmp deleted file mode 100644 index 1093c17b2b..0000000000 Binary files a/apps/plugins/bitmaps/native/bubbles_right.176x132x16.bmp and /dev/null differ diff --git a/apps/plugins/bitmaps/native/bubbles_right.220x176x16.bmp b/apps/plugins/bitmaps/native/bubbles_right.220x176x16.bmp deleted file mode 100644 index c0d8bef8ab..0000000000 Binary files a/apps/plugins/bitmaps/native/bubbles_right.220x176x16.bmp and /dev/null differ diff --git a/apps/plugins/bitmaps/native/bubbles_right.320x240x16.bmp b/apps/plugins/bitmaps/native/bubbles_right.320x240x16.bmp deleted file mode 100644 index 5872fdc8ec..0000000000 Binary files a/apps/plugins/bitmaps/native/bubbles_right.320x240x16.bmp and /dev/null differ diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index 4d49c3fc14..812a88fb10 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 */ -- cgit v1.2.3