Template:NX Dictionary
From Wexos's Wiki
A dictionary (sometimes known as DICT) is a common structure used in many Nintendo formats such as BFRES and BNTX. It is used for fast name look-up, in order to find a specific array item by its name. It starts with the following structure:
Offset | Type | Description |
---|---|---|
0x00 | Char[4] | Section magic. Always _DIC in ASCII. Note that in BFRES this magic is set to 00 00 00 00, most likely due to an export error. |
0x04 | Int32 | Number of entries. This does not include the root entry. |
After, the entries are specified. The root entry follows first, then all other entries are stored. Each entry has the following structure:
Offset | Type | Description |
---|---|---|
0x00 | Int32 | Ref bit. |
0x04 | UInt16[2] | Child node indices. First the left node, then the right node. |
0x08 | Int64 | Key offset, which points to the key name this entry stores. |
</noinclud File Formats]]