Data
Syntax:
Code: Select all
[Object].(Object.)[Variable]
(Object.) = Optional. The index of the object you want to access
[Variable] = The data itself.
Examples:
Code: Select all
[Sprites].[Title]
[Sprites].1.[Title]
[Original Levels].*.[Data]
The buildscript uses some kind of OO-language to indicate what data is needed. There are two types of "root"objects. Spritesheets & MapCollections. In EarlyMorning you give a name to those spritesheets and mapcollections. In the mapcollection you'll have to use that name to indicate which data you want.
If you created the SpriteSheet "Sprites" and you want to get the amount of sprites you have, you use for example:
Code: Select all
[Sprites].[Amount]
(Object.)
Every map and sprite is handled as a Object in EarlyMorning. Every sprite/map object has it's own variabls, just like a spritesheet and mapcollection. A spritesheet is an object which contains several other sprite objects. If you want to access a sprite, you will have to indicate an identifier to tell EarlyMorning which sprite you are talking about. Note that EarlyMorning starts counting with 0.
If you want to display the title of the 2nd sprite (1) of the SpriteSheet "Sprites" you should do the following:
Code: Select all
[Sprites].1.[Title]
All objects have a set of variables. Look below for a list of all variables.
Spritesheet
Code: Select all
[Title] : The title of the spritesheet.
[LastIndex] : The index of the last sprite within the spritesheet.
[Height] : The height of the sprites.
[Width] : The width of the sprites.
Code: Select all
[Title] : The title of the mapcollection.
[LastIndex] : The index of the last map within the mapcollection.
Code: Select all
[Title] : The title of the sprite.
[Data] : The spritedata. Data uses two arguments. See for more info below.
[Mask] : Only the maskdata of the sprite.
[Height] : Height of the sprite.
[Width] : Width of the sprite.
- 3.0.0.0 introduced a new way of getting the data by giving arguments. The syntax is as followed:
Format is the format of the data you want. The following formats can be used:
Code: Select all
[Object].(Object).[Data(Format, Compression)]
- Standard
- Masked (Interlanced)
No compressions can be chosen at the moment
Default is 'Standard' when no argument is given.
Examples:Code: Select all
[Sprites].*.[Data(Standard, Standard)] [Sprites].*.[Data()] [Sprites].*.[Data(,Standard)] [Sprites].*.[Data(Masked)]
Code: Select all
[Title] : The title of the map.
[Data] : Data of the map.
[Length] : The length of the map (H*W).
[Height] : The height of the map.
[Width] : The width of the map
- 3.0.0.0 introduced a new way of getting the data by giving arguments. The syntax is as followed:
Format is the format of the data you want. The following formats can be used:
Code: Select all
[Object].(Object).[Data(Format, Compression)]
- Standard
- Flagged
- Standard
- ByObject
- RLE
Examples:Code: Select all
[Maps].*.[Data(Standard, Standard)] [Maps].*.[Data()] [Maps].*.[Data(,ByObject)] [Maps].*.[Data(Flagged)]