From 02f1839bfe4766ac72631bd7b76f2fc7f291b89e Mon Sep 17 00:00:00 2001 From: Nicolas Pennequin Date: Sat, 26 Jan 2008 00:16:06 +0000 Subject: Accept FS#7218 by Dave Hooper: Bitmap version of the sliding puzzle game. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16168 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/lib/SOURCES | 2 +- apps/plugins/lib/bmp.c | 2 ++ apps/plugins/lib/bmp.h | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'apps/plugins/lib') diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES index 94372dc..c1f5a48 100644 --- a/apps/plugins/lib/SOURCES +++ b/apps/plugins/lib/SOURCES @@ -25,7 +25,7 @@ picture.c xlcd_core.c xlcd_draw.c xlcd_scroll.c -#ifdef HAVE_LCD_COLOR +#if LCD_DEPTH>1 bmp.c #endif #endif diff --git a/apps/plugins/lib/bmp.c b/apps/plugins/lib/bmp.c index 03bdc73..20adc6d 100644 --- a/apps/plugins/lib/bmp.c +++ b/apps/plugins/lib/bmp.c @@ -24,6 +24,7 @@ #include "lcd.h" #include "system.h" +#ifdef HAVE_LCD_COLOR #define LE16(x) (htole16(x))&0xff, ((htole16(x))>>8)&0xff #define LE32(x) (htole32(x))&0xff, ((htole32(x))>>8)&0xff, ((htole32(x))>>16)&0xff, ((htole32(x))>>24)&0xff /** @@ -82,6 +83,7 @@ int save_bmp_file( char* filename, struct bitmap *bm, struct plugin_api* rb ) rb->close( fh ); return 1; } +#endif /** Very simple image scale from src to dst (nearest neighbour). diff --git a/apps/plugins/lib/bmp.h b/apps/plugins/lib/bmp.h index e35c1ec..3e14243 100644 --- a/apps/plugins/lib/bmp.h +++ b/apps/plugins/lib/bmp.h @@ -22,10 +22,12 @@ #include "lcd.h" #include "plugin.h" +#ifdef HAVE_LCD_COLOR /** * Save bitmap to file */ int save_bmp_file( char* filename, struct bitmap *bm, struct plugin_api* rb ); +#endif /** Very simple image scale from src to dst (nearest neighbour). -- cgit v1.1