Changes
Jump to navigation
Jump to search
no edit summary
Battle animation files start with a DWORD which tells us how many animations are in the file. This number includes the special animations which are not actually animations at all. Although I have not yet decoded them, I suspect these are sets of keys for actual animation sets; keys that call scripted actions or tell the engine to print the damage numbers.
==== FF7FrameHeader ====
Cloud’s battle animation file (rtda) has 94 (0x 5E) animations in it.
After this number begins each animation.
</pre></code>
==== FF7FrameMiniHeader ====
Most of these members are straight-forward, however there is a very special and VERY important member in the "FF7FrameMiniHeader" structure called "bKey".
This is used for every rotation-decoding scheme (but one). It determines, essentially, the precision of the rotations and the deltas that follow in successive frames.
Most large rotation deltas are things that are spinning, such as the blades on Aero Combatant. These cases are always a nice round number that can be handled with lower precision (in the case of Aero Combatant, it is 90 degrees even).
==== FF7ShortVec ====
Now the code to skip to any animation, by index, where "iTarget" is the index. This code assumes you have already opened the animation file (hFile) and you have skipped pasted the first 4 bytes.
We now have the animation we want loaded into a BYTE array (remember to delete it later).
==== FF7FrameBuffer ====
Now let’s look at the other structures we will use.