From 5b2cba17aa95ececfdb6a498540de4dfa215e920 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Wed, 16 Nov 2005 21:09:23 +0000 Subject: Changed the LCD_COLOR pixel value format to packed RGB (unsigned int). Now all LCDs with depth > 1 use the same datatype. Added macros for easy pixel value definition. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7912 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/cube.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'apps/plugins/cube.c') diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c index 2360269aba..dc5b5706f4 100644 --- a/apps/plugins/cube.c +++ b/apps/plugins/cube.c @@ -152,18 +152,16 @@ static const struct face faces[6] = }; #if LCD_DEPTH > 1 -#ifdef HAVE_LCD_COLOR -static const struct rgb face_colors[6] = +static const unsigned face_colors[6] = { - {LCD_MAX_RED, 0, 0}, {LCD_MAX_RED, 0, 0}, {0, LCD_MAX_GREEN, 0}, - {0, LCD_MAX_GREEN, 0}, {0, 0, LCD_MAX_BLUE}, {0, 0, LCD_MAX_BLUE} -}; +#ifdef HAVE_LCD_COLOR + LCD_RGBPACK(255, 0, 0), LCD_RGBPACK(255, 0, 0), LCD_RGBPACK(0, 255, 0), + LCD_RGBPACK(0, 255, 0), LCD_RGBPACK(0, 0, 255), LCD_RGBPACK(0, 0, 255) #else -static const int face_colors[6] = -{ - 2*LCD_MAX_LEVEL/3, 2*LCD_MAX_LEVEL/3, LCD_MAX_LEVEL/3, LCD_MAX_LEVEL/3, 0, 0 -}; + LCD_LIGHTGRAY, LCD_LIGHTGRAY, LCD_DARKGRAY, + LCD_DARKGRAY, LCD_BLACK, LCD_BLACK #endif +}; #endif enum { -- cgit v1.2.3