diff options
Diffstat (limited to 'apps/plugins/rockboy')
-rw-r--r-- | apps/plugins/rockboy/lcd-gb.h | 2 | ||||
-rw-r--r-- | apps/plugins/rockboy/lcd.c | 4 | ||||
-rw-r--r-- | apps/plugins/rockboy/sys_rockbox.c | 8 |
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 | ||