Commit graph

44 commits

Author SHA1 Message Date
Jonathan Gordon
faaf431d32 Accept FS#11567 by Fred Bauer - better memory management for the skin fonts
%Fl now takes an optional 3rd param which is the number of glyphs to cache (default to 256). the smaller the number, the less ram will be used (i.e using 15 for a font which only shown numbers is a good idea)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27882 a1c6a512-1295-4272-9138-f99709370657
2010-08-25 14:11:38 +00:00
Thomas Martitz
3478bc5d6d mips is predefined by gcc, but we want it for paths. Don't let others fall into this trap again. Use __mips instead
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27872 a1c6a512-1295-4272-9138-f99709370657
2010-08-24 13:41:45 +00:00
Thomas Martitz
1aeb79dc3a Add a comment
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27871 a1c6a512-1295-4272-9138-f99709370657
2010-08-24 13:17:03 +00:00
Thomas Martitz
145de8e030 Fix red. Something - I coundn't find it - must be doing '#define mips 1'.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27870 a1c6a512-1295-4272-9138-f99709370657
2010-08-24 13:15:42 +00:00
Thomas Martitz
46454ac2a8 Move setjmp to lib and add setjmp for sh (imported from newlib) and compile it as separate library.
It's used by both, plugins and codecs, and sh/hwcodec doesn't compile codecs
so it doesn't fit into sources.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27869 a1c6a512-1295-4272-9138-f99709370657
2010-08-24 12:38:42 +00:00
Jonathan Gordon
74ec011bb8 New skin tag: %if(<tag>, <operator>, <operand> [,option count]) which lets you do very simple logical comparissons on other tags.
<tag> is the tag to check against
<operator> is the comparisson to do, any one of... =, !=, >, >=, <, <=    (when comparring against a string tag like %ia only = and != work, and it is done NOT case sensitive)
<operand> is either another tag, a number, or text.
[option count] is an optinal number to use for the few tags which scale to the amount of options when used as a conditional (i.e %?pv<a|b|c|d> would have 4 options)

example: %?if(%pv, >=, 0)<Warning.. volume clipping|coool...>
That says "If the value from %pv (volume) is greater than or equal to 0 then display the warning line, otherwise the cool line."
%?if(%ia, =, %Ia)<same artist>   <= this artist and next artist are the same.

some tags might need a touch of tweaking to work better with this. experiment and have fun

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27846 a1c6a512-1295-4272-9138-f99709370657
2010-08-19 13:49:32 +00:00
Jonathan Gordon
eda80390d5 A bunch of new features for the bar type tags (%pb, %pv, %bl, etc):
* the bar orientation (horiz/vert) is now chosen based on the width and heigt values (or can be forced).
* the fill direction can now be inverted (fill right to left, or top to bottom is considered inverted)
* It can now draw a slider type bar instead of a fill type (or indeed a slider with a fill type)

To configure the new bar, any (or all) of the following params can be used after the bmp filename (order makes no difference either):
invert - cause the bar to fill in the inverted direction
vertical - draw a vertical bar (not needed if the height > width)
horizontal - draw a horizontal bar (this is obviously the default)
nofill - dont draw the filling bar (this still draws the outline, obviously pointless without the slider param)
slider - draw an image for the slider. The next param MUST be the label of the image to draw. No option to use a subimage here, so the whole image needs to be the image you want on the slider. 

example: %pb(0,0,-,-,-,nofill, slider, slider_image, invert) - draw a boring horizontal progressbar which doesnt fill and only draws the image "slider_image" which moves right to left.

