Open main menu

SAGA/Datafiles/Animation

< SAGA‎ | Datafiles
Revision as of 17:37, 18 July 2007 by Clone2727 (talk | contribs) (adding saga animation resource page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

SAGA_ANIMATION_HEADER

Animation resources begin with the following header:

Type Order Name Description
INT16 LE magic Magic number ( 0x68 )
INT16 LE animation_w Logical screen width for animation
INT16 LE animation_h Logical screen height for animation
BYTE - ? ? (Appears to always be 0 )
BYTE - ? ? (Appears to always be 0 )
BYTE - frame_count Number of frames in animation ( sometimes off )
BYTE - control_code Control code; 0 = play once, 1 = loop, >1 ?
BYTE - ? ? ( Varies )
BYTE - ? ? ( Varies )

The entirety of an animation resource is actually a RLE codestream, but for sake of simplicity the header and individual frame headers are treated here separately.

SAGA_FRAME_HEADER

Immediately following the SAGA_ANIMATION_HEADER is an RLE marker indicating that the first frame header follows after.

Type Order Name Description
BYTE - mark_byte RLE marker for frame header (0x15)


Type Order Name Description
INT16 BE x_start_offset Offset from x_position at which to begin decoding
BYTE - y_start_offset Offset from y_position at which to begin decoding
BYTE - pad Structure padding? (Always 0)
INT16 BE x_position Frame x position on logical screen
INT16 BE y_position Frame y position on logical screen
INT16 BE width Frame width
INT16 BE height Frame height

The SAGA_FRAME_HEADER structure is unusual in that its members are big endian.

The RLE encoded frame data follows after; followed in turn by additional frames if present. See the ITE_RLE3 compression format.