summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/gray_draw.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib/gray_draw.c')
-rw-r--r--apps/plugins/lib/gray_draw.c32
1 files changed, 26 insertions, 6 deletions
diff --git a/apps/plugins/lib/gray_draw.c b/apps/plugins/lib/gray_draw.c
index 4222d80dc1..5d73f09e26 100644
--- a/apps/plugins/lib/gray_draw.c
+++ b/apps/plugins/lib/gray_draw.c
@@ -10,10 +10,10 @@
10* Greyscale framework 10* Greyscale framework
11* Drawing functions 11* Drawing functions
12* 12*
13* This is a generic framework to use grayscale display within Rockbox 13* This is a generic framework to display up to 33 shades of grey
14* plugins. It obviously does not work for the player. 14* on low-depth bitmap LCDs (Archos b&w, Iriver 4-grey) within plugins.
15* 15*
16* Copyright (C) 2004-2005 Jens Arnold 16* Copyright (C) 2004-2006 Jens Arnold
17* 17*
18* All files in this archive are subject to the GNU General Public License. 18* All files in this archive are subject to the GNU General Public License.
19* See the file COPYING in the source tree root for full license agreement. 19* See the file COPYING in the source tree root for full license agreement.
@@ -23,10 +23,9 @@
23* 23*
24****************************************************************************/ 24****************************************************************************/
25 25
26#ifndef SIMULATOR /* not for simulator by now */
27#include "plugin.h" 26#include "plugin.h"
28 27
29#ifdef HAVE_LCD_BITMAP /* and also not for the Player */ 28#ifdef HAVE_LCD_BITMAP
30#include "gray.h" 29#include "gray.h"
31 30
32/*** low-level drawing functions ***/ 31/*** low-level drawing functions ***/
@@ -587,6 +586,26 @@ void gray_putsxy(int x, int y, const unsigned char *str)
587 586
588/*** Unbuffered drawing functions ***/ 587/*** Unbuffered drawing functions ***/
589 588
589#ifdef SIMULATOR
590
591/* Clear the greyscale display (sets all pixels to white) */
592void gray_ub_clear_display(void)
593{
594 _gray_rb->memset(_gray_info.cur_buffer, _gray_info.depth,
595 MULU16(_gray_info.width, _gray_info.height));
596 gray_update();
597}
598
599/* Draw a partial greyscale bitmap, canonical format */
600void gray_ub_gray_bitmap_part(const unsigned char *src, int src_x, int src_y,
601 int stride, int x, int y, int width, int height)
602{
603 gray_gray_bitmap_part(src, src_x, src_y, stride, x, y, width, height);
604 gray_update_rect(x, y, width, height);
605}
606
607#else /* !SIMULATOR */
608
590/* Clear the greyscale display (sets all pixels to white) */ 609/* Clear the greyscale display (sets all pixels to white) */
591void gray_ub_clear_display(void) 610void gray_ub_clear_display(void)
592{ 611{
@@ -1005,6 +1024,8 @@ void gray_ub_gray_bitmap_part(const unsigned char *src, int src_x, int src_y,
1005 while (dst < dst_end); 1024 while (dst < dst_end);
1006} 1025}
1007 1026
1027#endif /* !SIMULATOR */
1028
1008/* Draw a full greyscale bitmap, canonical format */ 1029/* Draw a full greyscale bitmap, canonical format */
1009void gray_ub_gray_bitmap(const unsigned char *src, int x, int y, int width, 1030void gray_ub_gray_bitmap(const unsigned char *src, int x, int y, int width,
1010 int height) 1031 int height)
@@ -1014,5 +1035,4 @@ void gray_ub_gray_bitmap(const unsigned char *src, int x, int y, int width,
1014 1035
1015 1036
1016#endif /* HAVE_LCD_BITMAP */ 1037#endif /* HAVE_LCD_BITMAP */
1017#endif /* !SIMULATOR */
1018 1038