TXN
From mgsdevwiki
TXN files contain the information used to process the different textures in the game, such as its DXT type, height, width, etc. It also appears that when in memory TXNs will also contain the actual unzlibbed textures appended to the end. Evidence of this is that the offsets for the textures correspond to the end of the standalone TXN files.
Format Specifications
Metal Gear Solid 4
- Endian Order : Big Endian
Header | ||
---|---|---|
uint 32 {4} | Null Bytes: unknown | |
uint 32 {4} | Flag, unknown | |
uint 32 {4} | Number of textures | |
uint 32 {4} | Offset of first index of information | |
uint 32 {4} | Count of index items | |
uint 32 {4} | Offset of second index of information | |
uint 32 {4} | Count of second index items | |
uint 32 {4} | Null Bytes: unknown | |
uint 32 {4} | Null Bytes: unknown | |
TXN index 1 - for each texture file | ||
uint 16 {2} | texture width | |
uint 16 {2} | texture height | |
uint 16 {2} | texture fourCC | |
uint 16 {2} | texture flag: unknown | |
uint 32 {4} | texture offset | |
uint 32 {4} | texture mipmap offset | |
TXN Index 2 - for each texture file | ||
uint 32 {4} | unknown | |
uint 32 {4} | texture material ID | |
uint 32 {4} | texture object ID | |
uint 16 {2} | texture width | |
uint 16 {2} | texture height | |
uint 16 {2} | X position of texture in file (usually 0, but some texture files contain multiple textures at different coordinates) | |
uint 16 {2} | Y position of texture in file (usually 0, but some texture files contain multiple textures at different coordinates) | |
uint 32 {4} | offset for corresponding information in TXN index 1 | |
uint 32 {4} | Null Bytes: Unknown | |
float {4} | X weight | |
float {4} | Y weight | |
float {4} | X weight 2 | |
float {4} | Y weight 2 | |
uint 32 {4} | Null Bytes: Unknown |