This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#9710 - Draw numbers from a bmp strip in the WPS
Attached to Project:
Rockbox
Opened by Jonathan Gordon (jdgordon) - Thursday, 25 December 2008, 06:37 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Thursday, 03 June 2010, 06:16 GMT+2
Opened by Jonathan Gordon (jdgordon) - Thursday, 25 December 2008, 06:37 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Thursday, 03 June 2010, 06:16 GMT+2
|
DetailsThis patch adds a new tag to the WPS which will draw the next tag as a combination of numbers from a bmp strip.
http://imagebin.ca/view/8i4Iy7.html is a pretty bad example of what it can do. The first line is just converting the number 12345 to images (12345 is text in the wps), the 2nd line is the track complete percent (%px) ok, how to use it: First you HAVE to have a bmp strip loaded with %x or %xl. This strip is a verticle strip split into 10 cells.. 0 at the top, 9 at the bottom. They must al be the same height and width. (I've attached my really bad test bmp, test.wps and the patch) after that, add up to 5 %xn lines in the format "%xn|id|x|y|<next tag>" where id is the bmp's id, x,y is the x and y pixel coordinate (relative to the current viewport) to start drawing in. <next tag> MUST be immediately after the last |, NO SPACES! There is some limitation on which tags will work and which wont, but anything which will ordinarily display a number should work, and some conditionals will work also. Like in the display, you can use this to draw a static number (although i'm not ure why you would want to?) Lastly... Llorean has suggested I add the ':' character to the strip... I'm happy to do that if its going to be useful, and a few other chars if needed. I dont want to add too many though (and I'm not going to add any letters... this is not a multifont replacement) let me know what you think |
This task depends upon
Closed by Jonathan Gordon (jdgordon)
Thursday, 03 June 2010, 06:16 GMT+2
Reason for closing: Out of Date
Additional comments about closing: multifont is better!
Thursday, 03 June 2010, 06:16 GMT+2
Reason for closing: Out of Date
Additional comments about closing: multifont is better!
format: %dn|n|m|x|y|abc
where:
n is the bmp strip number/letter to use.
m is the max number of chars to draw (Always drawn right justified
x is the x pixel to start drawing at (viewport relative)
y is the y pixel to start drawing at (viewport relative)
abc is up to 7 extra chars in the order they appear at the end of the bmp strip
edit2: reupped the diff.. this one actually works