diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index c9675d6c1a..d9a0be32c9 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES @@ -526,8 +526,8 @@ superdom_boarditems.240x320x16.bmp #endif #endif +/* Matrix */ #if LCD_DEPTH > 1 -/* matrix */ matrix_bold.bmp matrix_normal.bmp #endif @@ -546,23 +546,34 @@ matrix_normal.bmp #endif #endif -#if defined(HAVE_LCD_COLOR) -#if (LCD_WIDTH==132 && LCD_HEIGHT==80) +/* Sliding puzzle */ +#if (LCD_WIDTH != LCD_HEIGHT) +#define SMALLER_DIMENSION ((LCD_WIDTH < LCD_HEIGHT) ? LCD_WIDTH : LCD_HEIGHT) +#else /* 5/6GB H10 with square display */ +#define SMALLER_DIMENSION (LCD_HEIGHT - 18) +#endif + +#if defined HAVE_LCD_COLOR +#if SMALLER_DIMENSION <= 80 sliding_puzzle.80x80x16.bmp -#elif (LCD_WIDTH==128 || LCD_HEIGHT==128) +#elif SMALLER_DIMENSION <= 112 + sliding_puzzle.110x110x16.bmp +#elif SMALLER_DIMENSION <= 128 sliding_puzzle.128x128x16.bmp -#elif (LCD_WIDTH==176 || LCD_HEIGHT==176) +#elif SMALLER_DIMENSION <= 132 + sliding_puzzle.132x132x16.bmp +#elif SMALLER_DIMENSION <= 176 sliding_puzzle.176x176x16.bmp -#elif (LCD_WIDTH==240 || LCD_HEIGHT==240) +#elif SMALLER_DIMENSION <= 240 sliding_puzzle.240x240x16.bmp #endif -#elif (LCD_DEPTH>1) -#if (LCD_WIDTH==110 || LCD_HEIGHT==110) +#elif (LCD_DEPTH > 1) +#if SMALLER_DIMENSION <= 110 sliding_puzzle.110x110x2.bmp -#elif (LCD_WIDTH==128 || LCD_HEIGHT==128) +#elif SMALLER_DIMENSION <= 128 sliding_puzzle.128x128x2.bmp #endif -#elif (LCD_WIDTH>=80 && LCD_HEIGHT==64) +#else /* mono targets, one size currently */ sliding_puzzle.80x64x1.bmp #endif diff --git a/apps/plugins/bitmaps/native/sliding_puzzle.110x110x16.bmp b/apps/plugins/bitmaps/native/sliding_puzzle.110x110x16.bmp new file mode 100644 index 0000000000..740b957d46 Binary files /dev/null and b/apps/plugins/bitmaps/native/sliding_puzzle.110x110x16.bmp differ diff --git a/apps/plugins/bitmaps/native/sliding_puzzle.132x132x16.bmp b/apps/plugins/bitmaps/native/sliding_puzzle.132x132x16.bmp new file mode 100644 index 0000000000..65021c94b4 Binary files /dev/null and b/apps/plugins/bitmaps/native/sliding_puzzle.132x132x16.bmp differ diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c index bb497deb8e..ce2ae810d5 100644 --- a/apps/plugins/sliding_puzzle.c +++ b/apps/plugins/sliding_puzzle.c @@ -95,16 +95,17 @@ PLUGIN_HEADER #endif + +#include "sliding_puzzle.h" +#define IMAGE_WIDTH BMPWIDTH_sliding_puzzle +#define IMAGE_HEIGHT BMPHEIGHT_sliding_puzzle +#define IMAGE_SIZE IMAGE_WIDTH + static struct plugin_api* rb; #if LCD_DEPTH==1 -/* for recorder, use rectangular image, 5x4 puzzle */ +/* for Archos, use rectangular image, 5x4 puzzle */ #define SPOTS_X 5 #define SPOTS_Y 4 -#define SPOTS_WIDTH 16 -#define SPOTS_HEIGHT 16 -#define IMAGE_WIDTH 80 -#define IMAGE_HEIGHT 64 -#define IMAGE_SIZE 80 #else /* for other targets, use a square image, 4x4 puzzle Puzzle image dimension is min(lcd_height,lcd_width) @@ -113,15 +114,12 @@ static struct plugin_api* rb; and SPOTS_Y, otherwise lcd_bitmap_part stride won't be correct */ #define SPOTS_X 4 #define SPOTS_Y 4 -#define IMAGE_SIZE ( (LCD_WIDTH