mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-14 07:32:35 -05:00
pacbox for small screens, up to 75x96
Change-Id: I6e9adf2f6923f4d0078a54e9857fc8eacef259a6
This commit is contained in:
parent
96335a7eb2
commit
fb3f7651fd
6 changed files with 65 additions and 2 deletions
|
|
@ -124,7 +124,46 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf)
|
|||
dst += XOFS*2;
|
||||
vbuf+=ScreenWidth;
|
||||
}
|
||||
#elif LCD_SCALE==40 && LCD_ROTATE==1
|
||||
/* 0.4 scaling - rotated = 116x90 */
|
||||
/* show 2 out of 5 pixels: 1st and 3rd anf 4th merged together */
|
||||
next_dst=&lcd_framebuffer[XOFS*LCD_WIDTH+YOFS+ScreenHeight*2/5-1];
|
||||
for (y=(ScreenHeight*2/5)-1;y >= 0; y--) {
|
||||
dst = (next_dst--);
|
||||
for (x=0;x<ScreenWidth*2/5;x++) {
|
||||
*dst = palette[*(vbuf)] | palette[*(vbuf+ScreenWidth+1)];
|
||||
/* every odd row number merge 2 source lines as one */
|
||||
if (y & 1) *dst |= palette[*(vbuf+ScreenWidth*2)];
|
||||
vbuf+=2;
|
||||
dst+=LCD_WIDTH;
|
||||
|
||||
x++;
|
||||
/* every odd column merge 2 colums together */
|
||||
*dst = palette[*(vbuf)] | palette[*(vbuf+1)] |palette[*(vbuf+ScreenWidth+2)];
|
||||
if (y & 1) *dst |= palette[*(vbuf+ScreenWidth*2+1)];
|
||||
vbuf+=3;
|
||||
dst+=LCD_WIDTH;
|
||||
}
|
||||
vbuf+=ScreenWidth-1;
|
||||
if (y & 1) vbuf+=ScreenWidth;
|
||||
}
|
||||
#elif LCD_SCALE==33 && LCD_ROTATE==0
|
||||
/* 1/3 scaling - display every third pixel - 75x96 */
|
||||
(void)next_dst;
|
||||
dst=&lcd_framebuffer[YOFS*LCD_WIDTH+XOFS];
|
||||
|
||||
for (y=0;y<ScreenHeight/3;y++) {
|
||||
for (x=0;x<ScreenWidth/3;x++) {
|
||||
*(dst++) = palette[*(vbuf)]
|
||||
| palette[*(vbuf+ScreenWidth+1)]
|
||||
| palette[*(vbuf+ScreenWidth*2+2)];
|
||||
vbuf+=3;
|
||||
}
|
||||
dst += XOFS*2;
|
||||
vbuf+=ScreenWidth*2+2;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else /* Greyscale LCDs */
|
||||
#if LCD_SCALE==50 && LCD_ROTATE==1
|
||||
#if LCD_PIXELFORMAT == VERTICAL_PACKING
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue