Difference between revisions of "FTXP (File Format)"
Jump to navigation
Jump to search
m (→Header) |
(Not completed but it's a start) |
||
Line 5: | Line 5: | ||
The file starts with a 0x38 bytes long header. | The file starts with a 0x38 bytes long header. | ||
− | {| class="wikitable" | + | {|class="wikitable" |
|- | |- | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
Line 29: | Line 29: | ||
| 0x14 || UInt16 || Number of '''textures'''. | | 0x14 || UInt16 || Number of '''textures'''. | ||
|- | |- | ||
− | | 0x16 || UInt16 || Number of '''[[#Material| | + | | 0x16 || UInt16 || Number of '''[[#Material|materials]]'''. |
|- | |- | ||
| 0x18 || UInt32 || '''Unknown'''. | | 0x18 || UInt32 || '''Unknown'''. | ||
Line 41: | Line 41: | ||
| 0x28 || UInt32 || '''Unknown'''. | | 0x28 || UInt32 || '''Unknown'''. | ||
|- | |- | ||
− | | 0x2C || Int32 || '''Material''' array offset. | + | | 0x2C || Int32 || '''[[#Material|Material]]''' array offset. |
|- | |- | ||
| 0x30 || Int32 || '''Texture [[index group]]''' offset. The groups point to [[FTEX]] filenames and [[FTEX]] headers. | | 0x30 || Int32 || '''Texture [[index group]]''' offset. The groups point to [[FTEX]] filenames and [[FTEX]] headers. | ||
Line 49: | Line 49: | ||
== Material == | == Material == | ||
− | {| class="wikitable" | + | This section describes info about the material that is animated. |
+ | |||
+ | {|class="wikitable" | ||
|- | |- | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || UInt16 || ''' | + | | 0x00 || UInt16 || Number of '''[[#Texture target|texture targets]]'''. |
|- | |- | ||
− | | 0x02 || UInt16 || ''' | + | | 0x02 || UInt16 || Number of '''[[#Animation|animations]]'''. |
|- | |- | ||
| 0x04 || UInt32 || '''Unknown'''. | | 0x04 || UInt32 || '''Unknown'''. | ||
Line 61: | Line 63: | ||
| 0x08 || UInt32 || '''Unknown'''. | | 0x08 || UInt32 || '''Unknown'''. | ||
|- | |- | ||
− | | 0x0C || | + | | 0x0C || Int32 || '''Name offset'''. Points to the name of the material into the [[BFRES#String Table|string table]]. |
+ | |- | ||
+ | | 0x10 || Int32 || '''[[#Texture target|Texture target]]''' array offset. | ||
+ | |- | ||
+ | | 0x14 || Int32 || '''[[#Animation|Animation]]''' array offset. | ||
|- | |- | ||
− | | | + | | 0x18 || UInt32 || '''Unknown'''. |
|} | |} | ||
− | === | + | === Texture target === |
+ | A texture target points to a [[FMDL#Texture Attribute Selector|texture type]], _a0, _a1 etc. Each entry is a 8 byte structure. | ||
− | {| class="wikitable" | + | {|class="wikitable" |
|- | |- | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || | + | | 0x00 || Byte || '''Unknown'''. |
+ | |- | ||
+ | | 0x01 || Byte || '''Unknown'''. | ||
+ | |- | ||
+ | | 0x02 || UInt16 || '''Unknown'''. | ||
|- | |- | ||
− | | 0x04 || | + | | 0x04 || Int32 || Offset to the '''texture type''' string. |
|} | |} | ||
− | == | + | === Animation === |
− | {| class="wikitable" | + | |
+ | {|class="wikitable" | ||
|- | |- | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || UInt16 || '''Unknown'''. | + | | 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 || Float || '''Max value'''. The value of the largest animation value. | ||
+ | |- | ||
+ | | 0x18 || Int32 || '''Key frame''' data offset. | ||
|- | |- | ||
− | | | + | | 0x1C || Int32 || '''Value''' data offset. |
|} | |} | ||
Line 92: | Line 116: | ||
The user data is stored into different entries, one for each type. The [[index group]] points to these entries. | The user data is stored into different entries, one for each type. The [[index group]] points to these entries. | ||
− | {| class="wikitable" | + | {|class="wikitable" |
|- | |- | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
Line 117: | Line 141: | ||
|} | |} | ||
− | + | ; Numbers | |
For user data with numbers the data comes directly after the user data header. | For user data with numbers the data comes directly after the user data header. | ||
− | + | ; Strings | |
− | {| class="wikitable" | + | {|class="wikitable" |
|- | |- | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description |
Revision as of 14:46, 26 April 2017
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.
| ||||||
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 | Float | Max value. The value of the largest animation value. |
0x18 | Int32 | Key frame data offset. |
0x1C | Int32 | Value data offset. |
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.
| |||||||||||||||
0x07 | Byte | Unknown. Always 0. |
- Numbers
For user data with numbers the data comes directly after the user data header.
- Strings
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. |