summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-02-15 22:17:01 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-02-15 22:17:01 +0000
commit7ba8aec5af73d7ff4ce4d9a788d6a5911c621e88 (patch)
tree934b0132d2729b3fb40f74f4774d0ae8d8bc66bb
parent375b7e0f85a1cfee58e6d359d83df6f3e9e44cb5 (diff)
downloadrockbox-7ba8aec5af73d7ff4ce4d9a788d6a5911c621e88.tar.gz
rockbox-7ba8aec5af73d7ff4ce4d9a788d6a5911c621e88.tar.bz2
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.c61
-rw-r--r--apps/gui/gwps.h1
-rw-r--r--wps/Rockboxed.128x128x16.wps2
-rw-r--r--wps/Rockboxed.160x128x16.wps2
-rw-r--r--wps/Rockboxed.176x132x16.wps2
-rw-r--r--wps/Rockboxed.176x220x16.wps2
-rw-r--r--wps/Rockboxed.220x176x16.wps2
-rw-r--r--wps/Rockboxed.240x320x16.wps2
-rw-r--r--wps/Rockboxed.320x240x16.wps2
-rw-r--r--wps/Rockboxed/pg-108.bmpbin3294 -> 1674 bytes
-rw-r--r--wps/Rockboxed/pg-140.bmpbin4254 -> 2154 bytes
-rw-r--r--wps/Rockboxed/pg-220.bmpbin9954 -> 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,
wps_data->full_line_progressbar=0;
return buf;
#else
- char *p=strchr(tag, '|');
- if (p) {
- wps_data->progress_height=atoi(++p);
- p=strchr(p, '|');
- if (p) {
- wps_data->progress_start=atoi(++p);
- p=strchr(p, '|');
- if (p)
- wps_data->progress_end=atoi(++p);
- else
+ /* default values : */
+ wps_data->progress_top = -1;
+ wps_data->progress_height = 6;
+ wps_data->progress_start = 0;
+ wps_data->progress_end = 0;
+
+ char *prev=strchr(tag, '|');
+ if (prev) {
+ char *p=strchr(prev+1, '|');
+ if (p) {
+ wps_data->progress_height=atoi(++prev);
+ prev=strchr(prev, '|');
+ p=strchr(++p, '|');
+ if (p) {
+ wps_data->progress_start=atoi(++prev);
+ prev=strchr(prev, '|');
+ p=strchr(++p, '|');
+ if (p) {
+ wps_data->progress_end=atoi(++prev);
+ prev=strchr(prev, '|');
+ p=strchr(++p, '|');
+ if(p)
+ wps_data->progress_top = atoi(++prev);
+ }
+
+ if (wps_data->progress_height<3)
+ wps_data->progress_height=3;
+ if (wps_data->progress_end<wps_data->progress_start+3)
wps_data->progress_end=0;
- }else {
- wps_data->progress_start=0;
- wps_data->progress_end=0;
- }
-
- if (wps_data->progress_height<3)
- wps_data->progress_height=3;
- if (wps_data->progress_end<wps_data->progress_start+3)
- wps_data->progress_end=0;
- }else {
- wps_data->progress_height=6;
- wps_data->progress_start=0;
- wps_data->progress_end=0;
+ }
+ }
}
return "\x01";
#endif
@@ -1824,8 +1831,12 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset,
/* progress */
if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS)
{
- int sb_y = i*h + offset + ((h > data->progress_height + 1)
- ? (h - data->progress_height) / 2 : 1);
+ int sb_y;
+ if (data->progress_top == -1)
+ sb_y = i*h + offset + ((h > data->progress_height + 1)
+ ? (h - data->progress_height) / 2 : 1);
+ else
+ sb_y = data->progress_top;
if (!data->progress_end)
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
unsigned short time_mult[WPS_MAX_LINES][WPS_MAX_SUBLINES];
long subline_expire_time[WPS_MAX_LINES];
int curr_subline[WPS_MAX_LINES];
+ int progress_top;
int progress_height;
int progress_start;
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 @@
%al %s%ac%?it<%it|%fn>%ar
%ac%t3%ig;%t%iy
-%pb|10|10|108|
+%pb|5|10|108|76|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt
%?ps<%xdb>
%?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 @@
%al %s%ac%?it<%it|Title?>%ar
%ac%t3%ig;%t%iy
-%pb|10|10|140|
+%pb|5|10|140|76|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt
%?ps<%xdb>
%?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 @@
%al %s%ac%?it<%it|%fn>%ar
%ac%t3%ig;%t%iy
-%pb|5|10|156|
+%pb|5|10|156|75|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt
%?ps<%xdb>
%?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 @@
-%pb|5|10|156|
+%pb|5|10|156|171|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt
%?ps<%xdb>
%?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 @@
%ac%t3%ig;%t%iy
-%pb|5|28|191|
+%pb|5|28|191|122|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt
%?ps<%xdb>
%?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 @@
%ac%t3%ig;%t%iy
-%pb|15|10|220|
+%pb|5|10|220|256|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt
%?ps<%xdb>
%?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 @@
%ac%t3%ig;%t%iy
-%pb|5|10|300|
+%pb|5|10|300|178|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown>%ar%pt
%?ps<%xdb>
%?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