summaryrefslogtreecommitdiff
path: root/apps/plugins/pacbox/pacbox_lcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pacbox/pacbox_lcd.c')
-rw-r--r--apps/plugins/pacbox/pacbox_lcd.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/apps/plugins/pacbox/pacbox_lcd.c b/apps/plugins/pacbox/pacbox_lcd.c
index 6bb51a038d..bf4aa9f028 100644
--- a/apps/plugins/pacbox/pacbox_lcd.c
+++ b/apps/plugins/pacbox/pacbox_lcd.c
@@ -124,7 +124,46 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf)
124 dst += XOFS*2; 124 dst += XOFS*2;
125 vbuf+=ScreenWidth; 125 vbuf+=ScreenWidth;
126 } 126 }
127#elif LCD_SCALE==40 && LCD_ROTATE==1
128 /* 0.4 scaling - rotated = 116x90 */
129 /* show 2 out of 5 pixels: 1st and 3rd anf 4th merged together */
130 next_dst=&lcd_framebuffer[XOFS*LCD_WIDTH+YOFS+ScreenHeight*2/5-1];
131 for (y=(ScreenHeight*2/5)-1;y >= 0; y--) {
132 dst = (next_dst--);
133 for (x=0;x<ScreenWidth*2/5;x++) {
134 *dst = palette[*(vbuf)] | palette[*(vbuf+ScreenWidth+1)];
135 /* every odd row number merge 2 source lines as one */
136 if (y & 1) *dst |= palette[*(vbuf+ScreenWidth*2)];
137 vbuf+=2;
138 dst+=LCD_WIDTH;
139
140 x++;
141 /* every odd column merge 2 colums together */
142 *dst = palette[*(vbuf)] | palette[*(vbuf+1)] |palette[*(vbuf+ScreenWidth+2)];
143 if (y & 1) *dst |= palette[*(vbuf+ScreenWidth*2+1)];
144 vbuf+=3;
145 dst+=LCD_WIDTH;
146 }
147 vbuf+=ScreenWidth-1;
148 if (y & 1) vbuf+=ScreenWidth;
149 }
150#elif LCD_SCALE==33 && LCD_ROTATE==0
151 /* 1/3 scaling - display every third pixel - 75x96 */
152 (void)next_dst;
153 dst=&lcd_framebuffer[YOFS*LCD_WIDTH+XOFS];
154
155 for (y=0;y<ScreenHeight/3;y++) {
156 for (x=0;x<ScreenWidth/3;x++) {
157 *(dst++) = palette[*(vbuf)]
158 | palette[*(vbuf+ScreenWidth+1)]
159 | palette[*(vbuf+ScreenWidth*2+2)];
160 vbuf+=3;
161 }
162 dst += XOFS*2;
163 vbuf+=ScreenWidth*2+2;
164 }
127#endif 165#endif
166
128#else /* Greyscale LCDs */ 167#else /* Greyscale LCDs */
129#if LCD_SCALE==50 && LCD_ROTATE==1 168#if LCD_SCALE==50 && LCD_ROTATE==1
130#if LCD_PIXELFORMAT == VERTICAL_PACKING 169#if LCD_PIXELFORMAT == VERTICAL_PACKING