diff options
author | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-02-15 22:17:01 +0000 |
---|---|---|
committer | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-02-15 22:17:01 +0000 |
commit | 7ba8aec5af73d7ff4ce4d9a788d6a5911c621e88 (patch) | |
tree | 934b0132d2729b3fb40f74f4774d0ae8d8bc66bb | |
parent | 375b7e0f85a1cfee58e6d359d83df6f3e9e44cb5 (diff) | |
download | rockbox-7ba8aec5af73d7ff4ce4d9a788d6a5911c621e88.tar.gz rockbox-7ba8aec5af73d7ff4ce4d9a788d6a5911c621e88.zip |
* Add support for an optional y coordinate to the progressbar (from FS #4783).
* Modify the 'Rockboxed' WPS to make use of this new coordinate. It improves the display of
cuesheet/A-B markers a lot and cleans the bitmaps up a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12321 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/gui/gwps-common.c | 61 | ||||
-rw-r--r-- | apps/gui/gwps.h | 1 | ||||
-rw-r--r-- | wps/Rockboxed.128x128x16.wps | 2 | ||||
-rw-r--r-- | wps/Rockboxed.160x128x16.wps | 2 | ||||
-rw-r--r-- | wps/Rockboxed.176x132x16.wps | 2 | ||||
-rw-r--r-- | wps/Rockboxed.176x220x16.wps | 2 | ||||
-rw-r--r-- | wps/Rockboxed.220x176x16.wps | 2 | ||||
-rw-r--r-- | wps/Rockboxed.240x320x16.wps | 2 | ||||
-rw-r--r-- | wps/Rockboxed.320x240x16.wps | 2 | ||||
-rw-r--r-- | wps/Rockboxed/pg-108.bmp | bin | 3294 -> 1674 bytes | |||
-rw-r--r-- | wps/Rockboxed/pg-140.bmp | bin | 4254 -> 2154 bytes | |||
-rw-r--r-- | wps/Rockboxed/pg-220.bmp | bin | 9954 -> 3354 bytes |
12 files changed, 44 insertions, 32 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index b6e64d2fcc..2037ad57a5 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c | |||
@@ -620,30 +620,37 @@ static char* get_tag(struct wps_data* wps_data, | |||
620 | wps_data->full_line_progressbar=0; | 620 | wps_data->full_line_progressbar=0; |
621 | return buf; | 621 | return buf; |
622 | #else | 622 | #else |
623 | char *p=strchr(tag, '|'); | 623 | /* default values : */ |
624 | if (p) { | 624 | wps_data->progress_top = -1; |
625 | wps_data->progress_height=atoi(++p); | 625 | wps_data->progress_height = 6; |
626 | p=strchr(p, '|'); | 626 | wps_data->progress_start = 0; |
627 | if (p) { | 627 | wps_data->progress_end = 0; |
628 | wps_data->progress_start=atoi(++p); | 628 | |
629 | p=strchr(p, '|'); | 629 | char *prev=strchr(tag, '|'); |
630 | if (p) | 630 | if (prev) { |
631 | wps_data->progress_end=atoi(++p); | 631 | char *p=strchr(prev+1, '|'); |
632 | else | 632 | if (p) { |
633 | wps_data->progress_height=atoi(++prev); | ||
634 | prev=strchr(prev, '|'); | ||
635 | p=strchr(++p, '|'); | ||
636 | if (p) { | ||
637 | wps_data->progress_start=atoi(++prev); | ||
638 | prev=strchr(prev, '|'); | ||
639 | p=strchr(++p, '|'); | ||
640 | if (p) { | ||
641 | wps_data->progress_end=atoi(++prev); | ||
642 | prev=strchr(prev, '|'); | ||
643 | p=strchr(++p, '|'); | ||
644 | if(p) | ||
645 | wps_data->progress_top = atoi(++prev); | ||
646 | } | ||
647 | |||
648 | if (wps_data->progress_height<3) | ||
649 | wps_data->progress_height=3; | ||
650 | if (wps_data->progress_end<wps_data->progress_start+3) | ||
633 | wps_data->progress_end=0; | 651 | wps_data->progress_end=0; |
634 | }else { | 652 | } |
635 | wps_data->progress_start=0; | 653 | } |
636 | wps_data->progress_end=0; | ||
637 | } | ||
638 | |||
639 | if (wps_data->progress_height<3) | ||
640 | wps_data->progress_height=3; | ||
641 | if (wps_data->progress_end<wps_data->progress_start+3) | ||
642 | wps_data->progress_end=0; | ||
643 | }else { | ||
644 | wps_data->progress_height=6; | ||
645 | wps_data->progress_start=0; | ||
646 | wps_data->progress_end=0; | ||
647 | } | 654 | } |
648 | return "\x01"; | 655 | return "\x01"; |
649 | #endif | 656 | #endif |
@@ -1824,8 +1831,12 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, | |||
1824 | /* progress */ | 1831 | /* progress */ |
1825 | if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS) | 1832 | if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS) |
1826 | { | 1833 | { |
1827 | int sb_y = i*h + offset + ((h > data->progress_height + 1) | 1834 | int sb_y; |
1828 | ? (h - data->progress_height) / 2 : 1); | 1835 | if (data->progress_top == -1) |
1836 | sb_y = i*h + offset + ((h > data->progress_height + 1) | ||
1837 | ? (h - data->progress_height) / 2 : 1); | ||
1838 | else | ||
1839 | sb_y = data->progress_top; | ||
1829 | 1840 | ||
1830 | if (!data->progress_end) | 1841 | if (!data->progress_end) |
1831 | data->progress_end=display->width; | 1842 | data->progress_end=display->width; |
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h index ff4e128d4e..e19bffc0b1 100644 --- a/apps/gui/gwps.h +++ b/apps/gui/gwps.h | |||
@@ -103,6 +103,7 @@ struct wps_data | |||
103 | unsigned short time_mult[WPS_MAX_LINES][WPS_MAX_SUBLINES]; | 103 | unsigned short time_mult[WPS_MAX_LINES][WPS_MAX_SUBLINES]; |
104 | long subline_expire_time[WPS_MAX_LINES]; | 104 | long subline_expire_time[WPS_MAX_LINES]; |
105 | int curr_subline[WPS_MAX_LINES]; | 105 | int curr_subline[WPS_MAX_LINES]; |
106 | int progress_top; | ||
106 | int progress_height; | 107 | int progress_height; |
107 | int progress_start; | 108 | int progress_start; |
108 | int progress_end; | 109 | int progress_end; |
diff --git a/wps/Rockboxed.128x128x16.wps b/wps/Rockboxed.128x128x16.wps index 6e9c5ed31d..6373660af9 100644 --- a/wps/Rockboxed.128x128x16.wps +++ b/wps/Rockboxed.128x128x16.wps | |||
@@ -43,7 +43,7 @@ | |||
43 | %al %s%ac%?it<%it|%fn>%ar | 43 | %al %s%ac%?it<%it|%fn>%ar |
44 | 44 | ||
45 | %ac%t3%ig;%t%iy | 45 | %ac%t3%ig;%t%iy |
46 | %pb|10|10|108| | 46 | %pb|5|10|108|76| |
47 | %al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt | 47 | %al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt |
48 | %?ps<%xdb> | 48 | %?ps<%xdb> |
49 | %?mp<%xdq|%xdp|%xdq|%xdf|%xdr> | 49 | %?mp<%xdq|%xdp|%xdq|%xdf|%xdr> |
diff --git a/wps/Rockboxed.160x128x16.wps b/wps/Rockboxed.160x128x16.wps index 40a0a46bcb..3e957de842 100644 --- a/wps/Rockboxed.160x128x16.wps +++ b/wps/Rockboxed.160x128x16.wps | |||
@@ -43,7 +43,7 @@ | |||
43 | %al %s%ac%?it<%it|Title?>%ar | 43 | %al %s%ac%?it<%it|Title?>%ar |
44 | 44 | ||
45 | %ac%t3%ig;%t%iy | 45 | %ac%t3%ig;%t%iy |
46 | %pb|10|10|140| | 46 | %pb|5|10|140|76| |
47 | %al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt | 47 | %al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt |
48 | %?ps<%xdb> | 48 | %?ps<%xdb> |
49 | %?mp<%xdq|%xdp|%xdq|%xdf|%xdr> | 49 | %?mp<%xdq|%xdp|%xdq|%xdf|%xdr> |
diff --git a/wps/Rockboxed.176x132x16.wps b/wps/Rockboxed.176x132x16.wps index 0ad9727f97..6f43810b2f 100644 --- a/wps/Rockboxed.176x132x16.wps +++ b/wps/Rockboxed.176x132x16.wps | |||
@@ -46,7 +46,7 @@ | |||
46 | %al %s%ac%?it<%it|%fn>%ar | 46 | %al %s%ac%?it<%it|%fn>%ar |
47 | 47 | ||
48 | %ac%t3%ig;%t%iy | 48 | %ac%t3%ig;%t%iy |
49 | %pb|5|10|156| | 49 | %pb|5|10|156|75| |
50 | %al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt | 50 | %al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt |
51 | %?ps<%xdb> | 51 | %?ps<%xdb> |
52 | %?mp<%xdq|%xdp|%xdq|%xdf|%xdr> | 52 | %?mp<%xdq|%xdp|%xdq|%xdf|%xdr> |
diff --git a/wps/Rockboxed.176x220x16.wps b/wps/Rockboxed.176x220x16.wps index e5b4c21127..6866f9a0cf 100644 --- a/wps/Rockboxed.176x220x16.wps +++ b/wps/Rockboxed.176x220x16.wps | |||
@@ -54,7 +54,7 @@ | |||
54 | 54 | ||
55 | 55 | ||
56 | 56 | ||
57 | %pb|5|10|156| | 57 | %pb|5|10|156|171| |
58 | %al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt | 58 | %al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt |
59 | %?ps<%xdb> | 59 | %?ps<%xdb> |
60 | %?mp<%xdq|%xdp|%xdq|%xdf|%xdr> | 60 | %?mp<%xdq|%xdp|%xdq|%xdf|%xdr> |
diff --git a/wps/Rockboxed.220x176x16.wps b/wps/Rockboxed.220x176x16.wps index 16e08ddd01..947c4f7857 100644 --- a/wps/Rockboxed.220x176x16.wps +++ b/wps/Rockboxed.220x176x16.wps | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | %ac%t3%ig;%t%iy | 49 | %ac%t3%ig;%t%iy |
50 | 50 | ||
51 | %pb|5|28|191| | 51 | %pb|5|28|191|122| |
52 | %al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt | 52 | %al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt |
53 | %?ps<%xdb> | 53 | %?ps<%xdb> |
54 | %?mp<%xdq|%xdp|%xdq|%xdf|%xdr> | 54 | %?mp<%xdq|%xdp|%xdq|%xdf|%xdr> |
diff --git a/wps/Rockboxed.240x320x16.wps b/wps/Rockboxed.240x320x16.wps index 98b5ff99b6..75d5283b36 100644 --- a/wps/Rockboxed.240x320x16.wps +++ b/wps/Rockboxed.240x320x16.wps | |||
@@ -52,7 +52,7 @@ | |||
52 | 52 | ||
53 | %ac%t3%ig;%t%iy | 53 | %ac%t3%ig;%t%iy |
54 | 54 | ||
55 | %pb|15|10|220| | 55 | %pb|5|10|220|256| |
56 | %al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt | 56 | %al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt |
57 | %?ps<%xdb> | 57 | %?ps<%xdb> |
58 | %?mp<%xdq|%xdp|%xdq|%xdf|%xdr> | 58 | %?mp<%xdq|%xdp|%xdq|%xdf|%xdr> |
diff --git a/wps/Rockboxed.320x240x16.wps b/wps/Rockboxed.320x240x16.wps index c0221d745f..3060b658c0 100644 --- a/wps/Rockboxed.320x240x16.wps +++ b/wps/Rockboxed.320x240x16.wps | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | 49 | ||
50 | %ac%t3%ig;%t%iy | 50 | %ac%t3%ig;%t%iy |
51 | %pb|5|10|300| | 51 | %pb|5|10|300|178| |
52 | %al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt | 52 | %al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt |
53 | %?ps<%xdb> | 53 | %?ps<%xdb> |
54 | %?mp<%xdq|%xdp|%xdq|%xdf|%xdr> | 54 | %?mp<%xdq|%xdp|%xdq|%xdf|%xdr> |
diff --git a/wps/Rockboxed/pg-108.bmp b/wps/Rockboxed/pg-108.bmp index 7f7c826357..72b22ca3a9 100644 --- a/wps/Rockboxed/pg-108.bmp +++ b/wps/Rockboxed/pg-108.bmp | |||
Binary files differ | |||
diff --git a/wps/Rockboxed/pg-140.bmp b/wps/Rockboxed/pg-140.bmp index ef309029f7..2f93e8ad4a 100644 --- a/wps/Rockboxed/pg-140.bmp +++ b/wps/Rockboxed/pg-140.bmp | |||
Binary files differ | |||
diff --git a/wps/Rockboxed/pg-220.bmp b/wps/Rockboxed/pg-220.bmp index ae2860b249..26c41ccf90 100644 --- a/wps/Rockboxed/pg-220.bmp +++ b/wps/Rockboxed/pg-220.bmp | |||
Binary files differ | |||