summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorAntoine Cellerier <dionoea@videolan.org>2006-06-10 23:08:29 +0000
committerAntoine Cellerier <dionoea@videolan.org>2006-06-10 23:08:29 +0000
commit1d7f8067a6a52946f331ab040fd43917e58c36f6 (patch)
tree7f686771a863240ecc03d288e092d46df333433c /apps/plugins
parent2c450976fdbe62ba12d388c308815ee1edb16539 (diff)
downloadrockbox-1d7f8067a6a52946f331ab040fd43917e58c36f6.zip
rockbox-1d7f8067a6a52946f331ab040fd43917e58c36f6.tar.gz
rockbox-1d7f8067a6a52946f331ab040fd43917e58c36f6.tar.bz2
rockbox-1d7f8067a6a52946f331ab040fd43917e58c36f6.tar.xz
Grayscale graphics for sokoban. (h1x0, ipod mini and ipod 4g)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10108 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/bitmaps/native/SOURCES2
-rw-r--r--apps/plugins/bitmaps/native/sokoban_tiles.6x6x2.bmpbin0 -> 774 bytes
-rw-r--r--apps/plugins/sokoban.c20
3 files changed, 10 insertions, 12 deletions
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES
index 6b37436..c071b78 100644
--- a/apps/plugins/bitmaps/native/SOURCES
+++ b/apps/plugins/bitmaps/native/SOURCES
@@ -116,6 +116,8 @@ sokoban_tiles.9x9.bmp
/* LCD_HEIGHT >= 128 */
sokoban_tiles.6x6.bmp
#endif
+#elif LCD_DEPTH >= 2
+sokoban_tiles.6x6x2.bmp
#endif
/* Flip it */
diff --git a/apps/plugins/bitmaps/native/sokoban_tiles.6x6x2.bmp b/apps/plugins/bitmaps/native/sokoban_tiles.6x6x2.bmp
new file mode 100644
index 0000000..0cc7ad8
--- /dev/null
+++ b/apps/plugins/bitmaps/native/sokoban_tiles.6x6x2.bmp
Binary files differ
diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c
index 55f94b7..248a365 100644
--- a/apps/plugins/sokoban.c
+++ b/apps/plugins/sokoban.c
@@ -24,7 +24,7 @@
PLUGIN_HEADER
-#ifdef HAVE_LCD_COLOR
+#if LCD_DEPTH >= 2
extern const fb_data sokoban_tiles[];
#endif
@@ -426,7 +426,7 @@ static void update_screen(void)
int magnify = 14;
#elif LCD_HEIGHT >= 176 /* h3x0, ipod color/photo */
int magnify = 9;
-#elif LCD_HEIGHT >= 128 /* h1x0, ipod nano */
+#elif LCD_HEIGHT >= 110 /* h1x0, ipod nano, ipod mini */
int magnify = 6;
#else /* other */
int magnify = 4;
@@ -443,13 +443,9 @@ static void update_screen(void)
break;
case '#': /* this is a wall */
-#if HAVE_LCD_COLOR
+#if LCD_DEPTH >= 1
rb->lcd_bitmap_part( sokoban_tiles, 0, 1*magnify, magnify,
c, b, magnify, magnify );
-#elif LCD_DEPTH > 1
- rb->lcd_set_foreground(MEDIUM_GRAY);
- rb->lcd_fillrect(c, b, magnify, magnify);
- rb->lcd_set_foreground(LCD_BLACK);
#else
{
int i, j;
@@ -462,7 +458,7 @@ static void update_screen(void)
break;
case '.': /* this is a home location */
-#ifdef HAVE_LCD_COLOR
+#if LCD_DEPTH >= 1
rb->lcd_bitmap_part( sokoban_tiles, 0, 4*magnify, magnify,
c, b, magnify, magnify );
#else
@@ -472,7 +468,7 @@ static void update_screen(void)
break;
case '$': /* this is a box */
-#ifdef HAVE_LCD_COLOR
+#if LCD_DEPTH >= 1
rb->lcd_bitmap_part( sokoban_tiles, 0, 2*magnify, magnify,
c, b, magnify, magnify );
#else
@@ -482,7 +478,7 @@ static void update_screen(void)
case '@': /* this is you */
{
-#ifdef HAVE_LCD_COLOR
+#if LCD_DEPTH >= 1
rb->lcd_bitmap_part( sokoban_tiles, 0, 5*magnify, magnify,
c, b, magnify, magnify );
#else
@@ -503,7 +499,7 @@ static void update_screen(void)
case '%': /* this is a box on a home spot */
-#ifdef HAVE_LCD_COLOR
+#if LCD_DEPTH >= 1
rb->lcd_bitmap_part( sokoban_tiles, 0, 3*magnify, magnify,
c, b, magnify, magnify );
#else
@@ -513,7 +509,7 @@ static void update_screen(void)
#endif
break;
-#ifdef HAVE_LCD_COLOR
+#if LCD_DEPTH >= 1
default:
rb->lcd_bitmap_part( sokoban_tiles, 0, 0*magnify, magnify,
c, b, magnify, magnify );