DKRDS Sprite Group (File Format): Difference between revisions
mNo edit summary |
|||
| Line 9: | Line 9: | ||
| 0x00 || UInt16 || {{unknown-left|'''Unknown'''. Always 0?}} | | 0x00 || UInt16 || {{unknown-left|'''Unknown'''. Always 0?}} | ||
|- | |- | ||
| 0x02 || | | 0x02 || Byte || {{unknown-left|'''Unknown'''. Number of sets? Always 1?}} | ||
|- | |||
| 0x03 || Byte || '''Format''': | |||
* 0 = Palette16 | |||
* 1 = Palette256 | |||
|- | |- | ||
| 0x04 || Int32 || '''Maximum number of blocks''' in this group to be rendered on the screen. | | 0x04 || Int32 || '''Maximum number of blocks''' in this group to be rendered on the screen. | ||
| Line 77: | Line 81: | ||
=== Tile Texture Data === | === Tile Texture Data === | ||
Texture data is stored as swizzled 8x8 blocks | Texture data is stored as swizzled 8x8 blocks. Palette data is stored in separate files. | ||
= Tools = | = Tools = | ||
Latest revision as of 01:01, 17 May 2026
DKRDS Sprite Group is the nameless file format used in Diddy Kong Racing DS that stores a formation of tiles and positions to create sprites. Its type identifier in assets.bin is 0x00.
Header
The file starts with a header that is 12 bytes long.
| Offset | Type | Description |
|---|---|---|
| 0x00 | UInt16 | Unknown. Always 0? |
| 0x02 | Byte | Unknown. Number of sets? Always 1? |
| 0x03 | Byte | Format:
|
| 0x04 | Int32 | Maximum number of blocks in this group to be rendered on the screen. |
| 0x08 | Int32 | Tile Generator offset. Always 0xC? |
| 0x0C | End of header, start of Tile Generator | |
Tile Generator
All offsets from here on are always relative to the start of this section.
| Offset | Type | Description |
|---|---|---|
| 0x00 | UInt16 | Number of Tile Sets (S). |
| 0x02 | UInt16 | Total number of tile texture blocks. |
| 0x04 | Tile Set[S] | Tile set entries, 8 bytes long each. |
Tile Set
Each tile set links tile information blocks with tile texture data.
| Offset | Type | Description |
|---|---|---|
| 0x00 | UInt16 | Tile Texture Data offset. |
| 0x02 | UInt16 | Tile Information Block offset. |
| 0x04 | UInt16 | Number of tiles (T). |
| 0x06 | UInt16 | Total texture data length in bytes, of all tiles in this set. |
Tiles
After all tile set entries are defined, each pair of arrays, that is T tile information blocks, and then its corresponding T tile texture data chunks; are stored sequentially.
Tile Information Block
Each information block is 8 bytes long and stores position and tile format data.
| Offset | Type | Description |
|---|---|---|
| 0x00 | Int16[2] | Cumulative tile XY position. The coordinates are based on the top-left corner, being the origin the previous tile's top-left pixel. |
| 0x04 | Byte | Number of 8x8 texture blocks for this tile. |
| 0x05 | Byte | Texture dimensions. Only the 4 least significant bits are taken into account:
|
| 0x06 | UInt16 | Unknown. Padding? |
Tile Texture Data
Texture data is stored as swizzled 8x8 blocks. Palette data is stored in separate files.
Tools
The following tools can handle DKRDS Sprite Group:
- (none)