diff options
author | Kjell Ericson <kjell@haxx.se> | 2003-01-10 09:55:50 +0000 |
---|---|---|
committer | Kjell Ericson <kjell@haxx.se> | 2003-01-10 09:55:50 +0000 |
commit | c11b90fa49b09da7d50e728095dc8075069e3137 (patch) | |
tree | d6dd1adc3bb7dedc90a38296f8b6b6be5eeaed9c | |
parent | b8342ff072da62f6152dc7e62c00c550533dd39f (diff) | |
download | rockbox-c11b90fa49b09da7d50e728095dc8075069e3137.tar.gz rockbox-c11b90fa49b09da7d50e728095dc8075069e3137.zip |
Adapted player code for new Rocklatin character set.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3051 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/menu.c | 5 | ||||
-rw-r--r-- | apps/player/icons.c | 13 | ||||
-rw-r--r-- | apps/player/icons.h | 6 | ||||
-rw-r--r-- | apps/tree.c | 7 | ||||
-rw-r--r-- | apps/wps-display.c | 15 |
5 files changed, 23 insertions, 23 deletions
diff --git a/apps/menu.c b/apps/menu.c index e271254412..2a1b595724 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -81,8 +81,7 @@ struct menu { | |||
81 | 81 | ||
82 | #endif /* HAVE_LCD_BITMAP */ | 82 | #endif /* HAVE_LCD_BITMAP */ |
83 | 83 | ||
84 | #define NEW_CURSOR_CHAR 0x7e | 84 | #define CURSOR_CHAR 0x92 |
85 | #define OLD_CURSOR_CHAR 0x89 | ||
86 | 85 | ||
87 | static struct menu menus[MAX_MENUS]; | 86 | static struct menu menus[MAX_MENUS]; |
88 | static bool inuse[MAX_MENUS] = { false }; | 87 | static bool inuse[MAX_MENUS] = { false }; |
@@ -106,7 +105,7 @@ void put_cursorxy(int x, int y, bool on) | |||
106 | lcd_bitmap ( bitmap_icons_6x8[Cursor], | 105 | lcd_bitmap ( bitmap_icons_6x8[Cursor], |
107 | xpos, ypos, 4, 8, true); | 106 | xpos, ypos, 4, 8, true); |
108 | #else | 107 | #else |
109 | lcd_putc(x, y, has_new_lcd()?NEW_CURSOR_CHAR:OLD_CURSOR_CHAR); | 108 | lcd_putc(x, y, CURSOR_CHAR); |
110 | #endif | 109 | #endif |
111 | } | 110 | } |
112 | else { | 111 | else { |
diff --git a/apps/player/icons.c b/apps/player/icons.c index 15f92bc0b0..3f9b7c1547 100644 --- a/apps/player/icons.c +++ b/apps/player/icons.c | |||
@@ -21,17 +21,4 @@ | |||
21 | 21 | ||
22 | #ifdef HAVE_LCD_CHARCELLS | 22 | #ifdef HAVE_LCD_CHARCELLS |
23 | 23 | ||
24 | char tree_icons_5x7[LastTreeIcon][8] = | ||
25 | { | ||
26 | { 0x06, 0x09, 0x09, 0x02, 0x02, 0x00, 0x02, 0x00 }, /* Unknown */ | ||
27 | { 0x07, 0x04, 0x07, 0x04, 0x1c, 0x1c, 0x08, 0x00 }, /* File */ | ||
28 | { 0x0c, 0x13, 0x11, 0x11, 0x11, 0x11, 0x1f, 0x00 }, /* Folder */ | ||
29 | { 0x17, 0x00, 0x17, 0x00, 0x17, 0x00, 0x17, 0x00 }, /* Playlist */ | ||
30 | { 0x01, 0x01, 0x02, 0x02, 0x14, 0x0c, 0x04, 0x00 }, /* WPS */ | ||
31 | { 0x1f, 0x11, 0x1b, 0x15, 0x1b, 0x11, 0x1f, 0x00 }, /* MOD/AJZ */ | ||
32 | { 0x00, 0x1f, 0x15, 0x1f, 0x15, 0x1f, 0x00, 0x00 }, /* Language */ | ||
33 | { 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00 }, /* Text file */ | ||
34 | { 0x0b, 0x10, 0x0b, 0x00, 0x1f, 0x00, 0x1f, 0x00 }, /* Config file */ | ||
35 | }; | ||
36 | |||
37 | #endif | 24 | #endif |
diff --git a/apps/player/icons.h b/apps/player/icons.h index 02293d36fb..1c9c68d66c 100644 --- a/apps/player/icons.h +++ b/apps/player/icons.h | |||
@@ -25,10 +25,8 @@ | |||
25 | #ifdef HAVE_LCD_CHARCELLS | 25 | #ifdef HAVE_LCD_CHARCELLS |
26 | 26 | ||
27 | enum { | 27 | enum { |
28 | Unknown, File, Folder, Playlist, Wps, Mod_Ajz, Language, Text, Config, | 28 | Unknown=0x90, |
29 | LastTreeIcon | 29 | Folder=0x18, Mod_Ajz, Language, File, Wps, Playlist, Text, Config |
30 | }; | 30 | }; |
31 | 31 | ||
32 | extern char tree_icons_5x7[LastTreeIcon][8]; | ||
33 | |||
34 | #endif | 32 | #endif |
diff --git a/apps/tree.c b/apps/tree.c index 37a791c13c..3f666ebfc3 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -411,7 +411,11 @@ static int showdir(char *path, int start) | |||
411 | break; | 411 | break; |
412 | #endif | 412 | #endif |
413 | default: | 413 | default: |
414 | #ifdef HAVE_LCD_BITMAP | ||
414 | icon_type = 0; | 415 | icon_type = 0; |
416 | #else | ||
417 | icon_type = Unknown; | ||
418 | #endif | ||
415 | } | 419 | } |
416 | 420 | ||
417 | if (icon_type) { | 421 | if (icon_type) { |
@@ -424,8 +428,7 @@ static int showdir(char *path, int start) | |||
424 | MARGIN_Y+(i-start)*line_height + offset, | 428 | MARGIN_Y+(i-start)*line_height + offset, |
425 | 6, 8, true); | 429 | 6, 8, true); |
426 | #else | 430 | #else |
427 | lcd_define_pattern((i-start)*8,tree_icons_5x7[icon_type],8); | 431 | lcd_putc(LINE_X-1, i-start, icon_type); |
428 | lcd_putc(LINE_X-1, i-start, i-start); | ||
429 | #endif | 432 | #endif |
430 | } | 433 | } |
431 | 434 | ||
diff --git a/apps/wps-display.c b/apps/wps-display.c index 5ac2aa1f2b..4aca14375d 100644 --- a/apps/wps-display.c +++ b/apps/wps-display.c | |||
@@ -57,6 +57,10 @@ | |||
57 | 57 | ||
58 | #define FORMAT_BUFFER_SIZE 300 | 58 | #define FORMAT_BUFFER_SIZE 300 |
59 | 59 | ||
60 | #ifdef HAVE_LCD_CHARCELLS | ||
61 | unsigned char wps_progress_pat=0; | ||
62 | #endif | ||
63 | |||
60 | static char format_buffer[FORMAT_BUFFER_SIZE]; | 64 | static char format_buffer[FORMAT_BUFFER_SIZE]; |
61 | static char* format_lines[MAX_LINES]; | 65 | static char* format_lines[MAX_LINES]; |
62 | static unsigned char line_type[MAX_LINES]; | 66 | static unsigned char line_type[MAX_LINES]; |
@@ -369,7 +373,12 @@ static char* get_tag(struct mp3entry* id3, | |||
369 | { | 373 | { |
370 | case 'b': /* progress bar */ | 374 | case 'b': /* progress bar */ |
371 | *flags |= WPS_REFRESH_PLAYER_PROGRESS; | 375 | *flags |= WPS_REFRESH_PLAYER_PROGRESS; |
376 | #ifdef HAVE_LCD_CHARCELLS | ||
377 | snprintf(buf, buf_size, "%c", wps_progress_pat); | ||
378 | return buf; | ||
379 | #else | ||
372 | return "\x01"; | 380 | return "\x01"; |
381 | #endif | ||
373 | 382 | ||
374 | case 'p': /* Playlist Position */ | 383 | case 'p': /* Playlist Position */ |
375 | *flags |= WPS_REFRESH_STATIC; | 384 | *flags |= WPS_REFRESH_STATIC; |
@@ -767,8 +776,12 @@ bool draw_player_progress(struct mp3entry* id3, int ff_rewwind_count) | |||
767 | if (!id3) | 776 | if (!id3) |
768 | return false; | 777 | return false; |
769 | 778 | ||
779 | if (wps_progress_pat==0) | ||
780 | wps_progress_pat=lcd_get_locked_pattern(); | ||
781 | |||
770 | memset(binline, 1, sizeof binline); | 782 | memset(binline, 1, sizeof binline); |
771 | memset(player_progressbar, 1, sizeof player_progressbar); | 783 | memset(player_progressbar, 1, sizeof player_progressbar); |
784 | |||
772 | if(id3->elapsed >= id3->length) | 785 | if(id3->elapsed >= id3->length) |
773 | songpos = 0; | 786 | songpos = 0; |
774 | else | 787 | else |
@@ -787,7 +800,7 @@ bool draw_player_progress(struct mp3entry* id3, int ff_rewwind_count) | |||
787 | player_progressbar[i] += binline[i*5+j]; | 800 | player_progressbar[i] += binline[i*5+j]; |
788 | } | 801 | } |
789 | } | 802 | } |
790 | lcd_define_pattern(8,player_progressbar,7); | 803 | lcd_define_pattern(wps_progress_pat, player_progressbar); |
791 | return true; | 804 | return true; |
792 | } | 805 | } |
793 | #endif | 806 | #endif |