[ Header ]
DWORD animTrackCount
DWORD framesPerTrack
This is then followed by animTrackCount Track records:
[ Track ]
DWORD id
DWORD type
DWORD values[framesPerTrack]
Finally, the file is terminated by a Flag Track:
[ Flag Track ]
DWORD values[2 x framesPerTrack]
Some notes:
- The Track record id field ranges from 0 to animTrackCount-1 (Track records appear in ascending order).
- The Track type field determines the transformation the track performs - the values are:
- 0=Translate along X axis (track values are signed integer)
- 1=Translate along Y axis (track values are signed integer)
- 2=Translate along Z axis (track values are signed integer)
- 3=Rotate around X axis (track values are 16:16 fixed point)
- 4=Rotate around Y axis (track values are 16:16 fixed point)
- 5=Rotate around Z axis (track values are 16:16 fixed point)
- I'm still working on decoding the Flag Track values (currently trying to match up what's documented in MW2DOC.HTM in the Mercs tools directory with the file data). My best guess is that there are two consecutive DWORD values per frame, with the first specifying control codes and the second specifying their parameters.
- The ANIM chunk identifies the 3DI file to use (WASM syntax example "animfile maddanim").
- A series of TSK chunks tie objects in the gamepiece hierarchy to animation tracks (WASM syntax example "task animator 0 TW_HIPS;57,129,0" - connects track 0 to TW_HIPS).