Commit graph

954 commits

Author SHA1 Message Date
Ray Strode
b01ac7970d [script] Add generated source files to BUILT_SOURCES
This is one part of fixing make distcheck.
2009-08-05 10:54:58 -04:00
Ray Strode
a5958e94aa [gitignore] Unignore some .plymouth files
There are a couple of .plymouth files that aren't
generated, so we shouldn't ignore them.
2009-07-24 09:30:32 -04:00
Charlie Brej
a9d8514cd7 [gitignore] Add new file types for git to ignore
".plymouth" is generated from ".plymouth.in" files.
".string" is generated from ".script" files.
".bck" is used as backups by Nedit.
2009-07-24 09:30:32 -04:00
Charlie Brej
ebe123a1e4 [script] Correct vareable to variable
There are likely many other misspellings that I consistently get wrong.
2009-07-24 09:30:32 -04:00
Charlie Brej
d6f6643321 [script] Sort the sprites so they are drawn in the correct order
Sorting is done using the Z parameter. The higher the closer to the front and
the more above the others.
2009-07-24 09:30:31 -04:00
Charlie Brej
2f1154e3c2 [script] Rename ply-scan to script-scan
The scan functions were originally aimed to be put in libply but then again I
can't think of anything that would use them so they are now renamed to left in
the plugin.
2009-07-24 09:30:31 -04:00
Charlie Brej
bc0d731e6f [script] Tidy up the example script
Removes the spinfinity function as it used an ugly ../ path to get the images
and assumed that spinfinity was installed.
Removes some elements which were only inserted for testing.
2009-07-24 09:30:31 -04:00
Charlie Brej
f787ec7744 [script] Remove print object function which was unused
It was useful when the language was being constructed to make sure reference
counts were sane but only worked in text mode.
2009-07-24 09:30:30 -04:00
Charlie Brej
fdfc7a5da7 [script] Remove a no longer necessary parse error test and message
Also a couple minor indentations
2009-07-24 09:30:30 -04:00
Charlie Brej
9879f3312f [script] Preset plymouth callback functions to script NULL objects
They were set to the real NULL which most script-object functions cannot deal
with.
2009-07-24 09:30:29 -04:00
Charlie Brej
bc214f2b2b [script] Use ply_scan_token_is_something wrapper functions in the parser
Makes the code easier to read and a bit smaller.
2009-07-24 09:30:29 -04:00
Charlie Brej
79dfa86636 [script] Use the parse operator table and procedure definition functions
This should make the script-parse a little more manageable and cut a few lines
of code.
2009-07-24 09:30:29 -04:00
Charlie Brej
23824af594 [script] Use a symbol table lookup parse function 2009-07-24 09:30:28 -04:00
Charlie Brej
65ef7eb7e1 [script] Merge all Left-To-Right parsing into a single function 2009-07-24 09:30:28 -04:00
Charlie Brej
a6bc1a4c7c [script] Allows definitions of functions to be described within expressions
As well as
fun fun_name (foo) {return foo+10;}
now you can also say
fun_name = fun (foo) return foo+10;
2009-07-24 09:30:28 -04:00
Charlie Brej
621d080166 [script] Add support for variable number of arguments
Functions can pick up the full array of arguments passed in using the "_args"
local variable. This is a hash with arguments stored indexed from "0" to "N".
The "count" entry in the _args hash contains the number of vars passed in.
2009-07-24 09:30:27 -04:00
Charlie Brej
ee3cb7f3b2 [script] Remove some asserts which are no longer useful 2009-07-24 09:30:27 -04:00
Charlie Brej
42fe12b9fc [script] Remove some derefs as they are now handled in the access functions 2009-07-24 09:30:27 -04:00
Charlie Brej
32e0487d5e [script] More changes to use access functions 2009-07-24 09:30:26 -04:00
Charlie Brej
41ebc5f630 [script] Use hash access functions rather than doing lookups directly 2009-07-24 09:30:26 -04:00
Charlie Brej
da38f5a6b9 [script] Use access functions instead of directly accessing function objects 2009-07-24 09:30:26 -04:00
Charlie Brej
9c7e45c349 [script] Abstract formations of script_return_t with helper functions 2009-07-24 09:30:25 -04:00
Charlie Brej
36186e407a [script] Simplify object comparisons
Also removes many -Wextra warnings
2009-07-24 09:30:25 -04:00
Charlie Brej
74388bca11 [script] Typo in the MathMax function 2009-07-24 09:30:25 -04:00
Charlie Brej
2b62c964bc [script] Fix some compile warnings
Fixed by making most plugin functions static as they dont get linked from
outside anyway. Also changed some char* to const char*.
2009-07-24 09:30:24 -04:00
Charlie Brej
d32a075e7a [script] Correct the math min and max functions
Were the wrong way round and confusingly written. Also adds a MathPi constant.
2009-07-24 09:30:24 -04:00
Charlie Brej
1a4e3372fa [script] Add atan2 to the math library 2009-07-24 09:30:23 -04:00
Charlie Brej
d167bd0e96 [script] Add "_t" to all struct names 2009-07-24 09:30:23 -04:00
Charlie Brej
e50ef7aacc [script] Corrected indentation and formatting to match the rest of the project
Uncrustify did a reasonable job and only needed minor fixups.
2009-07-24 09:30:23 -04:00
Charlie Brej
a36d61d12a [script] Add GPL 2+ licence headers to all .c and .h files 2009-07-24 09:30:22 -04:00
Charlie Brej
bf27872518 [script] Remove the display state as it is now handled by the script 2009-07-24 09:30:22 -04:00
Charlie Brej
9b941402fb [script] Fix minor memory leaks 2009-07-24 09:30:22 -04:00
Charlie Brej
f0ca590f14 [script] Free any remaining over sprites at plugin destroy 2009-07-24 09:30:21 -04:00
Charlie Brej
f5b7a7c814 [script] Simplify native functions by using the hash-cast access functions 2009-07-24 09:30:21 -04:00
Charlie Brej
c44fcbb6df [script] Use the helper hash element extraction functions
This should simplify the code a little as it removes the need to play with
objects which must be unreffed.
2009-07-24 09:30:20 -04:00
Charlie Brej
25fa788801 [script] Add support for setting the window background color
Two functions set the color of either the bottom or the top of the screen. If
the two colors are equal a solid colour draw is used. The color is supplied by
three floats specitying red green and blue elements.
2009-07-24 09:30:20 -04:00
Charlie Brej
3ffc473b96 [script] Add support for getting the window width and height
The example script has been updated to use this as well as to use other
features recently committed.
2009-07-24 09:30:20 -04:00
Charlie Brej
3a24c86b31 [script] Simplify the object operations
Using nested switch statements made it easy to decide what to do in each
situation but this is rather verbose and causes -Wextra to complain (a lot).

