Commit graph

97 commits

Author SHA1 Message Date
Andrew Mahone
781421afa2 resize-on-load for bitmap files on 2bpp and color targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19374 a1c6a512-1295-4272-9138-f99709370657
2008-12-09 23:07:59 +00:00
Jonas Häggqvist
a13c162719 Compile the WPS debug functions for the sim, to make --debugwps work.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19371 a1c6a512-1295-4272-9138-f99709370657
2008-12-09 18:15:19 +00:00
Björn Stenberg
66459fee3d Fix red player build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19362 a1c6a512-1295-4272-9138-f99709370657
2008-12-08 08:32:30 +00:00
Daniel Stenberg
43f238f6dc fix "warning: comparison between signed and unsigned"
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19359 a1c6a512-1295-4272-9138-f99709370657
2008-12-07 18:43:27 +00:00
Antoine Cellerier
8289b966b8 Apply FS#9368 : add generic settings tag to WPS.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19357 a1c6a512-1295-4272-9138-f99709370657
2008-12-07 16:20:35 +00:00
Björn Stenberg
ad8d6031c1 Added support for configurable rockbox directory. FS#9567 by Alex Bennee.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19208 a1c6a512-1295-4272-9138-f99709370657
2008-11-24 22:16:07 +00:00
Jonathan Gordon
0394ebe44d FS#9557 - fix the %mv and %t timeout so its intrepreted correctly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19177 a1c6a512-1295-4272-9138-f99709370657
2008-11-22 10:31:33 +00:00
Dave Chapman
29d9fadae9 Add the required #include for the HZ define - fixes compilation of checkwps broken by r18773
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19113 a1c6a512-1295-4272-9138-f99709370657
2008-11-16 10:32:44 +00:00
Jonathan Gordon
c41bd04722 revert the previous commit to find a nice way to fix the yellow...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19111 a1c6a512-1295-4272-9138-f99709370657
2008-11-16 09:56:38 +00:00
Jonathan Gordon
76d2dd9c0e FS#9477 - new WPS tag (%mo) which lets the WPS have different "modes" which are changed with the usual "back to browser" button (This button is ONLY stolen if the WPS you use uses this tag.
an example use:
%?mo<one|two|three>
meaning that when the WPS is first opened "one" will be displayed, pressing select will change it to showing two, pressing it again will show three, and once more will go back to showing one. The text there could be any wps tags (conditional viewports for example...)
There is no real limit on the amount of modes, but remember that if you create a WPS which uses this tag more than once that every use HAS to have the same amount of choices or bad things will happen.



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19110 a1c6a512-1295-4272-9138-f99709370657
2008-11-16 09:38:15 +00:00
Dave Chapman
a42602b350 Don't accept 0 for the width or height of a progress bar in the %pb tag. A zero width causes a divide by zero, and a zero height simply doesn't make any sense, so we assume it was a mistake.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18863 a1c6a512-1295-4272-9138-f99709370657
2008-10-22 21:35:38 +00:00
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