From cdc933f40fd5b551fb7e0130262bb44b0ec2e6aa Mon Sep 17 00:00:00 2001 From: Marianne Arnold Date: Thu, 31 Jan 2008 18:08:22 +0000 Subject: Sliding_puzzle: rearrange the default bitmap definitions and add two more sizes of the bitmap (fixes issues on Nano and small H10). The 'Moves' box is still not fully visible on the latter, I plan to work on it but thought the fix was worth an own commit already. Also let the plugin retrieve the image width and height from the bitmap. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16188 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/sliding_puzzle.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'apps/plugins/sliding_puzzle.c') 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