Also added script_obj_is_[type] to help identify object easier and not repeat
code.
2009-07-24 09:30:19 -04:00
Charlie Brej
4a82c35e4a [script] Add modify assignments (+=, *= ...)
Adds the following modify assignments: +=, -=, *=, /=, %=
2009-07-24 09:30:19 -04:00
Charlie Brej
a99a8a27c9 [script] Move object operating functions to script-object to avoid repetition 2009-07-24 09:30:19 -04:00
Charlie Brej
a11fac81f6 [script] Fix bug of assigning a var to itself (e.g. val = val;)
Problem was that the var is cleared before being re-assigned, which also clears
the value we were about to write into it.
2009-07-24 09:30:18 -04:00
Charlie Brej
cf730d7b07 [script] Add an example progress bar to the example script 2009-07-24 09:30:18 -04:00
Charlie Brej
370e0522f0 [script] Add support for image scale 2009-07-24 09:30:18 -04:00
Charlie Brej
c9831c9dfa [script] Implement script based fade_in implementation
The example script now can show a spinfinity or a fade_in behaviour. This is
just to see how easy it is to implement current plugins. In the case of fade_in
it is around 23 lines of script code
2009-07-24 09:30:17 -04:00
Charlie Brej
bb4ed684b8 [script] Add support for 'for'
Matches the use in C as "for (first, condition, last)" where first is executed
once, last is executed at the end of each iteration (even when continue is
executed) and condition is tested at the start of every cycle.
2009-07-24 09:30:17 -04:00
Charlie Brej
156d12b87a [script] Add support for an "else" after an "if" 2009-07-24 09:30:16 -04:00
Charlie Brej
e0774cc8f1 [script] Add support for loading the system logo image
This is done specifying the filename is special://logo. Not sure if this is the
best way of implementing but it is expandable to other special files.
2009-07-24 09:30:16 -04:00
Charlie Brej
d7fa520a77 [script] Add support for the password dialogue in the example script theme 2009-07-24 09:30:16 -04:00
Charlie Brej
a3b9e728c6 [script] Added a turn float to integer function to the math library 2009-07-24 09:30:15 -04:00
Charlie Brej
985a3c030e [script] Deref the state to allow local and global to be reassigned
This should allow local and global to be assigned to a different vareable.
This is discouriged as it may cause asserts to fail, but may be useful to save
current state and continue the function at a later time.
2009-07-24 09:30:15 -04:00