summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/2048.c2
-rw-r--r--apps/plugins/SOURCES12
-rw-r--r--apps/plugins/SOURCES.app_build4
-rw-r--r--apps/plugins/SUBDIRS5
-rw-r--r--apps/plugins/SUBDIRS.app_build3
-rw-r--r--apps/plugins/battery_bench.c17
-rw-r--r--apps/plugins/bitmaps/mono/SOURCES3
-rw-r--r--apps/plugins/bitmaps/native/SOURCES4
-rw-r--r--apps/plugins/chessclock.c8
-rw-r--r--apps/plugins/cube.c34
-rw-r--r--apps/plugins/disktidy.c2
-rw-r--r--apps/plugins/flipit.c7
-rw-r--r--apps/plugins/greyscale.c4
-rw-r--r--apps/plugins/jackpot.c2
-rw-r--r--apps/plugins/lib/SOURCES8
-rw-r--r--apps/plugins/lib/checkbox.h4
-rw-r--r--apps/plugins/lib/display_text.c8
-rw-r--r--apps/plugins/lib/grey.h4
-rw-r--r--apps/plugins/lib/highscore.c35
-rw-r--r--apps/plugins/lib/mylcd.h28
-rw-r--r--apps/plugins/lib/pluginlib_bmp.h2
-rw-r--r--apps/plugins/lib/simple_viewer.c20
-rw-r--r--apps/plugins/lib/xlcd.h3
-rw-r--r--apps/plugins/lib/xlcd_core.c3
-rw-r--r--apps/plugins/lib/xlcd_draw.c3
-rw-r--r--apps/plugins/logo.c30
-rw-r--r--apps/plugins/lrcplayer.c73
-rw-r--r--apps/plugins/lua/rocklib_img.c7
-rw-r--r--apps/plugins/lua/rocklib_img.h2
-rw-r--r--apps/plugins/metronome.c55
-rw-r--r--apps/plugins/mosaique.c7
-rw-r--r--apps/plugins/otp.c2
-rw-r--r--apps/plugins/pegbox.c2
-rw-r--r--apps/plugins/properties.c4
-rw-r--r--apps/plugins/rockblox.c33
-rw-r--r--apps/plugins/search.c4
-rw-r--r--apps/plugins/searchengine/searchengine.h8
-rw-r--r--apps/plugins/shortcuts/shortcuts_view.c4
-rw-r--r--apps/plugins/snow.c16
-rw-r--r--apps/plugins/stats.c7
-rw-r--r--apps/plugins/stopwatch.c8
-rw-r--r--apps/plugins/test_mem.c4
-rw-r--r--apps/plugins/test_viewports.c62
-rw-r--r--apps/plugins/text_viewer/text_viewer.c2
-rw-r--r--apps/plugins/text_viewer/tv_action.c4
-rw-r--r--apps/plugins/text_viewer/tv_bookmark.c4
-rw-r--r--apps/plugins/text_viewer/tv_display.c73
-rw-r--r--apps/plugins/text_viewer/tv_menu.c18
-rw-r--r--apps/plugins/text_viewer/tv_preferences.c10
-rw-r--r--apps/plugins/text_viewer/tv_preferences.h3
-rw-r--r--apps/plugins/text_viewer/tv_settings.c4
-rw-r--r--apps/plugins/text_viewer/tv_text_processor.c11
-rw-r--r--apps/plugins/theme_remove.c43
-rw-r--r--apps/plugins/wav2wv.c4
54 files changed, 27 insertions, 702 deletions
diff --git a/apps/plugins/2048.c b/apps/plugins/2048.c
index 5dd5a7e99f..08be294d88 100644
--- a/apps/plugins/2048.c
+++ b/apps/plugins/2048.c
@@ -41,10 +41,8 @@
41#include "lib/pluginlib_actions.h" 41#include "lib/pluginlib_actions.h"
42#include "lib/pluginlib_exit.h" 42#include "lib/pluginlib_exit.h"
43 43
44#ifdef HAVE_LCD_BITMAP
45#include "pluginbitmaps/_2048_background.h" 44#include "pluginbitmaps/_2048_background.h"
46#include "pluginbitmaps/_2048_tiles.h" 45#include "pluginbitmaps/_2048_tiles.h"
47#endif
48 46
49/* some constants */ 47/* some constants */
50 48
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index 96ad535863..5d24bee8f6 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -79,7 +79,7 @@ wolf3d.c
79#endif 79#endif
80#endif 80#endif
81 81
82#if PLUGIN_BUFFER_SIZE <= 0x20000 && defined(HAVE_LCD_BITMAP) 82#if PLUGIN_BUFFER_SIZE <= 0x20000
83 83
84#if CONFIG_KEYPAD != SANSA_M200_PAD \ 84#if CONFIG_KEYPAD != SANSA_M200_PAD \
85 && CONFIG_KEYPAD != HM60X_PAD 85 && CONFIG_KEYPAD != HM60X_PAD
@@ -92,7 +92,7 @@ chessbox.c
92goban.c 92goban.c
93pictureflow.c 93pictureflow.c
94 94
95#endif /* PLUGIN_BUFFER_SIZE <= 0x20000 && HAVE_LCD_BITMAP */ 95#endif /* PLUGIN_BUFFER_SIZE <= 0x20000 */
96 96
97#if defined(IRIVER_H100_SERIES) 97#if defined(IRIVER_H100_SERIES)
98iriver_flash.c 98iriver_flash.c
@@ -106,8 +106,6 @@ crypt_firmware.c
106 106
107metronome.c 107metronome.c
108 108
109#ifdef HAVE_LCD_BITMAP /* Not for the Archos Player */
110
1112048.c 1092048.c
112 110
113/* Lua needs at least 160 KB to work in */ 111/* Lua needs at least 160 KB to work in */
@@ -173,8 +171,6 @@ rockpaint.c
173 171
174rocklife.c 172rocklife.c
175 173
176#endif /* HAVE_LCD_BITMAP */
177
178#if LCD_DEPTH > 1 /* non-mono bitmap targets */ 174#if LCD_DEPTH > 1 /* non-mono bitmap targets */
179 175
180matrix.c 176matrix.c
@@ -198,7 +194,6 @@ test_codec.c
198test_core_jpeg.c 194test_core_jpeg.c
199#endif 195#endif
200test_disk.c 196test_disk.c
201#ifdef HAVE_LCD_BITMAP
202test_fps.c 197test_fps.c
203test_gfx.c 198test_gfx.c
204#if LCD_DEPTH < 4 && !defined(SIMULATOR) 199#if LCD_DEPTH < 4 && !defined(SIMULATOR)
@@ -208,11 +203,8 @@ test_scanrate.c
208test_grey.c 203test_grey.c
209test_greylib_bitmap_scale.c 204test_greylib_bitmap_scale.c
210#endif 205#endif
211#endif
212test_mem.c 206test_mem.c
213#ifdef HAVE_LCD_BITMAP
214test_mem_jpeg.c 207test_mem_jpeg.c
215#endif
216#ifdef HAVE_LCD_COLOR 208#ifdef HAVE_LCD_COLOR
217test_resize.c 209test_resize.c
218#endif 210#endif
diff --git a/apps/plugins/SOURCES.app_build b/apps/plugins/SOURCES.app_build
index 8cfc5881b2..ac9f01a896 100644
--- a/apps/plugins/SOURCES.app_build
+++ b/apps/plugins/SOURCES.app_build
@@ -28,7 +28,6 @@ test_codec.c
28test_core_jpeg.c 28test_core_jpeg.c
29#endif 29#endif
30test_disk.c 30test_disk.c
31#ifdef HAVE_LCD_BITMAP
32#if LCD_DEPTH < 4 && !defined(SIMULATOR) 31#if LCD_DEPTH < 4 && !defined(SIMULATOR)
33test_scanrate.c 32test_scanrate.c
34#endif 33#endif
@@ -36,11 +35,8 @@ test_scanrate.c
36test_grey.c 35test_grey.c
37test_greylib_bitmap_scale.c 36test_greylib_bitmap_scale.c
38#endif 37#endif
39#endif
40test_mem.c 38test_mem.c
41#ifdef HAVE_LCD_BITMAP
42test_mem_jpeg.c 39test_mem_jpeg.c
43#endif
44#ifdef HAVE_LCD_COLOR 40#ifdef HAVE_LCD_COLOR
45test_resize.c 41test_resize.c
46#endif 42#endif
diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS
index 2c8e43c837..8479e4b3dd 100644
--- a/apps/plugins/SUBDIRS
+++ b/apps/plugins/SUBDIRS
@@ -8,9 +8,6 @@ text_viewer
8clock 8clock
9#endif 9#endif
10 10
11/* For all targets with a bitmap display */
12#ifdef HAVE_LCD_BITMAP
13
14/* color horizontal-stride LCDs */ 11/* color horizontal-stride LCDs */
15#if defined(HAVE_LCD_COLOR) && \ 12#if defined(HAVE_LCD_COLOR) && \
16 (!defined(LCD_STRIDEFORMAT) || (LCD_STRIDEFORMAT != VERTICAL_STRIDE)) 13 (!defined(LCD_STRIDEFORMAT) || (LCD_STRIDEFORMAT != VERTICAL_STRIDE))
@@ -55,8 +52,6 @@ zxbox
55#endif 52#endif
56#endif 53#endif
57 54
58#endif /* HAVE_LCD_BITMAP */
59
60/* For all big enough colour screens, iriver H1x0 and iAudio M5 */ 55/* For all big enough colour screens, iriver H1x0 and iAudio M5 */
61#if defined(HAVE_LCD_COLOR) && ( (LCD_HEIGHT >= 90 && LCD_WIDTH >=116) \ 56#if defined(HAVE_LCD_COLOR) && ( (LCD_HEIGHT >= 90 && LCD_WIDTH >=116) \
62 || (LCD_HEIGHT >= 96 && LCD_WIDTH >=75) ) \ 57 || (LCD_HEIGHT >= 96 && LCD_WIDTH >=75) ) \
diff --git a/apps/plugins/SUBDIRS.app_build b/apps/plugins/SUBDIRS.app_build
index 95b5e64639..1fc283d6c4 100644
--- a/apps/plugins/SUBDIRS.app_build
+++ b/apps/plugins/SUBDIRS.app_build
@@ -8,7 +8,6 @@
8 */ 8 */
9lua 9lua
10lua_scripts 10lua_scripts
11#ifdef HAVE_LCD_BITMAP
12 11
13#if PLUGIN_BUFFER_SIZE > 0x20000 12#if PLUGIN_BUFFER_SIZE > 0x20000
14fft 13fft
@@ -20,8 +19,6 @@ reversi
20pictureflow 19pictureflow
21#endif 20#endif
22 21
23#endif /* HAVE_LCD_BITMAP */
24
25/* For all the swcodec targets */ 22/* For all the swcodec targets */
26#if MEMORYSIZE > 2 /* we need a lot of RAM for instruments */ 23#if MEMORYSIZE > 2 /* we need a lot of RAM for instruments */
27mikmod 24mikmod
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c
index 37046af05b..3f9ecbc2b4 100644
--- a/apps/plugins/battery_bench.c
+++ b/apps/plugins/battery_bench.c
@@ -329,9 +329,7 @@ static bool exit_tsr(bool reenter)
329 rb->lcd_clear_display(); 329 rb->lcd_clear_display();
330 rb->lcd_puts_scroll(0, 0, "Batt.Bench is currently running."); 330 rb->lcd_puts_scroll(0, 0, "Batt.Bench is currently running.");
331 rb->lcd_puts_scroll(0, 1, "Press " BATTERY_OFF_TXT " to cancel the test"); 331 rb->lcd_puts_scroll(0, 1, "Press " BATTERY_OFF_TXT " to cancel the test");
332#ifdef HAVE_LCD_BITMAP
333 rb->lcd_puts_scroll(0, 2, "Anything else will resume"); 332 rb->lcd_puts_scroll(0, 2, "Anything else will resume");
334#endif
335 if(rb->global_settings->talk_menu) 333 if(rb->global_settings->talk_menu)
336 rb->talk_id(VOICE_BATTERY_BENCH_IS_ALREADY_RUNNING, true); 334 rb->talk_id(VOICE_BATTERY_BENCH_IS_ALREADY_RUNNING, true);
337 rb->lcd_update(); 335 rb->lcd_update();
@@ -488,11 +486,7 @@ static void thread(void)
488 exit = true; 486 exit = true;
489 break; 487 break;
490 case EV_EXIT: 488 case EV_EXIT:
491#ifdef HAVE_LCD_BITMAP
492 rb->splash(HZ, "Exiting battery_bench..."); 489 rb->splash(HZ, "Exiting battery_bench...");
493#else
494 rb->splash(HZ, "bench exit");
495#endif
496 exit_reason = "plugin exit"; 490 exit_reason = "plugin exit";
497 exit = true; 491 exit = true;
498 break; 492 break;
@@ -516,7 +510,6 @@ static void thread(void)
516} 510}
517 511
518 512
519#ifdef HAVE_LCD_BITMAP
520typedef void (*plcdfunc)(int x, int y, const unsigned char *str); 513typedef void (*plcdfunc)(int x, int y, const unsigned char *str);
521 514
522static void put_centered_str(const char* str, plcdfunc putsxy, int lcd_width, int line) 515static void put_centered_str(const char* str, plcdfunc putsxy, int lcd_width, int line)
@@ -525,7 +518,6 @@ static void put_centered_str(const char* str, plcdfunc putsxy, int lcd_width, in
525 rb->lcd_getstringsize(str, &strwdt, &strhgt); 518 rb->lcd_getstringsize(str, &strwdt, &strhgt);
526 putsxy((lcd_width - strwdt)/2, line*(strhgt), str); 519 putsxy((lcd_width - strwdt)/2, line*(strhgt), str);
527} 520}
528#endif
529 521
530enum plugin_status plugin_start(const void* parameter) 522enum plugin_status plugin_start(const void* parameter)
531{ 523{
@@ -533,27 +525,20 @@ enum plugin_status plugin_start(const void* parameter)
533 int button, fd; 525 int button, fd;
534 bool on = false; 526 bool on = false;
535 start_tick = *rb->current_tick; 527 start_tick = *rb->current_tick;
536#ifdef HAVE_LCD_BITMAP
537 int i; 528 int i;
538 const char *msgs[] = { "Battery Benchmark","Check file", BATTERY_LOG, 529 const char *msgs[] = { "Battery Benchmark","Check file", BATTERY_LOG,
539 "for more info", BATTERY_ON_TXT, BATTERY_OFF_TXT " - quit" }; 530 "for more info", BATTERY_ON_TXT, BATTERY_OFF_TXT " - quit" };
540#endif
541 rb->lcd_clear_display(); 531 rb->lcd_clear_display();
542 532
543#ifdef HAVE_LCD_BITMAP
544 rb->lcd_clear_display(); 533 rb->lcd_clear_display();
545 rb->lcd_setfont(FONT_SYSFIXED); 534 rb->lcd_setfont(FONT_SYSFIXED);
546 535
547 for (i = 0; i<(int)(sizeof(msgs)/sizeof(char *)); i++) 536 for (i = 0; i<(int)(sizeof(msgs)/sizeof(char *)); i++)
548 put_centered_str(msgs[i],rb->lcd_putsxy,LCD_WIDTH,i+1); 537 put_centered_str(msgs[i],rb->lcd_putsxy,LCD_WIDTH,i+1);
549#else
550 rb->lcd_puts_scroll(0, 0, "Batt.Bench.");
551 rb->lcd_puts_scroll(0, 1, "PLAY/STOP");
552#endif
553 if(rb->global_settings->talk_menu) 538 if(rb->global_settings->talk_menu)
554 rb->talk_id(VOICE_BAT_BENCH_KEYS, true); 539 rb->talk_id(VOICE_BAT_BENCH_KEYS, true);
555 rb->lcd_update(); 540 rb->lcd_update();
556 541
557#ifdef HAVE_REMOTE_LCD 542#ifdef HAVE_REMOTE_LCD
558 rb->lcd_remote_clear_display(); 543 rb->lcd_remote_clear_display();
559 put_centered_str(msgs[0],rb->lcd_remote_putsxy,LCD_REMOTE_WIDTH,0); 544 put_centered_str(msgs[0],rb->lcd_remote_putsxy,LCD_REMOTE_WIDTH,0);
diff --git a/apps/plugins/bitmaps/mono/SOURCES b/apps/plugins/bitmaps/mono/SOURCES
index ad8b951e45..e6a24b2bc5 100644
--- a/apps/plugins/bitmaps/mono/SOURCES
+++ b/apps/plugins/bitmaps/mono/SOURCES
@@ -1,5 +1,3 @@
1#ifdef HAVE_LCD_BITMAP
2
3/* Bubbles */ 1/* Bubbles */
4#if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) 2#if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64)
5bubbles_bubble.112x64x1.bmp 3bubbles_bubble.112x64x1.bmp
@@ -59,7 +57,6 @@ mpegplayer_status_icons_16x16x1.bmp
59superdom_boarditems.160x128x1.bmp 57superdom_boarditems.160x128x1.bmp
60#endif 58#endif
61 59
62#endif /* HAVE_LCD_BITMAP */
63#if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) 60#if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__)
64osx.dummy.bmp 61osx.dummy.bmp
65#endif 62#endif
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES
index 22f82800a7..48eb18dfa4 100644
--- a/apps/plugins/bitmaps/native/SOURCES
+++ b/apps/plugins/bitmaps/native/SOURCES
@@ -1,5 +1,3 @@
1#ifdef HAVE_LCD_BITMAP
2
3/* 2048 */ 1/* 2048 */
4 2
5#define MIN(x,y) ((x<y)?x:y) 3#define MIN(x,y) ((x<y)?x:y)
@@ -1004,5 +1002,3 @@ resistor.128x128x16.bmp
1004#else 1002#else
1005resistor.68x20x16.bmp 1003resistor.68x20x16.bmp
1006#endif 1004#endif
1007
1008#endif /* HAVE_LCD_BITMAP */
diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c
index 6b2d436679..fea966213d 100644
--- a/apps/plugins/chessclock.c
+++ b/apps/plugins/chessclock.c
@@ -448,11 +448,7 @@
448 448
449 449
450/* leave first line blank on bitmap display, for pause icon */ 450/* leave first line blank on bitmap display, for pause icon */
451#ifdef HAVE_LCD_BITMAP
452#define FIRST_LINE 1 451#define FIRST_LINE 1
453#else
454#define FIRST_LINE 0
455#endif
456 452
457#define MAX_PLAYERS 10 453#define MAX_PLAYERS 10
458 454
@@ -597,7 +593,6 @@ enum plugin_status plugin_start(const void* parameter)
597 return PLUGIN_OK; 593 return PLUGIN_OK;
598} 594}
599 595
600#ifdef HAVE_LCD_BITMAP
601static void show_pause_mode(bool enabled) 596static void show_pause_mode(bool enabled)
602{ 597{
603 static const char pause_icon[] = {0x00,0x7f,0x7f,0x00,0x7f,0x7f,0x00}; 598 static const char pause_icon[] = {0x00,0x7f,0x7f,0x00,0x7f,0x7f,0x00};
@@ -611,9 +606,6 @@ static void show_pause_mode(bool enabled)
611 rb->lcd_set_drawmode(DRMODE_SOLID); 606 rb->lcd_set_drawmode(DRMODE_SOLID);
612 } 607 }
613} 608}
614#else
615#define show_pause_mode(enabled) rb->lcd_icon(ICON_PAUSE, enabled)
616#endif
617 609
618static int run_timer(int nr) 610static int run_timer(int nr)
619{ 611{
diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c
index 29d2ba2fc1..d2d831f81b 100644
--- a/apps/plugins/cube.c
+++ b/apps/plugins/cube.c
@@ -451,9 +451,6 @@
451#endif 451#endif
452#endif 452#endif
453 453
454
455#ifdef HAVE_LCD_BITMAP
456
457#define DIST (10 * MIN(LCD_HEIGHT, LCD_WIDTH) / 16) 454#define DIST (10 * MIN(LCD_HEIGHT, LCD_WIDTH) / 16)
458static int x_off = LCD_WIDTH/2; 455static int x_off = LCD_WIDTH/2;
459static int y_off = LCD_HEIGHT/2; 456static int y_off = LCD_HEIGHT/2;
@@ -486,16 +483,6 @@ static struct my_lcd *mylcd = &greyfuncs;
486#define ASPECT 256 /* = 1.00 */ 483#define ASPECT 256 /* = 1.00 */
487#endif 484#endif
488 485
489#else /* !LCD_BITMAP */
490
491#define MYLCD(fn) pgfx_ ## fn
492#define DIST 9
493static int x_off = 10;
494static int y_off = 7;
495#define ASPECT 300 /* = 1.175 */
496
497#endif /* !LCD_BITMAP */
498
499struct point_3D { 486struct point_3D {
500 long x, y, z; 487 long x, y, z;
501}; 488};
@@ -771,7 +758,6 @@ enum plugin_status plugin_start(const void* parameter)
771 758
772 (void)(parameter); 759 (void)(parameter);
773 760
774#ifdef HAVE_LCD_BITMAP
775#if defined(USEGSLIB) 761#if defined(USEGSLIB)
776 gbuf = (unsigned char *)rb->plugin_get_buffer(&gbuf_size); 762 gbuf = (unsigned char *)rb->plugin_get_buffer(&gbuf_size);
777 if (!grey_init(gbuf, gbuf_size, GREY_BUFFERED, 763 if (!grey_init(gbuf, gbuf_size, GREY_BUFFERED,
@@ -794,7 +780,6 @@ enum plugin_status plugin_start(const void* parameter)
794 grey_setfont(FONT_SYSFIXED); 780 grey_setfont(FONT_SYSFIXED);
795#endif 781#endif
796 rb->lcd_setfont(FONT_SYSFIXED); 782 rb->lcd_setfont(FONT_SYSFIXED);
797#endif
798 783
799 atexit(cleanup); 784 atexit(cleanup);
800 while(!quit) 785 while(!quit)
@@ -808,7 +793,6 @@ enum plugin_status plugin_start(const void* parameter)
808 redraw = false; 793 redraw = false;
809 } 794 }
810 795
811#ifdef HAVE_LCD_BITMAP
812 if (t_disp > 0) 796 if (t_disp > 0)
813 { 797 {
814 char buffer[30]; 798 char buffer[30];
@@ -821,24 +805,6 @@ enum plugin_status plugin_start(const void* parameter)
821 if (t_disp == 0) 805 if (t_disp == 0)
822 redraw = true; 806 redraw = true;
823 } 807 }
824#else
825 if (t_disp > 0)
826 {
827 if (t_disp == DISP_TIME)
828 {
829 rb->lcd_puts(5, 0, axes[curr].label);
830 rb->lcd_putsf(5, 1, "%d %c",
831 paused ? axes[curr].angle : axes[curr].speed,
832 highspeed ? 'H' : ' ');
833 }
834 t_disp--;
835 if (t_disp == 0)
836 {
837 rb->lcd_clear_display();
838 pgfx_display(0, 0);
839 }
840 }
841#endif
842#ifdef USEGSLIB 808#ifdef USEGSLIB
843 if (mode_switch) 809 if (mode_switch)
844 { 810 {
diff --git a/apps/plugins/disktidy.c b/apps/plugins/disktidy.c
index 013e7a37bd..4f2bf6e992 100644
--- a/apps/plugins/disktidy.c
+++ b/apps/plugins/disktidy.c
@@ -343,10 +343,8 @@ static void tidy_lcd_status(const char *name)
343 rb->lcd_clear_display(); 343 rb->lcd_clear_display();
344 rb->lcd_puts(0, 0, "Working ..."); 344 rb->lcd_puts(0, 0, "Working ...");
345 rb->lcd_puts(0, 1, name); 345 rb->lcd_puts(0, 1, name);
346#ifdef HAVE_LCD_BITMAP
347 rb->lcd_putsf(0, 2, "Cleaned up %d items", 346 rb->lcd_putsf(0, 2, "Cleaned up %d items",
348 run_stats.files_removed + run_stats.dirs_removed); 347 run_stats.files_removed + run_stats.dirs_removed);
349#endif
350 rb->lcd_update(); 348 rb->lcd_update();
351} 349}
352 350
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c
index 294bee8f5b..91d83e9291 100644
--- a/apps/plugins/flipit.c
+++ b/apps/plugins/flipit.c
@@ -534,8 +534,6 @@ static int spots[20];
534static int toggle[20]; 534static int toggle[20];
535static int cursor_pos, moves; 535static int cursor_pos, moves;
536 536
537#ifdef HAVE_LCD_BITMAP
538
539#include "pluginbitmaps/flipit_cursor.h" 537#include "pluginbitmaps/flipit_cursor.h"
540#include "pluginbitmaps/flipit_tokens.h" 538#include "pluginbitmaps/flipit_tokens.h"
541 539
@@ -595,8 +593,6 @@ static void draw_info_panel(void)
595 GRID_TOP + 4*(TK_HEIGHT+TK_SPACE) + 2, s ); 593 GRID_TOP + 4*(TK_HEIGHT+TK_SPACE) + 2, s );
596} 594}
597 595
598#endif /* LCD */
599
600/* clear the cursor where it is */ 596/* clear the cursor where it is */
601static inline void clear_cursor(void) 597static inline void clear_cursor(void)
602{ 598{
@@ -829,7 +825,6 @@ enum plugin_status plugin_start(const void* parameter)
829 825
830 rb->splash(HZ, "FlipIt!"); 826 rb->splash(HZ, "FlipIt!");
831 827
832#ifdef HAVE_LCD_BITMAP
833 /* print instructions */ 828 /* print instructions */
834 rb->lcd_clear_display(); 829 rb->lcd_clear_display();
835 rb->lcd_setfont(FONT_SYSFIXED); 830 rb->lcd_setfont(FONT_SYSFIXED);
@@ -909,7 +904,7 @@ enum plugin_status plugin_start(const void* parameter)
909#endif 904#endif
910 905
911 rb->lcd_update(); 906 rb->lcd_update();
912#endif 907
913 rb->button_get_w_tmo(HZ*3); 908 rb->button_get_w_tmo(HZ*3);
914 909
915 rb->lcd_clear_display(); 910 rb->lcd_clear_display();
diff --git a/apps/plugins/greyscale.c b/apps/plugins/greyscale.c
index 70507d989c..c44b1f77c0 100644
--- a/apps/plugins/greyscale.c
+++ b/apps/plugins/greyscale.c
@@ -24,7 +24,7 @@
24#include "plugin.h" 24#include "plugin.h"
25#include "lib/helper.h" 25#include "lib/helper.h"
26 26
27#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) 27#if (LCD_DEPTH < 4)
28#include "lib/grey.h" 28#include "lib/grey.h"
29 29
30 30
@@ -372,5 +372,5 @@ enum plugin_status plugin_start(const void* parameter)
372 return main(); 372 return main();
373} 373}
374 374
375#endif /* #ifdef HAVE_LCD_BITMAP */ 375#endif /* #if LCD_DEPTH < 4 */
376 376
diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c
index 26f8f47e8f..78f74568ca 100644
--- a/apps/plugins/jackpot.c
+++ b/apps/plugins/jackpot.c
@@ -30,7 +30,6 @@ const struct button_mapping* plugin_contexts[]={pla_main_ctx};
30#define NB_PICTURES 9 30#define NB_PICTURES 9
31#define NB_SLOTS 3 31#define NB_SLOTS 3
32 32
33#ifdef HAVE_LCD_BITMAP
34#define PICTURE_HEIGHT (BMPHEIGHT_jackpot_slots/(NB_PICTURES+1)) 33#define PICTURE_HEIGHT (BMPHEIGHT_jackpot_slots/(NB_PICTURES+1))
35#if NB_SCREENS==1 34#if NB_SCREENS==1
36#define PICTURE_ROTATION_STEPS PICTURE_HEIGHT 35#define PICTURE_ROTATION_STEPS PICTURE_HEIGHT
@@ -55,7 +54,6 @@ const struct picture jackpot_pictures[]={
55}; 54};
56 55
57#define SLEEP_TIME (HZ/200) 56#define SLEEP_TIME (HZ/200)
58#endif /* HAVE_LCD_BITMAP */
59 57
60struct jackpot 58struct jackpot
61{ 59{
diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES
index effc076eb7..545a754500 100644
--- a/apps/plugins/lib/SOURCES
+++ b/apps/plugins/lib/SOURCES
@@ -13,7 +13,7 @@ display_text.c
13strncpy.c 13strncpy.c
14stdio_compat.c 14stdio_compat.c
15 15
16#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) 16#if (LCD_DEPTH < 4)
17grey_core.c 17grey_core.c
18grey_draw.c 18grey_draw.c
19grey_parm.c 19grey_parm.c
@@ -23,7 +23,7 @@ grey_scroll.c
23grey_coldfire.S 23grey_coldfire.S
24#endif 24#endif
25 25
26#endif /* HAVE_LCD_BITMAP && LCD_DEPTH < 4 */ 26#endif /* LCD_DEPTH < 4 */
27 27
28#if (CONFIG_PLATFORM & PLATFORM_NATIVE) 28#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
29overlay.c 29overlay.c
@@ -33,8 +33,6 @@ overlay.c
33profile_plugin.c 33profile_plugin.c
34#endif 34#endif
35 35
36#ifdef HAVE_LCD_BITMAP
37
38#ifdef CPU_ARM 36#ifdef CPU_ARM
39pluginlib_jpeg_idct_arm.S 37pluginlib_jpeg_idct_arm.S
40#endif 38#endif
@@ -65,8 +63,6 @@ pluginlib_albumart.c
65 63
66kbd_helper.c 64kbd_helper.c
67 65
68#endif /* HAVE_LCD_BITMAP */
69
70#ifdef HAVE_TOUCHSCREEN 66#ifdef HAVE_TOUCHSCREEN
71pluginlib_touchscreen.c 67pluginlib_touchscreen.c
72#endif 68#endif
diff --git a/apps/plugins/lib/checkbox.h b/apps/plugins/lib/checkbox.h
index 81a26e15ba..d4318f2305 100644
--- a/apps/plugins/lib/checkbox.h
+++ b/apps/plugins/lib/checkbox.h
@@ -21,11 +21,7 @@
21 21
22#include "plugin.h" 22#include "plugin.h"
23 23
24#ifdef HAVE_LCD_BITMAP
25
26/* 24/*
27 * Print a checkbox 25 * Print a checkbox
28 */ 26 */
29void checkbox(int x, int y, int width, int height, bool checked); 27void checkbox(int x, int y, int width, int height, bool checked);
30
31#endif
diff --git a/apps/plugins/lib/display_text.c b/apps/plugins/lib/display_text.c
index 90712a649f..5f37b736df 100644
--- a/apps/plugins/lib/display_text.c
+++ b/apps/plugins/lib/display_text.c
@@ -39,9 +39,7 @@ static bool wait_key_press(void)
39bool display_text(unsigned short words, char** text, struct style_text* style, 39bool display_text(unsigned short words, char** text, struct style_text* style,
40 struct viewport* vp_text, bool wait_key) 40 struct viewport* vp_text, bool wait_key)
41{ 41{
42#ifdef HAVE_LCD_BITMAP
43 int prev_drawmode; 42 int prev_drawmode;
44#endif
45#ifdef HAVE_LCD_COLOR 43#ifdef HAVE_LCD_COLOR
46 int standard_fgcolor; 44 int standard_fgcolor;
47#endif 45#endif
@@ -55,10 +53,8 @@ bool display_text(unsigned short words, char** text, struct style_text* style,
55 vp_height = vp_text->height; 53 vp_height = vp_text->height;
56 } 54 }
57 rb->screens[SCREEN_MAIN]->set_viewport(vp_text); 55 rb->screens[SCREEN_MAIN]->set_viewport(vp_text);
58#ifdef HAVE_LCD_BITMAP
59 prev_drawmode = rb->lcd_get_drawmode(); 56 prev_drawmode = rb->lcd_get_drawmode();
60 rb->lcd_set_drawmode(DRMODE_SOLID); 57 rb->lcd_set_drawmode(DRMODE_SOLID);
61#endif
62#ifdef HAVE_LCD_COLOR 58#ifdef HAVE_LCD_COLOR
63 standard_fgcolor = rb->lcd_get_foreground(); 59 standard_fgcolor = rb->lcd_get_foreground();
64#endif 60#endif
@@ -121,11 +117,9 @@ bool display_text(unsigned short words, char** text, struct style_text* style,
121#endif 117#endif
122 rb->lcd_putsxy(x, y, text[i]); 118 rb->lcd_putsxy(x, y, text[i]);
123 /* underline the word */ 119 /* underline the word */
124#ifdef HAVE_LCD_BITMAP
125 if (style[style_index].flags&TEXT_UNDERLINE) { 120 if (style[style_index].flags&TEXT_UNDERLINE) {
126 rb->lcd_hline(x, x+width, y+height-1); 121 rb->lcd_hline(x, x+width, y+height-1);
127 } 122 }
128#endif
129#ifdef HAVE_LCD_COLOR 123#ifdef HAVE_LCD_COLOR
130 rb->lcd_set_foreground(standard_fgcolor); 124 rb->lcd_set_foreground(standard_fgcolor);
131#endif 125#endif
@@ -134,9 +128,7 @@ bool display_text(unsigned short words, char** text, struct style_text* style,
134 x += width + space_w; 128 x += width + space_w;
135 } 129 }
136 rb->screens[SCREEN_MAIN]->update_viewport(); 130 rb->screens[SCREEN_MAIN]->update_viewport();
137#ifdef HAVE_LCD_BITMAP
138 rb->lcd_set_drawmode(prev_drawmode); 131 rb->lcd_set_drawmode(prev_drawmode);
139#endif
140 if (wait_key) 132 if (wait_key)
141 { 133 {
142 if (wait_key_press()) 134 if (wait_key_press())
diff --git a/apps/plugins/lib/grey.h b/apps/plugins/lib/grey.h
index 63e896bfb6..0e064f46b2 100644
--- a/apps/plugins/lib/grey.h
+++ b/apps/plugins/lib/grey.h
@@ -29,7 +29,7 @@
29 29
30#include "plugin.h" 30#include "plugin.h"
31 31
32#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) 32#if (LCD_DEPTH < 4)
33 33
34/* The greyscale lib uses 8 bit brightness values natively on input. */ 34/* The greyscale lib uses 8 bit brightness values natively on input. */
35#define GREY_BRIGHTNESS(y) (y) 35#define GREY_BRIGHTNESS(y) (y)
@@ -201,5 +201,5 @@ struct _grey_info
201/* Global variable, defined in the plugin */ 201/* Global variable, defined in the plugin */
202extern struct _grey_info _grey_info; 202extern struct _grey_info _grey_info;
203 203
204#endif /* HAVE_LCD_BITMAP && (LCD_DEPTH < 4) */ 204#endif /* (LCD_DEPTH < 4) */
205#endif /* __GREY_H__ */ 205#endif /* __GREY_H__ */
diff --git a/apps/plugins/lib/highscore.c b/apps/plugins/lib/highscore.c
index ff7a166222..3aae955bfc 100644
--- a/apps/plugins/lib/highscore.c
+++ b/apps/plugins/lib/highscore.c
@@ -119,7 +119,6 @@ bool highscore_would_update(int score, struct highscore *scores,
119 return (num_scores > 0) && (score > scores[num_scores-1].score); 119 return (num_scores > 0) && (score > scores[num_scores-1].score);
120} 120}
121 121
122#ifdef HAVE_LCD_BITMAP
123#define MARGIN 5 122#define MARGIN 5
124void highscore_show(int position, struct highscore *scores, int num_scores, 123void highscore_show(int position, struct highscore *scores, int num_scores,
125 bool show_level) 124 bool show_level)
@@ -179,37 +178,3 @@ void highscore_show(int position, struct highscore *scores, int num_scores,
179 rb->lcd_set_foreground(fgcolor); 178 rb->lcd_set_foreground(fgcolor);
180#endif 179#endif
181} 180}
182#else
183struct scoreinfo {
184 struct highscore *scores;
185 int position;
186 bool show_level;
187};
188static const char* get_score(int selected, void * data,
189 char * buffer, size_t buffer_len)
190{
191 struct scoreinfo *scoreinfo = (struct scoreinfo *) data;
192 int len;
193 len = rb->snprintf(buffer, buffer_len, "%c%d) %4d",
194 (scoreinfo->position == selected?'*':' '),
195 selected+1, scoreinfo->scores[selected].score);
196
197 if (scoreinfo->show_level)
198 rb->snprintf(buffer + len, buffer_len - len, " %d",
199 scoreinfo->scores[selected].level);
200 return buffer;
201}
202
203void highscore_show(int position, struct highscore *scores, int num_scores,
204 bool show_level)
205{
206 struct simplelist_info info;
207 struct scoreinfo scoreinfo = {scores, position, show_level};
208 rb->simplelist_info_init(&info, "High Scores", num_scores, &scoreinfo);
209 if (position >= 0)
210 info.selection = position;
211 info.hide_selection = true;
212 info.get_name = get_score;
213 rb->simplelist_show_list(&info);
214}
215#endif /* HAVE_LCD_BITMAP */
diff --git a/apps/plugins/lib/mylcd.h b/apps/plugins/lib/mylcd.h
index a543d60890..47bdec9e2c 100644
--- a/apps/plugins/lib/mylcd.h
+++ b/apps/plugins/lib/mylcd.h
@@ -35,7 +35,7 @@
35 * lib/grey.h should be included before including this 35 * lib/grey.h should be included before including this
36 * header. For bitmap LCD's, defaults to rb->lcd_XXXX otherwise. 36 * header. For bitmap LCD's, defaults to rb->lcd_XXXX otherwise.
37 */ 37 */
38#if defined (HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && defined(__GREY_H__) 38#if (LCD_DEPTH < 4) && defined(__GREY_H__)
39#define MYLCD_CFG_GREYLIB /* using greylib */ 39#define MYLCD_CFG_GREYLIB /* using greylib */
40#define mylcd_(fn) grey_##fn 40#define mylcd_(fn) grey_##fn
41#define myxlcd_(fn) grey_##fn 41#define myxlcd_(fn) grey_##fn
@@ -51,7 +51,8 @@
51#define MYLCD_DEFAULT_FG GREY_BLACK 51#define MYLCD_DEFAULT_FG GREY_BLACK
52#define MYLCD_DEFAULT_BG GREY_WHITE 52#define MYLCD_DEFAULT_BG GREY_WHITE
53 53
54#elif defined (HAVE_LCD_BITMAP) 54#else
55
55#define MYLCD_CFG_RB_XLCD /* using standard (X)LCD routines */ 56#define MYLCD_CFG_RB_XLCD /* using standard (X)LCD routines */
56#define mylcd_(fn) rb->lcd_##fn 57#define mylcd_(fn) rb->lcd_##fn
57#define myxlcd_(fn) xlcd_##fn 58#define myxlcd_(fn) xlcd_##fn
@@ -67,18 +68,11 @@
67#define MYLCD_DEFAULT_FG LCD_DEFAULT_FG 68#define MYLCD_DEFAULT_FG LCD_DEFAULT_FG
68#define MYLCD_DEFAULT_BG LCD_DEFAULT_BG 69#define MYLCD_DEFAULT_BG LCD_DEFAULT_BG
69 70
70#else
71#error Configuration not supported! Did you forget to include the correct lib header?
72#endif /* end LCD type selection */ 71#endif /* end LCD type selection */
73 72
74/* Update functions */ 73/* Update functions */
75#define mylcd_update mylcd_(update) 74#define mylcd_update mylcd_(update)
76#ifdef HAVE_LCD_BITMAP
77#define mylcd_update_rect mylcd_(update_rect) 75#define mylcd_update_rect mylcd_(update_rect)
78#else
79static inline void mylcd_update_rect(int x, int y, int w, int h)
80 { (void)x; (void)y; (void)w; (void)h; pgfx_update(); }
81#endif /* HAVE_LCD_BITMAP */
82 76
83/* Update functions - unbuffered : special handling for these 77/* Update functions - unbuffered : special handling for these
84 * It is desirable to still evaluate arguments even if there will 78 * It is desirable to still evaluate arguments even if there will
@@ -104,7 +98,6 @@ static inline void mylcd_ub_update_rect(int x, int y, int w, int h)
104#define mylcd_set_drawmode mylcd_(set_drawmode) 98#define mylcd_set_drawmode mylcd_(set_drawmode)
105#define mylcd_get_drawmode mylcd_(get_drawmode) 99#define mylcd_get_drawmode mylcd_(get_drawmode)
106 100
107#ifdef HAVE_LCD_BITMAP
108#define mylcd_set_foreground mylcd_(set_foreground) 101#define mylcd_set_foreground mylcd_(set_foreground)
109#define mylcd_get_foreground mylcd_(get_foreground) 102#define mylcd_get_foreground mylcd_(get_foreground)
110#define mylcd_set_background mylcd_(set_background) 103#define mylcd_set_background mylcd_(set_background)
@@ -112,7 +105,6 @@ static inline void mylcd_ub_update_rect(int x, int y, int w, int h)
112#define mylcd_set_drawinfo mylcd_(set_drawinfo) 105#define mylcd_set_drawinfo mylcd_(set_drawinfo)
113#define mylcd_setfont mylcd_(setfont) 106#define mylcd_setfont mylcd_(setfont)
114#define mylcd_getstringsize mylcd_(getstringsize) 107#define mylcd_getstringsize mylcd_(getstringsize)
115#endif /* HAVE_LCD_BITMAP */
116 108
117/* Whole display */ 109/* Whole display */
118#define mylcd_clear_display mylcd_(clear_display) 110#define mylcd_clear_display mylcd_(clear_display)
@@ -131,57 +123,43 @@ static inline void mylcd_ub_update_rect(int x, int y, int w, int h)
131 123
132/* Filled Primitives */ 124/* Filled Primitives */
133#define mylcd_fillrect mylcd_(fillrect) 125#define mylcd_fillrect mylcd_(fillrect)
134#ifdef HAVE_LCD_BITMAP
135#define mylcd_filltriangle myxlcd_(filltriangle) 126#define mylcd_filltriangle myxlcd_(filltriangle)
136#endif /* HAVE_LCD_BITMAP */
137 127
138/* Bitmaps */ 128/* Bitmaps */
139#define mylcd_mono_bitmap_part mylcd_(mono_bitmap_part) 129#define mylcd_mono_bitmap_part mylcd_(mono_bitmap_part)
140#define mylcd_mono_bitmap mylcd_(mono_bitmap) 130#define mylcd_mono_bitmap mylcd_(mono_bitmap)
141 131
142#ifdef HAVE_LCD_BITMAP
143#define mylcd_gray_bitmap_part myxlcd_(gray_bitmap_part) 132#define mylcd_gray_bitmap_part myxlcd_(gray_bitmap_part)
144#define mylcd_gray_bitmap myxlcd_(gray_bitmap) 133#define mylcd_gray_bitmap myxlcd_(gray_bitmap)
145#if 0 /* possible, but not implemented in greylib */ 134#if 0 /* possible, but not implemented in greylib */
146#define mylcd_color_bitmap_part myxlcd_(color_bitmap_part) 135#define mylcd_color_bitmap_part myxlcd_(color_bitmap_part)
147#define mylcd_color_bitmap myxlcd_(color_bitmap) 136#define mylcd_color_bitmap myxlcd_(color_bitmap)
148#endif 137#endif
149#endif /* HAVE_LCD_BITMAP */
150 138
151/* Bitmaps - unbuffered */ 139/* Bitmaps - unbuffered */
152#ifdef HAVE_LCD_BITMAP
153#define mylcd_ub_gray_bitmap_part myxlcd_ub_(gray_bitmap_part) 140#define mylcd_ub_gray_bitmap_part myxlcd_ub_(gray_bitmap_part)
154#define mylcd_ub_gray_bitmap myxlcd_ub_(gray_bitmap) 141#define mylcd_ub_gray_bitmap myxlcd_ub_(gray_bitmap)
155#endif /* HAVE_LCD_BITMAP */
156 142
157/* Text */ 143/* Text */
158/* lcd_putsxyofs is static'ed in the core for now on color */ 144/* lcd_putsxyofs is static'ed in the core for now on color */
159#ifdef HAVE_LCD_BITMAP
160#define mylcd_putsxyofs mylcd_(putsxyofs) 145#define mylcd_putsxyofs mylcd_(putsxyofs)
161#define mylcd_putsxy mylcd_(putsxy) 146#define mylcd_putsxy mylcd_(putsxy)
162#endif /* HAVE_LCD_BITMAP */
163 147
164/* Scrolling */ 148/* Scrolling */
165#ifdef HAVE_LCD_BITMAP
166#define mylcd_scroll_left myxlcd_(scroll_left) 149#define mylcd_scroll_left myxlcd_(scroll_left)
167#define mylcd_scroll_right myxlcd_(scroll_right) 150#define mylcd_scroll_right myxlcd_(scroll_right)
168#define mylcd_scroll_up myxlcd_(scroll_up) 151#define mylcd_scroll_up myxlcd_(scroll_up)
169#define mylcd_scroll_down myxlcd_(scroll_down) 152#define mylcd_scroll_down myxlcd_(scroll_down)
170#endif /* HAVE_LCD_BITMAP */
171 153
172/* Scrolling - unbuffered */ 154/* Scrolling - unbuffered */
173#ifdef HAVE_LCD_BITMAP
174#define mylcd_ub_scroll_left myxlcd_ub_(scroll_left) 155#define mylcd_ub_scroll_left myxlcd_ub_(scroll_left)
175#define mylcd_ub_scroll_right myxlcd_ub_(scroll_right) 156#define mylcd_ub_scroll_right myxlcd_ub_(scroll_right)
176#define mylcd_ub_scroll_up myxlcd_ub_(scroll_up) 157#define mylcd_ub_scroll_up myxlcd_ub_(scroll_up)
177#define mylcd_ub_scroll_down myxlcd_ub_(scroll_down) 158#define mylcd_ub_scroll_down myxlcd_ub_(scroll_down)
178#endif /* HAVE_LCD_BITMAP */
179 159
180/* Viewports */ 160/* Viewports */
181#ifdef HAVE_LCD_BITMAP
182#define mylcd_clear_viewport mylcd_(clear_viewport) 161#define mylcd_clear_viewport mylcd_(clear_viewport)
183#define mylcd_set_viewport mylcd_(set_viewport) 162#define mylcd_set_viewport mylcd_(set_viewport)
184#define mylcd_viewport_set_fullscreen mylcd_viewport_(set_fullscreen) 163#define mylcd_viewport_set_fullscreen mylcd_viewport_(set_fullscreen)
185#endif /* HAVE_LCD_BITMAP */
186 164
187#endif /* MYLCD_H */ 165#endif /* MYLCD_H */
diff --git a/apps/plugins/lib/pluginlib_bmp.h b/apps/plugins/lib/pluginlib_bmp.h
index be0cfd9091..f0540988de 100644
--- a/apps/plugins/lib/pluginlib_bmp.h
+++ b/apps/plugins/lib/pluginlib_bmp.h
@@ -37,7 +37,7 @@ int save_bmp_file( char* filename, struct bitmap *bm );
37*/ 37*/
38void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst); 38void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst);
39 39
40#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) 40#if (LCD_DEPTH < 4)
41/** 41/**
42 Same as simple_resize_bitmap except this is for use with greylib. 42 Same as simple_resize_bitmap except this is for use with greylib.
43*/ 43*/
diff --git a/apps/plugins/lib/simple_viewer.c b/apps/plugins/lib/simple_viewer.c
index 4c05ee68c5..0b554e054d 100644
--- a/apps/plugins/lib/simple_viewer.c
+++ b/apps/plugins/lib/simple_viewer.c
@@ -27,10 +27,8 @@
27 27
28 28
29struct view_info { 29struct view_info {
30#ifdef HAVE_LCD_BITMAP
31 struct font* pf; 30 struct font* pf;
32 struct viewport scrollbar_vp; /* viewport for scrollbar */ 31 struct viewport scrollbar_vp; /* viewport for scrollbar */
33#endif
34 struct viewport vp; 32 struct viewport vp;
35 const char *title; 33 const char *title;
36 const char *text; /* displayed text */ 34 const char *text; /* displayed text */
@@ -89,15 +87,12 @@ static void calc_line_count(struct view_info *info)
89{ 87{
90 const char *ptr = info->text; 88 const char *ptr = info->text;
91 int i = 0; 89 int i = 0;
92#ifdef HAVE_LCD_BITMAP
93 bool scrollbar = false; 90 bool scrollbar = false;
94#endif
95 91
96 while (*ptr) 92 while (*ptr)
97 { 93 {
98 ptr = get_next_line(ptr, info); 94 ptr = get_next_line(ptr, info);
99 i++; 95 i++;
100#ifdef HAVE_LCD_BITMAP
101 if (!scrollbar && i > info->display_lines) 96 if (!scrollbar && i > info->display_lines)
102 { 97 {
103 ptr = info->text; 98 ptr = info->text;
@@ -111,7 +106,6 @@ static void calc_line_count(struct view_info *info)
111 info->scrollbar_vp.x = info->vp.width; 106 info->scrollbar_vp.x = info->vp.width;
112 scrollbar = true; 107 scrollbar = true;
113 } 108 }
114#endif
115 } 109 }
116 info->line_count = i; 110 info->line_count = i;
117} 111}
@@ -144,12 +138,8 @@ static int init_view(struct view_info *info,
144 const char *title, const char *text) 138 const char *title, const char *text)
145{ 139{
146 rb->viewport_set_defaults(&info->vp, SCREEN_MAIN); 140 rb->viewport_set_defaults(&info->vp, SCREEN_MAIN);
147#ifdef HAVE_LCD_BITMAP
148 info->pf = rb->font_get(FONT_UI); 141 info->pf = rb->font_get(FONT_UI);
149 info->display_lines = info->vp.height / info->pf->height; 142 info->display_lines = info->vp.height / info->pf->height;
150#else
151 info->display_lines = info->vp.height;
152#endif
153 143
154 info->title = title; 144 info->title = title;
155 info->text = text; 145 info->text = text;
@@ -157,7 +147,6 @@ static int init_view(struct view_info *info,
157 info->line = 0; 147 info->line = 0;
158 info->start = 0; 148 info->start = 0;
159 149
160#ifdef HAVE_LCD_BITMAP
161 /* no title for small screens. */ 150 /* no title for small screens. */
162 if (info->display_lines < 4) 151 if (info->display_lines < 4)
163 { 152 {
@@ -169,7 +158,6 @@ static int init_view(struct view_info *info,
169 info->vp.y += info->pf->height; 158 info->vp.y += info->pf->height;
170 info->vp.height -= info->pf->height; 159 info->vp.height -= info->pf->height;
171 } 160 }
172#endif
173 161
174 calc_line_count(info); 162 calc_line_count(info);
175 return 0; 163 return 0;
@@ -177,11 +165,7 @@ static int init_view(struct view_info *info,
177 165
178static void draw_text(struct view_info *info) 166static void draw_text(struct view_info *info)
179{ 167{
180#ifdef HAVE_LCD_BITMAP
181#define OUTPUT_SIZE LCD_WIDTH+1 168#define OUTPUT_SIZE LCD_WIDTH+1
182#else
183#define OUTPUT_SIZE LCD_WIDTH*3+1
184#endif
185 static char output[OUTPUT_SIZE]; 169 static char output[OUTPUT_SIZE];
186 const char *text, *ptr; 170 const char *text, *ptr;
187 int max_show, line; 171 int max_show, line;
@@ -190,14 +174,12 @@ static void draw_text(struct view_info *info)
190 /* clear screen */ 174 /* clear screen */
191 display->clear_display(); 175 display->clear_display();
192 176
193#ifdef HAVE_LCD_BITMAP
194 /* display title. */ 177 /* display title. */
195 if(info->title) 178 if(info->title)
196 { 179 {
197 display->set_viewport(NULL); 180 display->set_viewport(NULL);
198 display->puts(0, 0, info->title); 181 display->puts(0, 0, info->title);
199 } 182 }
200#endif
201 183
202 max_show = MIN(info->line_count - info->line, info->display_lines); 184 max_show = MIN(info->line_count - info->line, info->display_lines);
203 text = info->text + info->start; 185 text = info->text + info->start;
@@ -215,7 +197,6 @@ static void draw_text(struct view_info *info)
215 display->puts(0, line, output); 197 display->puts(0, line, output);
216 text = ptr; 198 text = ptr;
217 } 199 }
218#ifdef HAVE_LCD_BITMAP
219 if (info->line_count > info->display_lines) 200 if (info->line_count > info->display_lines)
220 { 201 {
221 display->set_viewport(&info->scrollbar_vp); 202 display->set_viewport(&info->scrollbar_vp);
@@ -224,7 +205,6 @@ static void draw_text(struct view_info *info)
224 info->line_count, info->line, info->line + max_show, 205 info->line_count, info->line, info->line + max_show,
225 VERTICAL); 206 VERTICAL);
226 } 207 }
227#endif
228 208
229 display->set_viewport(NULL); 209 display->set_viewport(NULL);
230 display->update(); 210 display->update();
diff --git a/apps/plugins/lib/xlcd.h b/apps/plugins/lib/xlcd.h
index abd5cff62b..963c7c4831 100644
--- a/apps/plugins/lib/xlcd.h
+++ b/apps/plugins/lib/xlcd.h
@@ -26,8 +26,6 @@
26 26
27#include "plugin.h" 27#include "plugin.h"
28 28
29#ifdef HAVE_LCD_BITMAP
30
31void xlcd_filltriangle(int x1, int y1, int x2, int y2, int x3, int y3); 29void xlcd_filltriangle(int x1, int y1, int x2, int y2, int x3, int y3);
32void xlcd_filltriangle_screen(struct screen* display, 30void xlcd_filltriangle_screen(struct screen* display,
33 int x1, int y1, int x2, int y2, int x3, int y3); 31 int x1, int y1, int x2, int y2, int x3, int y3);
@@ -54,6 +52,5 @@ void xlcd_scroll_right(int count);
54void xlcd_scroll_up(int count); 52void xlcd_scroll_up(int count);
55void xlcd_scroll_down(int count); 53void xlcd_scroll_down(int count);
56 54
57#endif /* HAVE_LCD_BITMAP */
58#endif /* __XLCD_H__ */ 55#endif /* __XLCD_H__ */
59 56
diff --git a/apps/plugins/lib/xlcd_core.c b/apps/plugins/lib/xlcd_core.c
index 87e73b5485..47875a51a9 100644
--- a/apps/plugins/lib/xlcd_core.c
+++ b/apps/plugins/lib/xlcd_core.c
@@ -24,8 +24,5 @@
24 24
25#include "plugin.h" 25#include "plugin.h"
26 26
27#ifdef HAVE_LCD_BITMAP
28#include "xlcd.h" 27#include "xlcd.h"
29 28
30#endif /* HAVE_LCD_BITMAP */
31
diff --git a/apps/plugins/lib/xlcd_draw.c b/apps/plugins/lib/xlcd_draw.c
index 311782c21f..25ef7518a1 100644
--- a/apps/plugins/lib/xlcd_draw.c
+++ b/apps/plugins/lib/xlcd_draw.c
@@ -24,7 +24,6 @@
24 24
25#include "plugin.h" 25#include "plugin.h"
26 26
27#ifdef HAVE_LCD_BITMAP
28#include "xlcd.h" 27#include "xlcd.h"
29 28
30/* sort the given coordinates by increasing x value */ 29/* sort the given coordinates by increasing x value */
@@ -486,5 +485,3 @@ void xlcd_color_bitmap(const unsigned char *src, int x, int y, int width,
486#endif /* HAVE_LCD_COLOR */ 485#endif /* HAVE_LCD_COLOR */
487 486
488#endif /* LCD_DEPTH >= 8 */ 487#endif /* LCD_DEPTH >= 8 */
489
490#endif /* HAVE_LCD_BITMAP */
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c
index 60bed3b826..984a65aa34 100644
--- a/apps/plugins/logo.c
+++ b/apps/plugins/logo.c
@@ -29,7 +29,6 @@ static const struct button_mapping *plugin_contexts[]
29#endif 29#endif
30 }; 30 };
31 31
32#ifdef HAVE_LCD_BITMAP
33#define DISPLAY_WIDTH LCD_WIDTH 32#define DISPLAY_WIDTH LCD_WIDTH
34#define DISPLAY_HEIGHT LCD_HEIGHT 33#define DISPLAY_HEIGHT LCD_HEIGHT
35#define RAND_SCALE 5 34#define RAND_SCALE 5
@@ -48,19 +47,6 @@ static const struct button_mapping *plugin_contexts[]
48#define LOGO_WIDTH BMPWIDTH_rockboxlogo 47#define LOGO_WIDTH BMPWIDTH_rockboxlogo
49#define LOGO_HEIGHT BMPHEIGHT_rockboxlogo 48#define LOGO_HEIGHT BMPHEIGHT_rockboxlogo
50 49
51#else /* !LCD_BITMAP */
52#define DISPLAY_WIDTH 55
53#define DISPLAY_HEIGHT 14
54#define RAND_SCALE 2
55#define LOGO_WIDTH 16
56#define LOGO_HEIGHT 7
57#define LOGO rockbox16x7
58const unsigned char rockbox16x7[] = {
59 0x47, 0x18, 0xa6, 0xd8, 0x66, 0xde, 0xb7, 0x9b,
60 0x76, 0xdb, 0x26, 0xdb, 0x66, 0xde,
61};
62#endif /* !LCD_BITMAP */
63
64/* We use PLA */ 50/* We use PLA */
65#define LP_QUIT PLA_EXIT 51#define LP_QUIT PLA_EXIT
66#define LP_QUIT2 PLA_CANCEL 52#define LP_QUIT2 PLA_CANCEL
@@ -88,7 +74,6 @@ enum plugin_status plugin_start(const void* parameter) {
88 dy = rb->rand()%(2*RAND_SCALE+1) - RAND_SCALE; 74 dy = rb->rand()%(2*RAND_SCALE+1) - RAND_SCALE;
89 75
90 while (1) { 76 while (1) {
91#ifdef HAVE_LCD_BITMAP
92 rb->lcd_clear_display(); 77 rb->lcd_clear_display();
93 rb->lcd_bitmap((const fb_data*)LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT); 78 rb->lcd_bitmap((const fb_data*)LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT);
94#ifdef REMOTE_LOGO 79#ifdef REMOTE_LOGO
@@ -98,12 +83,6 @@ enum plugin_status plugin_start(const void* parameter) {
98 (y * (REMOTE_HEIGHT - REMOTE_LOGO_HEIGHT)) / (DISPLAY_HEIGHT - LOGO_HEIGHT), 83 (y * (REMOTE_HEIGHT - REMOTE_LOGO_HEIGHT)) / (DISPLAY_HEIGHT - LOGO_HEIGHT),
99 REMOTE_LOGO_WIDTH, REMOTE_LOGO_HEIGHT); 84 REMOTE_LOGO_WIDTH, REMOTE_LOGO_HEIGHT);
100#endif 85#endif
101#else
102 pgfx_clear_display();
103 pgfx_mono_bitmap(LOGO, x % 5, y, LOGO_WIDTH, LOGO_HEIGHT);
104 cpos = x / 5;
105#endif
106
107 x += dx; 86 x += dx;
108 if (x < 0) { 87 if (x < 0) {
109 dx = -dx; 88 dx = -dx;
@@ -124,19 +103,10 @@ enum plugin_status plugin_start(const void* parameter) {
124 y = DISPLAY_HEIGHT - LOGO_HEIGHT; 103 y = DISPLAY_HEIGHT - LOGO_HEIGHT;
125 } 104 }
126 105
127#ifdef HAVE_LCD_BITMAP
128 rb->lcd_update(); 106 rb->lcd_update();
129#ifdef REMOTE_LOGO 107#ifdef REMOTE_LOGO
130 rb->lcd_remote_update(); 108 rb->lcd_remote_update();
131#endif 109#endif
132#else
133 if (cpos != old_cpos) {
134 rb->lcd_clear_display();
135 pgfx_display(cpos, 0);
136 old_cpos = cpos;
137 }
138 pgfx_update();
139#endif
140 rb->sleep(HZ/timer); 110 rb->sleep(HZ/timer);
141 111
142 112
diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c
index 1b017942a9..2c7742fd94 100644
--- a/apps/plugins/lrcplayer.c
+++ b/apps/plugins/lrcplayer.c
@@ -71,14 +71,12 @@ struct preferences {
71 unsigned active_color; 71 unsigned active_color;
72 unsigned inactive_color; 72 unsigned inactive_color;
73#endif 73#endif
74#ifdef HAVE_LCD_BITMAP
75 bool wrap; 74 bool wrap;
76 bool wipe; 75 bool wipe;
77 bool active_one_line; 76 bool active_one_line;
78 int align; /* 0: left, 1: center, 2: right */ 77 int align; /* 0: left, 1: center, 2: right */
79 bool statusbar_on; 78 bool statusbar_on;
80 bool display_title; 79 bool display_title;
81#endif
82 bool display_time; 80 bool display_time;
83 bool backlight_on; 81 bool backlight_on;
84 82
@@ -118,16 +116,12 @@ static struct lrc_info {
118 bool loaded_lrc; 116 bool loaded_lrc;
119 bool changed_lrc; 117 bool changed_lrc;
120 bool too_many_lines; /* true if nlrcline >= max_lrclines after calc pos */ 118 bool too_many_lines; /* true if nlrcline >= max_lrclines after calc pos */
121#ifdef HAVE_LCD_BITMAP
122 bool wipe; /* false if lyrics is unsynched */ 119 bool wipe; /* false if lyrics is unsynched */
123#endif
124} current; 120} current;
125static char temp_buf[MAX(MAX_LINE_LEN,MAX_PATH)]; 121static char temp_buf[MAX(MAX_LINE_LEN,MAX_PATH)];
126#ifdef HAVE_LCD_BITMAP
127static int uifont = -1; 122static int uifont = -1;
128static int font_ui_height = 1; 123static int font_ui_height = 1;
129static struct viewport vp_info[NB_SCREENS]; 124static struct viewport vp_info[NB_SCREENS];
130#endif
131static struct viewport vp_lyrics[NB_SCREENS]; 125static struct viewport vp_lyrics[NB_SCREENS];
132 126
133#define AUDIO_PAUSE (current.audio_status & AUDIO_STATUS_PAUSE) 127#define AUDIO_PAUSE (current.audio_status & AUDIO_STATUS_PAUSE)
@@ -221,11 +215,9 @@ static int lrc_set_time(const char *title, const char *unit, long *pval,
221 { 215 {
222 /* draw cursor */ 216 /* draw cursor */
223 buffer[p_end-1] = 0; 217 buffer[p_end-1] = 0;
224#ifdef HAVE_LCD_BITMAP
225 rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); 218 rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
226 rb->lcd_putsxy(x, y*(1+LST_OFF_Y), &buffer[p_start]); 219 rb->lcd_putsxy(x, y*(1+LST_OFF_Y), &buffer[p_start]);
227 rb->lcd_set_drawmode(DRMODE_SOLID); 220 rb->lcd_set_drawmode(DRMODE_SOLID);
228#endif
229 } 221 }
230 rb->lcd_update(); 222 rb->lcd_update();
231 int button = pluginlib_getaction(TIMEOUT_BLOCK, lst_contexts, ARRAYLEN(lst_contexts)); 223 int button = pluginlib_getaction(TIMEOUT_BLOCK, lst_contexts, ARRAYLEN(lst_contexts));
@@ -394,19 +386,16 @@ static int format_time_tag(char *buf, long t)
394/* find start of next line */ 386/* find start of next line */
395static const char *lrc_skip_space(const char *str) 387static const char *lrc_skip_space(const char *str)
396{ 388{
397#ifdef HAVE_LCD_BITMAP
398 if (prefs.wrap) 389 if (prefs.wrap)
399 { 390 {
400 while (*str && *str != '\n' && isspace(*str)) 391 while (*str && *str != '\n' && isspace(*str))
401 str++; 392 str++;
402 } 393 }
403#endif
404 if (*str == '\n') 394 if (*str == '\n')
405 str++; 395 str++;
406 return str; 396 return str;
407} 397}
408 398
409#ifdef HAVE_LCD_BITMAP
410static bool isbrchr(const unsigned char *str, int len) 399static bool isbrchr(const unsigned char *str, int len)
411{ 400{
412 const unsigned char *p = "!,-.:;? 、。!,.:;?―"; 401 const unsigned char *p = "!,-.:;? 、。!,.:;?―";
@@ -422,7 +411,6 @@ static bool isbrchr(const unsigned char *str, int len)
422 } 411 }
423 return false; 412 return false;
424} 413}
425#endif
426 414
427/* calculate how many lines is needed to display and store it. 415/* calculate how many lines is needed to display and store it.
428 * create cache if there is enough space in lrc_buffer. */ 416 * create cache if there is enough space in lrc_buffer. */
@@ -431,11 +419,9 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i)
431 struct lrc_brpos *lrc_brpos; 419 struct lrc_brpos *lrc_brpos;
432 struct lrc_word *lrc_word; 420 struct lrc_word *lrc_word;
433 int nlrcbrpos = 0, max_lrcbrpos; 421 int nlrcbrpos = 0, max_lrcbrpos;
434#ifdef HAVE_LCD_BITMAP
435 uifont = rb->screens[0]->getuifont(); 422 uifont = rb->screens[0]->getuifont();
436 struct font* pf = rb->font_get(uifont); 423 struct font* pf = rb->font_get(uifont);
437 unsigned short ch; 424 unsigned short ch;
438#endif
439 struct snap { 425 struct snap {
440 int count, width; 426 int count, width;
441 int nword; 427 int nword;
@@ -1559,7 +1545,6 @@ static void display_state(void)
1559 str = "No lyrics"; 1545 str = "No lyrics";
1560 } 1546 }
1561 1547
1562#ifdef HAVE_LCD_BITMAP
1563 const char *info = NULL; 1548 const char *info = NULL;
1564 1549
1565 if (AUDIO_PLAY && prefs.display_title) 1550 if (AUDIO_PLAY && prefs.display_title)
@@ -1605,13 +1590,6 @@ static void display_state(void)
1605 display->update_viewport(); 1590 display->update_viewport();
1606 display->set_viewport(NULL); 1591 display->set_viewport(NULL);
1607 } 1592 }
1608#else
1609 /* there is no place to display title or artist. */
1610 rb->lcd_clear_display();
1611 if (str)
1612 rb->lcd_puts_scroll(0, 0, str);
1613 rb->lcd_update();
1614#endif /* HAVE_LCD_BITMAP */
1615} 1593}
1616 1594
1617static void display_time(void) 1595static void display_time(void)
@@ -1619,7 +1597,6 @@ static void display_time(void)
1619 rb->snprintf(temp_buf, MAX_LINE_LEN, "%ld:%02ld/%ld:%02ld", 1597 rb->snprintf(temp_buf, MAX_LINE_LEN, "%ld:%02ld/%ld:%02ld",
1620 current.elapsed/60000, (current.elapsed/1000)%60, 1598 current.elapsed/60000, (current.elapsed/1000)%60,
1621 current.length/60000, (current.length)/1000%60); 1599 current.length/60000, (current.length)/1000%60);
1622#ifdef HAVE_LCD_BITMAP
1623 int y = (prefs.display_title? font_ui_height:0); 1600 int y = (prefs.display_title? font_ui_height:0);
1624 FOR_NB_SCREENS(i) 1601 FOR_NB_SCREENS(i)
1625 { 1602 {
@@ -1634,16 +1611,11 @@ static void display_time(void)
1634 display->setfont(uifont); 1611 display->setfont(uifont);
1635 display->set_viewport(NULL); 1612 display->set_viewport(NULL);
1636 } 1613 }
1637#else
1638 rb->lcd_puts(0, 0, temp_buf);
1639 rb->lcd_update();
1640#endif /* HAVE_LCD_BITMAP */
1641} 1614}
1642 1615
1643/******************************* 1616/*******************************
1644 * Display lyrics 1617 * Display lyrics
1645 *******************************/ 1618 *******************************/
1646#ifdef HAVE_LCD_BITMAP
1647static inline void set_to_default(struct screen *display) 1619static inline void set_to_default(struct screen *display)
1648{ 1620{
1649#if (LCD_DEPTH > 1) 1621#if (LCD_DEPTH > 1)
@@ -1817,7 +1789,6 @@ static int display_lrc_line(struct lrc_line *lrc_line, int ypos, int i)
1817 set_to_default(display); 1789 set_to_default(display);
1818 return ypos; 1790 return ypos;
1819} 1791}
1820#endif /* HAVE_LCD_BITMAP */
1821 1792
1822static void display_lrcs(void) 1793static void display_lrcs(void)
1823{ 1794{
@@ -1848,7 +1819,7 @@ static void display_lrcs(void)
1848 /* display current line at the center of the viewport */ 1819 /* display current line at the center of the viewport */
1849 display->set_viewport(&vp_lyrics[i]); 1820 display->set_viewport(&vp_lyrics[i]);
1850 display->clear_viewport(); 1821 display->clear_viewport();
1851#ifdef HAVE_LCD_BITMAP 1822
1852 struct lrc_line *lrc_line; 1823 struct lrc_line *lrc_line;
1853 int y, ypos = 0, nblines = vp_lyrics[i].height/font_ui_height; 1824 int y, ypos = 0, nblines = vp_lyrics[i].height/font_ui_height;
1854 y = (nblines-1)/2; 1825 y = (nblines-1)/2;
@@ -1895,7 +1866,7 @@ static void display_lrcs(void)
1895 } 1866 }
1896 if (!lrc_line && ypos < vp_lyrics[i].height) 1867 if (!lrc_line && ypos < vp_lyrics[i].height)
1897 display->putsxy(0, ypos, "[end]"); 1868 display->putsxy(0, ypos, "[end]");
1898#endif /* HAVE_LCD_BITMAP */ 1869
1899 display->update_viewport(); 1870 display->update_viewport();
1900 display->set_viewport(NULL); 1871 display->set_viewport(NULL);
1901 } 1872 }
@@ -2191,7 +2162,6 @@ static void load_or_save_settings(bool save)
2191 { TYPE_INT, 0, 0xffffff, { .int_p = &prefs.inactive_color }, 2162 { TYPE_INT, 0, 0xffffff, { .int_p = &prefs.inactive_color },
2192 "inactive color", NULL }, 2163 "inactive color", NULL },
2193#endif 2164#endif
2194#ifdef HAVE_LCD_BITMAP
2195 { TYPE_BOOL, 0, 1, { .bool_p = &prefs.wrap }, "wrap", NULL }, 2165 { TYPE_BOOL, 0, 1, { .bool_p = &prefs.wrap }, "wrap", NULL },
2196 { TYPE_BOOL, 0, 1, { .bool_p = &prefs.wipe }, "wipe", NULL }, 2166 { TYPE_BOOL, 0, 1, { .bool_p = &prefs.wipe }, "wipe", NULL },
2197 { TYPE_BOOL, 0, 1, { .bool_p = &prefs.active_one_line }, 2167 { TYPE_BOOL, 0, 1, { .bool_p = &prefs.active_one_line },
@@ -2201,7 +2171,6 @@ static void load_or_save_settings(bool save)
2201 "statusbar on", NULL }, 2171 "statusbar on", NULL },
2202 { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_title }, 2172 { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_title },
2203 "display title", NULL }, 2173 "display title", NULL },
2204#endif
2205 { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_time }, 2174 { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_time },
2206 "display time", NULL }, 2175 "display time", NULL },
2207 { TYPE_BOOL, 0, 1, { .bool_p = &prefs.backlight_on }, 2176 { TYPE_BOOL, 0, 1, { .bool_p = &prefs.backlight_on },
@@ -2223,14 +2192,12 @@ static void load_or_save_settings(bool save)
2223 prefs.active_color = rb->lcd_get_foreground(); 2192 prefs.active_color = rb->lcd_get_foreground();
2224 prefs.inactive_color = LCD_LIGHTGRAY; 2193 prefs.inactive_color = LCD_LIGHTGRAY;
2225#endif 2194#endif
2226#ifdef HAVE_LCD_BITMAP
2227 prefs.wrap = true; 2195 prefs.wrap = true;
2228 prefs.wipe = true; 2196 prefs.wipe = true;
2229 prefs.active_one_line = false; 2197 prefs.active_one_line = false;
2230 prefs.align = 1; /* center */ 2198 prefs.align = 1; /* center */
2231 prefs.statusbar_on = false; 2199 prefs.statusbar_on = false;
2232 prefs.display_title = true; 2200 prefs.display_title = true;
2233#endif
2234 prefs.display_time = true; 2201 prefs.display_time = true;
2235 prefs.backlight_on = false; 2202 prefs.backlight_on = false;
2236#ifdef LRC_SUPPORT_ID3 2203#ifdef LRC_SUPPORT_ID3
@@ -2252,10 +2219,8 @@ static void load_or_save_settings(bool save)
2252static bool lrc_theme_menu(void) 2219static bool lrc_theme_menu(void)
2253{ 2220{
2254 enum { 2221 enum {
2255#ifdef HAVE_LCD_BITMAP
2256 LRC_MENU_STATUSBAR, 2222 LRC_MENU_STATUSBAR,
2257 LRC_MENU_DISP_TITLE, 2223 LRC_MENU_DISP_TITLE,
2258#endif
2259 LRC_MENU_DISP_TIME, 2224 LRC_MENU_DISP_TIME,
2260#ifdef HAVE_LCD_COLOR 2225#ifdef HAVE_LCD_COLOR
2261 LRC_MENU_INACTIVE_COLOR, 2226 LRC_MENU_INACTIVE_COLOR,
@@ -2267,9 +2232,7 @@ static bool lrc_theme_menu(void)
2267 bool exit = false, usb = false; 2232 bool exit = false, usb = false;
2268 2233
2269 MENUITEM_STRINGLIST(menu, "Theme Settings", NULL, 2234 MENUITEM_STRINGLIST(menu, "Theme Settings", NULL,
2270#ifdef HAVE_LCD_BITMAP
2271 "Show Statusbar", "Display Title", 2235 "Show Statusbar", "Display Title",
2272#endif
2273 "Display Time", 2236 "Display Time",
2274#ifdef HAVE_LCD_COLOR 2237#ifdef HAVE_LCD_COLOR
2275 "Inactive Colour", 2238 "Inactive Colour",
@@ -2280,14 +2243,12 @@ static bool lrc_theme_menu(void)
2280 { 2243 {
2281 switch (rb->do_menu(&menu, &selected, NULL, false)) 2244 switch (rb->do_menu(&menu, &selected, NULL, false))
2282 { 2245 {
2283#ifdef HAVE_LCD_BITMAP
2284 case LRC_MENU_STATUSBAR: 2246 case LRC_MENU_STATUSBAR:
2285 usb = rb->set_bool("Show Statusbar", &prefs.statusbar_on); 2247 usb = rb->set_bool("Show Statusbar", &prefs.statusbar_on);
2286 break; 2248 break;
2287 case LRC_MENU_DISP_TITLE: 2249 case LRC_MENU_DISP_TITLE:
2288 usb = rb->set_bool("Display Title", &prefs.display_title); 2250 usb = rb->set_bool("Display Title", &prefs.display_title);
2289 break; 2251 break;
2290#endif
2291 case LRC_MENU_DISP_TIME: 2252 case LRC_MENU_DISP_TIME:
2292 usb = rb->set_bool("Display Time", &prefs.display_time); 2253 usb = rb->set_bool("Display Time", &prefs.display_time);
2293 break; 2254 break;
@@ -2312,7 +2273,6 @@ static bool lrc_theme_menu(void)
2312 return usb; 2273 return usb;
2313} 2274}
2314 2275
2315#ifdef HAVE_LCD_BITMAP
2316static bool lrc_display_menu(void) 2276static bool lrc_display_menu(void)
2317{ 2277{
2318 enum { 2278 enum {
@@ -2362,7 +2322,6 @@ static bool lrc_display_menu(void)
2362 2322
2363 return usb; 2323 return usb;
2364} 2324}
2365#endif /* HAVE_LCD_BITMAP */
2366 2325
2367static bool lrc_lyrics_menu(void) 2326static bool lrc_lyrics_menu(void)
2368{ 2327{
@@ -2489,9 +2448,7 @@ static int lrc_menu(void)
2489{ 2448{
2490 enum { 2449 enum {
2491 LRC_MENU_THEME, 2450 LRC_MENU_THEME,
2492#ifdef HAVE_LCD_BITMAP
2493 LRC_MENU_DISPLAY, 2451 LRC_MENU_DISPLAY,
2494#endif
2495 LRC_MENU_LYRICS, 2452 LRC_MENU_LYRICS,
2496 LRC_MENU_PLAYBACK, 2453 LRC_MENU_PLAYBACK,
2497#ifdef LRC_DEBUG 2454#ifdef LRC_DEBUG
@@ -2504,9 +2461,7 @@ static int lrc_menu(void)
2504 2461
2505 MENUITEM_STRINGLIST(menu, "Lrcplayer Menu", NULL, 2462 MENUITEM_STRINGLIST(menu, "Lrcplayer Menu", NULL,
2506 "Theme Settings", 2463 "Theme Settings",
2507#ifdef HAVE_LCD_BITMAP
2508 "Display Settings", 2464 "Display Settings",
2509#endif
2510 "Lyrics Settings", 2465 "Lyrics Settings",
2511 "Playback Control", 2466 "Playback Control",
2512#ifdef LRC_DEBUG 2467#ifdef LRC_DEBUG
@@ -2524,11 +2479,9 @@ static int lrc_menu(void)
2524 case LRC_MENU_THEME: 2479 case LRC_MENU_THEME:
2525 usb = lrc_theme_menu(); 2480 usb = lrc_theme_menu();
2526 break; 2481 break;
2527#ifdef HAVE_LCD_BITMAP
2528 case LRC_MENU_DISPLAY: 2482 case LRC_MENU_DISPLAY:
2529 usb = lrc_display_menu(); 2483 usb = lrc_display_menu();
2530 break; 2484 break;
2531#endif
2532 case LRC_MENU_LYRICS: 2485 case LRC_MENU_LYRICS:
2533 usb = lrc_lyrics_menu(); 2486 usb = lrc_lyrics_menu();
2534 break; 2487 break;
@@ -2720,40 +2673,27 @@ static int lrc_main(void)
2720 long id3_timeout = 0; 2673 long id3_timeout = 0;
2721 bool update_display_state = true; 2674 bool update_display_state = true;
2722 2675
2723#ifdef HAVE_LCD_BITMAP
2724 /* y offset of vp_lyrics */ 2676 /* y offset of vp_lyrics */
2725 int h = (prefs.display_title?font_ui_height:0)+ 2677 int h = (prefs.display_title?font_ui_height:0)+
2726 (prefs.display_time?SYSFONT_HEIGHT*2:0); 2678 (prefs.display_time?SYSFONT_HEIGHT*2:0);
2727 2679
2728#endif
2729 2680
2730 FOR_NB_SCREENS(i) 2681 FOR_NB_SCREENS(i)
2731 { 2682 {
2732#ifdef HAVE_LCD_BITMAP
2733 rb->viewportmanager_theme_enable(i, prefs.statusbar_on, &vp_info[i]); 2683 rb->viewportmanager_theme_enable(i, prefs.statusbar_on, &vp_info[i]);
2734 vp_lyrics[i] = vp_info[i]; 2684 vp_lyrics[i] = vp_info[i];
2735 vp_lyrics[i].flags &= ~VP_FLAG_ALIGNMENT_MASK; 2685 vp_lyrics[i].flags &= ~VP_FLAG_ALIGNMENT_MASK;
2736 vp_lyrics[i].y += h; 2686 vp_lyrics[i].y += h;
2737 vp_lyrics[i].height -= h; 2687 vp_lyrics[i].height -= h;
2738#else
2739 rb->viewport_set_defaults(&vp_lyrics[i], i);
2740 if (prefs.display_time)
2741 {
2742 vp_lyrics[i].y += 1; /* time */
2743 vp_lyrics[i].height -= 1;
2744 }
2745#endif
2746 } 2688 }
2747 2689
2748 if (prefs.backlight_on) 2690 if (prefs.backlight_on)
2749 backlight_ignore_timeout(); 2691 backlight_ignore_timeout();
2750 2692
2751#ifdef HAVE_LCD_BITMAP 2693 /* in case settings that may affect break position
2752 /* in case settings that may affect break position
2753 * are changed (statusbar_on and wrap). */ 2694 * are changed (statusbar_on and wrap). */
2754 if (!current.too_many_lines) 2695 if (!current.too_many_lines)
2755 calc_brpos(NULL, 0); 2696 calc_brpos(NULL, 0);
2756#endif
2757 2697
2758 while (ret == LRC_GOTO_MAIN) 2698 while (ret == LRC_GOTO_MAIN)
2759 { 2699 {
@@ -2819,12 +2759,10 @@ static int lrc_main(void)
2819 } 2759 }
2820 if (update_display_state) 2760 if (update_display_state)
2821 { 2761 {
2822#ifdef HAVE_LCD_BITMAP
2823 if (current.type == TXT || current.type == ID3_USLT) 2762 if (current.type == TXT || current.type == ID3_USLT)
2824 current.wipe = false; 2763 current.wipe = false;
2825 else 2764 else
2826 current.wipe = prefs.wipe; 2765 current.wipe = prefs.wipe;
2827#endif
2828 display_state(); 2766 display_state();
2829 update_display_state = false; 2767 update_display_state = false;
2830 } 2768 }
@@ -2839,10 +2777,9 @@ static int lrc_main(void)
2839 ret = handle_button(); 2777 ret = handle_button();
2840 } 2778 }
2841 2779
2842#ifdef HAVE_LCD_BITMAP
2843 FOR_NB_SCREENS(i) 2780 FOR_NB_SCREENS(i)
2844 rb->viewportmanager_theme_undo(i, false); 2781 rb->viewportmanager_theme_undo(i, false);
2845#endif 2782
2846 if (prefs.backlight_on) 2783 if (prefs.backlight_on)
2847 backlight_use_settings(); 2784 backlight_use_settings();
2848 2785
@@ -2857,10 +2794,8 @@ enum plugin_status plugin_start(const void* parameter)
2857 /* initialize settings. */ 2794 /* initialize settings. */
2858 load_or_save_settings(false); 2795 load_or_save_settings(false);
2859 2796
2860#ifdef HAVE_LCD_BITMAP
2861 uifont = rb->screens[0]->getuifont(); 2797 uifont = rb->screens[0]->getuifont();
2862 font_ui_height = rb->font_get(uifont)->height; 2798 font_ui_height = rb->font_get(uifont)->height;
2863#endif
2864 2799
2865 lrc_buffer = rb->plugin_get_buffer(&lrc_buffer_size); 2800 lrc_buffer = rb->plugin_get_buffer(&lrc_buffer_size);
2866 lrc_buffer = ALIGN_UP(lrc_buffer, 4); /* 4 bytes aligned */ 2801 lrc_buffer = ALIGN_UP(lrc_buffer, 4); /* 4 bytes aligned */
diff --git a/apps/plugins/lua/rocklib_img.c b/apps/plugins/lua/rocklib_img.c
index 7b3ed9d2d7..1266d60310 100644
--- a/apps/plugins/lua/rocklib_img.c
+++ b/apps/plugins/lua/rocklib_img.c
@@ -1331,10 +1331,8 @@ static inline struct viewport* opt_viewport(lua_State *L,
1331 vp->y = check_tablevalue(L, "y", narg); 1331 vp->y = check_tablevalue(L, "y", narg);
1332 vp->width = check_tablevalue(L, "width", narg); 1332 vp->width = check_tablevalue(L, "width", narg);
1333 vp->height = check_tablevalue(L, "height", narg); 1333 vp->height = check_tablevalue(L, "height", narg);
1334#ifdef HAVE_LCD_BITMAP
1335 vp->font = check_tablevalue(L, "font", narg); 1334 vp->font = check_tablevalue(L, "font", narg);
1336 vp->drawmode = check_tablevalue(L, "drawmode", narg); 1335 vp->drawmode = check_tablevalue(L, "drawmode", narg);
1337#endif
1338#if LCD_DEPTH > 1 1336#if LCD_DEPTH > 1
1339 vp->fg_pattern = (unsigned int) check_tablevalue(L, "fg_pattern", narg); 1337 vp->fg_pattern = (unsigned int) check_tablevalue(L, "fg_pattern", narg);
1340 vp->bg_pattern = (unsigned int) check_tablevalue(L, "bg_pattern", narg); 1338 vp->bg_pattern = (unsigned int) check_tablevalue(L, "bg_pattern", narg);
@@ -1379,7 +1377,6 @@ RB_WRAP(font_getstringsize)
1379 return 3; 1377 return 3;
1380} 1378}
1381 1379
1382#ifdef HAVE_LCD_BITMAP
1383RB_WRAP(lcd_framebuffer) 1380RB_WRAP(lcd_framebuffer)
1384{ 1381{
1385 rli_wrap(L, rb->lcd_framebuffer, LCD_WIDTH, LCD_HEIGHT); 1382 rli_wrap(L, rb->lcd_framebuffer, LCD_WIDTH, LCD_HEIGHT);
@@ -1620,8 +1617,6 @@ RB_WRAP(lcd_drawpixel)
1620 return 0; 1617 return 0;
1621} 1618}
1622 1619
1623#endif /* defined(LCD_BITMAP) */
1624
1625#ifdef HAVE_LCD_COLOR 1620#ifdef HAVE_LCD_COLOR
1626RB_WRAP(lcd_rgbpack) 1621RB_WRAP(lcd_rgbpack)
1627{ 1622{
@@ -1690,7 +1685,6 @@ static const luaL_Reg rocklib_img[] =
1690 R(set_viewport), 1685 R(set_viewport),
1691 R(clear_viewport), 1686 R(clear_viewport),
1692 R(font_getstringsize), 1687 R(font_getstringsize),
1693#ifdef HAVE_LCD_BITMAP
1694 R(lcd_framebuffer), 1688 R(lcd_framebuffer),
1695 R(lcd_setfont), 1689 R(lcd_setfont),
1696 R(gui_scrollbar_draw), 1690 R(gui_scrollbar_draw),
@@ -1721,7 +1715,6 @@ static const luaL_Reg rocklib_img[] =
1721 R(lcd_vline), 1715 R(lcd_vline),
1722 R(lcd_drawpixel), 1716 R(lcd_drawpixel),
1723 1717
1724#endif /*HAVE_LCD_BITMAP*/
1725#ifdef HAVE_LCD_COLOR 1718#ifdef HAVE_LCD_COLOR
1726 R(lcd_rgbpack), 1719 R(lcd_rgbpack),
1727 R(lcd_rgbunpack), 1720 R(lcd_rgbunpack),
diff --git a/apps/plugins/lua/rocklib_img.h b/apps/plugins/lua/rocklib_img.h
index 496bc8dd93..90b24f1ad1 100644
--- a/apps/plugins/lua/rocklib_img.h
+++ b/apps/plugins/lua/rocklib_img.h
@@ -22,9 +22,7 @@
22#ifndef _ROCKLIB_IMG_H_ 22#ifndef _ROCKLIB_IMG_H_
23#define _ROCKLIB_IMG_H_ 23#define _ROCKLIB_IMG_H_
24 24
25#ifdef HAVE_LCD_BITMAP
26#define RLI_EXTENDED 25#define RLI_EXTENDED
27#endif
28 26
29LUALIB_API int (luaopen_rock_img) (lua_State *L); 27LUALIB_API int (luaopen_rock_img) (lua_State *L);
30 28
diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c
index eec8a92e78..a6b4181df2 100644
--- a/apps/plugins/metronome.c
+++ b/apps/plugins/metronome.c
@@ -840,12 +840,9 @@ static void metronome_draw(struct screen* display, int state)
840 int textlen = display->lcdwidth / display->getcharwidth(); 840 int textlen = display->lcdwidth / display->getcharwidth();
841 ps = part; 841 ps = part;
842 display->clear_display(); 842 display->clear_display();
843#ifdef HAVE_LCD_BITMAP
844 display->setfont(FONT_SYSFIXED); 843 display->setfont(FONT_SYSFIXED);
845#endif
846 switch(state) 844 switch(state)
847 { 845 {
848#ifdef HAVE_LCD_BITMAP
849 case 0: 846 case 0:
850 if(sound_paused) 847 if(sound_paused)
851 { 848 {
@@ -876,49 +873,17 @@ static void metronome_draw(struct screen* display, int state)
876 case 3: 873 case 3:
877 display->puts((textlen-3)/2,0, "o.O"); 874 display->puts((textlen-3)/2,0, "o.O");
878 break; 875 break;
879#else /* Much simpler on 2-line text display, but same thing. */
880 case 1:
881 if((beat+1) % 2 == 0)
882 beat1 = '/';
883 else
884 beat1 = '\\';
885 break;
886 case 2:
887 if((beat+1) % 2 == 0)
888 beat2 = '/';
889 else
890 beat2 = '\\';
891 break;
892 case 3:
893 beat1 = '.';
894 break;
895#endif
896 } 876 }
897 877
898 if(track_mode) 878 if(track_mode)
899 { 879 {
900 880
901#ifdef HAVE_LCD_BITMAP
902 /* One line in several. */ 881 /* One line in several. */
903 rb->snprintf( buffer, sizeof(buffer), "%u/%u@%u V%d" 882 rb->snprintf( buffer, sizeof(buffer), "%u/%u@%u V%d"
904 , ps->beats_per_bar, ps->base_beat 883 , ps->beats_per_bar, ps->base_beat
905 , bpm, rb->global_settings->volume ); 884 , bpm, rb->global_settings->volume );
906 display->puts(0,4, buffer); 885 display->puts(0,4, buffer);
907#else 886
908 /* Just two short lines with integrated beat indicator. */
909 rb->snprintf( buffer, sizeof(buffer), "%c %u/%u@%u"
910 , beat1
911 , ps->beats_per_bar, ps->base_beat
912 , bpm );
913 display->puts(0,0, buffer);
914 /* Simulator prints format %+02d ... real Rockbox doesn't. */
915 rb->snprintf( buffer, sizeof(buffer), "%c V%d"
916 , beat2
917 , rb->global_settings->volume );
918 display->puts(0,1, buffer);
919#endif /* HAVE_LCD_BITMAP */
920
921#ifdef HAVE_LCD_BITMAP
922 /* Would it hurt to draw a 3rd line to 2-line display? 887 /* Would it hurt to draw a 3rd line to 2-line display?
923 I guess there are 3-line displays out there. */ 888 I guess there are 3-line displays out there. */
924 if(ps->label && rb->strlen(ps->label)) 889 if(ps->label && rb->strlen(ps->label))
@@ -935,13 +900,11 @@ static void metronome_draw(struct screen* display, int state)
935 rb->snprintf( buffer, sizeof(buffer), "P%u/%u: B%u/_+%u" 900 rb->snprintf( buffer, sizeof(buffer), "P%u/%u: B%u/_+%u"
936 , part->id+1, parts, bar+1, beat+1 ); 901 , part->id+1, parts, bar+1, beat+1 );
937 display->puts(0, 5, buffer); 902 display->puts(0, 5, buffer);
938#endif /* HAVE_LCD_BITMAP */
939 903
940 } 904 }
941 else /* track mode */ 905 else /* track mode */
942 { 906 {
943 907
944#ifdef HAVE_LCD_BITMAP
945 if(display->screen_type==SCREEN_MAIN) 908 if(display->screen_type==SCREEN_MAIN)
946 { 909 {
947#ifdef MET_SYNC 910#ifdef MET_SYNC
@@ -960,32 +923,18 @@ static void metronome_draw(struct screen* display, int state)
960#endif 923#endif
961 } 924 }
962#endif 925#endif
963#endif /* HAVE_LCD_BITMAP */
964 926
965#ifdef HAVE_LCD_BITMAP
966 rb->snprintf( buffer, sizeof(buffer), "BPM: %d Vol: %d" 927 rb->snprintf( buffer, sizeof(buffer), "BPM: %d Vol: %d"
967 , bpm, rb->global_settings->volume ); 928 , bpm, rb->global_settings->volume );
968 display->puts(0,3, buffer); 929 display->puts(0,3, buffer);
969#else 930
970 rb->snprintf( buffer, sizeof(buffer), "%c BPM: %d "
971 , beat1, bpm );
972 display->puts(0,0, buffer);
973 rb->snprintf( buffer, sizeof(buffer), "%c Vol: %d"
974 , beat2, rb->global_settings->volume );
975 display->puts(0,1, buffer);
976#endif /* HAVE_LCD_BITMAP */
977
978#ifdef HAVE_LCD_BITMAP
979 display->hline(0, 111, 12); 931 display->hline(0, 111, 12);
980 if(sound_paused) display->puts(0,2,"start: hold select"); 932 if(sound_paused) display->puts(0,2,"start: hold select");
981 else display->puts(0,2,"stop : cancel"); 933 else display->puts(0,2,"stop : cancel");
982#endif /* HAVE_LCD_BITMAP */
983 934
984 } /* !track_mode */ 935 } /* !track_mode */
985 936
986#ifdef HAVE_LCD_BITMAP
987 display->setfont(FONT_UI); 937 display->setfont(FONT_UI);
988#endif /* HAVE_LCD_BITMAP */
989 display->update(); 938 display->update();
990} 939}
991 940
diff --git a/apps/plugins/mosaique.c b/apps/plugins/mosaique.c
index 28ea9efd93..caf5346dc5 100644
--- a/apps/plugins/mosaique.c
+++ b/apps/plugins/mosaique.c
@@ -23,7 +23,6 @@
23#include "lib/pluginlib_actions.h" 23#include "lib/pluginlib_actions.h"
24 24
25 25
26#ifdef HAVE_LCD_BITMAP
27#define GFX_X (LCD_WIDTH/2-1) 26#define GFX_X (LCD_WIDTH/2-1)
28#define GFX_Y (LCD_HEIGHT/2-1) 27#define GFX_Y (LCD_HEIGHT/2-1)
29#if LCD_WIDTH != LCD_HEIGHT 28#if LCD_WIDTH != LCD_HEIGHT
@@ -33,12 +32,6 @@
33#define GFX_WIDTH GFX_X 32#define GFX_WIDTH GFX_X
34#define GFX_HEIGHT (4*GFX_Y/5) 33#define GFX_HEIGHT (4*GFX_Y/5)
35#endif 34#endif
36#else
37#define GFX_X 9
38#define GFX_Y 6
39#define GFX_WIDTH 9
40#define GFX_HEIGHT 6
41#endif
42 35
43/* this set the context to use with PLA */ 36/* this set the context to use with PLA */
44static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; 37static const struct button_mapping *plugin_contexts[] = { pla_main_ctx };
diff --git a/apps/plugins/otp.c b/apps/plugins/otp.c
index 2da1ef83f5..4d302563fb 100644
--- a/apps/plugins/otp.c
+++ b/apps/plugins/otp.c
@@ -1007,9 +1007,7 @@ static void show_help(void)
1007 rb->lcd_set_background(LCD_BLACK); 1007 rb->lcd_set_background(LCD_BLACK);
1008#endif 1008#endif
1009 1009
1010#ifdef HAVE_LCD_BITMAP
1011 rb->lcd_setfont(FONT_UI); 1010 rb->lcd_setfont(FONT_UI);
1012#endif
1013 1011
1014 static char *help_text[] = { "One-Time Password Manager", "", 1012 static char *help_text[] = { "One-Time Password Manager", "",
1015 "Introduction", "", 1013 "Introduction", "",
diff --git a/apps/plugins/pegbox.c b/apps/plugins/pegbox.c
index c3d38997eb..4622d2a10e 100644
--- a/apps/plugins/pegbox.c
+++ b/apps/plugins/pegbox.c
@@ -1462,7 +1462,6 @@ static int pegbox_main(struct game_context* pb)
1462enum plugin_status plugin_start(const void* parameter) 1462enum plugin_status plugin_start(const void* parameter)
1463{ 1463{
1464 (void)parameter; 1464 (void)parameter;
1465#ifdef HAVE_LCD_BITMAP
1466 rb->lcd_setfont(FONT_SYSFIXED); 1465 rb->lcd_setfont(FONT_SYSFIXED);
1467#if LCD_DEPTH > 1 1466#if LCD_DEPTH > 1
1468 rb->lcd_set_backdrop(NULL); 1467 rb->lcd_set_backdrop(NULL);
@@ -1484,7 +1483,6 @@ enum plugin_status plugin_start(const void* parameter)
1484 pegbox_main(&pb); 1483 pegbox_main(&pb);
1485 configfile_save(CONFIG_FILE_NAME,config,2,0); 1484 configfile_save(CONFIG_FILE_NAME,config,2,0);
1486 rb->lcd_setfont(FONT_UI); 1485 rb->lcd_setfont(FONT_UI);
1487#endif /* HAVE_LCD_BITMAP */
1488 1486
1489 return PLUGIN_OK; 1487 return PLUGIN_OK;
1490} 1488}
diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c
index 4c172ff108..9db9572d43 100644
--- a/apps/plugins/properties.c
+++ b/apps/plugins/properties.c
@@ -411,10 +411,8 @@ enum plugin_status plugin_start(const void* parameter)
411 return PLUGIN_OK; 411 return PLUGIN_OK;
412 } 412 }
413 413
414#ifdef HAVE_LCD_BITMAP
415 FOR_NB_SCREENS(i) 414 FOR_NB_SCREENS(i)
416 rb->viewportmanager_theme_enable(i, true, NULL); 415 rb->viewportmanager_theme_enable(i, true, NULL);
417#endif
418 416
419 rb->gui_synclist_init(&properties_lists, &get_props, &dps, false, 2, NULL); 417 rb->gui_synclist_init(&properties_lists, &get_props, &dps, false, 2, NULL);
420 rb->gui_synclist_set_title(&properties_lists, rb->str(its_a_dir ? LANG_PROPERTIES_DIRECTORY_PROPERTIES : LANG_PROPERTIES_FILE_PROPERTIES), NOICON); 418 rb->gui_synclist_set_title(&properties_lists, rb->str(its_a_dir ? LANG_PROPERTIES_DIRECTORY_PROPERTIES : LANG_PROPERTIES_FILE_PROPERTIES), NOICON);
@@ -448,10 +446,8 @@ enum plugin_status plugin_start(const void* parameter)
448 } 446 }
449 } 447 }
450 448
451#ifdef HAVE_LCD_BITMAP
452 FOR_NB_SCREENS(i) 449 FOR_NB_SCREENS(i)
453 rb->viewportmanager_theme_undo(i, false); 450 rb->viewportmanager_theme_undo(i, false);
454#endif
455 451
456 return usb? PLUGIN_USB_CONNECTED: PLUGIN_OK; 452 return usb? PLUGIN_USB_CONNECTED: PLUGIN_OK;
457} 453}
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c
index c7968c3e20..31c626e267 100644
--- a/apps/plugins/rockblox.c
+++ b/apps/plugins/rockblox.c
@@ -532,8 +532,6 @@
532 532
533#define BOARD_WIDTH 10 533#define BOARD_WIDTH 10
534 534
535#ifdef HAVE_LCD_BITMAP
536
537#define BOARD_HEIGHT 20 535#define BOARD_HEIGHT 20
538 536
539#if (LCD_WIDTH == 640) && (LCD_HEIGHT == 480) 537#if (LCD_WIDTH == 640) && (LCD_HEIGHT == 480)
@@ -757,6 +755,9 @@
757#define LEVEL_X 58 755#define LEVEL_X 58
758#define LINES_Y 62 756#define LINES_Y 62
759#define LINES_X 58 757#define LINES_X 58
758
759#else
760#error "lcd screen size not defined!"
760#endif 761#endif
761 762
762#ifndef LEVEL_X 763#ifndef LEVEL_X
@@ -769,10 +770,6 @@
769 770
770extern const fb_data rockblox_background[]; 771extern const fb_data rockblox_background[];
771 772
772#else
773#error "lcd screen size not defined!"
774#endif
775
776#ifndef HIGHSCORE_SPACE 773#ifndef HIGHSCORE_SPACE
777#define HIGHSCORE_SPACE " " 774#define HIGHSCORE_SPACE " "
778#endif 775#endif
@@ -974,7 +971,6 @@ static void init_board (void)
974/* show the score, level and lines */ 971/* show the score, level and lines */
975static void show_details (void) 972static void show_details (void)
976{ 973{
977#ifdef HAVE_LCD_BITMAP
978#if LCD_DEPTH >= 2 974#if LCD_DEPTH >= 2
979 rb->lcd_set_foreground (LCD_BLACK); 975 rb->lcd_set_foreground (LCD_BLACK);
980 rb->lcd_set_background (LCD_WHITE); 976 rb->lcd_set_background (LCD_WHITE);
@@ -982,7 +978,6 @@ static void show_details (void)
982 rb->lcd_putsxyf (LABEL_X, SCORE_Y, "%d", rockblox_status.score); 978 rb->lcd_putsxyf (LABEL_X, SCORE_Y, "%d", rockblox_status.score);
983 rb->lcd_putsxyf (LEVEL_X, LEVEL_Y, "%d", rockblox_status.level); 979 rb->lcd_putsxyf (LEVEL_X, LEVEL_Y, "%d", rockblox_status.level);
984 rb->lcd_putsxyf (LINES_X, LINES_Y, "%d", rockblox_status.lines); 980 rb->lcd_putsxyf (LINES_X, LINES_Y, "%d", rockblox_status.lines);
985#endif
986} 981}
987 982
988#ifdef HIGH_SCORE_Y 983#ifdef HIGH_SCORE_Y
@@ -1050,9 +1045,7 @@ static void init_rockblox (bool resume)
1050 tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, 1045 tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
1051 tm->tm_hour, tm->tm_min, tm->tm_sec); 1046 tm->tm_hour, tm->tm_min, tm->tm_sec);
1052 1047
1053#ifdef HAVE_LCD_BITMAP
1054 rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT); 1048 rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT);
1055#endif
1056 if (!resume) 1049 if (!resume)
1057 { 1050 {
1058 rockblox_status.level = 1; 1051 rockblox_status.level = 1;
@@ -1149,7 +1142,6 @@ static void refresh_board (void)
1149 for (j = 0; j < BOARD_HEIGHT; j++) { 1142 for (j = 0; j < BOARD_HEIGHT; j++) {
1150 block = rockblox_status.board[j][i]; 1143 block = rockblox_status.board[j][i];
1151 if (block != EMPTY_BLOCK) { 1144 if (block != EMPTY_BLOCK) {
1152#ifdef HAVE_LCD_BITMAP
1153#if LCD_DEPTH >= 2 1145#if LCD_DEPTH >= 2
1154 /* middle drawing */ 1146 /* middle drawing */
1155 rb->lcd_set_foreground (figures[block].color[1]); 1147 rb->lcd_set_foreground (figures[block].color[1]);
@@ -1177,7 +1169,6 @@ static void refresh_board (void)
1177 rb->lcd_hline (BOARD_X + i * BLOCK_WIDTH + 1, 1169 rb->lcd_hline (BOARD_X + i * BLOCK_WIDTH + 1,
1178 BOARD_X + (i + 1) * BLOCK_WIDTH - 1, 1170 BOARD_X + (i + 1) * BLOCK_WIDTH - 1,
1179 BOARD_Y + (j + 1) * BLOCK_HEIGHT - 1); 1171 BOARD_Y + (j + 1) * BLOCK_HEIGHT - 1);
1180#endif
1181 } 1172 }
1182 } 1173 }
1183 1174
@@ -1194,7 +1185,6 @@ static void refresh_board (void)
1194 + rockblox_status.cx; 1185 + rockblox_status.cx;
1195 y = getRelativeY (rockblox_status.cf, i, rockblox_status.co) 1186 y = getRelativeY (rockblox_status.cf, i, rockblox_status.co)
1196 + ghost_y; 1187 + ghost_y;
1197#ifdef HAVE_LCD_BITMAP
1198#if LCD_DEPTH >= 2 1188#if LCD_DEPTH >= 2
1199 /* middle drawing */ 1189 /* middle drawing */
1200 rb->lcd_set_foreground (ghost_colors[rockblox_status.cf][0]); 1190 rb->lcd_set_foreground (ghost_colors[rockblox_status.cf][0]);
@@ -1221,7 +1211,6 @@ static void refresh_board (void)
1221 rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, 1211 rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1,
1222 BOARD_X + (x + 1) * BLOCK_WIDTH - 1, 1212 BOARD_X + (x + 1) * BLOCK_WIDTH - 1,
1223 BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); 1213 BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1);
1224#endif
1225 } 1214 }
1226 1215
1227 /* draw current piece */ 1216 /* draw current piece */
@@ -1231,7 +1220,6 @@ static void refresh_board (void)
1231 + rockblox_status.cx; 1220 + rockblox_status.cx;
1232 y = getRelativeY (rockblox_status.cf, i, rockblox_status.co) 1221 y = getRelativeY (rockblox_status.cf, i, rockblox_status.co)
1233 + rockblox_status.cy; 1222 + rockblox_status.cy;
1234#ifdef HAVE_LCD_BITMAP
1235#if LCD_DEPTH >= 2 1223#if LCD_DEPTH >= 2
1236 /* middle drawing */ 1224 /* middle drawing */
1237 rb->lcd_set_foreground (figures[rockblox_status.cf].color[1]); 1225 rb->lcd_set_foreground (figures[rockblox_status.cf].color[1]);
@@ -1258,7 +1246,6 @@ static void refresh_board (void)
1258 rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, 1246 rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1,
1259 BOARD_X + (x + 1) * BLOCK_WIDTH - 1, 1247 BOARD_X + (x + 1) * BLOCK_WIDTH - 1,
1260 BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); 1248 BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1);
1261#endif
1262 } 1249 }
1263 1250
1264 mylcd_update (); 1251 mylcd_update ();
@@ -1301,7 +1288,6 @@ static void draw_next_block (void)
1301 for (i = 0; i < 4; i++) { 1288 for (i = 0; i < 4; i++) {
1302 rx = getRelativeX (rockblox_status.nf, i, 0) + 2; 1289 rx = getRelativeX (rockblox_status.nf, i, 0) + 2;
1303 ry = getRelativeY (rockblox_status.nf, i, 0) + 2; 1290 ry = getRelativeY (rockblox_status.nf, i, 0) + 2;
1304#ifdef HAVE_LCD_BITMAP
1305#if LCD_DEPTH >= 2 1291#if LCD_DEPTH >= 2
1306 rb->lcd_set_foreground (figures[rockblox_status.nf].color[1]); /* middle drawing */ 1292 rb->lcd_set_foreground (figures[rockblox_status.nf].color[1]); /* middle drawing */
1307#endif 1293#endif
@@ -1326,7 +1312,6 @@ static void draw_next_block (void)
1326 rb->lcd_hline (PREVIEW_X + rx * BLOCK_WIDTH + 1, 1312 rb->lcd_hline (PREVIEW_X + rx * BLOCK_WIDTH + 1,
1327 PREVIEW_X + (rx + 1) * BLOCK_WIDTH - 1, 1313 PREVIEW_X + (rx + 1) * BLOCK_WIDTH - 1,
1328 PREVIEW_Y + (ry + 1) * BLOCK_HEIGHT - 1); 1314 PREVIEW_Y + (ry + 1) * BLOCK_HEIGHT - 1);
1329#endif
1330 } 1315 }
1331 1316
1332} 1317}
@@ -1428,18 +1413,14 @@ static bool rockblox_help(void)
1428 LAST_STYLE_ITEM 1413 LAST_STYLE_ITEM
1429 }; 1414 };
1430 1415
1431#ifdef HAVE_LCD_BITMAP
1432 rb->lcd_setfont(FONT_UI); 1416 rb->lcd_setfont(FONT_UI);
1433#endif
1434#ifdef HAVE_LCD_COLOR 1417#ifdef HAVE_LCD_COLOR
1435 rb->lcd_set_background(LCD_BLACK); 1418 rb->lcd_set_background(LCD_BLACK);
1436 rb->lcd_set_foreground(LCD_WHITE); 1419 rb->lcd_set_foreground(LCD_WHITE);
1437#endif 1420#endif
1438 if (display_text(ARRAYLEN(help_text), help_text, formation, NULL, true)) 1421 if (display_text(ARRAYLEN(help_text), help_text, formation, NULL, true))
1439 return true; 1422 return true;
1440#ifdef HAVE_LCD_BITMAP
1441 rb->lcd_setfont(FONT_SYSFIXED); 1423 rb->lcd_setfont(FONT_SYSFIXED);
1442#endif
1443 1424
1444 return false; 1425 return false;
1445} 1426}
@@ -1699,15 +1680,7 @@ enum plugin_status plugin_start (const void *parameter)
1699 rb->lcd_set_backdrop(NULL); 1680 rb->lcd_set_backdrop(NULL);
1700#endif 1681#endif
1701 1682
1702#ifdef HAVE_LCD_BITMAP
1703 rb->lcd_setfont (FONT_SYSFIXED); 1683 rb->lcd_setfont (FONT_SYSFIXED);
1704#else
1705 if (!pgfx_init(4, 2))
1706 {
1707 rb->splash(HZ*2, "Old LCD :(");
1708 return PLUGIN_OK;
1709 }
1710#endif
1711 1684
1712 /* Turn off backlight timeout */ 1685 /* Turn off backlight timeout */
1713 backlight_ignore_timeout(); 1686 backlight_ignore_timeout();
diff --git a/apps/plugins/search.c b/apps/plugins/search.c
index ff7be343f6..f27d2045b1 100644
--- a/apps/plugins/search.c
+++ b/apps/plugins/search.c
@@ -125,11 +125,7 @@ static bool search_init(const char* file){
125 fdw = rb->open(resultfile, O_WRONLY|O_CREAT|O_TRUNC, 0666); 125 fdw = rb->open(resultfile, O_WRONLY|O_CREAT|O_TRUNC, 0666);
126 126
127 if (fdw < 0) { 127 if (fdw < 0) {
128#ifdef HAVE_LCD_BITMAP
129 rb->splash(HZ, "Failed to create result file!"); 128 rb->splash(HZ, "Failed to create result file!");
130#else
131 rb->splash(HZ, "File creation failed");
132#endif
133 rb->close(fd); 129 rb->close(fd);
134 return false; 130 return false;
135 } 131 }
diff --git a/apps/plugins/searchengine/searchengine.h b/apps/plugins/searchengine/searchengine.h
index 090adb7051..00bedd816b 100644
--- a/apps/plugins/searchengine/searchengine.h
+++ b/apps/plugins/searchengine/searchengine.h
@@ -25,20 +25,12 @@
25#include <autoconf.h> 25#include <autoconf.h>
26 26
27extern int w, h, y; 27extern int w, h, y;
28#ifdef HAVE_LCD_BITMAP
29#define PUTS(str) do { \ 28#define PUTS(str) do { \
30 rb->lcd_putsxy(1, y, str); \ 29 rb->lcd_putsxy(1, y, str); \
31 rb->lcd_getstringsize(str, &w, &h); \ 30 rb->lcd_getstringsize(str, &w, &h); \
32 y += h + 1; \ 31 y += h + 1; \
33} while (0); \ 32} while (0); \
34rb->lcd_update() 33rb->lcd_update()
35#else
36#define PUTS(str) do { \
37 rb->lcd_puts(0, y, str); \
38 y = (y + 1) % 2; \
39} while (0); \
40rb->lcd_update()
41#endif
42 34
43void *my_malloc(size_t size); 35void *my_malloc(size_t size);
44void setmallocpos(void *pointer); 36void setmallocpos(void *pointer);
diff --git a/apps/plugins/shortcuts/shortcuts_view.c b/apps/plugins/shortcuts/shortcuts_view.c
index c9a4655341..cfc9d8d746 100644
--- a/apps/plugins/shortcuts/shortcuts_view.c
+++ b/apps/plugins/shortcuts/shortcuts_view.c
@@ -223,20 +223,16 @@ enum plugin_status plugin_start(const void* void_parameter)
223 return PLUGIN_OK; 223 return PLUGIN_OK;
224 } 224 }
225 225
226#ifdef HAVE_LCD_BITMAP
227 FOR_NB_SCREENS(i) 226 FOR_NB_SCREENS(i)
228 rb->viewportmanager_theme_enable(i, true, NULL); 227 rb->viewportmanager_theme_enable(i, true, NULL);
229#endif
230 228
231 do { 229 do {
232 /* Display a menu to choose between the entries */ 230 /* Display a menu to choose between the entries */
233 leave_loop = list_sc(); 231 leave_loop = list_sc();
234 } while (!leave_loop); 232 } while (!leave_loop);
235 233
236#ifdef HAVE_LCD_BITMAP
237 FOR_NB_SCREENS(i) 234 FOR_NB_SCREENS(i)
238 rb->viewportmanager_theme_undo(i, false); 235 rb->viewportmanager_theme_undo(i, false);
239#endif
240 236
241 return usb_connected ? PLUGIN_USB_CONNECTED : PLUGIN_OK; 237 return usb_connected ? PLUGIN_USB_CONNECTED : PLUGIN_OK;
242} 238}
diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c
index f05d3c2a44..10b41c972b 100644
--- a/apps/plugins/snow.c
+++ b/apps/plugins/snow.c
@@ -22,15 +22,9 @@
22#include "lib/mylcd.h" 22#include "lib/mylcd.h"
23#include "lib/pluginlib_actions.h" 23#include "lib/pluginlib_actions.h"
24 24
25#ifdef HAVE_LCD_BITMAP
26#define NUM_PARTICLES (LCD_WIDTH * LCD_HEIGHT / 72) 25#define NUM_PARTICLES (LCD_WIDTH * LCD_HEIGHT / 72)
27#define SNOW_HEIGHT LCD_HEIGHT 26#define SNOW_HEIGHT LCD_HEIGHT
28#define SNOW_WIDTH LCD_WIDTH 27#define SNOW_WIDTH LCD_WIDTH
29#else
30#define NUM_PARTICLES 10
31#define SNOW_HEIGHT 14
32#define SNOW_WIDTH 20
33#endif
34 28
35static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; 29static const struct button_mapping *plugin_contexts[] = { pla_main_ctx };
36 30
@@ -40,7 +34,6 @@ static const struct button_mapping *plugin_contexts[] = { pla_main_ctx };
40 34
41static short particles[NUM_PARTICLES][2]; 35static short particles[NUM_PARTICLES][2];
42 36
43#ifdef HAVE_LCD_BITMAP
44#if LCD_WIDTH >= 160 37#if LCD_WIDTH >= 160
45#define FLAKE_WIDTH 5 38#define FLAKE_WIDTH 5
46static const unsigned char flake[] = {0x0a,0x04,0x1f,0x04,0x0a}; 39static const unsigned char flake[] = {0x0a,0x04,0x1f,0x04,0x0a};
@@ -48,7 +41,6 @@ static const unsigned char flake[] = {0x0a,0x04,0x1f,0x04,0x0a};
48#define FLAKE_WIDTH 3 41#define FLAKE_WIDTH 3
49static const unsigned char flake[] = {0x02,0x07,0x02}; 42static const unsigned char flake[] = {0x02,0x07,0x02};
50#endif 43#endif
51#endif
52 44
53static bool particle_exists(int particle) 45static bool particle_exists(int particle)
54{ 46{
@@ -83,12 +75,8 @@ static void snow_move(void)
83 for (i=0; i<NUM_PARTICLES; i++) { 75 for (i=0; i<NUM_PARTICLES; i++) {
84 if (particle_exists(i)) { 76 if (particle_exists(i)) {
85 mylcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); 77 mylcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
86#ifdef HAVE_LCD_BITMAP
87 rb->lcd_fillrect(particles[i][0],particles[i][1], 78 rb->lcd_fillrect(particles[i][0],particles[i][1],
88 FLAKE_WIDTH,FLAKE_WIDTH); 79 FLAKE_WIDTH,FLAKE_WIDTH);
89#else
90 pgfx_drawpixel(particles[i][0],particles[i][1]);
91#endif
92 mylcd_set_drawmode(DRMODE_SOLID); 80 mylcd_set_drawmode(DRMODE_SOLID);
93#ifdef HAVE_REMOTE_LCD 81#ifdef HAVE_REMOTE_LCD
94 if (particles[i][0] <= LCD_REMOTE_WIDTH 82 if (particles[i][0] <= LCD_REMOTE_WIDTH
@@ -116,12 +104,8 @@ static void snow_move(void)
116 break; 104 break;
117 } 105 }
118 if (particle_exists(i)) 106 if (particle_exists(i))
119#ifdef HAVE_LCD_BITMAP
120 rb->lcd_mono_bitmap(flake,particles[i][0],particles[i][1], 107 rb->lcd_mono_bitmap(flake,particles[i][0],particles[i][1],
121 FLAKE_WIDTH,FLAKE_WIDTH); 108 FLAKE_WIDTH,FLAKE_WIDTH);
122#else
123 pgfx_drawpixel(particles[i][0],particles[i][1]);
124#endif
125#ifdef HAVE_REMOTE_LCD 109#ifdef HAVE_REMOTE_LCD
126 if (particles[i][0] <= LCD_REMOTE_WIDTH 110 if (particles[i][0] <= LCD_REMOTE_WIDTH
127 && particles[i][1] <= LCD_REMOTE_HEIGHT) { 111 && particles[i][1] <= LCD_REMOTE_HEIGHT) {
diff --git a/apps/plugins/stats.c b/apps/plugins/stats.c
index ff23911336..0a29a7aa30 100644
--- a/apps/plugins/stats.c
+++ b/apps/plugins/stats.c
@@ -56,7 +56,6 @@ static void update_screen(void)
56 rb->lcd_remote_clear_display(); 56 rb->lcd_remote_clear_display();
57#endif 57#endif
58 58
59#ifdef HAVE_LCD_BITMAP
60 rb->snprintf(buf, sizeof(buf), "Total Files: %d", files); 59 rb->snprintf(buf, sizeof(buf), "Total Files: %d", files);
61 prn(buf,0); 60 prn(buf,0);
62 rb->snprintf(buf, sizeof(buf), "Audio: %d", audiofiles); 61 rb->snprintf(buf, sizeof(buf), "Audio: %d", audiofiles);
@@ -71,12 +70,6 @@ static void update_screen(void)
71 prn(buf,5); 70 prn(buf,5);
72 rb->snprintf(buf, sizeof(buf), "Max files in Dir: %d", largestdir); 71 rb->snprintf(buf, sizeof(buf), "Max files in Dir: %d", largestdir);
73 prn(buf,6); 72 prn(buf,6);
74#else
75 rb->snprintf(buf, sizeof(buf), "Files:%5d", files);
76 prn(buf,0);
77 rb->snprintf(buf, sizeof(buf), "Dirs: %5d", dirs);
78 prn(buf,1);
79#endif
80 73
81 rb->lcd_update(); 74 rb->lcd_update();
82#ifdef HAVE_REMOTE_LCD 75#ifdef HAVE_REMOTE_LCD
diff --git a/apps/plugins/stopwatch.c b/apps/plugins/stopwatch.c
index c3fa3e15dd..6fca37d06f 100644
--- a/apps/plugins/stopwatch.c
+++ b/apps/plugins/stopwatch.c
@@ -23,11 +23,7 @@
23 23
24 24
25 25
26#ifdef HAVE_LCD_BITMAP
27#define TIMER_Y 1 26#define TIMER_Y 1
28#else
29#define TIMER_Y 0
30#endif
31 27
32#define LAP_Y TIMER_Y+1 28#define LAP_Y TIMER_Y+1
33#define MAX_LAPS 64 29#define MAX_LAPS 64
@@ -481,14 +477,10 @@ enum plugin_status plugin_start(const void* parameter)
481 477
482 (void)parameter; 478 (void)parameter;
483 479
484#ifdef HAVE_LCD_BITMAP
485 int h; 480 int h;
486 rb->lcd_setfont(FONT_UI); 481 rb->lcd_setfont(FONT_UI);
487 rb->lcd_getstringsize("M", NULL, &h); 482 rb->lcd_getstringsize("M", NULL, &h);
488 lines = (LCD_HEIGHT / h) - (LAP_Y); 483 lines = (LCD_HEIGHT / h) - (LAP_Y);
489#else
490 lines = 1;
491#endif
492 484
493 load_stopwatch(); 485 load_stopwatch();
494 486
diff --git a/apps/plugins/test_mem.c b/apps/plugins/test_mem.c
index 66d6248dcc..f17ea7a05d 100644
--- a/apps/plugins/test_mem.c
+++ b/apps/plugins/test_mem.c
@@ -206,10 +206,8 @@ enum plugin_status plugin_start(const void* parameter)
206#endif 206#endif
207 int count = 0; 207 int count = 0;
208 208
209#ifdef HAVE_LCD_BITMAP
210 rb->lcd_setfont(FONT_SYSFIXED); 209 rb->lcd_setfont(FONT_SYSFIXED);
211#endif 210
212
213 rb->screens[0]->clear_display(); 211 rb->screens[0]->clear_display();
214 TEST_MEM_PRINTF("patience, may take some seconds..."); 212 TEST_MEM_PRINTF("patience, may take some seconds...");
215 rb->screens[0]->update(); 213 rb->screens[0]->update();
diff --git a/apps/plugins/test_viewports.c b/apps/plugins/test_viewports.c
index 9fc9caa451..465a832399 100644
--- a/apps/plugins/test_viewports.c
+++ b/apps/plugins/test_viewports.c
@@ -21,10 +21,6 @@
21 21
22#include "plugin.h" 22#include "plugin.h"
23 23
24
25
26#ifdef HAVE_LCD_BITMAP
27
28#ifdef HAVE_LCD_COLOR 24#ifdef HAVE_LCD_COLOR
29#define BGCOLOR_1 LCD_RGBPACK(255,255,0) 25#define BGCOLOR_1 LCD_RGBPACK(255,255,0)
30#define BGCOLOR_2 LCD_RGBPACK(0,255,0) 26#define BGCOLOR_2 LCD_RGBPACK(0,255,0)
@@ -207,61 +203,3 @@ enum plugin_status plugin_start(const void* parameter)
207 203
208 return PLUGIN_OK; 204 return PLUGIN_OK;
209} 205}
210
211
212#else
213
214/* Charcell version of plugin */
215
216static struct viewport vp0 =
217{
218 .x = 0,
219 .y = 0,
220 .width = 5,
221 .height = 1,
222};
223
224static struct viewport vp1 =
225{
226 .x = 6,
227 .y = 0,
228 .width = 5,
229 .height = 1,
230};
231
232static struct viewport vp2 =
233{
234 .x = 0,
235 .y = 1,
236 .width = LCD_WIDTH,
237 .height = 1,
238};
239
240
241enum plugin_status plugin_start(const void* parameter)
242{
243 (void)parameter;
244
245 rb->screens[SCREEN_MAIN]->set_viewport(&vp0);
246 rb->screens[SCREEN_MAIN]->clear_viewport();
247 rb->screens[SCREEN_MAIN]->puts_scroll(0,0,"Rockbox");
248
249 rb->screens[SCREEN_MAIN]->set_viewport(&vp1);
250 rb->screens[SCREEN_MAIN]->clear_viewport();
251 rb->screens[SCREEN_MAIN]->puts_scroll(0,0,"Viewports");
252
253 rb->screens[SCREEN_MAIN]->set_viewport(&vp2);
254 rb->screens[SCREEN_MAIN]->clear_viewport();
255 rb->screens[SCREEN_MAIN]->puts_scroll(0,0,"Demonstration");
256
257 rb->screens[SCREEN_MAIN]->update();
258
259 rb->button_get(true);
260
261 /* Restore the default viewport */
262 rb->screens[SCREEN_MAIN]->set_viewport(NULL);
263
264 return PLUGIN_OK;
265}
266
267#endif /* !HAVE_LCD_BITMAP */
diff --git a/apps/plugins/text_viewer/text_viewer.c b/apps/plugins/text_viewer/text_viewer.c
index c8102eb6d2..fea0977c0d 100644
--- a/apps/plugins/text_viewer/text_viewer.c
+++ b/apps/plugins/text_viewer/text_viewer.c
@@ -61,10 +61,8 @@ enum plugin_status plugin_start(const void* file)
61 61
62 atexit(tv_exit); 62 atexit(tv_exit);
63 while (!done) { 63 while (!done) {
64#ifdef HAVE_LCD_BITMAP
65 if (preferences->statusbar) 64 if (preferences->statusbar)
66 rb->send_event(GUI_EVENT_ACTIONUPDATE, NULL); 65 rb->send_event(GUI_EVENT_ACTIONUPDATE, NULL);
67#endif
68 66
69 if (display_update) 67 if (display_update)
70 tv_draw(); 68 tv_draw();
diff --git a/apps/plugins/text_viewer/tv_action.c b/apps/plugins/text_viewer/tv_action.c
index 798871c430..041dee5a50 100644
--- a/apps/plugins/text_viewer/tv_action.c
+++ b/apps/plugins/text_viewer/tv_action.c
@@ -100,9 +100,7 @@ void tv_scroll_up(unsigned mode)
100 (mode == TV_VERTICAL_SCROLL_PREFS && preferences->vertical_scroll_mode == VS_PAGE)) 100 (mode == TV_VERTICAL_SCROLL_PREFS && preferences->vertical_scroll_mode == VS_PAGE))
101 { 101 {
102 offset_page--; 102 offset_page--;
103#ifdef HAVE_LCD_BITMAP
104 offset_line = (preferences->overlap_page_mode)? 1:0; 103 offset_line = (preferences->overlap_page_mode)? 1:0;
105#endif
106 } 104 }
107 tv_move_screen(offset_page, offset_line, SEEK_CUR); 105 tv_move_screen(offset_page, offset_line, SEEK_CUR);
108 scrolled = true; 106 scrolled = true;
@@ -117,9 +115,7 @@ void tv_scroll_down(unsigned mode)
117 (mode == TV_VERTICAL_SCROLL_PREFS && preferences->vertical_scroll_mode == VS_PAGE)) 115 (mode == TV_VERTICAL_SCROLL_PREFS && preferences->vertical_scroll_mode == VS_PAGE))
118 { 116 {
119 offset_page++; 117 offset_page++;
120#ifdef HAVE_LCD_BITMAP
121 offset_line = (preferences->overlap_page_mode)? -1:0; 118 offset_line = (preferences->overlap_page_mode)? -1:0;
122#endif
123 } 119 }
124 tv_move_screen(offset_page, offset_line, SEEK_CUR); 120 tv_move_screen(offset_page, offset_line, SEEK_CUR);
125 scrolled = true; 121 scrolled = true;
diff --git a/apps/plugins/text_viewer/tv_bookmark.c b/apps/plugins/text_viewer/tv_bookmark.c
index 0f5d58b24e..1edad093a9 100644
--- a/apps/plugins/text_viewer/tv_bookmark.c
+++ b/apps/plugins/text_viewer/tv_bookmark.c
@@ -182,11 +182,7 @@ static const char* get_bookmark_name(int selected, void * data,
182 (void)data; 182 (void)data;
183 struct tv_bookmark_info *bookmark = &bookmarks[selected]; 183 struct tv_bookmark_info *bookmark = &bookmarks[selected];
184 rb->snprintf(buffer, buffer_len, 184 rb->snprintf(buffer, buffer_len,
185#ifdef HAVE_LCD_BITMAP
186 "%cPage: %d Line: %d", 185 "%cPage: %d Line: %d",
187#else
188 "%cP:%d L:%d",
189#endif
190 (bookmark->flag & TV_BOOKMARK_SYSTEM)? '*' : ' ', 186 (bookmark->flag & TV_BOOKMARK_SYSTEM)? '*' : ' ',
191 bookmark->pos.page + 1, bookmark->pos.line + 1); 187 bookmark->pos.page + 1, bookmark->pos.line + 1);
192 return buffer; 188 return buffer;
diff --git a/apps/plugins/text_viewer/tv_display.c b/apps/plugins/text_viewer/tv_display.c
index d6175b79cf..9ecfd8d709 100644
--- a/apps/plugins/text_viewer/tv_display.c
+++ b/apps/plugins/text_viewer/tv_display.c
@@ -25,7 +25,6 @@
25/* 25/*
26 * display layout 26 * display layout
27 * 27 *
28 * when is defined HAVE_LCD_BITMAP
29 * +-------------------------+ 28 * +-------------------------+
30 * |statusbar (1) | 29 * |statusbar (1) |
31 * +-------------------------+ 30 * +-------------------------+
@@ -56,14 +55,6 @@
56 * (5) displays when preferences->footer_mode is FT_PAGE. 55 * (5) displays when preferences->footer_mode is FT_PAGE.
57 * (6) displays when rb->global_settings->statusbar == STATUSBAR_BOTTOM. 56 * (6) displays when rb->global_settings->statusbar == STATUSBAR_BOTTOM.
58 * 57 *
59 *
60 * when isn't defined HAVE_LCD_BITMAP
61 * +---+---------------------+
62 * | | |
63 * |(7)| draw area |
64 * | | |
65 * +---+---------------------+
66 * (7) bookmark
67 */ 58 */
68 59
69#define TV_SCROLLBAR_WIDTH rb->global_settings->scrollbar_width 60#define TV_SCROLLBAR_WIDTH rb->global_settings->scrollbar_width
@@ -83,14 +74,10 @@ static bool is_initialized_vp = false;
83static struct screen* display; 74static struct screen* display;
84 75
85/* layout */ 76/* layout */
86#ifdef HAVE_LCD_BITMAP
87static struct tv_rect header; 77static struct tv_rect header;
88static struct tv_rect footer; 78static struct tv_rect footer;
89static struct tv_rect horizontal_scrollbar; 79static struct tv_rect horizontal_scrollbar;
90static struct tv_rect vertical_scrollbar; 80static struct tv_rect vertical_scrollbar;
91#else
92static struct tv_rect bookmark;
93#endif
94 81
95static bool show_horizontal_scrollbar; 82static bool show_horizontal_scrollbar;
96static bool show_vertical_scrollbar; 83static bool show_vertical_scrollbar;
@@ -103,8 +90,6 @@ static int row_height = 1;
103 90
104static int totalsize; 91static int totalsize;
105 92
106#ifdef HAVE_LCD_BITMAP
107
108static void tv_show_header(void) 93static void tv_show_header(void)
109{ 94{
110 if (preferences->header_mode) 95 if (preferences->header_mode)
@@ -156,8 +141,6 @@ static void tv_show_scrollbar(int window, int col, off_t cur_pos, int size)
156 } 141 }
157} 142}
158 143
159#endif
160
161void tv_init_scrollbar(off_t total, bool show_scrollbar) 144void tv_init_scrollbar(off_t total, bool show_scrollbar)
162{ 145{
163 totalsize = total; 146 totalsize = total;
@@ -167,38 +150,23 @@ void tv_init_scrollbar(off_t total, bool show_scrollbar)
167 150
168void tv_show_bookmarks(const int *rows, int count) 151void tv_show_bookmarks(const int *rows, int count)
169{ 152{
170#ifdef HAVE_LCD_BITMAP
171 display->set_viewport(&vp_text); 153 display->set_viewport(&vp_text);
172 display->set_drawmode(DRMODE_COMPLEMENT); 154 display->set_drawmode(DRMODE_COMPLEMENT);
173#endif
174 155
175 while (count--) 156 while (count--)
176 { 157 {
177#ifdef HAVE_LCD_BITMAP
178 display->fillrect(0, rows[count] * row_height, 158 display->fillrect(0, rows[count] * row_height,
179 vp_text.width, row_height); 159 vp_text.width, row_height);
180#else
181 display->putchar(bookmark.x, bookmark.y + rows[count], TV_BOOKMARK_ICON);
182#endif
183 } 160 }
184#ifdef HAVE_LCD_BITMAP
185 display->set_drawmode(DRMODE_SOLID); 161 display->set_drawmode(DRMODE_SOLID);
186 display->set_viewport(&vp_info); 162 display->set_viewport(&vp_info);
187#endif
188} 163}
189 164
190void tv_update_extra(int window, int col, const struct tv_screen_pos *pos, int size) 165void tv_update_extra(int window, int col, const struct tv_screen_pos *pos, int size)
191{ 166{
192#ifdef HAVE_LCD_BITMAP
193 tv_show_scrollbar(window, col, pos->file_pos, size); 167 tv_show_scrollbar(window, col, pos->file_pos, size);
194 tv_show_header(); 168 tv_show_header();
195 tv_show_footer(pos); 169 tv_show_footer(pos);
196#else
197 (void)window;
198 (void)col;
199 (void)pos;
200 (void)size;
201#endif
202} 170}
203 171
204void tv_draw_text(int row, const unsigned char *text, int offset) 172void tv_draw_text(int row, const unsigned char *text, int offset)
@@ -217,11 +185,7 @@ void tv_draw_text(int row, const unsigned char *text, int offset)
217 185
218 display->set_viewport(&vp_text); 186 display->set_viewport(&vp_text);
219 tv_night_mode(); 187 tv_night_mode();
220#ifdef HAVE_LCD_BITMAP
221 display->putsxy(xpos, row * row_height, text); 188 display->putsxy(xpos, row * row_height, text);
222#else
223 display->puts(xpos, row, text);
224#endif
225 display->set_viewport(&vp_info); 189 display->set_viewport(&vp_info);
226} 190}
227 191
@@ -229,9 +193,7 @@ void tv_start_display(void)
229{ 193{
230 display->set_viewport(&vp_info); 194 display->set_viewport(&vp_info);
231 tv_night_mode(); 195 tv_night_mode();
232#ifdef HAVE_LCD_BITMAP
233 display->set_drawmode(DRMODE_SOLID); 196 display->set_drawmode(DRMODE_SOLID);
234#endif
235 197
236#if LCD_DEPTH > 1 198#if LCD_DEPTH > 1
237 rb->lcd_set_backdrop(NULL); 199 rb->lcd_set_backdrop(NULL);
@@ -248,7 +210,6 @@ void tv_end_display(void)
248 210
249void tv_set_layout(bool show_scrollbar) 211void tv_set_layout(bool show_scrollbar)
250{ 212{
251#ifdef HAVE_LCD_BITMAP
252 int scrollbar_width = (show_scrollbar && preferences->vertical_scrollbar)? 213 int scrollbar_width = (show_scrollbar && preferences->vertical_scrollbar)?
253 TV_SCROLLBAR_WIDTH + 1 : 0; 214 TV_SCROLLBAR_WIDTH + 1 : 0;
254 int scrollbar_height = (show_scrollbar && preferences->horizontal_scrollbar)? 215 int scrollbar_height = (show_scrollbar && preferences->horizontal_scrollbar)?
@@ -282,20 +243,6 @@ void tv_set_layout(bool show_scrollbar)
282 vp_text.y += vertical_scrollbar.y; 243 vp_text.y += vertical_scrollbar.y;
283 vp_text.width = horizontal_scrollbar.w; 244 vp_text.width = horizontal_scrollbar.w;
284 vp_text.height = vertical_scrollbar.h; 245 vp_text.height = vertical_scrollbar.h;
285#else
286 (void) show_scrollbar;
287
288 row_height = 1;
289
290 bookmark.x = 0;
291 bookmark.y = 0;
292 bookmark.w = 1;
293 bookmark.h = vp_info.height;
294
295 vp_text = vp_info;
296 vp_text.x += 1;
297 vp_text.width -= 1;
298#endif
299 246
300 display_columns = vp_text.width / col_width; 247 display_columns = vp_text.width / col_width;
301 display_rows = vp_text.height / row_height; 248 display_rows = vp_text.height / row_height;
@@ -310,7 +257,6 @@ void tv_get_drawarea_info(int *width, int *cols, int *rows)
310 257
311static void tv_change_viewport(void) 258static void tv_change_viewport(void)
312{ 259{
313#ifdef HAVE_LCD_BITMAP
314 bool show_statusbar = preferences->statusbar; 260 bool show_statusbar = preferences->statusbar;
315 261
316 if (is_initialized_vp) 262 if (is_initialized_vp)
@@ -321,16 +267,8 @@ static void tv_change_viewport(void)
321 rb->viewportmanager_theme_enable(SCREEN_MAIN, show_statusbar, &vp_info); 267 rb->viewportmanager_theme_enable(SCREEN_MAIN, show_statusbar, &vp_info);
322 vp_info.flags &= ~VP_FLAG_ALIGNMENT_MASK; 268 vp_info.flags &= ~VP_FLAG_ALIGNMENT_MASK;
323 display->set_viewport(&vp_info); 269 display->set_viewport(&vp_info);
324#else
325 if (!is_initialized_vp)
326 {
327 rb->viewport_set_defaults(&vp_info, SCREEN_MAIN);
328 is_initialized_vp = true;
329 }
330#endif
331} 270}
332 271
333#ifdef HAVE_LCD_BITMAP
334static bool tv_set_font(const unsigned char *font) 272static bool tv_set_font(const unsigned char *font)
335{ 273{
336 unsigned char path[MAX_PATH]; 274 unsigned char path[MAX_PATH];
@@ -350,11 +288,9 @@ static bool tv_set_font(const unsigned char *font)
350 vp_text.font = preferences->font_id; 288 vp_text.font = preferences->font_id;
351 return true; 289 return true;
352} 290}
353#endif
354 291
355static int tv_change_preferences(const struct tv_preferences *oldp) 292static int tv_change_preferences(const struct tv_preferences *oldp)
356{ 293{
357#ifdef HAVE_LCD_BITMAP
358 static bool font_changing = false; 294 static bool font_changing = false;
359 const unsigned char *font_str; 295 const unsigned char *font_str;
360 struct tv_preferences new_prefs; 296 struct tv_preferences new_prefs;
@@ -382,9 +318,6 @@ static int tv_change_preferences(const struct tv_preferences *oldp)
382 col_width = 2 * rb->font_get_width(rb->font_get(preferences->font_id), ' '); 318 col_width = 2 * rb->font_get_width(rb->font_get(preferences->font_id), ' ');
383 font_changing = false; 319 font_changing = false;
384 } 320 }
385#else
386 (void)oldp;
387#endif
388 tv_change_viewport(); 321 tv_change_viewport();
389 return TV_CALLBACK_OK; 322 return TV_CALLBACK_OK;
390} 323}
@@ -419,7 +352,6 @@ void tv_night_mode(void)
419 352
420void tv_finalize_display(void) 353void tv_finalize_display(void)
421{ 354{
422#ifdef HAVE_LCD_BITMAP
423 /* restore font */ 355 /* restore font */
424 if (preferences->font_id >= 0 && 356 if (preferences->font_id >= 0 &&
425 (preferences->font_id != rb->global_status->font_id[SCREEN_MAIN])) 357 (preferences->font_id != rb->global_status->font_id[SCREEN_MAIN]))
@@ -430,14 +362,9 @@ void tv_finalize_display(void)
430 /* undo viewport */ 362 /* undo viewport */
431 if (is_initialized_vp) 363 if (is_initialized_vp)
432 rb->viewportmanager_theme_undo(SCREEN_MAIN, false); 364 rb->viewportmanager_theme_undo(SCREEN_MAIN, false);
433#endif
434} 365}
435 366
436bool tv_exist_scrollbar(void) 367bool tv_exist_scrollbar(void)
437{ 368{
438#ifdef HAVE_LCD_BITMAP
439 return true; 369 return true;
440#else
441 return false;
442#endif
443} 370}
diff --git a/apps/plugins/text_viewer/tv_menu.c b/apps/plugins/text_viewer/tv_menu.c
index 01fb052151..53e0adaf67 100644
--- a/apps/plugins/text_viewer/tv_menu.c
+++ b/apps/plugins/text_viewer/tv_menu.c
@@ -34,12 +34,10 @@ static struct tv_preferences new_prefs;
34/* horizontal scroll settings menu */ 34/* horizontal scroll settings menu */
35/* */ 35/* */
36 36
37#ifdef HAVE_LCD_BITMAP
38static bool tv_horizontal_scrollbar_setting(void) 37static bool tv_horizontal_scrollbar_setting(void)
39{ 38{
40 return rb->set_bool("Horizontal Scrollbar", &new_prefs.horizontal_scrollbar); 39 return rb->set_bool("Horizontal Scrollbar", &new_prefs.horizontal_scrollbar);
41} 40}
42#endif
43 41
44static bool tv_horizontal_scroll_mode_setting(void) 42static bool tv_horizontal_scroll_mode_setting(void)
45{ 43{
@@ -52,30 +50,24 @@ static bool tv_horizontal_scroll_mode_setting(void)
52 names, 2, NULL); 50 names, 2, NULL);
53} 51}
54 52
55#ifdef HAVE_LCD_BITMAP
56MENUITEM_FUNCTION(horizontal_scrollbar_item, 0, "Scrollbar", 53MENUITEM_FUNCTION(horizontal_scrollbar_item, 0, "Scrollbar",
57 tv_horizontal_scrollbar_setting, 54 tv_horizontal_scrollbar_setting,
58 NULL, NULL, Icon_NOICON); 55 NULL, NULL, Icon_NOICON);
59#endif
60MENUITEM_FUNCTION(horizontal_scroll_mode_item, 0, "Scroll Mode", 56MENUITEM_FUNCTION(horizontal_scroll_mode_item, 0, "Scroll Mode",
61 tv_horizontal_scroll_mode_setting, NULL, NULL, Icon_NOICON); 57 tv_horizontal_scroll_mode_setting, NULL, NULL, Icon_NOICON);
62 58
63MAKE_MENU(horizontal_scroll_menu, "Horizontal", NULL, Icon_NOICON, 59MAKE_MENU(horizontal_scroll_menu, "Horizontal", NULL, Icon_NOICON,
64#ifdef HAVE_LCD_BITMAP
65 &horizontal_scrollbar_item, 60 &horizontal_scrollbar_item,
66#endif
67 &horizontal_scroll_mode_item); 61 &horizontal_scroll_mode_item);
68 62
69/* */ 63/* */
70/* vertical scroll settings menu */ 64/* vertical scroll settings menu */
71/* */ 65/* */
72 66
73#ifdef HAVE_LCD_BITMAP
74static bool tv_vertical_scrollbar_setting(void) 67static bool tv_vertical_scrollbar_setting(void)
75{ 68{
76 return rb->set_bool("Vertical Scrollbar", &new_prefs.vertical_scrollbar); 69 return rb->set_bool("Vertical Scrollbar", &new_prefs.vertical_scrollbar);
77} 70}
78#endif
79 71
80static bool tv_vertical_scroll_mode_setting(void) 72static bool tv_vertical_scroll_mode_setting(void)
81{ 73{
@@ -110,11 +102,9 @@ static bool tv_narrow_mode_setting(void)
110 names, 2, NULL); 102 names, 2, NULL);
111} 103}
112 104
113#ifdef HAVE_LCD_BITMAP
114MENUITEM_FUNCTION(vertical_scrollbar_item, 0, "Scrollbar", 105MENUITEM_FUNCTION(vertical_scrollbar_item, 0, "Scrollbar",
115 tv_vertical_scrollbar_setting, 106 tv_vertical_scrollbar_setting,
116 NULL, NULL, Icon_NOICON); 107 NULL, NULL, Icon_NOICON);
117#endif
118MENUITEM_FUNCTION(vertical_scroll_mode_item, 0, "Scroll Mode", 108MENUITEM_FUNCTION(vertical_scroll_mode_item, 0, "Scroll Mode",
119 tv_vertical_scroll_mode_setting, NULL, NULL, Icon_NOICON); 109 tv_vertical_scroll_mode_setting, NULL, NULL, Icon_NOICON);
120MENUITEM_FUNCTION(overlap_page_mode_item, 0, "Overlap Pages", tv_overlap_page_mode_setting, 110MENUITEM_FUNCTION(overlap_page_mode_item, 0, "Overlap Pages", tv_overlap_page_mode_setting,
@@ -125,9 +115,7 @@ MENUITEM_FUNCTION(narrow_mode_item, 0, "Left/Right Key (Narrow mode)",
125 tv_narrow_mode_setting, NULL, NULL, Icon_NOICON); 115 tv_narrow_mode_setting, NULL, NULL, Icon_NOICON);
126 116
127MAKE_MENU(vertical_scroll_menu, "Vertical", NULL, Icon_NOICON, 117MAKE_MENU(vertical_scroll_menu, "Vertical", NULL, Icon_NOICON,
128#ifdef HAVE_LCD_BITMAP
129 &vertical_scrollbar_item, 118 &vertical_scrollbar_item,
130#endif
131 &vertical_scroll_mode_item, &overlap_page_mode_item, &autoscroll_speed_item, 119 &vertical_scroll_mode_item, &overlap_page_mode_item, &autoscroll_speed_item,
132 &narrow_mode_item); 120 &narrow_mode_item);
133 121
@@ -198,7 +186,6 @@ static bool tv_alignment_setting(void)
198 names , 2, NULL); 186 names , 2, NULL);
199} 187}
200 188
201#ifdef HAVE_LCD_BITMAP
202static bool tv_header_setting(void) 189static bool tv_header_setting(void)
203{ 190{
204 return rb->set_bool("Show Header", &new_prefs.header_mode); 191 return rb->set_bool("Show Header", &new_prefs.header_mode);
@@ -239,7 +226,6 @@ static bool tv_font_setting(void)
239 226
240 return false; 227 return false;
241} 228}
242#endif
243 229
244static bool tv_indent_spaces_setting(void) 230static bool tv_indent_spaces_setting(void)
245{ 231{
@@ -264,7 +250,6 @@ MENUITEM_FUNCTION(windows_item, 0, "Screens Per Page", tv_windows_setting,
264 NULL, NULL, Icon_NOICON); 250 NULL, NULL, Icon_NOICON);
265MENUITEM_FUNCTION(alignment_item, 0, "Alignment", tv_alignment_setting, 251MENUITEM_FUNCTION(alignment_item, 0, "Alignment", tv_alignment_setting,
266 NULL, NULL, Icon_NOICON); 252 NULL, NULL, Icon_NOICON);
267#ifdef HAVE_LCD_BITMAP
268MENUITEM_FUNCTION(header_item, 0, "Show Header", tv_header_setting, 253MENUITEM_FUNCTION(header_item, 0, "Show Header", tv_header_setting,
269 NULL, NULL, Icon_NOICON); 254 NULL, NULL, Icon_NOICON);
270MENUITEM_FUNCTION(footer_item, 0, "Show Footer", tv_footer_setting, 255MENUITEM_FUNCTION(footer_item, 0, "Show Footer", tv_footer_setting,
@@ -273,7 +258,6 @@ MENUITEM_FUNCTION(statusbar_item, 0, "Show Statusbar", tv_statusbar_setting,
273 NULL, NULL, Icon_NOICON); 258 NULL, NULL, Icon_NOICON);
274MENUITEM_FUNCTION(font_item, 0, "Font", tv_font_setting, 259MENUITEM_FUNCTION(font_item, 0, "Font", tv_font_setting,
275 NULL, NULL, Icon_NOICON); 260 NULL, NULL, Icon_NOICON);
276#endif
277MENUITEM_FUNCTION(indent_spaces_item, 0, "Indent Spaces", tv_indent_spaces_setting, 261MENUITEM_FUNCTION(indent_spaces_item, 0, "Indent Spaces", tv_indent_spaces_setting,
278 NULL, NULL, Icon_NOICON); 262 NULL, NULL, Icon_NOICON);
279#ifdef HAVE_LCD_COLOR 263#ifdef HAVE_LCD_COLOR
@@ -284,9 +268,7 @@ MENUITEM_FUNCTION(night_mode_item, 0, "Night Mode", tv_night_mode_setting,
284MAKE_MENU(option_menu, "Viewer Options", NULL, Icon_NOICON, 268MAKE_MENU(option_menu, "Viewer Options", NULL, Icon_NOICON,
285 &encoding_item, &word_wrap_item, &line_mode_item, &windows_item, 269 &encoding_item, &word_wrap_item, &line_mode_item, &windows_item,
286 &alignment_item, 270 &alignment_item,
287#ifdef HAVE_LCD_BITMAP
288 &header_item, &footer_item, &font_item, &statusbar_item, 271 &header_item, &footer_item, &font_item, &statusbar_item,
289#endif
290 &scroll_menu, &indent_spaces_item 272 &scroll_menu, &indent_spaces_item
291#ifdef HAVE_LCD_COLOR 273#ifdef HAVE_LCD_COLOR
292 , &night_mode_item 274 , &night_mode_item
diff --git a/apps/plugins/text_viewer/tv_preferences.c b/apps/plugins/text_viewer/tv_preferences.c
index 54c21ba04d..fdfe068068 100644
--- a/apps/plugins/text_viewer/tv_preferences.c
+++ b/apps/plugins/text_viewer/tv_preferences.c
@@ -59,12 +59,10 @@ static bool tv_notify_change_preferences(const struct tv_preferences *oldp)
59 (oldp->vertical_scrollbar != preferences->vertical_scrollbar) || 59 (oldp->vertical_scrollbar != preferences->vertical_scrollbar) ||
60 (oldp->encoding != preferences->encoding) || 60 (oldp->encoding != preferences->encoding) ||
61 (oldp->indent_spaces != preferences->indent_spaces) || 61 (oldp->indent_spaces != preferences->indent_spaces) ||
62#ifdef HAVE_LCD_BITMAP
63 (oldp->header_mode != preferences->header_mode) || 62 (oldp->header_mode != preferences->header_mode) ||
64 (oldp->footer_mode != preferences->footer_mode) || 63 (oldp->footer_mode != preferences->footer_mode) ||
65 (oldp->statusbar != preferences->statusbar) || 64 (oldp->statusbar != preferences->statusbar) ||
66 (rb->strcmp(oldp->font_name, preferences->font_name)) || 65 (rb->strcmp(oldp->font_name, preferences->font_name)) ||
67#endif
68 (rb->strcmp(oldp->file_name, preferences->file_name))) 66 (rb->strcmp(oldp->file_name, preferences->file_name)))
69 { 67 {
70 /* callback functions are called as FILO */ 68 /* callback functions are called as FILO */
@@ -110,17 +108,11 @@ void tv_set_default_preferences(struct tv_preferences *p)
110 p->overlap_page_mode = false; 108 p->overlap_page_mode = false;
111 p->horizontal_scrollbar = false; 109 p->horizontal_scrollbar = false;
112 p->vertical_scrollbar = false; 110 p->vertical_scrollbar = false;
113#ifdef HAVE_LCD_BITMAP
114 p->header_mode = true; 111 p->header_mode = true;
115 p->footer_mode = true; 112 p->footer_mode = true;
116 p->statusbar = true; 113 p->statusbar = true;
117 rb->strlcpy(p->font_name, rb->global_settings->font_file, MAX_PATH); 114 rb->strlcpy(p->font_name, rb->global_settings->font_file, MAX_PATH);
118 p->font_id = rb->global_status->font_id[SCREEN_MAIN]; 115 p->font_id = rb->global_status->font_id[SCREEN_MAIN];
119#else
120 p->header_mode = false;
121 p->footer_mode = false;
122 p->statusbar = false;
123#endif
124 p->autoscroll_speed = 10; 116 p->autoscroll_speed = 10;
125 p->night_mode = false; 117 p->night_mode = false;
126 p->narrow_mode = NM_PAGE; 118 p->narrow_mode = NM_PAGE;
@@ -139,7 +131,5 @@ void tv_add_preferences_change_listner(int (*listner)(const struct tv_preference
139void tv_change_fontid(int id) 131void tv_change_fontid(int id)
140{ 132{
141 (void)id; 133 (void)id;
142#ifdef HAVE_LCD_BITMAP
143 prefs.font_id = id; 134 prefs.font_id = id;
144#endif
145} 135}
diff --git a/apps/plugins/text_viewer/tv_preferences.h b/apps/plugins/text_viewer/tv_preferences.h
index 65d9521e15..4f36dc1fb6 100644
--- a/apps/plugins/text_viewer/tv_preferences.h
+++ b/apps/plugins/text_viewer/tv_preferences.h
@@ -95,10 +95,9 @@ struct tv_preferences {
95 95
96 bool night_mode; 96 bool night_mode;
97 97
98#ifdef HAVE_LCD_BITMAP
99 unsigned char font_name[MAX_PATH]; 98 unsigned char font_name[MAX_PATH];
100 int font_id; 99 int font_id;
101#endif 100
102 unsigned char file_name[MAX_PATH]; 101 unsigned char file_name[MAX_PATH];
103}; 102};
104 103
diff --git a/apps/plugins/text_viewer/tv_settings.c b/apps/plugins/text_viewer/tv_settings.c
index dfd47ec7a3..6f4e5f2ff8 100644
--- a/apps/plugins/text_viewer/tv_settings.c
+++ b/apps/plugins/text_viewer/tv_settings.c
@@ -219,11 +219,9 @@ static bool tv_read_preferences(int pfd, int version, struct tv_preferences *pre
219 if (version > 6) 219 if (version > 6)
220 prefs->night_mode = (*p++ != 0); 220 prefs->night_mode = (*p++ != 0);
221 221
222#ifdef HAVE_LCD_BITMAP
223 rb->strlcpy(prefs->font_name, buf + read_size - MAX_PATH, MAX_PATH); 222 rb->strlcpy(prefs->font_name, buf + read_size - MAX_PATH, MAX_PATH);
224 223
225 prefs->font_id = rb->global_status->font_id[SCREEN_MAIN]; 224 prefs->font_id = rb->global_status->font_id[SCREEN_MAIN];
226#endif
227 225
228 return true; 226 return true;
229} 227}
@@ -253,9 +251,7 @@ static void tv_serialize_preferences(unsigned char *buf, const struct tv_prefere
253 *p++ = prefs->statusbar; 251 *p++ = prefs->statusbar;
254 *p++ = prefs->night_mode; 252 *p++ = prefs->night_mode;
255 253
256#ifdef HAVE_LCD_BITMAP
257 rb->strlcpy(buf + 28, prefs->font_name, MAX_PATH); 254 rb->strlcpy(buf + 28, prefs->font_name, MAX_PATH);
258#endif
259} 255}
260 256
261static bool tv_write_preferences(int pfd, const struct tv_preferences *prefs) 257static bool tv_write_preferences(int pfd, const struct tv_preferences *prefs)
diff --git a/apps/plugins/text_viewer/tv_text_processor.c b/apps/plugins/text_viewer/tv_text_processor.c
index fa644d7725..db96d61409 100644
--- a/apps/plugins/text_viewer/tv_text_processor.c
+++ b/apps/plugins/text_viewer/tv_text_processor.c
@@ -33,11 +33,7 @@ enum{
33}; 33};
34 34
35/* the max characters of each blocks */ 35/* the max characters of each blocks */
36#ifdef HAVE_LCD_BITMAP
37#define TV_MAX_CHARS_PER_BLOCK (LCD_WIDTH / 2 + 1) 36#define TV_MAX_CHARS_PER_BLOCK (LCD_WIDTH / 2 + 1)
38#else
39#define TV_MAX_CHARS_PER_BLOCK (LCD_WIDTH + 1)
40#endif
41 37
42#define TV_MAX_BLOCKS 5 38#define TV_MAX_BLOCKS 5
43 39
@@ -90,15 +86,11 @@ static int tv_glyph_width(int ch)
90 if (ch == 0) 86 if (ch == 0)
91 ch = ' '; 87 ch = ' ';
92 88
93#ifdef HAVE_LCD_BITMAP
94 /* the width of the diacritics charcter is 0 */ 89 /* the width of the diacritics charcter is 0 */
95 if (rb->is_diacritic(ch, NULL)) 90 if (rb->is_diacritic(ch, NULL))
96 return 0; 91 return 0;
97 92
98 return rb->font_get_width(rb->font_get(preferences->font_id), ch); 93 return rb->font_get_width(rb->font_get(preferences->font_id), ch);
99#else
100 return 1;
101#endif
102} 94}
103 95
104static unsigned char *tv_get_ucs(const unsigned char *str, unsigned short *ch) 96static unsigned char *tv_get_ucs(const unsigned char *str, unsigned short *ch)
@@ -138,7 +130,6 @@ static unsigned char *tv_get_ucs(const unsigned char *str, unsigned short *ch)
138 if (preferences->encoding == UTF_8) 130 if (preferences->encoding == UTF_8)
139 return (unsigned char*)rb->utf8decode(str, ch); 131 return (unsigned char*)rb->utf8decode(str, ch);
140 132
141#ifdef HAVE_LCD_BITMAP
142 if ((*str >= 0x80) && 133 if ((*str >= 0x80) &&
143 ((preferences->encoding > SJIS) || 134 ((preferences->encoding > SJIS) ||
144 (preferences->encoding == SJIS && (*str <= 0xa0 || *str >= 0xe0)))) 135 (preferences->encoding == SJIS && (*str <= 0xa0 || *str >= 0xe0))))
@@ -151,7 +142,7 @@ static unsigned char *tv_get_ucs(const unsigned char *str, unsigned short *ch)
151 } 142 }
152 count = 2; 143 count = 2;
153 } 144 }
154#endif 145
155 rb->iso_decode(str, utf8_tmp, preferences->encoding, count); 146 rb->iso_decode(str, utf8_tmp, preferences->encoding, count);
156 rb->utf8decode(utf8_tmp, ch); 147 rb->utf8decode(utf8_tmp, ch);
157 return (unsigned char *)str + count; 148 return (unsigned char *)str + count;
diff --git a/apps/plugins/theme_remove.c b/apps/plugins/theme_remove.c
index 674342a920..f39d224868 100644
--- a/apps/plugins/theme_remove.c
+++ b/apps/plugins/theme_remove.c
@@ -48,18 +48,12 @@ struct remove_setting {
48}; 48};
49 49
50static int remove_wps(struct remove_setting *); 50static int remove_wps(struct remove_setting *);
51#ifdef HAVE_LCD_BITMAP
52static int remove_icons(struct remove_setting *setting); 51static int remove_icons(struct remove_setting *setting);
53#endif
54 52
55enum remove_settings { 53enum remove_settings {
56#ifdef HAVE_LCD_BITMAP
57 REMOVE_FONT, 54 REMOVE_FONT,
58#endif
59 REMOVE_WPS, 55 REMOVE_WPS,
60#ifdef HAVE_LCD_BITMAP
61 REMOVE_SBS, 56 REMOVE_SBS,
62#endif
63#ifdef HAVE_REMOTE_LCD 57#ifdef HAVE_REMOTE_LCD
64 REMOVE_RWPS, 58 REMOVE_RWPS,
65 REMOVE_RSBS, 59 REMOVE_RSBS,
@@ -67,10 +61,8 @@ enum remove_settings {
67#if LCD_DEPTH > 1 61#if LCD_DEPTH > 1
68 REMOVE_BACKDROP, 62 REMOVE_BACKDROP,
69#endif 63#endif
70#ifdef HAVE_LCD_BITMAP
71 REMOVE_ICON, 64 REMOVE_ICON,
72 REMOVE_VICON, 65 REMOVE_VICON,
73#endif
74#ifdef HAVE_REMOTE_LCD 66#ifdef HAVE_REMOTE_LCD
75 REMOVE_RICON, 67 REMOVE_RICON,
76 REMOVE_RVICON, 68 REMOVE_RVICON,
@@ -83,16 +75,12 @@ enum remove_settings {
83 75
84static bool create_log = true; 76static bool create_log = true;
85static struct remove_setting remove_list[NUM_REMOVE_ITEMS] = { 77static struct remove_setting remove_list[NUM_REMOVE_ITEMS] = {
86#ifdef HAVE_LCD_BITMAP
87 [REMOVE_FONT] = { "font", FONT_DIR "/", ".fnt", "", 78 [REMOVE_FONT] = { "font", FONT_DIR "/", ".fnt", "",
88 ASK_FOR_REMOVAL, NULL, false }, 79 ASK_FOR_REMOVAL, NULL, false },
89#endif
90 [REMOVE_WPS] = { "wps", WPS_DIR "/", ".wps", "", 80 [REMOVE_WPS] = { "wps", WPS_DIR "/", ".wps", "",
91 REMOVE_IF_NOT_USED, remove_wps, false }, 81 REMOVE_IF_NOT_USED, remove_wps, false },
92#ifdef HAVE_LCD_BITMAP
93 [REMOVE_SBS] = { "sbs", SBS_DIR "/", ".sbs", "", 82 [REMOVE_SBS] = { "sbs", SBS_DIR "/", ".sbs", "",
94 REMOVE_IF_NOT_USED, remove_wps, false }, 83 REMOVE_IF_NOT_USED, remove_wps, false },
95#endif
96#ifdef HAVE_REMOTE_LCD 84#ifdef HAVE_REMOTE_LCD
97 [REMOVE_RWPS] = { "rwps", WPS_DIR "/", ".rwps", "", 85 [REMOVE_RWPS] = { "rwps", WPS_DIR "/", ".rwps", "",
98 REMOVE_IF_NOT_USED, remove_wps, false }, 86 REMOVE_IF_NOT_USED, remove_wps, false },
@@ -103,12 +91,10 @@ static struct remove_setting remove_list[NUM_REMOVE_ITEMS] = {
103 [REMOVE_BACKDROP] = { "backdrop", BACKDROP_DIR "/", ".bmp", "", 91 [REMOVE_BACKDROP] = { "backdrop", BACKDROP_DIR "/", ".bmp", "",
104 REMOVE_IF_NOT_USED, NULL, false }, 92 REMOVE_IF_NOT_USED, NULL, false },
105#endif 93#endif
106#ifdef HAVE_LCD_BITMAP
107 [REMOVE_ICON] = { "iconset", ICON_DIR "/", ".bmp", "", 94 [REMOVE_ICON] = { "iconset", ICON_DIR "/", ".bmp", "",
108 ASK_FOR_REMOVAL, NULL, false }, 95 ASK_FOR_REMOVAL, NULL, false },
109 [REMOVE_VICON] = { "viewers iconset", ICON_DIR "/", ".bmp", "", 96 [REMOVE_VICON] = { "viewers iconset", ICON_DIR "/", ".bmp", "",
110 ASK_FOR_REMOVAL, remove_icons, false }, 97 ASK_FOR_REMOVAL, remove_icons, false },
111#endif
112#ifdef HAVE_REMOTE_LCD 98#ifdef HAVE_REMOTE_LCD
113 [REMOVE_RICON] = { "remote iconset", ICON_DIR "/", ".bmp", "", 99 [REMOVE_RICON] = { "remote iconset", ICON_DIR "/", ".bmp", "",
114 ASK_FOR_REMOVAL, NULL, false }, 100 ASK_FOR_REMOVAL, NULL, false },
@@ -124,19 +110,15 @@ static char *option_names[NUM_REMOVE_OPTION] = {
124 "always", "never", "not used", "ask", 110 "always", "never", "not used", "ask",
125}; 111};
126static struct configdata config[] = { 112static struct configdata config[] = {
127#ifdef HAVE_LCD_BITMAP
128 { TYPE_INT, 0, NUM_REMOVE_OPTION, 113 { TYPE_INT, 0, NUM_REMOVE_OPTION,
129 { .int_p = &remove_list[REMOVE_FONT].option }, 114 { .int_p = &remove_list[REMOVE_FONT].option },
130 "remove font", option_names }, 115 "remove font", option_names },
131#endif
132 { TYPE_INT, 0, NUM_REMOVE_OPTION, 116 { TYPE_INT, 0, NUM_REMOVE_OPTION,
133 { .int_p = &remove_list[REMOVE_WPS].option }, 117 { .int_p = &remove_list[REMOVE_WPS].option },
134 "remove wps", option_names }, 118 "remove wps", option_names },
135#ifdef HAVE_LCD_BITMAP
136 { TYPE_INT, 0, NUM_REMOVE_OPTION, 119 { TYPE_INT, 0, NUM_REMOVE_OPTION,
137 { .int_p = &remove_list[REMOVE_SBS].option }, 120 { .int_p = &remove_list[REMOVE_SBS].option },
138 "remove sbs", option_names }, 121 "remove sbs", option_names },
139#endif
140#ifdef HAVE_REMOTE_LCD 122#ifdef HAVE_REMOTE_LCD
141 { TYPE_INT, 0, NUM_REMOVE_OPTION, 123 { TYPE_INT, 0, NUM_REMOVE_OPTION,
142 { .int_p = &remove_list[REMOVE_RWPS].option }, 124 { .int_p = &remove_list[REMOVE_RWPS].option },
@@ -150,14 +132,12 @@ static struct configdata config[] = {
150 { .int_p = &remove_list[REMOVE_BACKDROP].option }, 132 { .int_p = &remove_list[REMOVE_BACKDROP].option },
151 "remove backdrop", option_names }, 133 "remove backdrop", option_names },
152#endif 134#endif
153#ifdef HAVE_LCD_BITMAP
154 { TYPE_INT, 0, NUM_REMOVE_OPTION, 135 { TYPE_INT, 0, NUM_REMOVE_OPTION,
155 { .int_p = &remove_list[REMOVE_ICON].option }, 136 { .int_p = &remove_list[REMOVE_ICON].option },
156 "remove iconset", option_names }, 137 "remove iconset", option_names },
157 { TYPE_INT, 0, NUM_REMOVE_OPTION, 138 { TYPE_INT, 0, NUM_REMOVE_OPTION,
158 { .int_p = &remove_list[REMOVE_VICON].option }, 139 { .int_p = &remove_list[REMOVE_VICON].option },
159 "remove viconset", option_names }, 140 "remove viconset", option_names },
160#endif
161#ifdef HAVE_REMOTE_LCD 141#ifdef HAVE_REMOTE_LCD
162 { TYPE_INT, 0, NUM_REMOVE_OPTION, 142 { TYPE_INT, 0, NUM_REMOVE_OPTION,
163 { .int_p = &remove_list[REMOVE_RICON].option }, 143 { .int_p = &remove_list[REMOVE_RICON].option },
@@ -285,7 +265,6 @@ static int remove_wps(struct remove_setting *setting)
285 return remove_dir(bmpdir, MAX_PATH); 265 return remove_dir(bmpdir, MAX_PATH);
286} 266}
287 267
288#ifdef HAVE_LCD_BITMAP
289static int remove_icons(struct remove_setting *setting) 268static int remove_icons(struct remove_setting *setting)
290{ 269{
291 char path[MAX_PATH]; 270 char path[MAX_PATH];
@@ -306,19 +285,15 @@ static int remove_icons(struct remove_setting *setting)
306 show_mess("Removed", path); 285 show_mess("Removed", path);
307 return 0; 286 return 0;
308} 287}
309#endif
310 288
311#ifdef HAVE_LCD_BITMAP
312static char font_file[MAX_PATH]; 289static char font_file[MAX_PATH];
313#endif 290
314static bool is_deny_file(const char *file) 291static bool is_deny_file(const char *file)
315{ 292{
316 const char *deny_files[] = { 293 const char *deny_files[] = {
317 WPS_DEFAULTCFG, 294 WPS_DEFAULTCFG,
318 RWPS_DEFAULTCFG, 295 RWPS_DEFAULTCFG,
319#ifdef HAVE_LCD_BITMAP
320 font_file, 296 font_file,
321#endif
322 NULL 297 NULL
323 }; 298 };
324 const char **p = deny_files; 299 const char **p = deny_files;
@@ -334,13 +309,9 @@ static bool is_deny_file(const char *file)
334static void check_whether_used_in_setting(void) 309static void check_whether_used_in_setting(void)
335{ 310{
336 const char *setting_files[] = { 311 const char *setting_files[] = {
337#ifdef HAVE_LCD_BITMAP
338 rb->global_settings->font_file, 312 rb->global_settings->font_file,
339#endif
340 rb->global_settings->wps_file, 313 rb->global_settings->wps_file,
341#ifdef HAVE_LCD_BITMAP
342 rb->global_settings->sbs_file, 314 rb->global_settings->sbs_file,
343#endif
344#ifdef HAVE_REMOTE_LCD 315#ifdef HAVE_REMOTE_LCD
345 rb->global_settings->rwps_file, 316 rb->global_settings->rwps_file,
346 rb->global_settings->rsbs_file, 317 rb->global_settings->rsbs_file,
@@ -348,10 +319,8 @@ static void check_whether_used_in_setting(void)
348#if LCD_DEPTH > 1 319#if LCD_DEPTH > 1
349 rb->global_settings->backdrop_file, 320 rb->global_settings->backdrop_file,
350#endif 321#endif
351#ifdef HAVE_LCD_BITMAP
352 rb->global_settings->icon_file, 322 rb->global_settings->icon_file,
353 rb->global_settings->viewers_icon_file, 323 rb->global_settings->viewers_icon_file,
354#endif
355#ifdef HAVE_REMOTE_LCD 324#ifdef HAVE_REMOTE_LCD
356 rb->global_settings->remote_icon_file, 325 rb->global_settings->remote_icon_file,
357 rb->global_settings->remote_viewers_icon_file, 326 rb->global_settings->remote_viewers_icon_file,
@@ -419,12 +388,10 @@ static void check_whether_used(void)
419 DIR *dir; 388 DIR *dir;
420 389
421 check_whether_used_in_setting(); 390 check_whether_used_in_setting();
422#ifdef HAVE_LCD_BITMAP
423 /* mark font files come from rockbox-font.zip as used and don't remove 391 /* mark font files come from rockbox-font.zip as used and don't remove
424 * them automatically as themes may depend on those fonts. */ 392 * them automatically as themes may depend on those fonts. */
425 if (remove_list[REMOVE_FONT].option == REMOVE_IF_NOT_USED) 393 if (remove_list[REMOVE_FONT].option == REMOVE_IF_NOT_USED)
426 check_whether_used_in_file(RB_FONTS_CONFIG); 394 check_whether_used_in_file(RB_FONTS_CONFIG);
427#endif
428 395
429 dir = rb->opendir(THEME_DIR); 396 dir = rb->opendir(THEME_DIR);
430 if (!dir) 397 if (!dir)
@@ -591,13 +558,9 @@ static bool option_menu(void)
591{ 558{
592 MENUITEM_STRINGLIST(option_menu, "Remove Options", NULL, 559 MENUITEM_STRINGLIST(option_menu, "Remove Options", NULL,
593 /* same order as remove_list */ 560 /* same order as remove_list */
594#ifdef HAVE_LCD_BITMAP
595 "Font", 561 "Font",
596#endif
597 "WPS", 562 "WPS",
598#ifdef HAVE_LCD_BITMAP
599 "Statusbar Skin", 563 "Statusbar Skin",
600#endif
601#ifdef HAVE_REMOTE_LCD 564#ifdef HAVE_REMOTE_LCD
602 "Remote WPS", 565 "Remote WPS",
603 "Remote Statusbar Skin", 566 "Remote Statusbar Skin",
@@ -605,9 +568,7 @@ static bool option_menu(void)
605#if LCD_DEPTH > 1 568#if LCD_DEPTH > 1
606 "Backdrop", 569 "Backdrop",
607#endif 570#endif
608#ifdef HAVE_LCD_BITMAP
609 "Iconset", "Viewers Iconset", 571 "Iconset", "Viewers Iconset",
610#endif
611#ifdef HAVE_REMOTE_LCD 572#ifdef HAVE_REMOTE_LCD
612 "Remote Iconset", "Remote Viewers Iconset", 573 "Remote Iconset", "Remote Viewers Iconset",
613#endif 574#endif
@@ -669,10 +630,8 @@ enum plugin_status plugin_start(const void* parameter)
669 if((p = rb->strrchr(title, '.'))) 630 if((p = rb->strrchr(title, '.')))
670 *p = 0; 631 *p = 0;
671 632
672#ifdef HAVE_LCD_BITMAP
673 rb->snprintf(font_file, MAX_PATH, FONT_DIR "/%s.fnt", 633 rb->snprintf(font_file, MAX_PATH, FONT_DIR "/%s.fnt",
674 rb->global_settings->font_file); 634 rb->global_settings->font_file);
675#endif
676 rb->strlcpy(themefile, parameter, MAX_PATH); 635 rb->strlcpy(themefile, parameter, MAX_PATH);
677 if (!rb->file_exists(themefile)) 636 if (!rb->file_exists(themefile))
678 { 637 {
diff --git a/apps/plugins/wav2wv.c b/apps/plugins/wav2wv.c
index cd27c92699..b7e9727230 100644
--- a/apps/plugins/wav2wv.c
+++ b/apps/plugins/wav2wv.c
@@ -77,9 +77,7 @@ static void wvupdate (int32_t start_tick,
77 rb->lcd_putsf(0, 6, "realtime: %d%% ", realtime); 77 rb->lcd_putsf(0, 6, "realtime: %d%% ", realtime);
78 rb->lcd_putsf(0, 8, "compression: %d%% ", compression); 78 rb->lcd_putsf(0, 8, "compression: %d%% ", compression);
79 79
80#ifdef HAVE_LCD_BITMAP
81 rb->lcd_update(); 80 rb->lcd_update();
82#endif
83} 81}
84 82
85#define TEMP_SAMPLES 4096 83#define TEMP_SAMPLES 4096
@@ -102,9 +100,7 @@ static int wav2wv(const char *infile)
102 100
103 rb->lcd_clear_display(); 101 rb->lcd_clear_display();
104 rb->lcd_puts_scroll(0, 0, (unsigned char *)infile); 102 rb->lcd_puts_scroll(0, 0, (unsigned char *)infile);
105#ifdef HAVE_LCD_BITMAP
106 rb->lcd_update(); 103 rb->lcd_update();
107#endif
108 104
109 last_buttons = rb->button_status (); 105 last_buttons = rb->button_status ();
110 start_tick = *rb->current_tick; 106 start_tick = *rb->current_tick;