summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-06-28 23:15:47 +0000
committerJens Arnold <amiconn@rockbox.org>2005-06-28 23:15:47 +0000
commit7e11acbce9b9a63c28ded055d02301175391e027 (patch)
treeea8d30e7281e8d720d6dc8ea51804e1749282697 /apps
parentc2bf5dfe12978b44d5d890a37f256c8d9f510660 (diff)
downloadrockbox-7e11acbce9b9a63c28ded055d02301175391e027.zip
rockbox-7e11acbce9b9a63c28ded055d02301175391e027.tar.gz
rockbox-7e11acbce9b9a63c28ded055d02301175391e027.tar.bz2
rockbox-7e11acbce9b9a63c28ded055d02301175391e027.tar.xz
Second part of graphics api rework. Bitmap drawing and text output converted; some code cleanup and more optimisations.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6906 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/main_menu.c4
-rw-r--r--apps/menu.c3
-rw-r--r--apps/playlist_viewer.c3
-rw-r--r--apps/plugin.c3
-rw-r--r--apps/plugin.h18
-rw-r--r--apps/plugins/bounce.c15
-rw-r--r--apps/plugins/chessclock.c2
-rw-r--r--apps/plugins/clock.c200
-rw-r--r--apps/plugins/flipit.c10
-rw-r--r--apps/plugins/logo.c2
-rw-r--r--apps/plugins/minesweeper.c4
-rw-r--r--apps/plugins/sliding_puzzle.c2
-rw-r--r--apps/plugins/snake2.c12
-rw-r--r--apps/plugins/snow.c2
-rw-r--r--apps/plugins/solitaire.c12
-rw-r--r--apps/plugins/splitedit.c8
-rw-r--r--apps/plugins/star.c24
-rw-r--r--apps/plugins/vu_meter.c61
-rw-r--r--apps/recorder/icons.c12
-rw-r--r--apps/recorder/peakmeter.c8
-rw-r--r--apps/recorder/recording.c10
-rw-r--r--apps/screens.c26
-rw-r--r--apps/status.c4
-rw-r--r--apps/tree.c3
-rw-r--r--apps/wps-display.c4
25 files changed, 243 insertions, 209 deletions
diff --git a/apps/main_menu.c b/apps/main_menu.c
index 33e9269..9654b80 100644
--- a/apps/main_menu.c
+++ b/apps/main_menu.c
@@ -72,10 +72,10 @@ int show_logo( void )
lcd_clear_display();
#if LCD_WIDTH == 112 || LCD_WIDTH == 128
- lcd_bitmap(rockbox112x37, 0, 10, 112, 37, false);
+ lcd_bitmap(rockbox112x37, 0, 10, 112, 37);
#endif
#if LCD_WIDTH >= 160
- lcd_bitmap(rockbox160x53, 0, 10, 160, 53, false);
+ lcd_bitmap(rockbox160x53, 0, 10, 160, 53);
#endif
#ifdef HAVE_REMOTE_LCD
diff --git a/apps/menu.c b/apps/menu.c
index d431097..459abe6 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -116,8 +116,7 @@ void put_cursorxy(int x, int y, bool on)
/* place the cursor */
if(on) {
#ifdef HAVE_LCD_BITMAP
- lcd_bitmap ( bitmap_icons_6x8[Cursor],
- xpos, ypos, 4, 8, true);
+ lcd_bitmap(bitmap_icons_6x8[Cursor], xpos, ypos, 4, 8);
#else
lcd_putc(x, y, CURSOR_CHAR);
#endif
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c
index 1d82c2e..21ae4d7 100644
--- a/apps/playlist_viewer.c
+++ b/apps/playlist_viewer.c
@@ -463,8 +463,7 @@ static void display_playlist(void)
offset = (viewer.line_height - 8) / 2;
lcd_bitmap(bitmap_icons_6x8[File],
CURSOR_X * 6 + CURSOR_WIDTH,
- MARGIN_Y+(i*viewer.line_height) + offset,
- 6, 8, true);
+ MARGIN_Y+(i*viewer.line_height) + offset, 6, 8);
#else
lcd_putc(LINE_X-1, i, File);
#endif
diff --git a/apps/plugin.c b/apps/plugin.c
index fb9da5b..2a8d2c0 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -110,8 +110,11 @@ static const struct plugin_api rockbox_api = {
lcd_getstringsize,
lcd_drawpixel,
lcd_drawline,
+ lcd_hline,
+ lcd_vline,
lcd_drawrect,
lcd_fillrect,
+ lcd_bitmap_part,
lcd_bitmap,
lcd_putsxy,
lcd_puts_style,
diff --git a/apps/plugin.h b/apps/plugin.h
index d2253b4..78bffe0 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -87,12 +87,12 @@
#endif
/* increase this every time the api struct changes */
-#define PLUGIN_API_VERSION 41
+#define PLUGIN_API_VERSION 42
/* update this to latest version if a change to the api struct breaks
backwards compatibility (and please take the opportunity to sort in any
new function which are "waiting" at the end of the function table) */
-#define PLUGIN_MIN_API_VERSION 41
+#define PLUGIN_MIN_API_VERSION 42
/* plugin return codes */
enum plugin_status {
@@ -160,17 +160,21 @@ struct plugin_api {
int (*lcd_getstringsize)(const unsigned char *str, int *w, int *h);
void (*lcd_drawpixel)(int x, int y);
void (*lcd_drawline)(int x1, int y1, int x2, int y2);
- void (*lcd_drawrect)(int x, int y, int nx, int ny);
- void (*lcd_fillrect)(int x, int y, int nx, int ny);
+ void (*lcd_hline)(int x1, int x2, int y);
+ void (*lcd_vline)(int x, int y1, int y2);
+ void (*lcd_drawrect)(int x, int y, int width, int height);
+ void (*lcd_fillrect)(int x, int y, int width, int height);
+ void (*lcd_bitmap_part)(const unsigned char *src, int src_x, int src_y,
+ int stride, int x, int y, int width, int height);
void (*lcd_bitmap)(const unsigned char *src, int x, int y,
- int nx, int ny, bool clear);
+ int width, int height);
void (*lcd_putsxy)(int x, int y, const unsigned char *string);
void (*lcd_puts_style)(int x, int y, const unsigned char *str, int style);
void (*lcd_puts_scroll_style)(int x, int y, const unsigned char* string,
int style);
unsigned char* lcd_framebuffer;
- void (*lcd_blit) (const unsigned char* p_data, int x, int y, int width,
- int height, int stride);
+ void (*lcd_blit) (const unsigned char* data, int x, int by, int width,
+ int bheight, int stride);
void (*lcd_update)(void);
void (*lcd_update_rect)(int x, int y, int width, int height);
void (*scrollbar)(int x, int y, int width, int height, int items,
diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c
index 232d9a9..fa0e22f 100644
--- a/apps/plugins/bounce.c
+++ b/apps/plugins/bounce.c
@@ -269,9 +269,9 @@ static void addclock(void)
/* draw a circle */
for(i=0; i < 60; i+=3) {
rb->lcd_drawline( xminute[i],
- yminute[i],
- xminute[(i+1)%60],
- yminute[(i+1)%60]);
+ yminute[i],
+ xminute[(i+1)%60],
+ yminute[(i+1)%60]);
}
}
#endif /* HAVE_RTC */
@@ -303,16 +303,17 @@ static int scrollit(void)
return -1;
rb->lcd_clear_display();
+ rb->lcd_set_drawmode(DRMODE_FG);
for(i=0, yy=y, xx=x; i< LETTERS_ON_SCREEN; i++) {
letter = rock[(i+textpos) % rocklen ];
rb->lcd_bitmap((char *)char_gen_12x16[letter-0x20],
- xx, table[yy&(TABLE_SIZE-1)],
- 11, 16, false);
+ xx, table[yy&(TABLE_SIZE-1)], 11, 16);
yy += YADD;
xx+= LCD_WIDTH/LETTERS_ON_SCREEN;
}
+ rb->lcd_set_drawmode(DRMODE_SOLID);
#ifdef HAVE_RTC
addclock();
#endif
@@ -393,13 +394,15 @@ static int loopit(void)
rb->lcd_putsxy(0, LCD_HEIGHT - 8, buffer);
timeout--;
}
+ rb->lcd_set_drawmode(DRMODE_FG);
for(i=0, yy=y, xx=x;
i<rocklen;
i++, yy+=values[NUM_YDIST].num, xx+=values[NUM_XDIST].num)
rb->lcd_bitmap((char *)char_gen_12x16[rock[i]-0x20],
xtable[xx&(TABLE_SIZE-1)], table[yy&(TABLE_SIZE-1)],
- 11, 16, false);
+ 11, 16);
rb->lcd_update();
+ rb->lcd_set_drawmode(DRMODE_SOLID);
ysanke+= values[NUM_YSANKE].num;
xsanke+= values[NUM_XSANKE].num;
diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c
index 8485d40..b66ed2a 100644
--- a/apps/plugins/chessclock.c
+++ b/apps/plugins/chessclock.c
@@ -214,7 +214,7 @@ static void show_pause_mode(bool enabled)
static const char pause_icon[] = {0x00,0x7f,0x7f,0x00,0x7f,0x7f,0x00};
if (enabled)
- rb->lcd_bitmap(pause_icon, 52, 0, 7, 8, true);
+ rb->lcd_bitmap(pause_icon, 52, 0, 7, 8);
else
{
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
diff --git a/apps/plugins/clock.c b/apps/plugins/clock.c
index d58f746..bddda15 100644
--- a/apps/plugins/clock.c
+++ b/apps/plugins/clock.c
@@ -788,9 +788,9 @@ bool colon, bool lcd)
if(settings.digital_12h)
{
if(hour > 12)
- rb->lcd_bitmap(pm, 97, 55, 15, 8, true);
+ rb->lcd_bitmap(pm, 97, 55, 15, 8);
else
- rb->lcd_bitmap(am, 1, 55, 15, 8, true);
+ rb->lcd_bitmap(am, 1, 55, 15, 8);
}
}
else
@@ -798,9 +798,9 @@ bool colon, bool lcd)
if(settings.lcd_12h)
{
if(hour > 12)
- rb->lcd_bitmap(pm, 97, 55, 15, 8, true);
+ rb->lcd_bitmap(pm, 97, 55, 15, 8);
else
- rb->lcd_bitmap(am, 1, 55, 15, 8, true);
+ rb->lcd_bitmap(am, 1, 55, 15, 8);
}
}
@@ -881,138 +881,138 @@ void binary(int hour, int minute, int second)
*****/
if(temphour >= 32)
{
- rb->lcd_bitmap(bitmap_1, 0, 1, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 0, 1, 15, 20);
temphour -= 32;
}
else
- rb->lcd_bitmap(bitmap_0, 0, 1, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 0, 1, 15, 20);
if(temphour >= 16)
{
- rb->lcd_bitmap(bitmap_1, 19, 1, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 19, 1, 15, 20);
temphour -= 16;
}
else
- rb->lcd_bitmap(bitmap_0, 19, 1, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 19, 1, 15, 20);
if(temphour >= 8)
{
- rb->lcd_bitmap(bitmap_1, 38, 1, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 38, 1, 15, 20);
temphour -= 8;
}
else
- rb->lcd_bitmap(bitmap_0, 38, 1, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 38, 1, 15, 20);
if(temphour >= 4)
{
- rb->lcd_bitmap(bitmap_1, 57, 1, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 57, 1, 15, 20);
temphour -= 4;
}
else
- rb->lcd_bitmap(bitmap_0, 57, 1, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 57, 1, 15, 20);
if(temphour >= 2)
{
- rb->lcd_bitmap(bitmap_1, 76, 1, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 76, 1, 15, 20);
temphour -= 2;
}
else
- rb->lcd_bitmap(bitmap_0, 76, 1, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 76, 1, 15, 20);
if(temphour >= 1)
{
- rb->lcd_bitmap(bitmap_1, 95, 1, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 95, 1, 15, 20);
temphour -= 1;
}
else
- rb->lcd_bitmap(bitmap_0, 95, 1, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 95, 1, 15, 20);
/*********
* MINUTES
********/
if(tempmin >= 32)
{
- rb->lcd_bitmap(bitmap_1, 0, 21, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 0, 21, 15, 20);
tempmin -= 32;
}
else
- rb->lcd_bitmap(bitmap_0, 0, 21, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 0, 21, 15, 20);
if(tempmin >= 16)
{
- rb->lcd_bitmap(bitmap_1, 19, 21, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 19, 21, 15, 20);
tempmin -= 16;
}
else
- rb->lcd_bitmap(bitmap_0, 19, 21, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 19, 21, 15, 20);
if(tempmin >= 8)
{
- rb->lcd_bitmap(bitmap_1, 38, 21, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 38, 21, 15, 20);
tempmin -= 8;
}
else
- rb->lcd_bitmap(bitmap_0, 38, 21, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 38, 21, 15, 20);
if(tempmin >= 4)
{
- rb->lcd_bitmap(bitmap_1, 57, 21, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 57, 21, 15, 20);
tempmin -= 4;
}
else
- rb->lcd_bitmap(bitmap_0, 57, 21, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 57, 21, 15, 20);
if(tempmin >= 2)
{
- rb->lcd_bitmap(bitmap_1, 76, 21, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 76, 21, 15, 20);
tempmin -= 2;
}
else
- rb->lcd_bitmap(bitmap_0, 76, 21, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 76, 21, 15, 20);
if(tempmin >= 1)
{
- rb->lcd_bitmap(bitmap_1, 95, 21, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 95, 21, 15, 20);
tempmin -= 1;
}
else
- rb->lcd_bitmap(bitmap_0, 95, 21, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 95, 21, 15, 20);
/*********
* SECONDS
********/
if(tempsec >= 32)
{
- rb->lcd_bitmap(bitmap_1, 0, 42, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 0, 42, 15, 20);
tempsec -= 32;
}
else
- rb->lcd_bitmap(bitmap_0, 0, 42, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 0, 42, 15, 20);
if(tempsec >= 16)
{
- rb->lcd_bitmap(bitmap_1, 19, 42, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 19, 42, 15, 20);
tempsec -= 16;
}
else
- rb->lcd_bitmap(bitmap_0, 19, 42, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 19, 42, 15, 20);
if(tempsec >= 8)
{
- rb->lcd_bitmap(bitmap_1, 38, 42, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 38, 42, 15, 20);
tempsec -= 8;
}
else
- rb->lcd_bitmap(bitmap_0, 38, 42, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 38, 42, 15, 20);
if(tempsec >= 4)
{
- rb->lcd_bitmap(bitmap_1, 57, 42, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 57, 42, 15, 20);
tempsec -= 4;
}
else
- rb->lcd_bitmap(bitmap_0, 57, 42, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 57, 42, 15, 20);
if(tempsec >= 2)
{
- rb->lcd_bitmap(bitmap_1, 76, 42, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 76, 42, 15, 20);
tempsec -= 2;
}
else
- rb->lcd_bitmap(bitmap_0, 76, 42, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 76, 42, 15, 20);
if(tempsec >= 1)
{
- rb->lcd_bitmap(bitmap_1, 95, 42, 15, 20, true);
+ rb->lcd_bitmap(bitmap_1, 95, 42, 15, 20);
tempsec -= 1;
}
else
- rb->lcd_bitmap(bitmap_0, 95, 42, 15, 20, true);
+ rb->lcd_bitmap(bitmap_0, 95, 42, 15, 20);
rb->lcd_update();
}
@@ -1039,7 +1039,7 @@ void show_logo(bool animate, bool show_clock_text)
rb->lcd_drawline(0, y_position/2-1, 111, y_position/2-1);
rb->lcd_drawline(0, y_position/2+38, 111, y_position/2+38);
rb->lcd_set_drawmode(DRMODE_SOLID);
- rb->lcd_bitmap(clogo, 0, y_position/2, 112, 37, true);
+ rb->lcd_bitmap(clogo, 0, y_position/2, 112, 37);
if(show_clock_text)
rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 48, buf);
rb->lcd_update();
@@ -1051,7 +1051,7 @@ void show_logo(bool animate, bool show_clock_text)
rb->lcd_drawline(0, y_position/2-1, 111, y_position/2-1);
rb->lcd_drawline(0, y_position/2+38, 111, y_position/2+38);
rb->lcd_set_drawmode(DRMODE_SOLID);
- rb->lcd_bitmap(clogo, 0, y_position/2, 112, 37, true);
+ rb->lcd_bitmap(clogo, 0, y_position/2, 112, 37);
if(show_clock_text)
rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 48, buf);
rb->lcd_update();
@@ -1063,7 +1063,7 @@ void show_logo(bool animate, bool show_clock_text)
rb->lcd_drawline(0, y_position/2-1, 111, y_position/2-1);
rb->lcd_drawline(0, y_position/2+38, 111, y_position/2+38);
rb->lcd_set_drawmode(DRMODE_SOLID);
- rb->lcd_bitmap(clogo, 0, y_position/2, 112, 37, true);
+ rb->lcd_bitmap(clogo, 0, y_position/2, 112, 37);
if(show_clock_text)
rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 48, buf);
rb->lcd_update();
@@ -1071,7 +1071,7 @@ void show_logo(bool animate, bool show_clock_text)
}
else /* don't animate, just show */
{
- rb->lcd_bitmap(clogo, 0, 10, 112, 37, true);
+ rb->lcd_bitmap(clogo, 0, 10, 112, 37);
if(show_clock_text)
rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 48, buf);
rb->lcd_update();
@@ -1094,7 +1094,7 @@ void exit_logo(void)
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
rb->lcd_drawline(0, y_position/2-1, 111, y_position/2-1);
rb->lcd_set_drawmode(DRMODE_SOLID);
- rb->lcd_bitmap(clogo, 0, y_position/2, 112, 37, true);
+ rb->lcd_bitmap(clogo, 0, y_position/2, 112, 37);
rb->lcd_update();
}
}
@@ -1511,9 +1511,9 @@ bool f1_screen(void)
void draw_checkbox(bool setting, int x, int y)
{
if(setting) /* checkbox is on */
- rb->lcd_bitmap(checkbox_full, x, y, 8, 6, true);
+ rb->lcd_bitmap(checkbox_full, x, y, 8, 6);
else /* checkbox is off */
- rb->lcd_bitmap(checkbox_empty, x, y, 8, 6, true);
+ rb->lcd_bitmap(checkbox_empty, x, y, 8, 6);
}
void draw_settings(void)
@@ -1544,18 +1544,18 @@ void draw_settings(void)
draw_checkbox(settings.analog_digits, 1, 33);
if(settings.analog_date == 0)
- rb->lcd_bitmap(checkbox_empty, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_empty, 1, 41, 8, 6);
else if(settings.analog_date == 1)
- rb->lcd_bitmap(checkbox_half, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_half, 1, 41, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6);
if(settings.analog_time == 0)
- rb->lcd_bitmap(checkbox_empty, 1, 49, 8, 6, true);
+ rb->lcd_bitmap(checkbox_empty, 1, 49, 8, 6);
else if(settings.analog_time == 1)
- rb->lcd_bitmap(checkbox_half, 1, 49, 8, 6, true);
+ rb->lcd_bitmap(checkbox_half, 1, 49, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 49, 8, 6, true);
+ rb->lcd_bitmap(checkbox_full, 1, 49, 8, 6);
draw_checkbox(settings.analog_secondhand, 1, 57);
}
@@ -1584,20 +1584,20 @@ void draw_settings(void)
/* Draw checkboxes */
if(settings.digital_date == 0)
- rb->lcd_bitmap(checkbox_empty, 1, 33, 8, 6, true);
+ rb->lcd_bitmap(checkbox_empty, 1, 33, 8, 6);
else if(settings.digital_date == 1)
- rb->lcd_bitmap(checkbox_half, 1, 33, 8, 6, true);
+ rb->lcd_bitmap(checkbox_half, 1, 33, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 33, 8, 6, true);
+ rb->lcd_bitmap(checkbox_full, 1, 33, 8, 6);
if(settings.digital_seconds == 0)
- rb->lcd_bitmap(checkbox_empty, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_empty, 1, 41, 8, 6);
else if(settings.digital_seconds == 1)
- rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6);
else if(settings.digital_seconds == 2)
- rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6);
draw_checkbox(settings.digital_blinkcolon, 1, 49);
draw_checkbox(settings.digital_12h, 1, 57);
@@ -1627,20 +1627,20 @@ void draw_settings(void)
/* Draw checkboxes */
if(settings.lcd_date == 0)
- rb->lcd_bitmap(checkbox_empty, 1, 33, 8, 6, true);
+ rb->lcd_bitmap(checkbox_empty, 1, 33, 8, 6);
else if(settings.lcd_date == 1)
- rb->lcd_bitmap(checkbox_half, 1, 33, 8, 6, true);
+ rb->lcd_bitmap(checkbox_half, 1, 33, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 33, 8, 6, true);
+ rb->lcd_bitmap(checkbox_full, 1, 33, 8, 6);
if(settings.lcd_seconds == 0)
- rb->lcd_bitmap(checkbox_empty, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_empty, 1, 41, 8, 6);
else if(settings.lcd_seconds == 1)
- rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6);
else if(settings.lcd_seconds == 2)
- rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6);
draw_checkbox(settings.lcd_blinkcolon, 1, 49);
draw_checkbox(settings.lcd_12h, 1, 57);
@@ -2131,16 +2131,16 @@ void general_settings(void)
rb->lcd_getstringsize(buf, &buf_w, &buf_h);
rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 56, buf);
- rb->lcd_bitmap(arrow, 1, 17, 8, 6, true);
- rb->lcd_bitmap(arrow, 1, 25, 8, 6, true);
+ rb->lcd_bitmap(arrow, 1, 17, 8, 6);
+ rb->lcd_bitmap(arrow, 1, 25, 8, 6);
draw_checkbox(settings.display_counter, 1, 33);
if(settings.save_mode == 1)
- rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6);
else if(settings.save_mode == 2)
- rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6);
switch(cursorpos)
{
@@ -2181,15 +2181,15 @@ void general_settings(void)
rb->lcd_puts(2, 5, "Save: Automatic");
else
rb->lcd_puts(2, 5, "Save: Manually");
- rb->lcd_bitmap(arrow, 1, 17, 8, 6, true);
- rb->lcd_bitmap(arrow, 1, 25, 8, 6, true);
+ rb->lcd_bitmap(arrow, 1, 17, 8, 6);
+ rb->lcd_bitmap(arrow, 1, 25, 8, 6);
draw_checkbox(settings.display_counter, 1, 33);
if(settings.save_mode == 1)
- rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6);
else if(settings.save_mode == 2)
- rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6);
cursor(0, cursor_y, 112, 8);
rb->lcd_update();
@@ -2218,15 +2218,15 @@ void general_settings(void)
rb->lcd_puts(2, 5, "Save: Automatic");
else
rb->lcd_puts(2, 5, "Save: Manually");
- rb->lcd_bitmap(arrow, 1, 17, 8, 6, true);
- rb->lcd_bitmap(arrow, 1, 25, 8, 6, true);
+ rb->lcd_bitmap(arrow, 1, 17, 8, 6);
+ rb->lcd_bitmap(arrow, 1, 25, 8, 6);
draw_checkbox(settings.display_counter, 1, 33);
if(settings.save_mode == 1)
- rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6);
else if(settings.save_mode == 2)
- rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6);
cursor(0, cursor_y, 112, 8);
rb->lcd_update();
@@ -2323,9 +2323,9 @@ void draw_extras(int year, int day, int month, int hour, int minute, int second)
if(settings.analog_time == 2)
{
if(current_time->tm_hour > 12) /* PM */
- rb->lcd_bitmap(pm, 96, 1, 15, 8, true);
+ rb->lcd_bitmap(pm, 96, 1, 15, 8);
else /* AM */
- rb->lcd_bitmap(am, 96, 1, 15, 8, true);
+ rb->lcd_bitmap(am, 96, 1, 15, 8);
}
}
@@ -2460,11 +2460,11 @@ void select_mode(void)
rb->lcd_puts(0, 7, "PLAY:Go|OFF:Cancel");
/* draw an arrow next to all of them */
- rb->lcd_bitmap(arrow, 1, 9, 8, 6, true);
- rb->lcd_bitmap(arrow, 1, 17, 8, 6, true);
- rb->lcd_bitmap(arrow, 1, 25, 8, 6, true);
- rb->lcd_bitmap(arrow, 1, 33, 8, 6, true);
- rb->lcd_bitmap(arrow, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(arrow, 1, 9, 8, 6);
+ rb->lcd_bitmap(arrow, 1, 17, 8, 6);
+ rb->lcd_bitmap(arrow, 1, 25, 8, 6);
+ rb->lcd_bitmap(arrow, 1, 33, 8, 6);
+ rb->lcd_bitmap(arrow, 1, 41, 8, 6);
/* draw line selector */
switch(cursorpos)
@@ -2501,11 +2501,11 @@ void select_mode(void)
rb->lcd_puts(0, 7, "PLAY:Go|OFF:Cancel");
/* draw an arrow next to all of them */
- rb->lcd_bitmap(arrow, 1, 9, 8, 6, true);
- rb->lcd_bitmap(arrow, 1, 17, 8, 6, true);
- rb->lcd_bitmap(arrow, 1, 25, 8, 6, true);
- rb->lcd_bitmap(arrow, 1, 33, 8, 6, true);
- rb->lcd_bitmap(arrow, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(arrow, 1, 9, 8, 6);
+ rb->lcd_bitmap(arrow, 1, 17, 8, 6);
+ rb->lcd_bitmap(arrow, 1, 25, 8, 6);
+ rb->lcd_bitmap(arrow, 1, 33, 8, 6);
+ rb->lcd_bitmap(arrow, 1, 41, 8, 6);
cursor(0, cursor_y, 112, 8);
rb->lcd_update();
@@ -2535,11 +2535,11 @@ void select_mode(void)
rb->lcd_puts(0, 7, "PLAY:Go|OFF:Cancel");
/* draw an arrow next to all of them */
- rb->lcd_bitmap(arrow, 1, 9, 8, 6, true);
- rb->lcd_bitmap(arrow, 1, 17, 8, 6, true);
- rb->lcd_bitmap(arrow, 1, 25, 8, 6, true);
- rb->lcd_bitmap(arrow, 1, 33, 8, 6, true);
- rb->lcd_bitmap(arrow, 1, 41, 8, 6, true);
+ rb->lcd_bitmap(arrow, 1, 9, 8, 6);
+ rb->lcd_bitmap(arrow, 1, 17, 8, 6);
+ rb->lcd_bitmap(arrow, 1, 25, 8, 6);
+ rb->lcd_bitmap(arrow, 1, 33, 8, 6);
+ rb->lcd_bitmap(arrow, 1, 41, 8, 6);
cursor(0, cursor_y, 112, 8);
rb->lcd_update();
@@ -2580,7 +2580,7 @@ void counter_finished(void)
rb->lcd_clear_display();
/* draw "TIME'S UP" text */
- rb->lcd_bitmap(times_up, 0, xpos, 112, 50, true);
+ rb->lcd_bitmap(times_up, 0, xpos, 112, 50);
/* invert lcd */
rb->lcd_set_drawmode(DRMODE_COMPLEMENT);
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c
index 57cbad2..d6774fc 100644
--- a/apps/plugins/flipit.c
+++ b/apps/plugins/flipit.c
@@ -71,9 +71,9 @@ static unsigned char cursor_pic[32] = {
/* draw a spot at the coordinates (x,y), range of p is 0-19 */
static void draw_spot(int p) {
ptr = spot_pic[spots[p]];
- rb->lcd_bitmap (ptr, (p%5)*16+1, (p/5)*16+1, 14, 8, true);
+ rb->lcd_bitmap (ptr, (p%5)*16+1, (p/5)*16+1, 14, 8);
ptr += 14;
- rb->lcd_bitmap (ptr, (p%5)*16+1, (p/5)*16+9, 14, 6, true);
+ rb->lcd_bitmap (ptr, (p%5)*16+1, (p/5)*16+9, 14, 6);
}
/* draw the cursor at the current cursor position */
@@ -81,10 +81,12 @@ static void draw_cursor(void) {
int i,j;
i = (cursor_pos%5)*16;
j = (cursor_pos/5)*16;
+ rb->lcd_set_drawmode(DRMODE_FG);
ptr = cursor_pic;
- rb->lcd_bitmap (ptr, i, j, 16, 8, false);
+ rb->lcd_bitmap (ptr, i, j, 16, 8);
ptr += 16;
- rb->lcd_bitmap (ptr, i, j+8, 16, 8, false);
+ rb->lcd_bitmap (ptr, i, j+8, 16, 8);
+ rb->lcd_set_drawmode(DRMODE_SOLID);
}
/* clear the cursor where it is */
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c
index 7763fb9..7807982 100644
--- a/apps/plugins/logo.c
+++ b/apps/plugins/logo.c
@@ -229,7 +229,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
while (1) {
#ifdef HAVE_LCD_BITMAP
rb->lcd_clear_display();
- rb->lcd_bitmap(LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT, false);
+ rb->lcd_bitmap(LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT);
#ifdef REMOTE_LOGO
rb->remote_clear_display();
rb->remote_bitmap(REMOTE_LOGO,
diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c
index d7e19e9..18b57c4 100644
--- a/apps/plugins/minesweeper.c
+++ b/apps/plugins/minesweeper.c
@@ -379,7 +379,9 @@ int minesweeper(void)
if(minefield[i][j].mine){
rb->lcd_putsxy(j*8+1,i*8+1,"b");
} else if(minefield[i][j].neighbors){
- rb->lcd_bitmap(num[minefield[i][j].neighbors],j*8,i*8,8,8,false);
+ rb->lcd_set_drawmode(DRMODE_FG);
+ rb->lcd_bitmap(num[minefield[i][j].neighbors],j*8,i*8,8,8);
+ rb->lcd_set_drawmode(DRMODE_SOLID);
}
} else if(minefield[i][j].flag) {
rb->lcd_drawline(j*8+2,i*8+2,j*8+5,i*8+5);
diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c
index 83f92b2..e222995 100644
--- a/apps/plugins/sliding_puzzle.c
+++ b/apps/plugins/sliding_puzzle.c
@@ -148,7 +148,7 @@ static unsigned char picture[20][32] = {
static void draw_spot(int p, int x, int y)
{
if (pic || p==20) {
- rb->lcd_bitmap (picture[p-1], x, y, 16, 16, true);
+ rb->lcd_bitmap (picture[p-1], x, y, 16, 16);
} else {
rb->lcd_drawrect(x, y, 16, 16);
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c
index bd9792a..fdc317b 100644
--- a/apps/plugins/snake2.c
+++ b/apps/plugins/snake2.c
@@ -619,11 +619,13 @@ void draw_apple( void )
#if LCD_WIDTH >= 160 && LCD_HEIGHT >= 128
char pscore[5], counter[4];
- rb->lcd_bitmap(snakebmp,0,0,BMPWIDTH_snakebmp,BMPHEIGHT_snakebmp,false);
+ rb->lcd_set_drawmode(DRMODE_FG);
+ rb->lcd_bitmap(snakebmp,0,0,BMPWIDTH_snakebmp,BMPHEIGHT_snakebmp);
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
rb->lcd_fillrect(0,0,BMPWIDTH_snakeupbmp,BMPHEIGHT_snakeupbmp);
+ rb->lcd_set_drawmode(DRMODE_FG);
+ rb->lcd_bitmap(snakeupbmp,0,0,BMPWIDTH_snakeupbmp,BMPHEIGHT_snakeupbmp);
rb->lcd_set_drawmode(DRMODE_SOLID);
- rb->lcd_bitmap(snakeupbmp,0,0,BMPWIDTH_snakeupbmp,BMPHEIGHT_snakeupbmp,false);
rb->snprintf(counter,sizeof(counter),"%d",applecount);
rb->lcd_getstringsize(counter,&strwdt,&strhgt);
@@ -1295,8 +1297,10 @@ void game_init(void)
#if LCD_WIDTH >= 160 && LCD_HEIGHT >= 128
- rb->lcd_bitmap(snakebmp,0,0,BMPWIDTH_snakebmp,BMPWIDTH_snakebmp,false);
-
+ rb->lcd_set_drawmode(DRMODE_FG);
+ rb->lcd_bitmap(snakebmp,0,0,BMPWIDTH_snakebmp,BMPWIDTH_snakebmp);
+ rb->lcd_set_drawmode(DRMODE_SOLID);
+
rb->snprintf(plevel,sizeof(plevel),"%d",level);
rb->lcd_getstringsize(plevel,&strwdt,&strhgt);
rb->lcd_putsxy(42-strwdt/2,25, plevel);
diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c
index dd97abc..36181e6 100644
--- a/apps/plugins/snow.c
+++ b/apps/plugins/snow.c
@@ -115,7 +115,7 @@ static void snow_move(void)
if (particle_exists(i))
#ifdef HAVE_LCD_BITMAP
rb->lcd_bitmap(flake,particles[i][0],particles[i][1],
- FLAKE_WIDTH,FLAKE_WIDTH,true);
+ FLAKE_WIDTH,FLAKE_WIDTH);
#else
pgfx_drawpixel(particles[i][0],particles[i][1]);
#endif
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c
index 9f2fbfa..fca36aa 100644
--- a/apps/plugins/solitaire.c
+++ b/apps/plugins/solitaire.c
@@ -900,8 +900,8 @@ int solitaire(void){
rb->lcd_set_drawmode(DRMODE_SOLID);
/* known card */
if(deck[c].known){
- rb->lcd_bitmap(numbers[deck[c].num], i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+1, j, 8, 8, true);
- rb->lcd_bitmap(colors[deck[c].color], i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+7, j, 8, 8, true);
+ rb->lcd_bitmap(numbers[deck[c].num], i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+1, j, 8, 8);
+ rb->lcd_bitmap(colors[deck[c].color], i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+7, j, 8, 8);
}
/* draw top line of the card */
rb->lcd_drawline(i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+1,j,i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+CARD_WIDTH-1,j);
@@ -944,9 +944,9 @@ int solitaire(void){
}
}
if(c != NOT_A_CARD) {
- rb->lcd_bitmap(numbers[deck[c].num], LCD_WIDTH2 - CARD_WIDTH+1, i*CARD_HEIGHT, 8, 8, true);
+ rb->lcd_bitmap(numbers[deck[c].num], LCD_WIDTH2 - CARD_WIDTH+1, i*CARD_HEIGHT, 8, 8);
}
- rb->lcd_bitmap(colors[i], LCD_WIDTH2 - CARD_WIDTH+7, i*CARD_HEIGHT, 8, 8, true);
+ rb->lcd_bitmap(colors[i], LCD_WIDTH2 - CARD_WIDTH+7, i*CARD_HEIGHT, 8, 8);
/* draw a selected card */
if(c != NOT_A_CARD) {
if(sel_card == c){
@@ -976,8 +976,8 @@ int solitaire(void){
rb->lcd_drawline(LCD_WIDTH2,LCD_HEIGHT-CARD_HEIGHT,LCD_WIDTH2,LCD_HEIGHT-2);
#endif
if(cur_rem != NOT_A_CARD){
- rb->lcd_bitmap(numbers[deck[cur_rem].num], LCD_WIDTH2 - CARD_WIDTH+1, LCD_HEIGHT-CARD_HEIGHT, 8, 8, true);
- rb->lcd_bitmap(colors[deck[cur_rem].color], LCD_WIDTH2 - CARD_WIDTH+7, LCD_HEIGHT-CARD_HEIGHT, 8, 8, true);
+ rb->lcd_bitmap(numbers[deck[cur_rem].num], LCD_WIDTH2 - CARD_WIDTH+1, LCD_HEIGHT-CARD_HEIGHT, 8, 8);
+ rb->lcd_bitmap(colors[deck[cur_rem].color], LCD_WIDTH2 - CARD_WIDTH+7, LCD_HEIGHT-CARD_HEIGHT, 8, 8);
/* draw a selected card */
if(sel_card == cur_rem){
rb->lcd_drawrect(LCD_WIDTH2 - CARD_WIDTH+1, LCD_HEIGHT-CARD_HEIGHT,CARD_WIDTH-1, CARD_HEIGHT-1);
diff --git a/apps/plugins/splitedit.c b/apps/plugins/splitedit.c
index 20a9922..e6d8551 100644
--- a/apps/plugins/splitedit.c
+++ b/apps/plugins/splitedit.c
@@ -262,18 +262,18 @@ static void update_icons(void)
/* The CUT icon */
rb->lcd_bitmap(CUT_BMP,
LCD_WIDTH / 3 / 2 - BMPWIDTH / 2, LCD_HEIGHT - BMPHEIGHT,
- BMPWIDTH, BMPHEIGHT, true);
+ BMPWIDTH, BMPHEIGHT);
/* The loop mode icon */
rb->lcd_bitmap(LOOP_BMP[splitedit_get_loop_mode()],
LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT,
- BMPWIDTH, BMPHEIGHT, true);
+ BMPWIDTH, BMPHEIGHT);
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
/* The scale icon */
rb->lcd_bitmap(SCALE_BMP[rb->peak_meter_get_use_dbfs()],
2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT,
- BMPWIDTH, BMPHEIGHT, true);
+ BMPWIDTH, BMPHEIGHT);
#else
{
static int idx;
@@ -281,7 +281,7 @@ static void update_icons(void)
idx = 1 - idx;
rb->lcd_bitmap(SCALE_BMP[idx],
2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT,
- BMPWIDTH, BMPHEIGHT, true);
+ BMPWIDTH, BMPHEIGHT);
}
#endif
diff --git a/apps/plugins/star.c b/apps/plugins/star.c
index fbaf8ae..acf3427 100644
--- a/apps/plugins/star.c
+++ b/apps/plugins/star.c
@@ -485,10 +485,10 @@ static void star_display_board_info(void)
if (control == STAR_CONTROL_BALL)
rb->lcd_bitmap (ball_bmp, 103, label_offset_y + 1, STAR_TILE_SIZE,
- STAR_TILE_SIZE, true);
+ STAR_TILE_SIZE);
else
rb->lcd_bitmap (block_bmp, 103, label_offset_y + 1, STAR_TILE_SIZE,
- STAR_TILE_SIZE, true);
+ STAR_TILE_SIZE);
rb->lcd_update_rect(0, label_offset_y, LCD_WIDTH, char_height);
}
@@ -522,14 +522,14 @@ static int star_load_level(int current_level)
rb->lcd_bitmap (wall_bmp,
STAR_OFFSET_X + x * STAR_TILE_SIZE,
STAR_OFFSET_Y + y * STAR_TILE_SIZE,
- STAR_TILE_SIZE, STAR_TILE_SIZE, false);
+ STAR_TILE_SIZE, STAR_TILE_SIZE);
break;
case STAR_STAR:
rb->lcd_bitmap (star_bmp,
STAR_OFFSET_X + x * STAR_TILE_SIZE,
STAR_OFFSET_Y + y * STAR_TILE_SIZE,
- STAR_TILE_SIZE, STAR_TILE_SIZE, false);
+ STAR_TILE_SIZE, STAR_TILE_SIZE);
star_count++;
break;
@@ -539,7 +539,7 @@ static int star_load_level(int current_level)
rb->lcd_bitmap (ball_bmp,
STAR_OFFSET_X + x * STAR_TILE_SIZE,
STAR_OFFSET_Y + y * STAR_TILE_SIZE,
- STAR_TILE_SIZE, STAR_TILE_SIZE, false);
+ STAR_TILE_SIZE, STAR_TILE_SIZE);
break;
@@ -549,7 +549,7 @@ static int star_load_level(int current_level)
rb->lcd_bitmap (block_bmp,
STAR_OFFSET_X + x * STAR_TILE_SIZE,
STAR_OFFSET_Y + y * STAR_TILE_SIZE,
- STAR_TILE_SIZE, STAR_TILE_SIZE, false);
+ STAR_TILE_SIZE, STAR_TILE_SIZE);
break;
}
ptr_tab++;
@@ -668,7 +668,7 @@ static int star_run_game(void)
ball_bmp,
STAR_OFFSET_X + ball_x * STAR_TILE_SIZE + move_x * i,
STAR_OFFSET_Y + ball_y * STAR_TILE_SIZE + move_y * i,
- STAR_TILE_SIZE, STAR_TILE_SIZE, true);
+ STAR_TILE_SIZE, STAR_TILE_SIZE);
rb->lcd_update_rect(
STAR_OFFSET_X + ball_x * STAR_TILE_SIZE + move_x * i,
@@ -700,7 +700,7 @@ static int star_run_game(void)
block_bmp,
STAR_OFFSET_X + block_x * STAR_TILE_SIZE + move_x * i,
STAR_OFFSET_Y + block_y * STAR_TILE_SIZE + move_y * i,
- STAR_TILE_SIZE, STAR_TILE_SIZE, true);
+ STAR_TILE_SIZE, STAR_TILE_SIZE);
rb->lcd_update_rect(
STAR_OFFSET_X + block_x * STAR_TILE_SIZE + move_x * i,
@@ -766,7 +766,7 @@ static int star_menu(void)
move_y = 0;
rb->lcd_bitmap(arrow_bmp[anim_arrow[(anim_state & 0x38) >> 3]],
- 2, menu_offset_y + menu_y * char_height, 7, 8, true);
+ 2, menu_offset_y + menu_y * char_height, 7, 8);
rb->lcd_update_rect (2, menu_offset_y + menu_y * 8, 8, 8);
rb->sleep(STAR_SLEEP);
anim_state++;
@@ -840,14 +840,14 @@ static int star_menu(void)
{
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
rb->lcd_fillrect (2, 30, 7, 4 * 8);
- rb->lcd_set_drawmode(DRMODE_SOLID);
+ rb->lcd_set_drawmode(DRMODE_FG);
rb->lcd_bitmap(arrow_bmp[anim_arrow[(anim_state & 0x38) >> 3]],
- 2, menu_offset_y + menu_y * 8 + move_y * i, 7, 8,
- false);
+ 2, menu_offset_y + menu_y * 8 + move_y * i, 7, 8);
rb->lcd_update_rect(2, 30, 8, 4 * 8);
anim_state++;
rb->sleep(STAR_SLEEP);
}
+ rb->lcd_set_drawmode(DRMODE_SOLID);
menu_y += move_y;
}
}
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c
index 1a6f723..d54f86d 100644
--- a/apps/plugins/vu_meter.c
+++ b/apps/plugins/vu_meter.c
@@ -278,47 +278,55 @@ void change_settings(void)
}
void draw_analog_minimeters(void) {
- rb->lcd_bitmap(sound_speaker, 0, 12, 4, 8, true);
+ rb->lcd_bitmap(sound_speaker, 0, 12, 4, 8);
+ rb->lcd_set_drawmode(DRMODE_FG);
if(5<left_needle_top_x)
- rb->lcd_bitmap(sound_low_level, 5, 12, 2, 8, false);
+ rb->lcd_bitmap(sound_low_level, 5, 12, 2, 8);
if(12<left_needle_top_x)
- rb->lcd_bitmap(sound_med_level, 7, 12, 2, 8, false);
+ rb->lcd_bitmap(sound_med_level, 7, 12, 2, 8);
if(24<left_needle_top_x)
- rb->lcd_bitmap(sound_high_level, 9, 12, 2, 8, false);
+ rb->lcd_bitmap(sound_high_level, 9, 12, 2, 8);
if(40<left_needle_top_x)
- rb->lcd_bitmap(sound_max_level, 12, 12, 3, 8, false);
+ rb->lcd_bitmap(sound_max_level, 12, 12, 3, 8);
- rb->lcd_bitmap(sound_speaker, 54, 12, 4, 8, true);
+ rb->lcd_set_drawmode(DRMODE_SOLID);
+ rb->lcd_bitmap(sound_speaker, 54, 12, 4, 8);
+ rb->lcd_set_drawmode(DRMODE_FG);
if(5<(right_needle_top_x-56))
- rb->lcd_bitmap(sound_low_level, 59, 12, 2, 8, false);
+ rb->lcd_bitmap(sound_low_level, 59, 12, 2, 8);
if(12<(right_needle_top_x-56))
- rb->lcd_bitmap(sound_med_level, 61, 12, 2, 8, false);
+ rb->lcd_bitmap(sound_med_level, 61, 12, 2, 8);
if(24<(right_needle_top_x-56))
- rb->lcd_bitmap(sound_high_level, 63, 12, 2, 8, false);
+ rb->lcd_bitmap(sound_high_level, 63, 12, 2, 8);
if(40<(right_needle_top_x-56))
- rb->lcd_bitmap(sound_max_level, 66, 12, 3, 8, false);
+ rb->lcd_bitmap(sound_max_level, 66, 12, 3, 8);
+ rb->lcd_set_drawmode(DRMODE_SOLID);
}
void draw_digital_minimeters(void) {
- rb->lcd_bitmap(sound_speaker, 34, 24, 4, 8, true);
+ rb->lcd_bitmap(sound_speaker, 34, 24, 4, 8);
+ rb->lcd_set_drawmode(DRMODE_FG);
if(1<num_left_leds)
- rb->lcd_bitmap(sound_low_level, 39, 24, 2, 8, false);
+ rb->lcd_bitmap(sound_low_level, 39, 24, 2, 8);
if(2<num_left_leds)
- rb->lcd_bitmap(sound_med_level, 41, 24, 2, 8, false);
+ rb->lcd_bitmap(sound_med_level, 41, 24, 2, 8);
if(5<num_left_leds)
- rb->lcd_bitmap(sound_high_level, 43, 24, 2, 8, false);
+ rb->lcd_bitmap(sound_high_level, 43, 24, 2, 8);
if(8<num_left_leds)
- rb->lcd_bitmap(sound_max_level, 46, 24, 3, 8, false);
+ rb->lcd_bitmap(sound_max_level, 46, 24, 3, 8);
- rb->lcd_bitmap(sound_speaker, 34, 40, 4, 8, true);
+ rb->lcd_set_drawmode(DRMODE_SOLID);
+ rb->lcd_bitmap(sound_speaker, 34, 40, 4, 8);
+ rb->lcd_set_drawmode(DRMODE_FG);
if(1<(num_right_leds))
- rb->lcd_bitmap(sound_low_level, 39, 40, 2, 8, false);
+ rb->lcd_bitmap(sound_low_level, 39, 40, 2, 8);
if(2<(num_right_leds))
- rb->lcd_bitmap(sound_med_level, 41, 40, 2, 8, false);
+ rb->lcd_bitmap(sound_med_level, 41, 40, 2, 8);
if(5<(num_right_leds))
- rb->lcd_bitmap(sound_high_level, 43, 40, 2, 8, false);
+ rb->lcd_bitmap(sound_high_level, 43, 40, 2, 8);
if(8<(num_right_leds))
- rb->lcd_bitmap(sound_max_level, 46, 40, 3, 8, false);
+ rb->lcd_bitmap(sound_max_level, 46, 40, 3, 8);
+ rb->lcd_set_drawmode(DRMODE_SOLID);
}
void analog_meter(void) {
@@ -350,8 +358,10 @@ void analog_meter(void) {
draw_analog_minimeters();
/* Needle covers */
- rb->lcd_bitmap(needle_cover, 22, 59, 13, 5, false);
- rb->lcd_bitmap(needle_cover, 78, 59, 13, 5, false);
+ rb->lcd_set_drawmode(DRMODE_FG);
+ rb->lcd_bitmap(needle_cover, 22, 59, 13, 5);
+ rb->lcd_bitmap(needle_cover, 78, 59, 13, 5);
+ rb->lcd_set_drawmode(DRMODE_SOLID);
/* Show Left/Right */
rb->lcd_putsxy(16, 12, "Left");
@@ -383,12 +393,15 @@ void digital_meter(void) {
last_num_left_leds = num_left_leds;
last_num_right_leds = num_right_leds;
+ rb->lcd_set_drawmode(DRMODE_FG);
/* LEDS */
for(i=0; i<num_left_leds; i++)
- rb->lcd_bitmap(led, i*9+2+i, 14, 9, 5, false);
+ rb->lcd_bitmap(led, i*9+2+i, 14, 9, 5);
for(i=0; i<num_right_leds; i++)
- rb->lcd_bitmap(led, i*9+2+i, 52, 9, 5, false);
+ rb->lcd_bitmap(led, i*9+2+i, 52, 9, 5);
+
+ rb->lcd_set_drawmode(DRMODE_SOLID);
if(settings.digital_minimeters)
draw_digital_minimeters();
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c
index a10f2e1..7a5a7bd 100644
--- a/apps/recorder/icons.c
+++ b/apps/recorder/icons.c
@@ -323,7 +323,7 @@ bool statusbar_icon_volume(int percent)
if (volume==0) {
lcd_bitmap(bitmap_icons_7x8[Icon_Mute],
ICON_VOLUME_X_POS + ICON_VOLUME_WIDTH / 2 - 4,
- STATUSBAR_Y_POS, 7, STATUSBAR_HEIGHT, false);
+ STATUSBAR_Y_POS, 7, STATUSBAR_HEIGHT);
}
else {
/* We want to redraw the icon later on */
@@ -371,7 +371,7 @@ bool statusbar_icon_volume(int percent)
void statusbar_icon_play_state(int state)
{
lcd_bitmap(bitmap_icons_7x8[state], ICON_PLAY_STATE_X_POS, STATUSBAR_Y_POS,
- ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT, false);
+ ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT);
}
/*
@@ -380,7 +380,7 @@ void statusbar_icon_play_state(int state)
void statusbar_icon_play_mode(int mode)
{
lcd_bitmap(bitmap_icons_7x8[mode], ICON_PLAY_MODE_X_POS, STATUSBAR_Y_POS,
- ICON_PLAY_MODE_WIDTH, STATUSBAR_HEIGHT, false);
+ ICON_PLAY_MODE_WIDTH, STATUSBAR_HEIGHT);
}
/*
@@ -389,7 +389,7 @@ void statusbar_icon_play_mode(int mode)
void statusbar_icon_shuffle(void)
{
lcd_bitmap(bitmap_icons_7x8[Icon_Shuffle], ICON_SHUFFLE_X_POS,
- STATUSBAR_Y_POS, ICON_SHUFFLE_WIDTH, STATUSBAR_HEIGHT, false);
+ STATUSBAR_Y_POS, ICON_SHUFFLE_WIDTH, STATUSBAR_HEIGHT);
}
/*
@@ -398,7 +398,7 @@ void statusbar_icon_shuffle(void)
void statusbar_icon_lock(void)
{
lcd_bitmap(bitmap_icons_5x8[Icon_Lock], LOCK_X_POS,
- STATUSBAR_Y_POS, 5, 8, false);
+ STATUSBAR_Y_POS, 5, 8);
}
#if CONFIG_LED == LED_VIRTUAL
@@ -408,7 +408,7 @@ void statusbar_icon_lock(void)
void statusbar_led(void)
{
lcd_bitmap(bitmap_icon_disk, ICON_DISK_X_POS,
- STATUSBAR_Y_POS, ICON_DISK_WIDTH, STATUSBAR_HEIGHT, false);
+ STATUSBAR_Y_POS, ICON_DISK_WIDTH, STATUSBAR_HEIGHT);
}
#endif
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c
index 779200c..3bab002 100644
--- a/apps/recorder/peakmeter.c
+++ b/apps/recorder/peakmeter.c
@@ -1108,7 +1108,7 @@ void peak_meter_draw_trig(int xpos, int ypos) {
scrollbar(x, ypos + 1, TRIGBAR_WIDTH, TRIG_HEIGHT - 2,
TRIGBAR_WIDTH, 0, 0, HORIZONTAL);
lcd_bitmap(bitmap_icons_7x8[Icon_Stop], xpos, ypos,
- ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT, false);
+ ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT);
break;
case TRIG_STEADY:
@@ -1118,7 +1118,7 @@ void peak_meter_draw_trig(int xpos, int ypos) {
scrollbar(x, ypos + 1, TRIGBAR_WIDTH, TRIG_HEIGHT - 2,
TRIGBAR_WIDTH, 0, TRIGBAR_WIDTH - time_left, HORIZONTAL);
lcd_bitmap(bitmap_icons_7x8[Icon_Stop], xpos, ypos,
- ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT, false);
+ ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT);
break;
case TRIG_GO:
@@ -1127,7 +1127,7 @@ void peak_meter_draw_trig(int xpos, int ypos) {
TRIGBAR_WIDTH, TRIGBAR_WIDTH, TRIGBAR_WIDTH, HORIZONTAL);
lcd_bitmap(bitmap_icons_7x8[Icon_Record],
TRIG_WIDTH - ICON_PLAY_STATE_WIDTH, ypos,
- ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT, false);
+ ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT);
break;
case TRIG_POSTREC:
@@ -1137,7 +1137,7 @@ void peak_meter_draw_trig(int xpos, int ypos) {
TRIGBAR_WIDTH, time_left, TRIGBAR_WIDTH, HORIZONTAL);
lcd_bitmap(bitmap_icons_7x8[Icon_Record],
TRIG_WIDTH - ICON_PLAY_STATE_WIDTH, ypos,
- ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT, false);
+ ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT);
break;
}
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index 84c90d2..9e58cec 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -870,7 +870,7 @@ bool f2_rec_screen(void)
snprintf(buf, 32, "%d", global_settings.rec_quality);
lcd_putsxy(0, LCD_HEIGHT/2-h, buf);
lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward],
- LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true);
+ LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8);
/* Frequency */
snprintf(buf, sizeof buf, "%s:", str(LANG_RECORDING_FREQUENCY));
@@ -880,7 +880,7 @@ bool f2_rec_screen(void)
lcd_getstringsize(ptr, &w, &h);
lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr);
lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow],
- LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8, true);
+ LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8);
/* Channel mode */
switch ( global_settings.rec_channels ) {
@@ -901,7 +901,7 @@ bool f2_rec_screen(void)
lcd_getstringsize(ptr, &w, &h);
lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2, ptr);
lcd_bitmap(bitmap_icons_7x8[Icon_FastForward],
- LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8, true);
+ LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8);
lcd_update();
@@ -995,14 +995,14 @@ bool f3_rec_screen(void)
lcd_getstringsize(ptr, &w, &h);
lcd_putsxy(0, LCD_HEIGHT/2-h, ptr);
lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward],
- LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true);
+ LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8);
/* trigger setup */
ptr = str(LANG_RECORD_TRIGGER);
lcd_getstringsize(ptr,&w,&h);
lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h*2, ptr);
lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow],
- LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8, true);
+ LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8);
lcd_update();
diff --git a/apps/screens.c b/apps/screens.c
index 6849384..04a3281 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -94,7 +94,9 @@ void usb_display_info(void)
#ifdef HAVE_LCD_BITMAP
/* Center bitmap on screen */
- lcd_bitmap(usb_logo, LCD_WIDTH/2-BMPWIDTH_usb_logo/2, LCD_HEIGHT/2-BMPHEIGHT_usb_logo/2, BMPWIDTH_usb_logo, BMPHEIGHT_usb_logo, false);
+ lcd_bitmap(usb_logo, LCD_WIDTH/2-BMPWIDTH_usb_logo/2,
+ LCD_HEIGHT/2-BMPHEIGHT_usb_logo/2, BMPWIDTH_usb_logo,
+ BMPHEIGHT_usb_logo);
status_draw(true);
lcd_update();
#else
@@ -231,14 +233,16 @@ void charging_display_info(bool animate)
if (!animate)
{ /* draw the outline */
/* middle part */
- lcd_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8, true);
+ lcd_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8);
+ lcd_set_drawmode(DRMODE_FG);
/* upper line */
charging_logo[0] = charging_logo[1] = 0x00;
memset(charging_logo+2, 0x80, 34);
- lcd_bitmap(charging_logo, pox_x, pox_y, sizeof(charging_logo), 8, false);
+ lcd_bitmap(charging_logo, pox_x, pox_y, sizeof(charging_logo), 8);
/* lower line */
memset(charging_logo+2, 0x01, 34);
- lcd_bitmap(charging_logo, pox_x, pox_y + 16, sizeof(charging_logo), 8, false);
+ lcd_bitmap(charging_logo, pox_x, pox_y + 16, sizeof(charging_logo), 8);
+ lcd_set_drawmode(DRMODE_SOLID);
}
else
{ /* animate the middle part */
@@ -253,7 +257,7 @@ void charging_display_info(bool animate)
charging_logo[i] = 0x01 << bitpos;
}
}
- lcd_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8, true);
+ lcd_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8);
phase++;
}
lcd_update();
@@ -411,7 +415,7 @@ int pitch_screen(void)
lcd_getstringsize(ptr,&w,&h);
lcd_putsxy((LCD_WIDTH-w)/2, 0, ptr);
lcd_bitmap(bitmap_icons_7x8[Icon_UpArrow],
- LCD_WIDTH/2 - 3, h*2, 7, 8, true);
+ LCD_WIDTH/2 - 3, h*2, 7, 8);
snprintf(buf, sizeof buf, "%d.%d%%", pitch / 10, pitch % 10 );
lcd_getstringsize(buf,&w,&h);
@@ -421,13 +425,13 @@ int pitch_screen(void)
lcd_getstringsize(ptr,&w,&h);
lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr);
lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow],
- LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8, true);
+ LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8);
ptr = str(LANG_PAUSE);
lcd_getstringsize(ptr,&w,&h);
lcd_putsxy((LCD_WIDTH-(w/2))/2, LCD_HEIGHT/2 - h/2, ptr);
lcd_bitmap(bitmap_icons_7x8[Icon_Pause],
- (LCD_WIDTH-(w/2))/2-10, LCD_HEIGHT/2 - h/2, 7, 8, true);
+ (LCD_WIDTH-(w/2))/2-10, LCD_HEIGHT/2 - h/2, 7, 8);
lcd_update();
}
@@ -632,11 +636,11 @@ bool quick_screen(int context, int button)
}
lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward],
- LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true);
+ LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8);
lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow],
- LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8, true);
+ LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8);
lcd_bitmap(bitmap_icons_7x8[Icon_FastForward],
- LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8, true);
+ LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8);
lcd_update();
key = button_get(true);
diff --git a/apps/status.c b/apps/status.c
index 535337e..03a69dd 100644
--- a/apps/status.c
+++ b/apps/status.c
@@ -245,11 +245,11 @@ void status_draw(bool force_redraw)
/* draw power plug if charging */
if (info.inserted)
lcd_bitmap(bitmap_icons_7x8[Icon_Plug], ICON_PLUG_X_POS,
- STATUSBAR_Y_POS, ICON_PLUG_WIDTH, STATUSBAR_HEIGHT, false);
+ STATUSBAR_Y_POS, ICON_PLUG_WIDTH, STATUSBAR_HEIGHT);
#ifdef HAVE_USB_POWER
else if (info.usb_power)
lcd_bitmap(bitmap_icons_7x8[Icon_USBPlug], ICON_PLUG_X_POS,
- STATUSBAR_Y_POS, ICON_PLUG_WIDTH, STATUSBAR_HEIGHT, false);
+ STATUSBAR_Y_POS, ICON_PLUG_WIDTH, STATUSBAR_HEIGHT);
#endif
info.redraw_volume = statusbar_icon_volume(info.volume);
diff --git a/apps/tree.c b/apps/tree.c
index 66a163a..6d25203 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -395,8 +395,7 @@ static int showdir(void)
offset = (line_height - 8) / 2;
lcd_bitmap(icon,
CURSOR_X * 6 + CURSOR_WIDTH,
- MARGIN_Y+(i-start)*line_height + offset,
- 6, 8, true);
+ MARGIN_Y+(i-start)*line_height + offset, 6, 8);
#else
if (icon < 0 )
icon = Unknown;
diff --git a/apps/wps-display.c b/apps/wps-display.c
index 1b7b765..841196f 100644
--- a/apps/wps-display.c
+++ b/apps/wps-display.c
@@ -112,11 +112,13 @@ static bool wps_loaded = false;
/* Display images */
static void wps_display_images(void) {
int n;
+ lcd_set_drawmode(DRMODE_FG);
for (n = 0; n < MAX_IMAGES; n++) {
if (img[n].loaded) {
- lcd_bitmap(img[n].ptr, img[n].x, img[n].y, img[n].w, img[n].h, false);
+ lcd_bitmap(img[n].ptr, img[n].x, img[n].y, img[n].w, img[n].h);
}
}
+ lcd_set_drawmode(DRMODE_SOLID);
}
#endif