FTXP (File Format)

From MK8
Revision as of 00:36, 27 May 2017 by Ray Koopa (talk | contribs) (Redirect user data links to main BFRES page.)
Jump to navigation Jump to search
Under Construction
This article is not finished. Help improve it by adding accurate information or correcting grammar and spelling.

FTXP files (caFe TeXture Pattern) are texture pattern animation files found into BFRES files in the 6:th index group. It contains animation data about which texture that should be rendered at what time. Unless otherwise noted, all offsets in the file are relative to themselves.

Header

The file starts with a 0x38 bytes long header.

Offset Type Description
0x00 String File magic. Always FTXP in ASCII.
0x04 Int32 Filename offset. The name of this file.
0x08 Int32 End of String table offset.
0x0C UInt16 Flags.
Bit (MSB) Size (in bits) Description
0x0D 0x01 Loops.
0x0E UInt16 Number of user data.
0x10 UInt32 Number of frames.
0x14 UInt16 Number of textures.
0x16 UInt16 Number of materials.
0x18 UInt32 Unknown.
0x1C UInt32 Unknown.
0x20 UInt32 Unknown.
0x24 UInt32 Unknown.
0x28 UInt32 Unknown.
0x2C Int32 Material array offset.
0x30 Int32 Texture index group offset. The groups point to FTEX filenames and FTEX headers.
0x34 Int32 User Data index group offset.

Material

This section describes info about the material that is animated.

Offset Type Description
0x00 UInt16 Number of texture targets.
0x02 UInt16 Number of animations.
0x04 UInt32 Unknown.
0x08 UInt32 Unknown.
0x0C Int32 Name offset. Points to the name of the material into the string table.
0x10 Int32 Texture target array offset.
0x14 Int32 Animation array offset.
0x18 UInt32 Unknown.

Texture target

A texture target points to a texture type, _a0, _a1 etc. Each entry is a 8 byte structure.

Offset Type Description
0x00 Byte Unknown.
0x01 Byte Unknown.
0x02 UInt16 Unknown.
0x04 Int32 Offset to the texture type string.

Animation

Offset Type Description
0x00 UInt16 Flag.
0x02 UInt16 Number of key frames.
0x04 UInt32 Unknown.
0x08 Float Min key. The value of the smallest key frame.
0x0C Float Max key. The value of the largest key frame.
0x10 UInt32 Unknown.
0x14 UInt32 Unknown.
0x18 Float Max value. The value of the largest animation value.
0x1C Int32 Key frame data offset.
0x20 Int32 Value data offset.