diff options
39 files changed, 992 insertions, 565 deletions
diff --git a/apps/main_menu.c b/apps/main_menu.c index 37a8ff4711..b887ed6504 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c | |||
@@ -75,7 +75,7 @@ int show_logo( void ) | |||
75 | lcd_bitmap(rockbox112x37, 0, 10, 112, 37); | 75 | lcd_bitmap(rockbox112x37, 0, 10, 112, 37); |
76 | #endif | 76 | #endif |
77 | #if LCD_WIDTH >= 160 | 77 | #if LCD_WIDTH >= 160 |
78 | lcd_bitmap(rockbox160x53, 0, 10, 160, 53); | 78 | lcd_bitmap(rockbox160x53x2, 0, 10, 160, 53); |
79 | #endif | 79 | #endif |
80 | 80 | ||
81 | #ifdef HAVE_REMOTE_LCD | 81 | #ifdef HAVE_REMOTE_LCD |
diff --git a/apps/menu.c b/apps/menu.c index 459abe6849..cdcafec770 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -116,7 +116,7 @@ void put_cursorxy(int x, int y, bool on) | |||
116 | /* place the cursor */ | 116 | /* place the cursor */ |
117 | if(on) { | 117 | if(on) { |
118 | #ifdef HAVE_LCD_BITMAP | 118 | #ifdef HAVE_LCD_BITMAP |
119 | lcd_bitmap(bitmap_icons_6x8[Cursor], xpos, ypos, 4, 8); | 119 | lcd_mono_bitmap(bitmap_icons_6x8[Cursor], xpos, ypos, 4, 8); |
120 | #else | 120 | #else |
121 | lcd_putc(x, y, CURSOR_CHAR); | 121 | lcd_putc(x, y, CURSOR_CHAR); |
122 | #endif | 122 | #endif |
diff --git a/apps/misc.c b/apps/misc.c index 055bcd2983..9a890155a7 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -136,35 +136,81 @@ int read_line(int fd, char* buffer, int buffer_size) | |||
136 | } | 136 | } |
137 | 137 | ||
138 | #ifdef HAVE_LCD_BITMAP | 138 | #ifdef HAVE_LCD_BITMAP |
139 | extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; | 139 | |
140 | static const unsigned char bmpheader[] = | 140 | #if LCD_DEPTH <= 8 |
141 | { | 141 | #define BMP_NUMCOLORS (1 << LCD_DEPTH) |
142 | 0x42, 0x4d, 0x3e, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, | ||
143 | 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, LCD_WIDTH, 0x00, 0x00, 0x00, LCD_HEIGHT, 0x00, | ||
144 | 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, | ||
145 | #if LCD_WIDTH == 160 | ||
146 | 0x00, 0x00, 0x00, 0x0a, | ||
147 | #else | 142 | #else |
148 | 0x00, 0x00, 0x00, 0x04, | 143 | #define BMP_NUMCOLORS 0 |
149 | #endif | 144 | #endif |
150 | 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0x00, 0x00, | 145 | |
151 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 146 | #if LCD_DEPTH == 1 |
152 | #ifdef IRIVER_H100 | 147 | #define BMP_BPP 1 |
153 | 0xe6, 0xd8, 0xad, | 148 | #define BMP_LINESIZE ((LCD_WIDTH/8 + 3) & ~3) |
149 | #elif LCD_DEPTH <= 4 | ||
150 | #define BMP_BPP 4 | ||
151 | #define BMP_LINESIZE ((LCD_WIDTH/2 + 3) & ~3) | ||
152 | #elif LCD_DEPTH <= 8 | ||
153 | #define BMP_BPP 8 | ||
154 | #define BMP_LINESIZE ((LCD_WIDTH + 3) & ~3) | ||
155 | #elif LCD_DEPTH <= 16 | ||
156 | #define BMP_BPP 16 | ||
157 | #define BMP_LINESIZE ((LCD_WIDTH*2 + 3) & ~3) | ||
154 | #else | 158 | #else |
155 | 0x90, 0xee, 0x90, | 159 | #define BMP_BPP 24 |
160 | #define BMP_LINESIZE ((LCD_WIDTH*3 + 3) & ~3) | ||
161 | #endif | ||
162 | |||
163 | #define BMP_HEADERSIZE (54 + 4 * BMP_NUMCOLORS) | ||
164 | #define BMP_DATASIZE (BMP_LINESIZE * LCD_HEIGHT) | ||
165 | #define BMP_TOTALSIZE (BMP_HEADERSIZE + BMP_DATASIZE) | ||
166 | |||
167 | #define LE16_CONST(x) (x)&0xff, ((x)>>8)&0xff | ||
168 | #define LE32_CONST(x) (x)&0xff, ((x)>>8)&0xff, ((x)>>16)&0xff, ((x)>>24)&0xff | ||
169 | |||
170 | static const unsigned char bmpheader[] = | ||
171 | { | ||
172 | 0x42, 0x4d, /* 'BM' */ | ||
173 | LE32_CONST(BMP_TOTALSIZE), /* Total file size */ | ||
174 | 0x00, 0x00, 0x00, 0x00, /* Reserved */ | ||
175 | LE32_CONST(BMP_HEADERSIZE), /* Offset to start of pixel data */ | ||
176 | |||
177 | 0x28, 0x00, 0x00, 0x00, /* Size of (2nd) header */ | ||
178 | LE32_CONST(LCD_WIDTH), /* Width in pixels */ | ||
179 | LE32_CONST(LCD_HEIGHT), /* Height in pixels */ | ||
180 | 0x01, 0x00, /* Number of planes (always 1) */ | ||
181 | LE16_CONST(BMP_BPP), /* Bits per pixel 1/4/8/16/24 */ | ||
182 | 0x00, 0x00, 0x00, 0x00, /* Compression mode, 0 = none */ | ||
183 | LE32_CONST(BMP_DATASIZE), /* Size of bitmap data */ | ||
184 | 0xc4, 0x0e, 0x00, 0x00, /* Horizontal resolution (pixels/meter) */ | ||
185 | 0xc4, 0x0e, 0x00, 0x00, /* Vertical resolution (pixels/meter) */ | ||
186 | LE32_CONST(BMP_NUMCOLORS), /* Number of used colours */ | ||
187 | LE32_CONST(BMP_NUMCOLORS), /* Number of important colours */ | ||
188 | |||
189 | #if LCD_DEPTH == 1 | ||
190 | 0x90, 0xee, 0x90, 0x00, /* Colour #0 */ | ||
191 | 0x00, 0x00, 0x00, 0x00 /* Colour #1 */ | ||
192 | #elif LCD_DEPTH == 2 | ||
193 | 0xe6, 0xd8, 0xad, 0x00, /* Colour #0 */ | ||
194 | 0x99, 0x90, 0x73, 0x00, /* Colour #1 */ | ||
195 | 0x4c, 0x48, 0x39, 0x00, /* Colour #2 */ | ||
196 | 0x00, 0x00, 0x00, 0x00 /* Colour #3 */ | ||
156 | #endif | 197 | #endif |
157 | 0x00, 0x00, 0x00, | ||
158 | 0x00, 0x00 | ||
159 | }; | 198 | }; |
160 | 199 | ||
161 | void screen_dump(void) | 200 | void screen_dump(void) |
162 | { | 201 | { |
163 | int fh; | 202 | int fh; |
164 | int bx, by, ix, iy; | 203 | int bx, by, iy; |
165 | int src_byte, src_mask, dst_mask; | 204 | int src_byte; |
166 | char filename[MAX_PATH]; | 205 | char filename[MAX_PATH]; |
167 | static unsigned char line_block[8][(LCD_WIDTH/8+3) & ~3]; | 206 | #if LCD_DEPTH == 1 |
207 | int ix, src_mask, dst_mask; | ||
208 | static unsigned char line_block[8][BMP_LINESIZE]; | ||
209 | #elif LCD_DEPTH == 2 | ||
210 | int src_byte2; | ||
211 | static unsigned char line_block[4][BMP_LINESIZE]; | ||
212 | #endif | ||
213 | |||
168 | #ifdef HAVE_RTC | 214 | #ifdef HAVE_RTC |
169 | struct tm *tm = get_time(); | 215 | struct tm *tm = get_time(); |
170 | 216 | ||
@@ -213,6 +259,7 @@ void screen_dump(void) | |||
213 | write(fh, bmpheader, sizeof(bmpheader)); | 259 | write(fh, bmpheader, sizeof(bmpheader)); |
214 | 260 | ||
215 | /* BMP image goes bottom up */ | 261 | /* BMP image goes bottom up */ |
262 | #if LCD_DEPTH == 1 | ||
216 | for (by = LCD_HEIGHT/8 - 1; by >= 0; by--) | 263 | for (by = LCD_HEIGHT/8 - 1; by >= 0; by--) |
217 | { | 264 | { |
218 | memset(&line_block[0][0], 0, sizeof(line_block)); | 265 | memset(&line_block[0][0], 0, sizeof(line_block)); |
@@ -236,6 +283,26 @@ void screen_dump(void) | |||
236 | 283 | ||
237 | write(fh, &line_block[0][0], sizeof(line_block)); | 284 | write(fh, &line_block[0][0], sizeof(line_block)); |
238 | } | 285 | } |
286 | #elif LCD_DEPTH == 2 | ||
287 | for (by = LCD_HEIGHT/4 - 1; by >= 0; by--) | ||
288 | { | ||
289 | memset(&line_block[0][0], 0, sizeof(line_block)); | ||
290 | |||
291 | for (bx = 0; bx < LCD_WIDTH/2; bx++) | ||
292 | { | ||
293 | src_byte = lcd_framebuffer[by][2*bx]; | ||
294 | src_byte2 = lcd_framebuffer[by][2*bx+1]; | ||
295 | for (iy = 3; iy >= 0; iy--) | ||
296 | { | ||
297 | line_block[iy][bx] = ((src_byte & 3) << 4) | (src_byte2 & 3); | ||
298 | src_byte >>= 2; | ||
299 | src_byte2 >>= 2; | ||
300 | } | ||
301 | } | ||
302 | |||
303 | write(fh, &line_block[0][0], sizeof(line_block)); | ||
304 | } | ||
305 | #endif | ||
239 | close(fh); | 306 | close(fh); |
240 | } | 307 | } |
241 | #endif | 308 | #endif |
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index 21ae4d7645..32cc6035e0 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c | |||
@@ -461,8 +461,8 @@ static void display_playlist(void) | |||
461 | int offset=0; | 461 | int offset=0; |
462 | if ( viewer.line_height > 8 ) | 462 | if ( viewer.line_height > 8 ) |
463 | offset = (viewer.line_height - 8) / 2; | 463 | offset = (viewer.line_height - 8) / 2; |
464 | lcd_bitmap(bitmap_icons_6x8[File], | 464 | lcd_mono_bitmap(bitmap_icons_6x8[File], |
465 | CURSOR_X * 6 + CURSOR_WIDTH, | 465 | CURSOR_X * 6 + CURSOR_WIDTH, |
466 | MARGIN_Y+(i*viewer.line_height) + offset, 6, 8); | 466 | MARGIN_Y+(i*viewer.line_height) + offset, 6, 8); |
467 | #else | 467 | #else |
468 | lcd_putc(LINE_X-1, i, File); | 468 | lcd_putc(LINE_X-1, i, File); |
diff --git a/apps/plugin.c b/apps/plugin.c index c92813d0cf..6061e86aa1 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -114,8 +114,8 @@ static const struct plugin_api rockbox_api = { | |||
114 | lcd_vline, | 114 | lcd_vline, |
115 | lcd_drawrect, | 115 | lcd_drawrect, |
116 | lcd_fillrect, | 116 | lcd_fillrect, |
117 | lcd_bitmap_part, | 117 | lcd_mono_bitmap_part, |
118 | lcd_bitmap, | 118 | lcd_mono_bitmap, |
119 | lcd_putsxy, | 119 | lcd_putsxy, |
120 | lcd_puts_style, | 120 | lcd_puts_style, |
121 | lcd_puts_scroll_style, | 121 | lcd_puts_scroll_style, |
diff --git a/apps/plugin.h b/apps/plugin.h index 46308a1e0b..2f724f3d2e 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -164,10 +164,10 @@ struct plugin_api { | |||
164 | void (*lcd_vline)(int x, int y1, int y2); | 164 | void (*lcd_vline)(int x, int y1, int y2); |
165 | void (*lcd_drawrect)(int x, int y, int width, int height); | 165 | void (*lcd_drawrect)(int x, int y, int width, int height); |
166 | void (*lcd_fillrect)(int x, int y, int width, int height); | 166 | void (*lcd_fillrect)(int x, int y, int width, int height); |
167 | void (*lcd_bitmap_part)(const unsigned char *src, int src_x, int src_y, | 167 | void (*lcd_mono_bitmap_part)(const unsigned char *src, int src_x, int src_y, |
168 | int stride, int x, int y, int width, int height); | 168 | int stride, int x, int y, int width, int height); |
169 | void (*lcd_bitmap)(const unsigned char *src, int x, int y, | 169 | void (*lcd_mono_bitmap)(const unsigned char *src, int x, int y, |
170 | int width, int height); | 170 | int width, int height); |
171 | void (*lcd_putsxy)(int x, int y, const unsigned char *string); | 171 | void (*lcd_putsxy)(int x, int y, const unsigned char *string); |
172 | void (*lcd_puts_style)(int x, int y, const unsigned char *str, int style); | 172 | void (*lcd_puts_style)(int x, int y, const unsigned char *str, int style); |
173 | void (*lcd_puts_scroll_style)(int x, int y, const unsigned char* string, | 173 | void (*lcd_puts_scroll_style)(int x, int y, const unsigned char* string, |
diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c index 98dcd5ff66..676d8fe169 100644 --- a/apps/plugins/bounce.c +++ b/apps/plugins/bounce.c | |||
@@ -309,8 +309,8 @@ static int scrollit(void) | |||
309 | for(i=0, yy=y, xx=x; i< LETTERS_ON_SCREEN; i++) { | 309 | for(i=0, yy=y, xx=x; i< LETTERS_ON_SCREEN; i++) { |
310 | letter = rock[(i+textpos) % rocklen ]; | 310 | letter = rock[(i+textpos) % rocklen ]; |
311 | 311 | ||
312 | rb->lcd_bitmap((char *)char_gen_12x16[letter-0x20], | 312 | rb->lcd_mono_bitmap((char *)char_gen_12x16[letter-0x20], |
313 | xx, table[yy&(TABLE_SIZE-1)], 11, 16); | 313 | xx, table[yy&(TABLE_SIZE-1)], 11, 16); |
314 | yy += YADD; | 314 | yy += YADD; |
315 | xx+= LCD_WIDTH/LETTERS_ON_SCREEN; | 315 | xx+= LCD_WIDTH/LETTERS_ON_SCREEN; |
316 | } | 316 | } |
@@ -399,9 +399,9 @@ static int loopit(void) | |||
399 | for(i=0, yy=y, xx=x; | 399 | for(i=0, yy=y, xx=x; |
400 | i<rocklen; | 400 | i<rocklen; |
401 | i++, yy+=values[NUM_YDIST].num, xx+=values[NUM_XDIST].num) | 401 | i++, yy+=values[NUM_YDIST].num, xx+=values[NUM_XDIST].num) |
402 | rb->lcd_bitmap((char *)char_gen_12x16[rock[i]-0x20], | 402 | rb->lcd_mono_bitmap((char *)char_gen_12x16[rock[i]-0x20], |
403 | xtable[xx&(TABLE_SIZE-1)], table[yy&(TABLE_SIZE-1)], | 403 | xtable[xx&(TABLE_SIZE-1)], |
404 | 11, 16); | 404 | table[yy&(TABLE_SIZE-1)], 11, 16); |
405 | rb->lcd_update(); | 405 | rb->lcd_update(); |
406 | rb->lcd_set_drawmode(DRMODE_SOLID); | 406 | rb->lcd_set_drawmode(DRMODE_SOLID); |
407 | 407 | ||
diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c index 1c394df9de..d81b71ee44 100644 --- a/apps/plugins/chessclock.c +++ b/apps/plugins/chessclock.c | |||
@@ -215,7 +215,7 @@ static void show_pause_mode(bool enabled) | |||
215 | static const char pause_icon[] = {0x00,0x7f,0x7f,0x00,0x7f,0x7f,0x00}; | 215 | static const char pause_icon[] = {0x00,0x7f,0x7f,0x00,0x7f,0x7f,0x00}; |
216 | 216 | ||
217 | if (enabled) | 217 | if (enabled) |
218 | rb->lcd_bitmap(pause_icon, 52, 0, 7, 8); | 218 | rb->lcd_mono_bitmap(pause_icon, 52, 0, 7, 8); |
219 | else | 219 | else |
220 | { | 220 | { |
221 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 221 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c index fab5eab102..e990742c9f 100644 --- a/apps/plugins/chip8.c +++ b/apps/plugins/chip8.c | |||
@@ -1062,7 +1062,7 @@ static void chip8_update_display(void) | |||
1062 | } | 1062 | } |
1063 | #ifdef SIMULATOR | 1063 | #ifdef SIMULATOR |
1064 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1064 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1065 | rb->lcd_bitmap(lcd_framebuf[0], CHIP8_X, CHIP8_Y, CHIP8_LCDWIDTH, CHIP8_HEIGHT); | 1065 | rb->lcd_mono_bitmap(lcd_framebuf[0], CHIP8_X, CHIP8_Y, CHIP8_LCDWIDTH, CHIP8_HEIGHT); |
1066 | rb->lcd_update(); | 1066 | rb->lcd_update(); |
1067 | #else | 1067 | #else |
1068 | rb->lcd_blit(lcd_framebuf[0], CHIP8_X, CHIP8_Y>>3, CHIP8_LCDWIDTH, CHIP8_HEIGHT>>3 | 1068 | rb->lcd_blit(lcd_framebuf[0], CHIP8_X, CHIP8_Y>>3, CHIP8_LCDWIDTH, CHIP8_HEIGHT>>3 |
diff --git a/apps/plugins/clock.c b/apps/plugins/clock.c index bddda15f5f..6830c74d53 100644 --- a/apps/plugins/clock.c +++ b/apps/plugins/clock.c | |||
@@ -788,9 +788,9 @@ bool colon, bool lcd) | |||
788 | if(settings.digital_12h) | 788 | if(settings.digital_12h) |
789 | { | 789 | { |
790 | if(hour > 12) | 790 | if(hour > 12) |
791 | rb->lcd_bitmap(pm, 97, 55, 15, 8); | 791 | rb->lcd_mono_bitmap(pm, 97, 55, 15, 8); |
792 | else | 792 | else |
793 | rb->lcd_bitmap(am, 1, 55, 15, 8); | 793 | rb->lcd_mono_bitmap(am, 1, 55, 15, 8); |
794 | } | 794 | } |
795 | } | 795 | } |
796 | else | 796 | else |
@@ -798,9 +798,9 @@ bool colon, bool lcd) | |||
798 | if(settings.lcd_12h) | 798 | if(settings.lcd_12h) |
799 | { | 799 | { |
800 | if(hour > 12) | 800 | if(hour > 12) |
801 | rb->lcd_bitmap(pm, 97, 55, 15, 8); | 801 | rb->lcd_mono_bitmap(pm, 97, 55, 15, 8); |
802 | else | 802 | else |
803 | rb->lcd_bitmap(am, 1, 55, 15, 8); | 803 | rb->lcd_mono_bitmap(am, 1, 55, 15, 8); |
804 | } | 804 | } |
805 | } | 805 | } |
806 | 806 | ||
@@ -881,138 +881,138 @@ void binary(int hour, int minute, int second) | |||
881 | *****/ | 881 | *****/ |
882 | if(temphour >= 32) | 882 | if(temphour >= 32) |
883 | { | 883 | { |
884 | rb->lcd_bitmap(bitmap_1, 0, 1, 15, 20); | 884 | rb->lcd_mono_bitmap(bitmap_1, 0, 1, 15, 20); |
885 | temphour -= 32; | 885 | temphour -= 32; |
886 | } | 886 | } |
887 | else | 887 | else |
888 | rb->lcd_bitmap(bitmap_0, 0, 1, 15, 20); | 888 | rb->lcd_mono_bitmap(bitmap_0, 0, 1, 15, 20); |
889 | if(temphour >= 16) | 889 | if(temphour >= 16) |
890 | { | 890 | { |
891 | rb->lcd_bitmap(bitmap_1, 19, 1, 15, 20); | 891 | rb->lcd_mono_bitmap(bitmap_1, 19, 1, 15, 20); |
892 | temphour -= 16; | 892 | temphour -= 16; |
893 | } | 893 | } |
894 | else | 894 | else |
895 | rb->lcd_bitmap(bitmap_0, 19, 1, 15, 20); | 895 | rb->lcd_mono_bitmap(bitmap_0, 19, 1, 15, 20); |
896 | if(temphour >= 8) | 896 | if(temphour >= 8) |
897 | { | 897 | { |
898 | rb->lcd_bitmap(bitmap_1, 38, 1, 15, 20); | 898 | rb->lcd_mono_bitmap(bitmap_1, 38, 1, 15, 20); |
899 | temphour -= 8; | 899 | temphour -= 8; |
900 | } | 900 | } |
901 | else | 901 | else |
902 | rb->lcd_bitmap(bitmap_0, 38, 1, 15, 20); | 902 | rb->lcd_mono_bitmap(bitmap_0, 38, 1, 15, 20); |
903 | if(temphour >= 4) | 903 | if(temphour >= 4) |
904 | { | 904 | { |
905 | rb->lcd_bitmap(bitmap_1, 57, 1, 15, 20); | 905 | rb->lcd_mono_bitmap(bitmap_1, 57, 1, 15, 20); |
906 | temphour -= 4; | 906 | temphour -= 4; |
907 | } | 907 | } |
908 | else | 908 | else |
909 | rb->lcd_bitmap(bitmap_0, 57, 1, 15, 20); | 909 | rb->lcd_mono_bitmap(bitmap_0, 57, 1, 15, 20); |
910 | if(temphour >= 2) | 910 | if(temphour >= 2) |
911 | { | 911 | { |
912 | rb->lcd_bitmap(bitmap_1, 76, 1, 15, 20); | 912 | rb->lcd_mono_bitmap(bitmap_1, 76, 1, 15, 20); |
913 | temphour -= 2; | 913 | temphour -= 2; |
914 | } | 914 | } |
915 | else | 915 | else |
916 | rb->lcd_bitmap(bitmap_0, 76, 1, 15, 20); | 916 | rb->lcd_mono_bitmap(bitmap_0, 76, 1, 15, 20); |
917 | if(temphour >= 1) | 917 | if(temphour >= 1) |
918 | { | 918 | { |
919 | rb->lcd_bitmap(bitmap_1, 95, 1, 15, 20); | 919 | rb->lcd_mono_bitmap(bitmap_1, 95, 1, 15, 20); |
920 | temphour -= 1; | 920 | temphour -= 1; |
921 | } | 921 | } |
922 | else | 922 | else |
923 | rb->lcd_bitmap(bitmap_0, 95, 1, 15, 20); | 923 | rb->lcd_mono_bitmap(bitmap_0, 95, 1, 15, 20); |
924 | 924 | ||
925 | /********* | 925 | /********* |
926 | * MINUTES | 926 | * MINUTES |
927 | ********/ | 927 | ********/ |
928 | if(tempmin >= 32) | 928 | if(tempmin >= 32) |
929 | { | 929 | { |
930 | rb->lcd_bitmap(bitmap_1, 0, 21, 15, 20); | 930 | rb->lcd_mono_bitmap(bitmap_1, 0, 21, 15, 20); |
931 | tempmin -= 32; | 931 | tempmin -= 32; |
932 | } | 932 | } |
933 | else | 933 | else |
934 | rb->lcd_bitmap(bitmap_0, 0, 21, 15, 20); | 934 | rb->lcd_mono_bitmap(bitmap_0, 0, 21, 15, 20); |
935 | if(tempmin >= 16) | 935 | if(tempmin >= 16) |
936 | { | 936 | { |
937 | rb->lcd_bitmap(bitmap_1, 19, 21, 15, 20); | 937 | rb->lcd_mono_bitmap(bitmap_1, 19, 21, 15, 20); |
938 | tempmin -= 16; | 938 | tempmin -= 16; |
939 | } | 939 | } |
940 | else | 940 | else |
941 | rb->lcd_bitmap(bitmap_0, 19, 21, 15, 20); | 941 | rb->lcd_mono_bitmap(bitmap_0, 19, 21, 15, 20); |
942 | if(tempmin >= 8) | 942 | if(tempmin >= 8) |
943 | { | 943 | { |
944 | rb->lcd_bitmap(bitmap_1, 38, 21, 15, 20); | 944 | rb->lcd_mono_bitmap(bitmap_1, 38, 21, 15, 20); |
945 | tempmin -= 8; | 945 | tempmin -= 8; |
946 | } | 946 | } |
947 | else | 947 | else |
948 | rb->lcd_bitmap(bitmap_0, 38, 21, 15, 20); | 948 | rb->lcd_mono_bitmap(bitmap_0, 38, 21, 15, 20); |
949 | if(tempmin >= 4) | 949 | if(tempmin >= 4) |
950 | { | 950 | { |
951 | rb->lcd_bitmap(bitmap_1, 57, 21, 15, 20); | 951 | rb->lcd_mono_bitmap(bitmap_1, 57, 21, 15, 20); |
952 | tempmin -= 4; | 952 | tempmin -= 4; |
953 | } | 953 | } |
954 | else | 954 | else |
955 | rb->lcd_bitmap(bitmap_0, 57, 21, 15, 20); | 955 | rb->lcd_mono_bitmap(bitmap_0, 57, 21, 15, 20); |
956 | if(tempmin >= 2) | 956 | if(tempmin >= 2) |
957 | { | 957 | { |
958 | rb->lcd_bitmap(bitmap_1, 76, 21, 15, 20); | 958 | rb->lcd_mono_bitmap(bitmap_1, 76, 21, 15, 20); |
959 | tempmin -= 2; | 959 | tempmin -= 2; |
960 | } | 960 | } |
961 | else | 961 | else |
962 | rb->lcd_bitmap(bitmap_0, 76, 21, 15, 20); | 962 | rb->lcd_mono_bitmap(bitmap_0, 76, 21, 15, 20); |
963 | if(tempmin >= 1) | 963 | if(tempmin >= 1) |
964 | { | 964 | { |
965 | rb->lcd_bitmap(bitmap_1, 95, 21, 15, 20); | 965 | rb->lcd_mono_bitmap(bitmap_1, 95, 21, 15, 20); |
966 | tempmin -= 1; | 966 | tempmin -= 1; |
967 | } | 967 | } |
968 | else | 968 | else |
969 | rb->lcd_bitmap(bitmap_0, 95, 21, 15, 20); | 969 | rb->lcd_mono_bitmap(bitmap_0, 95, 21, 15, 20); |
970 | 970 | ||
971 | /********* | 971 | /********* |
972 | * SECONDS | 972 | * SECONDS |
973 | ********/ | 973 | ********/ |
974 | if(tempsec >= 32) | 974 | if(tempsec >= 32) |
975 | { | 975 | { |
976 | rb->lcd_bitmap(bitmap_1, 0, 42, 15, 20); | 976 | rb->lcd_mono_bitmap(bitmap_1, 0, 42, 15, 20); |
977 | tempsec -= 32; | 977 | tempsec -= 32; |
978 | } | 978 | } |
979 | else | 979 | else |
980 | rb->lcd_bitmap(bitmap_0, 0, 42, 15, 20); | 980 | rb->lcd_mono_bitmap(bitmap_0, 0, 42, 15, 20); |
981 | if(tempsec >= 16) | 981 | if(tempsec >= 16) |
982 | { | 982 | { |
983 | rb->lcd_bitmap(bitmap_1, 19, 42, 15, 20); | 983 | rb->lcd_mono_bitmap(bitmap_1, 19, 42, 15, 20); |
984 | tempsec -= 16; | 984 | tempsec -= 16; |
985 | } | 985 | } |
986 | else | 986 | else |
987 | rb->lcd_bitmap(bitmap_0, 19, 42, 15, 20); | 987 | rb->lcd_mono_bitmap(bitmap_0, 19, 42, 15, 20); |
988 | if(tempsec >= 8) | 988 | if(tempsec >= 8) |
989 | { | 989 | { |
990 | rb->lcd_bitmap(bitmap_1, 38, 42, 15, 20); | 990 | rb->lcd_mono_bitmap(bitmap_1, 38, 42, 15, 20); |
991 | tempsec -= 8; | 991 | tempsec -= 8; |
992 | } | 992 | } |
993 | else | 993 | else |
994 | rb->lcd_bitmap(bitmap_0, 38, 42, 15, 20); | 994 | rb->lcd_mono_bitmap(bitmap_0, 38, 42, 15, 20); |
995 | if(tempsec >= 4) | 995 | if(tempsec >= 4) |
996 | { | 996 | { |
997 | rb->lcd_bitmap(bitmap_1, 57, 42, 15, 20); | 997 | rb->lcd_mono_bitmap(bitmap_1, 57, 42, 15, 20); |
998 | tempsec -= 4; | 998 | tempsec -= 4; |
999 | } | 999 | } |
1000 | else | 1000 | else |
1001 | rb->lcd_bitmap(bitmap_0, 57, 42, 15, 20); | 1001 | rb->lcd_mono_bitmap(bitmap_0, 57, 42, 15, 20); |
1002 | if(tempsec >= 2) | 1002 | if(tempsec >= 2) |
1003 | { | 1003 | { |
1004 | rb->lcd_bitmap(bitmap_1, 76, 42, 15, 20); | 1004 | rb->lcd_mono_bitmap(bitmap_1, 76, 42, 15, 20); |
1005 | tempsec -= 2; | 1005 | tempsec -= 2; |
1006 | } | 1006 | } |
1007 | else | 1007 | else |
1008 | rb->lcd_bitmap(bitmap_0, 76, 42, 15, 20); | 1008 | rb->lcd_mono_bitmap(bitmap_0, 76, 42, 15, 20); |
1009 | if(tempsec >= 1) | 1009 | if(tempsec >= 1) |
1010 | { | 1010 | { |
1011 | rb->lcd_bitmap(bitmap_1, 95, 42, 15, 20); | 1011 | rb->lcd_mono_bitmap(bitmap_1, 95, 42, 15, 20); |
1012 | tempsec -= 1; | 1012 | tempsec -= 1; |
1013 | } | 1013 | } |
1014 | else | 1014 | else |
1015 | rb->lcd_bitmap(bitmap_0, 95, 42, 15, 20); | 1015 | rb->lcd_mono_bitmap(bitmap_0, 95, 42, 15, 20); |
1016 | 1016 | ||
1017 | rb->lcd_update(); | 1017 | rb->lcd_update(); |
1018 | } | 1018 | } |
@@ -1039,7 +1039,7 @@ void show_logo(bool animate, bool show_clock_text) | |||
1039 | rb->lcd_drawline(0, y_position/2-1, 111, y_position/2-1); | 1039 | rb->lcd_drawline(0, y_position/2-1, 111, y_position/2-1); |
1040 | rb->lcd_drawline(0, y_position/2+38, 111, y_position/2+38); | 1040 | rb->lcd_drawline(0, y_position/2+38, 111, y_position/2+38); |
1041 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1041 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1042 | rb->lcd_bitmap(clogo, 0, y_position/2, 112, 37); | 1042 | rb->lcd_mono_bitmap(clogo, 0, y_position/2, 112, 37); |
1043 | if(show_clock_text) | 1043 | if(show_clock_text) |
1044 | rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 48, buf); | 1044 | rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 48, buf); |
1045 | rb->lcd_update(); | 1045 | rb->lcd_update(); |
@@ -1051,7 +1051,7 @@ void show_logo(bool animate, bool show_clock_text) | |||
1051 | rb->lcd_drawline(0, y_position/2-1, 111, y_position/2-1); | 1051 | rb->lcd_drawline(0, y_position/2-1, 111, y_position/2-1); |
1052 | rb->lcd_drawline(0, y_position/2+38, 111, y_position/2+38); | 1052 | rb->lcd_drawline(0, y_position/2+38, 111, y_position/2+38); |
1053 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1053 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1054 | rb->lcd_bitmap(clogo, 0, y_position/2, 112, 37); | 1054 | rb->lcd_mono_bitmap(clogo, 0, y_position/2, 112, 37); |
1055 | if(show_clock_text) | 1055 | if(show_clock_text) |
1056 | rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 48, buf); | 1056 | rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 48, buf); |
1057 | rb->lcd_update(); | 1057 | rb->lcd_update(); |
@@ -1063,7 +1063,7 @@ void show_logo(bool animate, bool show_clock_text) | |||
1063 | rb->lcd_drawline(0, y_position/2-1, 111, y_position/2-1); | 1063 | rb->lcd_drawline(0, y_position/2-1, 111, y_position/2-1); |
1064 | rb->lcd_drawline(0, y_position/2+38, 111, y_position/2+38); | 1064 | rb->lcd_drawline(0, y_position/2+38, 111, y_position/2+38); |
1065 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1065 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1066 | rb->lcd_bitmap(clogo, 0, y_position/2, 112, 37); | 1066 | rb->lcd_mono_bitmap(clogo, 0, y_position/2, 112, 37); |
1067 | if(show_clock_text) | 1067 | if(show_clock_text) |
1068 | rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 48, buf); | 1068 | rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 48, buf); |
1069 | rb->lcd_update(); | 1069 | rb->lcd_update(); |
@@ -1071,7 +1071,7 @@ void show_logo(bool animate, bool show_clock_text) | |||
1071 | } | 1071 | } |
1072 | else /* don't animate, just show */ | 1072 | else /* don't animate, just show */ |
1073 | { | 1073 | { |
1074 | rb->lcd_bitmap(clogo, 0, 10, 112, 37); | 1074 | rb->lcd_mono_bitmap(clogo, 0, 10, 112, 37); |
1075 | if(show_clock_text) | 1075 | if(show_clock_text) |
1076 | rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 48, buf); | 1076 | rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 48, buf); |
1077 | rb->lcd_update(); | 1077 | rb->lcd_update(); |
@@ -1094,7 +1094,7 @@ void exit_logo(void) | |||
1094 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 1094 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
1095 | rb->lcd_drawline(0, y_position/2-1, 111, y_position/2-1); | 1095 | rb->lcd_drawline(0, y_position/2-1, 111, y_position/2-1); |
1096 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1096 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1097 | rb->lcd_bitmap(clogo, 0, y_position/2, 112, 37); | 1097 | rb->lcd_mono_bitmap(clogo, 0, y_position/2, 112, 37); |
1098 | rb->lcd_update(); | 1098 | rb->lcd_update(); |
1099 | } | 1099 | } |
1100 | } | 1100 | } |
@@ -1511,9 +1511,9 @@ bool f1_screen(void) | |||
1511 | void draw_checkbox(bool setting, int x, int y) | 1511 | void draw_checkbox(bool setting, int x, int y) |
1512 | { | 1512 | { |
1513 | if(setting) /* checkbox is on */ | 1513 | if(setting) /* checkbox is on */ |
1514 | rb->lcd_bitmap(checkbox_full, x, y, 8, 6); | 1514 | rb->lcd_mono_bitmap(checkbox_full, x, y, 8, 6); |
1515 | else /* checkbox is off */ | 1515 | else /* checkbox is off */ |
1516 | rb->lcd_bitmap(checkbox_empty, x, y, 8, 6); | 1516 | rb->lcd_mono_bitmap(checkbox_empty, x, y, 8, 6); |
1517 | } | 1517 | } |
1518 | 1518 | ||
1519 | void draw_settings(void) | 1519 | void draw_settings(void) |
@@ -1544,18 +1544,18 @@ void draw_settings(void) | |||
1544 | draw_checkbox(settings.analog_digits, 1, 33); | 1544 | draw_checkbox(settings.analog_digits, 1, 33); |
1545 | 1545 | ||
1546 | if(settings.analog_date == 0) | 1546 | if(settings.analog_date == 0) |
1547 | rb->lcd_bitmap(checkbox_empty, 1, 41, 8, 6); | 1547 | rb->lcd_mono_bitmap(checkbox_empty, 1, 41, 8, 6); |
1548 | else if(settings.analog_date == 1) | 1548 | else if(settings.analog_date == 1) |
1549 | rb->lcd_bitmap(checkbox_half, 1, 41, 8, 6); | 1549 | rb->lcd_mono_bitmap(checkbox_half, 1, 41, 8, 6); |
1550 | else | 1550 | else |
1551 | rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6); | 1551 | rb->lcd_mono_bitmap(checkbox_full, 1, 41, 8, 6); |
1552 | 1552 | ||
1553 | if(settings.analog_time == 0) | 1553 | if(settings.analog_time == 0) |
1554 | rb->lcd_bitmap(checkbox_empty, 1, 49, 8, 6); | 1554 | rb->lcd_mono_bitmap(checkbox_empty, 1, 49, 8, 6); |
1555 | else if(settings.analog_time == 1) | 1555 | else if(settings.analog_time == 1) |
1556 | rb->lcd_bitmap(checkbox_half, 1, 49, 8, 6); | 1556 | rb->lcd_mono_bitmap(checkbox_half, 1, 49, 8, 6); |
1557 | else | 1557 | else |
1558 | rb->lcd_bitmap(checkbox_full, 1, 49, 8, 6); | 1558 | rb->lcd_mono_bitmap(checkbox_full, 1, 49, 8, 6); |
1559 | 1559 | ||
1560 | draw_checkbox(settings.analog_secondhand, 1, 57); | 1560 | draw_checkbox(settings.analog_secondhand, 1, 57); |
1561 | } | 1561 | } |
@@ -1584,20 +1584,20 @@ void draw_settings(void) | |||
1584 | 1584 | ||
1585 | /* Draw checkboxes */ | 1585 | /* Draw checkboxes */ |
1586 | if(settings.digital_date == 0) | 1586 | if(settings.digital_date == 0) |
1587 | rb->lcd_bitmap(checkbox_empty, 1, 33, 8, 6); | 1587 | rb->lcd_mono_bitmap(checkbox_empty, 1, 33, 8, 6); |
1588 | else if(settings.digital_date == 1) | 1588 | else if(settings.digital_date == 1) |
1589 | rb->lcd_bitmap(checkbox_half, 1, 33, 8, 6); | 1589 | rb->lcd_mono_bitmap(checkbox_half, 1, 33, 8, 6); |
1590 | else | 1590 | else |
1591 | rb->lcd_bitmap(checkbox_full, 1, 33, 8, 6); | 1591 | rb->lcd_mono_bitmap(checkbox_full, 1, 33, 8, 6); |
1592 | 1592 | ||
1593 | if(settings.digital_seconds == 0) | 1593 | if(settings.digital_seconds == 0) |
1594 | rb->lcd_bitmap(checkbox_empty, 1, 41, 8, 6); | 1594 | rb->lcd_mono_bitmap(checkbox_empty, 1, 41, 8, 6); |
1595 | else if(settings.digital_seconds == 1) | 1595 | else if(settings.digital_seconds == 1) |
1596 | rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6); | 1596 | rb->lcd_mono_bitmap(checkbox_onethird, 1, 41, 8, 6); |
1597 | else if(settings.digital_seconds == 2) | 1597 | else if(settings.digital_seconds == 2) |
1598 | rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6); | 1598 | rb->lcd_mono_bitmap(checkbox_twothird, 1, 41, 8, 6); |
1599 | else | 1599 | else |
1600 | rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6); | 1600 | rb->lcd_mono_bitmap(checkbox_full, 1, 41, 8, 6); |
1601 | 1601 | ||
1602 | draw_checkbox(settings.digital_blinkcolon, 1, 49); | 1602 | draw_checkbox(settings.digital_blinkcolon, 1, 49); |
1603 | draw_checkbox(settings.digital_12h, 1, 57); | 1603 | draw_checkbox(settings.digital_12h, 1, 57); |
@@ -1627,20 +1627,20 @@ void draw_settings(void) | |||
1627 | 1627 | ||
1628 | /* Draw checkboxes */ | 1628 | /* Draw checkboxes */ |
1629 | if(settings.lcd_date == 0) | 1629 | if(settings.lcd_date == 0) |
1630 | rb->lcd_bitmap(checkbox_empty, 1, 33, 8, 6); | 1630 | rb->lcd_mono_bitmap(checkbox_empty, 1, 33, 8, 6); |
1631 | else if(settings.lcd_date == 1) | 1631 | else if(settings.lcd_date == 1) |
1632 | rb->lcd_bitmap(checkbox_half, 1, 33, 8, 6); | 1632 | rb->lcd_mono_bitmap(checkbox_half, 1, 33, 8, 6); |
1633 | else | 1633 | else |
1634 | rb->lcd_bitmap(checkbox_full, 1, 33, 8, 6); | 1634 | rb->lcd_mono_bitmap(checkbox_full, 1, 33, 8, 6); |
1635 | 1635 | ||
1636 | if(settings.lcd_seconds == 0) | 1636 | if(settings.lcd_seconds == 0) |
1637 | rb->lcd_bitmap(checkbox_empty, 1, 41, 8, 6); | 1637 | rb->lcd_mono_bitmap(checkbox_empty, 1, 41, 8, 6); |
1638 | else if(settings.lcd_seconds == 1) | 1638 | else if(settings.lcd_seconds == 1) |
1639 | rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6); | 1639 | rb->lcd_mono_bitmap(checkbox_onethird, 1, 41, 8, 6); |
1640 | else if(settings.lcd_seconds == 2) | 1640 | else if(settings.lcd_seconds == 2) |
1641 | rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6); | 1641 | rb->lcd_mono_bitmap(checkbox_twothird, 1, 41, 8, 6); |
1642 | else | 1642 | else |
1643 | rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6); | 1643 | rb->lcd_mono_bitmap(checkbox_full, 1, 41, 8, 6); |
1644 | 1644 | ||
1645 | draw_checkbox(settings.lcd_blinkcolon, 1, 49); | 1645 | draw_checkbox(settings.lcd_blinkcolon, 1, 49); |
1646 | draw_checkbox(settings.lcd_12h, 1, 57); | 1646 | draw_checkbox(settings.lcd_12h, 1, 57); |
@@ -2131,16 +2131,16 @@ void general_settings(void) | |||
2131 | rb->lcd_getstringsize(buf, &buf_w, &buf_h); | 2131 | rb->lcd_getstringsize(buf, &buf_w, &buf_h); |
2132 | rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 56, buf); | 2132 | rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 56, buf); |
2133 | 2133 | ||
2134 | rb->lcd_bitmap(arrow, 1, 17, 8, 6); | 2134 | rb->lcd_mono_bitmap(arrow, 1, 17, 8, 6); |
2135 | rb->lcd_bitmap(arrow, 1, 25, 8, 6); | 2135 | rb->lcd_mono_bitmap(arrow, 1, 25, 8, 6); |
2136 | draw_checkbox(settings.display_counter, 1, 33); | 2136 | draw_checkbox(settings.display_counter, 1, 33); |
2137 | 2137 | ||
2138 | if(settings.save_mode == 1) | 2138 | if(settings.save_mode == 1) |
2139 | rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6); | 2139 | rb->lcd_mono_bitmap(checkbox_onethird, 1, 41, 8, 6); |
2140 | else if(settings.save_mode == 2) | 2140 | else if(settings.save_mode == 2) |
2141 | rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6); | 2141 | rb->lcd_mono_bitmap(checkbox_twothird, 1, 41, 8, 6); |
2142 | else | 2142 | else |
2143 | rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6); | 2143 | rb->lcd_mono_bitmap(checkbox_full, 1, 41, 8, 6); |
2144 | 2144 | ||
2145 | switch(cursorpos) | 2145 | switch(cursorpos) |
2146 | { | 2146 | { |
@@ -2181,15 +2181,15 @@ void general_settings(void) | |||
2181 | rb->lcd_puts(2, 5, "Save: Automatic"); | 2181 | rb->lcd_puts(2, 5, "Save: Automatic"); |
2182 | else | 2182 | else |
2183 | rb->lcd_puts(2, 5, "Save: Manually"); | 2183 | rb->lcd_puts(2, 5, "Save: Manually"); |
2184 | rb->lcd_bitmap(arrow, 1, 17, 8, 6); | 2184 | rb->lcd_mono_bitmap(arrow, 1, 17, 8, 6); |
2185 | rb->lcd_bitmap(arrow, 1, 25, 8, 6); | 2185 | rb->lcd_mono_bitmap(arrow, 1, 25, 8, 6); |
2186 | draw_checkbox(settings.display_counter, 1, 33); | 2186 | draw_checkbox(settings.display_counter, 1, 33); |
2187 | if(settings.save_mode == 1) | 2187 | if(settings.save_mode == 1) |
2188 | rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6); | 2188 | rb->lcd_mono_bitmap(checkbox_onethird, 1, 41, 8, 6); |
2189 | else if(settings.save_mode == 2) | 2189 | else if(settings.save_mode == 2) |
2190 | rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6); | 2190 | rb->lcd_mono_bitmap(checkbox_twothird, 1, 41, 8, 6); |
2191 | else | 2191 | else |
2192 | rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6); | 2192 | rb->lcd_mono_bitmap(checkbox_full, 1, 41, 8, 6); |
2193 | 2193 | ||
2194 | cursor(0, cursor_y, 112, 8); | 2194 | cursor(0, cursor_y, 112, 8); |
2195 | rb->lcd_update(); | 2195 | rb->lcd_update(); |
@@ -2218,15 +2218,15 @@ void general_settings(void) | |||
2218 | rb->lcd_puts(2, 5, "Save: Automatic"); | 2218 | rb->lcd_puts(2, 5, "Save: Automatic"); |
2219 | else | 2219 | else |
2220 | rb->lcd_puts(2, 5, "Save: Manually"); | 2220 | rb->lcd_puts(2, 5, "Save: Manually"); |
2221 | rb->lcd_bitmap(arrow, 1, 17, 8, 6); | 2221 | rb->lcd_mono_bitmap(arrow, 1, 17, 8, 6); |
2222 | rb->lcd_bitmap(arrow, 1, 25, 8, 6); | 2222 | rb->lcd_mono_bitmap(arrow, 1, 25, 8, 6); |
2223 | draw_checkbox(settings.display_counter, 1, 33); | 2223 | draw_checkbox(settings.display_counter, 1, 33); |
2224 | if(settings.save_mode == 1) | 2224 | if(settings.save_mode == 1) |
2225 | rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6); | 2225 | rb->lcd_mono_bitmap(checkbox_onethird, 1, 41, 8, 6); |
2226 | else if(settings.save_mode == 2) | 2226 | else if(settings.save_mode == 2) |
2227 | rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6); | 2227 | rb->lcd_mono_bitmap(checkbox_twothird, 1, 41, 8, 6); |
2228 | else | 2228 | else |
2229 | rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6); | 2229 | rb->lcd_mono_bitmap(checkbox_full, 1, 41, 8, 6); |
2230 | 2230 | ||
2231 | cursor(0, cursor_y, 112, 8); | 2231 | cursor(0, cursor_y, 112, 8); |
2232 | rb->lcd_update(); | 2232 | rb->lcd_update(); |
@@ -2323,9 +2323,9 @@ void draw_extras(int year, int day, int month, int hour, int minute, int second) | |||
2323 | if(settings.analog_time == 2) | 2323 | if(settings.analog_time == 2) |
2324 | { | 2324 | { |
2325 | if(current_time->tm_hour > 12) /* PM */ | 2325 | if(current_time->tm_hour > 12) /* PM */ |
2326 | rb->lcd_bitmap(pm, 96, 1, 15, 8); | 2326 | rb->lcd_mono_bitmap(pm, 96, 1, 15, 8); |
2327 | else /* AM */ | 2327 | else /* AM */ |
2328 | rb->lcd_bitmap(am, 96, 1, 15, 8); | 2328 | rb->lcd_mono_bitmap(am, 96, 1, 15, 8); |
2329 | } | 2329 | } |
2330 | } | 2330 | } |
2331 | 2331 | ||
@@ -2460,11 +2460,11 @@ void select_mode(void) | |||
2460 | rb->lcd_puts(0, 7, "PLAY:Go|OFF:Cancel"); | 2460 | rb->lcd_puts(0, 7, "PLAY:Go|OFF:Cancel"); |
2461 | 2461 | ||
2462 | /* draw an arrow next to all of them */ | 2462 | /* draw an arrow next to all of them */ |
2463 | rb->lcd_bitmap(arrow, 1, 9, 8, 6); | 2463 | rb->lcd_mono_bitmap(arrow, 1, 9, 8, 6); |
2464 | rb->lcd_bitmap(arrow, 1, 17, 8, 6); | 2464 | rb->lcd_mono_bitmap(arrow, 1, 17, 8, 6); |
2465 | rb->lcd_bitmap(arrow, 1, 25, 8, 6); | 2465 | rb->lcd_mono_bitmap(arrow, 1, 25, 8, 6); |
2466 | rb->lcd_bitmap(arrow, 1, 33, 8, 6); | 2466 | rb->lcd_mono_bitmap(arrow, 1, 33, 8, 6); |
2467 | rb->lcd_bitmap(arrow, 1, 41, 8, 6); | 2467 | rb->lcd_mono_bitmap(arrow, 1, 41, 8, 6); |
2468 | 2468 | ||
2469 | /* draw line selector */ | 2469 | /* draw line selector */ |
2470 | switch(cursorpos) | 2470 | switch(cursorpos) |
@@ -2501,11 +2501,11 @@ void select_mode(void) | |||
2501 | rb->lcd_puts(0, 7, "PLAY:Go|OFF:Cancel"); | 2501 | rb->lcd_puts(0, 7, "PLAY:Go|OFF:Cancel"); |
2502 | 2502 | ||
2503 | /* draw an arrow next to all of them */ | 2503 | /* draw an arrow next to all of them */ |
2504 | rb->lcd_bitmap(arrow, 1, 9, 8, 6); | 2504 | rb->lcd_mono_bitmap(arrow, 1, 9, 8, 6); |
2505 | rb->lcd_bitmap(arrow, 1, 17, 8, 6); | 2505 | rb->lcd_mono_bitmap(arrow, 1, 17, 8, 6); |
2506 | rb->lcd_bitmap(arrow, 1, 25, 8, 6); | 2506 | rb->lcd_mono_bitmap(arrow, 1, 25, 8, 6); |
2507 | rb->lcd_bitmap(arrow, 1, 33, 8, 6); | 2507 | rb->lcd_mono_bitmap(arrow, 1, 33, 8, 6); |
2508 | rb->lcd_bitmap(arrow, 1, 41, 8, 6); | 2508 | rb->lcd_mono_bitmap(arrow, 1, 41, 8, 6); |
2509 | 2509 | ||
2510 | cursor(0, cursor_y, 112, 8); | 2510 | cursor(0, cursor_y, 112, 8); |
2511 | rb->lcd_update(); | 2511 | rb->lcd_update(); |
@@ -2535,11 +2535,11 @@ void select_mode(void) | |||
2535 | rb->lcd_puts(0, 7, "PLAY:Go|OFF:Cancel"); | 2535 | rb->lcd_puts(0, 7, "PLAY:Go|OFF:Cancel"); |
2536 | 2536 | ||
2537 | /* draw an arrow next to all of them */ | 2537 | /* draw an arrow next to all of them */ |
2538 | rb->lcd_bitmap(arrow, 1, 9, 8, 6); | 2538 | rb->lcd_mono_bitmap(arrow, 1, 9, 8, 6); |
2539 | rb->lcd_bitmap(arrow, 1, 17, 8, 6); | 2539 | rb->lcd_mono_bitmap(arrow, 1, 17, 8, 6); |
2540 | rb->lcd_bitmap(arrow, 1, 25, 8, 6); | 2540 | rb->lcd_mono_bitmap(arrow, 1, 25, 8, 6); |
2541 | rb->lcd_bitmap(arrow, 1, 33, 8, 6); | 2541 | rb->lcd_mono_bitmap(arrow, 1, 33, 8, 6); |
2542 | rb->lcd_bitmap(arrow, 1, 41, 8, 6); | 2542 | rb->lcd_mono_bitmap(arrow, 1, 41, 8, 6); |
2543 | 2543 | ||
2544 | cursor(0, cursor_y, 112, 8); | 2544 | cursor(0, cursor_y, 112, 8); |
2545 | rb->lcd_update(); | 2545 | rb->lcd_update(); |
@@ -2580,7 +2580,7 @@ void counter_finished(void) | |||
2580 | rb->lcd_clear_display(); | 2580 | rb->lcd_clear_display(); |
2581 | 2581 | ||
2582 | /* draw "TIME'S UP" text */ | 2582 | /* draw "TIME'S UP" text */ |
2583 | rb->lcd_bitmap(times_up, 0, xpos, 112, 50); | 2583 | rb->lcd_mono_bitmap(times_up, 0, xpos, 112, 50); |
2584 | 2584 | ||
2585 | /* invert lcd */ | 2585 | /* invert lcd */ |
2586 | rb->lcd_set_drawmode(DRMODE_COMPLEMENT); | 2586 | rb->lcd_set_drawmode(DRMODE_COMPLEMENT); |
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c index d8d8eeb2ec..36411c2978 100644 --- a/apps/plugins/flipit.c +++ b/apps/plugins/flipit.c | |||
@@ -72,9 +72,9 @@ static unsigned char cursor_pic[32] = { | |||
72 | /* draw a spot at the coordinates (x,y), range of p is 0-19 */ | 72 | /* draw a spot at the coordinates (x,y), range of p is 0-19 */ |
73 | static void draw_spot(int p) { | 73 | static void draw_spot(int p) { |
74 | ptr = spot_pic[spots[p]]; | 74 | ptr = spot_pic[spots[p]]; |
75 | rb->lcd_bitmap (ptr, (p%5)*16+1, (p/5)*16+1, 14, 8); | 75 | rb->lcd_mono_bitmap (ptr, (p%5)*16+1, (p/5)*16+1, 14, 8); |
76 | ptr += 14; | 76 | ptr += 14; |
77 | rb->lcd_bitmap (ptr, (p%5)*16+1, (p/5)*16+9, 14, 6); | 77 | rb->lcd_mono_bitmap (ptr, (p%5)*16+1, (p/5)*16+9, 14, 6); |
78 | } | 78 | } |
79 | 79 | ||
80 | /* draw the cursor at the current cursor position */ | 80 | /* draw the cursor at the current cursor position */ |
@@ -84,9 +84,9 @@ static void draw_cursor(void) { | |||
84 | j = (cursor_pos/5)*16; | 84 | j = (cursor_pos/5)*16; |
85 | rb->lcd_set_drawmode(DRMODE_FG); | 85 | rb->lcd_set_drawmode(DRMODE_FG); |
86 | ptr = cursor_pic; | 86 | ptr = cursor_pic; |
87 | rb->lcd_bitmap (ptr, i, j, 16, 8); | 87 | rb->lcd_mono_bitmap (ptr, i, j, 16, 8); |
88 | ptr += 16; | 88 | ptr += 16; |
89 | rb->lcd_bitmap (ptr, i, j+8, 16, 8); | 89 | rb->lcd_mono_bitmap (ptr, i, j+8, 16, 8); |
90 | rb->lcd_set_drawmode(DRMODE_SOLID); | 90 | rb->lcd_set_drawmode(DRMODE_SOLID); |
91 | } | 91 | } |
92 | 92 | ||
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c index 08e0266a75..ad8b8fd025 100644 --- a/apps/plugins/logo.c +++ b/apps/plugins/logo.c | |||
@@ -230,7 +230,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { | |||
230 | while (1) { | 230 | while (1) { |
231 | #ifdef HAVE_LCD_BITMAP | 231 | #ifdef HAVE_LCD_BITMAP |
232 | rb->lcd_clear_display(); | 232 | rb->lcd_clear_display(); |
233 | rb->lcd_bitmap(LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT); | 233 | rb->lcd_mono_bitmap(LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT); |
234 | #ifdef REMOTE_LOGO | 234 | #ifdef REMOTE_LOGO |
235 | rb->lcd_remote_clear_display(); | 235 | rb->lcd_remote_clear_display(); |
236 | rb->lcd_remote_bitmap(REMOTE_LOGO, | 236 | rb->lcd_remote_bitmap(REMOTE_LOGO, |
diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c index 907aaf71b3..aec9ba166b 100644 --- a/apps/plugins/minesweeper.c +++ b/apps/plugins/minesweeper.c | |||
@@ -381,7 +381,7 @@ int minesweeper(void) | |||
381 | rb->lcd_putsxy(j*8+1,i*8+1,"b"); | 381 | rb->lcd_putsxy(j*8+1,i*8+1,"b"); |
382 | } else if(minefield[i][j].neighbors){ | 382 | } else if(minefield[i][j].neighbors){ |
383 | rb->lcd_set_drawmode(DRMODE_FG); | 383 | rb->lcd_set_drawmode(DRMODE_FG); |
384 | rb->lcd_bitmap(num[minefield[i][j].neighbors],j*8,i*8,8,8); | 384 | rb->lcd_mono_bitmap(num[minefield[i][j].neighbors],j*8,i*8,8,8); |
385 | rb->lcd_set_drawmode(DRMODE_SOLID); | 385 | rb->lcd_set_drawmode(DRMODE_SOLID); |
386 | } | 386 | } |
387 | } else if(minefield[i][j].flag) { | 387 | } else if(minefield[i][j].flag) { |
diff --git a/apps/plugins/rockboy/lcd-gb.h b/apps/plugins/rockboy/lcd-gb.h index 3a612887e5..0b863b6eea 100644 --- a/apps/plugins/rockboy/lcd-gb.h +++ b/apps/plugins/rockboy/lcd-gb.h | |||
@@ -16,7 +16,7 @@ struct scan | |||
16 | { | 16 | { |
17 | int bg[64]; | 17 | int bg[64]; |
18 | int wnd[64]; | 18 | int wnd[64]; |
19 | #ifdef GRAYSCALE | 19 | #if LCD_DEPTH == 2 |
20 | byte buf[4][256]; | 20 | byte buf[4][256]; |
21 | #else | 21 | #else |
22 | byte buf[8][256]; | 22 | byte buf[8][256]; |
diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c index 651c82286f..9a7ead798f 100644 --- a/apps/plugins/rockboy/lcd.c +++ b/apps/plugins/rockboy/lcd.c | |||
@@ -786,7 +786,7 @@ void lcd_refreshline(void) | |||
786 | recolor(BUF+WX, 0x04, 160-WX); | 786 | recolor(BUF+WX, 0x04, 160-WX); |
787 | } | 787 | } |
788 | spr_scan(); | 788 | spr_scan(); |
789 | #ifdef GRAYSCALE | 789 | #if LCD_DEPTH == 2 |
790 | if (scanline_ind == 3) | 790 | if (scanline_ind == 3) |
791 | #else | 791 | #else |
792 | if (scanline_ind == 7) | 792 | if (scanline_ind == 7) |
@@ -800,7 +800,7 @@ void lcd_refreshline(void) | |||
800 | #if LCD_HEIGHT == 64 | 800 | #if LCD_HEIGHT == 64 |
801 | scanline_ind = (scanline_ind+1) % 8; | 801 | scanline_ind = (scanline_ind+1) % 8; |
802 | #else | 802 | #else |
803 | #ifdef GRAYSCALE | 803 | #if LCD_DEPTH == 2 |
804 | scanline_ind = (scanline_ind+1) % 4; | 804 | scanline_ind = (scanline_ind+1) % 4; |
805 | #else | 805 | #else |
806 | scanline_ind = (scanline_ind+1) % 8; | 806 | scanline_ind = (scanline_ind+1) % 8; |
diff --git a/apps/plugins/rockboy/sys_rockbox.c b/apps/plugins/rockboy/sys_rockbox.c index 45608b9f36..e8a4923eee 100644 --- a/apps/plugins/rockboy/sys_rockbox.c +++ b/apps/plugins/rockboy/sys_rockbox.c | |||
@@ -245,21 +245,21 @@ void vid_update(int scanline) | |||
245 | scanline-=16; | 245 | scanline-=16; |
246 | else if (fb.mode==2) | 246 | else if (fb.mode==2) |
247 | scanline-=8; | 247 | scanline-=8; |
248 | #ifdef GRAYSCALE | 248 | #if LCD_DEPTH == 2 |
249 | scanline_remapped = scanline / 4; | 249 | scanline_remapped = scanline / 4; |
250 | #else | 250 | #else |
251 | scanline_remapped = scanline / 8; | 251 | scanline_remapped = scanline / 8; |
252 | #endif | 252 | #endif |
253 | frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH; | 253 | frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH; |
254 | while (cnt < 160) { | 254 | while (cnt < 160) { |
255 | #ifdef GRAYSCALE | 255 | #if LCD_DEPTH == 2 |
256 | *(frameb++) = (scan.buf[0][cnt]&0x3) | | 256 | *(frameb++) = (scan.buf[0][cnt]&0x3) | |
257 | ((scan.buf[1][cnt]&0x3)<<2) | | 257 | ((scan.buf[1][cnt]&0x3)<<2) | |
258 | ((scan.buf[2][cnt]&0x3)<<4) | | 258 | ((scan.buf[2][cnt]&0x3)<<4) | |
259 | ((scan.buf[3][cnt]&0x3)<<6); | 259 | ((scan.buf[3][cnt]&0x3)<<6); |
260 | cnt++; | 260 | cnt++; |
261 | } | 261 | } |
262 | rb->lcd_update_rect(0, scanline & ~3, LCD_WIDTH, 4); //8); | 262 | rb->lcd_update_rect(0, scanline & ~3, LCD_WIDTH, 4); |
263 | #else | 263 | #else |
264 | register unsigned scrbyte = 0; | 264 | register unsigned scrbyte = 0; |
265 | if (scan.buf[0][cnt] & 0x02) scrbyte |= 0x01; | 265 | if (scan.buf[0][cnt] & 0x02) scrbyte |= 0x01; |
@@ -274,7 +274,7 @@ void vid_update(int scanline) | |||
274 | cnt++; | 274 | cnt++; |
275 | } | 275 | } |
276 | rb->lcd_update_rect(0, scanline & ~7, LCD_WIDTH, 8); | 276 | rb->lcd_update_rect(0, scanline & ~7, LCD_WIDTH, 8); |
277 | #endif /* GRAYSCALE */ | 277 | #endif /* LCD_DEPTH */ |
278 | #endif /* LCD_HEIGHT */ | 278 | #endif /* LCD_HEIGHT */ |
279 | } | 279 | } |
280 | 280 | ||
diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c index 3b9fe01bc8..acd66a033a 100644 --- a/apps/plugins/sliding_puzzle.c +++ b/apps/plugins/sliding_puzzle.c | |||
@@ -149,7 +149,7 @@ static unsigned char picture[20][32] = { | |||
149 | static void draw_spot(int p, int x, int y) | 149 | static void draw_spot(int p, int x, int y) |
150 | { | 150 | { |
151 | if (pic || p==20) { | 151 | if (pic || p==20) { |
152 | rb->lcd_bitmap (picture[p-1], x, y, 16, 16); | 152 | rb->lcd_mono_bitmap (picture[p-1], x, y, 16, 16); |
153 | } else { | 153 | } else { |
154 | rb->lcd_drawrect(x, y, 16, 16); | 154 | rb->lcd_drawrect(x, y, 16, 16); |
155 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 155 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c index e1f0c32a66..815867af56 100644 --- a/apps/plugins/snake2.c +++ b/apps/plugins/snake2.c | |||
@@ -625,11 +625,11 @@ void draw_apple( void ) | |||
625 | char pscore[5], counter[4]; | 625 | char pscore[5], counter[4]; |
626 | 626 | ||
627 | rb->lcd_set_drawmode(DRMODE_FG); | 627 | rb->lcd_set_drawmode(DRMODE_FG); |
628 | rb->lcd_bitmap(snakebmp,0,0,BMPWIDTH_snakebmp,BMPHEIGHT_snakebmp); | 628 | rb->lcd_mono_bitmap(snakebmp,0,0,BMPWIDTH_snakebmp,BMPHEIGHT_snakebmp); |
629 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 629 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
630 | rb->lcd_fillrect(0,0,BMPWIDTH_snakeupbmp,BMPHEIGHT_snakeupbmp); | 630 | rb->lcd_fillrect(0,0,BMPWIDTH_snakeupbmp,BMPHEIGHT_snakeupbmp); |
631 | rb->lcd_set_drawmode(DRMODE_FG); | 631 | rb->lcd_set_drawmode(DRMODE_FG); |
632 | rb->lcd_bitmap(snakeupbmp,0,0,BMPWIDTH_snakeupbmp,BMPHEIGHT_snakeupbmp); | 632 | rb->lcd_mono_bitmap(snakeupbmp,0,0,BMPWIDTH_snakeupbmp,BMPHEIGHT_snakeupbmp); |
633 | rb->lcd_set_drawmode(DRMODE_SOLID); | 633 | rb->lcd_set_drawmode(DRMODE_SOLID); |
634 | 634 | ||
635 | rb->snprintf(counter,sizeof(counter),"%d",applecount); | 635 | rb->snprintf(counter,sizeof(counter),"%d",applecount); |
@@ -1303,7 +1303,7 @@ void game_init(void) | |||
1303 | #if LCD_WIDTH >= 160 && LCD_HEIGHT >= 128 | 1303 | #if LCD_WIDTH >= 160 && LCD_HEIGHT >= 128 |
1304 | 1304 | ||
1305 | rb->lcd_set_drawmode(DRMODE_FG); | 1305 | rb->lcd_set_drawmode(DRMODE_FG); |
1306 | rb->lcd_bitmap(snakebmp,0,0,BMPWIDTH_snakebmp,BMPWIDTH_snakebmp); | 1306 | rb->lcd_mono_bitmap(snakebmp,0,0,BMPWIDTH_snakebmp,BMPWIDTH_snakebmp); |
1307 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1307 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1308 | 1308 | ||
1309 | rb->snprintf(plevel,sizeof(plevel),"%d",level); | 1309 | rb->snprintf(plevel,sizeof(plevel),"%d",level); |
diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c index 75c561427a..73ce386de9 100644 --- a/apps/plugins/snow.c +++ b/apps/plugins/snow.c | |||
@@ -118,8 +118,8 @@ static void snow_move(void) | |||
118 | } | 118 | } |
119 | if (particle_exists(i)) | 119 | if (particle_exists(i)) |
120 | #ifdef HAVE_LCD_BITMAP | 120 | #ifdef HAVE_LCD_BITMAP |
121 | rb->lcd_bitmap(flake,particles[i][0],particles[i][1], | 121 | rb->lcd_mono_bitmap(flake,particles[i][0],particles[i][1], |
122 | FLAKE_WIDTH,FLAKE_WIDTH); | 122 | FLAKE_WIDTH,FLAKE_WIDTH); |
123 | #else | 123 | #else |
124 | pgfx_drawpixel(particles[i][0],particles[i][1]); | 124 | pgfx_drawpixel(particles[i][0],particles[i][1]); |
125 | #endif | 125 | #endif |
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index 880b5a0ad9..89cadc3592 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c | |||
@@ -902,8 +902,8 @@ int solitaire(void){ | |||
902 | rb->lcd_set_drawmode(DRMODE_SOLID); | 902 | rb->lcd_set_drawmode(DRMODE_SOLID); |
903 | /* known card */ | 903 | /* known card */ |
904 | if(deck[c].known){ | 904 | if(deck[c].known){ |
905 | rb->lcd_bitmap(numbers[deck[c].num], i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+1, j, 8, 8); | 905 | rb->lcd_mono_bitmap(numbers[deck[c].num], i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+1, j, 8, 8); |
906 | rb->lcd_bitmap(colors[deck[c].color], i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+7, j, 8, 8); | 906 | rb->lcd_mono_bitmap(colors[deck[c].color], i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+7, j, 8, 8); |
907 | } | 907 | } |
908 | /* draw top line of the card */ | 908 | /* draw top line of the card */ |
909 | rb->lcd_drawline(i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+1,j,i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+CARD_WIDTH-1,j); | 909 | rb->lcd_drawline(i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+1,j,i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+CARD_WIDTH-1,j); |
@@ -946,9 +946,9 @@ int solitaire(void){ | |||
946 | } | 946 | } |
947 | } | 947 | } |
948 | if(c != NOT_A_CARD) { | 948 | if(c != NOT_A_CARD) { |
949 | rb->lcd_bitmap(numbers[deck[c].num], LCD_WIDTH2 - CARD_WIDTH+1, i*CARD_HEIGHT, 8, 8); | 949 | rb->lcd_mono_bitmap(numbers[deck[c].num], LCD_WIDTH2 - CARD_WIDTH+1, i*CARD_HEIGHT, 8, 8); |
950 | } | 950 | } |
951 | rb->lcd_bitmap(colors[i], LCD_WIDTH2 - CARD_WIDTH+7, i*CARD_HEIGHT, 8, 8); | 951 | rb->lcd_mono_bitmap(colors[i], LCD_WIDTH2 - CARD_WIDTH+7, i*CARD_HEIGHT, 8, 8); |
952 | /* draw a selected card */ | 952 | /* draw a selected card */ |
953 | if(c != NOT_A_CARD) { | 953 | if(c != NOT_A_CARD) { |
954 | if(sel_card == c){ | 954 | if(sel_card == c){ |
@@ -978,8 +978,8 @@ int solitaire(void){ | |||
978 | rb->lcd_drawline(LCD_WIDTH2,LCD_HEIGHT-CARD_HEIGHT,LCD_WIDTH2,LCD_HEIGHT-2); | 978 | rb->lcd_drawline(LCD_WIDTH2,LCD_HEIGHT-CARD_HEIGHT,LCD_WIDTH2,LCD_HEIGHT-2); |
979 | #endif | 979 | #endif |
980 | if(cur_rem != NOT_A_CARD){ | 980 | if(cur_rem != NOT_A_CARD){ |
981 | rb->lcd_bitmap(numbers[deck[cur_rem].num], LCD_WIDTH2 - CARD_WIDTH+1, LCD_HEIGHT-CARD_HEIGHT, 8, 8); | 981 | rb->lcd_mono_bitmap(numbers[deck[cur_rem].num], LCD_WIDTH2 - CARD_WIDTH+1, LCD_HEIGHT-CARD_HEIGHT, 8, 8); |
982 | rb->lcd_bitmap(colors[deck[cur_rem].color], LCD_WIDTH2 - CARD_WIDTH+7, LCD_HEIGHT-CARD_HEIGHT, 8, 8); | 982 | rb->lcd_mono_bitmap(colors[deck[cur_rem].color], LCD_WIDTH2 - CARD_WIDTH+7, LCD_HEIGHT-CARD_HEIGHT, 8, 8); |
983 | /* draw a selected card */ | 983 | /* draw a selected card */ |
984 | if(sel_card == cur_rem){ | 984 | if(sel_card == cur_rem){ |
985 | rb->lcd_drawrect(LCD_WIDTH2 - CARD_WIDTH+1, LCD_HEIGHT-CARD_HEIGHT,CARD_WIDTH-1, CARD_HEIGHT-1); | 985 | 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 e6d8551d63..142590d9e8 100644 --- a/apps/plugins/splitedit.c +++ b/apps/plugins/splitedit.c | |||
@@ -260,18 +260,18 @@ static void update_icons(void) | |||
260 | rb->lcd_set_drawmode(DRMODE_SOLID); | 260 | rb->lcd_set_drawmode(DRMODE_SOLID); |
261 | 261 | ||
262 | /* The CUT icon */ | 262 | /* The CUT icon */ |
263 | rb->lcd_bitmap(CUT_BMP, | 263 | rb->lcd_mono_bitmap(CUT_BMP, |
264 | LCD_WIDTH / 3 / 2 - BMPWIDTH / 2, LCD_HEIGHT - BMPHEIGHT, | 264 | LCD_WIDTH / 3 / 2 - BMPWIDTH / 2, LCD_HEIGHT - BMPHEIGHT, |
265 | BMPWIDTH, BMPHEIGHT); | 265 | BMPWIDTH, BMPHEIGHT); |
266 | 266 | ||
267 | /* The loop mode icon */ | 267 | /* The loop mode icon */ |
268 | rb->lcd_bitmap(LOOP_BMP[splitedit_get_loop_mode()], | 268 | rb->lcd_mono_bitmap(LOOP_BMP[splitedit_get_loop_mode()], |
269 | LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, | 269 | LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, |
270 | BMPWIDTH, BMPHEIGHT); | 270 | BMPWIDTH, BMPHEIGHT); |
271 | 271 | ||
272 | #if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F) | 272 | #if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F) |
273 | /* The scale icon */ | 273 | /* The scale icon */ |
274 | rb->lcd_bitmap(SCALE_BMP[rb->peak_meter_get_use_dbfs()], | 274 | rb->lcd_mono_bitmap(SCALE_BMP[rb->peak_meter_get_use_dbfs()], |
275 | 2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, | 275 | 2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, |
276 | BMPWIDTH, BMPHEIGHT); | 276 | BMPWIDTH, BMPHEIGHT); |
277 | #else | 277 | #else |
@@ -279,7 +279,7 @@ static void update_icons(void) | |||
279 | static int idx; | 279 | static int idx; |
280 | if (idx < 0 || idx > 1) idx = 0; | 280 | if (idx < 0 || idx > 1) idx = 0; |
281 | idx = 1 - idx; | 281 | idx = 1 - idx; |
282 | rb->lcd_bitmap(SCALE_BMP[idx], | 282 | rb->lcd_mono_bitmap(SCALE_BMP[idx], |
283 | 2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, | 283 | 2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, |
284 | BMPWIDTH, BMPHEIGHT); | 284 | BMPWIDTH, BMPHEIGHT); |
285 | } | 285 | } |
diff --git a/apps/plugins/star.c b/apps/plugins/star.c index 9b2e0bb010..9dd3659f52 100644 --- a/apps/plugins/star.c +++ b/apps/plugins/star.c | |||
@@ -485,11 +485,11 @@ static void star_display_board_info(void) | |||
485 | rb->lcd_putsxy(0, label_offset_y, str_info); | 485 | rb->lcd_putsxy(0, label_offset_y, str_info); |
486 | 486 | ||
487 | if (control == STAR_CONTROL_BALL) | 487 | if (control == STAR_CONTROL_BALL) |
488 | rb->lcd_bitmap (ball_bmp, 103, label_offset_y + 1, STAR_TILE_SIZE, | 488 | rb->lcd_mono_bitmap (ball_bmp, 103, label_offset_y + 1, STAR_TILE_SIZE, |
489 | STAR_TILE_SIZE); | 489 | STAR_TILE_SIZE); |
490 | else | 490 | else |
491 | rb->lcd_bitmap (block_bmp, 103, label_offset_y + 1, STAR_TILE_SIZE, | 491 | rb->lcd_mono_bitmap (block_bmp, 103, label_offset_y + 1, STAR_TILE_SIZE, |
492 | STAR_TILE_SIZE); | 492 | STAR_TILE_SIZE); |
493 | 493 | ||
494 | rb->lcd_update_rect(0, label_offset_y, LCD_WIDTH, char_height); | 494 | rb->lcd_update_rect(0, label_offset_y, LCD_WIDTH, char_height); |
495 | } | 495 | } |
@@ -520,37 +520,37 @@ static int star_load_level(int current_level) | |||
520 | break; | 520 | break; |
521 | 521 | ||
522 | case STAR_WALL: | 522 | case STAR_WALL: |
523 | rb->lcd_bitmap (wall_bmp, | 523 | rb->lcd_mono_bitmap (wall_bmp, |
524 | STAR_OFFSET_X + x * STAR_TILE_SIZE, | 524 | STAR_OFFSET_X + x * STAR_TILE_SIZE, |
525 | STAR_OFFSET_Y + y * STAR_TILE_SIZE, | 525 | STAR_OFFSET_Y + y * STAR_TILE_SIZE, |
526 | STAR_TILE_SIZE, STAR_TILE_SIZE); | 526 | STAR_TILE_SIZE, STAR_TILE_SIZE); |
527 | break; | 527 | break; |
528 | 528 | ||
529 | case STAR_STAR: | 529 | case STAR_STAR: |
530 | rb->lcd_bitmap (star_bmp, | 530 | rb->lcd_mono_bitmap (star_bmp, |
531 | STAR_OFFSET_X + x * STAR_TILE_SIZE, | 531 | STAR_OFFSET_X + x * STAR_TILE_SIZE, |
532 | STAR_OFFSET_Y + y * STAR_TILE_SIZE, | 532 | STAR_OFFSET_Y + y * STAR_TILE_SIZE, |
533 | STAR_TILE_SIZE, STAR_TILE_SIZE); | 533 | STAR_TILE_SIZE, STAR_TILE_SIZE); |
534 | star_count++; | 534 | star_count++; |
535 | break; | 535 | break; |
536 | 536 | ||
537 | case STAR_BALL: | 537 | case STAR_BALL: |
538 | ball_x = x; | 538 | ball_x = x; |
539 | ball_y = y; | 539 | ball_y = y; |
540 | rb->lcd_bitmap (ball_bmp, | 540 | rb->lcd_mono_bitmap (ball_bmp, |
541 | STAR_OFFSET_X + x * STAR_TILE_SIZE, | 541 | STAR_OFFSET_X + x * STAR_TILE_SIZE, |
542 | STAR_OFFSET_Y + y * STAR_TILE_SIZE, | 542 | STAR_OFFSET_Y + y * STAR_TILE_SIZE, |
543 | STAR_TILE_SIZE, STAR_TILE_SIZE); | 543 | STAR_TILE_SIZE, STAR_TILE_SIZE); |
544 | break; | 544 | break; |
545 | 545 | ||
546 | 546 | ||
547 | case STAR_BLOCK: | 547 | case STAR_BLOCK: |
548 | block_x = x; | 548 | block_x = x; |
549 | block_y = y; | 549 | block_y = y; |
550 | rb->lcd_bitmap (block_bmp, | 550 | rb->lcd_mono_bitmap (block_bmp, |
551 | STAR_OFFSET_X + x * STAR_TILE_SIZE, | 551 | STAR_OFFSET_X + x * STAR_TILE_SIZE, |
552 | STAR_OFFSET_Y + y * STAR_TILE_SIZE, | 552 | STAR_OFFSET_Y + y * STAR_TILE_SIZE, |
553 | STAR_TILE_SIZE, STAR_TILE_SIZE); | 553 | STAR_TILE_SIZE, STAR_TILE_SIZE); |
554 | break; | 554 | break; |
555 | } | 555 | } |
556 | ptr_tab++; | 556 | ptr_tab++; |
@@ -665,7 +665,7 @@ static int star_run_game(void) | |||
665 | { | 665 | { |
666 | for (i = 0 ; i < 7 ; i++) | 666 | for (i = 0 ; i < 7 ; i++) |
667 | { | 667 | { |
668 | rb->lcd_bitmap( | 668 | rb->lcd_mono_bitmap( |
669 | ball_bmp, | 669 | ball_bmp, |
670 | STAR_OFFSET_X + ball_x * STAR_TILE_SIZE + move_x * i, | 670 | STAR_OFFSET_X + ball_x * STAR_TILE_SIZE + move_x * i, |
671 | STAR_OFFSET_Y + ball_y * STAR_TILE_SIZE + move_y * i, | 671 | STAR_OFFSET_Y + ball_y * STAR_TILE_SIZE + move_y * i, |
@@ -697,7 +697,7 @@ static int star_run_game(void) | |||
697 | { | 697 | { |
698 | for (i = 0 ; i < 7 ; i++) | 698 | for (i = 0 ; i < 7 ; i++) |
699 | { | 699 | { |
700 | rb->lcd_bitmap( | 700 | rb->lcd_mono_bitmap( |
701 | block_bmp, | 701 | block_bmp, |
702 | STAR_OFFSET_X + block_x * STAR_TILE_SIZE + move_x * i, | 702 | STAR_OFFSET_X + block_x * STAR_TILE_SIZE + move_x * i, |
703 | STAR_OFFSET_Y + block_y * STAR_TILE_SIZE + move_y * i, | 703 | STAR_OFFSET_Y + block_y * STAR_TILE_SIZE + move_y * i, |
@@ -766,8 +766,8 @@ static int star_menu(void) | |||
766 | } | 766 | } |
767 | 767 | ||
768 | move_y = 0; | 768 | move_y = 0; |
769 | rb->lcd_bitmap(arrow_bmp[anim_arrow[(anim_state & 0x38) >> 3]], | 769 | rb->lcd_mono_bitmap(arrow_bmp[anim_arrow[(anim_state & 0x38) >> 3]], |
770 | 2, menu_offset_y + menu_y * char_height, 7, 8); | 770 | 2, menu_offset_y + menu_y * char_height, 7, 8); |
771 | rb->lcd_update_rect (2, menu_offset_y + menu_y * 8, 8, 8); | 771 | rb->lcd_update_rect (2, menu_offset_y + menu_y * 8, 8, 8); |
772 | rb->sleep(STAR_SLEEP); | 772 | rb->sleep(STAR_SLEEP); |
773 | anim_state++; | 773 | anim_state++; |
@@ -842,8 +842,8 @@ static int star_menu(void) | |||
842 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 842 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
843 | rb->lcd_fillrect (2, 30, 7, 4 * 8); | 843 | rb->lcd_fillrect (2, 30, 7, 4 * 8); |
844 | rb->lcd_set_drawmode(DRMODE_FG); | 844 | rb->lcd_set_drawmode(DRMODE_FG); |
845 | rb->lcd_bitmap(arrow_bmp[anim_arrow[(anim_state & 0x38) >> 3]], | 845 | rb->lcd_mono_bitmap(arrow_bmp[anim_arrow[(anim_state & 0x38) >> 3]], |
846 | 2, menu_offset_y + menu_y * 8 + move_y * i, 7, 8); | 846 | 2, menu_offset_y + menu_y * 8 + move_y * i, 7, 8); |
847 | rb->lcd_update_rect(2, 30, 8, 4 * 8); | 847 | rb->lcd_update_rect(2, 30, 8, 4 * 8); |
848 | anim_state++; | 848 | anim_state++; |
849 | rb->sleep(STAR_SLEEP); | 849 | rb->sleep(STAR_SLEEP); |
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c index d54f86de06..c2db45ed88 100644 --- a/apps/plugins/vu_meter.c +++ b/apps/plugins/vu_meter.c | |||
@@ -278,54 +278,54 @@ void change_settings(void) | |||
278 | } | 278 | } |
279 | 279 | ||
280 | void draw_analog_minimeters(void) { | 280 | void draw_analog_minimeters(void) { |
281 | rb->lcd_bitmap(sound_speaker, 0, 12, 4, 8); | 281 | rb->lcd_mono_bitmap(sound_speaker, 0, 12, 4, 8); |
282 | rb->lcd_set_drawmode(DRMODE_FG); | 282 | rb->lcd_set_drawmode(DRMODE_FG); |
283 | if(5<left_needle_top_x) | 283 | if(5<left_needle_top_x) |
284 | rb->lcd_bitmap(sound_low_level, 5, 12, 2, 8); | 284 | rb->lcd_mono_bitmap(sound_low_level, 5, 12, 2, 8); |
285 | if(12<left_needle_top_x) | 285 | if(12<left_needle_top_x) |
286 | rb->lcd_bitmap(sound_med_level, 7, 12, 2, 8); | 286 | rb->lcd_mono_bitmap(sound_med_level, 7, 12, 2, 8); |
287 | if(24<left_needle_top_x) | 287 | if(24<left_needle_top_x) |
288 | rb->lcd_bitmap(sound_high_level, 9, 12, 2, 8); | 288 | rb->lcd_mono_bitmap(sound_high_level, 9, 12, 2, 8); |
289 | if(40<left_needle_top_x) | 289 | if(40<left_needle_top_x) |
290 | rb->lcd_bitmap(sound_max_level, 12, 12, 3, 8); | 290 | rb->lcd_mono_bitmap(sound_max_level, 12, 12, 3, 8); |
291 | 291 | ||
292 | rb->lcd_set_drawmode(DRMODE_SOLID); | 292 | rb->lcd_set_drawmode(DRMODE_SOLID); |
293 | rb->lcd_bitmap(sound_speaker, 54, 12, 4, 8); | 293 | rb->lcd_mono_bitmap(sound_speaker, 54, 12, 4, 8); |
294 | rb->lcd_set_drawmode(DRMODE_FG); | 294 | rb->lcd_set_drawmode(DRMODE_FG); |
295 | if(5<(right_needle_top_x-56)) | 295 | if(5<(right_needle_top_x-56)) |
296 | rb->lcd_bitmap(sound_low_level, 59, 12, 2, 8); | 296 | rb->lcd_mono_bitmap(sound_low_level, 59, 12, 2, 8); |
297 | if(12<(right_needle_top_x-56)) | 297 | if(12<(right_needle_top_x-56)) |
298 | rb->lcd_bitmap(sound_med_level, 61, 12, 2, 8); | 298 | rb->lcd_mono_bitmap(sound_med_level, 61, 12, 2, 8); |
299 | if(24<(right_needle_top_x-56)) | 299 | if(24<(right_needle_top_x-56)) |
300 | rb->lcd_bitmap(sound_high_level, 63, 12, 2, 8); | 300 | rb->lcd_mono_bitmap(sound_high_level, 63, 12, 2, 8); |
301 | if(40<(right_needle_top_x-56)) | 301 | if(40<(right_needle_top_x-56)) |
302 | rb->lcd_bitmap(sound_max_level, 66, 12, 3, 8); | 302 | rb->lcd_mono_bitmap(sound_max_level, 66, 12, 3, 8); |
303 | rb->lcd_set_drawmode(DRMODE_SOLID); | 303 | rb->lcd_set_drawmode(DRMODE_SOLID); |
304 | } | 304 | } |
305 | 305 | ||
306 | void draw_digital_minimeters(void) { | 306 | void draw_digital_minimeters(void) { |
307 | rb->lcd_bitmap(sound_speaker, 34, 24, 4, 8); | 307 | rb->lcd_mono_bitmap(sound_speaker, 34, 24, 4, 8); |
308 | rb->lcd_set_drawmode(DRMODE_FG); | 308 | rb->lcd_set_drawmode(DRMODE_FG); |
309 | if(1<num_left_leds) | 309 | if(1<num_left_leds) |
310 | rb->lcd_bitmap(sound_low_level, 39, 24, 2, 8); | 310 | rb->lcd_mono_bitmap(sound_low_level, 39, 24, 2, 8); |
311 | if(2<num_left_leds) | 311 | if(2<num_left_leds) |
312 | rb->lcd_bitmap(sound_med_level, 41, 24, 2, 8); | 312 | rb->lcd_mono_bitmap(sound_med_level, 41, 24, 2, 8); |
313 | if(5<num_left_leds) | 313 | if(5<num_left_leds) |
314 | rb->lcd_bitmap(sound_high_level, 43, 24, 2, 8); | 314 | rb->lcd_mono_bitmap(sound_high_level, 43, 24, 2, 8); |
315 | if(8<num_left_leds) | 315 | if(8<num_left_leds) |
316 | rb->lcd_bitmap(sound_max_level, 46, 24, 3, 8); | 316 | rb->lcd_mono_bitmap(sound_max_level, 46, 24, 3, 8); |
317 | 317 | ||
318 | rb->lcd_set_drawmode(DRMODE_SOLID); | 318 | rb->lcd_set_drawmode(DRMODE_SOLID); |
319 | rb->lcd_bitmap(sound_speaker, 34, 40, 4, 8); | 319 | rb->lcd_mono_bitmap(sound_speaker, 34, 40, 4, 8); |
320 | rb->lcd_set_drawmode(DRMODE_FG); | 320 | rb->lcd_set_drawmode(DRMODE_FG); |
321 | if(1<(num_right_leds)) | 321 | if(1<(num_right_leds)) |
322 | rb->lcd_bitmap(sound_low_level, 39, 40, 2, 8); | 322 | rb->lcd_mono_bitmap(sound_low_level, 39, 40, 2, 8); |
323 | if(2<(num_right_leds)) | 323 | if(2<(num_right_leds)) |
324 | rb->lcd_bitmap(sound_med_level, 41, 40, 2, 8); | 324 | rb->lcd_mono_bitmap(sound_med_level, 41, 40, 2, 8); |
325 | if(5<(num_right_leds)) | 325 | if(5<(num_right_leds)) |
326 | rb->lcd_bitmap(sound_high_level, 43, 40, 2, 8); | 326 | rb->lcd_mono_bitmap(sound_high_level, 43, 40, 2, 8); |
327 | if(8<(num_right_leds)) | 327 | if(8<(num_right_leds)) |
328 | rb->lcd_bitmap(sound_max_level, 46, 40, 3, 8); | 328 | rb->lcd_mono_bitmap(sound_max_level, 46, 40, 3, 8); |
329 | rb->lcd_set_drawmode(DRMODE_SOLID); | 329 | rb->lcd_set_drawmode(DRMODE_SOLID); |
330 | } | 330 | } |
331 | 331 | ||
@@ -359,8 +359,8 @@ void analog_meter(void) { | |||
359 | 359 | ||
360 | /* Needle covers */ | 360 | /* Needle covers */ |
361 | rb->lcd_set_drawmode(DRMODE_FG); | 361 | rb->lcd_set_drawmode(DRMODE_FG); |
362 | rb->lcd_bitmap(needle_cover, 22, 59, 13, 5); | 362 | rb->lcd_mono_bitmap(needle_cover, 22, 59, 13, 5); |
363 | rb->lcd_bitmap(needle_cover, 78, 59, 13, 5); | 363 | rb->lcd_mono_bitmap(needle_cover, 78, 59, 13, 5); |
364 | rb->lcd_set_drawmode(DRMODE_SOLID); | 364 | rb->lcd_set_drawmode(DRMODE_SOLID); |
365 | 365 | ||
366 | /* Show Left/Right */ | 366 | /* Show Left/Right */ |
@@ -396,10 +396,10 @@ void digital_meter(void) { | |||
396 | rb->lcd_set_drawmode(DRMODE_FG); | 396 | rb->lcd_set_drawmode(DRMODE_FG); |
397 | /* LEDS */ | 397 | /* LEDS */ |
398 | for(i=0; i<num_left_leds; i++) | 398 | for(i=0; i<num_left_leds; i++) |
399 | rb->lcd_bitmap(led, i*9+2+i, 14, 9, 5); | 399 | rb->lcd_mono_bitmap(led, i*9+2+i, 14, 9, 5); |
400 | 400 | ||
401 | for(i=0; i<num_right_leds; i++) | 401 | for(i=0; i<num_right_leds; i++) |
402 | rb->lcd_bitmap(led, i*9+2+i, 52, 9, 5); | 402 | rb->lcd_mono_bitmap(led, i*9+2+i, 52, 9, 5); |
403 | 403 | ||
404 | rb->lcd_set_drawmode(DRMODE_SOLID); | 404 | rb->lcd_set_drawmode(DRMODE_SOLID); |
405 | 405 | ||
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c index 7a5a7bd8f7..6e60905478 100644 --- a/apps/recorder/icons.c +++ b/apps/recorder/icons.c | |||
@@ -141,98 +141,202 @@ const unsigned char rockbox112x37[]={ | |||
141 | 141 | ||
142 | #if LCD_WIDTH >= 160 | 142 | #if LCD_WIDTH >= 160 |
143 | /* iRiver LCD width */ | 143 | /* iRiver LCD width */ |
144 | const unsigned char rockbox160x53[] = { | 144 | const unsigned char rockbox160x53x2[] = { |
145 | 0x00, 0x00, 0x00, 0x04, 0x04, 0xff, 0x04, 0xf4, 0xf4, 0xf4, 0xf4, 0xf4, 0xf4, | 145 | 0x00, 0x00, 0x00, 0x30, 0x30, 0xff, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, |
146 | 0xf4, 0xf4, 0xf4, 0xf4, 0xf4, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, | 146 | 0x30, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
147 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf8, 0xfa, | 147 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xcc, |
148 | 0xfa, 0xf2, 0xf4, 0xf4, 0xe8, 0xc8, 0x90, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, | 148 | 0xcc, 0x0c, 0x30, 0x30, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
149 | 0x00, 0x80, 0x40, 0x20, 0x90, 0xc8, 0xe4, 0xf4, 0xf4, 0xf2, 0xfa, 0xfa, 0xfa, | 149 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x30, 0x30, 0x0c, 0xcc, 0xcc, 0xcc, |
150 | 0xf4, 0xf4, 0xf4, 0xe8, 0xc8, 0x98, 0x04, 0x04, 0xf4, 0xf4, 0xf4, 0xf4, 0xf4, | 150 | 0x30, 0x30, 0x30, 0xc0, 0xc0, 0xc0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, |
151 | 0x04, 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0xf4, 0xf4, 0xf4, 0xf4, | 151 | 0x30, 0xff, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, |
152 | 0xf4, 0x74, 0x1c, 0x06, 0x05, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 152 | 0x30, 0x30, 0xf0, 0x3c, 0x33, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
153 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 153 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
154 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 154 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
155 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 155 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
156 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 156 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
157 | 0x00, 0x00, 0x00, 0x00, | 157 | 0x00, 0x00, 0x00, 0x00, |
158 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | 158 | |
159 | 0x5f, 0x5f, 0x5f, 0x5f, 0x9f, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf0, | 159 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, |
160 | 0x00, 0x00, 0xe0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x1f, 0x0f, 0xcf, | 160 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xfc, 0xfc, 0xf0, 0xc0, 0x00, 0x00, |
161 | 0x4f, 0x9f, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xe1, 0x0e, 0x70, 0x38, | 161 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, |
162 | 0x06, 0xf1, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x1f, 0x9f, 0x4f, 0x0f, | 162 | 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xc3, 0x0c, 0x30, 0xc0, 0x00, 0x00, 0x00, |
163 | 0x1f, 0x1f, 0x3f, 0x7f, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, | 163 | 0x00, 0xc0, 0x30, 0x0c, 0xc3, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, |
164 | 0x00, 0xff, 0x00, 0x00, 0x80, 0xe0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x8f, | 164 | 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xc3, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, |
165 | 0x83, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 165 | 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, |
166 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 166 | 0xff, 0x3f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
167 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 167 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
168 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 168 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
169 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 169 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
170 | 0x00, 0x00, 0x00, 0x00, | 170 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
171 | 0x1c, 0x34, 0xc4, 0x08, 0xf0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | 171 | 0x00, 0x00, 0x00, 0x00, |
172 | 0x00, 0x00, 0x80, 0x80, 0xc1, 0x3e, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, | 172 | |
173 | 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xff, | 173 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, |
174 | 0x00, 0x01, 0x1e, 0xe0, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0xc0, | 174 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, |
175 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x80, 0x7c, 0x03, 0x00, 0x00, 0x00, | 175 | 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, |
176 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, | 176 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xc0, 0x03, 0xfc, 0x00, 0xc0, |
177 | 0x00, 0xff, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0x00, 0x00, 0x00, | 177 | 0x3c, 0x03, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, |
178 | 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, | 178 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, |
179 | 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 179 | 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, |
180 | 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, | 180 | 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
181 | 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, | 181 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
182 | 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, | 182 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
183 | 0x80, 0x80, 0x00, 0x00, | 183 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
184 | 0x00, 0x00, 0xf0, 0x1f, 0x0f, 0x70, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | 184 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
185 | 0xfc, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x0f, 0x03, 0x00, | 185 | 0x00, 0x00, 0x00, 0x00, |
186 | 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x08, 0x08, 0x3f, | 186 | |
187 | 0x08, 0x08, 0x08, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, | 187 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, |
188 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xd9, 0x08, 0xff, 0x08, 0x08, 0x08, 0x08, 0xff, | 188 | 0x33, 0x33, 0x33, 0x33, 0xc3, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, |
189 | 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, | 189 | 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x03, 0x00, 0xf0, |
190 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xc0, 0xff, 0x00, 0x00, 0x00, | 190 | 0x30, 0xc3, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x3f, 0x0f, |
191 | 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x01, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, | 191 | 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x03, 0xc3, 0x30, 0x00, |
192 | 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x08, 0x30, 0x60, 0x10, 0x08, 0x04, | 192 | 0x03, 0x03, 0x0f, 0x3f, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, |
193 | 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, | 193 | 0x00, 0xff, 0x00, 0x00, 0xc0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xc0, |
194 | 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, | 194 | 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
195 | 0x1c, 0x32, 0x1d, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x30, 0x8c, | 195 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
196 | 0x67, 0x19, 0x06, 0x01, | 196 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
197 | 0x00, 0x1f, 0x7f, 0x60, 0xc4, 0xc2, 0x83, 0x30, 0x0e, 0x9c, 0xc1, 0xff, 0xff, | 197 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
198 | 0x03, 0xff, 0x03, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xc0, 0x00, | 198 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
199 | 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, | 199 | 0x00, 0x00, 0x00, 0x00, |
200 | 0x00, 0xc0, 0x3c, 0x83, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x03, | 200 | |
201 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x1f, 0x60, 0x80, 0x00, 0xff, | 201 | 0xf0, 0x30, 0x30, 0xc0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, |
202 | 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, | 202 | 0x00, 0x00, 0x00, 0x00, 0x03, 0xfc, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, |
203 | 0x0f, 0x19, 0xe3, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, | 203 | 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xff, |
204 | 0x00, 0x00, 0x00, 0x00, 0xfc, 0x86, 0x01, 0x01, 0x00, 0x00, 0x02, 0x82, 0x85, | 204 | 0x00, 0x03, 0xfc, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, |
205 | 0x79, 0x02, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 205 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, |
206 | 0x00, 0x00, 0x78, 0x86, 0x03, 0x01, 0x00, 0x00, 0x02, 0x02, 0x04, 0xc9, 0x33, | 206 | 0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, |
207 | 0xce, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x20, 0x00, 0x00, | 207 | 0x00, 0xff, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x55, 0x55, 0x55, |
208 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xec, 0x07, 0x71, 0x8c, 0x03, 0x00, | 208 | 0x55, 0x55, 0x55, 0x55, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
209 | 0x00, 0x00, 0x00, 0x00, | 209 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
210 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x70, 0x0f, 0xff, 0xff, | 210 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
211 | 0x00, 0xff, 0x00, 0x00, 0x00, 0x03, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, | 211 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
212 | 0xf8, 0xc0, 0x03, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xfa, | 212 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
213 | 0xf9, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x1f, 0x03, 0x00, 0x00, 0x00, | 213 | 0x00, 0x00, 0x00, 0x00, |
214 | 0x00, 0x07, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xf9, 0xf9, 0xff, | 214 | |
215 | 0xf8, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, | 215 | 0x03, 0x0f, 0xf0, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, |
216 | 0x00, 0x00, 0x00, 0x07, 0x38, 0xc3, 0x1f, 0x7f, 0xff, 0xff, 0x00, 0x00, 0x00, | 216 | 0x00, 0x00, 0xc0, 0xc0, 0xf0, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, |
217 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x05, 0x05, 0x04, 0x04, | 217 | 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, |
218 | 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x30, 0x18, 0x20, 0xc0, 0x80, | 218 | 0x00, 0x00, 0x03, 0xfc, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, |
219 | 0x00, 0x00, 0x00, 0x01, 0x02, 0x06, 0x04, 0x04, 0x05, 0x05, 0x05, 0x06, 0x03, | 219 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, |
220 | 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, | 220 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, |
221 | 0x60, 0xb0, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x19, 0x72, 0xcc, | 221 | 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0x55, 0x55, 0x55, |
222 | 0x10, 0x60, 0x80, 0x00, | 222 | 0x55, 0x55, 0x55, 0x55, 0xff, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, |
223 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x06, 0x07, 0x07, 0x07, | 223 | 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
224 | 0x04, 0x1f, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, 0x07, 0x07, | 224 | 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, |
225 | 0x07, 0x07, 0x07, 0x1c, 0x04, 0x04, 0x01, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0f, | 225 | 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, |
226 | 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 226 | 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, |
227 | 0x08, 0x08, 0x08, 0x08, 0x09, 0x0b, 0x0b, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, | 227 | 0xc0, 0xc0, 0x00, 0x00, |
228 | 0x0f, 0x07, 0x07, 0x03, 0x01, 0x01, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, | 228 | |
229 | 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x1c, 0x07, 0x07, 0x04, 0x04, 0x04, | 229 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, |
230 | 0x04, 0x04, 0x04, 0x04, 0x06, 0x02, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, | 230 | 0xf0, 0xff, 0xfc, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, |
231 | 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 231 | 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xff, |
232 | 0x01, 0x03, 0x02, 0x06, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, | 232 | 0xc0, 0xc0, 0xc0, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xff, |
233 | 0x06, 0x06, 0x07, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x01, | 233 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xc0, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xff, |
234 | 0x06, 0x01, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, | 234 | 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, |
235 | 0x07, 0x06, 0x00, 0x06, | 235 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0x55, 0x55, 0x55, |
236 | 0x55, 0x55, 0x55, 0x55, 0x5f, 0x57, 0x57, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, | ||
237 | 0x55, 0x55, 0x57, 0x57, 0x5c, 0x5c, 0x70, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x70, | ||
238 | 0x5c, 0x5c, 0x57, 0x57, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, | ||
239 | 0x57, 0x57, 0x5f, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5f, 0x7c, | ||
240 | 0xf0, 0x0c, 0xf3, 0x7c, 0x5f, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xf5, | ||
241 | 0x3f, 0xc3, 0x3c, 0x03, | ||
242 | |||
243 | 0x00, 0x00, 0xff, 0x03, 0x00, 0x3f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
244 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, | ||
245 | 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, | ||
246 | 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, | ||
247 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, | ||
248 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
249 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0x55, 0x55, 0x55, | ||
250 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, | ||
251 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5f, 0x7c, 0x57, 0x55, 0x55, | ||
252 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, 0x55, 0x55, | ||
253 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, | ||
254 | 0x57, 0x5f, 0x57, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0xfd, 0x0f, 0xc0, | ||
255 | 0x3c, 0x03, 0x00, 0x00, | ||
256 | |||
257 | 0x00, 0xff, 0xff, 0x00, 0x30, 0x0c, 0x0f, 0x00, 0xfc, 0xf0, 0x03, 0xff, 0xff, | ||
258 | 0x0f, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xc0, 0x00, 0x00, | ||
259 | 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
260 | 0x00, 0x00, 0xf0, 0x0f, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0f, | ||
261 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, | ||
262 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
263 | 0xff, 0xc3, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x55, 0x55, 0x55, | ||
264 | 0x55, 0x55, 0x55, 0x55, 0xf5, 0x3d, 0x03, 0x03, 0x00, 0x00, 0x0c, 0x0c, 0x33, | ||
265 | 0xc3, 0x0d, 0xf5, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, | ||
266 | 0x55, 0x55, 0xd5, 0x3d, 0x0f, 0x03, 0x00, 0x00, 0x0c, 0x0c, 0x30, 0xc3, 0x0f, | ||
267 | 0xfd, 0xd5, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, | ||
268 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xf5, 0x3f, 0x03, 0xf0, 0x0f, 0x00, | ||
269 | 0x00, 0x00, 0x00, 0x00, | ||
270 | |||
271 | 0x00, 0x03, 0x3f, 0x3c, 0xf0, 0xf0, 0xc0, 0x0f, 0x00, 0xc3, 0xf0, 0xff, 0xff, | ||
272 | 0x00, 0xff, 0x00, 0x03, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, | ||
273 | 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
274 | 0x00, 0xf0, 0x0f, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, | ||
275 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x03, 0x3c, 0xc0, 0x00, 0xff, | ||
276 | 0x00, 0x00, 0x00, 0x00, 0xc0, 0xfc, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
277 | 0x00, 0x03, 0xfc, 0x03, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x55, 0x55, 0x55, | ||
278 | 0x55, 0x55, 0x55, 0x55, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, | ||
279 | 0x3f, 0x00, 0xff, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, | ||
280 | 0x55, 0x55, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, | ||
281 | 0xf0, 0x7f, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x7f, 0x5d, 0x55, 0x55, | ||
282 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x7f, 0xf0, 0x00, 0x3f, 0xc0, 0x00, 0x00, | ||
283 | 0x00, 0x00, 0x00, 0x00, | ||
284 | |||
285 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, | ||
286 | 0x00, 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
287 | 0xc0, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xc0, 0xcc, | ||
288 | 0xc3, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, | ||
289 | 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xc3, 0xc3, 0xff, | ||
290 | 0xc0, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
291 | 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x55, 0x55, 0x55, | ||
292 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x57, 0x5c, 0x70, 0x70, 0x73, 0x73, 0x70, 0x70, | ||
293 | 0x5c, 0x5f, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x55, 0x55, 0x55, | ||
294 | 0x55, 0x55, 0x55, 0x57, 0x5c, 0x7c, 0x70, 0x70, 0x73, 0x73, 0x73, 0x7c, 0x5f, | ||
295 | 0x57, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, | ||
296 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5f, 0x7c, 0xc3, 0x0c, 0xf0, | ||
297 | 0x00, 0x00, 0x00, 0x00, | ||
298 | |||
299 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x3f, 0x00, 0xff, 0xff, | ||
300 | 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
301 | 0xff, 0xf0, 0x00, 0x03, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
302 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x03, 0x00, 0x00, 0x00, 0x00, | ||
303 | 0x00, 0x00, 0x0f, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
304 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
305 | 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x03, 0x3f, 0xff, 0xff, 0x55, 0x55, 0x55, | ||
306 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, | ||
307 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x35, 0x0f, 0x03, 0x0d, 0xf5, 0xd5, | ||
308 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, | ||
309 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, | ||
310 | 0x3d, 0xcf, 0xfd, 0xd5, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x57, 0x7f, 0xf0, | ||
311 | 0x03, 0x3c, 0xc0, 0x00, | ||
312 | |||
313 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x30, 0x3c, 0x3f, 0x3f, 0x3f, | ||
314 | 0x30, 0xff, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x3f, 0x3f, 0x3f, 0x3f, | ||
315 | 0x3f, 0x3f, 0x3f, 0xf0, 0x30, 0x30, 0x03, 0x0f, 0x3f, 0x3f, 0xff, 0xff, 0xff, | ||
316 | 0xff, 0xff, 0x3f, 0x3f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
317 | 0xc0, 0xc0, 0xc0, 0xc0, 0xc3, 0xcf, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
318 | 0xff, 0x3f, 0x3f, 0x0f, 0x03, 0x03, 0x00, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, | ||
319 | 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x3f, 0xf0, 0x3f, 0x3f, 0x35, 0x35, 0x35, | ||
320 | 0x35, 0x35, 0x35, 0x35, 0x3d, 0x0d, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, | ||
321 | 0x35, 0x35, 0x35, 0x0d, 0x0d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
322 | 0x03, 0x0f, 0x0d, 0x3d, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, | ||
323 | 0x3d, 0x3d, 0x3f, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x3d, 0x03, | ||
324 | 0x3c, 0x03, 0x00, 0x03, 0x0d, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, | ||
325 | 0x3f, 0x3c, 0x00, 0x3c, | ||
326 | |||
327 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
328 | 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
329 | 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
330 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
331 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
332 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
333 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
334 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
335 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
336 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
337 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
338 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
339 | 0x00, 0x00, 0x00, 0x00, | ||
236 | }; | 340 | }; |
237 | 341 | ||
238 | #endif | 342 | #endif |
@@ -321,9 +425,9 @@ bool statusbar_icon_volume(int percent) | |||
321 | volume = 100; | 425 | volume = 100; |
322 | 426 | ||
323 | if (volume==0) { | 427 | if (volume==0) { |
324 | lcd_bitmap(bitmap_icons_7x8[Icon_Mute], | 428 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_Mute], |
325 | ICON_VOLUME_X_POS + ICON_VOLUME_WIDTH / 2 - 4, | 429 | ICON_VOLUME_X_POS + ICON_VOLUME_WIDTH / 2 - 4, |
326 | STATUSBAR_Y_POS, 7, STATUSBAR_HEIGHT); | 430 | STATUSBAR_Y_POS, 7, STATUSBAR_HEIGHT); |
327 | } | 431 | } |
328 | else { | 432 | else { |
329 | /* We want to redraw the icon later on */ | 433 | /* We want to redraw the icon later on */ |
@@ -370,8 +474,8 @@ bool statusbar_icon_volume(int percent) | |||
370 | */ | 474 | */ |
371 | void statusbar_icon_play_state(int state) | 475 | void statusbar_icon_play_state(int state) |
372 | { | 476 | { |
373 | lcd_bitmap(bitmap_icons_7x8[state], ICON_PLAY_STATE_X_POS, STATUSBAR_Y_POS, | 477 | lcd_mono_bitmap(bitmap_icons_7x8[state], ICON_PLAY_STATE_X_POS, STATUSBAR_Y_POS, |
374 | ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT); | 478 | ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT); |
375 | } | 479 | } |
376 | 480 | ||
377 | /* | 481 | /* |
@@ -379,8 +483,8 @@ void statusbar_icon_play_state(int state) | |||
379 | */ | 483 | */ |
380 | void statusbar_icon_play_mode(int mode) | 484 | void statusbar_icon_play_mode(int mode) |
381 | { | 485 | { |
382 | lcd_bitmap(bitmap_icons_7x8[mode], ICON_PLAY_MODE_X_POS, STATUSBAR_Y_POS, | 486 | lcd_mono_bitmap(bitmap_icons_7x8[mode], ICON_PLAY_MODE_X_POS, STATUSBAR_Y_POS, |
383 | ICON_PLAY_MODE_WIDTH, STATUSBAR_HEIGHT); | 487 | ICON_PLAY_MODE_WIDTH, STATUSBAR_HEIGHT); |
384 | } | 488 | } |
385 | 489 | ||
386 | /* | 490 | /* |
@@ -388,8 +492,8 @@ void statusbar_icon_play_mode(int mode) | |||
388 | */ | 492 | */ |
389 | void statusbar_icon_shuffle(void) | 493 | void statusbar_icon_shuffle(void) |
390 | { | 494 | { |
391 | lcd_bitmap(bitmap_icons_7x8[Icon_Shuffle], ICON_SHUFFLE_X_POS, | 495 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_Shuffle], ICON_SHUFFLE_X_POS, |
392 | STATUSBAR_Y_POS, ICON_SHUFFLE_WIDTH, STATUSBAR_HEIGHT); | 496 | STATUSBAR_Y_POS, ICON_SHUFFLE_WIDTH, STATUSBAR_HEIGHT); |
393 | } | 497 | } |
394 | 498 | ||
395 | /* | 499 | /* |
@@ -397,8 +501,8 @@ void statusbar_icon_shuffle(void) | |||
397 | */ | 501 | */ |
398 | void statusbar_icon_lock(void) | 502 | void statusbar_icon_lock(void) |
399 | { | 503 | { |
400 | lcd_bitmap(bitmap_icons_5x8[Icon_Lock], LOCK_X_POS, | 504 | lcd_mono_bitmap(bitmap_icons_5x8[Icon_Lock], LOCK_X_POS, |
401 | STATUSBAR_Y_POS, 5, 8); | 505 | STATUSBAR_Y_POS, 5, 8); |
402 | } | 506 | } |
403 | 507 | ||
404 | #if CONFIG_LED == LED_VIRTUAL | 508 | #if CONFIG_LED == LED_VIRTUAL |
@@ -407,8 +511,8 @@ void statusbar_icon_lock(void) | |||
407 | */ | 511 | */ |
408 | void statusbar_led(void) | 512 | void statusbar_led(void) |
409 | { | 513 | { |
410 | lcd_bitmap(bitmap_icon_disk, ICON_DISK_X_POS, | 514 | lcd_mono_bitmap(bitmap_icon_disk, ICON_DISK_X_POS, |
411 | STATUSBAR_Y_POS, ICON_DISK_WIDTH, STATUSBAR_HEIGHT); | 515 | STATUSBAR_Y_POS, ICON_DISK_WIDTH, STATUSBAR_HEIGHT); |
412 | } | 516 | } |
413 | #endif | 517 | #endif |
414 | 518 | ||
diff --git a/apps/recorder/icons.h b/apps/recorder/icons.h index b2900a1566..c0b870fbb6 100644 --- a/apps/recorder/icons.h +++ b/apps/recorder/icons.h | |||
@@ -72,7 +72,7 @@ extern const unsigned char bitmap_icon_disk[]; | |||
72 | extern const unsigned char rockbox112x37[]; | 72 | extern const unsigned char rockbox112x37[]; |
73 | #endif | 73 | #endif |
74 | #if LCD_WIDTH >= 160 | 74 | #if LCD_WIDTH >= 160 |
75 | extern const unsigned char rockbox160x53[]; | 75 | extern const unsigned char rockbox160x53x2[]; |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | #define STATUSBAR_X_POS 0 | 78 | #define STATUSBAR_X_POS 0 |
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c index 3bab002574..7746fb9f9f 100644 --- a/apps/recorder/peakmeter.c +++ b/apps/recorder/peakmeter.c | |||
@@ -1107,8 +1107,8 @@ void peak_meter_draw_trig(int xpos, int ypos) { | |||
1107 | case TRIG_READY: | 1107 | case TRIG_READY: |
1108 | scrollbar(x, ypos + 1, TRIGBAR_WIDTH, TRIG_HEIGHT - 2, | 1108 | scrollbar(x, ypos + 1, TRIGBAR_WIDTH, TRIG_HEIGHT - 2, |
1109 | TRIGBAR_WIDTH, 0, 0, HORIZONTAL); | 1109 | TRIGBAR_WIDTH, 0, 0, HORIZONTAL); |
1110 | lcd_bitmap(bitmap_icons_7x8[Icon_Stop], xpos, ypos, | 1110 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_Stop], xpos, ypos, |
1111 | ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT); | 1111 | ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT); |
1112 | break; | 1112 | break; |
1113 | 1113 | ||
1114 | case TRIG_STEADY: | 1114 | case TRIG_STEADY: |
@@ -1117,17 +1117,17 @@ void peak_meter_draw_trig(int xpos, int ypos) { | |||
1117 | time_left = time_left * TRIGBAR_WIDTH / trig_strt_duration; | 1117 | time_left = time_left * TRIGBAR_WIDTH / trig_strt_duration; |
1118 | scrollbar(x, ypos + 1, TRIGBAR_WIDTH, TRIG_HEIGHT - 2, | 1118 | scrollbar(x, ypos + 1, TRIGBAR_WIDTH, TRIG_HEIGHT - 2, |
1119 | TRIGBAR_WIDTH, 0, TRIGBAR_WIDTH - time_left, HORIZONTAL); | 1119 | TRIGBAR_WIDTH, 0, TRIGBAR_WIDTH - time_left, HORIZONTAL); |
1120 | lcd_bitmap(bitmap_icons_7x8[Icon_Stop], xpos, ypos, | 1120 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_Stop], xpos, ypos, |
1121 | ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT); | 1121 | ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT); |
1122 | break; | 1122 | break; |
1123 | 1123 | ||
1124 | case TRIG_GO: | 1124 | case TRIG_GO: |
1125 | case TRIG_CONTINUE: | 1125 | case TRIG_CONTINUE: |
1126 | scrollbar(x, ypos + 1, TRIGBAR_WIDTH, TRIG_HEIGHT - 2, | 1126 | scrollbar(x, ypos + 1, TRIGBAR_WIDTH, TRIG_HEIGHT - 2, |
1127 | TRIGBAR_WIDTH, TRIGBAR_WIDTH, TRIGBAR_WIDTH, HORIZONTAL); | 1127 | TRIGBAR_WIDTH, TRIGBAR_WIDTH, TRIGBAR_WIDTH, HORIZONTAL); |
1128 | lcd_bitmap(bitmap_icons_7x8[Icon_Record], | 1128 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_Record], |
1129 | TRIG_WIDTH - ICON_PLAY_STATE_WIDTH, ypos, | 1129 | TRIG_WIDTH - ICON_PLAY_STATE_WIDTH, ypos, |
1130 | ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT); | 1130 | ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT); |
1131 | break; | 1131 | break; |
1132 | 1132 | ||
1133 | case TRIG_POSTREC: | 1133 | case TRIG_POSTREC: |
@@ -1135,9 +1135,9 @@ void peak_meter_draw_trig(int xpos, int ypos) { | |||
1135 | time_left = time_left * TRIGBAR_WIDTH / trig_stp_hold; | 1135 | time_left = time_left * TRIGBAR_WIDTH / trig_stp_hold; |
1136 | scrollbar(x, ypos + 1, TRIGBAR_WIDTH, TRIG_HEIGHT - 2, | 1136 | scrollbar(x, ypos + 1, TRIGBAR_WIDTH, TRIG_HEIGHT - 2, |
1137 | TRIGBAR_WIDTH, time_left, TRIGBAR_WIDTH, HORIZONTAL); | 1137 | TRIGBAR_WIDTH, time_left, TRIGBAR_WIDTH, HORIZONTAL); |
1138 | lcd_bitmap(bitmap_icons_7x8[Icon_Record], | 1138 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_Record], |
1139 | TRIG_WIDTH - ICON_PLAY_STATE_WIDTH, ypos, | 1139 | TRIG_WIDTH - ICON_PLAY_STATE_WIDTH, ypos, |
1140 | ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT); | 1140 | ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT); |
1141 | break; | 1141 | break; |
1142 | } | 1142 | } |
1143 | 1143 | ||
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 9e58cec19e..ea71538322 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -869,8 +869,8 @@ bool f2_rec_screen(void) | |||
869 | lcd_putsxy(0, LCD_HEIGHT/2 - h*2, str(LANG_RECORDING_QUALITY)); | 869 | lcd_putsxy(0, LCD_HEIGHT/2 - h*2, str(LANG_RECORDING_QUALITY)); |
870 | snprintf(buf, 32, "%d", global_settings.rec_quality); | 870 | snprintf(buf, 32, "%d", global_settings.rec_quality); |
871 | lcd_putsxy(0, LCD_HEIGHT/2-h, buf); | 871 | lcd_putsxy(0, LCD_HEIGHT/2-h, buf); |
872 | lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward], | 872 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastBackward], |
873 | LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8); | 873 | LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8); |
874 | 874 | ||
875 | /* Frequency */ | 875 | /* Frequency */ |
876 | snprintf(buf, sizeof buf, "%s:", str(LANG_RECORDING_FREQUENCY)); | 876 | snprintf(buf, sizeof buf, "%s:", str(LANG_RECORDING_FREQUENCY)); |
@@ -879,8 +879,8 @@ bool f2_rec_screen(void) | |||
879 | ptr = freq_str[global_settings.rec_frequency]; | 879 | ptr = freq_str[global_settings.rec_frequency]; |
880 | lcd_getstringsize(ptr, &w, &h); | 880 | lcd_getstringsize(ptr, &w, &h); |
881 | lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr); | 881 | lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr); |
882 | lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow], | 882 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_DownArrow], |
883 | LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); | 883 | LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); |
884 | 884 | ||
885 | /* Channel mode */ | 885 | /* Channel mode */ |
886 | switch ( global_settings.rec_channels ) { | 886 | switch ( global_settings.rec_channels ) { |
@@ -900,8 +900,8 @@ bool f2_rec_screen(void) | |||
900 | lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h, str(LANG_F2_MODE)); | 900 | lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h, str(LANG_F2_MODE)); |
901 | lcd_getstringsize(ptr, &w, &h); | 901 | lcd_getstringsize(ptr, &w, &h); |
902 | lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2, ptr); | 902 | lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2, ptr); |
903 | lcd_bitmap(bitmap_icons_7x8[Icon_FastForward], | 903 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastForward], |
904 | LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8); | 904 | LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8); |
905 | 905 | ||
906 | lcd_update(); | 906 | lcd_update(); |
907 | 907 | ||
@@ -994,15 +994,15 @@ bool f3_rec_screen(void) | |||
994 | ptr = src_str[global_settings.rec_source]; | 994 | ptr = src_str[global_settings.rec_source]; |
995 | lcd_getstringsize(ptr, &w, &h); | 995 | lcd_getstringsize(ptr, &w, &h); |
996 | lcd_putsxy(0, LCD_HEIGHT/2-h, ptr); | 996 | lcd_putsxy(0, LCD_HEIGHT/2-h, ptr); |
997 | lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward], | 997 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastBackward], |
998 | LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8); | 998 | LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8); |
999 | 999 | ||
1000 | /* trigger setup */ | 1000 | /* trigger setup */ |
1001 | ptr = str(LANG_RECORD_TRIGGER); | 1001 | ptr = str(LANG_RECORD_TRIGGER); |
1002 | lcd_getstringsize(ptr,&w,&h); | 1002 | lcd_getstringsize(ptr,&w,&h); |
1003 | lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h*2, ptr); | 1003 | lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h*2, ptr); |
1004 | lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow], | 1004 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_DownArrow], |
1005 | LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); | 1005 | LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); |
1006 | 1006 | ||
1007 | lcd_update(); | 1007 | lcd_update(); |
1008 | 1008 | ||
diff --git a/apps/screens.c b/apps/screens.c index 8c90f02707..494acd7e0b 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -95,9 +95,9 @@ void usb_display_info(void) | |||
95 | 95 | ||
96 | #ifdef HAVE_LCD_BITMAP | 96 | #ifdef HAVE_LCD_BITMAP |
97 | /* Center bitmap on screen */ | 97 | /* Center bitmap on screen */ |
98 | lcd_bitmap(usb_logo, LCD_WIDTH/2-BMPWIDTH_usb_logo/2, | 98 | lcd_mono_bitmap(usb_logo, LCD_WIDTH/2-BMPWIDTH_usb_logo/2, |
99 | LCD_HEIGHT/2-BMPHEIGHT_usb_logo/2, BMPWIDTH_usb_logo, | 99 | LCD_HEIGHT/2-BMPHEIGHT_usb_logo/2, BMPWIDTH_usb_logo, |
100 | BMPHEIGHT_usb_logo); | 100 | BMPHEIGHT_usb_logo); |
101 | status_draw(true); | 101 | status_draw(true); |
102 | lcd_update(); | 102 | lcd_update(); |
103 | #else | 103 | #else |
@@ -234,15 +234,15 @@ void charging_display_info(bool animate) | |||
234 | if (!animate) | 234 | if (!animate) |
235 | { /* draw the outline */ | 235 | { /* draw the outline */ |
236 | /* middle part */ | 236 | /* middle part */ |
237 | lcd_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8); | 237 | lcd_mono_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8); |
238 | lcd_set_drawmode(DRMODE_FG); | 238 | lcd_set_drawmode(DRMODE_FG); |
239 | /* upper line */ | 239 | /* upper line */ |
240 | charging_logo[0] = charging_logo[1] = 0x00; | 240 | charging_logo[0] = charging_logo[1] = 0x00; |
241 | memset(charging_logo+2, 0x80, 34); | 241 | memset(charging_logo+2, 0x80, 34); |
242 | lcd_bitmap(charging_logo, pox_x, pox_y, sizeof(charging_logo), 8); | 242 | lcd_mono_bitmap(charging_logo, pox_x, pox_y, sizeof(charging_logo), 8); |
243 | /* lower line */ | 243 | /* lower line */ |
244 | memset(charging_logo+2, 0x01, 34); | 244 | memset(charging_logo+2, 0x01, 34); |
245 | lcd_bitmap(charging_logo, pox_x, pox_y + 16, sizeof(charging_logo), 8); | 245 | lcd_mono_bitmap(charging_logo, pox_x, pox_y + 16, sizeof(charging_logo), 8); |
246 | lcd_set_drawmode(DRMODE_SOLID); | 246 | lcd_set_drawmode(DRMODE_SOLID); |
247 | } | 247 | } |
248 | else | 248 | else |
@@ -258,7 +258,7 @@ void charging_display_info(bool animate) | |||
258 | charging_logo[i] = 0x01 << bitpos; | 258 | charging_logo[i] = 0x01 << bitpos; |
259 | } | 259 | } |
260 | } | 260 | } |
261 | lcd_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8); | 261 | lcd_mono_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8); |
262 | phase++; | 262 | phase++; |
263 | } | 263 | } |
264 | lcd_update(); | 264 | lcd_update(); |
@@ -415,8 +415,8 @@ int pitch_screen(void) | |||
415 | ptr = str(LANG_PITCH_UP); | 415 | ptr = str(LANG_PITCH_UP); |
416 | lcd_getstringsize(ptr,&w,&h); | 416 | lcd_getstringsize(ptr,&w,&h); |
417 | lcd_putsxy((LCD_WIDTH-w)/2, 0, ptr); | 417 | lcd_putsxy((LCD_WIDTH-w)/2, 0, ptr); |
418 | lcd_bitmap(bitmap_icons_7x8[Icon_UpArrow], | 418 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_UpArrow], |
419 | LCD_WIDTH/2 - 3, h*2, 7, 8); | 419 | LCD_WIDTH/2 - 3, h*2, 7, 8); |
420 | 420 | ||
421 | snprintf(buf, sizeof buf, "%d.%d%%", pitch / 10, pitch % 10 ); | 421 | snprintf(buf, sizeof buf, "%d.%d%%", pitch / 10, pitch % 10 ); |
422 | lcd_getstringsize(buf,&w,&h); | 422 | lcd_getstringsize(buf,&w,&h); |
@@ -425,14 +425,14 @@ int pitch_screen(void) | |||
425 | ptr = str(LANG_PITCH_DOWN); | 425 | ptr = str(LANG_PITCH_DOWN); |
426 | lcd_getstringsize(ptr,&w,&h); | 426 | lcd_getstringsize(ptr,&w,&h); |
427 | lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr); | 427 | lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr); |
428 | lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow], | 428 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_DownArrow], |
429 | LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); | 429 | LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); |
430 | 430 | ||
431 | ptr = str(LANG_PAUSE); | 431 | ptr = str(LANG_PAUSE); |
432 | lcd_getstringsize(ptr,&w,&h); | 432 | lcd_getstringsize(ptr,&w,&h); |
433 | lcd_putsxy((LCD_WIDTH-(w/2))/2, LCD_HEIGHT/2 - h/2, ptr); | 433 | lcd_putsxy((LCD_WIDTH-(w/2))/2, LCD_HEIGHT/2 - h/2, ptr); |
434 | lcd_bitmap(bitmap_icons_7x8[Icon_Pause], | 434 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_Pause], |
435 | (LCD_WIDTH-(w/2))/2-10, LCD_HEIGHT/2 - h/2, 7, 8); | 435 | (LCD_WIDTH-(w/2))/2-10, LCD_HEIGHT/2 - h/2, 7, 8); |
436 | 436 | ||
437 | lcd_update(); | 437 | lcd_update(); |
438 | } | 438 | } |
@@ -637,12 +637,12 @@ bool quick_screen(int context, int button) | |||
637 | #endif | 637 | #endif |
638 | } | 638 | } |
639 | 639 | ||
640 | lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward], | 640 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastBackward], |
641 | LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8); | 641 | LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8); |
642 | lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow], | 642 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_DownArrow], |
643 | LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); | 643 | LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); |
644 | lcd_bitmap(bitmap_icons_7x8[Icon_FastForward], | 644 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastForward], |
645 | LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8); | 645 | LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8); |
646 | 646 | ||
647 | lcd_update(); | 647 | lcd_update(); |
648 | key = button_get(true); | 648 | key = button_get(true); |
@@ -862,24 +862,18 @@ void splash(int ticks, /* how long the splash is displayed */ | |||
862 | } | 862 | } |
863 | 863 | ||
864 | #ifdef HAVE_LCD_BITMAP | 864 | #ifdef HAVE_LCD_BITMAP |
865 | /* If we center the display and it wouldn't cover the full screen, | 865 | /* If we center the display, then just clear the box we need and put |
866 | then just clear the box we need and put a nice little frame and | 866 | a nice little frame and put the text in there! */ |
867 | put the text in there! */ | ||
868 | if(center && (y > 2)) { | 867 | if(center && (y > 2)) { |
869 | if(maxw < (LCD_WIDTH -4)) { | 868 | int xx = (LCD_WIDTH-maxw)/2 - 2; |
870 | int xx = (LCD_WIDTH-maxw)/2 - 2; | 869 | /* The new graphics routines handle clipping, so no need to check */ |
871 | lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 870 | #if LCD_DEPTH > 1 |
872 | lcd_fillrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4); | 871 | lcd_set_background(MAX_LEVEL-1); |
873 | lcd_set_drawmode(DRMODE_SOLID); | 872 | #endif |
874 | lcd_drawrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4); | 873 | lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
875 | } | 874 | lcd_fillrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4); |
876 | else { | 875 | lcd_set_drawmode(DRMODE_SOLID); |
877 | lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 876 | lcd_drawrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4); |
878 | lcd_fillrect(0, y-2, LCD_WIDTH, LCD_HEIGHT-y*2+4); | ||
879 | lcd_set_drawmode(DRMODE_SOLID); | ||
880 | lcd_hline(0, LCD_WIDTH-1, y-2); | ||
881 | lcd_hline(0, LCD_WIDTH-1, LCD_HEIGHT-y+2); | ||
882 | } | ||
883 | } | 877 | } |
884 | else | 878 | else |
885 | #endif | 879 | #endif |
@@ -921,6 +915,9 @@ void splash(int ticks, /* how long the splash is displayed */ | |||
921 | x += w+SPACE; /* pixels space! */ | 915 | x += w+SPACE; /* pixels space! */ |
922 | next = strtok_r(NULL, " ", &store); | 916 | next = strtok_r(NULL, " ", &store); |
923 | } | 917 | } |
918 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1) | ||
919 | lcd_set_background(MAX_LEVEL); | ||
920 | #endif | ||
924 | lcd_update(); | 921 | lcd_update(); |
925 | 922 | ||
926 | if(ticks) | 923 | if(ticks) |
diff --git a/apps/status.c b/apps/status.c index 42204a6ee6..3cb6722bca 100644 --- a/apps/status.c +++ b/apps/status.c | |||
@@ -244,12 +244,12 @@ void status_draw(bool force_redraw) | |||
244 | 244 | ||
245 | /* draw power plug if charging */ | 245 | /* draw power plug if charging */ |
246 | if (info.inserted) | 246 | if (info.inserted) |
247 | lcd_bitmap(bitmap_icons_7x8[Icon_Plug], ICON_PLUG_X_POS, | 247 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_Plug], ICON_PLUG_X_POS, |
248 | STATUSBAR_Y_POS, ICON_PLUG_WIDTH, STATUSBAR_HEIGHT); | 248 | STATUSBAR_Y_POS, ICON_PLUG_WIDTH, STATUSBAR_HEIGHT); |
249 | #ifdef HAVE_USB_POWER | 249 | #ifdef HAVE_USB_POWER |
250 | else if (info.usb_power) | 250 | else if (info.usb_power) |
251 | lcd_bitmap(bitmap_icons_7x8[Icon_USBPlug], ICON_PLUG_X_POS, | 251 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_USBPlug], ICON_PLUG_X_POS, |
252 | STATUSBAR_Y_POS, ICON_PLUG_WIDTH, STATUSBAR_HEIGHT); | 252 | STATUSBAR_Y_POS, ICON_PLUG_WIDTH, STATUSBAR_HEIGHT); |
253 | #endif | 253 | #endif |
254 | 254 | ||
255 | info.redraw_volume = statusbar_icon_volume(info.volume); | 255 | info.redraw_volume = statusbar_icon_volume(info.volume); |
diff --git a/apps/tree.c b/apps/tree.c index b2d46389ae..8e1afb8b67 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -395,9 +395,9 @@ static int showdir(void) | |||
395 | int offset=0; | 395 | int offset=0; |
396 | if ( line_height > 8 ) | 396 | if ( line_height > 8 ) |
397 | offset = (line_height - 8) / 2; | 397 | offset = (line_height - 8) / 2; |
398 | lcd_bitmap(icon, | 398 | lcd_mono_bitmap(icon, |
399 | CURSOR_X * 6 + CURSOR_WIDTH, | 399 | CURSOR_X * 6 + CURSOR_WIDTH, |
400 | MARGIN_Y+(i-start)*line_height + offset, 6, 8); | 400 | MARGIN_Y+(i-start)*line_height + offset, 6, 8); |
401 | #else | 401 | #else |
402 | if (icon < 0 ) | 402 | if (icon < 0 ) |
403 | icon = Unknown; | 403 | icon = Unknown; |
diff --git a/apps/wps-display.c b/apps/wps-display.c index 8c6de43a20..8ba26e5614 100644 --- a/apps/wps-display.c +++ b/apps/wps-display.c | |||
@@ -115,7 +115,7 @@ static void wps_display_images(void) { | |||
115 | lcd_set_drawmode(DRMODE_FG); | 115 | lcd_set_drawmode(DRMODE_FG); |
116 | for (n = 0; n < MAX_IMAGES; n++) { | 116 | for (n = 0; n < MAX_IMAGES; n++) { |
117 | if (img[n].loaded) { | 117 | if (img[n].loaded) { |
118 | lcd_bitmap(img[n].ptr, img[n].x, img[n].y, img[n].w, img[n].h); | 118 | lcd_mono_bitmap(img[n].ptr, img[n].x, img[n].y, img[n].w, img[n].h); |
119 | } | 119 | } |
120 | } | 120 | } |
121 | lcd_set_drawmode(DRMODE_SOLID); | 121 | lcd_set_drawmode(DRMODE_SOLID); |
diff --git a/firmware/drivers/lcd-h100.c b/firmware/drivers/lcd-h100.c index 1a40a2535c..dcc5a42e5d 100644 --- a/firmware/drivers/lcd-h100.c +++ b/firmware/drivers/lcd-h100.c | |||
@@ -60,8 +60,16 @@ | |||
60 | 60 | ||
61 | /*** globals ***/ | 61 | /*** globals ***/ |
62 | 62 | ||
63 | unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH] IDATA_ATTR; | 63 | unsigned char lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH] IDATA_ATTR; |
64 | 64 | ||
65 | /* should be 'const', but this causes a section type conflict */ | ||
66 | static unsigned char dibits[16] IDATA_ATTR = { | ||
67 | 0x00, 0x03, 0x0C, 0x0F, 0x30, 0x33, 0x3C, 0x3F, | ||
68 | 0xC0, 0xC3, 0xCC, 0xCF, 0xF0, 0xF3, 0xFC, 0xFF | ||
69 | }; | ||
70 | |||
71 | static unsigned fg_pattern IDATA_ATTR = 0xFF; /* initially black */ | ||
72 | static unsigned bg_pattern IDATA_ATTR = 0x00; /* initially white */ | ||
65 | static int drawmode = DRMODE_SOLID; | 73 | static int drawmode = DRMODE_SOLID; |
66 | static int xmargin = 0; | 74 | static int xmargin = 0; |
67 | static int ymargin = 0; | 75 | static int ymargin = 0; |
@@ -131,14 +139,8 @@ void lcd_set_flip(bool yesno) | |||
131 | * The value must be 0 <= pixels < LCD_HEIGHT. */ | 139 | * The value must be 0 <= pixels < LCD_HEIGHT. */ |
132 | void lcd_roll(int lines) | 140 | void lcd_roll(int lines) |
133 | { | 141 | { |
134 | char data[2]; | ||
135 | |||
136 | lines &= LCD_HEIGHT-1; | 142 | lines &= LCD_HEIGHT-1; |
137 | data[0] = lines & 0xff; | 143 | lcd_write_command_ex(LCD_CNTL_DISPLAY_START_LINE, lines, -1); |
138 | data[1] = lines >> 8; | ||
139 | |||
140 | lcd_write_command(LCD_CNTL_DISPLAY_START_LINE); | ||
141 | lcd_write_data(data, 2); | ||
142 | } | 144 | } |
143 | 145 | ||
144 | #endif /* !SIMULATOR */ | 146 | #endif /* !SIMULATOR */ |
@@ -157,15 +159,15 @@ void lcd_init(void) | |||
157 | { | 159 | { |
158 | /* GPO35 is the LCD A0 pin | 160 | /* GPO35 is the LCD A0 pin |
159 | GPO46 is LCD RESET */ | 161 | GPO46 is LCD RESET */ |
160 | GPIO1_OUT |= 0x00004008; | 162 | or_l(0x00004008, &GPIO1_OUT); |
161 | GPIO1_ENABLE |= 0x00004008; | 163 | or_l(0x00004008, &GPIO1_ENABLE); |
162 | GPIO1_FUNCTION |= 0x00004008; | 164 | or_l(0x00004008, &GPIO1_FUNCTION); |
163 | 165 | ||
164 | /* Reset LCD */ | 166 | /* Reset LCD */ |
165 | sleep(1); | 167 | sleep(1); |
166 | GPIO1_OUT &= ~0x00004000; | 168 | and_l(~0x00004000, &GPIO1_OUT); |
167 | sleep(1); | 169 | sleep(1); |
168 | GPIO1_OUT |= 0x00004000; | 170 | or_l(0x00004000, &GPIO1_OUT); |
169 | sleep(1); | 171 | sleep(1); |
170 | 172 | ||
171 | lcd_write_command(LCD_CNTL_COLUMN_ADDRESS_DIR | 0); /* Normal */ | 173 | lcd_write_command(LCD_CNTL_COLUMN_ADDRESS_DIR | 0); /* Normal */ |
@@ -190,7 +192,7 @@ void lcd_init(void) | |||
190 | 192 | ||
191 | lcd_write_command_ex(LCD_CNTL_DISPLAY_START_LINE, 0, -1); | 193 | lcd_write_command_ex(LCD_CNTL_DISPLAY_START_LINE, 0, -1); |
192 | lcd_write_command_ex(LCD_CNTL_GRAY_SCALE_PATTERN, 0x42, -1); | 194 | lcd_write_command_ex(LCD_CNTL_GRAY_SCALE_PATTERN, 0x42, -1); |
193 | lcd_write_command_ex(LCD_CNTL_DISPLAY_MODE, 1, -1); /* Monochrome mode */ | 195 | lcd_write_command_ex(LCD_CNTL_DISPLAY_MODE, 0, -1); /* Greyscale mode */ |
194 | lcd_write_command(LCD_CNTL_DATA_INPUT_DIR | 0); /* Column mode */ | 196 | lcd_write_command(LCD_CNTL_DATA_INPUT_DIR | 0); /* Column mode */ |
195 | 197 | ||
196 | lcd_clear_display(); | 198 | lcd_clear_display(); |
@@ -204,7 +206,7 @@ void lcd_init(void) | |||
204 | /*** update functions ***/ | 206 | /*** update functions ***/ |
205 | 207 | ||
206 | /* Performance function that works with an external buffer | 208 | /* Performance function that works with an external buffer |
207 | note that by and bheight are in 8-pixel units! */ | 209 | note that by and bheight are in 4-pixel units! */ |
208 | void lcd_blit(const unsigned char* data, int x, int by, int width, | 210 | void lcd_blit(const unsigned char* data, int x, int by, int width, |
209 | int bheight, int stride) | 211 | int bheight, int stride) |
210 | { | 212 | { |
@@ -223,13 +225,13 @@ void lcd_blit(const unsigned char* data, int x, int by, int width, | |||
223 | 225 | ||
224 | /* Update the display. | 226 | /* Update the display. |
225 | This must be called after all other LCD functions that change the display. */ | 227 | This must be called after all other LCD functions that change the display. */ |
226 | void lcd_update(void) __attribute__ ((section (".icode"))); | 228 | void lcd_update(void) ICODE_ATTR; |
227 | void lcd_update(void) | 229 | void lcd_update(void) |
228 | { | 230 | { |
229 | int y; | 231 | int y; |
230 | 232 | ||
231 | /* Copy display bitmap to hardware */ | 233 | /* Copy display bitmap to hardware */ |
232 | for (y = 0; y < LCD_HEIGHT/8; y++) | 234 | for (y = 0; y < LCD_HEIGHT/4; y++) |
233 | { | 235 | { |
234 | lcd_write_command_ex(LCD_CNTL_PAGE, y, -1); | 236 | lcd_write_command_ex(LCD_CNTL_PAGE, y, -1); |
235 | lcd_write_command_ex(LCD_CNTL_COLUMN, 0, -1); | 237 | lcd_write_command_ex(LCD_CNTL_COLUMN, 0, -1); |
@@ -240,21 +242,21 @@ void lcd_update(void) | |||
240 | } | 242 | } |
241 | 243 | ||
242 | /* Update a fraction of the display. */ | 244 | /* Update a fraction of the display. */ |
243 | void lcd_update_rect(int, int, int, int) __attribute__ ((section (".icode"))); | 245 | void lcd_update_rect(int, int, int, int) ICODE_ATTR; |
244 | void lcd_update_rect(int x, int y, int width, int height) | 246 | void lcd_update_rect(int x, int y, int width, int height) |
245 | { | 247 | { |
246 | int ymax; | 248 | int ymax; |
247 | 249 | ||
248 | /* The Y coordinates have to work on even 8 pixel rows */ | 250 | /* The Y coordinates have to work on even 8 pixel rows */ |
249 | ymax = (y + height-1) >> 3; | 251 | ymax = (y + height-1) >> 2; |
250 | y >>= 3; | 252 | y >>= 2; |
251 | 253 | ||
252 | if(x + width > LCD_WIDTH) | 254 | if(x + width > LCD_WIDTH) |
253 | width = LCD_WIDTH - x; | 255 | width = LCD_WIDTH - x; |
254 | if (width <= 0) | 256 | if (width <= 0) |
255 | return; /* nothing left to do, 0 is harmful to lcd_write_data() */ | 257 | return; /* nothing left to do, 0 is harmful to lcd_write_data() */ |
256 | if(ymax >= LCD_HEIGHT/8) | 258 | if(ymax >= LCD_HEIGHT/4) |
257 | ymax = LCD_HEIGHT/8-1; | 259 | ymax = LCD_HEIGHT/4-1; |
258 | 260 | ||
259 | /* Copy specified rectange bitmap to hardware */ | 261 | /* Copy specified rectange bitmap to hardware */ |
260 | for (; y <= ymax; y++) | 262 | for (; y <= ymax; y++) |
@@ -280,6 +282,26 @@ int lcd_get_drawmode(void) | |||
280 | return drawmode; | 282 | return drawmode; |
281 | } | 283 | } |
282 | 284 | ||
285 | void lcd_set_foreground(int brightness) | ||
286 | { | ||
287 | fg_pattern = 0x55 * (~brightness & 3); | ||
288 | } | ||
289 | |||
290 | int lcd_get_foreground(void) | ||
291 | { | ||
292 | return ~fg_pattern & 3; | ||
293 | } | ||
294 | |||
295 | void lcd_set_background(int brightness) | ||
296 | { | ||
297 | bg_pattern = 0x55 * (~brightness & 3); | ||
298 | } | ||
299 | |||
300 | int lcd_get_background(void) | ||
301 | { | ||
302 | return ~bg_pattern & 3; | ||
303 | } | ||
304 | |||
283 | void lcd_setmargins(int x, int y) | 305 | void lcd_setmargins(int x, int y) |
284 | { | 306 | { |
285 | xmargin = x; | 307 | xmargin = x; |
@@ -310,17 +332,21 @@ int lcd_getstringsize(const unsigned char *str, int *w, int *h) | |||
310 | 332 | ||
311 | static void setpixel(int x, int y) | 333 | static void setpixel(int x, int y) |
312 | { | 334 | { |
313 | DRAW_PIXEL(x, y); | 335 | unsigned char *data = &lcd_framebuffer[y>>2][x]; |
336 | unsigned mask = 3 << (2 * (y & 3)); | ||
337 | *data = (*data & ~mask) | (fg_pattern & mask); | ||
314 | } | 338 | } |
315 | 339 | ||
316 | static void clearpixel(int x, int y) | 340 | static void clearpixel(int x, int y) |
317 | { | 341 | { |
318 | CLEAR_PIXEL(x, y); | 342 | unsigned char *data = &lcd_framebuffer[y>>2][x]; |
343 | unsigned mask = 3 << (2 * (y & 3)); | ||
344 | *data = (*data & ~mask) | (bg_pattern & mask); | ||
319 | } | 345 | } |
320 | 346 | ||
321 | static void flippixel(int x, int y) | 347 | static void flippixel(int x, int y) |
322 | { | 348 | { |
323 | INVERT_PIXEL(x, y); | 349 | lcd_framebuffer[y>>2][x] ^= 3 << (2 * (y & 3)); |
324 | } | 350 | } |
325 | 351 | ||
326 | static void nopixel(int x, int y) | 352 | static void nopixel(int x, int y) |
@@ -333,61 +359,68 @@ lcd_pixelfunc_type* lcd_pixelfuncs[8] = { | |||
333 | flippixel, nopixel, setpixel, setpixel, | 359 | flippixel, nopixel, setpixel, setpixel, |
334 | nopixel, clearpixel, nopixel, clearpixel | 360 | nopixel, clearpixel, nopixel, clearpixel |
335 | }; | 361 | }; |
336 | 362 | ||
363 | /* 'mask' and 'bits' contain 2 bits per pixel */ | ||
337 | static void flipblock(unsigned char *address, unsigned mask, unsigned bits) | 364 | static void flipblock(unsigned char *address, unsigned mask, unsigned bits) |
338 | __attribute__ ((section(".icode"))); | 365 | ICODE_ATTR; |
339 | static void flipblock(unsigned char *address, unsigned mask, unsigned bits) | 366 | static void flipblock(unsigned char *address, unsigned mask, unsigned bits) |
340 | { | 367 | { |
341 | *address ^= (bits & mask); | 368 | *address ^= bits & mask; |
342 | } | 369 | } |
343 | 370 | ||
344 | static void bgblock(unsigned char *address, unsigned mask, unsigned bits) | 371 | static void bgblock(unsigned char *address, unsigned mask, unsigned bits) |
345 | __attribute__ ((section(".icode"))); | 372 | ICODE_ATTR; |
346 | static void bgblock(unsigned char *address, unsigned mask, unsigned bits) | 373 | static void bgblock(unsigned char *address, unsigned mask, unsigned bits) |
347 | { | 374 | { |
348 | *address &= (bits | ~mask); | 375 | mask &= ~bits; |
376 | *address = (*address & ~mask) | (bg_pattern & mask); | ||
349 | } | 377 | } |
350 | 378 | ||
351 | static void fgblock(unsigned char *address, unsigned mask, unsigned bits) | 379 | static void fgblock(unsigned char *address, unsigned mask, unsigned bits) |
352 | __attribute__ ((section(".icode"))); | 380 | ICODE_ATTR; |
353 | static void fgblock(unsigned char *address, unsigned mask, unsigned bits) | 381 | static void fgblock(unsigned char *address, unsigned mask, unsigned bits) |
354 | { | 382 | { |
355 | *address |= (bits & mask); | 383 | mask &= bits; |
384 | *address = (*address & ~mask) | (fg_pattern & mask); | ||
356 | } | 385 | } |
357 | 386 | ||
358 | static void solidblock(unsigned char *address, unsigned mask, unsigned bits) | 387 | static void solidblock(unsigned char *address, unsigned mask, unsigned bits) |
359 | __attribute__ ((section(".icode"))); | 388 | ICODE_ATTR; |
360 | static void solidblock(unsigned char *address, unsigned mask, unsigned bits) | 389 | static void solidblock(unsigned char *address, unsigned mask, unsigned bits) |
361 | { | 390 | { |
362 | *address = (*address & ~mask) | (bits & mask); | 391 | *address = (*address & ~mask) | (bits & mask & fg_pattern) |
392 | | (~bits & mask & bg_pattern); | ||
363 | } | 393 | } |
364 | 394 | ||
365 | static void flipinvblock(unsigned char *address, unsigned mask, unsigned bits) | 395 | static void flipinvblock(unsigned char *address, unsigned mask, unsigned bits) |
366 | __attribute__ ((section(".icode"))); | 396 | ICODE_ATTR; |
367 | static void flipinvblock(unsigned char *address, unsigned mask, unsigned bits) | 397 | static void flipinvblock(unsigned char *address, unsigned mask, unsigned bits) |
368 | { | 398 | { |
369 | *address ^= (~bits & mask); | 399 | *address ^= ~bits & mask; |
370 | } | 400 | } |
371 | 401 | ||
372 | static void bginvblock(unsigned char *address, unsigned mask, unsigned bits) | 402 | static void bginvblock(unsigned char *address, unsigned mask, unsigned bits) |
373 | __attribute__ ((section(".icode"))); | 403 | ICODE_ATTR; |
374 | static void bginvblock(unsigned char *address, unsigned mask, unsigned bits) | 404 | static void bginvblock(unsigned char *address, unsigned mask, unsigned bits) |
375 | { | 405 | { |
376 | *address &= ~(bits & mask); | 406 | mask &= bits; |
407 | *address = (*address & ~mask) | (bg_pattern & mask); | ||
377 | } | 408 | } |
378 | 409 | ||
379 | static void fginvblock(unsigned char *address, unsigned mask, unsigned bits) | 410 | static void fginvblock(unsigned char *address, unsigned mask, unsigned bits) |
380 | __attribute__ ((section(".icode"))); | 411 | ICODE_ATTR; |
381 | static void fginvblock(unsigned char *address, unsigned mask, unsigned bits) | 412 | static void fginvblock(unsigned char *address, unsigned mask, unsigned bits) |
382 | { | 413 | { |
383 | *address |= (~bits & mask); | 414 | mask &= ~bits; |
415 | *address = (*address & ~mask) | (fg_pattern & mask); | ||
384 | } | 416 | } |
385 | 417 | ||
386 | static void solidinvblock(unsigned char *address, unsigned mask, unsigned bits) | 418 | static void solidinvblock(unsigned char *address, unsigned mask, unsigned bits) |
387 | __attribute__ ((section(".icode"))); | 419 | ICODE_ATTR; |
388 | static void solidinvblock(unsigned char *address, unsigned mask, unsigned bits) | 420 | static void solidinvblock(unsigned char *address, unsigned mask, unsigned bits) |
389 | { | 421 | { |
390 | *address = (*address & ~mask) | (~bits & mask); | 422 | *address = (*address & ~mask) | (~bits & mask & fg_pattern) |
423 | | (bits & mask & bg_pattern); | ||
391 | } | 424 | } |
392 | 425 | ||
393 | lcd_blockfunc_type* lcd_blockfuncs[8] = { | 426 | lcd_blockfunc_type* lcd_blockfuncs[8] = { |
@@ -400,7 +433,7 @@ lcd_blockfunc_type* lcd_blockfuncs[8] = { | |||
400 | /* Clear the whole display */ | 433 | /* Clear the whole display */ |
401 | void lcd_clear_display(void) | 434 | void lcd_clear_display(void) |
402 | { | 435 | { |
403 | unsigned bits = (drawmode & DRMODE_INVERSEVID) ? 0xFFu : 0; | 436 | unsigned bits = (drawmode & DRMODE_INVERSEVID) ? fg_pattern : bg_pattern; |
404 | 437 | ||
405 | memset(lcd_framebuffer, bits, sizeof lcd_framebuffer); | 438 | memset(lcd_framebuffer, bits, sizeof lcd_framebuffer); |
406 | scrolling_lines = 0; | 439 | scrolling_lines = 0; |
@@ -511,8 +544,8 @@ void lcd_hline(int x1, int x2, int y) | |||
511 | x2 = LCD_WIDTH-1; | 544 | x2 = LCD_WIDTH-1; |
512 | 545 | ||
513 | bfunc = lcd_blockfuncs[drawmode]; | 546 | bfunc = lcd_blockfuncs[drawmode]; |
514 | dst = &lcd_framebuffer[y>>3][x1]; | 547 | dst = &lcd_framebuffer[y>>2][x1]; |
515 | mask = 1 << (y & 7); | 548 | mask = 3 << (2 * (y & 3)); |
516 | 549 | ||
517 | dst_end = dst + x2 - x1; | 550 | dst_end = dst + x2 - x1; |
518 | do | 551 | do |
@@ -547,12 +580,12 @@ void lcd_vline(int x, int y1, int y2) | |||
547 | y2 = LCD_HEIGHT-1; | 580 | y2 = LCD_HEIGHT-1; |
548 | 581 | ||
549 | bfunc = lcd_blockfuncs[drawmode]; | 582 | bfunc = lcd_blockfuncs[drawmode]; |
550 | dst = &lcd_framebuffer[y1>>3][x]; | 583 | dst = &lcd_framebuffer[y1>>2][x]; |
551 | ny = y2 - (y1 & ~7); | 584 | ny = y2 - (y1 & ~3); |
552 | mask = 0xFFu << (y1 & 7); | 585 | mask = 0xFFu << (2 * (y1 & 3)); |
553 | mask_bottom = 0xFFu >> (7 - (ny & 7)); | 586 | mask_bottom = 0xFFu >> (2 * (~ny & 3)); |
554 | 587 | ||
555 | for (; ny >= 8; ny -= 8) | 588 | for (; ny >= 4; ny -= 4) |
556 | { | 589 | { |
557 | bfunc(dst, mask, 0xFFu); | 590 | bfunc(dst, mask, 0xFFu); |
558 | dst += LCD_WIDTH; | 591 | dst += LCD_WIDTH; |
@@ -583,7 +616,7 @@ void lcd_fillrect(int x, int y, int width, int height) | |||
583 | int ny; | 616 | int ny; |
584 | unsigned char *dst, *dst_end; | 617 | unsigned char *dst, *dst_end; |
585 | unsigned mask, mask_bottom; | 618 | unsigned mask, mask_bottom; |
586 | unsigned bits = 0xFFu; | 619 | unsigned bits = fg_pattern; |
587 | lcd_blockfunc_type *bfunc; | 620 | lcd_blockfunc_type *bfunc; |
588 | bool fillopt; | 621 | bool fillopt; |
589 | 622 | ||
@@ -611,14 +644,14 @@ void lcd_fillrect(int x, int y, int width, int height) | |||
611 | fillopt = (drawmode & DRMODE_INVERSEVID) ? | 644 | fillopt = (drawmode & DRMODE_INVERSEVID) ? |
612 | (drawmode & DRMODE_BG) : (drawmode & DRMODE_FG); | 645 | (drawmode & DRMODE_BG) : (drawmode & DRMODE_FG); |
613 | if (fillopt &&(drawmode & DRMODE_INVERSEVID)) | 646 | if (fillopt &&(drawmode & DRMODE_INVERSEVID)) |
614 | bits = 0; | 647 | bits = bg_pattern; |
615 | bfunc = lcd_blockfuncs[drawmode]; | 648 | bfunc = lcd_blockfuncs[drawmode]; |
616 | dst = &lcd_framebuffer[y>>3][x]; | 649 | dst = &lcd_framebuffer[y>>2][x]; |
617 | ny = height - 1 + (y & 7); | 650 | ny = height - 1 + (y & 3); |
618 | mask = 0xFFu << (y & 7); | 651 | mask = 0xFFu << (2 * (y & 3)); |
619 | mask_bottom = 0xFFu >> (7 - (ny & 7)); | 652 | mask_bottom = 0xFFu >> (2 * (~ny & 3)); |
620 | 653 | ||
621 | for (; ny >= 8; ny -= 8) | 654 | for (; ny >= 4; ny -= 4) |
622 | { | 655 | { |
623 | if (fillopt && (mask == 0xFFu)) | 656 | if (fillopt && (mask == 0xFFu)) |
624 | memset(dst, bits, width); | 657 | memset(dst, bits, width); |
@@ -648,7 +681,7 @@ void lcd_fillrect(int x, int y, int width, int height) | |||
648 | } | 681 | } |
649 | } | 682 | } |
650 | 683 | ||
651 | /* About Rockbox' internal bitmap format: | 684 | /* About Rockbox' internal monochrome bitmap format: |
652 | * | 685 | * |
653 | * A bitmap contains one bit for every pixel that defines if that pixel is | 686 | * A bitmap contains one bit for every pixel that defines if that pixel is |
654 | * black (1) or white (0). Bits within a byte are arranged vertically, LSB | 687 | * black (1) or white (0). Bits within a byte are arranged vertically, LSB |
@@ -657,12 +690,180 @@ void lcd_fillrect(int x, int y, int width, int height) | |||
657 | * byte 1 2nd from left etc. The first row of bytes defines pixel rows | 690 | * byte 1 2nd from left etc. The first row of bytes defines pixel rows |
658 | * 0..7, the second row defines pixel row 8..15 etc. | 691 | * 0..7, the second row defines pixel row 8..15 etc. |
659 | * | 692 | * |
693 | * This is similar to the internal lcd hw format. */ | ||
694 | |||
695 | /* Draw a partial monochrome bitmap */ | ||
696 | void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, | ||
697 | int stride, int x, int y, int width, int height) | ||
698 | ICODE_ATTR; | ||
699 | void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, | ||
700 | int stride, int x, int y, int width, int height) | ||
701 | { | ||
702 | int shift, ny; | ||
703 | unsigned char *dst, *dst_end; | ||
704 | unsigned mask, mask_bottom; | ||
705 | lcd_blockfunc_type *bfunc; | ||
706 | |||
707 | /* nothing to draw? */ | ||
708 | if ((width <= 0) || (height <= 0) || (x >= LCD_WIDTH) || (y >= LCD_HEIGHT) | ||
709 | || (x + width <= 0) || (y + height <= 0)) | ||
710 | return; | ||
711 | |||
712 | /* clipping */ | ||
713 | if (x < 0) | ||
714 | { | ||
715 | width += x; | ||
716 | src_x -= x; | ||
717 | x = 0; | ||
718 | } | ||
719 | if (y < 0) | ||
720 | { | ||
721 | height += y; | ||
722 | src_y -= y; | ||
723 | y = 0; | ||
724 | } | ||
725 | if (x + width > LCD_WIDTH) | ||
726 | width = LCD_WIDTH - x; | ||
727 | if (y + height > LCD_HEIGHT) | ||
728 | height = LCD_HEIGHT - y; | ||
729 | |||
730 | src += stride * (src_y >> 3) + src_x; /* move starting point */ | ||
731 | src_y &= 7; | ||
732 | y -= src_y; | ||
733 | dst = &lcd_framebuffer[y>>2][x]; | ||
734 | shift = y & 3; | ||
735 | ny = height - 1 + shift + src_y; | ||
736 | |||
737 | bfunc = lcd_blockfuncs[drawmode]; | ||
738 | mask = 0xFFu << (shift + src_y); | ||
739 | mask_bottom = 0xFFu >> (~ny & 7); | ||
740 | |||
741 | if (shift == 0) | ||
742 | { | ||
743 | unsigned dmask1, dmask2, data; | ||
744 | |||
745 | for (; ny >= 8; ny -= 8) | ||
746 | { | ||
747 | const unsigned char *src_row = src; | ||
748 | unsigned char *dst_row = dst + LCD_WIDTH; | ||
749 | |||
750 | dmask1 = dibits[mask&0x0F]; | ||
751 | dmask2 = dibits[(mask>>4)&0x0F]; | ||
752 | dst_end = dst_row + width; | ||
753 | |||
754 | if (dmask1 != 0) | ||
755 | { | ||
756 | do | ||
757 | { | ||
758 | data = *src_row++; | ||
759 | bfunc(dst_row - LCD_WIDTH, dmask1, dibits[data&0x0F]); | ||
760 | bfunc(dst_row++, dmask2, dibits[(data>>4)&0x0F]); | ||
761 | } | ||
762 | while (dst_row < dst_end); | ||
763 | } | ||
764 | else | ||
765 | { | ||
766 | do | ||
767 | bfunc(dst_row++, dmask2, dibits[((*src_row++)>>4)&0x0F]); | ||
768 | while (dst_row < dst_end); | ||
769 | } | ||
770 | src += stride; | ||
771 | dst += 2*LCD_WIDTH; | ||
772 | mask = 0xFFu; | ||
773 | } | ||
774 | mask &= mask_bottom; | ||
775 | dmask1 = dibits[mask&0x0F]; | ||
776 | dmask2 = dibits[(mask>>4)&0x0F]; | ||
777 | dst_end = dst + width; | ||
778 | |||
779 | if (dmask1 != 0) | ||
780 | { | ||
781 | if (dmask2 != 0) | ||
782 | { | ||
783 | do | ||
784 | { | ||
785 | data = *src++; | ||
786 | bfunc(dst, dmask1, dibits[data&0x0F]); | ||
787 | bfunc((dst++) + LCD_WIDTH, dmask2, dibits[(data>>4)&0x0F]); | ||
788 | } | ||
789 | while (dst < dst_end); | ||
790 | } | ||
791 | else | ||
792 | { | ||
793 | do | ||
794 | bfunc(dst++, dmask1, dibits[(*src++)&0x0F]); | ||
795 | while (dst < dst_end); | ||
796 | } | ||
797 | } | ||
798 | else | ||
799 | { | ||
800 | do | ||
801 | bfunc((dst++) + LCD_WIDTH, dmask2, dibits[((*src++)>>4)&0x0F]); | ||
802 | while (dst < dst_end); | ||
803 | } | ||
804 | } | ||
805 | else | ||
806 | { | ||
807 | dst_end = dst + width; | ||
808 | do | ||
809 | { | ||
810 | const unsigned char *src_col = src++; | ||
811 | unsigned char *dst_col = dst++; | ||
812 | unsigned mask_col = mask; | ||
813 | unsigned data = 0; | ||
814 | |||
815 | for (y = ny; y >= 8; y -= 8) | ||
816 | { | ||
817 | data |= *src_col << shift; | ||
818 | |||
819 | if (mask_col & 0xFFu) | ||
820 | { | ||
821 | if (mask_col & 0x0F) | ||
822 | bfunc(dst_col, dibits[mask_col&0x0F], dibits[data&0x0F]); | ||
823 | bfunc(dst_col + LCD_WIDTH, dibits[(mask_col>>4)&0x0F], | ||
824 | dibits[(data>>4)&0x0F]); | ||
825 | mask_col = 0xFFu; | ||
826 | } | ||
827 | else | ||
828 | mask_col >>= 8; | ||
829 | |||
830 | src_col += stride; | ||
831 | dst_col += 2*LCD_WIDTH; | ||
832 | data >>= 8; | ||
833 | } | ||
834 | data |= *src_col << shift; | ||
835 | mask_bottom &= mask_col; | ||
836 | if (mask_bottom & 0x0F) | ||
837 | bfunc(dst_col, dibits[mask_bottom&0x0F], dibits[data&0x0F]); | ||
838 | if (mask_bottom & 0xF0) | ||
839 | bfunc(dst_col + LCD_WIDTH, dibits[(mask_bottom&0xF0)>>4], | ||
840 | dibits[(data>>4)&0x0F]); | ||
841 | } | ||
842 | while (dst < dst_end); | ||
843 | } | ||
844 | } | ||
845 | |||
846 | /* Draw a full monochrome bitmap */ | ||
847 | void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width, int height) | ||
848 | { | ||
849 | lcd_mono_bitmap_part(src, 0, 0, width, x, y, width, height); | ||
850 | } | ||
851 | |||
852 | /* About Rockbox' internal native bitmap format: | ||
853 | * | ||
854 | * A bitmap contains two bits for every pixel. 00 = white, 01 = light grey, | ||
855 | * 10 = dark grey, 11 = black. Bits within a byte are arranged vertically, LSB | ||
856 | * at top. | ||
857 | * The bytes are stored in row-major order, with byte 0 being top left, | ||
858 | * byte 1 2nd from left etc. The first row of bytes defines pixel rows | ||
859 | * 0..3, the second row defines pixel row 4..7 etc. | ||
860 | * | ||
660 | * This is the same as the internal lcd hw format. */ | 861 | * This is the same as the internal lcd hw format. */ |
661 | 862 | ||
662 | /* Draw a partial bitmap */ | 863 | /* Draw a partial native bitmap */ |
663 | void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y, | 864 | void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y, |
664 | int stride, int x, int y, int width, int height) | 865 | int stride, int x, int y, int width, int height) |
665 | __attribute__ ((section(".icode"))); | 866 | ICODE_ATTR; |
666 | void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y, | 867 | void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y, |
667 | int stride, int x, int y, int width, int height) | 868 | int stride, int x, int y, int width, int height) |
668 | { | 869 | { |
@@ -694,32 +895,30 @@ void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y, | |||
694 | if (y + height > LCD_HEIGHT) | 895 | if (y + height > LCD_HEIGHT) |
695 | height = LCD_HEIGHT - y; | 896 | height = LCD_HEIGHT - y; |
696 | 897 | ||
697 | src += stride * (src_y >> 3) + src_x; /* move starting point */ | 898 | src += stride * (src_y >> 2) + src_x; /* move starting point */ |
698 | src_y &= 7; | 899 | src_y &= 3; |
699 | y -= src_y; | 900 | y -= src_y; |
700 | dst = &lcd_framebuffer[y>>3][x]; | 901 | dst = &lcd_framebuffer[y>>2][x]; |
701 | shift = y & 7; | 902 | shift = y & 3; |
702 | ny = height - 1 + shift + src_y; | 903 | ny = height - 1 + shift + src_y; |
703 | 904 | ||
704 | bfunc = lcd_blockfuncs[drawmode]; | 905 | bfunc = lcd_blockfuncs[drawmode]; |
705 | mask = 0xFFu << (shift + src_y); | 906 | mask = 0xFFu << (2 * (shift + src_y)); |
706 | mask_bottom = 0xFFu >> (7 - (ny & 7)); | 907 | mask_bottom = 0xFFu >> (2 * (~ny & 3)); |
707 | 908 | ||
708 | if (shift == 0) | 909 | if (shift == 0) |
709 | { | 910 | { |
710 | bool copyopt = (drawmode == DRMODE_SOLID); | 911 | for (; ny >= 4; ny -= 4) |
711 | |||
712 | for (; ny >= 8; ny -= 8) | ||
713 | { | 912 | { |
714 | if (copyopt && (mask == 0xFFu)) | 913 | if (mask == 0xFFu) |
715 | memcpy(dst, src, width); | 914 | memcpy(dst, src, width); |
716 | else | 915 | else |
717 | { | 916 | { |
718 | const unsigned char *src_row = src; | 917 | const unsigned char *src_row = src; |
719 | unsigned char *dst_row = dst; | 918 | unsigned char *dst_row = dst; |
720 | 919 | ||
721 | dst_end = dst_row + width; | 920 | dst_end = dst_row + width; |
722 | do | 921 | do |
723 | bfunc(dst_row++, mask, *src_row++); | 922 | bfunc(dst_row++, mask, *src_row++); |
724 | while (dst_row < dst_end); | 923 | while (dst_row < dst_end); |
725 | } | 924 | } |
@@ -730,7 +929,7 @@ void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y, | |||
730 | } | 929 | } |
731 | mask &= mask_bottom; | 930 | mask &= mask_bottom; |
732 | 931 | ||
733 | if (copyopt && (mask == 0xFFu)) | 932 | if (mask == 0xFFu) |
734 | memcpy(dst, src, width); | 933 | memcpy(dst, src, width); |
735 | else | 934 | else |
736 | { | 935 | { |
@@ -742,6 +941,7 @@ void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y, | |||
742 | } | 941 | } |
743 | else | 942 | else |
744 | { | 943 | { |
944 | shift *= 2; | ||
745 | dst_end = dst + width; | 945 | dst_end = dst + width; |
746 | do | 946 | do |
747 | { | 947 | { |
@@ -750,7 +950,7 @@ void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y, | |||
750 | unsigned mask_col = mask; | 950 | unsigned mask_col = mask; |
751 | unsigned data = 0; | 951 | unsigned data = 0; |
752 | 952 | ||
753 | for (y = ny; y >= 8; y -= 8) | 953 | for (y = ny; y >= 4; y -= 4) |
754 | { | 954 | { |
755 | data |= *src_col << shift; | 955 | data |= *src_col << shift; |
756 | 956 | ||
@@ -773,7 +973,7 @@ void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y, | |||
773 | } | 973 | } |
774 | } | 974 | } |
775 | 975 | ||
776 | /* Draw a full bitmap */ | 976 | /* Draw a full native bitmap */ |
777 | void lcd_bitmap(const unsigned char *src, int x, int y, int width, int height) | 977 | void lcd_bitmap(const unsigned char *src, int x, int y, int width, int height) |
778 | { | 978 | { |
779 | lcd_bitmap_part(src, 0, 0, width, x, y, width, height); | 979 | lcd_bitmap_part(src, 0, 0, width, x, y, width, height); |
@@ -807,7 +1007,7 @@ static void lcd_putsxyofs(int x, int y, int ofs, const unsigned char *str) | |||
807 | bits = pf->bits + (pf->offset ? | 1007 | bits = pf->bits + (pf->offset ? |
808 | pf->offset[ch] : ((pf->height + 7) / 8 * pf->maxwidth * ch)); | 1008 | pf->offset[ch] : ((pf->height + 7) / 8 * pf->maxwidth * ch)); |
809 | 1009 | ||
810 | lcd_bitmap_part(bits, ofs, 0, width, x, y, width - ofs, pf->height); | 1010 | lcd_mono_bitmap_part(bits, ofs, 0, width, x, y, width - ofs, pf->height); |
811 | 1011 | ||
812 | x += width - ofs; | 1012 | x += width - ofs; |
813 | ofs = 0; | 1013 | ofs = 0; |
@@ -825,7 +1025,7 @@ void lcd_putsxy(int x, int y, const unsigned char *str) | |||
825 | void lcd_puts_style(int x, int y, const unsigned char *str, int style) | 1025 | void lcd_puts_style(int x, int y, const unsigned char *str, int style) |
826 | { | 1026 | { |
827 | int xpos,ypos,w,h; | 1027 | int xpos,ypos,w,h; |
828 | int lastmode = lcd_get_drawmode(); | 1028 | int lastmode = drawmode; |
829 | 1029 | ||
830 | /* make sure scrolling is turned off on the line we are updating */ | 1030 | /* make sure scrolling is turned off on the line we are updating */ |
831 | scrolling_lines &= ~(1 << y); | 1031 | scrolling_lines &= ~(1 << y); |
@@ -837,14 +1037,14 @@ void lcd_puts_style(int x, int y, const unsigned char *str, int style) | |||
837 | xpos = xmargin + x*w / strlen(str); | 1037 | xpos = xmargin + x*w / strlen(str); |
838 | ypos = ymargin + y*h; | 1038 | ypos = ymargin + y*h; |
839 | lcd_putsxy(xpos, ypos, str); | 1039 | lcd_putsxy(xpos, ypos, str); |
840 | lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 1040 | drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID); |
841 | lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h); | 1041 | lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h); |
842 | if (style & STYLE_INVERT) | 1042 | if (style & STYLE_INVERT) |
843 | { | 1043 | { |
844 | lcd_set_drawmode(DRMODE_COMPLEMENT); | 1044 | drawmode = DRMODE_COMPLEMENT; |
845 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, h); | 1045 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, h); |
846 | } | 1046 | } |
847 | lcd_set_drawmode(lastmode); | 1047 | drawmode = lastmode; |
848 | } | 1048 | } |
849 | 1049 | ||
850 | /* put a string at a given char position */ | 1050 | /* put a string at a given char position */ |
@@ -1006,17 +1206,17 @@ static void scroll_thread(void) | |||
1006 | s->offset %= s->width; | 1206 | s->offset %= s->width; |
1007 | } | 1207 | } |
1008 | 1208 | ||
1009 | lastmode = lcd_get_drawmode(); | 1209 | lastmode = drawmode; |
1010 | lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 1210 | drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID); |
1011 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); | 1211 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); |
1012 | lcd_set_drawmode(DRMODE_SOLID); | 1212 | drawmode = DRMODE_SOLID; |
1013 | lcd_putsxyofs(xpos, ypos, s->offset, s->line); | 1213 | lcd_putsxyofs(xpos, ypos, s->offset, s->line); |
1014 | if (s->invert) | 1214 | if (s->invert) |
1015 | { | 1215 | { |
1016 | lcd_set_drawmode(DRMODE_COMPLEMENT); | 1216 | drawmode = DRMODE_COMPLEMENT; |
1017 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); | 1217 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); |
1018 | } | 1218 | } |
1019 | lcd_set_drawmode(lastmode); | 1219 | drawmode = lastmode; |
1020 | lcd_update_rect(xpos, ypos, LCD_WIDTH - xpos, pf->height); | 1220 | lcd_update_rect(xpos, ypos, LCD_WIDTH - xpos, pf->height); |
1021 | } | 1221 | } |
1022 | 1222 | ||
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index b0308c6c77..37a15961d5 100644 --- a/firmware/drivers/lcd-recorder.c +++ b/firmware/drivers/lcd-recorder.c | |||
@@ -868,7 +868,7 @@ static void lcd_putsxyofs(int x, int y, int ofs, const unsigned char *str) | |||
868 | bits = pf->bits + (pf->offset ? | 868 | bits = pf->bits + (pf->offset ? |
869 | pf->offset[ch] : ((pf->height + 7) / 8 * pf->maxwidth * ch)); | 869 | pf->offset[ch] : ((pf->height + 7) / 8 * pf->maxwidth * ch)); |
870 | 870 | ||
871 | lcd_bitmap_part(bits, ofs, 0, width, x, y, width - ofs, pf->height); | 871 | lcd_mono_bitmap_part(bits, ofs, 0, width, x, y, width - ofs, pf->height); |
872 | 872 | ||
873 | x += width - ofs; | 873 | x += width - ofs; |
874 | ofs = 0; | 874 | ofs = 0; |
diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h index 464561d90d..57fd7d8d92 100644 --- a/firmware/export/config-player.h +++ b/firmware/export/config-player.h | |||
@@ -4,6 +4,7 @@ | |||
4 | /* LCD dimensions (for the simulator) */ | 4 | /* LCD dimensions (for the simulator) */ |
5 | #define LCD_WIDTH (4*11*6) /* Display width in pixels */ | 5 | #define LCD_WIDTH (4*11*6) /* Display width in pixels */ |
6 | #define LCD_HEIGHT (4*16+2*24) /* 4*char + 2*icons */ | 6 | #define LCD_HEIGHT (4*16+2*24) /* 4*char + 2*icons */ |
7 | #define LCD_DEPTH 1 | ||
7 | 8 | ||
8 | /* define this if you have the Player's keyboard */ | 9 | /* define this if you have the Player's keyboard */ |
9 | #define CONFIG_KEYPAD PLAYER_PAD | 10 | #define CONFIG_KEYPAD PLAYER_PAD |
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 5f93e7cbc3..f5f16d0f0a 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h | |||
@@ -121,7 +121,7 @@ extern void lcd_jump_scroll_delay(int ms); | |||
121 | #define DRMODE_INVERSEVID 4 /* used as bit modifier for basic modes */ | 121 | #define DRMODE_INVERSEVID 4 /* used as bit modifier for basic modes */ |
122 | 122 | ||
123 | /* Low-level drawing function types */ | 123 | /* Low-level drawing function types */ |
124 | typedef void lcd_pixelfunc_type(int x, int y); /* for b&w */ | 124 | typedef void lcd_pixelfunc_type(int x, int y); |
125 | typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned bits); | 125 | typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned bits); |
126 | 126 | ||
127 | #if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR) | 127 | #if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR) |
@@ -131,7 +131,12 @@ typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned | |||
131 | #define INVERT_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] ^= (1<<((y)&7)) | 131 | #define INVERT_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] ^= (1<<((y)&7)) |
132 | 132 | ||
133 | /* Memory copy of display bitmap */ | 133 | /* Memory copy of display bitmap */ |
134 | #if LCD_DEPTH == 1 | ||
134 | extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; | 135 | extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; |
136 | #elif LCD_DEPTH == 2 | ||
137 | #define MAX_LEVEL 3 | ||
138 | extern unsigned char lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH]; | ||
139 | #endif | ||
135 | 140 | ||
136 | extern void lcd_set_invert_display(bool yesno); | 141 | extern void lcd_set_invert_display(bool yesno); |
137 | extern void lcd_set_flip(bool yesno); | 142 | extern void lcd_set_flip(bool yesno); |
@@ -165,6 +170,20 @@ extern void lcd_invertscroll(int x, int y); | |||
165 | extern void lcd_bidir_scroll(int threshold); | 170 | extern void lcd_bidir_scroll(int threshold); |
166 | extern void lcd_scroll_step(int pixels); | 171 | extern void lcd_scroll_step(int pixels); |
167 | 172 | ||
173 | #if LCD_DEPTH > 1 | ||
174 | extern void lcd_set_foreground(int brightness); | ||
175 | extern int lcd_get_foreground(void); | ||
176 | extern void lcd_set_background(int brightness); | ||
177 | extern int lcd_get_background(void); | ||
178 | extern void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, | ||
179 | int stride, int x, int y, int width, int height); | ||
180 | extern void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width, | ||
181 | int height); | ||
182 | #else /* LCD_DEPTH == 1 */ | ||
183 | #define lcd_mono_bitmap lcd_bitmap | ||
184 | #define lcd_mono_bitmap_part lcd_bitmap_part | ||
185 | #endif | ||
186 | |||
168 | #endif /* CHARCELLS / BITMAP */ | 187 | #endif /* CHARCELLS / BITMAP */ |
169 | 188 | ||
170 | /* internal usage, but in multiple drivers */ | 189 | /* internal usage, but in multiple drivers */ |
diff --git a/uisimulator/win32/lcd-win32.c b/uisimulator/win32/lcd-win32.c index ef85214e8f..11296884b7 100644 --- a/uisimulator/win32/lcd-win32.c +++ b/uisimulator/win32/lcd-win32.c | |||
@@ -23,33 +23,28 @@ | |||
23 | #include "lcd.h" | 23 | #include "lcd.h" |
24 | #include "lcd-playersim.h" | 24 | #include "lcd-playersim.h" |
25 | 25 | ||
26 | unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; /* the display */ | ||
27 | char bitmap[LCD_HEIGHT][LCD_WIDTH]; /* the ui display */ | 26 | char bitmap[LCD_HEIGHT][LCD_WIDTH]; /* the ui display */ |
28 | 27 | ||
29 | BITMAPINFO2 bmi = | 28 | RGBQUAD color_zero = {UI_LCD_BGCOLORLIGHT, 0}; |
29 | RGBQUAD color_max = {0, 0, 0, 0}; | ||
30 | |||
31 | BITMAPINFO256 bmi = | ||
30 | { | 32 | { |
31 | {sizeof (BITMAPINFOHEADER), | 33 | {sizeof (BITMAPINFOHEADER), |
32 | LCD_WIDTH, -LCD_HEIGHT, 1, 8, | 34 | LCD_WIDTH, -LCD_HEIGHT, 1, 8, |
33 | BI_RGB, 0, 0, 0, 2, 2, | 35 | BI_RGB, 0, 0, 0, 2, 2, |
34 | }, | 36 | }, |
35 | { | 37 | {} /* colour lookup table gets filled later */ |
36 | //{UI_LCD_BGCOLOR, 0}, /* green background color */ | ||
37 | {UI_LCD_BGCOLORLIGHT, 0}, /* green background color */ | ||
38 | {UI_LCD_BLACK, 0} /* black color */ | ||
39 | } | ||
40 | |||
41 | }; /* bitmap information */ | 38 | }; /* bitmap information */ |
42 | 39 | ||
43 | #ifdef HAVE_LCD_CHARCELLS | 40 | #ifdef HAVE_LCD_BITMAP |
44 | /* Defined in lcd-playersim.c */ | 41 | |
45 | extern void lcd_print_char(int x, int y); | 42 | #if LCD_DEPTH == 1 |
46 | extern bool lcd_display_redraw; | 43 | extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; /* the display */ |
47 | extern unsigned char hardware_buffer_lcd[11][2]; | 44 | #elif LCD_DEPTH == 2 |
48 | static unsigned char lcd_buffer_copy[11][2]; | 45 | extern unsigned char lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH]; /* the display */ |
49 | #endif | 46 | #endif |
50 | 47 | ||
51 | /* lcd_update() | ||
52 | update lcd */ | ||
53 | void lcd_update() | 48 | void lcd_update() |
54 | { | 49 | { |
55 | int x, y; | 50 | int x, y; |
@@ -58,26 +53,13 @@ void lcd_update() | |||
58 | if (hGUIWnd == NULL) | 53 | if (hGUIWnd == NULL) |
59 | _endthread (); | 54 | _endthread (); |
60 | 55 | ||
61 | #ifdef HAVE_LCD_CHARCELLS | ||
62 | for (y = 0; y < 2; y++) | ||
63 | { | ||
64 | for (x = 0; x < 11; x++) | ||
65 | { | ||
66 | if (lcd_display_redraw || | ||
67 | lcd_buffer_copy[x][y] != hardware_buffer_lcd[x][y]) | ||
68 | { | ||
69 | lcd_buffer_copy[x][y] = hardware_buffer_lcd[x][y]; | ||
70 | lcd_print_char(x, y); | ||
71 | } | ||
72 | } | ||
73 | } | ||
74 | |||
75 | lcd_display_redraw = false; | ||
76 | #endif | ||
77 | |||
78 | for (x = 0; x < LCD_WIDTH; x++) | 56 | for (x = 0; x < LCD_WIDTH; x++) |
79 | for (y = 0; y < LCD_HEIGHT; y++) | 57 | for (y = 0; y < LCD_HEIGHT; y++) |
58 | #if LCD_DEPTH == 1 | ||
80 | bitmap[y][x] = ((lcd_framebuffer[y/8][x] >> (y & 7)) & 1); | 59 | bitmap[y][x] = ((lcd_framebuffer[y/8][x] >> (y & 7)) & 1); |
60 | #elif LCD_DEPTH == 2 | ||
61 | bitmap[y][x] = ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3); | ||
62 | #endif | ||
81 | 63 | ||
82 | /* Invalidate only the window part that actually did change */ | 64 | /* Invalidate only the window part that actually did change */ |
83 | GetClientRect (hGUIWnd, &r); | 65 | GetClientRect (hGUIWnd, &r); |
@@ -108,7 +90,11 @@ void lcd_update_rect(int x_start, int y_start, | |||
108 | 90 | ||
109 | for (x = x_start; x < xmax; x++) | 91 | for (x = x_start; x < xmax; x++) |
110 | for (y = y_start; y < ymax; y++) | 92 | for (y = y_start; y < ymax; y++) |
93 | #if LCD_DEPTH == 1 | ||
111 | bitmap[y][x] = ((lcd_framebuffer[y/8][x] >> (y & 7)) & 1); | 94 | bitmap[y][x] = ((lcd_framebuffer[y/8][x] >> (y & 7)) & 1); |
95 | #elif LCD_DEPTH == 2 | ||
96 | bitmap[y][x] = ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3); | ||
97 | #endif | ||
112 | 98 | ||
113 | /* Invalidate only the window part that actually did change */ | 99 | /* Invalidate only the window part that actually did change */ |
114 | GetClientRect (hGUIWnd, &r); | 100 | GetClientRect (hGUIWnd, &r); |
@@ -136,37 +122,55 @@ void lcd_remote_update_rect(int x_start, int y_start, | |||
136 | (void)width; | 122 | (void)width; |
137 | (void)height; | 123 | (void)height; |
138 | } | 124 | } |
125 | #endif /* HAVE_LCD_BITMAP */ | ||
139 | 126 | ||
140 | /* lcd_backlight() | 127 | #ifdef HAVE_LCD_CHARCELLS |
141 | set backlight state of lcd */ | 128 | /* Defined in lcd-playersim.c */ |
142 | void lcd_backlight (bool on) | 129 | extern void lcd_print_char(int x, int y); |
130 | extern bool lcd_display_redraw; | ||
131 | extern unsigned char hardware_buffer_lcd[11][2]; | ||
132 | static unsigned char lcd_buffer_copy[11][2]; | ||
133 | |||
134 | void lcd_update() | ||
143 | { | 135 | { |
144 | if (on) | 136 | int x, y; |
137 | bool changed = false; | ||
138 | RECT r; | ||
139 | |||
140 | if (hGUIWnd == NULL) | ||
141 | _endthread (); | ||
142 | |||
143 | for (y = 0; y < 2; y++) | ||
145 | { | 144 | { |
146 | RGBQUAD blon = {UI_LCD_BGCOLORLIGHT, 0}; | 145 | for (x = 0; x < 11; x++) |
147 | bmi.bmiColors[0] = blon; | 146 | { |
147 | if (lcd_display_redraw || | ||
148 | lcd_buffer_copy[x][y] != hardware_buffer_lcd[x][y]) | ||
149 | { | ||
150 | lcd_buffer_copy[x][y] = hardware_buffer_lcd[x][y]; | ||
151 | lcd_print_char(x, y); | ||
152 | changed = true; | ||
153 | } | ||
154 | } | ||
148 | } | 155 | } |
149 | else | 156 | if (changed) |
150 | { | 157 | { |
151 | RGBQUAD blon = {UI_LCD_BGCOLOR, 0}; | 158 | /* Invalidate only the window part that actually did change */ |
152 | bmi.bmiColors[0] = blon; | 159 | GetClientRect (hGUIWnd, &r); |
160 | r.left = UI_LCD_POSX * r.right / UI_WIDTH; | ||
161 | r.top = UI_LCD_POSY * r.bottom / UI_HEIGHT; | ||
162 | r.right = (UI_LCD_POSX + UI_LCD_WIDTH) * r.right / UI_WIDTH; | ||
163 | r.bottom = (UI_LCD_POSY + UI_LCD_HEIGHT) * r.bottom / UI_HEIGHT; | ||
164 | InvalidateRect (hGUIWnd, &r, FALSE); | ||
153 | } | 165 | } |
154 | 166 | lcd_display_redraw = false; | |
155 | InvalidateRect (hGUIWnd, NULL, FALSE); | ||
156 | } | 167 | } |
157 | 168 | ||
158 | void drawdots(int color, struct coordinate *points, int count) | 169 | void drawdots(int color, struct coordinate *points, int count) |
159 | { | 170 | { |
160 | while (count--) | 171 | while (count--) |
161 | { | 172 | { |
162 | if (color) | 173 | bitmap[points[count].y][points[count].x] = color; |
163 | { | ||
164 | DRAW_PIXEL(points[count].x, points[count].y); | ||
165 | } | ||
166 | else | ||
167 | { | ||
168 | CLEAR_PIXEL(points[count].x, points[count].y); | ||
169 | } | ||
170 | } | 174 | } |
171 | } | 175 | } |
172 | 176 | ||
@@ -181,17 +185,50 @@ void drawrectangles(int color, struct rectangle *points, int count) | |||
181 | 185 | ||
182 | for (x = points[count].x, ix = 0; ix < points[count].width; x++, ix++) | 186 | for (x = points[count].x, ix = 0; ix < points[count].width; x++, ix++) |
183 | { | 187 | { |
184 | for (y = points[count].y, iy = 0; iy < points[count].width; y++, iy++) | 188 | for (y = points[count].y, iy = 0; iy < points[count].height; y++, iy++) |
185 | { | 189 | { |
186 | if (color) | 190 | bitmap[y][x] = color; |
187 | { | ||
188 | DRAW_PIXEL(x, y); | ||
189 | } | ||
190 | else | ||
191 | { | ||
192 | CLEAR_PIXEL(x, y); | ||
193 | } | ||
194 | } | 191 | } |
195 | } | 192 | } |
196 | } | 193 | } |
197 | } | 194 | } |
195 | #endif /* HAVE_LCD_CHARCELLS */ | ||
196 | |||
197 | #if 0 | ||
198 | /* set backlight state of lcd */ | ||
199 | void lcd_backlight (bool on) | ||
200 | { | ||
201 | if (on) | ||
202 | color_zero = {UI_LCD_BGCOLORLIGHT, 0}; | ||
203 | else | ||
204 | color_zero = {UI_LCD_BGCOLOR, 0}; | ||
205 | |||
206 | lcdcolors(0, (1<<LCD_DEPTH), &color_zero, &color_max); | ||
207 | InvalidateRect (hGUIWnd, NULL, FALSE); | ||
208 | } | ||
209 | #endif | ||
210 | |||
211 | /* set a range of bitmap indices to a gradient from startcolour to endcolour */ | ||
212 | void lcdcolors(int index, int count, RGBQUAD *start, RGBQUAD *end) | ||
213 | { | ||
214 | int i; | ||
215 | count--; | ||
216 | for (i = 0; i <= count; i++) | ||
217 | { | ||
218 | bmi.bmiColors[i+index].rgbRed = start->rgbRed | ||
219 | + (end->rgbRed - start->rgbRed) * i / count; | ||
220 | bmi.bmiColors[i+index].rgbGreen = start->rgbGreen | ||
221 | + (end->rgbGreen - start->rgbGreen) * i / count; | ||
222 | bmi.bmiColors[i+index].rgbBlue = start->rgbBlue | ||
223 | + (end->rgbBlue - start->rgbBlue) * i / count; | ||
224 | } | ||
225 | } | ||
226 | |||
227 | /* initialise simulator lcd driver */ | ||
228 | void simlcdinit(void) | ||
229 | { | ||
230 | bmi.bmiHeader.biClrUsed = (1<<LCD_DEPTH); | ||
231 | bmi.bmiHeader.biClrImportant = (1<<LCD_DEPTH); | ||
232 | lcdcolors(0, (1<<LCD_DEPTH), &color_zero, &color_max); | ||
233 | } | ||
234 | |||
diff --git a/uisimulator/win32/lcd-win32.h b/uisimulator/win32/lcd-win32.h index d2627e6a53..26a47208e5 100644 --- a/uisimulator/win32/lcd-win32.h +++ b/uisimulator/win32/lcd-win32.h | |||
@@ -23,24 +23,16 @@ | |||
23 | #include "uisw32.h" | 23 | #include "uisw32.h" |
24 | #include "lcd.h" | 24 | #include "lcd.h" |
25 | 25 | ||
26 | // BITMAPINFO2 | 26 | // BITMAPINFO256 |
27 | typedef struct | 27 | typedef struct |
28 | { | 28 | { |
29 | BITMAPINFOHEADER bmiHeader; | 29 | BITMAPINFOHEADER bmiHeader; |
30 | RGBQUAD bmiColors[2]; | 30 | RGBQUAD bmiColors[256]; |
31 | } BITMAPINFO2; | 31 | } BITMAPINFO256; |
32 | 32 | ||
33 | #ifdef HAVE_LCD_BITMAP | 33 | extern char bitmap[LCD_HEIGHT][LCD_WIDTH]; // the ui display |
34 | 34 | extern BITMAPINFO256 bmi; // bitmap information | |
35 | extern unsigned char display[LCD_WIDTH][LCD_HEIGHT/8]; // the display | ||
36 | #else | ||
37 | #define DISP_X 112 | ||
38 | #define DISP_Y 64 | ||
39 | #endif | ||
40 | |||
41 | |||
42 | extern char bitmap[LCD_HEIGHT][LCD_WIDTH]; // the ui display | ||
43 | extern BITMAPINFO2 bmi; // bitmap information | ||
44 | 35 | ||
36 | void simlcdinit(void); | ||
45 | 37 | ||
46 | #endif // #ifndef __LCDWIN32_H__ | 38 | #endif // #ifndef __LCDWIN32_H__ |
diff --git a/uisimulator/win32/uisw32.c b/uisimulator/win32/uisw32.c index 9401153408..fb581c0cf1 100644 --- a/uisimulator/win32/uisw32.c +++ b/uisimulator/win32/uisw32.c | |||
@@ -239,6 +239,8 @@ BOOL GUIStartup () | |||
239 | 239 | ||
240 | if (hGUIWnd == NULL) | 240 | if (hGUIWnd == NULL) |
241 | return FALSE; | 241 | return FALSE; |
242 | |||
243 | simlcdinit(); | ||
242 | 244 | ||
243 | return TRUE; | 245 | return TRUE; |
244 | } | 246 | } |
diff --git a/uisimulator/x11/lcd-x11.c b/uisimulator/x11/lcd-x11.c index 1ee15f9169..d538cee9df 100644 --- a/uisimulator/x11/lcd-x11.c +++ b/uisimulator/x11/lcd-x11.c | |||
@@ -40,11 +40,19 @@ | |||
40 | #include "lcd-x11.h" | 40 | #include "lcd-x11.h" |
41 | #include "lcd-playersim.h" | 41 | #include "lcd-playersim.h" |
42 | 42 | ||
43 | extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; | 43 | #if LCD_DEPTH == 2 |
44 | #define YBLOCK 4 | ||
45 | #define BITOFFS 1 /* take the MSB of each pixel */ | ||
46 | #else | ||
47 | #define YBLOCK 8 | ||
48 | #define BITOFFS 0 | ||
49 | #endif | ||
50 | |||
44 | extern void screen_resized(int width, int height); | 51 | extern void screen_resized(int width, int height); |
45 | 52 | ||
46 | #ifdef HAVE_LCD_BITMAP | 53 | #ifdef HAVE_LCD_BITMAP |
47 | unsigned char lcd_framebuffer_copy[LCD_HEIGHT/8][LCD_WIDTH]; | 54 | extern unsigned char lcd_framebuffer[LCD_HEIGHT/YBLOCK][LCD_WIDTH]; |
55 | unsigned char lcd_framebuffer_copy[LCD_HEIGHT/YBLOCK][LCD_WIDTH]; | ||
48 | 56 | ||
49 | void lcd_update (void) | 57 | void lcd_update (void) |
50 | { | 58 | { |
@@ -55,21 +63,21 @@ void lcd_update (void) | |||
55 | int cp=0; | 63 | int cp=0; |
56 | struct coordinate clearpoints[LCD_WIDTH * LCD_HEIGHT]; | 64 | struct coordinate clearpoints[LCD_WIDTH * LCD_HEIGHT]; |
57 | 65 | ||
58 | for(y=0; y<LCD_HEIGHT; y+=8) { | 66 | for(y=0; y<LCD_HEIGHT; y+=YBLOCK) { |
59 | for(x=0; x<LCD_WIDTH; x++) { | 67 | for(x=0; x<LCD_WIDTH; x++) { |
60 | if(lcd_framebuffer[y/8][x] || lcd_framebuffer_copy[y/8][x]) { | 68 | if(lcd_framebuffer[y/YBLOCK][x] || lcd_framebuffer_copy[y/YBLOCK][x]) { |
61 | /* one or more bits/pixels are changed */ | 69 | /* one or more bits/pixels are changed */ |
62 | unsigned char diff = | 70 | unsigned char diff = |
63 | lcd_framebuffer[y/8][x] ^ lcd_framebuffer_copy[y/8][x]; | 71 | lcd_framebuffer[y/YBLOCK][x] ^ lcd_framebuffer_copy[y/YBLOCK][x]; |
64 | 72 | ||
65 | for(bit=0; bit<8; bit++) { | 73 | for(bit=0; bit<YBLOCK; bit++) { |
66 | if(lcd_framebuffer[y/8][x]&(1<<bit)) { | 74 | if(lcd_framebuffer[y/YBLOCK][x]&(1<<(bit*LCD_DEPTH+BITOFFS))) { |
67 | /* set a dot */ | 75 | /* set a dot */ |
68 | points[p].x = x + MARGIN_X; | 76 | points[p].x = x + MARGIN_X; |
69 | points[p].y = y+bit + MARGIN_Y; | 77 | points[p].y = y+bit + MARGIN_Y; |
70 | p++; /* increase the point counter */ | 78 | p++; /* increase the point counter */ |
71 | } | 79 | } |
72 | else if(diff &(1<<bit)) { | 80 | else if(diff &(1<<(bit*LCD_DEPTH+BITOFFS))) { |
73 | /* clear a dot */ | 81 | /* clear a dot */ |
74 | clearpoints[cp].x = x + MARGIN_X; | 82 | clearpoints[cp].x = x + MARGIN_X; |
75 | clearpoints[cp].y = y+bit + MARGIN_Y; | 83 | clearpoints[cp].y = y+bit + MARGIN_Y; |
@@ -110,33 +118,33 @@ void lcd_update_rect(int x_start, int y_start, | |||
110 | fprintf(stderr, "%04d: lcd_update_rect(%d, %d, %d, %d)\n", | 118 | fprintf(stderr, "%04d: lcd_update_rect(%d, %d, %d, %d)\n", |
111 | counter++, x_start, y_start, width, height); | 119 | counter++, x_start, y_start, width, height); |
112 | #endif | 120 | #endif |
113 | /* The Y coordinates have to work on even 8 pixel rows */ | 121 | /* The Y coordinates have to work on even YBLOCK pixel rows */ |
114 | ymax = (yline + height)/8; | 122 | ymax = (yline + height)/YBLOCK; |
115 | yline /= 8; | 123 | yline /= YBLOCK; |
116 | 124 | ||
117 | xmax = x_start + width; | 125 | xmax = x_start + width; |
118 | 126 | ||
119 | if(xmax > LCD_WIDTH) | 127 | if(xmax > LCD_WIDTH) |
120 | xmax = LCD_WIDTH; | 128 | xmax = LCD_WIDTH; |
121 | if(ymax >= LCD_HEIGHT/8) | 129 | if(ymax >= LCD_HEIGHT/YBLOCK) |
122 | ymax = LCD_HEIGHT/8-1; | 130 | ymax = LCD_HEIGHT/YBLOCK-1; |
123 | 131 | ||
124 | for(; yline<=ymax; yline++) { | 132 | for(; yline<=ymax; yline++) { |
125 | y = yline * 8; | 133 | y = yline * YBLOCK; |
126 | for(x=x_start; x<xmax; x++) { | 134 | for(x=x_start; x<xmax; x++) { |
127 | if(lcd_framebuffer[yline][x] || lcd_framebuffer_copy[yline][x]) { | 135 | if(lcd_framebuffer[yline][x] || lcd_framebuffer_copy[yline][x]) { |
128 | /* one or more bits/pixels are changed */ | 136 | /* one or more bits/pixels are changed */ |
129 | unsigned char diff = | 137 | unsigned char diff = |
130 | lcd_framebuffer[yline][x] ^ lcd_framebuffer_copy[yline][x]; | 138 | lcd_framebuffer[yline][x] ^ lcd_framebuffer_copy[yline][x]; |
131 | 139 | ||
132 | for(bit=0; bit<8; bit++) { | 140 | for(bit=0; bit<YBLOCK; bit++) { |
133 | if(lcd_framebuffer[yline][x]&(1<<bit)) { | 141 | if(lcd_framebuffer[yline][x]&(1<<(bit*LCD_DEPTH+BITOFFS))) { |
134 | /* set a dot */ | 142 | /* set a dot */ |
135 | points[p].x = x + MARGIN_X; | 143 | points[p].x = x + MARGIN_X; |
136 | points[p].y = y+bit + MARGIN_Y; | 144 | points[p].y = y+bit + MARGIN_Y; |
137 | p++; /* increase the point counter */ | 145 | p++; /* increase the point counter */ |
138 | } | 146 | } |
139 | else if(diff &(1<<bit)) { | 147 | else if(diff &(1<<(bit*LCD_DEPTH+BITOFFS))) { |
140 | /* clear a dot */ | 148 | /* clear a dot */ |
141 | clearpoints[cp].x = x + MARGIN_X; | 149 | clearpoints[cp].x = x + MARGIN_X; |
142 | clearpoints[cp].y = y+bit + MARGIN_Y; | 150 | clearpoints[cp].y = y+bit + MARGIN_Y; |