Sonic Advance/Animation Format
From Sonic Retro
Revision as of 11:19, 6 September 2013 by MainMemory (talk | contribs) (Created page with "{{WIP}} The Sonic Advance animation format consists primarily of five pointers, in the following order: *[[#Palette, Tile, and Animation data|Palette, Tile, and Animation data...")
This article is a work in progress. Its content and location may change completely and frequently until this notice is removed. |
The Sonic Advance animation format consists primarily of five pointers, in the following order:
- Palette, Tile, and Animation data
- Mapping Frames data
- Sprite Attribute data
- Sprite palettes
- Sprite tiles
Sonic Advance 2 has one additional pointer of unknown purpose, and Sonic Advance 3 has two additional unknown pointers.
The first three sections all begin with a list of pointers with length equal to the number of animations in the game (see below).
Palette, Tile, and Animation data
Each animation's data begins with a list of pointers "sub-animations". I do not know how multiple sub-animations are used or how the game knows the number of sub-animations in each animation.
Each sub-animation begins with the following sequence of 32-bit integers:
- -2 (probably a data type indicator)
- The index in the sprite palettes to begin copying from
- The number of entries to copy into the GBA's sprite palette
- -1 (probably a data type indicator)
- The index in the sprite tiles to begin copying from
- The number of tiles to copy into the GBA's VRAM
- -6 (probably a data type indicator)
- An array of the following structure:
Offset | Description |
---|---|
0 | The index in the sprite tiles to begin copying from |
4 | The number of tiles to copy into the GBA's VRAM |
8 | The time to display the frame (0..128) |
C | An index to the mapping frame data to use |
10 | Some kind of flag, possible values include:
|
The tile data in the first frame seems to be ignored in favor of the data in the header. Instead, the "number of tiles to copy" contains some weird value like 0x1006F0FA.