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 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.
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.
|
0x0E |
UInt16 |
Number of user data.
|
0x10 |
UInt32 |
Number of frames.
|
0x14 |
UInt16 |
Number of textures.
|
0x16 |
UInt16 |
Number of material targets.
|
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 points to FTEX filenames and FTEX headers.
|
0x34 |
Int32 |
User data index group offset.
|
Material
Offset |
Type |
Description
|
0x00 |
UInt16 |
N = Number of samplers.
|
0x02 |
UInt16 |
Unknown.
|
0x04 |
UInt32 |
Unknown.
|
0x08 |
UInt32 |
Unknown.
|
0x0C |
UInt32 |
Name offset. Points to the name of this material into the string table.
|
0x10 |
Sampler reference[N] |
Sampler references. The offsets are relative to 0x10 in this structure.
|
Sampler reference
Offset |
Type |
Description
|
0x00 |
UInt32 |
Sampler offset. Relative to the end of the material structure.
|
0x04 |
UInt32 |
Unknown. Probably an offset to something else.
|
Sampler
Offset |
Type |
Description
|
0x00 |
UInt16 |
Unknown.
|
0x02 |
UInt16 |
Unknown.
|
0x04 |
Int32 |
Sampler name offset into the string table.
|
User Data
The user data is stored into different entries, one for each type. The index group points to these entries.
Offset |
Type |
Description
|
0x00 |
Int32 |
Name offset. Points to the string which is the name of this user data.
|
0x04 |
UInt16 |
N = number of entries.
|
0x06 |
Byte |
Type.
Value |
Type |
Description
|
0x00 |
Int32 |
The data consists of 4-bytes integers.
|
0x01 |
Float |
The data consists of 4-bytes floating point numbers.
|
0x02 |
String |
The data consists of ASCII-encoded strings.
|
0x03 |
Strings |
The data consists of UTF16-encoded strings.
|
|
0x07 |
Byte |
Unknown. Always 0.
|
Number
For user data with numbers the data comes directly after the user data header.
String
Offset |
Type |
Description
|
0x00 |
Int32[N] |
N offsets to the strings. The strings are null-termined and comes directly after this array. They're not stored in the string table.
|