DKRDS Texture Group (File Format)
From Wexos's Wiki
DKRDS Texture Group is the nameless file format used in Diddy Kong Racing DS that stores texture and palette data. This format is also implemented inside other files, such as DKRDS Model and DKRDS Track. Its type identifier in assets.bin is 0x0C.
Header
The file starts with a header that is 4 bytes long.
Offset | Type | Description |
---|---|---|
0x00 | UInt16 | Number of textures. |
0x02 | UInt16 | Number of palettes. |
0x04 | End of header, start of Texture Entries |
Texture Entry
After the header there's an entry for each texture. This entry consists of a 20-byte header followed by the texture data. In DKRDS Model files, the textures are referenced in the Texture Reference Table using 4-byte UIDs.
Offset | Type | Description |
---|---|---|
0x00 | Byte[4] | Texture UID. Presumably the checksum of its original file name. |
0x04 | Byte[4] | Palette UID. |
0x08 | UInt16 | Texture format:
|
0x0A | UInt16 | Wrap mode. Only 1 bit per S and T components is used:
|
0x0C | UInt16 | Unknown. Maybe TexGen, always 0? |
0x0E | UInt16 | Number of texture blocks, which is the texture data size divided by 0x10. |
0x10 | UInt16[2] | Texture dimensions (width and height). |
0x14 | End of Texture Entry header, start of texture data |
Palette Entry
After all the texture entries there's an entry for each palette. This entry consists of an 8-byte header followed by the RGBA5551 palette data.
Offset | Type | Description |
---|---|---|
0x00 | Byte[4] | Palette UID. Presumably the checksum of its original file name. |
0x04 | Int32 | Palette size in bytes. |
0x08 | End of Palette Entry header, start of palette data |
Tools
The following tools can handle DKRDS Texture Group:
- (none)