From 4ee3fed014be4b55d8421f13f9d343c829a45c77 Mon Sep 17 00:00:00 2001 From: Marianne Arnold Date: Sun, 18 May 2008 13:05:45 +0000 Subject: Sokoban: enable the plugin for the c200. Invent a new, a bit more rockboxish colour scheme since the old one didn't work in the small size that was needed for the c200's screen. Also use these colours in existing bmps and add some in-between sizes (e.g. for the Nano and Gigabeat) to use the screen size as best as possible. Rename the existing colour bmps consistently. Remove the drawing code for monochrome screens and let them use the bitmap build system too. This also allows further simplifying the code and let the plugin retrieve the tilesize from the bitmap. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17569 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/bitmaps/native/SOURCES | 51 +++++++++++++++------ .../bitmaps/native/sokoban_tiles.12x12x16.bmp | Bin 0 -> 3078 bytes .../plugins/bitmaps/native/sokoban_tiles.14x14.bmp | Bin 4366 -> 0 bytes .../bitmaps/native/sokoban_tiles.14x14x16.bmp | Bin 0 -> 4366 bytes .../plugins/bitmaps/native/sokoban_tiles.4x4x1.bmp | Bin 0 -> 174 bytes .../bitmaps/native/sokoban_tiles.5x5x16.bmp | Bin 0 -> 614 bytes .../plugins/bitmaps/native/sokoban_tiles.5x5x2.bmp | Bin 0 -> 350 bytes apps/plugins/bitmaps/native/sokoban_tiles.6x6.bmp | Bin 894 -> 0 bytes .../plugins/bitmaps/native/sokoban_tiles.6x6x1.bmp | Bin 0 -> 230 bytes .../bitmaps/native/sokoban_tiles.6x6x16.bmp | Bin 0 -> 894 bytes .../plugins/bitmaps/native/sokoban_tiles.6x6x2.bmp | Bin 894 -> 406 bytes .../bitmaps/native/sokoban_tiles.7x7x16.bmp | Bin 0 -> 1230 bytes apps/plugins/bitmaps/native/sokoban_tiles.9x9.bmp | Bin 1818 -> 0 bytes .../bitmaps/native/sokoban_tiles.9x9x16.bmp | Bin 0 -> 1818 bytes 14 files changed, 37 insertions(+), 14 deletions(-) create mode 100644 apps/plugins/bitmaps/native/sokoban_tiles.12x12x16.bmp delete mode 100644 apps/plugins/bitmaps/native/sokoban_tiles.14x14.bmp create mode 100644 apps/plugins/bitmaps/native/sokoban_tiles.14x14x16.bmp create mode 100644 apps/plugins/bitmaps/native/sokoban_tiles.4x4x1.bmp create mode 100644 apps/plugins/bitmaps/native/sokoban_tiles.5x5x16.bmp create mode 100644 apps/plugins/bitmaps/native/sokoban_tiles.5x5x2.bmp delete mode 100644 apps/plugins/bitmaps/native/sokoban_tiles.6x6.bmp create mode 100644 apps/plugins/bitmaps/native/sokoban_tiles.6x6x1.bmp create mode 100644 apps/plugins/bitmaps/native/sokoban_tiles.6x6x16.bmp create mode 100644 apps/plugins/bitmaps/native/sokoban_tiles.7x7x16.bmp delete mode 100644 apps/plugins/bitmaps/native/sokoban_tiles.9x9.bmp create mode 100644 apps/plugins/bitmaps/native/sokoban_tiles.9x9x16.bmp (limited to 'apps/plugins/bitmaps/native') diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index 74b57b3452..6762e7421c 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES @@ -437,22 +437,45 @@ snake2_bottom.160x128x2.bmp #endif /* Sokoban*/ +/* biggest tilesize: 20 columns x 16 rows + stat box need to fit (minimum) +* allow clipping of up to 4 pixels in favour of using a bigger tilesize +* stat box width of 32 in horizontal & height of 25 pixels in vertical layout +* currently the horizontal layout fits best on all wider than high displays + */ + +#if LCD_WIDTH > LCD_HEIGHT +#define SOKOBAN_TILESIZE ((LCD_WIDTH + 4 -32)/20) +#else +#define SOKOBAN_TILESIZE ((LCD_WIDTH + 4)/20) +#endif + #ifdef HAVE_LCD_COLOR -#if (LCD_HEIGHT >= 224) && (LCD_WIDTH >= 312) || \ - (LCD_HEIGHT >= 249) && (LCD_WIDTH >= 280) -sokoban_tiles.14x14.bmp -#elif (LCD_HEIGHT >= 144) && (LCD_WIDTH >= 212) || \ - (LCD_HEIGHT >= 169) && (LCD_WIDTH >= 180-4) -sokoban_tiles.9x9.bmp -#elif (LCD_HEIGHT >= 96 && LCD_WIDTH >= 152) || \ - (LCD_HEIGHT >= 121 && LCD_WIDTH >= 120) -sokoban_tiles.6x6.bmp -#endif -#elif LCD_DEPTH >= 2 && \ - ((LCD_HEIGHT >= 96 && LCD_WIDTH >= 152) || \ - (LCD_HEIGHT >= 121 && LCD_WIDTH >= 120)) +#if SOKOBAN_TILESIZE >= 14 +sokoban_tiles.14x14x16.bmp +#elif SOKOBAN_TILESIZE >= 12 +sokoban_tiles.12x12x16.bmp +#elif SOKOBAN_TILESIZE >= 9 +sokoban_tiles.9x9x16.bmp +#elif SOKOBAN_TILESIZE >= 7 +sokoban_tiles.7x7x16.bmp +#elif SOKOBAN_TILESIZE >= 6 +sokoban_tiles.6x6x16.bmp +#elif SOKOBAN_TILESIZE >= 5 +sokoban_tiles.5x5x16.bmp +#endif /* tilesize */ +#elif LCD_DEPTH > 1 /*greyscale */ +#if SOKOBAN_TILESIZE >= 6 sokoban_tiles.6x6x2.bmp -#endif +#elif SOKOBAN_TILESIZE >= 5 +sokoban_tiles.5x5x2.bmp +#endif /* tilesize */ +#else /* mono */ +#if SOKOBAN_TILESIZE >= 6 +sokoban_tiles.6x6x1.bmp +#elif SOKOBAN_TILESIZE >= 4 +sokoban_tiles.4x4x1.bmp +#endif /* tilesize */ +#endif /* HAVE_COLOR */ /* Solitaire and Blackjack */ #ifdef HAVE_LCD_COLOR diff --git a/apps/plugins/bitmaps/native/sokoban_tiles.12x12x16.bmp b/apps/plugins/bitmaps/native/sokoban_tiles.12x12x16.bmp new file mode 100644 index 0000000000..8ac740bbc1 Binary files /dev/null and b/apps/plugins/bitmaps/native/sokoban_tiles.12x12x16.bmp differ diff --git a/apps/plugins/bitmaps/native/sokoban_tiles.14x14.bmp b/apps/plugins/bitmaps/native/sokoban_tiles.14x14.bmp deleted file mode 100644 index 47dc5486cf..0000000000 Binary files a/apps/plugins/bitmaps/native/sokoban_tiles.14x14.bmp and /dev/null differ diff --git a/apps/plugins/bitmaps/native/sokoban_tiles.14x14x16.bmp b/apps/plugins/bitmaps/native/sokoban_tiles.14x14x16.bmp new file mode 100644 index 0000000000..5dc2ebeb65 Binary files /dev/null and b/apps/plugins/bitmaps/native/sokoban_tiles.14x14x16.bmp differ diff --git a/apps/plugins/bitmaps/native/sokoban_tiles.4x4x1.bmp b/apps/plugins/bitmaps/native/sokoban_tiles.4x4x1.bmp new file mode 100644 index 0000000000..b5a79aa448 Binary files /dev/null and b/apps/plugins/bitmaps/native/sokoban_tiles.4x4x1.bmp differ diff --git a/apps/plugins/bitmaps/native/sokoban_tiles.5x5x16.bmp b/apps/plugins/bitmaps/native/sokoban_tiles.5x5x16.bmp new file mode 100644 index 0000000000..57bc1acc79 Binary files /dev/null and b/apps/plugins/bitmaps/native/sokoban_tiles.5x5x16.bmp differ diff --git a/apps/plugins/bitmaps/native/sokoban_tiles.5x5x2.bmp b/apps/plugins/bitmaps/native/sokoban_tiles.5x5x2.bmp new file mode 100644 index 0000000000..d68f78dd65 Binary files /dev/null and b/apps/plugins/bitmaps/native/sokoban_tiles.5x5x2.bmp differ diff --git a/apps/plugins/bitmaps/native/sokoban_tiles.6x6.bmp b/apps/plugins/bitmaps/native/sokoban_tiles.6x6.bmp deleted file mode 100644 index 38c045790d..0000000000 Binary files a/apps/plugins/bitmaps/native/sokoban_tiles.6x6.bmp and /dev/null differ diff --git a/apps/plugins/bitmaps/native/sokoban_tiles.6x6x1.bmp b/apps/plugins/bitmaps/native/sokoban_tiles.6x6x1.bmp new file mode 100644 index 0000000000..fdebba604f Binary files /dev/null and b/apps/plugins/bitmaps/native/sokoban_tiles.6x6x1.bmp differ diff --git a/apps/plugins/bitmaps/native/sokoban_tiles.6x6x16.bmp b/apps/plugins/bitmaps/native/sokoban_tiles.6x6x16.bmp new file mode 100644 index 0000000000..0c4766300b Binary files /dev/null and b/apps/plugins/bitmaps/native/sokoban_tiles.6x6x16.bmp differ diff --git a/apps/plugins/bitmaps/native/sokoban_tiles.6x6x2.bmp b/apps/plugins/bitmaps/native/sokoban_tiles.6x6x2.bmp index ccf184d558..034783dc96 100644 Binary files a/apps/plugins/bitmaps/native/sokoban_tiles.6x6x2.bmp and b/apps/plugins/bitmaps/native/sokoban_tiles.6x6x2.bmp differ diff --git a/apps/plugins/bitmaps/native/sokoban_tiles.7x7x16.bmp b/apps/plugins/bitmaps/native/sokoban_tiles.7x7x16.bmp new file mode 100644 index 0000000000..ca8bc8820f Binary files /dev/null and b/apps/plugins/bitmaps/native/sokoban_tiles.7x7x16.bmp differ diff --git a/apps/plugins/bitmaps/native/sokoban_tiles.9x9.bmp b/apps/plugins/bitmaps/native/sokoban_tiles.9x9.bmp deleted file mode 100644 index 9675db8b14..0000000000 Binary files a/apps/plugins/bitmaps/native/sokoban_tiles.9x9.bmp and /dev/null differ diff --git a/apps/plugins/bitmaps/native/sokoban_tiles.9x9x16.bmp b/apps/plugins/bitmaps/native/sokoban_tiles.9x9x16.bmp new file mode 100644 index 0000000000..3d63b0812f Binary files /dev/null and b/apps/plugins/bitmaps/native/sokoban_tiles.9x9x16.bmp differ -- cgit v1.2.3