And the documentation just keeps comming...

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@598 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-08-03 15:35:09 +00:00
parent dfe1140444
commit 2a2935de48
12 changed files with 130 additions and 8 deletions
+7 -7
View File
@@ -1,4 +1,4 @@
==Data type: color==
Primitive type: color
--Syntax--
In files and scritps a color can be represented as
@@ -7,9 +7,9 @@ where red_component, green_component and blue_component are numbers between 0 an
--Examples--
For example:
! Code Represents
| @rgb(255,255,255)@ white, <span style="border:1px solid black; background:white;width:20px;"> </span>
| @rgb(0,0,0)@ black, <span style="border:1px solid black; background:white;width:20px;"> </span>
| @rgb(255,0,0)@ red, <span style="border:1px solid black; background:red;width:20px;"> </span>
| @rgb(0,255,0)@ green, <span style="border:1px solid black; background:green;width:20px;"> </span>
| @rgb(0,0,255)@ blue, <span style="border:1px solid black; background:blue;width:20px;"> </span>
! Code Represents <<<
| @rgb(255,255,255)@ white <div style="border:1px solid black; background:white;width:30px;height:15px;"> </div>
| @rgb(0,0,0)@ black <div style="border:1px solid black; background:black;width:30px;height:15px;"> </div>
| @rgb(255,0,0)@ red <div style="border:1px solid black; background:red; width:30px;height:15px;"> </div>
| @rgb(0,255,0)@ green <div style="border:1px solid black; background:rgb(0,255,0);width:30px;height:15px;"> </div>
| @rgb(0,0,255)@ blue <div style="border:1px solid black; background:blue; width:30px;height:15px;"> </div>
+17
View File
@@ -0,0 +1,17 @@
Data type: dependency
--Overview--
[[type:Package]]s can depend on other packages.
For example a [[type:stylesheet]] needs a particular version of the corresponding [[type:game]] package, and maybe some additional [[type:include]]s.
--Proeprties--
! Property Type Description
| @package@ [[type:string]] Filename of the package this package depends on.
| @version@ [[type:version]] Minimal version of that package that is required.
--Example--
The magic-new stylesheet depends on a particular version of the game file:
>depends on:
> package: magic.mse-game
> version: 2007-06-06
+18
View File
@@ -0,0 +1,18 @@
Primitive type: function
--Overview--
The [[script:index|scripting language]] allows you to define custom functions.
--Syntax--
A piece of code enclosed in curly braces defines a function.
--Composition--
Functions can be composed using the @+@ operator, evaluating @a + b@ first evaluates @a@ and uses its result as @input@ for @b@:
> example := to_upper + { "result == {input}" }
> example("xyz") == "result == XYZ"
Multiple functions can be changed together like this, especially using [[script:rule form]].
--Example--
> example := { a + b }
> example(a: 1, b: 2) == 3
+28
View File
@@ -0,0 +1,28 @@
Primitive type: image
Images are generated using scripts.
It is either given using a [[type:filename]] or as the output of a function.
--File syntax--
The syntax for files is similair to that of [[type:scriptable]] properties:
> image: image.png
> image: { "image.png" }
> image: { linear_blend(...) }
--Script syntax--
[[type:Filename]]s are implicitly converted to images as needed.
--See also--
The following functions transform images:
| [[fun:linear_blend]] Blend two images together using a linear gradient.
| [[fun:masked_blend]] Blend two images together using a third mask image.
| [[fun:combine_blend]] Blend two images together using a given [[type:combine|combining mode]].
| [[fun:set_mask]] Set the transparancy mask of an image.
| [[fun:set_alpha]] Change the transparency of an image.
| [[fun:set_combine]] Chnage how the image should be combined with the background.
| [[fun:enlarge]] Enlarge an image by putting a border around it.
| [[fun:crop]] Crop an image, giving only a small subset of it.
| [[fun:drop_shadow]] Add a drop shadow to an image.
| [[fun:symbol_variation]] Render a variation of a [[type:symbol]].
| [[fun:built_in_image]] Return an image built into the program.
+22
View File
@@ -0,0 +1,22 @@
File type: Include package
--Overview--
An include package contains files used by other packages, for example scripts or images.
--Package format--
An include package is described in a [[file:package]] with the <tt>.mse-include</tt> file extension.
It should contain a [[file:format|data file]] called <tt>include</tt> with the following properties.
--Properties--
! Property Type Default Description
| '''Common to all packages''' <<< <<< <<<
| @mse version@ [[type:version]] ''required'' Version of MSE this include package is made for.
| @short name@ [[type:string]] file name A short name of this include package, currently not used.
| @full name@ [[type:string]] file name A longer name of this include package, currently not used.
| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this export template, currently not used.
| @version@ [[type:version]] @0.0.0@ Version number of this package.
| @depends on@ [[type:list]] of [[type:dependency]]s
Packages this package depends on.
No additional properties are available.