summaryrefslogtreecommitdiff
path: root/apps/plugins/rockboy
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-07-06 22:58:02 +0000
committerJens Arnold <amiconn@rockbox.org>2005-07-06 22:58:02 +0000
commitf894a4c2691fbde1758a05407cb5eadcaec4a6c8 (patch)
tree46cb7ce63c794020175ab251cf0299663be8bf3c /apps/plugins/rockboy
parent1076eb1d2720b88757616f642be0c39c6a3b76df (diff)
downloadrockbox-f894a4c2691fbde1758a05407cb5eadcaec4a6c8.tar.gz
rockbox-f894a4c2691fbde1758a05407cb5eadcaec4a6c8.zip
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
Diffstat (limited to 'apps/plugins/rockboy')
-rw-r--r--apps/plugins/rockboy/lcd-gb.h2
-rw-r--r--apps/plugins/rockboy/lcd.c4
-rw-r--r--apps/plugins/rockboy/sys_rockbox.c8
3 files changed, 7 insertions, 7 deletions
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
16{ 16{
17 int bg[64]; 17 int bg[64];
18 int wnd[64]; 18 int wnd[64];
19#ifdef GRAYSCALE 19#if LCD_DEPTH == 2
20 byte buf[4][256]; 20 byte buf[4][256];
21#else 21#else
22 byte buf[8][256]; 22 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)
786 recolor(BUF+WX, 0x04, 160-WX); 786 recolor(BUF+WX, 0x04, 160-WX);
787 } 787 }
788 spr_scan(); 788 spr_scan();
789#ifdef GRAYSCALE 789#if LCD_DEPTH == 2
790 if (scanline_ind == 3) 790 if (scanline_ind == 3)
791#else 791#else
792 if (scanline_ind == 7) 792 if (scanline_ind == 7)
@@ -800,7 +800,7 @@ void lcd_refreshline(void)
800#if LCD_HEIGHT == 64 800#if LCD_HEIGHT == 64
801 scanline_ind = (scanline_ind+1) % 8; 801 scanline_ind = (scanline_ind+1) % 8;
802#else 802#else
803#ifdef GRAYSCALE 803#if LCD_DEPTH == 2
804 scanline_ind = (scanline_ind+1) % 4; 804 scanline_ind = (scanline_ind+1) % 4;
805#else 805#else
806 scanline_ind = (scanline_ind+1) % 8; 806 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)
245 scanline-=16; 245 scanline-=16;
246 else if (fb.mode==2) 246 else if (fb.mode==2)
247 scanline-=8; 247 scanline-=8;
248#ifdef GRAYSCALE 248#if LCD_DEPTH == 2
249 scanline_remapped = scanline / 4; 249 scanline_remapped = scanline / 4;
250#else 250#else
251 scanline_remapped = scanline / 8; 251 scanline_remapped = scanline / 8;
252#endif 252#endif
253 frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH; 253 frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH;
254 while (cnt < 160) { 254 while (cnt < 160) {
255#ifdef GRAYSCALE 255#if LCD_DEPTH == 2
256 *(frameb++) = (scan.buf[0][cnt]&0x3) | 256 *(frameb++) = (scan.buf[0][cnt]&0x3) |
257 ((scan.buf[1][cnt]&0x3)<<2) | 257 ((scan.buf[1][cnt]&0x3)<<2) |
258 ((scan.buf[2][cnt]&0x3)<<4) | 258 ((scan.buf[2][cnt]&0x3)<<4) |
259 ((scan.buf[3][cnt]&0x3)<<6); 259 ((scan.buf[3][cnt]&0x3)<<6);
260 cnt++; 260 cnt++;
261 } 261 }
262 rb->lcd_update_rect(0, scanline & ~3, LCD_WIDTH, 4); //8); 262 rb->lcd_update_rect(0, scanline & ~3, LCD_WIDTH, 4);
263#else 263#else
264 register unsigned scrbyte = 0; 264 register unsigned scrbyte = 0;
265 if (scan.buf[0][cnt] & 0x02) scrbyte |= 0x01; 265 if (scan.buf[0][cnt] & 0x02) scrbyte |= 0x01;
@@ -274,7 +274,7 @@ void vid_update(int scanline)
274 cnt++; 274 cnt++;
275 } 275 }
276 rb->lcd_update_rect(0, scanline & ~7, LCD_WIDTH, 8); 276 rb->lcd_update_rect(0, scanline & ~7, LCD_WIDTH, 8);
277#endif /* GRAYSCALE */ 277#endif /* LCD_DEPTH */
278#endif /* LCD_HEIGHT */ 278#endif /* LCD_HEIGHT */
279} 279}
280 280