Jonathan Gordon
61c6526013
* Make %t stricter by aborting if a value is not given.
...
* Move the default value for %mv back into wps_parser.c where it belongs
* Add the debug line for the %mv tag
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18773 a1c6a512-1295-4272-9138-f99709370657
2008-10-11 13:49:38 +00:00
Jonathan Gordon
85600e629b
update the %mv wps tag to let you specify how long it should wait after being released to go back to false.
...
e.g %mv2 will stay true for 2 seconds or %mv3.5 is 3.5 seconds (same as the %t syntax)... if no number is specified it defaults to 1 second
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18769 a1c6a512-1295-4272-9138-f99709370657
2008-10-11 12:20:09 +00:00
Jonathan Gordon
486869693c
FS#9460 - Add a tag %mv which can be used to check if the volume button is being pressed (e.g %?mv<yes|no> ). It will stay true after its released for a little over half a second (not configurable unless someone comes up with a nice way to add a parameter to the tag? 1s is too long and .5s is too short...
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18752 a1c6a512-1295-4272-9138-f99709370657
2008-10-09 11:10:26 +00:00
Frank Gevaerts
5d22e3cbdd
Add wpseditor, the Google Summer of Code 2008 project of Rostislav Chekan. Closes FS#9327
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18362 a1c6a512-1295-4272-9138-f99709370657
2008-08-29 21:08:38 +00:00
Dominik Riebeling
02103a2fa7
Unify opening of utf-8 files (FS#6203). This also adds ignoring the BOM in several places it has been missing (as FS#6071).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18185 a1c6a512-1295-4272-9138-f99709370657
2008-08-02 20:39:03 +00:00
Nicolas Pennequin
ae05501716
Introduce a new WPS parsing error case: limits exceeded. It includes the cases when there are too many tokens, lines, sublines, viewports, strings, characters or conditional levels. This prevents the parser from failing silently or going on, as it used to do in those cases. Thanks to fml (Alexander Levin) for mentioning this issue.
...
I also changed the error types from #defines to an enum, for cleanliness.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18015 a1c6a512-1295-4272-9138-f99709370657
2008-07-12 15:12:09 +00:00
Magnus Holmgren
aae69dff45
Fix FS #9181 , allowing the documented 3 progress bars per WPS. Also simplify the code a little.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18008 a1c6a512-1295-4272-9138-f99709370657
2008-07-11 07:33:56 +00:00
Jonathan Gordon
d035f255c9
get checkwps building again (FS#9150) - still doesnt compile on d2 and mr500 though
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17957 a1c6a512-1295-4272-9138-f99709370657
2008-07-06 13:23:28 +00:00
Peter D'Hoye
205f3df781
Remove a viewport ambiguity by changing the screens width/heigth members into lcdwidth/lcdheight. Normal usercode should always use getwidth()/getheigth() as that returns the viewport width/height. Fixes issues that would have appeared in many places when introducing viewports with sizes != lcd sizes.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17857 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 20:45:21 +00:00
Daniel Stenberg
2acc0ac542
Updated our source code header to explicitly mention that we are GPL v2 or
...
later. We still need to hunt down snippets used that are not. 1324 modified
files...
http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 18:10:04 +00:00
Jonathan Gordon
d8e56e30d7
allow the full lowercase a-z to be used as conditional viewport grouping id's
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17789 a1c6a512-1295-4272-9138-f99709370657
2008-06-25 08:08:39 +00:00
Jonathan Gordon
bdbdb97f19
FS#9051 - remove LCD margins... use viewports if you need them...
...
NOTE to WPS people....
%m has been removed, but (i think) because of the other %m tags it wont fail if you try loading a wps with %m|..|, it will just be ignored.
Also note that if the statusbar is enabled the default viewport is 8 pixels shorter than when its not, i.e (0,0) is really (0,8) if the statusbar is shown... I dont think this will be a major issue because almost no WPS show the bar and use bitmaps... text only WPS shouldnt be affected.
Please report problem screens in http://forums.rockbox.org/index.php?topic=17358.0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17763 a1c6a512-1295-4272-9138-f99709370657
2008-06-23 13:20:35 +00:00
Jonathan Gordon
082f50b947
fix yellow
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17760 a1c6a512-1295-4272-9138-f99709370657
2008-06-23 06:17:22 +00:00
Jonathan Gordon
5a169bb717
commit FS#9027 - conditional viewports
...
** BREAKS CURRENT WPS's **
* %P has been removed, merged with the new %pb
* %pb is now %pb or %pb|bitmap|x|y|width|height| (any of those params can be - to use sane defaults... check wiki/task for more explaination)
* New %Vl and %Vd tags which are used to setup and display conditionaly displayed viewports (%Vl|<id>|<usual %V params>| to set up, then %Vd<id> to enable the viewport
* bumps the max allowed viewport count to 24
* you can setup 3 different progressbars in a WPS... max of one per viewport though
http://www.rockbox.org/tracker/task/9027?getfile=16785 is a simple perl script to convert old %P/%pb to the new %pb syntax
I'll commit changes to the cabbie wps soon which shows how to use %Vl/%Vd properly...
Reminder: %m will be removed soonish also so when fixing your WPS's remember to use conditional viewports to replace %m
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17759 a1c6a512-1295-4272-9138-f99709370657
2008-06-23 06:04:17 +00:00
Jonathan Gordon
ae49b387bf
Accept FS#9075 and rename valid_vals to set_vals
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17698 a1c6a512-1295-4272-9138-f99709370657
2008-06-07 09:01:02 +00:00
Magnus Holmgren
c2416bf8b9
Fix typo in the new default values for %V, so that the background color is actually set on 16-bit targets.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17692 a1c6a512-1295-4272-9138-f99709370657
2008-06-05 15:21:08 +00:00
Jonathan Gordon
f002b7d055
make %V a little simpler. only the x and y values have to be specified now (i.e %V|0|0|||||| )
...
default values are as follows:
width - lcd width - the x value
height - lcd height - y value
font - user font
fg colour - the themes fg colour on 16bit targets, black on greyscale targets
bg colour - the themes bg colour on 16bit targets, white on greyscale targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17690 a1c6a512-1295-4272-9138-f99709370657
2008-06-05 08:20:39 +00:00
Nils Wallménius
a21004dee6
Fix FS#9010 warning in checkwps when building on an amd64 machine
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17582 a1c6a512-1295-4272-9138-f99709370657
2008-05-19 14:37:16 +00:00
Bertrik Sikken
2843469876
Moved atoi declaration to stdlib.h. Deleted atoi.h
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17280 a1c6a512-1295-4272-9138-f99709370657
2008-04-28 16:18:04 +00:00
Nicolas Pennequin
19868938d4
WPS parser: also revert to the default WPS when there were bitmap loading errors. The reverting is moved from wps_parse() to wps_data_load().
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16914 a1c6a512-1295-4272-9138-f99709370657
2008-04-01 17:35:48 +00:00
Dave Chapman
d746b79317
Remove unnecessary (and incorrect) #ifdefs surrounding #include "backdrop.h", and correct remaining references to HAVE_LCD_REMOTE to HAVE_REMOTE_LCD
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16873 a1c6a512-1295-4272-9138-f99709370657
2008-03-29 01:14:10 +00:00
Dave Chapman
78d29f535f
Major cleanup of checkwps - fix all warnings and add a script to build versions for all supported targets (plus some unsupported ones). You now need to run the version of checkwps that matches the device your WPS is for.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16831 a1c6a512-1295-4272-9138-f99709370657
2008-03-26 23:35:34 +00:00
Dave Chapman
3d88eddb83
Move checkwps to its own subdir in preparation for compiling target-specific versions. Also remove a DEBUGF that should not have been left in.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16827 a1c6a512-1295-4272-9138-f99709370657
2008-03-26 20:19:39 +00:00
Dave Chapman
fa1da20d3a
Fix yellow, and at the same time simplify some #ifdefs
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16823 a1c6a512-1295-4272-9138-f99709370657
2008-03-26 19:07:39 +00:00
Dave Chapman
b9bb723f12
1) Make Rockbox reject any WPSs if there are errors loading any of the required bmps; 2) Make checkwps actually load the images using the Rockbox bmp loader, and reject the WPS in the same was as Rockbox on bmp errors.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16822 a1c6a512-1295-4272-9138-f99709370657
2008-03-26 18:18:22 +00:00
Dave Chapman
7418c357c3
Make checkwps compile again. Still more work is needed though, as checkwps is compiled to emulate an iPod Color - this needs changing to allow the LCD (and remote LCD) dimensions/depth to be specified on the commandline - the new %V tags are validated against the LCD characteristics
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16807 a1c6a512-1295-4272-9138-f99709370657
2008-03-25 21:09:58 +00:00
Dave Chapman
60413d898e
D'oh - fix a silly #ifdef mistake that caused problems with remote WPSs using viewports.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16787 a1c6a512-1295-4272-9138-f99709370657
2008-03-25 00:20:59 +00:00
Dave Chapman
0bb2e05aef
Stricter syntax checking of the %V tag - pay attention to the return-code from parse_list, and check for the tailing | symbol.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16784 a1c6a512-1295-4272-9138-f99709370657
2008-03-24 18:40:13 +00:00
Dave Chapman
2a34943d7f
Hopefully get the viewport position/dimensions validation correct this time.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16782 a1c6a512-1295-4272-9138-f99709370657
2008-03-24 14:58:30 +00:00
Dave Chapman
6d9c353f2e
Add another safety-check in the bitmap strips parsing - don't allow the num_subimages parameter to %xl to be <= 0
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16779 a1c6a512-1295-4272-9138-f99709370657
2008-03-24 10:13:47 +00:00
Dave Chapman
99c0978faa
Add a sanity-check to ensure only in-range subimages are referenced in %xd tags. Plus some tab policing.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16774 a1c6a512-1295-4272-9138-f99709370657
2008-03-24 00:03:05 +00:00
Dave Chapman
15ddd7a7ec
Add the ability to use bitmap strips (a single .bmp file containing many images of the same dimensions, tiled vertically - similar to icon strips) in the WPS. The %xl tag now has an optional "number of subimages" parameter, and the %xd tag has an optional "subimage to display" parameter (a-z,A-Z - allowing up to 52 sub-images). So for example, a bitmap with 10 subimages is loaded with %xl|M|volume.bmp|134|153|10| and then this can be used in a conditional as %?pv<%xdMa|%xdMb|%xdMc|%xdMd|%xdMe|%xdMf|%xdMg|%xdMh|%xdMi|%xdMj>.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16764 a1c6a512-1295-4272-9138-f99709370657
2008-03-23 20:31:00 +00:00
Dave Chapman
65d50de5b7
Oops - correctly reset the bmp filenames
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16762 a1c6a512-1295-4272-9138-f99709370657
2008-03-23 12:15:52 +00:00
Dave Chapman
bca8edd856
Small simplification - take advantage of the fact that x/y/width/height are non-negative integers when validating the viewport bounds.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16736 a1c6a512-1295-4272-9138-f99709370657
2008-03-22 09:28:15 +00:00
Dave Chapman
45b2d8802d
Reduce the shocking amount of RAM my viewports implementation was using. The first version stored an array of lines for each of the 16 possible viewports (MAX_VIEWPORTS * the number of lines on the LCD with a 5-pixel high font). This version reverts back to a single global array of lines, with each viewport specifying the first and last lines as indexes into that array. This also turns out to be simpler, reducing binsize a little as well.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16735 a1c6a512-1295-4272-9138-f99709370657
2008-03-22 00:31:22 +00:00
Dave Chapman
d02c79c03f
Commit viewports-in-WPS patch (FS#8385). This adds the %V tag - see the CustomWPS page for details (shortly...). There is still some work to do - decide how to handle font references, decide how to handle conditionals. Plus checkwps is broken - I'll fix that in a separate commit.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16733 a1c6a512-1295-4272-9138-f99709370657
2008-03-21 19:38:00 +00:00
Dave Chapman
e92d2c51ed
Add a general-purpose parse_list function to parse a string containing a delimited list of items and adapt the parse_image_load() function in the WPS parser to use it. This function will also be used to parse the upcoming WPS %V viewport tag, but I'm committing it separately as these changes are unrelated to the viewport implementation itself.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16728 a1c6a512-1295-4272-9138-f99709370657
2008-03-21 13:41:35 +00:00
Jonathan Gordon
923cbe3224
revert my previous commit and use a conditional for the time format instead which is probably better.
...
%?cf<24 hour stuff|12 hour stuff>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15830 a1c6a512-1295-4272-9138-f99709370657
2007-11-27 01:41:59 +00:00
Jonathan Gordon
0ade09bd6b
add 2 new tags which display the hour in 12 or 24 hour format depending on the config setting.
...
%cf is for padded hour
%cg is for just the number
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15826 a1c6a512-1295-4272-9138-f99709370657
2007-11-27 01:18:31 +00:00
Nicolas Pennequin
720cfe3954
Improve clearing of pictures in conditional constructs. This fixes improper clearing of pictures used in several conditionals or in nested conditionals (FS#7856).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15663 a1c6a512-1295-4272-9138-f99709370657
2007-11-18 15:32:45 +00:00
Nicolas Pennequin
31f76116f1
Make the WPS parser stricter with invalid parameter lists. It will now reject them instead of ignoring them (this includes the second parameter to %m|x|, which is invalid and now causes a failure). Also change the debugging code in order to allow more precise error messages, including the faulty token's index and description. Finally, add a few missing token description and fine-tune the #ifdefs.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15624 a1c6a512-1295-4272-9138-f99709370657
2007-11-14 22:02:41 +00:00
Nicolas Pennequin
f554e00b61
Allow setting a margin on a non-scrolling line by using %m|margin| instead of %s|margin|. This allows to easily place dynamic info next to album art.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15610 a1c6a512-1295-4272-9138-f99709370657
2007-11-14 00:45:04 +00:00
Dave Chapman
f6ef46b73f
FS#8135 - add an optional "left margin" parameter to the %s WPS tag - e.g. %s|100|. This patch uses parts of the scroll-margins patch (FS#2954), but is much smaller, only offers a left-margin, and only affects the WPS code.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15604 a1c6a512-1295-4272-9138-f99709370657
2007-11-12 21:34:01 +00:00
Nicolas Pennequin
8537cbf091
Add detection for a previously ignored error case: a conditional token is present but no conditional start token (e.g. "%?C%al|>"). This would cause an inifnite loop in the displaying code. Thanks to markun for making the mistake and reporting it ;)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15598 a1c6a512-1295-4272-9138-f99709370657
2007-11-12 18:43:38 +00:00
Nicolas Pennequin
81dedee7d0
Various album art improvements:
...
* Make the album art display tag static instead of dynamic, making it be drawn less often, which is good.
* Add the possibility of clearing the album art bitmap instead of drawing it, and use this abaility when the display tag is inside a conditional construct.
* Add the album art display tag to wps_debug.c.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15592 a1c6a512-1295-4272-9138-f99709370657
2007-11-12 01:31:42 +00:00
Nicolas Pennequin
9d4bed7ff0
Album art support. Based on FS#3045, but heavily modified to adapt to MoB and for cleanness.
...
The cover pictures are loaded from external bitmaps. JPEG and embedded art are not supported. The pictures will only be drawn on the main display. There is no resizing but it is possible to specify the WPS bitmap size in the bitmap names (e.g. cover.100x100.bmp).
The bitmaps are stored in the main buffer and read directly from there. Currently, duplicate bitmaps will simply be present several times in the buffer, but this will be improved.
To enable for a target, #define HAVE_ALBUMART in its config file.
For more information, see the wiki page: http://www.rockbox.org/wiki/AlbumArt .
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15572 a1c6a512-1295-4272-9138-f99709370657
2007-11-11 12:29:37 +00:00
Dan Everton
eecfe9f1cb
Add support for grouping tags. From FS#7362.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14242 a1c6a512-1295-4272-9138-f99709370657
2007-08-08 10:19:56 +00:00
Dan Everton
f4a61f0c4a
Add support for parsing the disc number tag from metadata and use of it in the database. Patch originally from FS#4961 with some minor tweaks by me.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14154 a1c6a512-1295-4272-9138-f99709370657
2007-08-03 10:00:42 +00:00
Nicolas Pennequin
29407cbe80
Implement feature request FS#7476: Add a "song progress percentage" WPS tag (%px) that can be used in a conditional to create custom progress meters.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13987 a1c6a512-1295-4272-9138-f99709370657
2007-07-25 14:14:47 +00:00
Marianne Arnold
74aabc8381
Make the '%mh' wps tag (to indicate keylock status) available on the Archos targets as well.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13716 a1c6a512-1295-4272-9138-f99709370657
2007-06-25 20:54:11 +00:00