summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/xlcd_draw.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib/xlcd_draw.c')
-rw-r--r--apps/plugins/lib/xlcd_draw.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/plugins/lib/xlcd_draw.c b/apps/plugins/lib/xlcd_draw.c
index 3be15718f6..83ddf68e5c 100644
--- a/apps/plugins/lib/xlcd_draw.c
+++ b/apps/plugins/lib/xlcd_draw.c
@@ -170,7 +170,7 @@ void xlcd_filltriangle_screen(struct screen* display,
170 xlcd_filltriangle_vertical(display, x1, y1, x2, y2, x3, y3); 170 xlcd_filltriangle_vertical(display, x1, y1, x2, y2, x3, y3);
171} 171}
172 172
173#if LCD_DEPTH >= 8 173#if LCD_DEPTH >= 8 && LCD_DEPTH <= 16
174 174
175#ifdef HAVE_LCD_COLOR 175#ifdef HAVE_LCD_COLOR
176static const fb_data graylut[256] = { 176static const fb_data graylut[256] = {
@@ -244,6 +244,8 @@ static const fb_data graylut[256] = {
244}; 244};
245#endif /* HAVE_LCD_COLOR */ 245#endif /* HAVE_LCD_COLOR */
246 246
247/* unused functions, enable when needed */
248#if 0
247/* Draw a partial greyscale bitmap, canonical 8 bit format */ 249/* Draw a partial greyscale bitmap, canonical 8 bit format */
248void xlcd_gray_bitmap_part(const unsigned char *src, int src_x, int src_y, 250void xlcd_gray_bitmap_part(const unsigned char *src, int src_x, int src_y,
249 int stride, int x, int y, int width, int height) 251 int stride, int x, int y, int width, int height)
@@ -286,7 +288,13 @@ void xlcd_gray_bitmap_part(const unsigned char *src, int src_x, int src_y,
286 288
287#ifdef HAVE_LCD_COLOR 289#ifdef HAVE_LCD_COLOR
288 do 290 do
291#if LCD_DEPTH == 16
289 *dst_row++ = graylut[*src_row++]; 292 *dst_row++ = graylut[*src_row++];
293#else
294 /* untested change because this function is completely unused */
295 *dst_row->r = *dst_row->g = *dst_row->b = *src_row++;
296 dst_row++;
297#endif
290 while (src_row < row_end); 298 while (src_row < row_end);
291#endif 299#endif
292 300
@@ -302,6 +310,7 @@ void xlcd_gray_bitmap(const unsigned char *src, int x, int y, int width,
302{ 310{
303 xlcd_gray_bitmap_part(src, 0, 0, width, x, y, width, height); 311 xlcd_gray_bitmap_part(src, 0, 0, width, x, y, width, height);
304} 312}
313#endif
305 314
306#ifdef HAVE_LCD_COLOR 315#ifdef HAVE_LCD_COLOR
307/* Draw a partial colour bitmap, canonical 24 bit RGB format */ 316/* Draw a partial colour bitmap, canonical 24 bit RGB format */
@@ -379,4 +388,3 @@ void xlcd_color_bitmap(const unsigned char *src, int x, int y, int width,
379#endif /* LCD_DEPTH >= 8 */ 388#endif /* LCD_DEPTH >= 8 */
380 389
381#endif /* HAVE_LCD_BITMAP */ 390#endif /* HAVE_LCD_BITMAP */
382