forked from len0rd/rockbox
Adapted player code for new Rocklatin character set.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3051 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b8342ff072
commit
c11b90fa49
5 changed files with 23 additions and 23 deletions
|
|
@ -81,8 +81,7 @@ struct menu {
|
||||||
|
|
||||||
#endif /* HAVE_LCD_BITMAP */
|
#endif /* HAVE_LCD_BITMAP */
|
||||||
|
|
||||||
#define NEW_CURSOR_CHAR 0x7e
|
#define CURSOR_CHAR 0x92
|
||||||
#define OLD_CURSOR_CHAR 0x89
|
|
||||||
|
|
||||||
static struct menu menus[MAX_MENUS];
|
static struct menu menus[MAX_MENUS];
|
||||||
static bool inuse[MAX_MENUS] = { false };
|
static bool inuse[MAX_MENUS] = { false };
|
||||||
|
|
@ -106,7 +105,7 @@ void put_cursorxy(int x, int y, bool on)
|
||||||
lcd_bitmap ( bitmap_icons_6x8[Cursor],
|
lcd_bitmap ( bitmap_icons_6x8[Cursor],
|
||||||
xpos, ypos, 4, 8, true);
|
xpos, ypos, 4, 8, true);
|
||||||
#else
|
#else
|
||||||
lcd_putc(x, y, has_new_lcd()?NEW_CURSOR_CHAR:OLD_CURSOR_CHAR);
|
lcd_putc(x, y, CURSOR_CHAR);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
|
|
@ -21,17 +21,4 @@
|
||||||
|
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
|
|
||||||
char tree_icons_5x7[LastTreeIcon][8] =
|
|
||||||
{
|
|
||||||
{ 0x06, 0x09, 0x09, 0x02, 0x02, 0x00, 0x02, 0x00 }, /* Unknown */
|
|
||||||
{ 0x07, 0x04, 0x07, 0x04, 0x1c, 0x1c, 0x08, 0x00 }, /* File */
|
|
||||||
{ 0x0c, 0x13, 0x11, 0x11, 0x11, 0x11, 0x1f, 0x00 }, /* Folder */
|
|
||||||
{ 0x17, 0x00, 0x17, 0x00, 0x17, 0x00, 0x17, 0x00 }, /* Playlist */
|
|
||||||
{ 0x01, 0x01, 0x02, 0x02, 0x14, 0x0c, 0x04, 0x00 }, /* WPS */
|
|
||||||
{ 0x1f, 0x11, 0x1b, 0x15, 0x1b, 0x11, 0x1f, 0x00 }, /* MOD/AJZ */
|
|
||||||
{ 0x00, 0x1f, 0x15, 0x1f, 0x15, 0x1f, 0x00, 0x00 }, /* Language */
|
|
||||||
{ 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00 }, /* Text file */
|
|
||||||
{ 0x0b, 0x10, 0x0b, 0x00, 0x1f, 0x00, 0x1f, 0x00 }, /* Config file */
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,8 @@
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
Unknown, File, Folder, Playlist, Wps, Mod_Ajz, Language, Text, Config,
|
Unknown=0x90,
|
||||||
LastTreeIcon
|
Folder=0x18, Mod_Ajz, Language, File, Wps, Playlist, Text, Config
|
||||||
};
|
};
|
||||||
|
|
||||||
extern char tree_icons_5x7[LastTreeIcon][8];
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -411,7 +411,11 @@ static int showdir(char *path, int start)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
|
#ifdef HAVE_LCD_BITMAP
|
||||||
icon_type = 0;
|
icon_type = 0;
|
||||||
|
#else
|
||||||
|
icon_type = Unknown;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (icon_type) {
|
if (icon_type) {
|
||||||
|
|
@ -424,8 +428,7 @@ static int showdir(char *path, int start)
|
||||||
MARGIN_Y+(i-start)*line_height + offset,
|
MARGIN_Y+(i-start)*line_height + offset,
|
||||||
6, 8, true);
|
6, 8, true);
|
||||||
#else
|
#else
|
||||||
lcd_define_pattern((i-start)*8,tree_icons_5x7[icon_type],8);
|
lcd_putc(LINE_X-1, i-start, icon_type);
|
||||||
lcd_putc(LINE_X-1, i-start, i-start);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,10 @@
|
||||||
|
|
||||||
#define FORMAT_BUFFER_SIZE 300
|
#define FORMAT_BUFFER_SIZE 300
|
||||||
|
|
||||||
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
|
unsigned char wps_progress_pat=0;
|
||||||
|
#endif
|
||||||
|
|
||||||
static char format_buffer[FORMAT_BUFFER_SIZE];
|
static char format_buffer[FORMAT_BUFFER_SIZE];
|
||||||
static char* format_lines[MAX_LINES];
|
static char* format_lines[MAX_LINES];
|
||||||
static unsigned char line_type[MAX_LINES];
|
static unsigned char line_type[MAX_LINES];
|
||||||
|
|
@ -369,7 +373,12 @@ static char* get_tag(struct mp3entry* id3,
|
||||||
{
|
{
|
||||||
case 'b': /* progress bar */
|
case 'b': /* progress bar */
|
||||||
*flags |= WPS_REFRESH_PLAYER_PROGRESS;
|
*flags |= WPS_REFRESH_PLAYER_PROGRESS;
|
||||||
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
|
snprintf(buf, buf_size, "%c", wps_progress_pat);
|
||||||
|
return buf;
|
||||||
|
#else
|
||||||
return "\x01";
|
return "\x01";
|
||||||
|
#endif
|
||||||
|
|
||||||
case 'p': /* Playlist Position */
|
case 'p': /* Playlist Position */
|
||||||
*flags |= WPS_REFRESH_STATIC;
|
*flags |= WPS_REFRESH_STATIC;
|
||||||
|
|
@ -767,8 +776,12 @@ bool draw_player_progress(struct mp3entry* id3, int ff_rewwind_count)
|
||||||
if (!id3)
|
if (!id3)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (wps_progress_pat==0)
|
||||||
|
wps_progress_pat=lcd_get_locked_pattern();
|
||||||
|
|
||||||
memset(binline, 1, sizeof binline);
|
memset(binline, 1, sizeof binline);
|
||||||
memset(player_progressbar, 1, sizeof player_progressbar);
|
memset(player_progressbar, 1, sizeof player_progressbar);
|
||||||
|
|
||||||
if(id3->elapsed >= id3->length)
|
if(id3->elapsed >= id3->length)
|
||||||
songpos = 0;
|
songpos = 0;
|
||||||
else
|
else
|
||||||
|
|
@ -787,7 +800,7 @@ bool draw_player_progress(struct mp3entry* id3, int ff_rewwind_count)
|
||||||
player_progressbar[i] += binline[i*5+j];
|
player_progressbar[i] += binline[i*5+j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lcd_define_pattern(8,player_progressbar,7);
|
lcd_define_pattern(wps_progress_pat, player_progressbar);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue