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 --- apps/plugins/rockboy/lcd-gb.h | 2 +- apps/plugins/rockboy/lcd.c | 4 ++-- apps/plugins/rockboy/sys_rockbox.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'apps/plugins/rockboy') diff --git a/apps/plugins/rockboy/lcd-gb.h b/apps/plugins/rockboy/lcd-gb.h index 3a612887e5..0b863b6eea 100644 --- a/apps/plugins/rockboy/lcd-gb.h +++ b/apps/plugins/rockboy/lcd-gb.h @@ -16,7 +16,7 @@ struct scan { int bg[64]; int wnd[64]; -#ifdef GRAYSCALE +#if LCD_DEPTH == 2 byte buf[4][256]; #else byte buf[8][256]; diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c index 651c82286f..9a7ead798f 100644 --- a/apps/plugins/rockboy/lcd.c +++ b/apps/plugins/rockboy/lcd.c @@ -786,7 +786,7 @@ void lcd_refreshline(void) recolor(BUF+WX, 0x04, 160-WX); } spr_scan(); -#ifdef GRAYSCALE +#if LCD_DEPTH == 2 if (scanline_ind == 3) #else if (scanline_ind == 7) @@ -800,7 +800,7 @@ void lcd_refreshline(void) #if LCD_HEIGHT == 64 scanline_ind = (scanline_ind+1) % 8; #else -#ifdef GRAYSCALE +#if LCD_DEPTH == 2 scanline_ind = (scanline_ind+1) % 4; #else scanline_ind = (scanline_ind+1) % 8; diff --git a/apps/plugins/rockboy/sys_rockbox.c b/apps/plugins/rockboy/sys_rockbox.c index 45608b9f36..e8a4923eee 100644 --- a/apps/plugins/rockboy/sys_rockbox.c +++ b/apps/plugins/rockboy/sys_rockbox.c @@ -245,21 +245,21 @@ void vid_update(int scanline) scanline-=16; else if (fb.mode==2) scanline-=8; -#ifdef GRAYSCALE +#if LCD_DEPTH == 2 scanline_remapped = scanline / 4; #else scanline_remapped = scanline / 8; #endif frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH; while (cnt < 160) { -#ifdef GRAYSCALE +#if LCD_DEPTH == 2 *(frameb++) = (scan.buf[0][cnt]&0x3) | ((scan.buf[1][cnt]&0x3)<<2) | ((scan.buf[2][cnt]&0x3)<<4) | ((scan.buf[3][cnt]&0x3)<<6); cnt++; } - rb->lcd_update_rect(0, scanline & ~3, LCD_WIDTH, 4); //8); + rb->lcd_update_rect(0, scanline & ~3, LCD_WIDTH, 4); #else register unsigned scrbyte = 0; if (scan.buf[0][cnt] & 0x02) scrbyte |= 0x01; @@ -274,7 +274,7 @@ void vid_update(int scanline) cnt++; } rb->lcd_update_rect(0, scanline & ~7, LCD_WIDTH, 8); -#endif /* GRAYSCALE */ +#endif /* LCD_DEPTH */ #endif /* LCD_HEIGHT */ } -- cgit v1.2.3