Banjo-Kazooie uses animation files comprised of a list of Internal Bone IDs, their transformation type (scale, rotate or translate), and across which frames of an animation these transformations occur. Animation indices can be found by searching the Rom Map.
Animation bins are consistently comprised of three segments:
Address | Value / Syntax | Description |
---|---|---|
0x0000 | [xx xx] | Start Frame of animation |
0x0004 | [yy yy] | End Frame of animation |
0x0008 | [zz zz] | Element Count |
0x000C | [00 00] | Padding / Unknown |
Example (60f0.bin, Banjo's Backflip at address 0x0):
00 0F 00 A5 00 48 00 00
Loads an animation beginning at frame 15 (0x0F) and ending at frame 165 (0xA5) with 72 (0x48) elements across those frames.
*Note that each Internal Bone ID may have more than one element corresponding to a separate, singular transformation type of that Bone during the animation. The Element Header is a pseudo header for each transform type based on the selected internal bone ID. An element header only exists before the transform section for its respective bone ID and a new one is generated when all transforms for data count [cc cc] have been written.
Offset from End of Header | Value / Syntax | Description |
---|---|---|
0x0000 | [aa ab] | aa = Internal Bone ID, b = Transform Type* |
0x0004 | [cc cc] | Data Count |
Example (60f0.bin, Banjo's Backflip at address 0x08):
00 10 00 09
This element targets Internal Bone ID 0x1, rotates the bone around the X axis, and does this at 9 different points between frames 15 and 165.
*Transform Type | Value |
---|---|
X Rotation | 0 |
Y Rotation | 1 |
Z Rotation | 2 |
X Scale | 3 |
Y Scale | 4 |
Z Scale | 5 |
X Translation | 6 |
Y Translation | 7 |
Z Translation | 8 |
*Note that transform structure is repeated for instances [cc cc] where cc cc = Data Count from the preceding element header prior to introducing the next element header.
Offset from End of Element Header | Value / Syntax | Description |
---|---|---|
0x0000 | [de ee] | d = ?? (0x0, 0x4, 0x8, or 0xC), e ee = Frame of transform |
0x0004 | [ff ff] | Transform Factor |
Example (60f0.bin, Banjo's Backflip at address 0x0C):
C0 0F 15 E6
At frame 15 (0xF), transform by a factor of 87.59375 (0x15E6).