the slider type might need some tweaking. let us know how it goes


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27821 a1c6a512-1295-4272-9138-f99709370657
2010-08-15 14:13:36 +00:00
Jonathan Gordon
dc3778a685 Rework the skin playlist viewer so it uses the same drawing code as everything else. This should mean that all text tags now work as expected. The 2nd code param is no longer needed so drop it (you can use conditionals and sublines and stuff in the one code param.
example: %Vp(1, %?it<%in -%it|%fn>) <- show the next tracks strating from the first next track and show info if it is avilable or the filename.
Basic cuesheet support here, and will load upcoming track tags from the database if you have load to ram enabled.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27814 a1c6a512-1295-4272-9138-f99709370657
2010-08-14 15:17:59 +00:00
Jonathan Gordon
863d239aa2 Change %xd to allow for a number to be used to specify the subimage. i.e %xd(Ac) can now we written as %xd(A, 3). subimage count start at 1 so a=1, b=2 etc.
Also adds the possibility to specify a set of params which a tag can have (i.e a tag or a integer)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27812 a1c6a512-1295-4272-9138-f99709370657
2010-08-14 11:17:49 +00:00
Jonathan Gordon
70ebe46d74 New feature for the %xl (image load) tag. If you give it the filename __list_icons__ it will use the list icon strip instead of loading a different bmp.
example:
%xl(I, __list_icons__, 0, 0)
%xd(I, %Li)

^ display the list icon at position 0,0 in that viewport. (you can of course %xd(Ia) if you really wanted also.)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27787 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 13:27:10 +00:00
Jonathan Gordon
3f8e7fc26f New feature for the %xd() (display a preloaded image) skin tag.
It can now automatically load the correct subimage from a strip (assuming the strip is in the correct order)  by giving a tag for the 2nd param.
example: %xd(F, %mp) which is equivilant to %?mp<%xd(Fa)|%xd(Fb)|%xd(Fc)|%xd(Fd)|%xd(Fe)>
You can also set the subimage offset.. i.e %xd(E, %mm, -1) which means "show nothing for the first value of %mm and use the bitmap strip for the remaining values"

if a tag+offset is <0 or greater than the number of subimages in a strip he image is cleared (I'm open to changing this if someone has a better idea)

cabbiev2.176x220x16.wps is an example of how to use this

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27717 a1c6a512-1295-4272-9138-f99709370657
2010-08-05 11:28:48 +00:00
Jonathan Gordon
145571d9b5 Add a T type to the tag table which allows parameters to be a single tag
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27716 a1c6a512-1295-4272-9138-f99709370657
2010-08-05 11:28:35 +00:00
Jonathan Gordon
1e0a01063d make -vvv display the parse tree in checkwps. Fix a potential bug in the parser where recursive tags (the playlist viewier) would share params with its parant which meant bad things
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27677 a1c6a512-1295-4272-9138-f99709370657
2010-08-03 12:14:50 +00:00
Nils Wallménius
8be79a22fd skinparser lib: even more const correctness, should fix checkwps, again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27643 a1c6a512-1295-4272-9138-f99709370657
2010-07-31 16:33:34 +00:00
Nils Wallménius
804437af56 skinparser lib: even more const correctness, should fix checkwps
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27642 a1c6a512-1295-4272-9138-f99709370657
2010-07-31 16:30:22 +00:00
Nils Wallménius
597ccddb39 skinparser lib: more const correctness
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27641 a1c6a512-1295-4272-9138-f99709370657
2010-07-31 16:25:41 +00:00
Nils Wallménius
c2529c341d skinparser lib: some const correctness and marking of local vars as 'static'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27635 a1c6a512-1295-4272-9138-f99709370657
2010-07-31 11:28:37 +00:00
Jonathan Gordon
2d31d77a8b FS#11470 - new skin code, finally svn uses the new parser from the theme editor. This means that a skin that passes the editor WILL pass svn and checkwps (unless the target runs out of skin buffer or something.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27613 a1c6a512-1295-4272-9138-f99709370657
2010-07-29 12:37:48 +00:00
Dominik Riebeling
1879481dc4 Don't overwrite AR if it's been set from outside.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27511 a1c6a512-1295-4272-9138-f99709370657
2010-07-21 19:35:16 +00:00
Dominik Riebeling
3cd1968cbc Add missing argument that broke building libskin_parser outside of Rockbox.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27478 a1c6a512-1295-4272-9138-f99709370657
2010-07-18 08:58:04 +00:00
Robert Bieber
3c4fb8abe4 Theme Editor: Added column number to parser error messages
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27477 a1c6a512-1295-4272-9138-f99709370657
2010-07-18 00:59:02 +00:00
Robert Bieber
15488a00ea Theme Editor: Committed FS#11477 to add a DECIMAL parameter type in the parser and adapt the Theme Editor to accomodate the change by Johnathan Gordon. Fixed bug in the parser caused by the patch (error was thrown on zero value) and adapted tag rendering for new format
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27426 a1c6a512-1295-4272-9138-f99709370657
2010-07-15 06:24:11 +00:00
Dominik Riebeling
e464128c54 Rework libskin_parser Makefile for OS X support.
- add similar trickery that is used for the libraries used by Rockbox Utility
  to allow building as universal binary.
- don't overwrite CC, we need to set this from outside for building OS X 10.4
  compatible binaries.
- extend Theme Editor project file to build 10.4 compatible binaries on OS X.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27323 a1c6a512-1295-4272-9138-f99709370657
2010-07-06 21:08:16 +00:00
Jonathan Gordon
78c9a19e51 cosmetic.... LINE_ALTERNATOR can contain LINE so make it more important than LINE in the enum
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27272 a1c6a512-1295-4272-9138-f99709370657
2010-07-04 02:05:42 +00:00
Jonathan Gordon
dc34785b18 s/SUBLINES/LINE_ALTERNATOR/
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27271 a1c6a512-1295-4272-9138-f99709370657
2010-07-04 02:04:14 +00:00
Jonathan Gordon
7cfb56484e use the same BAR_PARAMS for all bar types
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27270 a1c6a512-1295-4272-9138-f99709370657
2010-07-04 01:57:25 +00:00
Robert Bieber
32ff4e93bd Theme Editor: Implemented a flags column in the tag table, removed the \n flag at the end of the param list and replaced it with a NOBREAK flag to prevent the renderer from inserting a line break at the end of the line. Modified the theme editor's renderer to accomodate this flag
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27268 a1c6a512-1295-4272-9138-f99709370657
2010-07-04 01:39:57 +00:00
Robert Bieber
00a3024924 Theme Editor: Fixed a warning in the parser due to a stray asterisk
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27239 a1c6a512-1295-4272-9138-f99709370657
2010-07-02 08:43:01 +00:00
Robert Bieber
4429fb02b7 Theme Editor: Removed some old hash code that caused viewer not to update due to hash collisions. Made Vf and Vb tags attached to viewport definition eat newline at end of line'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27238 a1c6a512-1295-4272-9138-f99709370657
2010-07-02 08:05:03 +00:00
Robert Bieber
9742704070 Theme Editor: Altered tag table entry for %pb to make image optional, implemented progress bar rendering in theme editor
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27229 a1c6a512-1295-4272-9138-f99709370657
2010-07-02 00:20:36 +00:00
Robert Bieber
26a2f810f1 Theme Editor: Fixed line numbering bug in parser. Implemented playlist display in renderer: playlist will use info for next track for all tracks other than the current track
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27227 a1c6a512-1295-4272-9138-f99709370657
2010-07-01 21:49:55 +00:00
Jonathan Gordon
aa1a126772 minor tweak to r27210 to make it the same as the svn parser... eat everything up to and including the \n after these tags
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27211 a1c6a512-1295-4272-9138-f99709370657
2010-07-01 10:17:41 +00:00
Robert Bieber
7dfd0c0651 Theme Editor: Implemented JdGordon's tag newline-eating mechanism
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27210 a1c6a512-1295-4272-9138-f99709370657
2010-07-01 08:45:49 +00:00
Jonathan Gordon
4146882277 dont build the debug code in ROCKBOX, save ~400bytes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27109 a1c6a512-1295-4272-9138-f99709370657
2010-06-24 14:46:21 +00:00
Björn Stenberg
936e673954 Moved libskin_parser to lib. Added it to link line.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27105 a1c6a512-1295-4272-9138-f99709370657
2010-06-24 11:47:37 +00:00
Robert Bieber
09db2ae203 skin_parser: Fixed bug handling sublines with no content
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27060 a1c6a512-1295-4272-9138-f99709370657
2010-06-22 18:51:44 +00:00
Dominik Riebeling
be66e4d642 Make skin_parser Makefile more silent.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27058 a1c6a512-1295-4272-9138-f99709370657
2010-06-22 16:51:29 +00:00
Jonathan Gordon
ef6398827a remove a bunch of token markers which arnt necessary with the new parser
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27047 a1c6a512-1295-4272-9138-f99709370657
2010-06-22 09:56:09 +00:00
Jonathan Gordon
53c799e445 fix the viewport tag [arams
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26981 a1c6a512-1295-4272-9138-f99709370657
2010-06-20 07:28:39 +00:00
Jonathan Gordon
95b0cefad0 tiny clean up of memory allocation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26887 a1c6a512-1295-4272-9138-f99709370657
2010-06-17 13:54:09 +00:00
Björn Stenberg
f1a144a077 Added skin_parser library to build system. Fixed some warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26884 a1c6a512-1295-4272-9138-f99709370657
2010-06-17 11:04:32 +00:00
Jonathan Gordon
db658d9840 woops, forgot to add these
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26882 a1c6a512-1295-4272-9138-f99709370657
2010-06-17 08:36:28 +00:00
Jonathan Gordon
b2ea95e8d2 make the parser slightly more usable for rockbox, move the buffer allocation into the lib (maybe not the best spot?)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26880 a1c6a512-1295-4272-9138-f99709370657
2010-06-17 07:56:51 +00:00
Jonathan Gordon
36b934d241 Move the skin parser to a seperate library
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26877 a1c6a512-1295-4272-9138-f99709370657
2010-06-17 06:52:02 +00:00