TXTR (Metroid Prime)

Note: The Tropical Freeze TXTR format is completely different, but doesn't have a page yet.

TXTR is, as the name suggests, the Retro Studios texture format. The format remains completely unchanged from Metroid Prime all the way up to Donkey Kong Country Returns.

Format
TXTR files contain a very short 12-byte header, followed by the image data.

Palettes
The C4 and C8 image formats contain a palette table after the header, before the image data begins.

Image Formats
There are 11 different image formats; these are built directly into GX, so they remain the same across all GameCube and Wii games. Rather than storing pixels in a linear left-to-right order, GX textures encode pixels in large blocks. The size of the block varies depending on the image format.

For example, suppose you have a format that stores 4x4 blocks. Pixels 1-4 of the image will make up the first row of the first block; pixels 5-8 will make up the second row; 9-12 will make up the third row; 13-16 will make up the fourth row, completing the block; and the 17-20 will begin the first row of the second block, appearing directly to the right of the first row of the first block.