EPOPEIA SCRIPTING DEMOSYSTEM 1.4.0
          Minimal manual

1. Script sintax
2. PAKer

Demo's script is read from "script.epo" file along the executable file or in the
root directory of the pak file.

A time mark can have two different formats, depending on the time of
music file played:

<time>:
	order, row
        	If using a music module

        seconds.miliseconds
        	If using streamed music (ogg/mp3)

1. Script sintax
----------------

	The script commands are case insensitive.

-- this is a one-line comment
// this is another one-line comment
/* this is 
	a
	multi-line
comment */

* Variables: (put them in the beginning)

Demoname     = "Super-demo"; -- used in window titles
ModName      = "music/file.ogg"; -- music file to play
CoolKeys     = 0; -- 1: use of arrows to jump forward/backwards in the demo
WarningLevel = 0; -- 1: script compilation warning sensibility

* Regular commands:

<class> object(construct_param1, construct_param2, ...);

	Create an instance/effect of type "class". (Registered with a plugin)
        This calls the type's registered New method, and should
        perform all file-loading and data generation tasks.
        
object1.<Methodq1>(method_param1, method_param2, ...);

	Execute class method <Method1> on object1, with given params.
        
object1.Start(<z>);
	
        Start rendering object1, with rendering order <z>. It will be rendered
        every frame from now on until a Stop.
        
object1.Stop();

	Stop rendering object1 every frame.

AT(<time>);

	Changes the time reference to the given time. The following commands will
        be executed on that exact time (or the later nearest possible time)

	Commands in the same <time> will be executed in the same order that they're
        in the script.

UNTIL (<time>) [ EVERY (<time>) ] DO
	<commands>
END

                                    
	Executes starting on last At() until <time> moment (not including it) the 
        commands between "do" and "end", before each frame render.
        
        Example: if time is 6.0s, commands will be executed before any frame before
        6.0 (until 5.99999..s).
   
   	If "every" optional modifier is used, it defines the execution granularity of 
        the commands; instead of being executed every frame, they're executed
        every <time> seconds, before that frame render stards.

        Commands inside an UNTIL block are activated (listed to persistent commands)
        during the normal one-time commands.

	After normal one-time commands are executed, persistent inside-until commands
        are executed if they must be executed.

	Latest, frame rendering is performed.

	UNTIL-commands are unlisted on regular one-time commands execution phase, so 
        the commands are not executed on UNTIL <time> moment.

        In short:

        1. ONE-TIME COMMAND EXECUTION
           NEW PERSISTENT COMMAND ACTIVATION
           DEACTIVATE FINISHED PERSISTENT COMMANDS
           (any order, they can repeat)
           
        2. EXECUTE UNTIL-COMMANDS THAT MUST BE EXECUTED (EVERY)
        
        3. FRAME RENDER
        
SETTIME(<time>);

	Changes demo runtime time. This used for startup.

BEGIN
	Starts music and time resets to 0 and increments as music plays.
        
END
	Demo script end marker.

2. PAKer
--------

Epopeia PAKs are RAR 2.x files, renamed to data.pak. Be sure that you create them
with WinRAR or rar 2.x versions and not 3.x or newer.

Plugins should load things using packer interface, checkout include/epopeia/packer.h.
The basic interface is the same as the libc functions, just change FILE * by PFILE *,
and the calls by the corresponding pak_ equivalents (fopen becomes pak_open, and so).

The packer first tries to load a file from the data.pak file; if it does not exist,
tries to load from a regular file. This means that you can work with unpacked files
and just create the pack file for distribution.

You can put epopeia plugins inside the pak file, but not the extra DLL files like
epopeia.dll, bass.dll, libepopeia.so, etc.

Epopeia uses urarlib for unpacking the data.

