TXTR (File Format)
From Wexos's Wiki
TXTR (TeXTuRe) is a texture file format stores as subfiles in PAK files. It is used in games like Donkey Kong Country Returns and developed by RetroStudios.
File Format
Header
The file starts with a header of size 0x0C:
| Offset | Type | Description |
|---|---|---|
| 0x00 | UInt32 | Image format. |
| 0x04 | UInt16 | Width of image in pixels. |
| 0x06 | UInt16 | Height of image in pixels. |
| 0x08 | UInt32 | Number of mipmaps, including main image. |
Palette
If the image format is a palette format, in other words C4, C8 or C14X2, the following structure follows the header:
| Offset | Type | Description |
|---|---|---|
| 0x00 | UInt32 | Palette format. |
| 0x04 | UInt16 | Palette width (?). Always 1 for C4, 256 for C8. |
| 0x06 | UInt16 | Palette height (?). Always 16 for C4, 1 for C8. |
The palette data follows.
Image Data
The image data follows the header, or the palette data if palettes exist.
Tools
The following tools can handle TXTR files:
- crPakTool by jellees