1. References
2. Introduction
3. Header
4. Frames
5. New chunk types
6. File Format Changes
========================================
1. References
========================================
========================================
2. Introduction
========================================
The format is much like FLI/FLC files, but with different magic number
and differents chunks. Also, the color depth can be 8, 16 or 32 for
Indexed, Grayscale and RGB respectively, and the images are more easy
to read (there aren't differences with old frames). The palette isn't
included for color depths more than 8, but when the sprite is 8 bpp,
the palette is in a FLI color chunk (it could be type=11 or type=4).
See fli.txt for details.
========================================
3. Header
========================================
========================================
4. Frames
========================================
After the header come the "frames" data. Each frame has this little
header of 16 bytes:
========================================
5. New chunk types
========================================
WORD Flags:
LAYER_IS_READABLE = 0x0001
LAYER_IS_WRITABLE = 0x0002
LAYER_IS_LOCKMOVE = 0x0004
LAYER_IS_BACKGROUND = 0x0008
WORD Layer type (0=normal (image) layer, 1=layer set)
WORD Layer child level (see NOTE.1)
WORD Default layer width in pixels (ignored)
WORD Default layer height in pixels (ignored)
WORD DEPRECATED This field is not used anymore.
Blend mode (always 0 for layer set)
BLEND_MODE_NORMAL = 0
BLEND_MODE_DISSOLVE = 1
BLEND_MODE_MULTIPLY = 2
BLEND_MODE_SCREEN = 3
BLEND_MODE_OVERLAY = 4
BLEND_MODE_HARD_LIGHT = 5
BLEND_MODE_DODGE = 6
BLEND_MODE_BURN = 7
BLEND_MODE_DARKEN = 8
BLEND_MODE_LIGHTEN = 9
BLEND_MODE_ADDITION = 10
BLEND_MODE_SUBTRACT = 11
BLEND_MODE_DIFFERENCE = 12
BLEND_MODE_HUE = 13
BLEND_MODE_SATURATION = 14
BLEND_MODE_COLOR = 15
BLEND_MODE_LUMINOSITY = 16
BLEND_MODE_COPY = 17
BYTE[4] For future (set to zero)
STRING Layer name
WORD X position
WORD Y position
WORD Width
WORD Height
BYTE[8] For future (set to zero)
STRING Mask name
BYTE[] Bit map data (size = height*((width+7)/8))
Each byte contains 8 pixels (the leftmost pixels are
packed into the high order bits)
Never used.
Notes
----------------------------------------
========================================
File Format Changes
========================================
1) The first change from the first release of the new .ase format,
is the new frame duration field. This is because now each frame
can have different duration.
How to read both formats (old and new one)? You should set all
frames durations to the "speed" field read from the main ASE
header. Then, if you found a frame with the frame-duration
field > 0, you should update the duration of the frame with
that value.