diff options
Diffstat (limited to 'apps')
50 files changed, 9 insertions, 1681 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index bf01dbcac4..6a0b817834 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -83,8 +83,6 @@ gui/line.c | |||
83 | #ifdef HAVE_LCD_BITMAP | 83 | #ifdef HAVE_LCD_BITMAP |
84 | gui/bitmap/list.c | 84 | gui/bitmap/list.c |
85 | gui/bitmap/list-skinned.c | 85 | gui/bitmap/list-skinned.c |
86 | #else | ||
87 | gui/charcell/list.c | ||
88 | #endif | 86 | #endif |
89 | gui/option_select.c | 87 | gui/option_select.c |
90 | #ifdef HAVE_PITCHCONTROL | 88 | #ifdef HAVE_PITCHCONTROL |
@@ -127,10 +125,6 @@ gui/skin_engine/skin_touchsupport.c | |||
127 | gui/backdrop.c | 125 | gui/backdrop.c |
128 | #endif | 126 | #endif |
129 | 127 | ||
130 | #ifdef HAVE_LCD_CHARCELLS | ||
131 | player/icons.c | ||
132 | player/keyboard.c | ||
133 | #endif | ||
134 | #ifdef HAVE_LCD_BITMAP | 128 | #ifdef HAVE_LCD_BITMAP |
135 | recorder/bmp.c | 129 | recorder/bmp.c |
136 | recorder/icons.c | 130 | recorder/icons.c |
diff --git a/apps/features.txt b/apps/features.txt index 7b50b4026c..1c942a7fe2 100644 --- a/apps/features.txt +++ b/apps/features.txt | |||
@@ -231,10 +231,6 @@ disk_storage | |||
231 | remote_button_hold | 231 | remote_button_hold |
232 | #endif | 232 | #endif |
233 | 233 | ||
234 | #if defined(HAVE_LCD_CHARCELLS) | ||
235 | lcd_charcell | ||
236 | #endif | ||
237 | |||
238 | #if defined(HAVE_LCD_FLIP) | 234 | #if defined(HAVE_LCD_FLIP) |
239 | lcd_flip | 235 | lcd_flip |
240 | #endif | 236 | #endif |
diff --git a/apps/filetypes.c b/apps/filetypes.c index 16a00a423f..a30f012e53 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c | |||
@@ -605,13 +605,6 @@ int filetype_list_viewers(const char* current_file) | |||
605 | { | 605 | { |
606 | struct simplelist_info info; | 606 | struct simplelist_info info; |
607 | struct cb_data data = { current_file }; | 607 | struct cb_data data = { current_file }; |
608 | #ifndef HAVE_LCD_BITMAP | ||
609 | if (viewer_count == 0) | ||
610 | { | ||
611 | splash(HZ*2, ID2P(LANG_NO_VIEWERS)); | ||
612 | return PLUGIN_OK; | ||
613 | } | ||
614 | #endif | ||
615 | simplelist_info_init(&info, str(LANG_ONPLAY_OPEN_WITH), viewer_count, &data); | 608 | simplelist_info_init(&info, str(LANG_ONPLAY_OPEN_WITH), viewer_count, &data); |
616 | info.action_callback = openwith_action_callback; | 609 | info.action_callback = openwith_action_callback; |
617 | info.get_name = openwith_get_name; | 610 | info.get_name = openwith_get_name; |
diff --git a/apps/gui/charcell/list.c b/apps/gui/charcell/list.c deleted file mode 100644 index cbee8b0d9d..0000000000 --- a/apps/gui/charcell/list.c +++ /dev/null | |||
@@ -1,112 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2007 by Jonathan Gordon | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | /* This file contains the code to draw the list widget on BITMAP LCDs. */ | ||
23 | |||
24 | #include "config.h" | ||
25 | #include "lcd.h" | ||
26 | #include "font.h" | ||
27 | #include "button.h" | ||
28 | #include "string.h" | ||
29 | #include "settings.h" | ||
30 | #include "kernel.h" | ||
31 | #include "system.h" | ||
32 | #include "file.h" | ||
33 | |||
34 | #include "list.h" | ||
35 | #include "screen_access.h" | ||
36 | #include "scrollbar.h" | ||
37 | #include "lang.h" | ||
38 | #include "sound.h" | ||
39 | #include "misc.h" | ||
40 | |||
41 | void gui_synclist_scroll_stop(struct gui_synclist *lists) | ||
42 | { | ||
43 | (void)lists; | ||
44 | FOR_NB_SCREENS(i) | ||
45 | { | ||
46 | screens[i].scroll_stop(); | ||
47 | } | ||
48 | } | ||
49 | |||
50 | void list_draw(struct screen *display, struct gui_synclist *gui_list) | ||
51 | { | ||
52 | bool draw_icons = (gui_list->callback_get_item_icon != NULL); | ||
53 | bool selected; | ||
54 | int i; | ||
55 | int start, end; | ||
56 | |||
57 | display->set_viewport(NULL); | ||
58 | |||
59 | display->clear_display(); | ||
60 | start = 0; | ||
61 | end = display->getnblines(); | ||
62 | |||
63 | struct line_desc desc = { | ||
64 | .height = -1, | ||
65 | .text_color = 1, | ||
66 | .line_color = 1, | ||
67 | .line_end_color = 1, | ||
68 | .style = STYLE_DEFAULT | ||
69 | }; | ||
70 | |||
71 | for (i = start; i < end; i++) | ||
72 | { | ||
73 | unsigned const char *s; | ||
74 | char entry_buffer[MAX_PATH]; | ||
75 | unsigned char *entry_name; | ||
76 | int current_item = gui_list->start_item[display->screen_type] + i; | ||
77 | |||
78 | /* When there are less items to display than the | ||
79 | * current available space on the screen, we stop*/ | ||
80 | if(current_item >= gui_list->nb_items) | ||
81 | break; | ||
82 | s = gui_list->callback_get_item_name(current_item, | ||
83 | gui_list->data, | ||
84 | entry_buffer, | ||
85 | sizeof(entry_buffer)); | ||
86 | entry_name = P2STR(s); | ||
87 | |||
88 | if (gui_list->show_selection_marker && | ||
89 | current_item >= gui_list->selected_item && | ||
90 | current_item < gui_list->selected_item + gui_list->selected_size) | ||
91 | selected = true; /* The selected item must be displayed scrolling */ | ||
92 | else | ||
93 | selected = false; | ||
94 | |||
95 | desc.nlines = gui_list->selected_size, | ||
96 | desc.line = gui_list->selected_size > 1 ? i : 0, | ||
97 | desc.scroll = selected ? true : gui_list->scroll_all; | ||
98 | |||
99 | if (draw_icons) | ||
100 | put_line(display, 0, i, &desc, "$i$i$t", | ||
101 | selected ? Icon_Cursor : Icon_NOICON, | ||
102 | gui_list->callback_get_item_icon(current_item, gui_list->data), | ||
103 | entry_name); | ||
104 | else | ||
105 | put_line(display, 0, i, &desc, "$i$t", | ||
106 | selected ? Icon_Cursor : Icon_NOICON, | ||
107 | entry_name); | ||
108 | } | ||
109 | |||
110 | display->update_viewport(); | ||
111 | display->update(); | ||
112 | } | ||
diff --git a/apps/gui/icon.h b/apps/gui/icon.h index e095ccfc4c..88449c61ca 100644 --- a/apps/gui/icon.h +++ b/apps/gui/icon.h | |||
@@ -89,10 +89,6 @@ extern void screen_put_cursorxy(struct screen * screen, int x, int y, bool on); | |||
89 | */ | 89 | */ |
90 | extern void screen_put_iconxy(struct screen * screen, | 90 | extern void screen_put_iconxy(struct screen * screen, |
91 | int x, int y, enum themable_icons icon); | 91 | int x, int y, enum themable_icons icon); |
92 | #ifdef HAVE_LCD_CHARCELLS | ||
93 | # define screen_put_icon(s, x, y, i) screen_put_iconxy(s, x, y, i) | ||
94 | # define screen_put_icon_with_offset(s, x, y, w, h, i) screen_put_icon(s, x, y, i) | ||
95 | #else | ||
96 | /* For both of these, the icon will be placed in the center of the rectangle */ | 92 | /* For both of these, the icon will be placed in the center of the rectangle */ |
97 | /* as above, but x,y are letter position, NOT PIXEL */ | 93 | /* as above, but x,y are letter position, NOT PIXEL */ |
98 | extern void screen_put_icon(struct screen * screen, | 94 | extern void screen_put_icon(struct screen * screen, |
@@ -101,23 +97,14 @@ extern void screen_put_icon(struct screen * screen, | |||
101 | extern void screen_put_icon_with_offset(struct screen * display, | 97 | extern void screen_put_icon_with_offset(struct screen * display, |
102 | int x, int y, int off_x, int off_y, | 98 | int x, int y, int off_x, int off_y, |
103 | enum themable_icons icon); | 99 | enum themable_icons icon); |
104 | #endif | ||
105 | |||
106 | void icons_init(void); | 100 | void icons_init(void); |
107 | 101 | ||
108 | 102 | ||
109 | #ifdef HAVE_LCD_CHARCELLS | ||
110 | # define CURSOR_CHAR 0xe10c | ||
111 | # define get_icon_width(a) 1 | ||
112 | # define get_icon_height(a) 1 /* needs to be verified */ | ||
113 | #else | ||
114 | int get_icon_width(enum screen_type screen_type); | 103 | int get_icon_width(enum screen_type screen_type); |
115 | int get_icon_height(enum screen_type screen_type); | 104 | int get_icon_height(enum screen_type screen_type); |
116 | int get_icon_format(enum screen_type screen_type); | 105 | int get_icon_format(enum screen_type screen_type); |
117 | #endif | ||
118 | 106 | ||
119 | #if (LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1) \ | 107 | #if (LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1) |
120 | && !defined(HAVE_LCD_CHARCELLS) | ||
121 | int get_icon_format(enum screen_type screen_type); | 108 | int get_icon_format(enum screen_type screen_type); |
122 | #else | 109 | #else |
123 | # define get_icon_format(a) FORMAT_MONO | 110 | # define get_icon_format(a) FORMAT_MONO |
diff --git a/apps/gui/line.c b/apps/gui/line.c index 2b1bec2c6b..ea6bcea93b 100644 --- a/apps/gui/line.c +++ b/apps/gui/line.c | |||
@@ -41,11 +41,7 @@ | |||
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | 43 | ||
44 | #ifdef HAVE_LCD_CHARCELLS | ||
45 | #define style_line(d, x, y, l) | ||
46 | #else | ||
47 | static void style_line(struct screen *display, int x, int y, struct line_desc *line); | 44 | static void style_line(struct screen *display, int x, int y, struct line_desc *line); |
48 | #endif | ||
49 | 45 | ||
50 | static void put_text(struct screen *display, int x, int y, struct line_desc *line, | 46 | static void put_text(struct screen *display, int x, int y, struct line_desc *line, |
51 | const char *text, bool prevent_scroll, int text_skip_pixels); | 47 | const char *text, bool prevent_scroll, int text_skip_pixels); |
diff --git a/apps/gui/list.c b/apps/gui/list.c index 8533f93275..ce444cc9c2 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c | |||
@@ -279,13 +279,8 @@ static void gui_list_put_selection_on_screen(struct gui_synclist * gui_list, | |||
279 | int bottom = MAX(0, gui_list->nb_items - nb_lines); | 279 | int bottom = MAX(0, gui_list->nb_items - nb_lines); |
280 | int new_start_item = gui_list->start_item[screen]; | 280 | int new_start_item = gui_list->start_item[screen]; |
281 | int difference = gui_list->selected_item - gui_list->start_item[screen]; | 281 | int difference = gui_list->selected_item - gui_list->start_item[screen]; |
282 | #ifdef HAVE_LCD_CHARCELLS | ||
283 | const int scroll_limit_up = 0; | ||
284 | const int scroll_limit_down = 1; | ||
285 | #else | ||
286 | const int scroll_limit_up = (nb_lines < gui_list->selected_size+2 ? 0:1); | 282 | const int scroll_limit_up = (nb_lines < gui_list->selected_size+2 ? 0:1); |
287 | const int scroll_limit_down = (scroll_limit_up+gui_list->selected_size); | 283 | const int scroll_limit_down = (scroll_limit_up+gui_list->selected_size); |
288 | #endif | ||
289 | 284 | ||
290 | if (gui_list->show_selection_marker == false) | 285 | if (gui_list->show_selection_marker == false) |
291 | { | 286 | { |
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index 501d3a305a..7ee349b346 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c | |||
@@ -662,7 +662,6 @@ bool skin_has_sbs(enum screen_type screen, struct wps_data *data) | |||
662 | */ | 662 | */ |
663 | int skin_wait_for_action(enum skinnable_screens skin, int context, int timeout) | 663 | int skin_wait_for_action(enum skinnable_screens skin, int context, int timeout) |
664 | { | 664 | { |
665 | (void)skin; /* silence charcell warning */ | ||
666 | int button = ACTION_NONE; | 665 | int button = ACTION_NONE; |
667 | #ifdef HAVE_LCD_BITMAP | 666 | #ifdef HAVE_LCD_BITMAP |
668 | /* when the peak meter is enabled we want to have a | 667 | /* when the peak meter is enabled we want to have a |
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index dce88e9c58..de7c1db372 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -1815,14 +1815,6 @@ static void skin_data_reset(struct wps_data *wps_data) | |||
1815 | wps_data->peak_meter_enabled = false; | 1815 | wps_data->peak_meter_enabled = false; |
1816 | wps_data->wps_sb_tag = false; | 1816 | wps_data->wps_sb_tag = false; |
1817 | wps_data->show_sb_on_wps = false; | 1817 | wps_data->show_sb_on_wps = false; |
1818 | #else /* HAVE_LCD_CHARCELLS */ | ||
1819 | /* progress bars */ | ||
1820 | int i; | ||
1821 | for (i = 0; i < 8; i++) | ||
1822 | { | ||
1823 | wps_data->wps_progress_pat[i] = 0; | ||
1824 | } | ||
1825 | wps_data->full_line_progressbar = false; | ||
1826 | #endif | 1818 | #endif |
1827 | wps_data->wps_loaded = false; | 1819 | wps_data->wps_loaded = false; |
1828 | } | 1820 | } |
diff --git a/apps/gui/skin_engine/skin_render.c b/apps/gui/skin_engine/skin_render.c index 4415619b7e..e14c882dd9 100644 --- a/apps/gui/skin_engine/skin_render.c +++ b/apps/gui/skin_engine/skin_render.c | |||
@@ -97,10 +97,6 @@ get_child(OFFSETTYPE(struct skin_element**) children, int child) | |||
97 | static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info, | 97 | static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info, |
98 | struct skin_element *element, struct skin_viewport* skin_vp) | 98 | struct skin_element *element, struct skin_viewport* skin_vp) |
99 | { | 99 | { |
100 | #ifndef HAVE_LCD_BITMAP | ||
101 | (void)skin_vp; /* silence warnings */ | ||
102 | (void)info; | ||
103 | #endif | ||
104 | struct wps_token *token = (struct wps_token *)SKINOFFSETTOPTR(skin_buffer, element->data); | 100 | struct wps_token *token = (struct wps_token *)SKINOFFSETTOPTR(skin_buffer, element->data); |
105 | 101 | ||
106 | #ifdef HAVE_LCD_BITMAP | 102 | #ifdef HAVE_LCD_BITMAP |
@@ -832,14 +828,6 @@ void skin_render(struct gui_wps *gwps, unsigned refresh_mode) | |||
832 | int old_refresh_mode = refresh_mode; | 828 | int old_refresh_mode = refresh_mode; |
833 | skin_buffer = get_skin_buffer(gwps->data); | 829 | skin_buffer = get_skin_buffer(gwps->data); |
834 | 830 | ||
835 | #ifdef HAVE_LCD_CHARCELLS | ||
836 | int i; | ||
837 | for (i = 0; i < 8; i++) | ||
838 | { | ||
839 | if (data->wps_progress_pat[i] == 0) | ||
840 | data->wps_progress_pat[i] = display->get_locked_pattern(); | ||
841 | } | ||
842 | #endif | ||
843 | 831 | ||
844 | viewport = SKINOFFSETTOPTR(skin_buffer, data->tree); | 832 | viewport = SKINOFFSETTOPTR(skin_buffer, data->tree); |
845 | skin_viewport = SKINOFFSETTOPTR(skin_buffer, viewport->data); | 833 | skin_viewport = SKINOFFSETTOPTR(skin_buffer, viewport->data); |
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index 75c3203066..50704fd66e 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c | |||
@@ -37,9 +37,6 @@ | |||
37 | #include "cuesheet.h" | 37 | #include "cuesheet.h" |
38 | #include "replaygain.h" | 38 | #include "replaygain.h" |
39 | #include "core_alloc.h" | 39 | #include "core_alloc.h" |
40 | #ifdef HAVE_LCD_CHARCELLS | ||
41 | #include "hwcompat.h" | ||
42 | #endif | ||
43 | #include "abrepeat.h" | 40 | #include "abrepeat.h" |
44 | #include "lang.h" | 41 | #include "lang.h" |
45 | #include "misc.h" | 42 | #include "misc.h" |
@@ -577,148 +574,6 @@ static struct mp3entry* get_mp3entry_from_offset(int offset, char **filename) | |||
577 | return pid3; | 574 | return pid3; |
578 | } | 575 | } |
579 | 576 | ||
580 | #ifdef HAVE_LCD_CHARCELLS | ||
581 | static void format_player_progress(struct gui_wps *gwps) | ||
582 | { | ||
583 | struct wps_state *state = skin_get_global_state(); | ||
584 | struct screen *display = gwps->display; | ||
585 | unsigned char progress_pattern[7]; | ||
586 | int pos = 0; | ||
587 | int i; | ||
588 | |||
589 | int elapsed, length; | ||
590 | if (LIKELY(state->id3)) | ||
591 | { | ||
592 | elapsed = state->id3->elapsed; | ||
593 | length = state->id3->length; | ||
594 | } | ||
595 | else | ||
596 | { | ||
597 | elapsed = 0; | ||
598 | length = 0; | ||
599 | } | ||
600 | |||
601 | if (length) | ||
602 | pos = 36 * (elapsed + state->ff_rewind_count) / length; | ||
603 | |||
604 | for (i = 0; i < 7; i++, pos -= 5) | ||
605 | { | ||
606 | if (pos <= 0) | ||
607 | progress_pattern[i] = 0x1fu; | ||
608 | else if (pos >= 5) | ||
609 | progress_pattern[i] = 0x00u; | ||
610 | else | ||
611 | progress_pattern[i] = 0x1fu >> pos; | ||
612 | } | ||
613 | |||
614 | display->define_pattern(gwps->data->wps_progress_pat[0], progress_pattern); | ||
615 | } | ||
616 | |||
617 | static void format_player_fullbar(struct gui_wps *gwps, char* buf, int buf_size) | ||
618 | { | ||
619 | static const unsigned char numbers[10][4] = { | ||
620 | {0x0e, 0x0a, 0x0a, 0x0e}, /* 0 */ | ||
621 | {0x04, 0x0c, 0x04, 0x04}, /* 1 */ | ||
622 | {0x0e, 0x02, 0x04, 0x0e}, /* 2 */ | ||
623 | {0x0e, 0x02, 0x06, 0x0e}, /* 3 */ | ||
624 | {0x08, 0x0c, 0x0e, 0x04}, /* 4 */ | ||
625 | {0x0e, 0x0c, 0x02, 0x0c}, /* 5 */ | ||
626 | {0x0e, 0x08, 0x0e, 0x0e}, /* 6 */ | ||
627 | {0x0e, 0x02, 0x04, 0x08}, /* 7 */ | ||
628 | {0x0e, 0x0e, 0x0a, 0x0e}, /* 8 */ | ||
629 | {0x0e, 0x0e, 0x02, 0x0e} /* 9 */ | ||
630 | }; | ||
631 | |||
632 | struct wps_state *state = skin_get_global_state(); | ||
633 | struct screen *display = gwps->display; | ||
634 | struct wps_data *data = gwps->data; | ||
635 | unsigned char progress_pattern[7]; | ||
636 | char timestr[10]; | ||
637 | int time; | ||
638 | int time_idx = 0; | ||
639 | int pos = 0; | ||
640 | int pat_idx = 1; | ||
641 | int digit, i, j; | ||
642 | bool softchar; | ||
643 | |||
644 | int elapsed, length; | ||
645 | if (LIKELY(state->id3)) | ||
646 | { | ||
647 | elapsed = state->id3->elapsed; | ||
648 | length = state->id3->length; | ||
649 | } | ||
650 | else | ||
651 | { | ||
652 | elapsed = 0; | ||
653 | length = 0; | ||
654 | } | ||
655 | |||
656 | if (buf_size < 34) /* worst case: 11x UTF-8 char + \0 */ | ||
657 | return; | ||
658 | |||
659 | time = elapsed + state->ff_rewind_count; | ||
660 | if (length) | ||
661 | pos = 55 * time / length; | ||
662 | |||
663 | memset(timestr, 0, sizeof(timestr)); | ||
664 | format_time(timestr, sizeof(timestr)-2, time); | ||
665 | timestr[strlen(timestr)] = ':'; /* always safe */ | ||
666 | |||
667 | for (i = 0; i < 11; i++, pos -= 5) | ||
668 | { | ||
669 | softchar = false; | ||
670 | memset(progress_pattern, 0, sizeof(progress_pattern)); | ||
671 | |||
672 | if ((digit = timestr[time_idx])) | ||
673 | { | ||
674 | softchar = true; | ||
675 | digit -= '0'; | ||
676 | |||
677 | if (timestr[time_idx + 1] == ':') /* ones, left aligned */ | ||
678 | { | ||
679 | memcpy(progress_pattern, numbers[digit], 4); | ||
680 | time_idx += 2; | ||
681 | } | ||
682 | else /* tens, shifted right */ | ||
683 | { | ||
684 | for (j = 0; j < 4; j++) | ||
685 | progress_pattern[j] = numbers[digit][j] >> 1; | ||
686 | |||
687 | if (time_idx > 0) /* not the first group, add colon in front */ | ||
688 | { | ||
689 | progress_pattern[1] |= 0x10u; | ||
690 | progress_pattern[3] |= 0x10u; | ||
691 | } | ||
692 | time_idx++; | ||
693 | } | ||
694 | |||
695 | if (pos >= 5) | ||
696 | progress_pattern[5] = progress_pattern[6] = 0x1fu; | ||
697 | } | ||
698 | |||
699 | if (pos > 0 && pos < 5) | ||
700 | { | ||
701 | softchar = true; | ||
702 | progress_pattern[5] = progress_pattern[6] = (~0x1fu >> pos) & 0x1fu; | ||
703 | } | ||
704 | |||
705 | if (softchar && pat_idx < 8) | ||
706 | { | ||
707 | display->define_pattern(data->wps_progress_pat[pat_idx], | ||
708 | progress_pattern); | ||
709 | buf = utf8encode(data->wps_progress_pat[pat_idx], buf); | ||
710 | pat_idx++; | ||
711 | } | ||
712 | else if (pos <= 0) | ||
713 | buf = utf8encode(' ', buf); | ||
714 | else | ||
715 | buf = utf8encode(0xe115, buf); /* 2/7 _ */ | ||
716 | } | ||
717 | *buf = '\0'; | ||
718 | } | ||
719 | |||
720 | #endif /* HAVE_LCD_CHARCELLS */ | ||
721 | |||
722 | /* Don't inline this; it was broken out of get_token_value to reduce stack | 577 | /* Don't inline this; it was broken out of get_token_value to reduce stack |
723 | * usage. | 578 | * usage. |
724 | */ | 579 | */ |
@@ -1351,34 +1206,6 @@ const char *get_token_value(struct gui_wps *gwps, | |||
1351 | return "-"; | 1206 | return "-"; |
1352 | #endif | 1207 | #endif |
1353 | 1208 | ||
1354 | #ifdef HAVE_LCD_CHARCELLS | ||
1355 | case SKIN_TOKEN_PROGRESSBAR: | ||
1356 | { | ||
1357 | char *end; | ||
1358 | format_player_progress(gwps); | ||
1359 | end = utf8encode(data->wps_progress_pat[0], buf); | ||
1360 | *end = '\0'; | ||
1361 | return buf; | ||
1362 | } | ||
1363 | |||
1364 | case SKIN_TOKEN_PLAYER_PROGRESSBAR: | ||
1365 | if(is_new_player()) | ||
1366 | { | ||
1367 | /* we need 11 characters (full line) for | ||
1368 | progress-bar */ | ||
1369 | strlcpy(buf, " ", buf_size); | ||
1370 | format_player_fullbar(gwps,buf,buf_size); | ||
1371 | DEBUGF("bar='%s'\n",buf); | ||
1372 | } | ||
1373 | else | ||
1374 | { | ||
1375 | /* Tell the user if we have an OldPlayer */ | ||
1376 | strlcpy(buf, " <Old LCD> ", buf_size); | ||
1377 | } | ||
1378 | return buf; | ||
1379 | #endif | ||
1380 | |||
1381 | |||
1382 | #ifdef HAVE_LCD_BITMAP | 1209 | #ifdef HAVE_LCD_BITMAP |
1383 | /* peakmeter */ | 1210 | /* peakmeter */ |
1384 | case SKIN_TOKEN_PEAKMETER_LEFT: | 1211 | case SKIN_TOKEN_PEAKMETER_LEFT: |
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h index e7996b0530..caf43b21cb 100644 --- a/apps/gui/skin_engine/wps_internals.h +++ b/apps/gui/skin_engine/wps_internals.h | |||
@@ -374,9 +374,6 @@ struct wps_data | |||
374 | bool peak_meter_enabled; | 374 | bool peak_meter_enabled; |
375 | bool wps_sb_tag; | 375 | bool wps_sb_tag; |
376 | bool show_sb_on_wps; | 376 | bool show_sb_on_wps; |
377 | #else /*HAVE_LCD_CHARCELLS */ | ||
378 | unsigned short wps_progress_pat[8]; | ||
379 | bool full_line_progressbar; | ||
380 | #endif | 377 | #endif |
381 | bool wps_loaded; | 378 | bool wps_loaded; |
382 | }; | 379 | }; |
diff --git a/apps/gui/splash.c b/apps/gui/splash.c index 2608a2e02e..56df77d57a 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c | |||
@@ -38,12 +38,6 @@ | |||
38 | #define RECT_SPACING 2 | 38 | #define RECT_SPACING 2 |
39 | #define SPLASH_MEMORY_INTERVAL (HZ) | 39 | #define SPLASH_MEMORY_INTERVAL (HZ) |
40 | 40 | ||
41 | #else /* HAVE_LCD_CHARCELLS */ | ||
42 | |||
43 | #define MAXLINES 2 | ||
44 | #define MAXBUFFER 64 | ||
45 | #define RECT_SPACING 0 | ||
46 | |||
47 | #endif | 41 | #endif |
48 | 42 | ||
49 | 43 | ||
@@ -68,12 +62,6 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap) | |||
68 | screen->set_viewport(&vp); | 62 | screen->set_viewport(&vp); |
69 | 63 | ||
70 | screen->getstringsize(" ", &space_w, &h); | 64 | screen->getstringsize(" ", &space_w, &h); |
71 | #else /* HAVE_LCD_CHARCELLS */ | ||
72 | vp.width = screen->lcdwidth; | ||
73 | vp.height = screen->lcdheight; | ||
74 | |||
75 | space_w = h = 1; | ||
76 | screen->double_height (false); | ||
77 | #endif | 65 | #endif |
78 | y = h; | 66 | y = h; |
79 | 67 | ||
@@ -178,9 +166,6 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap) | |||
178 | 166 | ||
179 | /* prepare putting the text */ | 167 | /* prepare putting the text */ |
180 | y = RECT_SPACING; | 168 | y = RECT_SPACING; |
181 | #else /* HAVE_LCD_CHARCELLS */ | ||
182 | y = 0; /* vertical centering on 2 lines would be silly */ | ||
183 | screen->clear_display(); | ||
184 | #endif | 169 | #endif |
185 | 170 | ||
186 | /* print the message to screen */ | 171 | /* print the message to screen */ |
@@ -188,8 +173,6 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap) | |||
188 | { | 173 | { |
189 | #ifdef HAVE_LCD_BITMAP | 174 | #ifdef HAVE_LCD_BITMAP |
190 | screen->putsxy(0, y, lines[i]); | 175 | screen->putsxy(0, y, lines[i]); |
191 | #else | ||
192 | screen->puts(0, y, lines[i]); | ||
193 | #endif | 176 | #endif |
194 | } | 177 | } |
195 | screen->update_viewport(); | 178 | screen->update_viewport(); |
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index 30dad95509..90d04a7930 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c | |||
@@ -191,12 +191,6 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw, struct vi | |||
191 | if (!display) | 191 | if (!display) |
192 | return; | 192 | return; |
193 | 193 | ||
194 | #ifdef HAVE_LCD_CHARCELLS | ||
195 | int val; | ||
196 | (void)force_redraw; /* The Player always has "redraw" */ | ||
197 | (void)vp; | ||
198 | #endif /* HAVE_LCD_CHARCELLS */ | ||
199 | |||
200 | bar->info.battlevel = battery_level(); | 194 | bar->info.battlevel = battery_level(); |
201 | #ifdef HAVE_USB_POWER | 195 | #ifdef HAVE_USB_POWER |
202 | bar->info.usb_inserted = usb_inserted(); | 196 | bar->info.usb_inserted = usb_inserted(); |
@@ -359,38 +353,6 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw, struct vi | |||
359 | } | 353 | } |
360 | #endif /* HAVE_LCD_BITMAP */ | 354 | #endif /* HAVE_LCD_BITMAP */ |
361 | 355 | ||
362 | |||
363 | #ifdef HAVE_LCD_CHARCELLS | ||
364 | display->icon(ICON_BATTERY, bar->info.battery_state); | ||
365 | |||
366 | if (bar->info.batt_charge_step > -1) | ||
367 | val = bar->info.batt_charge_step; | ||
368 | else | ||
369 | val = (bar->info.battlevel * 3 + 50) / 100; | ||
370 | display->icon(ICON_BATTERY_1, val >= 1); | ||
371 | display->icon(ICON_BATTERY_2, val >= 2); | ||
372 | display->icon(ICON_BATTERY_3, val >= 3); | ||
373 | |||
374 | val = 10 * (bar->info.volume - sound_min(SOUND_VOLUME)) | ||
375 | / (sound_max(SOUND_VOLUME) - sound_min(SOUND_VOLUME)); | ||
376 | display->icon(ICON_VOLUME, true); | ||
377 | display->icon(ICON_VOLUME_1, val >= 1); | ||
378 | display->icon(ICON_VOLUME_2, val >= 3); | ||
379 | display->icon(ICON_VOLUME_3, val >= 5); | ||
380 | display->icon(ICON_VOLUME_4, val >= 7); | ||
381 | display->icon(ICON_VOLUME_5, val >= 9); | ||
382 | |||
383 | display->icon(ICON_PLAY, current_playmode() == STATUS_PLAY); | ||
384 | display->icon(ICON_PAUSE, current_playmode() == STATUS_PAUSE); | ||
385 | |||
386 | display->icon(ICON_REPEAT, global_settings.repeat_mode != REPEAT_OFF); | ||
387 | display->icon(ICON_1, global_settings.repeat_mode == REPEAT_ONE); | ||
388 | |||
389 | display->icon(ICON_RECORD, record); | ||
390 | display->icon(ICON_AUDIO, audio); | ||
391 | display->icon(ICON_PARAM, param); | ||
392 | display->icon(ICON_USB, usb); | ||
393 | #endif /* HAVE_LCD_CHARCELLS */ | ||
394 | } | 356 | } |
395 | 357 | ||
396 | #ifdef HAVE_LCD_BITMAP | 358 | #ifdef HAVE_LCD_BITMAP |
diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c index 1b6f9c3b2a..dd1d97df3c 100644 --- a/apps/gui/usb_screen.c +++ b/apps/gui/usb_screen.c | |||
@@ -269,12 +269,7 @@ void gui_usb_screen_run(bool early_usb) | |||
269 | * generic cleanup here */ | 269 | * generic cleanup here */ |
270 | screen->set_viewport(NULL); | 270 | screen->set_viewport(NULL); |
271 | screen->scroll_stop(); | 271 | screen->scroll_stop(); |
272 | #ifdef HAVE_LCD_CHARCELLS | ||
273 | /* Quick fix. Viewports should really be enabled proper for charcell */ | ||
274 | viewport_set_defaults(&usb_screen_vps_ar[i].parent, i); | ||
275 | #else | ||
276 | usb_screen_fix_viewports(screen, &usb_screen_vps_ar[i]); | 272 | usb_screen_fix_viewports(screen, &usb_screen_vps_ar[i]); |
277 | #endif | ||
278 | } | 273 | } |
279 | 274 | ||
280 | /* update the UI before disabling fonts, this maximizes the propability | 275 | /* update the UI before disabling fonts, this maximizes the propability |
@@ -327,10 +322,6 @@ void gui_usb_screen_run(bool early_usb) | |||
327 | touchscreen_set_mode(old_mode); | 322 | touchscreen_set_mode(old_mode); |
328 | #endif | 323 | #endif |
329 | 324 | ||
330 | #ifdef HAVE_LCD_CHARCELLS | ||
331 | status_set_usb(false); | ||
332 | #endif /* HAVE_LCD_CHARCELLS */ | ||
333 | |||
334 | #ifdef HAVE_LCD_BITMAP | 325 | #ifdef HAVE_LCD_BITMAP |
335 | if(!early_usb) | 326 | if(!early_usb) |
336 | { | 327 | { |
diff --git a/apps/gui/viewport.h b/apps/gui/viewport.h index ecbd325946..c4b90aa64c 100644 --- a/apps/gui/viewport.h +++ b/apps/gui/viewport.h | |||
@@ -69,10 +69,6 @@ bool viewport_point_within_vp(const struct viewport *vp, | |||
69 | const int x, const int y); | 69 | const int x, const int y); |
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | #else /* HAVE_LCD_CHARCELL */ | ||
73 | #define viewportmanager_theme_changed(a) | ||
74 | #define viewportmanager_theme_enable(...) | ||
75 | #define viewportmanager_theme_undo(...) | ||
76 | #endif | 72 | #endif |
77 | 73 | ||
78 | #endif /* __PCTOOL__ */ | 74 | #endif /* __PCTOOL__ */ |
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index a930edaded..b417f82922 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -232,11 +232,6 @@ static bool update_onvol_change(enum screen_type screen) | |||
232 | { | 232 | { |
233 | skin_update(WPS, screen, SKIN_REFRESH_NON_STATIC); | 233 | skin_update(WPS, screen, SKIN_REFRESH_NON_STATIC); |
234 | 234 | ||
235 | #ifdef HAVE_LCD_CHARCELLS | ||
236 | splashf(0, "Vol: %3d dB", | ||
237 | sound_val2phys(SOUND_VOLUME, global_settings.volume)); | ||
238 | return true; | ||
239 | #endif | ||
240 | return false; | 235 | return false; |
241 | } | 236 | } |
242 | 237 | ||
@@ -402,10 +397,6 @@ bool ffwd_rew(int button) | |||
402 | if (!skin_get_global_state()->paused) | 397 | if (!skin_get_global_state()->paused) |
403 | audio_resume(); | 398 | audio_resume(); |
404 | #endif | 399 | #endif |
405 | #ifdef HAVE_LCD_CHARCELLS | ||
406 | FOR_NB_SCREENS(i) | ||
407 | skin_update(WPS, i, SKIN_REFRESH_ALL); | ||
408 | #endif | ||
409 | exit = true; | 400 | exit = true; |
410 | break; | 401 | break; |
411 | 402 | ||
@@ -741,11 +732,6 @@ long gui_wps_show(void) | |||
741 | long last_left = 0, last_right = 0; | 732 | long last_left = 0, last_right = 0; |
742 | struct wps_state *state = skin_get_global_state(); | 733 | struct wps_state *state = skin_get_global_state(); |
743 | 734 | ||
744 | #ifdef HAVE_LCD_CHARCELLS | ||
745 | status_set_audio(true); | ||
746 | status_set_param(false); | ||
747 | #endif | ||
748 | |||
749 | #ifdef AB_REPEAT_ENABLE | 735 | #ifdef AB_REPEAT_ENABLE |
750 | ab_repeat_init(); | 736 | ab_repeat_init(); |
751 | ab_reset_markers(); | 737 | ab_reset_markers(); |
@@ -833,10 +819,6 @@ long gui_wps_show(void) | |||
833 | break; | 819 | break; |
834 | 820 | ||
835 | case ACTION_WPS_BROWSE: | 821 | case ACTION_WPS_BROWSE: |
836 | #ifdef HAVE_LCD_CHARCELLS | ||
837 | status_set_record(false); | ||
838 | status_set_audio(false); | ||
839 | #endif | ||
840 | gwps_leave_wps(); | 822 | gwps_leave_wps(); |
841 | return GO_TO_PREVIOUS_BROWSER; | 823 | return GO_TO_PREVIOUS_BROWSER; |
842 | break; | 824 | break; |
@@ -1146,10 +1128,6 @@ long gui_wps_show(void) | |||
1146 | } | 1128 | } |
1147 | 1129 | ||
1148 | if (exit) { | 1130 | if (exit) { |
1149 | #ifdef HAVE_LCD_CHARCELLS | ||
1150 | status_set_record(false); | ||
1151 | status_set_audio(false); | ||
1152 | #endif | ||
1153 | #if CONFIG_CODEC != SWCODEC | 1131 | #if CONFIG_CODEC != SWCODEC |
1154 | if (global_settings.fade_on_stop) | 1132 | if (global_settings.fade_on_stop) |
1155 | fade(false, true); | 1133 | fade(false, true); |
diff --git a/apps/gui/yesno.c b/apps/gui/yesno.c index b754d5e477..45638b7076 100644 --- a/apps/gui/yesno.c +++ b/apps/gui/yesno.c | |||
@@ -160,12 +160,7 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message, | |||
160 | yn[i].result_message[YESNO_NO]=no_message; | 160 | yn[i].result_message[YESNO_NO]=no_message; |
161 | yn[i].display=&screens[i]; | 161 | yn[i].display=&screens[i]; |
162 | yn[i].vp = &vp[i]; | 162 | yn[i].vp = &vp[i]; |
163 | #ifdef HAVE_LCD_CHARCELLS | ||
164 | /* Quick fix. Viewports should really be enabled proper for charcell */ | ||
165 | viewport_set_defaults(yn[i].vp, i); | ||
166 | #else | ||
167 | viewportmanager_theme_enable(i, true, yn[i].vp); | 163 | viewportmanager_theme_enable(i, true, yn[i].vp); |
168 | #endif | ||
169 | screens[i].scroll_stop(); | 164 | screens[i].scroll_stop(); |
170 | gui_yesno_draw(&(yn[i])); | 165 | gui_yesno_draw(&(yn[i])); |
171 | } | 166 | } |
diff --git a/apps/logfdisp.c b/apps/logfdisp.c index 20d737e924..0c5f63e8dc 100644 --- a/apps/logfdisp.c +++ b/apps/logfdisp.c | |||
@@ -209,13 +209,6 @@ bool logfdisplay(void) | |||
209 | 209 | ||
210 | return false; | 210 | return false; |
211 | } | 211 | } |
212 | #else /* HAVE_LCD_BITMAP */ | ||
213 | bool logfdisplay(void) | ||
214 | |||
215 | { | ||
216 | /* TODO: implement a browser for charcell bitmaps */ | ||
217 | return false; | ||
218 | } | ||
219 | #endif /* HAVE_LCD_BITMAP */ | 212 | #endif /* HAVE_LCD_BITMAP */ |
220 | 213 | ||
221 | bool logfdump(void) | 214 | bool logfdump(void) |
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c index 7f94571226..5e9b935937 100644 --- a/apps/menus/main_menu.c +++ b/apps/menus/main_menu.c | |||
@@ -125,11 +125,7 @@ static int show_credits(void) | |||
125 | return 0; | 125 | return 0; |
126 | } | 126 | } |
127 | 127 | ||
128 | #ifdef HAVE_LCD_CHARCELLS | ||
129 | #define SIZE_FMT "%s%s" | ||
130 | #else | ||
131 | #define SIZE_FMT "%s %s" | 128 | #define SIZE_FMT "%s %s" |
132 | #endif | ||
133 | struct info_data | 129 | struct info_data |
134 | 130 | ||
135 | { | 131 | { |
@@ -500,29 +496,7 @@ MAKE_MENU(info_menu, ID2P(LANG_SYSTEM), 0, Icon_System_menu, | |||
500 | /***********************************/ | 496 | /***********************************/ |
501 | /* MAIN MENU */ | 497 | /* MAIN MENU */ |
502 | 498 | ||
503 | 499 | MAKE_MENU(main_menu_, ID2P(LANG_SETTINGS), NULL, | |
504 | #ifdef HAVE_LCD_CHARCELLS | ||
505 | static int mainmenu_callback(int action, | ||
506 | const struct menu_item_ex *this_item, | ||
507 | struct gui_synclist *lists) | ||
508 | { | ||
509 | (void)this_item; | ||
510 | (void)lists; | ||
511 | switch (action) | ||
512 | { | ||
513 | case ACTION_ENTER_MENUITEM: | ||
514 | status_set_param(true); | ||
515 | break; | ||
516 | case ACTION_EXIT_MENUITEM: | ||
517 | status_set_param(false); | ||
518 | break; | ||
519 | } | ||
520 | return action; | ||
521 | } | ||
522 | #else | ||
523 | #define mainmenu_callback NULL | ||
524 | #endif | ||
525 | MAKE_MENU(main_menu_, ID2P(LANG_SETTINGS), mainmenu_callback, | ||
526 | Icon_Submenu_Entered, | 500 | Icon_Submenu_Entered, |
527 | &sound_settings, | 501 | &sound_settings, |
528 | &playback_settings, | 502 | &playback_settings, |
diff --git a/apps/onplay.c b/apps/onplay.c index f88953ce62..9226f32f4c 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -180,15 +180,7 @@ static int bookmark_menu_callback(int action, | |||
180 | else if (!bookmark_is_bookmarkable_state() && !bookmark_exists()) | 180 | else if (!bookmark_is_bookmarkable_state() && !bookmark_exists()) |
181 | return ACTION_EXIT_MENUITEM; | 181 | return ACTION_EXIT_MENUITEM; |
182 | break; | 182 | break; |
183 | #ifdef HAVE_LCD_CHARCELLS | ||
184 | case ACTION_ENTER_MENUITEM: | ||
185 | status_set_param(true); | ||
186 | break; | ||
187 | #endif | ||
188 | case ACTION_EXIT_MENUITEM: | 183 | case ACTION_EXIT_MENUITEM: |
189 | #ifdef HAVE_LCD_CHARCELLS | ||
190 | status_set_param(false); | ||
191 | #endif | ||
192 | settings_save(); | 184 | settings_save(); |
193 | break; | 185 | break; |
194 | } | 186 | } |
diff --git a/apps/player/icons.c b/apps/player/icons.c deleted file mode 100644 index dc804560f2..0000000000 --- a/apps/player/icons.c +++ /dev/null | |||
@@ -1,110 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2007 Jonathan Gordon | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #include "lcd.h" | ||
22 | #include "icon.h" | ||
23 | |||
24 | #ifdef HAVE_LCD_CHARCELLS | ||
25 | /* For the moment, charcell cant load custom maps... */ | ||
26 | |||
27 | enum old_values{ | ||
28 | old_Icon_Queued = 'Q', | ||
29 | old_Icon_Moving = 'M', | ||
30 | old_Icon_Unknown = 0xe100, | ||
31 | old_Icon_Bookmark, | ||
32 | old_Icon_Plugin, | ||
33 | old_Icon_Folder, | ||
34 | old_Icon_Firmware, | ||
35 | old_Icon_Language, | ||
36 | old_Icon_Audio, | ||
37 | old_Icon_Wps, | ||
38 | old_Icon_Playlist, | ||
39 | old_Icon_Text, | ||
40 | old_Icon_Config, | ||
41 | }; | ||
42 | |||
43 | static const unsigned short icons[Icon_Last_Themeable] = { | ||
44 | [0 ... Icon_Last_Themeable-1] = ' ', | ||
45 | |||
46 | [Icon_Audio] = old_Icon_Audio, | ||
47 | [Icon_Folder] = old_Icon_Folder, | ||
48 | [Icon_Playlist] = old_Icon_Playlist, | ||
49 | [Icon_Cursor] = CURSOR_CHAR, | ||
50 | [Icon_Wps] = old_Icon_Wps, | ||
51 | [Icon_Firmware] = old_Icon_Firmware, | ||
52 | [Icon_Language] = old_Icon_Language, | ||
53 | [Icon_Config] = old_Icon_Config, | ||
54 | [Icon_Plugin] = old_Icon_Plugin, | ||
55 | [Icon_Bookmark] = old_Icon_Bookmark, | ||
56 | [Icon_Queued] = old_Icon_Queued, | ||
57 | [Icon_Moving] = old_Icon_Moving, | ||
58 | |||
59 | /* | ||
60 | [Icon_Keyboard] = , | ||
61 | [Icon_Font] = , | ||
62 | [Icon_Preset] = , | ||
63 | [Icon_Reverse_Cursor] = , | ||
64 | [Icon_Questionmark] = , | ||
65 | [Icon_Menu_setting] = , | ||
66 | [Icon_Menu_functioncall] = , | ||
67 | [Icon_Submenu] = , | ||
68 | [Icon_Submenu_Entered] = , | ||
69 | [Icon_Recording] = , | ||
70 | [Icon_Voice] = , | ||
71 | [Icon_General_settings_menu] = , | ||
72 | [Icon_System_menu] = , | ||
73 | [Icon_Playback_menu] = , | ||
74 | [Icon_Display_menu] = , | ||
75 | [Icon_Remote_Display_menu] = , | ||
76 | [Icon_Radio_screen] = , | ||
77 | [Icon_file_view_menu] = , | ||
78 | [Icon_EQ] = , | ||
79 | [Icon_Rockbox] = , | ||
80 | */ | ||
81 | }; | ||
82 | |||
83 | /* as above, but x,y are letter position, NOT PIXEL */ | ||
84 | extern void screen_put_iconxy(struct screen * screen, | ||
85 | int x, int y, enum themable_icons icon) | ||
86 | { | ||
87 | if (icon <= Icon_NOICON) | ||
88 | screen->putchar(x, y, ' '); | ||
89 | else if (icon >= Icon_Last_Themeable) | ||
90 | screen->putchar(x, y, old_Icon_Unknown); | ||
91 | else | ||
92 | screen->putchar(x, y, icons[icon]); | ||
93 | } | ||
94 | |||
95 | void screen_put_cursorxy(struct screen * display, int x, int y, bool on) | ||
96 | { | ||
97 | screen_put_iconxy(display, x, y, on?Icon_Cursor:-1); | ||
98 | |||
99 | } | ||
100 | |||
101 | void icons_init(void) | ||
102 | { | ||
103 | } | ||
104 | |||
105 | |||
106 | |||
107 | |||
108 | |||
109 | |||
110 | #endif | ||
diff --git a/apps/plugin.c b/apps/plugin.c index 959232ddb7..0ab73281ee 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -195,16 +195,6 @@ static const struct plugin_api rockbox_api = { | |||
195 | lcd_putsf, | 195 | lcd_putsf, |
196 | lcd_puts_scroll, | 196 | lcd_puts_scroll, |
197 | lcd_scroll_stop, | 197 | lcd_scroll_stop, |
198 | #ifdef HAVE_LCD_CHARCELLS | ||
199 | lcd_define_pattern, | ||
200 | lcd_get_locked_pattern, | ||
201 | lcd_unlock_pattern, | ||
202 | lcd_putc, | ||
203 | lcd_put_cursor, | ||
204 | lcd_remove_cursor, | ||
205 | lcd_icon, | ||
206 | lcd_double_height, | ||
207 | #else /* HAVE_LCD_BITMAP */ | ||
208 | &lcd_static_framebuffer[0][0], | 198 | &lcd_static_framebuffer[0][0], |
209 | lcd_set_viewport, | 199 | lcd_set_viewport, |
210 | lcd_set_framebuffer, | 200 | lcd_set_framebuffer, |
@@ -270,7 +260,6 @@ static const struct plugin_api rockbox_api = { | |||
270 | font_get_width, | 260 | font_get_width, |
271 | screen_clear_area, | 261 | screen_clear_area, |
272 | gui_scrollbar_draw, | 262 | gui_scrollbar_draw, |
273 | #endif /* HAVE_LCD_BITMAP */ | ||
274 | get_codepage_name, | 263 | get_codepage_name, |
275 | 264 | ||
276 | #ifdef HAVE_REMOTE_LCD | 265 | #ifdef HAVE_REMOTE_LCD |
diff --git a/apps/plugin.h b/apps/plugin.h index ecc662cb7f..8584d45fa7 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -205,16 +205,6 @@ struct plugin_api { | |||
205 | void (*lcd_putsf)(int x, int y, const unsigned char *fmt, ...); | 205 | void (*lcd_putsf)(int x, int y, const unsigned char *fmt, ...); |
206 | bool (*lcd_puts_scroll)(int x, int y, const unsigned char* string); | 206 | bool (*lcd_puts_scroll)(int x, int y, const unsigned char* string); |
207 | void (*lcd_scroll_stop)(void); | 207 | void (*lcd_scroll_stop)(void); |
208 | #ifdef HAVE_LCD_CHARCELLS | ||
209 | void (*lcd_define_pattern)(unsigned long ucs, const char *pattern); | ||
210 | unsigned long (*lcd_get_locked_pattern)(void); | ||
211 | void (*lcd_unlock_pattern)(unsigned long ucs); | ||
212 | void (*lcd_putc)(int x, int y, unsigned long ucs); | ||
213 | void (*lcd_put_cursor)(int x, int y, unsigned long ucs); | ||
214 | void (*lcd_remove_cursor)(void); | ||
215 | void (*lcd_icon)(int icon, bool enable); | ||
216 | void (*lcd_double_height)(bool on); | ||
217 | #else /* HAVE_LCD_BITMAP */ | ||
218 | fb_data* lcd_framebuffer; | 208 | fb_data* lcd_framebuffer; |
219 | void (*lcd_set_viewport)(struct viewport* vp); | 209 | void (*lcd_set_viewport)(struct viewport* vp); |
220 | void (*lcd_set_framebuffer)(fb_data *fb); | 210 | void (*lcd_set_framebuffer)(fb_data *fb); |
@@ -300,7 +290,6 @@ struct plugin_api { | |||
300 | int width, int height, int items, | 290 | int width, int height, int items, |
301 | int min_shown, int max_shown, | 291 | int min_shown, int max_shown, |
302 | unsigned flags); | 292 | unsigned flags); |
303 | #endif /* HAVE_LCD_BITMAP */ | ||
304 | const char* (*get_codepage_name)(int cp); | 293 | const char* (*get_codepage_name)(int cp); |
305 | 294 | ||
306 | #ifdef HAVE_REMOTE_LCD | 295 | #ifdef HAVE_REMOTE_LCD |
diff --git a/apps/plugins/credits.c b/apps/plugins/credits.c index 6e993b5468..593b54277e 100644 --- a/apps/plugins/credits.c +++ b/apps/plugins/credits.c | |||
@@ -27,69 +27,6 @@ static const char* const credits[] = { | |||
27 | #include "credits.raw" /* generated list of names from docs/CREDITS */ | 27 | #include "credits.raw" /* generated list of names from docs/CREDITS */ |
28 | }; | 28 | }; |
29 | 29 | ||
30 | #ifdef HAVE_LCD_CHARCELLS | ||
31 | |||
32 | static void roll_credits(void) | ||
33 | { | ||
34 | int numnames = sizeof(credits)/sizeof(char*); | ||
35 | int curr_name = 0; | ||
36 | int curr_len = rb->utf8length(credits[0]); | ||
37 | int curr_index = 0; | ||
38 | int curr_line = 0; | ||
39 | int name, len, new_len, line, x; | ||
40 | |||
41 | while (1) | ||
42 | { | ||
43 | rb->lcd_clear_display(); | ||
44 | |||
45 | name = curr_name; | ||
46 | x = -curr_index; | ||
47 | len = curr_len; | ||
48 | line = curr_line; | ||
49 | |||
50 | while (x < 11) | ||
51 | { | ||
52 | int x2; | ||
53 | |||
54 | if (x < 0) | ||
55 | rb->lcd_puts(0, line, | ||
56 | credits[name] + rb->utf8seek(credits[name], -x)); | ||
57 | else | ||
58 | rb->lcd_puts(x, line, credits[name]); | ||
59 | |||
60 | if (++name >= numnames) | ||
61 | break; | ||
62 | |||
63 | line ^= 1; | ||
64 | |||
65 | x2 = x + len/2; | ||
66 | if ((unsigned)x2 < 11) | ||
67 | rb->lcd_putc(x2, line, '*'); | ||
68 | |||
69 | new_len = rb->utf8length(credits[name]); | ||
70 | x += MAX(len/2 + 2, len - new_len/2 + 1); | ||
71 | len = new_len; | ||
72 | } | ||
73 | rb->lcd_update(); | ||
74 | |||
75 | /* abort on keypress */ | ||
76 | if(rb->action_userabort(HZ/8)) | ||
77 | return; | ||
78 | |||
79 | if (++curr_index >= curr_len) | ||
80 | { | ||
81 | if (++curr_name >= numnames) | ||
82 | break; | ||
83 | new_len = rb->utf8length(credits[curr_name]); | ||
84 | curr_index -= MAX(curr_len/2 + 2, curr_len - new_len/2 + 1); | ||
85 | curr_len = new_len; | ||
86 | curr_line ^= 1; | ||
87 | } | ||
88 | } | ||
89 | } | ||
90 | |||
91 | #else | ||
92 | |||
93 | static bool stop_autoscroll(int action) | 30 | static bool stop_autoscroll(int action) |
94 | { | 31 | { |
95 | switch (action) | 32 | switch (action) |
@@ -362,8 +299,6 @@ static void roll_credits(void) | |||
362 | } | 299 | } |
363 | } | 300 | } |
364 | 301 | ||
365 | #endif | ||
366 | |||
367 | enum plugin_status plugin_start(const void* parameter) | 302 | enum plugin_status plugin_start(const void* parameter) |
368 | { | 303 | { |
369 | (void)parameter; | 304 | (void)parameter; |
@@ -372,9 +307,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
372 | backlight_ignore_timeout(); | 307 | backlight_ignore_timeout(); |
373 | 308 | ||
374 | rb->show_logo(); | 309 | rb->show_logo(); |
375 | #ifdef HAVE_LCD_CHARCELLS | ||
376 | rb->lcd_double_height(false); | ||
377 | #endif | ||
378 | 310 | ||
379 | /* Show the logo for about 3 secs allowing the user to stop */ | 311 | /* Show the logo for about 3 secs allowing the user to stop */ |
380 | if(!rb->action_userabort(3*HZ)) | 312 | if(!rb->action_userabort(3*HZ)) |
diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c index 4cd314a035..29d2ba2fc1 100644 --- a/apps/plugins/cube.c +++ b/apps/plugins/cube.c | |||
@@ -22,7 +22,6 @@ | |||
22 | ***************************************************************************/ | 22 | ***************************************************************************/ |
23 | #include "plugin.h" | 23 | #include "plugin.h" |
24 | #include "fixedpoint.h" | 24 | #include "fixedpoint.h" |
25 | #include "lib/playergfx.h" | ||
26 | #include "lib/pluginlib_exit.h" | 25 | #include "lib/pluginlib_exit.h" |
27 | #if LCD_DEPTH > 1 | 26 | #if LCD_DEPTH > 1 |
28 | #include "lib/mylcd.h" /* MYLCD_CFG_RB_XLCD or MYLCD_CFG_PGFX */ | 27 | #include "lib/mylcd.h" /* MYLCD_CFG_RB_XLCD or MYLCD_CFG_PGFX */ |
@@ -746,8 +745,6 @@ static void cleanup(void) | |||
746 | { | 745 | { |
747 | #ifdef USEGSLIB | 746 | #ifdef USEGSLIB |
748 | grey_release(); | 747 | grey_release(); |
749 | #elif defined HAVE_LCD_CHARCELLS | ||
750 | pgfx_release(); | ||
751 | #endif | 748 | #endif |
752 | } | 749 | } |
753 | 750 | ||
@@ -797,13 +794,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
797 | grey_setfont(FONT_SYSFIXED); | 794 | grey_setfont(FONT_SYSFIXED); |
798 | #endif | 795 | #endif |
799 | rb->lcd_setfont(FONT_SYSFIXED); | 796 | rb->lcd_setfont(FONT_SYSFIXED); |
800 | #else /* LCD_CHARCELLS */ | ||
801 | if (!pgfx_init(4, 2)) | ||
802 | { | ||
803 | rb->splash(HZ*2, "Old LCD :("); | ||
804 | return PLUGIN_OK; | ||
805 | } | ||
806 | pgfx_display(0, 0); | ||
807 | #endif | 797 | #endif |
808 | 798 | ||
809 | atexit(cleanup); | 799 | atexit(cleanup); |
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c index fab409cc14..294bee8f5b 100644 --- a/apps/plugins/flipit.c +++ b/apps/plugins/flipit.c | |||
@@ -595,75 +595,6 @@ static void draw_info_panel(void) | |||
595 | GRID_TOP + 4*(TK_HEIGHT+TK_SPACE) + 2, s ); | 595 | GRID_TOP + 4*(TK_HEIGHT+TK_SPACE) + 2, s ); |
596 | } | 596 | } |
597 | 597 | ||
598 | #else /* HAVE_LCD_CHARCELLS */ | ||
599 | |||
600 | static const unsigned char tk_pat[4][7] = { | ||
601 | { 0x0e, 0x11, 0x0e, 0x00, 0x0e, 0x11, 0x0e }, /* white - white */ | ||
602 | { 0x0e, 0x11, 0x0e, 0x00, 0x0e, 0x1f, 0x0e }, /* white - black */ | ||
603 | { 0x0e, 0x1f, 0x0e, 0x00, 0x0e, 0x11, 0x0e }, /* black - white */ | ||
604 | { 0x0e, 0x1f, 0x0e, 0x00, 0x0e, 0x1f, 0x0e } /* black - black */ | ||
605 | }; | ||
606 | |||
607 | static unsigned char cur_pat[7]; | ||
608 | static unsigned long gfx_chars[5]; | ||
609 | |||
610 | static void release_gfx(void) | ||
611 | { | ||
612 | int i; | ||
613 | |||
614 | for (i = 0; i < 5; i++) | ||
615 | if (gfx_chars[i]) | ||
616 | rb->lcd_unlock_pattern(gfx_chars[i]); | ||
617 | } | ||
618 | |||
619 | static bool init_gfx(void) | ||
620 | { | ||
621 | int i; | ||
622 | |||
623 | for (i = 0; i < 5; i++) { | ||
624 | if ((gfx_chars[i] = rb->lcd_get_locked_pattern()) == 0) { | ||
625 | release_gfx(); | ||
626 | return false; | ||
627 | } | ||
628 | } | ||
629 | for (i = 0; i < 4; i++) | ||
630 | rb->lcd_define_pattern(gfx_chars[i], tk_pat[i]); | ||
631 | return true; | ||
632 | } | ||
633 | |||
634 | /* draw a spot at the coordinates (x,y), range of p is 0-19 */ | ||
635 | static void draw_spot(int p) | ||
636 | { | ||
637 | if ((p/5) & 1) | ||
638 | p -= 5; | ||
639 | |||
640 | rb->lcd_putc (p%5, p/10, gfx_chars[2*spots[p]+spots[p+5]]); | ||
641 | } | ||
642 | |||
643 | /* draw the cursor at the current cursor position */ | ||
644 | static void draw_cursor(void) | ||
645 | { | ||
646 | if ((cursor_pos/5) & 1) { | ||
647 | rb->memcpy( cur_pat, tk_pat[2*spots[cursor_pos-5]+spots[cursor_pos]], 7 ); | ||
648 | cur_pat[4] ^= 0x15; | ||
649 | cur_pat[6] ^= 0x11; | ||
650 | } | ||
651 | else { | ||
652 | rb->memcpy( cur_pat, tk_pat[2*spots[cursor_pos]+spots[cursor_pos+5]], 7 ); | ||
653 | cur_pat[0] ^= 0x15; | ||
654 | cur_pat[2] ^= 0x11; | ||
655 | } | ||
656 | rb->lcd_define_pattern(gfx_chars[4], cur_pat); | ||
657 | rb->lcd_putc( cursor_pos%5, cursor_pos/10, gfx_chars[4] ); | ||
658 | } | ||
659 | |||
660 | /* draw the info panel ... duh */ | ||
661 | static void draw_info_panel(void) | ||
662 | { | ||
663 | rb->lcd_puts( 6, 0, "Flips" ); | ||
664 | rb->lcd_putsf( 6, 1, "%d", moves ); | ||
665 | } | ||
666 | |||
667 | #endif /* LCD */ | 598 | #endif /* LCD */ |
668 | 599 | ||
669 | /* clear the cursor where it is */ | 600 | /* clear the cursor where it is */ |
@@ -978,9 +909,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
978 | #endif | 909 | #endif |
979 | 910 | ||
980 | rb->lcd_update(); | 911 | rb->lcd_update(); |
981 | #else /* HAVE_LCD_CHARCELLS */ | ||
982 | if (!init_gfx()) | ||
983 | return PLUGIN_ERROR; | ||
984 | #endif | 912 | #endif |
985 | rb->button_get_w_tmo(HZ*3); | 913 | rb->button_get_w_tmo(HZ*3); |
986 | 914 | ||
@@ -995,8 +923,5 @@ enum plugin_status plugin_start(const void* parameter) | |||
995 | rb->srand(*rb->current_tick); | 923 | rb->srand(*rb->current_tick); |
996 | 924 | ||
997 | rc = flipit_loop(); | 925 | rc = flipit_loop(); |
998 | #ifdef HAVE_LCD_CHARCELLS | ||
999 | release_gfx(); | ||
1000 | #endif | ||
1001 | return rc; | 926 | return rc; |
1002 | } | 927 | } |
diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c index 8cf4d67f3e..e7529895ac 100644 --- a/apps/plugins/invadrox.c +++ b/apps/plugins/invadrox.c | |||
@@ -66,10 +66,6 @@ | |||
66 | /* Original graphics is only 1bpp so it should be portable | 66 | /* Original graphics is only 1bpp so it should be portable |
67 | * to most targets. But for now, only support the simple ones. | 67 | * to most targets. But for now, only support the simple ones. |
68 | */ | 68 | */ |
69 | #ifndef HAVE_LCD_BITMAP | ||
70 | #error INVADROX: Unsupported LCD | ||
71 | #endif | ||
72 | |||
73 | #if (LCD_DEPTH < 2) | 69 | #if (LCD_DEPTH < 2) |
74 | #error INVADROX: Unsupported LCD | 70 | #error INVADROX: Unsupported LCD |
75 | #endif | 71 | #endif |
diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c index b380e85180..26f8f47e8f 100644 --- a/apps/plugins/jackpot.c +++ b/apps/plugins/jackpot.c | |||
@@ -30,24 +30,7 @@ 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_CHARCELLS | 33 | #ifdef HAVE_LCD_BITMAP |
34 | #define PICTURE_ROTATION_STEPS 7 | ||
35 | static unsigned char jackpot_slots_patterns[]={ | ||
36 | 0x00, 0x0A, 0x1F, 0x1F, 0x1F, 0x0e, 0x04, /* (+00)Heart */ | ||
37 | 0x00, 0x04, 0x0E, 0x1F, 0x1F, 0x04, 0x0E, /* (+07)Spade */ | ||
38 | 0x00, 0x04, 0x0E, 0x1F, 0x0E, 0x04, 0x00, /* (+14)Diamond */ | ||
39 | 0x00, 0x15, 0x0E, 0x1F, 0x0E, 0x15, 0x00, /* (+21)Club */ | ||
40 | 0x03, 0x04, 0x0e, 0x1F, 0x1F, 0x1F, 0x0e, /* (+28)Cherry */ | ||
41 | 0x00, 0x04, 0x04, 0x1F, 0x04, 0x0E, 0x1F, /* (+35)Cross */ | ||
42 | 0x04, 0x0E, 0x15, 0x04, 0x0A, 0x0A, 0x11, /* (+42)Man */ | ||
43 | 0x00, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, /* (+49)Square */ | ||
44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* (+56)Empty */ | ||
45 | 0x00, 0x0A, 0x1F, 0x1F, 0x1F, 0x0e, 0x04 /* (+63)Heart */ | ||
46 | }; | ||
47 | static unsigned long char_patterns[NB_SLOTS]; | ||
48 | #define SLEEP_TIME (HZ/24) | ||
49 | #else /* bitmaps LCDs */ | ||
50 | |||
51 | #define PICTURE_HEIGHT (BMPHEIGHT_jackpot_slots/(NB_PICTURES+1)) | 34 | #define PICTURE_HEIGHT (BMPHEIGHT_jackpot_slots/(NB_PICTURES+1)) |
52 | #if NB_SCREENS==1 | 35 | #if NB_SCREENS==1 |
53 | #define PICTURE_ROTATION_STEPS PICTURE_HEIGHT | 36 | #define PICTURE_ROTATION_STEPS PICTURE_HEIGHT |
@@ -72,7 +55,7 @@ const struct picture jackpot_pictures[]={ | |||
72 | }; | 55 | }; |
73 | 56 | ||
74 | #define SLEEP_TIME (HZ/200) | 57 | #define SLEEP_TIME (HZ/200) |
75 | #endif /* HAVE_LCD_CHARCELLS */ | 58 | #endif /* HAVE_LCD_BITMAP */ |
76 | 59 | ||
77 | struct jackpot | 60 | struct jackpot |
78 | { | 61 | { |
@@ -92,29 +75,9 @@ struct jackpot | |||
92 | int money; | 75 | int money; |
93 | }; | 76 | }; |
94 | 77 | ||
95 | #ifdef HAVE_LCD_CHARCELLS | ||
96 | static void patterns_init(struct screen* display) | ||
97 | { | ||
98 | int i; | ||
99 | for(i=0;i<NB_SLOTS;i++) | ||
100 | char_patterns[i]=display->get_locked_pattern(); | ||
101 | } | ||
102 | |||
103 | static void patterns_deinit(struct screen* display) | ||
104 | { | ||
105 | /* Restore the old pattern */ | ||
106 | int i; | ||
107 | for(i=0;i<NB_SLOTS;i++) | ||
108 | display->unlock_pattern(char_patterns[i]); | ||
109 | } | ||
110 | #endif /* HAVE_LCD_CHARCELLS */ | ||
111 | |||
112 | /*Call when the program exit*/ | 78 | /*Call when the program exit*/ |
113 | static void jackpot_exit(void) | 79 | static void jackpot_exit(void) |
114 | { | 80 | { |
115 | #ifdef HAVE_LCD_CHARCELLS | ||
116 | patterns_deinit(rb->screens[SCREEN_MAIN]); | ||
117 | #endif /* HAVE_LCD_CHARCELLS */ | ||
118 | } | 81 | } |
119 | 82 | ||
120 | static void jackpot_init(struct jackpot* game) | 83 | static void jackpot_init(struct jackpot* game) |
@@ -168,47 +131,25 @@ static void jackpot_display_slot_machine(struct jackpot* game, struct screen* di | |||
168 | char str[20]; | 131 | char str[20]; |
169 | int i; | 132 | int i; |
170 | bool changes=false; | 133 | bool changes=false; |
171 | #ifdef HAVE_LCD_CHARCELLS | ||
172 | display->putchar(0, 0, '['); | ||
173 | #else | ||
174 | const struct picture* picture= &(jackpot_pictures[display->screen_type]); | 134 | const struct picture* picture= &(jackpot_pictures[display->screen_type]); |
175 | int pos_x=(display->getwidth()-NB_SLOTS*(picture->width+1))/2; | 135 | int pos_x=(display->getwidth()-NB_SLOTS*(picture->width+1))/2; |
176 | int pos_y=(display->getheight()-(picture->slide_height))/2; | 136 | int pos_y=(display->getheight()-(picture->slide_height))/2; |
177 | #endif /* HAVE_LCD_CHARCELLS */ | ||
178 | for(i=0;i<NB_SLOTS;i++) | 137 | for(i=0;i<NB_SLOTS;i++) |
179 | { | 138 | { |
180 | #ifdef HAVE_LCD_CHARCELLS | ||
181 | /* the only charcell lcd is 7 pixel high */ | ||
182 | int state_y=(game->slot_state[i]*7)/PICTURE_ROTATION_STEPS; | ||
183 | #else | ||
184 | int state_y= | 139 | int state_y= |
185 | (picture->slide_height*game->slot_state[i])/PICTURE_ROTATION_STEPS; | 140 | (picture->slide_height*game->slot_state[i])/PICTURE_ROTATION_STEPS; |
186 | #endif /* HAVE_LCD_CHARCELLS */ | ||
187 | int previous_state_y=game->state_y[display->screen_type][i]; | 141 | int previous_state_y=game->state_y[display->screen_type][i]; |
188 | if(state_y==previous_state_y) | 142 | if(state_y==previous_state_y) |
189 | continue;/*no need to update the picture | 143 | continue;/*no need to update the picture |
190 | as it's the same as previous displayed one*/ | 144 | as it's the same as previous displayed one*/ |
191 | changes=true; | 145 | changes=true; |
192 | game->state_y[display->screen_type][i]=state_y; | 146 | game->state_y[display->screen_type][i]=state_y; |
193 | #ifdef HAVE_LCD_CHARCELLS | ||
194 | char* current_pattern=&(jackpot_slots_patterns[state_y]); | ||
195 | display->define_pattern(char_patterns[i], | ||
196 | current_pattern); | ||
197 | display->putchar(i+1, 0, char_patterns[i]); | ||
198 | #else | ||
199 | vertical_picture_draw_part(display, picture, state_y, pos_x, pos_y); | 147 | vertical_picture_draw_part(display, picture, state_y, pos_x, pos_y); |
200 | pos_x+=(picture->width+1); | 148 | pos_x+=(picture->width+1); |
201 | #endif | ||
202 | } | 149 | } |
203 | if(changes){ | 150 | if(changes){ |
204 | #ifdef HAVE_LCD_CHARCELLS | ||
205 | rb->snprintf(str,sizeof(str),"$%d", game->money); | ||
206 | display->putchar(++i, 0, ']'); | ||
207 | display->puts(++i, 0, str); | ||
208 | #else | ||
209 | rb->snprintf(str,sizeof(str),"money : $%d", game->money); | 151 | rb->snprintf(str,sizeof(str),"money : $%d", game->money); |
210 | display->puts(0, 0, str); | 152 | display->puts(0, 0, str); |
211 | #endif | ||
212 | display->update(); | 153 | display->update(); |
213 | } | 154 | } |
214 | } | 155 | } |
@@ -216,9 +157,6 @@ static void jackpot_display_slot_machine(struct jackpot* game, struct screen* di | |||
216 | 157 | ||
217 | static void jackpot_info_message(struct screen* display, char* message) | 158 | static void jackpot_info_message(struct screen* display, char* message) |
218 | { | 159 | { |
219 | #ifdef HAVE_LCD_CHARCELLS | ||
220 | display->puts_scroll(0,1,message); | ||
221 | #else | ||
222 | int xpos, ypos; | 160 | int xpos, ypos; |
223 | int message_height, message_width; | 161 | int message_height, message_width; |
224 | display->getstringsize(message, &message_width, &message_height); | 162 | display->getstringsize(message, &message_width, &message_height); |
@@ -228,7 +166,6 @@ static void jackpot_info_message(struct screen* display, char* message) | |||
228 | message_height); | 166 | message_height); |
229 | display->putsxy(xpos,ypos,message); | 167 | display->putsxy(xpos,ypos,message); |
230 | display->update(); | 168 | display->update(); |
231 | #endif /* HAVE_LCD_CHARCELLS */ | ||
232 | } | 169 | } |
233 | 170 | ||
234 | static void jackpot_print_turn_result(struct jackpot* game, | 171 | static void jackpot_print_turn_result(struct jackpot* game, |
@@ -299,9 +236,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
299 | (void)parameter; | 236 | (void)parameter; |
300 | atexit(jackpot_exit); | 237 | atexit(jackpot_exit); |
301 | rb->srand(*rb->current_tick); | 238 | rb->srand(*rb->current_tick); |
302 | #ifdef HAVE_LCD_CHARCELLS | ||
303 | patterns_init(rb->screens[SCREEN_MAIN]); | ||
304 | #endif /* HAVE_LCD_CHARCELLS */ | ||
305 | jackpot_init(&game); | 239 | jackpot_init(&game); |
306 | 240 | ||
307 | FOR_NB_SCREENS(i){ | 241 | FOR_NB_SCREENS(i){ |
diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES index 82b9fba4a5..effc076eb7 100644 --- a/apps/plugins/lib/SOURCES +++ b/apps/plugins/lib/SOURCES | |||
@@ -33,10 +33,6 @@ overlay.c | |||
33 | profile_plugin.c | 33 | profile_plugin.c |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | #ifdef HAVE_LCD_CHARCELLS | ||
37 | playergfx.c | ||
38 | #endif | ||
39 | |||
40 | #ifdef HAVE_LCD_BITMAP | 36 | #ifdef HAVE_LCD_BITMAP |
41 | 37 | ||
42 | #ifdef CPU_ARM | 38 | #ifdef CPU_ARM |
diff --git a/apps/plugins/lib/display_text.c b/apps/plugins/lib/display_text.c index 5d13fc678d..90712a649f 100644 --- a/apps/plugins/lib/display_text.c +++ b/apps/plugins/lib/display_text.c | |||
@@ -22,11 +22,7 @@ | |||
22 | #include "plugin.h" | 22 | #include "plugin.h" |
23 | #include "display_text.h" | 23 | #include "display_text.h" |
24 | 24 | ||
25 | #ifdef HAVE_LCD_CHARCELLS | ||
26 | #define MARGIN 0 | ||
27 | #else | ||
28 | #define MARGIN 5 | 25 | #define MARGIN 5 |
29 | #endif | ||
30 | 26 | ||
31 | static bool wait_key_press(void) | 27 | static bool wait_key_press(void) |
32 | { | 28 | { |
diff --git a/apps/plugins/lib/mylcd.h b/apps/plugins/lib/mylcd.h index e363111c71..a543d60890 100644 --- a/apps/plugins/lib/mylcd.h +++ b/apps/plugins/lib/mylcd.h | |||
@@ -32,15 +32,10 @@ | |||
32 | * targets. On color, mylcd_ub_update_XXXX refer to the proper update | 32 | * targets. On color, mylcd_ub_update_XXXX refer to the proper update |
33 | * functions, otherwise they are no-ops. | 33 | * functions, otherwise they are no-ops. |
34 | * | 34 | * |
35 | * lib/playergfx.h or 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_CHARCELLS) && defined(__PGFX_H__) | 38 | #if defined (HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && defined(__GREY_H__) |
39 | #define MYLCD_CFG_PGFX /* using PGFX */ | ||
40 | #define mylcd_(fn) pgfx_##fn | ||
41 | #define mylcd_ub_(fn) pgfx_##fn | ||
42 | |||
43 | #elif defined (HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && defined(__GREY_H__) | ||
44 | #define MYLCD_CFG_GREYLIB /* using greylib */ | 39 | #define MYLCD_CFG_GREYLIB /* using greylib */ |
45 | #define mylcd_(fn) grey_##fn | 40 | #define mylcd_(fn) grey_##fn |
46 | #define myxlcd_(fn) grey_##fn | 41 | #define myxlcd_(fn) grey_##fn |
diff --git a/apps/plugins/lib/osd.h b/apps/plugins/lib/osd.h index b5bf63d9fe..1c2752139a 100644 --- a/apps/plugins/lib/osd.h +++ b/apps/plugins/lib/osd.h | |||
@@ -23,10 +23,6 @@ | |||
23 | #ifndef OSD_H | 23 | #ifndef OSD_H |
24 | #define OSD_H | 24 | #define OSD_H |
25 | 25 | ||
26 | #ifndef HAVE_LCD_BITMAP | ||
27 | #error OSD requires bitmapped LCD | ||
28 | #endif | ||
29 | |||
30 | /* At this time: assumes use of the default viewport for normal drawing */ | 26 | /* At this time: assumes use of the default viewport for normal drawing */ |
31 | 27 | ||
32 | /* Callback implemented by user. Paramters are OSD vp-relative coordinates */ | 28 | /* Callback implemented by user. Paramters are OSD vp-relative coordinates */ |
diff --git a/apps/plugins/lib/playergfx.c b/apps/plugins/lib/playergfx.c deleted file mode 100644 index b2ba71351f..0000000000 --- a/apps/plugins/lib/playergfx.c +++ /dev/null | |||
@@ -1,526 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Bitmap graphics on player LCD! | ||
11 | * | ||
12 | * Copyright (C) 2005 Jens Arnold | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or | ||
15 | * modify it under the terms of the GNU General Public License | ||
16 | * as published by the Free Software Foundation; either version 2 | ||
17 | * of the License, or (at your option) any later version. | ||
18 | * | ||
19 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
20 | * KIND, either express or implied. | ||
21 | * | ||
22 | ****************************************************************************/ | ||
23 | |||
24 | #include "plugin.h" | ||
25 | |||
26 | #include "playergfx.h" | ||
27 | |||
28 | /*** globals ***/ | ||
29 | |||
30 | static int char_width; | ||
31 | static int char_height; | ||
32 | static int pixel_height; | ||
33 | static int pixel_width; | ||
34 | static unsigned long gfx_chars[8]; | ||
35 | static unsigned char gfx_buffer[56]; | ||
36 | static int drawmode = DRMODE_SOLID; | ||
37 | |||
38 | /*** Special functions ***/ | ||
39 | |||
40 | /* library init */ | ||
41 | bool pgfx_init(int cwidth, int cheight) | ||
42 | { | ||
43 | int i; | ||
44 | |||
45 | if (((unsigned) cwidth * (unsigned) cheight) > 8 || (unsigned) cheight > 2) | ||
46 | return false; | ||
47 | |||
48 | char_width = cwidth; | ||
49 | char_height = cheight; | ||
50 | pixel_height = 7 * char_height; | ||
51 | pixel_width = 5 * char_width; | ||
52 | |||
53 | for (i = 0; i < cwidth * cheight; i++) | ||
54 | { | ||
55 | if ((gfx_chars[i] = rb->lcd_get_locked_pattern()) == 0) | ||
56 | { | ||
57 | pgfx_release(); | ||
58 | return false; | ||
59 | } | ||
60 | } | ||
61 | |||
62 | return true; | ||
63 | } | ||
64 | |||
65 | /* library deinit */ | ||
66 | void pgfx_release(void) | ||
67 | { | ||
68 | int i; | ||
69 | |||
70 | for (i = 0; i < 8; i++) | ||
71 | if (gfx_chars[i]) | ||
72 | rb->lcd_unlock_pattern(gfx_chars[i]); | ||
73 | } | ||
74 | |||
75 | /* place the display */ | ||
76 | void pgfx_display(int cx, int cy) | ||
77 | { | ||
78 | int i, j; | ||
79 | int width = MIN(char_width, 11 - cx); | ||
80 | int height = MIN(char_height, 2 - cy); | ||
81 | |||
82 | for (i = 0; i < width; i++) | ||
83 | for (j = 0; j < height; j++) | ||
84 | rb->lcd_putc(cx + i, cy + j, gfx_chars[char_height * i + j]); | ||
85 | } | ||
86 | |||
87 | void pgfx_display_block(int cx, int cy, int x, int y) | ||
88 | { | ||
89 | rb->lcd_putc(cx, cy, gfx_chars[char_height * x + y]); | ||
90 | } | ||
91 | |||
92 | |||
93 | /*** Update functions ***/ | ||
94 | |||
95 | void pgfx_update(void) | ||
96 | { | ||
97 | int i; | ||
98 | |||
99 | for (i = 0; i < char_width * char_height; i++) | ||
100 | rb->lcd_define_pattern(gfx_chars[i], gfx_buffer + 7 * i); | ||
101 | |||
102 | rb->lcd_update(); | ||
103 | } | ||
104 | |||
105 | /*** Parameter handling ***/ | ||
106 | |||
107 | void pgfx_set_drawmode(int mode) | ||
108 | { | ||
109 | drawmode = mode & (DRMODE_SOLID|DRMODE_INVERSEVID); | ||
110 | } | ||
111 | |||
112 | int pgfx_get_drawmode(void) | ||
113 | { | ||
114 | return drawmode; | ||
115 | } | ||
116 | |||
117 | /*** Low-level drawing functions ***/ | ||
118 | |||
119 | static void setpixel(int x, int y) | ||
120 | { | ||
121 | gfx_buffer[pixel_height * (x/5) + y] |= 0x10 >> (x%5); | ||
122 | } | ||
123 | |||
124 | static void clearpixel(int x, int y) | ||
125 | { | ||
126 | gfx_buffer[pixel_height * (x/5) + y] &= ~(0x10 >> (x%5)); | ||
127 | } | ||
128 | |||
129 | static void flippixel(int x, int y) | ||
130 | { | ||
131 | gfx_buffer[pixel_height * (x/5) + y] ^= 0x10 >> (x%5); | ||
132 | } | ||
133 | |||
134 | static void nopixel(int x, int y) | ||
135 | { | ||
136 | (void)x; | ||
137 | (void)y; | ||
138 | } | ||
139 | |||
140 | lcd_pixelfunc_type* pgfx_pixelfuncs[8] = { | ||
141 | flippixel, nopixel, setpixel, setpixel, | ||
142 | nopixel, clearpixel, nopixel, clearpixel | ||
143 | }; | ||
144 | |||
145 | static void flipblock(unsigned char *address, unsigned mask, unsigned bits) | ||
146 | { | ||
147 | *address ^= (bits & mask); | ||
148 | } | ||
149 | |||
150 | static void bgblock(unsigned char *address, unsigned mask, unsigned bits) | ||
151 | { | ||
152 | *address &= (bits | ~mask); | ||
153 | } | ||
154 | |||
155 | static void fgblock(unsigned char *address, unsigned mask, unsigned bits) | ||
156 | { | ||
157 | *address |= (bits & mask); | ||
158 | } | ||
159 | |||
160 | static void solidblock(unsigned char *address, unsigned mask, unsigned bits) | ||
161 | { | ||
162 | unsigned data = *(char *)address; | ||
163 | |||
164 | bits ^= data; | ||
165 | *address = data ^ (bits & mask); | ||
166 | } | ||
167 | |||
168 | static void flipinvblock(unsigned char *address, unsigned mask, unsigned bits) | ||
169 | { | ||
170 | *address ^= (~bits & mask); | ||
171 | } | ||
172 | |||
173 | static void bginvblock(unsigned char *address, unsigned mask, unsigned bits) | ||
174 | { | ||
175 | *address &= ~(bits & mask); | ||
176 | } | ||
177 | |||
178 | static void fginvblock(unsigned char *address, unsigned mask, unsigned bits) | ||
179 | { | ||
180 | *address |= (~bits & mask); | ||
181 | } | ||
182 | |||
183 | static void solidinvblock(unsigned char *address, unsigned mask, unsigned bits) | ||
184 | { | ||
185 | unsigned data = *(char *)address; | ||
186 | |||
187 | bits = ~bits ^ data; | ||
188 | *address = data ^ (bits & mask); | ||
189 | } | ||
190 | |||
191 | lcd_blockfunc_type* pgfx_blockfuncs[8] = { | ||
192 | flipblock, bgblock, fgblock, solidblock, | ||
193 | flipinvblock, bginvblock, fginvblock, solidinvblock | ||
194 | }; | ||
195 | |||
196 | /*** Drawing functions ***/ | ||
197 | |||
198 | /* Clear the whole display */ | ||
199 | void pgfx_clear_display(void) | ||
200 | { | ||
201 | unsigned bits = (drawmode & DRMODE_INVERSEVID) ? 0x1F : 0; | ||
202 | |||
203 | rb->memset(gfx_buffer, bits, char_width * pixel_height); | ||
204 | } | ||
205 | |||
206 | /* Set a single pixel */ | ||
207 | void pgfx_drawpixel(int x, int y) | ||
208 | { | ||
209 | if (((unsigned)x < (unsigned)pixel_width) | ||
210 | && ((unsigned)y < (unsigned)pixel_height)) | ||
211 | pgfx_pixelfuncs[drawmode](x, y); | ||
212 | } | ||
213 | |||
214 | /* Draw a line */ | ||
215 | void pgfx_drawline(int x1, int y1, int x2, int y2) | ||
216 | { | ||
217 | int numpixels; | ||
218 | int i; | ||
219 | int deltax, deltay; | ||
220 | int d, dinc1, dinc2; | ||
221 | int x, xinc1, xinc2; | ||
222 | int y, yinc1, yinc2; | ||
223 | lcd_pixelfunc_type *pfunc = pgfx_pixelfuncs[drawmode]; | ||
224 | |||
225 | deltax = abs(x2 - x1); | ||
226 | deltay = abs(y2 - y1); | ||
227 | xinc2 = 1; | ||
228 | yinc2 = 1; | ||
229 | |||
230 | if (deltax >= deltay) | ||
231 | { | ||
232 | numpixels = deltax; | ||
233 | d = 2 * deltay - deltax; | ||
234 | dinc1 = deltay * 2; | ||
235 | dinc2 = (deltay - deltax) * 2; | ||
236 | xinc1 = 1; | ||
237 | yinc1 = 0; | ||
238 | } | ||
239 | else | ||
240 | { | ||
241 | numpixels = deltay; | ||
242 | d = 2 * deltax - deltay; | ||
243 | dinc1 = deltax * 2; | ||
244 | dinc2 = (deltax - deltay) * 2; | ||
245 | xinc1 = 0; | ||
246 | yinc1 = 1; | ||
247 | } | ||
248 | numpixels++; /* include endpoints */ | ||
249 | |||
250 | if (x1 > x2) | ||
251 | { | ||
252 | xinc1 = -xinc1; | ||
253 | xinc2 = -xinc2; | ||
254 | } | ||
255 | |||
256 | if (y1 > y2) | ||
257 | { | ||
258 | yinc1 = -yinc1; | ||
259 | yinc2 = -yinc2; | ||
260 | } | ||
261 | |||
262 | x = x1; | ||
263 | y = y1; | ||
264 | |||
265 | for (i = 0; i < numpixels; i++) | ||
266 | { | ||
267 | if (((unsigned)x < (unsigned)pixel_width) | ||
268 | && ((unsigned)y < (unsigned)pixel_height)) | ||
269 | pfunc(x, y); | ||
270 | |||
271 | if (d < 0) | ||
272 | { | ||
273 | d += dinc1; | ||
274 | x += xinc1; | ||
275 | y += yinc1; | ||
276 | } | ||
277 | else | ||
278 | { | ||
279 | d += dinc2; | ||
280 | x += xinc2; | ||
281 | y += yinc2; | ||
282 | } | ||
283 | } | ||
284 | } | ||
285 | |||
286 | /* Draw a horizontal line (optimised) */ | ||
287 | void pgfx_hline(int x1, int x2, int y) | ||
288 | { | ||
289 | int nx; | ||
290 | unsigned char *dst; | ||
291 | unsigned mask, mask_right; | ||
292 | lcd_blockfunc_type *bfunc; | ||
293 | |||
294 | /* direction flip */ | ||
295 | if (x2 < x1) | ||
296 | { | ||
297 | nx = x1; | ||
298 | x1 = x2; | ||
299 | x2 = nx; | ||
300 | } | ||
301 | |||
302 | /* nothing to draw? */ | ||
303 | if (((unsigned)y >= (unsigned)pixel_height) || (x1 >= pixel_width) | ||
304 | || (x2 < 0)) | ||
305 | return; | ||
306 | |||
307 | /* clipping */ | ||
308 | if (x1 < 0) | ||
309 | x1 = 0; | ||
310 | if (x2 >= pixel_width) | ||
311 | x2 = pixel_width - 1; | ||
312 | |||
313 | bfunc = pgfx_blockfuncs[drawmode]; | ||
314 | dst = &gfx_buffer[pixel_height * (x1/5) + y]; | ||
315 | nx = x2 - (x1 - (x1 % 5)); | ||
316 | mask = 0x1F >> (x1 % 5); | ||
317 | mask_right = 0x1F0 >> (nx % 5); | ||
318 | |||
319 | for (; nx >= 5; nx -= 5) | ||
320 | { | ||
321 | bfunc(dst, mask, 0xFFu); | ||
322 | dst += pixel_height; | ||
323 | mask = 0x1F; | ||
324 | } | ||
325 | mask &= mask_right; | ||
326 | bfunc(dst, mask, 0x1F); | ||
327 | } | ||
328 | |||
329 | /* Draw a vertical line (optimised) */ | ||
330 | void pgfx_vline(int x, int y1, int y2) | ||
331 | { | ||
332 | int y; | ||
333 | unsigned char *dst, *dst_end; | ||
334 | unsigned mask; | ||
335 | lcd_blockfunc_type *bfunc; | ||
336 | |||
337 | /* direction flip */ | ||
338 | if (y2 < y1) | ||
339 | { | ||
340 | y = y1; | ||
341 | y1 = y2; | ||
342 | y2 = y; | ||
343 | } | ||
344 | |||
345 | /* nothing to draw? */ | ||
346 | if (((unsigned)x >= (unsigned)pixel_width) || (y1 >= pixel_height) | ||
347 | || (y2 < 0)) | ||
348 | return; | ||
349 | |||
350 | /* clipping */ | ||
351 | if (y1 < 0) | ||
352 | y1 = 0; | ||
353 | if (y2 >= pixel_height) | ||
354 | y2 = pixel_height - 1; | ||
355 | |||
356 | bfunc = pgfx_blockfuncs[drawmode]; | ||
357 | dst = &gfx_buffer[pixel_height * (x/5) + y1]; | ||
358 | mask = 0x10 >> (x % 5); | ||
359 | |||
360 | dst_end = dst + y2 - y1; | ||
361 | do | ||
362 | bfunc(dst++, mask, 0x1F); | ||
363 | while (dst <= dst_end); | ||
364 | } | ||
365 | |||
366 | /* Draw a rectangular box */ | ||
367 | void pgfx_drawrect(int x, int y, int width, int height) | ||
368 | { | ||
369 | if ((width <= 0) || (height <= 0)) | ||
370 | return; | ||
371 | |||
372 | int x2 = x + width - 1; | ||
373 | int y2 = y + height - 1; | ||
374 | |||
375 | pgfx_vline(x, y, y2); | ||
376 | pgfx_vline(x2, y, y2); | ||
377 | pgfx_hline(x, x2, y); | ||
378 | pgfx_hline(x, x2, y2); | ||
379 | } | ||
380 | |||
381 | /* Fill a rectangular area */ | ||
382 | void pgfx_fillrect(int x, int y, int width, int height) | ||
383 | { | ||
384 | int nx; | ||
385 | unsigned char *dst, *dst_end; | ||
386 | unsigned mask, mask_right; | ||
387 | lcd_blockfunc_type *bfunc; | ||
388 | |||
389 | /* nothing to draw? */ | ||
390 | if ((width <= 0) || (height <= 0) || (x >= pixel_width) | ||
391 | || (y >= pixel_height) || (x + width <= 0) || (y + height <= 0)) | ||
392 | return; | ||
393 | |||
394 | /* clipping */ | ||
395 | if (x < 0) | ||
396 | { | ||
397 | width += x; | ||
398 | x = 0; | ||
399 | } | ||
400 | if (y < 0) | ||
401 | { | ||
402 | height += y; | ||
403 | y = 0; | ||
404 | } | ||
405 | if (x + width > pixel_width) | ||
406 | width = pixel_width - x; | ||
407 | if (y + height > pixel_height) | ||
408 | height = pixel_height - y; | ||
409 | |||
410 | bfunc = pgfx_blockfuncs[drawmode]; | ||
411 | dst = &gfx_buffer[pixel_height * (x/5) + y]; | ||
412 | nx = width - 1 + (x % 5); | ||
413 | mask = 0x1F >> (x % 5); | ||
414 | mask_right = 0x1F0 >> (nx % 5); | ||
415 | |||
416 | for (; nx >= 5; nx -= 5) | ||
417 | { | ||
418 | unsigned char *dst_col = dst; | ||
419 | |||
420 | dst_end = dst_col + height; | ||
421 | do | ||
422 | bfunc(dst_col++, mask, 0x1F); | ||
423 | while (dst_col < dst_end); | ||
424 | |||
425 | dst += pixel_height; | ||
426 | mask = 0x1F; | ||
427 | } | ||
428 | mask &= mask_right; | ||
429 | |||
430 | dst_end = dst + height; | ||
431 | do | ||
432 | bfunc(dst++, mask, 0x1F); | ||
433 | while (dst < dst_end); | ||
434 | } | ||
435 | |||
436 | /* About PlayerGFX internal bitmap format: | ||
437 | * | ||
438 | * A bitmap contains one bit for every pixel that defines if that pixel is | ||
439 | * black (1) or white (0). Bits within a byte are arranged horizontally, | ||
440 | * MSB at the left. | ||
441 | * The bytes are stored in row-major order, with byte 0 being top left, | ||
442 | * byte 1 2nd from left etc. Each row of bytes defines one pixel row. | ||
443 | * | ||
444 | * This approximates the (even more strange) internal hardware format. */ | ||
445 | |||
446 | /* Draw a partial bitmap. stride is given in pixels */ | ||
447 | void pgfx_bitmap_part(const unsigned char *src, int src_x, int src_y, | ||
448 | int stride, int x, int y, int width, int height) | ||
449 | { | ||
450 | int nx, shift; | ||
451 | unsigned char *dst, *dst_end; | ||
452 | unsigned mask, mask_right; | ||
453 | lcd_blockfunc_type *bfunc; | ||
454 | |||
455 | /* nothing to draw? */ | ||
456 | if ((width <= 0) || (height <= 0) || (x >= pixel_width) | ||
457 | || (y >= pixel_height) || (x + width <= 0) || (y + height <= 0)) | ||
458 | return; | ||
459 | |||
460 | /* clipping */ | ||
461 | if (x < 0) | ||
462 | { | ||
463 | width += x; | ||
464 | src_x -= x; | ||
465 | x = 0; | ||
466 | } | ||
467 | if (y < 0) | ||
468 | { | ||
469 | height += y; | ||
470 | src_y -= y; | ||
471 | y = 0; | ||
472 | } | ||
473 | if (x + width > pixel_width) | ||
474 | width = pixel_width - x; | ||
475 | if (y + height > pixel_height) | ||
476 | height = pixel_height - y; | ||
477 | |||
478 | stride = (stride + 7) >> 3; /* convert to no. of bytes */ | ||
479 | |||
480 | src += stride * src_y + (src_x >> 3); /* move starting point */ | ||
481 | dst = &gfx_buffer[pixel_height * (x/5) + y]; | ||
482 | shift = 3 + (x % 5) - (src_x & 7); | ||
483 | nx = width - 1 + (x % 5); | ||
484 | |||
485 | bfunc = pgfx_blockfuncs[drawmode]; | ||
486 | mask = 0x1F >> (x % 5); | ||
487 | mask_right = 0x1F0 >> (nx % 5); | ||
488 | |||
489 | dst_end = dst + height; | ||
490 | do | ||
491 | { | ||
492 | const unsigned char *src_row = src; | ||
493 | unsigned char *dst_row = dst++; | ||
494 | unsigned mask_row = mask; | ||
495 | unsigned data = *src_row++; | ||
496 | int extrabits = shift; | ||
497 | |||
498 | for (x = nx; x >= 5; x -= 5) | ||
499 | { | ||
500 | if (extrabits < 0) | ||
501 | { | ||
502 | data = (data << 8) | *src_row++; | ||
503 | extrabits += 8; | ||
504 | } | ||
505 | bfunc(dst_row, mask_row, data >> extrabits); | ||
506 | extrabits -= 5; | ||
507 | dst_row += pixel_height; | ||
508 | mask_row = 0x1F; | ||
509 | } | ||
510 | if (extrabits < 0) | ||
511 | { | ||
512 | data = (data << 8) | *src_row; | ||
513 | extrabits += 8; | ||
514 | } | ||
515 | bfunc(dst_row, mask_row & mask_right, data >> extrabits); | ||
516 | |||
517 | src += stride; | ||
518 | } | ||
519 | while (dst < dst_end); | ||
520 | } | ||
521 | |||
522 | /* Draw a full bitmap */ | ||
523 | void pgfx_bitmap(const unsigned char *src, int x, int y, int width, int height) | ||
524 | { | ||
525 | pgfx_bitmap_part(src, 0, 0, width, x, y, width, height); | ||
526 | } | ||
diff --git a/apps/plugins/lib/playergfx.h b/apps/plugins/lib/playergfx.h deleted file mode 100644 index 9f1305af12..0000000000 --- a/apps/plugins/lib/playergfx.h +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Bitmap graphics on player LCD! | ||
11 | * | ||
12 | * Copyright (C) 2005 Jens Arnold | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or | ||
15 | * modify it under the terms of the GNU General Public License | ||
16 | * as published by the Free Software Foundation; either version 2 | ||
17 | * of the License, or (at your option) any later version. | ||
18 | * | ||
19 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
20 | * KIND, either express or implied. | ||
21 | * | ||
22 | ****************************************************************************/ | ||
23 | |||
24 | #ifndef __PGFX_H__ | ||
25 | #define __PGFX_H__ | ||
26 | |||
27 | #include "plugin.h" | ||
28 | |||
29 | #ifdef HAVE_LCD_CHARCELLS /* Player only :) */ | ||
30 | |||
31 | bool pgfx_init(int cwidth, int cheight); | ||
32 | void pgfx_release(void); | ||
33 | void pgfx_display(int cx, int cy); | ||
34 | void pgfx_display_block(int cx, int cy, int x, int y); | ||
35 | void pgfx_update(void); | ||
36 | |||
37 | void pgfx_set_drawmode(int mode); | ||
38 | int pgfx_get_drawmode(void); | ||
39 | |||
40 | void pgfx_clear_display(void); | ||
41 | void pgfx_drawpixel(int x, int y); | ||
42 | void pgfx_drawline(int x1, int y1, int x2, int y2); | ||
43 | void pgfx_hline(int x1, int x2, int y); | ||
44 | void pgfx_vline(int x, int y1, int y2); | ||
45 | void pgfx_drawrect(int x, int y, int width, int height); | ||
46 | void pgfx_fillrect(int x, int y, int width, int height); | ||
47 | void pgfx_bitmap_part(const unsigned char *src, int src_x, int src_y, | ||
48 | int stride, int x, int y, int width, int height); | ||
49 | void pgfx_bitmap(const unsigned char *src, int x, int y, int width, int height); | ||
50 | |||
51 | #define pgfx_mono_bitmap_part pgfx_bitmap_part | ||
52 | #define pgfx_mono_bitmap pgfx_bitmap | ||
53 | |||
54 | #endif /* HAVE_LCD_CHARCELLS */ | ||
55 | #endif /* __PGFX_H__ */ | ||
diff --git a/apps/plugins/lib/simple_viewer.c b/apps/plugins/lib/simple_viewer.c index 6927d84a96..4c05ee68c5 100644 --- a/apps/plugins/lib/simple_viewer.c +++ b/apps/plugins/lib/simple_viewer.c | |||
@@ -64,17 +64,12 @@ static const char* get_next_line(const char *text, struct view_info *info) | |||
64 | total = 0; | 64 | total = 0; |
65 | while(*ptr) | 65 | while(*ptr) |
66 | { | 66 | { |
67 | #ifdef HAVE_LCD_CHARCELLS | ||
68 | n = rb->utf8seek(ptr, 1); | ||
69 | w = 1; | ||
70 | #else | ||
71 | unsigned short ch; | 67 | unsigned short ch; |
72 | n = ((intptr_t)rb->utf8decode(ptr, &ch) - (intptr_t)ptr); | 68 | n = ((intptr_t)rb->utf8decode(ptr, &ch) - (intptr_t)ptr); |
73 | if (rb->is_diacritic(ch, NULL)) | 69 | if (rb->is_diacritic(ch, NULL)) |
74 | w = 0; | 70 | w = 0; |
75 | else | 71 | else |
76 | w = rb->font_get_width(info->pf, ch); | 72 | w = rb->font_get_width(info->pf, ch); |
77 | #endif | ||
78 | if (isbrchr(ptr, n)) | 73 | if (isbrchr(ptr, n)) |
79 | space = ptr+(isspace(*ptr) || total + w <= info->vp.width? n: 0); | 74 | space = ptr+(isspace(*ptr) || total + w <= info->vp.width? n: 0); |
80 | if (*ptr == '\n') | 75 | if (*ptr == '\n') |
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c index e1c570b6a5..60bed3b826 100644 --- a/apps/plugins/logo.c +++ b/apps/plugins/logo.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * | 19 | * |
20 | **************************************************************************/ | 20 | **************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "lib/playergfx.h" | ||
23 | #include "lib/pluginlib_actions.h" | 22 | #include "lib/pluginlib_actions.h" |
24 | 23 | ||
25 | /* this set the context to use with PLA */ | 24 | /* this set the context to use with PLA */ |
@@ -81,19 +80,9 @@ enum plugin_status plugin_start(const void* parameter) { | |||
81 | int y = (DISPLAY_HEIGHT / 2) - (LOGO_HEIGHT / 2); | 80 | int y = (DISPLAY_HEIGHT / 2) - (LOGO_HEIGHT / 2); |
82 | int dx; | 81 | int dx; |
83 | int dy; | 82 | int dy; |
84 | #ifdef HAVE_LCD_CHARCELLS | ||
85 | int cpos = -1; | ||
86 | int old_cpos = -1; | ||
87 | #endif | ||
88 | 83 | ||
89 | (void)parameter; | 84 | (void)parameter; |
90 | 85 | ||
91 | #ifdef HAVE_LCD_CHARCELLS | ||
92 | if (!pgfx_init(4, 2)) { | ||
93 | rb->splash(HZ*2, "Old LCD :("); | ||
94 | return PLUGIN_OK; | ||
95 | } | ||
96 | #endif | ||
97 | rb->srand(*rb->current_tick); | 86 | rb->srand(*rb->current_tick); |
98 | dx = rb->rand()%(2*RAND_SCALE+1) - RAND_SCALE; | 87 | dx = rb->rand()%(2*RAND_SCALE+1) - RAND_SCALE; |
99 | dy = rb->rand()%(2*RAND_SCALE+1) - RAND_SCALE; | 88 | dy = rb->rand()%(2*RAND_SCALE+1) - RAND_SCALE; |
@@ -159,9 +148,6 @@ enum plugin_status plugin_start(const void* parameter) { | |||
159 | switch (button) { | 148 | switch (button) { |
160 | case LP_QUIT: | 149 | case LP_QUIT: |
161 | case LP_QUIT2: | 150 | case LP_QUIT2: |
162 | #ifdef HAVE_LCD_CHARCELLS | ||
163 | pgfx_release(); | ||
164 | #endif | ||
165 | return PLUGIN_OK; | 151 | return PLUGIN_OK; |
166 | case LP_DEC_X: | 152 | case LP_DEC_X: |
167 | case LP_DEC_X_REPEAT: | 153 | case LP_DEC_X_REPEAT: |
@@ -184,9 +170,6 @@ enum plugin_status plugin_start(const void* parameter) { | |||
184 | 170 | ||
185 | default: | 171 | default: |
186 | if (rb->default_event_handler(button) == SYS_USB_CONNECTED) { | 172 | if (rb->default_event_handler(button) == SYS_USB_CONNECTED) { |
187 | #ifdef HAVE_LCD_CHARCELLS | ||
188 | pgfx_release(); | ||
189 | #endif | ||
190 | return PLUGIN_USB_CONNECTED; | 173 | return PLUGIN_USB_CONNECTED; |
191 | } | 174 | } |
192 | break; | 175 | break; |
diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c index eb441eab8d..1b017942a9 100644 --- a/apps/plugins/lrcplayer.c +++ b/apps/plugins/lrcplayer.c | |||
@@ -144,11 +144,7 @@ static struct viewport vp_lyrics[NB_SCREENS]; | |||
144 | 144 | ||
145 | #include "lib/pluginlib_actions.h" | 145 | #include "lib/pluginlib_actions.h" |
146 | #define LST_SET_TIME (LST_SET_MSEC|LST_SET_SEC|LST_SET_MIN|LST_SET_HOUR) | 146 | #define LST_SET_TIME (LST_SET_MSEC|LST_SET_SEC|LST_SET_MIN|LST_SET_HOUR) |
147 | #ifdef HAVE_LCD_CHARCELLS | ||
148 | #define LST_OFF_Y 0 | ||
149 | #else /* HAVE_LCD_BITMAP */ | ||
150 | #define LST_OFF_Y 1 | 147 | #define LST_OFF_Y 1 |
151 | #endif | ||
152 | static int lrc_set_time(const char *title, const char *unit, long *pval, | 148 | static int lrc_set_time(const char *title, const char *unit, long *pval, |
153 | int step, int min, int max, int flags) | 149 | int step, int min, int max, int flags) |
154 | { | 150 | { |
@@ -229,17 +225,11 @@ static int lrc_set_time(const char *title, const char *unit, long *pval, | |||
229 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 225 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
230 | rb->lcd_putsxy(x, y*(1+LST_OFF_Y), &buffer[p_start]); | 226 | rb->lcd_putsxy(x, y*(1+LST_OFF_Y), &buffer[p_start]); |
231 | rb->lcd_set_drawmode(DRMODE_SOLID); | 227 | rb->lcd_set_drawmode(DRMODE_SOLID); |
232 | #else | ||
233 | rb->lcd_put_cursor(x+rb->utf8length(&buffer[p_start])-1, y, 0x7F); | ||
234 | #endif | 228 | #endif |
235 | } | 229 | } |
236 | rb->lcd_update(); | 230 | rb->lcd_update(); |
237 | int button = pluginlib_getaction(TIMEOUT_BLOCK, lst_contexts, ARRAYLEN(lst_contexts)); | 231 | int button = pluginlib_getaction(TIMEOUT_BLOCK, lst_contexts, ARRAYLEN(lst_contexts)); |
238 | int mult = 1; | 232 | int mult = 1; |
239 | #ifdef HAVE_LCD_CHARCELLS | ||
240 | if (pos_min != pos_max) | ||
241 | rb->lcd_remove_cursor(); | ||
242 | #endif | ||
243 | switch (button) | 233 | switch (button) |
244 | { | 234 | { |
245 | case PLA_UP_REPEAT: | 235 | case PLA_UP_REPEAT: |
@@ -452,9 +442,7 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i) | |||
452 | int word_count, word_width; | 442 | int word_count, word_width; |
453 | const unsigned char *str; | 443 | const unsigned char *str; |
454 | } | 444 | } |
455 | #ifndef HAVE_LCD_CHARCELLS | ||
456 | sp, | 445 | sp, |
457 | #endif | ||
458 | cr; | 446 | cr; |
459 | 447 | ||
460 | lrc_buffer_used = (lrc_buffer_used+3)&~3; /* 4 bytes aligned */ | 448 | lrc_buffer_used = (lrc_buffer_used+3)&~3; /* 4 bytes aligned */ |
@@ -514,19 +502,15 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i) | |||
514 | cr.nword = lrc_line->nword; | 502 | cr.nword = lrc_line->nword; |
515 | lrc_word = lrc_line->words+cr.nword; | 503 | lrc_word = lrc_line->words+cr.nword; |
516 | cr.str = (lrc_word-1)->word; | 504 | cr.str = (lrc_word-1)->word; |
517 | #ifndef HAVE_LCD_CHARCELLS | ||
518 | sp.word_count = 0; | 505 | sp.word_count = 0; |
519 | sp.word_width = 0; | 506 | sp.word_width = 0; |
520 | sp.nword = 0; | 507 | sp.nword = 0; |
521 | sp.count = 0; | 508 | sp.count = 0; |
522 | sp.width = 0; | 509 | sp.width = 0; |
523 | #endif | ||
524 | do { | 510 | do { |
525 | cr.count = 0; | 511 | cr.count = 0; |
526 | cr.width = 0; | 512 | cr.width = 0; |
527 | #ifndef HAVE_LCD_CHARCELLS | ||
528 | sp.str = NULL; | 513 | sp.str = NULL; |
529 | #endif | ||
530 | 514 | ||
531 | while (1) | 515 | while (1) |
532 | { | 516 | { |
@@ -541,10 +525,6 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i) | |||
541 | break; | 525 | break; |
542 | 526 | ||
543 | int c, w; | 527 | int c, w; |
544 | #ifdef HAVE_LCD_CHARCELLS | ||
545 | c = rb->utf8seek(cr.str, 1); | ||
546 | w = 1; | ||
547 | #else | ||
548 | c = ((intptr_t)rb->utf8decode(cr.str, &ch) - (intptr_t)cr.str); | 528 | c = ((intptr_t)rb->utf8decode(cr.str, &ch) - (intptr_t)cr.str); |
549 | if (rb->is_diacritic(ch, NULL)) | 529 | if (rb->is_diacritic(ch, NULL)) |
550 | w = 0; | 530 | w = 0; |
@@ -576,7 +556,6 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i) | |||
576 | } | 556 | } |
577 | break; | 557 | break; |
578 | } | 558 | } |
579 | #endif | ||
580 | cr.count += c; | 559 | cr.count += c; |
581 | cr.width += w; | 560 | cr.width += w; |
582 | lrc_word->count += c; | 561 | lrc_word->count += c; |
@@ -1916,38 +1895,6 @@ static void display_lrcs(void) | |||
1916 | } | 1895 | } |
1917 | if (!lrc_line && ypos < vp_lyrics[i].height) | 1896 | if (!lrc_line && ypos < vp_lyrics[i].height) |
1918 | display->putsxy(0, ypos, "[end]"); | 1897 | display->putsxy(0, ypos, "[end]"); |
1919 | #else /* HAVE_LCD_CHARCELLS */ | ||
1920 | struct lrc_line *lrc_line = lrc_center; | ||
1921 | struct lrc_brpos *lrc_brpos = calc_brpos(lrc_line, i); | ||
1922 | long elapsed = 0; | ||
1923 | const char *str = get_lrc_str(lrc_line); | ||
1924 | int x = vp_lyrics[i].width/2, y = 0; | ||
1925 | |||
1926 | if (rin >= 0 && len > 0) | ||
1927 | { | ||
1928 | elapsed = rin * lrc_center->width / len; | ||
1929 | while (elapsed > lrc_brpos->width) | ||
1930 | { | ||
1931 | elapsed -= lrc_brpos->width; | ||
1932 | str = lrc_skip_space(str+lrc_brpos->count); | ||
1933 | lrc_brpos++; | ||
1934 | } | ||
1935 | } | ||
1936 | rb->strlcpy(temp_buf, str, lrc_brpos->count+1); | ||
1937 | |||
1938 | x -= elapsed; | ||
1939 | if (x < 0) | ||
1940 | display->puts(0, y, temp_buf + rb->utf8seek(temp_buf, -x)); | ||
1941 | else | ||
1942 | display->puts(x, y, temp_buf); | ||
1943 | x += rb->utf8length(temp_buf)+1; | ||
1944 | lrc_line = lrc_line->next; | ||
1945 | if (!lrc_line && x < vp_lyrics[i].width) | ||
1946 | { | ||
1947 | if (x < vp_lyrics[i].width/2) | ||
1948 | x = vp_lyrics[i].width/2; | ||
1949 | display->puts(x, y, "[end]"); | ||
1950 | } | ||
1951 | #endif /* HAVE_LCD_BITMAP */ | 1898 | #endif /* HAVE_LCD_BITMAP */ |
1952 | display->update_viewport(); | 1899 | display->update_viewport(); |
1953 | display->set_viewport(NULL); | 1900 | display->set_viewport(NULL); |
diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c index 02217390cd..75947df618 100644 --- a/apps/plugins/metronome.c +++ b/apps/plugins/metronome.c | |||
@@ -1022,12 +1022,7 @@ static void play_tock(void) | |||
1022 | static void metronome_draw(struct screen* display, int state) | 1022 | static void metronome_draw(struct screen* display, int state) |
1023 | { | 1023 | { |
1024 | struct part *ps; | 1024 | struct part *ps; |
1025 | #ifndef HAVE_LCD_BITMAP | ||
1026 | char beat1 = ' '; | ||
1027 | char beat2 = ' '; | ||
1028 | #else | ||
1029 | int textlen = display->lcdwidth / display->getcharwidth(); | 1025 | int textlen = display->lcdwidth / display->getcharwidth(); |
1030 | #endif | ||
1031 | ps = part; | 1026 | ps = part; |
1032 | display->clear_display(); | 1027 | display->clear_display(); |
1033 | #ifdef HAVE_LCD_BITMAP | 1028 | #ifdef HAVE_LCD_BITMAP |
diff --git a/apps/plugins/mosaique.c b/apps/plugins/mosaique.c index 68938a1f13..28ea9efd93 100644 --- a/apps/plugins/mosaique.c +++ b/apps/plugins/mosaique.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * | 19 | * |
20 | **************************************************************************/ | 20 | **************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "lib/playergfx.h" | ||
23 | #include "lib/mylcd.h" | 22 | #include "lib/mylcd.h" |
24 | #include "lib/pluginlib_actions.h" | 23 | #include "lib/pluginlib_actions.h" |
25 | 24 | ||
@@ -59,14 +58,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
59 | int sy = 3; | 58 | int sy = 3; |
60 | (void)parameter; | 59 | (void)parameter; |
61 | 60 | ||
62 | #ifdef HAVE_LCD_CHARCELLS | ||
63 | if (!pgfx_init(4, 2)) | ||
64 | { | ||
65 | rb->splash(HZ*2, "Old LCD :("); | ||
66 | return PLUGIN_OK; | ||
67 | } | ||
68 | pgfx_display(3, 0); | ||
69 | #endif | ||
70 | mylcd_clear_display(); | 61 | mylcd_clear_display(); |
71 | mylcd_set_drawmode(DRMODE_COMPLEMENT); | 62 | mylcd_set_drawmode(DRMODE_COMPLEMENT); |
72 | while (1) { | 63 | while (1) { |
@@ -117,9 +108,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
117 | case MOSAIQUE_QUIT: | 108 | case MOSAIQUE_QUIT: |
118 | case MOSAIQUE_QUIT2: | 109 | case MOSAIQUE_QUIT2: |
119 | mylcd_set_drawmode(DRMODE_SOLID); | 110 | mylcd_set_drawmode(DRMODE_SOLID); |
120 | #ifdef HAVE_LCD_CHARCELLS | ||
121 | pgfx_release(); | ||
122 | #endif | ||
123 | return PLUGIN_OK; | 111 | return PLUGIN_OK; |
124 | 112 | ||
125 | case MOSAIQUE_SPEED: | 113 | case MOSAIQUE_SPEED: |
@@ -142,9 +130,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
142 | if (rb->default_event_handler(button) == SYS_USB_CONNECTED) | 130 | if (rb->default_event_handler(button) == SYS_USB_CONNECTED) |
143 | { | 131 | { |
144 | mylcd_set_drawmode(DRMODE_SOLID); | 132 | mylcd_set_drawmode(DRMODE_SOLID); |
145 | #ifdef HAVE_LCD_CHARCELLS | ||
146 | pgfx_release(); | ||
147 | #endif | ||
148 | return PLUGIN_USB_CONNECTED; | 133 | return PLUGIN_USB_CONNECTED; |
149 | } | 134 | } |
150 | break; | 135 | break; |
diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c index add1fc5724..68440e4602 100644 --- a/apps/plugins/random_folder_advance_config.c +++ b/apps/plugins/random_folder_advance_config.c | |||
@@ -229,9 +229,7 @@ static void generate(void) | |||
229 | rb->splashf(HZ, "Couldnt open %s", RFA_FILE); | 229 | rb->splashf(HZ, "Couldnt open %s", RFA_FILE); |
230 | return; | 230 | return; |
231 | } | 231 | } |
232 | #ifndef HAVE_LCD_CHARCELLS | ||
233 | update_screen(true); | 232 | update_screen(true); |
234 | #endif | ||
235 | lasttick = *rb->current_tick; | 233 | lasttick = *rb->current_tick; |
236 | 234 | ||
237 | if(!custom_dir()) | 235 | if(!custom_dir()) |
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index 1732d61277..c7968c3e20 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include "lib/helper.h" | 25 | #include "lib/helper.h" |
26 | #include "lib/highscore.h" | 26 | #include "lib/highscore.h" |
27 | #include "lib/playback_control.h" | 27 | #include "lib/playback_control.h" |
28 | #include "lib/playergfx.h" | ||
29 | #include "lib/mylcd.h" | 28 | #include "lib/mylcd.h" |
30 | 29 | ||
31 | 30 | ||
@@ -770,17 +769,8 @@ | |||
770 | 769 | ||
771 | extern const fb_data rockblox_background[]; | 770 | extern const fb_data rockblox_background[]; |
772 | 771 | ||
773 | #else /* HAVE_LCD_CHARCELLS */ | 772 | #else |
774 | 773 | #error "lcd screen size not defined!" | |
775 | #define BOARD_HEIGHT 14 | ||
776 | |||
777 | #define BLOCK_WIDTH 1 | ||
778 | #define BLOCK_HEIGHT 1 | ||
779 | #define BOARD_X 5 | ||
780 | #define BOARD_Y 0 | ||
781 | #define PREVIEW_X 15 | ||
782 | #define PREVIEW_Y 1 | ||
783 | |||
784 | #endif | 774 | #endif |
785 | 775 | ||
786 | #ifndef HIGHSCORE_SPACE | 776 | #ifndef HIGHSCORE_SPACE |
@@ -992,10 +982,6 @@ static void show_details (void) | |||
992 | rb->lcd_putsxyf (LABEL_X, SCORE_Y, "%d", rockblox_status.score); | 982 | rb->lcd_putsxyf (LABEL_X, SCORE_Y, "%d", rockblox_status.score); |
993 | rb->lcd_putsxyf (LEVEL_X, LEVEL_Y, "%d", rockblox_status.level); | 983 | rb->lcd_putsxyf (LEVEL_X, LEVEL_Y, "%d", rockblox_status.level); |
994 | rb->lcd_putsxyf (LINES_X, LINES_Y, "%d", rockblox_status.lines); | 984 | rb->lcd_putsxyf (LINES_X, LINES_Y, "%d", rockblox_status.lines); |
995 | #else /* HAVE_LCD_CHARCELLS */ | ||
996 | rb->lcd_putsf (5, 0, "L%d/%d", rockblox_status.level, | ||
997 | rockblox_status.lines); | ||
998 | rb->lcd_putsf (5, 1, "S%d", rockblox_status.score); | ||
999 | #endif | 985 | #endif |
1000 | } | 986 | } |
1001 | 987 | ||
@@ -1066,15 +1052,6 @@ static void init_rockblox (bool resume) | |||
1066 | 1052 | ||
1067 | #ifdef HAVE_LCD_BITMAP | 1053 | #ifdef HAVE_LCD_BITMAP |
1068 | rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT); | 1054 | rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT); |
1069 | #else /* HAVE_LCD_CHARCELLS */ | ||
1070 | pgfx_display (0, 0); | ||
1071 | pgfx_display_block (3, 0, 3, 1); | ||
1072 | pgfx_display_block (4, 0, 3, 0); | ||
1073 | rb->lcd_puts(4, 1, " "); | ||
1074 | pgfx_clear_display(); | ||
1075 | pgfx_fillrect (3, 0, 2, 14); | ||
1076 | pgfx_fillrect (15, 7, 2, 7); | ||
1077 | pgfx_update(); | ||
1078 | #endif | 1055 | #endif |
1079 | if (!resume) | 1056 | if (!resume) |
1080 | { | 1057 | { |
@@ -1200,8 +1177,6 @@ static void refresh_board (void) | |||
1200 | rb->lcd_hline (BOARD_X + i * BLOCK_WIDTH + 1, | 1177 | rb->lcd_hline (BOARD_X + i * BLOCK_WIDTH + 1, |
1201 | BOARD_X + (i + 1) * BLOCK_WIDTH - 1, | 1178 | BOARD_X + (i + 1) * BLOCK_WIDTH - 1, |
1202 | BOARD_Y + (j + 1) * BLOCK_HEIGHT - 1); | 1179 | BOARD_Y + (j + 1) * BLOCK_HEIGHT - 1); |
1203 | #else /* HAVE_LCD_CHARCELLS */ | ||
1204 | pgfx_drawpixel (BOARD_X + i, BOARD_Y + j); | ||
1205 | #endif | 1180 | #endif |
1206 | } | 1181 | } |
1207 | } | 1182 | } |
@@ -1246,8 +1221,6 @@ static void refresh_board (void) | |||
1246 | rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, | 1221 | rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, |
1247 | BOARD_X + (x + 1) * BLOCK_WIDTH - 1, | 1222 | BOARD_X + (x + 1) * BLOCK_WIDTH - 1, |
1248 | BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); | 1223 | BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); |
1249 | #else /* HAVE_LCD_CHARCELLS */ | ||
1250 | pgfx_drawpixel (BOARD_X + x, BOARD_Y + y); | ||
1251 | #endif | 1224 | #endif |
1252 | } | 1225 | } |
1253 | 1226 | ||
@@ -1285,8 +1258,6 @@ static void refresh_board (void) | |||
1285 | rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, | 1258 | rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, |
1286 | BOARD_X + (x + 1) * BLOCK_WIDTH - 1, | 1259 | BOARD_X + (x + 1) * BLOCK_WIDTH - 1, |
1287 | BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); | 1260 | BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); |
1288 | #else /* HAVE_LCD_CHARCELLS */ | ||
1289 | pgfx_drawpixel (BOARD_X + x, BOARD_Y + y); | ||
1290 | #endif | 1261 | #endif |
1291 | } | 1262 | } |
1292 | 1263 | ||
@@ -1355,8 +1326,6 @@ static void draw_next_block (void) | |||
1355 | rb->lcd_hline (PREVIEW_X + rx * BLOCK_WIDTH + 1, | 1326 | rb->lcd_hline (PREVIEW_X + rx * BLOCK_WIDTH + 1, |
1356 | PREVIEW_X + (rx + 1) * BLOCK_WIDTH - 1, | 1327 | PREVIEW_X + (rx + 1) * BLOCK_WIDTH - 1, |
1357 | PREVIEW_Y + (ry + 1) * BLOCK_HEIGHT - 1); | 1328 | PREVIEW_Y + (ry + 1) * BLOCK_HEIGHT - 1); |
1358 | #else /* HAVE_LCD_CHARCELLS */ | ||
1359 | pgfx_drawpixel (PREVIEW_X + rx, PREVIEW_Y + ry); | ||
1360 | #endif | 1329 | #endif |
1361 | } | 1330 | } |
1362 | 1331 | ||
@@ -1787,9 +1756,6 @@ enum plugin_status plugin_start (const void *parameter) | |||
1787 | } | 1756 | } |
1788 | } | 1757 | } |
1789 | 1758 | ||
1790 | #ifndef HAVE_LCD_BITMAP | ||
1791 | pgfx_release(); | ||
1792 | #endif | ||
1793 | /* Save user's HighScore */ | 1759 | /* Save user's HighScore */ |
1794 | highscore_save(SCORE_FILE, highscores, NUM_SCORES); | 1760 | highscore_save(SCORE_FILE, highscores, NUM_SCORES); |
1795 | backlight_use_settings(); | 1761 | backlight_use_settings(); |
diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c index 74efb8ea00..f05d3c2a44 100644 --- a/apps/plugins/snow.c +++ b/apps/plugins/snow.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * | 19 | * |
20 | **************************************************************************/ | 20 | **************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "lib/playergfx.h" | ||
23 | #include "lib/mylcd.h" | 22 | #include "lib/mylcd.h" |
24 | #include "lib/pluginlib_actions.h" | 23 | #include "lib/pluginlib_actions.h" |
25 | 24 | ||
@@ -143,11 +142,6 @@ static void snow_init(void) | |||
143 | particles[i][0]=-1; | 142 | particles[i][0]=-1; |
144 | particles[i][1]=-1; | 143 | particles[i][1]=-1; |
145 | } | 144 | } |
146 | #ifdef HAVE_LCD_CHARCELLS | ||
147 | pgfx_display(0, 0); /* display three times */ | ||
148 | pgfx_display(4, 0); | ||
149 | pgfx_display(8, 0); | ||
150 | #endif | ||
151 | mylcd_clear_display(); | 145 | mylcd_clear_display(); |
152 | #ifdef HAVE_REMOTE_LCD | 146 | #ifdef HAVE_REMOTE_LCD |
153 | rb->lcd_remote_clear_display(); | 147 | rb->lcd_remote_clear_display(); |
@@ -159,13 +153,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
159 | int button; | 153 | int button; |
160 | (void)(parameter); | 154 | (void)(parameter); |
161 | 155 | ||
162 | #ifdef HAVE_LCD_CHARCELLS | ||
163 | if (!pgfx_init(4, 2)) | ||
164 | { | ||
165 | rb->splash(HZ*2, "Old LCD :("); | ||
166 | return PLUGIN_OK; | ||
167 | } | ||
168 | #endif | ||
169 | #ifdef HAVE_LCD_COLOR | 156 | #ifdef HAVE_LCD_COLOR |
170 | rb->lcd_clear_display(); | 157 | rb->lcd_clear_display(); |
171 | rb->lcd_set_foreground(LCD_WHITE); | 158 | rb->lcd_set_foreground(LCD_WHITE); |
@@ -186,17 +173,11 @@ enum plugin_status plugin_start(const void* parameter) | |||
186 | 173 | ||
187 | if ((button == SNOW_QUIT) || (button == SNOW_QUIT2)) | 174 | if ((button == SNOW_QUIT) || (button == SNOW_QUIT2)) |
188 | { | 175 | { |
189 | #ifdef HAVE_LCD_CHARCELLS | ||
190 | pgfx_release(); | ||
191 | #endif | ||
192 | return PLUGIN_OK; | 176 | return PLUGIN_OK; |
193 | } | 177 | } |
194 | else | 178 | else |
195 | if (rb->default_event_handler(button) == SYS_USB_CONNECTED) | 179 | if (rb->default_event_handler(button) == SYS_USB_CONNECTED) |
196 | { | 180 | { |
197 | #ifdef HAVE_LCD_CHARCELLS | ||
198 | pgfx_release(); | ||
199 | #endif | ||
200 | return PLUGIN_USB_CONNECTED; | 181 | return PLUGIN_USB_CONNECTED; |
201 | } | 182 | } |
202 | } | 183 | } |
diff --git a/apps/plugins/text_viewer/tv_display.c b/apps/plugins/text_viewer/tv_display.c index 1f8499bed2..d6175b79cf 100644 --- a/apps/plugins/text_viewer/tv_display.c +++ b/apps/plugins/text_viewer/tv_display.c | |||
@@ -69,11 +69,6 @@ | |||
69 | #define TV_SCROLLBAR_WIDTH rb->global_settings->scrollbar_width | 69 | #define TV_SCROLLBAR_WIDTH rb->global_settings->scrollbar_width |
70 | #define TV_SCROLLBAR_HEIGHT 4 | 70 | #define TV_SCROLLBAR_HEIGHT 4 |
71 | 71 | ||
72 | |||
73 | #ifndef HAVE_LCD_BITMAP | ||
74 | #define TV_BOOKMARK_ICON 0xe101 | ||
75 | #endif | ||
76 | |||
77 | struct tv_rect { | 72 | struct tv_rect { |
78 | int x; | 73 | int x; |
79 | int y; | 74 | int y; |
diff --git a/apps/screen_access.c b/apps/screen_access.c index a966d07876..cdb02a6546 100644 --- a/apps/screen_access.c +++ b/apps/screen_access.c | |||
@@ -237,15 +237,6 @@ struct screen screens[NB_SCREENS] = | |||
237 | .scroll_step=&lcd_scroll_step, | 237 | .scroll_step=&lcd_scroll_step, |
238 | #endif /* HAVE_LCD_BITMAP */ | 238 | #endif /* HAVE_LCD_BITMAP */ |
239 | 239 | ||
240 | #ifdef HAVE_LCD_CHARCELLS | ||
241 | .double_height=&lcd_double_height, | ||
242 | .putchar=&lcd_putc, | ||
243 | .get_locked_pattern=&lcd_get_locked_pattern, | ||
244 | .define_pattern=&lcd_define_pattern, | ||
245 | .unlock_pattern=&lcd_unlock_pattern, | ||
246 | .icon=&lcd_icon, | ||
247 | #endif /* HAVE_LCD_CHARCELLS */ | ||
248 | |||
249 | .putsxy=&lcd_putsxy, | 240 | .putsxy=&lcd_putsxy, |
250 | .puts=&lcd_puts, | 241 | .puts=&lcd_puts, |
251 | .putsf=&lcd_putsf, | 242 | .putsf=&lcd_putsf, |
@@ -333,13 +324,6 @@ struct screen screens[NB_SCREENS] = | |||
333 | .scroll_step=&lcd_remote_scroll_step, | 324 | .scroll_step=&lcd_remote_scroll_step, |
334 | #endif /* 1 */ | 325 | #endif /* 1 */ |
335 | 326 | ||
336 | #if 0 /* no charcell remote LCDs so far */ | ||
337 | .double_height=&lcd_remote_double_height, | ||
338 | .putc=&lcd_remote_putc, | ||
339 | .get_locked_pattern=&lcd_remote_get_locked_pattern, | ||
340 | .define_pattern=&lcd_remote_define_pattern, | ||
341 | .icon=&lcd_remote_icon, | ||
342 | #endif /* 0 */ | ||
343 | .putsxy=&lcd_remote_putsxy, | 327 | .putsxy=&lcd_remote_putsxy, |
344 | .puts=&lcd_remote_puts, | 328 | .puts=&lcd_remote_puts, |
345 | .putsf=&lcd_remote_putsf, | 329 | .putsf=&lcd_remote_putsf, |
diff --git a/apps/screen_access.h b/apps/screen_access.h index 6b90bc9313..eab84c9129 100644 --- a/apps/screen_access.h +++ b/apps/screen_access.h | |||
@@ -37,10 +37,6 @@ void screen_helper_setfont(int font); | |||
37 | 37 | ||
38 | #define FOR_NB_SCREENS(i) for(int i = 0; i < NB_SCREENS; i++) | 38 | #define FOR_NB_SCREENS(i) for(int i = 0; i < NB_SCREENS; i++) |
39 | 39 | ||
40 | #ifdef HAVE_LCD_CHARCELLS | ||
41 | #define MAX_LINES_ON_SCREEN 2 | ||
42 | #endif | ||
43 | |||
44 | typedef void screen_bitmap_part_func(const void *src, int src_x, int src_y, | 40 | typedef void screen_bitmap_part_func(const void *src, int src_x, int src_y, |
45 | int stride, int x, int y, int width, int height); | 41 | int stride, int x, int y, int width, int height); |
46 | typedef void screen_bitmap_func(const void *src, int x, int y, int width, | 42 | typedef void screen_bitmap_func(const void *src, int x, int y, int width, |
@@ -110,15 +106,6 @@ struct screen | |||
110 | void (*hline)(int x1, int x2, int y); | 106 | void (*hline)(int x1, int x2, int y); |
111 | #endif /* HAVE_LCD_BITMAP || HAVE_REMOTE_LCD */ | 107 | #endif /* HAVE_LCD_BITMAP || HAVE_REMOTE_LCD */ |
112 | 108 | ||
113 | #ifdef HAVE_LCD_CHARCELLS /* no charcell remote LCDs so far */ | ||
114 | void (*double_height)(bool on); | ||
115 | /* name it putchar, not putc because putc is a c library function */ | ||
116 | void (*putchar)(int x, int y, unsigned long ucs); | ||
117 | void (*icon)(int icon, bool enable); | ||
118 | unsigned long (*get_locked_pattern)(void); | ||
119 | void (*define_pattern)(unsigned long ucs, const char *pattern); | ||
120 | void (*unlock_pattern)(unsigned long ucs); | ||
121 | #endif | ||
122 | void (*putsxy)(int x, int y, const unsigned char *str); | 109 | void (*putsxy)(int x, int y, const unsigned char *str); |
123 | void (*puts)(int x, int y, const unsigned char *str); | 110 | void (*puts)(int x, int y, const unsigned char *str); |
124 | void (*putsf)(int x, int y, const unsigned char *str, ...); | 111 | void (*putsf)(int x, int y, const unsigned char *str, ...); |
diff --git a/apps/screens.c b/apps/screens.c index 52e8cadc7e..ecd406037d 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -763,11 +763,7 @@ int view_runtime(void) | |||
763 | struct gui_synclist lists; | 763 | struct gui_synclist lists; |
764 | int action; | 764 | int action; |
765 | gui_synclist_init(&lists, runtime_get_data, NULL, false, 2, NULL); | 765 | gui_synclist_init(&lists, runtime_get_data, NULL, false, 2, NULL); |
766 | #if !defined(HAVE_LCD_CHARCELLS) | ||
767 | gui_synclist_set_title(&lists, str(LANG_RUNNING_TIME), NOICON); | 766 | gui_synclist_set_title(&lists, str(LANG_RUNNING_TIME), NOICON); |
768 | #else | ||
769 | gui_synclist_set_title(&lists, NULL, NOICON); | ||
770 | #endif | ||
771 | if(global_settings.talk_menu) | 767 | if(global_settings.talk_menu) |
772 | gui_synclist_set_voice_callback(&lists, runtime_speak_data); | 768 | gui_synclist_set_voice_callback(&lists, runtime_speak_data); |
773 | gui_synclist_set_icon_callback(&lists, NULL); | 769 | gui_synclist_set_icon_callback(&lists, NULL); |
diff --git a/apps/status.c b/apps/status.c index 485ca0aa34..57f2984402 100644 --- a/apps/status.c +++ b/apps/status.c | |||
@@ -79,31 +79,3 @@ int current_playmode(void) | |||
79 | 79 | ||
80 | return STATUS_STOP; | 80 | return STATUS_STOP; |
81 | } | 81 | } |
82 | |||
83 | #if defined(HAVE_LCD_CHARCELLS) | ||
84 | bool record = false; | ||
85 | bool audio = false; | ||
86 | bool param = false; | ||
87 | bool usb = false; | ||
88 | |||
89 | void status_set_record(bool b) | ||
90 | { | ||
91 | record = b; | ||
92 | } | ||
93 | |||
94 | void status_set_audio(bool b) | ||
95 | { | ||
96 | audio = b; | ||
97 | } | ||
98 | |||
99 | void status_set_param(bool b) | ||
100 | { | ||
101 | param = b; | ||
102 | } | ||
103 | |||
104 | void status_set_usb(bool b) | ||
105 | { | ||
106 | usb = b; | ||
107 | } | ||
108 | |||
109 | #endif /* HAVE_LCD_CHARCELLS */ | ||
diff --git a/apps/status.h b/apps/status.h index c8ec7bb354..1add203a0c 100644 --- a/apps/status.h +++ b/apps/status.h | |||
@@ -21,13 +21,6 @@ | |||
21 | #ifndef _STATUS_H | 21 | #ifndef _STATUS_H |
22 | #define _STATUS_H | 22 | #define _STATUS_H |
23 | 23 | ||
24 | #if defined(HAVE_LCD_CHARCELLS) | ||
25 | extern bool record; | ||
26 | extern bool audio; | ||
27 | extern bool param; | ||
28 | extern bool usb; | ||
29 | #endif | ||
30 | |||
31 | enum playmode | 24 | enum playmode |
32 | { | 25 | { |
33 | STATUS_PLAY, | 26 | STATUS_PLAY, |
@@ -48,11 +41,5 @@ int current_playmode(void); | |||
48 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) | 41 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
49 | #include <time.h> | 42 | #include <time.h> |
50 | #endif | 43 | #endif |
51 | #ifdef HAVE_LCD_CHARCELLS | ||
52 | void status_set_record(bool b); | ||
53 | void status_set_audio(bool b); | ||
54 | void status_set_param(bool b); | ||
55 | void status_set_usb(bool b); | ||
56 | #endif /* HAVE_LCD_CHARCELLS */ | ||
57 | 44 | ||
58 | #endif /* _STATUS_H */ | 45 | #endif /* _STATUS_H */ |
diff --git a/apps/tree.c b/apps/tree.c index 9b6ce06af0..fb0d0a3ac5 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -299,10 +299,6 @@ void tree_gui_init(void) | |||
299 | 299 | ||
300 | strcpy(tc.currdir, "/"); | 300 | strcpy(tc.currdir, "/"); |
301 | 301 | ||
302 | #ifdef HAVE_LCD_CHARCELLS | ||
303 | FOR_NB_SCREENS(i) | ||
304 | screens[i].double_height(false); | ||
305 | #endif | ||
306 | gui_synclist_init(&tree_lists, &tree_get_filename, &tc, false, 1, NULL); | 302 | gui_synclist_init(&tree_lists, &tree_get_filename, &tc, false, 1, NULL); |
307 | gui_synclist_set_voice_callback(&tree_lists, tree_voice_cb); | 303 | gui_synclist_set_voice_callback(&tree_lists, tree_voice_cb); |
308 | gui_synclist_set_icon_callback(&tree_lists, | 304 | gui_synclist_set_icon_callback(&tree_lists, |
@@ -710,14 +706,12 @@ static int dirbrowse(void) | |||
710 | if ((*tc.dirfilter == SHOW_ID3DB && tc.dirlevel == 0) || | 706 | if ((*tc.dirfilter == SHOW_ID3DB && tc.dirlevel == 0) || |
711 | ((*tc.dirfilter != SHOW_ID3DB && !strcmp(currdir,"/")))) | 707 | ((*tc.dirfilter != SHOW_ID3DB && !strcmp(currdir,"/")))) |
712 | { | 708 | { |
713 | #ifdef HAVE_LCD_BITMAP /* charcell doesnt have ACTION_TREE_PGLEFT so this isnt needed */ | ||
714 | if (oldbutton == ACTION_TREE_PGLEFT) | 709 | if (oldbutton == ACTION_TREE_PGLEFT) |
715 | break; | 710 | break; |
716 | else | 711 | else |
717 | #endif | ||
718 | return GO_TO_ROOT; | 712 | return GO_TO_ROOT; |
719 | } | 713 | } |
720 | 714 | ||
721 | #ifdef HAVE_TAGCACHE | 715 | #ifdef HAVE_TAGCACHE |
722 | if (id3db) | 716 | if (id3db) |
723 | tagtree_exit(&tc); | 717 | tagtree_exit(&tc); |