A standard entry looks like:
GFX and ANIM is a word, B is a byte.
Code: Select all
GFX GFX GFX GFX GFX GFX ANIM B B B B B B B B ANIM B B B B B B B B ANIM B B B B B B B B
Each GFX is a pointer pointing to raw graphics. ANIM is a pointer that points to animation metadata which is used in conjunction with the B bytes.
the ANIM pointer points to a structure that looks like this:
OAM is a pointer to a table of pointers, each of which points to what I assume is OAM data. I haven't explored that specifically yet.
Code: Select all
OAM SEQ SEQ SEQ ...
SEQ is a pointer that points to actual metadata. The number of SEQs are variable, and my guess is the B bytes earlier refer to a SEQ pointer, so there needs to be a SEQ pointer for each B index. So to summarize, the game handles animations as follows: First, an animation is divided into sequences. For example, the tank firing is separated into 5 sequences:
0 - moving in (tread animating)
1 - stop tread animating?
2 - play brake animation
3 - fire
4 - ending?
The game then executes these in order (the exact order is 0 1 2 3 3 3 4 0).
I have no idea exactly how metadata works. The stuff I know so far is: each metadata atom is a variable number of bytes. I think if you have XX 10, then the next 2 bytes are also part of the atom, making XX 10 YY 00 an atom. XX corresponds to an OAM frame, and I think YY is duration? Other atoms I've seen are:
1C E0 - plays a sound effect (used by tanks and missiles, haven't checked other units)
00 20 - ??
00 FE - ??
I think the firing spark is handled separately from these animations, also based on my messing around with tanks.