From c214e7bb0c3e97d22ecedb1c62f193e19a1d4818 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Mon, 7 Aug 2006 01:46:42 +0000 Subject: Grayscale library ported to the grayscale iPods, first version. Added C reference versions of gray_update_rect() for both horizontal and vertical pixel packing. gray_update_rect() and gray_ub_gray_bitmap_part() not yet assembler optimised. Grayscale screendump doesn't work yet. * Fixed button assignments for iPod in grayscale.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10468 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/grayscale.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'apps/plugins/grayscale.c') diff --git a/apps/plugins/grayscale.c b/apps/plugins/grayscale.c index ad3ee4f144..61231af39b 100644 --- a/apps/plugins/grayscale.c +++ b/apps/plugins/grayscale.c @@ -21,7 +21,7 @@ #include "plugin.h" -#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && (CONFIG_LCD != LCD_IPOD2BPP) +#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) #include "gray.h" PLUGIN_HEADER @@ -54,12 +54,12 @@ PLUGIN_HEADER #define GRAYSCALE_RC_OFF BUTTON_RC_STOP #elif (CONFIG_KEYPAD == IPOD_3G_PAD) || (CONFIG_KEYPAD == IPOD_4G_PAD) -#define GRAYSCALE_SHIFT (BUTTON_SELECT | BUTTON_REL) -#define GRAYSCALE_UP BUTTON_MENU -#define GRAYSCALE_DOWN BUTTON_PLAY +#define GRAYSCALE_SHIFT BUTTON_SELECT +#define GRAYSCALE_UP BUTTON_SCROLL_BACK +#define GRAYSCALE_DOWN BUTTON_SCROLL_FWD #define GRAYSCALE_LEFT BUTTON_LEFT #define GRAYSCALE_RIGHT BUTTON_RIGHT -#define GRAYSCALE_OFF (BUTTON_SELECT | BUTTON_MENU) +#define GRAYSCALE_OFF BUTTON_MENU #endif #define GFX_HEIGHT (LCD_HEIGHT-8) @@ -182,11 +182,11 @@ int main(void) 32 bitplanes for 33 shades of grey. H1x0: 160 pixels wide, 30 rows (120 pixels) high, (try to) reserve 32 bitplanes for 33 shades of grey. */ - shades = gray_init(rb, gbuf, gbuf_size, true, LCD_WIDTH, GFX_HEIGHT/8, + shades = gray_init(rb, gbuf, gbuf_size, true, LCD_WIDTH, GFX_HEIGHT, 32, 0, NULL) + 1; /* place greyscale overlay 1 row down */ - gray_set_position(0, 1); + gray_set_position(0, 8); rb->snprintf(pbuf, sizeof(pbuf), "Shades: %d", shades); rb->lcd_puts(0, 0, pbuf); -- cgit v1.2.3