DKRDS Texture Group (File Format): Difference between revisions
m (→Palette Entry) |
No edit summary |
||
| Line 53: | Line 53: | ||
=== Palette Entry === | === 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. | 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. The first color will always be used for transparency except for formats 1 (A3I5) and 6 (A5I3). | ||
{|class=wikitable | {|class=wikitable | ||
Latest revision as of 13:08, 10 June 2026
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 | Flags:
|
| 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. The first color will always be used for transparency except for formats 1 (A3I5) and 6 (A5I3).
| Offset | Type | Description |
|---|---|---|
| 0x00 | Byte[4] | Palette UID. Presumably the checksum of its original file name. |
| 0x04 | UInt16 | Palette size in bytes. |
| 0x06 | UInt16 | Unknown. Seen as 1 when there's an external texture reference. |
| 0x08 | End of Palette Entry header, start of palette data | |
Tools
The following tools can handle DKRDS Texture Group:
- (none)