summaryrefslogtreecommitdiff
path: root/apps/plugins/grayscale.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-08-07 01:46:42 +0000
committerJens Arnold <amiconn@rockbox.org>2006-08-07 01:46:42 +0000
commitc214e7bb0c3e97d22ecedb1c62f193e19a1d4818 (patch)
tree6d8b18694076dcf1d0fa2f02f558f78e572327b4 /apps/plugins/grayscale.c
parent5375e26e51e9c6eaded4f733bf60cc8bbf662a8a (diff)
downloadrockbox-c214e7bb0c3e97d22ecedb1c62f193e19a1d4818.tar.gz
rockbox-c214e7bb0c3e97d22ecedb1c62f193e19a1d4818.zip
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
Diffstat (limited to 'apps/plugins/grayscale.c')
-rw-r--r--apps/plugins/grayscale.c14
1 files changed, 7 insertions, 7 deletions
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 @@
21 21
22#include "plugin.h" 22#include "plugin.h"
23 23
24#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && (CONFIG_LCD != LCD_IPOD2BPP) 24#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4)
25#include "gray.h" 25#include "gray.h"
26 26
27PLUGIN_HEADER 27PLUGIN_HEADER
@@ -54,12 +54,12 @@ PLUGIN_HEADER
54#define GRAYSCALE_RC_OFF BUTTON_RC_STOP 54#define GRAYSCALE_RC_OFF BUTTON_RC_STOP
55 55
56#elif (CONFIG_KEYPAD == IPOD_3G_PAD) || (CONFIG_KEYPAD == IPOD_4G_PAD) 56#elif (CONFIG_KEYPAD == IPOD_3G_PAD) || (CONFIG_KEYPAD == IPOD_4G_PAD)
57#define GRAYSCALE_SHIFT (BUTTON_SELECT | BUTTON_REL) 57#define GRAYSCALE_SHIFT BUTTON_SELECT
58#define GRAYSCALE_UP BUTTON_MENU 58#define GRAYSCALE_UP BUTTON_SCROLL_BACK
59#define GRAYSCALE_DOWN BUTTON_PLAY 59#define GRAYSCALE_DOWN BUTTON_SCROLL_FWD
60#define GRAYSCALE_LEFT BUTTON_LEFT 60#define GRAYSCALE_LEFT BUTTON_LEFT
61#define GRAYSCALE_RIGHT BUTTON_RIGHT 61#define GRAYSCALE_RIGHT BUTTON_RIGHT
62#define GRAYSCALE_OFF (BUTTON_SELECT | BUTTON_MENU) 62#define GRAYSCALE_OFF BUTTON_MENU
63#endif 63#endif
64 64
65#define GFX_HEIGHT (LCD_HEIGHT-8) 65#define GFX_HEIGHT (LCD_HEIGHT-8)
@@ -182,11 +182,11 @@ int main(void)
182 32 bitplanes for 33 shades of grey. 182 32 bitplanes for 33 shades of grey.
183 H1x0: 160 pixels wide, 30 rows (120 pixels) high, (try to) reserve 183 H1x0: 160 pixels wide, 30 rows (120 pixels) high, (try to) reserve
184 32 bitplanes for 33 shades of grey. */ 184 32 bitplanes for 33 shades of grey. */
185 shades = gray_init(rb, gbuf, gbuf_size, true, LCD_WIDTH, GFX_HEIGHT/8, 185 shades = gray_init(rb, gbuf, gbuf_size, true, LCD_WIDTH, GFX_HEIGHT,
186 32, 0, NULL) + 1; 186 32, 0, NULL) + 1;
187 187
188 /* place greyscale overlay 1 row down */ 188 /* place greyscale overlay 1 row down */
189 gray_set_position(0, 1); 189 gray_set_position(0, 8);
190 190
191 rb->snprintf(pbuf, sizeof(pbuf), "Shades: %d", shades); 191 rb->snprintf(pbuf, sizeof(pbuf), "Shades: %d", shades);
192 rb->lcd_puts(0, 0, pbuf); 192 rb->lcd_puts(0, 0, pbuf);