From f894a4c2691fbde1758a05407cb5eadcaec4a6c8 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Wed, 6 Jul 2005 22:58:02 +0000 Subject: 4-shades greyscale graphics core for iriver H1x0. 4-grey rockbox logo and light grey background in splash() boxes. Simplified the splash() box creation as the new graphics core does clipping. Adapted screendump feature and added flexible preprocessing to construct the bmp header. Rockboy now uses 4-grey mode as well. 4-grey support for win32 simulator. Fixed win32 player sim to not use double bitmap conversion via a recorder-like framebuffer, and correctly display double-height text. X11 simulator temporarily adapted. The display won't be distorted, but it still shows b&w only. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7046 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/lcd.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'firmware/export/lcd.h') diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 5f93e7cbc3..f5f16d0f0a 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -121,7 +121,7 @@ extern void lcd_jump_scroll_delay(int ms); #define DRMODE_INVERSEVID 4 /* used as bit modifier for basic modes */ /* Low-level drawing function types */ -typedef void lcd_pixelfunc_type(int x, int y); /* for b&w */ +typedef void lcd_pixelfunc_type(int x, int y); typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned bits); #if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR) @@ -131,7 +131,12 @@ typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned #define INVERT_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] ^= (1<<((y)&7)) /* Memory copy of display bitmap */ +#if LCD_DEPTH == 1 extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; +#elif LCD_DEPTH == 2 +#define MAX_LEVEL 3 +extern unsigned char lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH]; +#endif extern void lcd_set_invert_display(bool yesno); extern void lcd_set_flip(bool yesno); @@ -165,6 +170,20 @@ extern void lcd_invertscroll(int x, int y); extern void lcd_bidir_scroll(int threshold); extern void lcd_scroll_step(int pixels); +#if LCD_DEPTH > 1 +extern void lcd_set_foreground(int brightness); +extern int lcd_get_foreground(void); +extern void lcd_set_background(int brightness); +extern int lcd_get_background(void); +extern void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, + int stride, int x, int y, int width, int height); +extern void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width, + int height); +#else /* LCD_DEPTH == 1 */ +#define lcd_mono_bitmap lcd_bitmap +#define lcd_mono_bitmap_part lcd_bitmap_part +#endif + #endif /* CHARCELLS / BITMAP */ /* internal usage, but in multiple drivers */ -- cgit v1.2.3