BRLYT (File Format)
BRLYT files (Binary Revolution LaYouT) are layout files. They files are always found into the blyt folders.
File Format
Header
The file starts with a header that is 0x10 bytes long:
Offset | Type | Description |
---|---|---|
0x00 | String | File magic. Always RLYT in ASCII. |
0x04 | UInt16 | Byte order mark (BOM): The value is always 0xFEFF. If value 0xFFFE is read, then the false endian is used. Mario Kart Wii uses nearly always big endian (bytes 0xFE,0xFF). |
0x06 | UInt16 | Version number of the file format. |
0x08 | UInt32 | Length of the file in bytes. |
0x0C | UInt16 | Length of this header in bytes. |
0x0E | UInt16 | Number of sections. |
0x10 | End of file header |
Sections
BRLYT files constist of many different sections. The section can be identified by checking the first four bytes; it is a magic that identifies the section.
lyt1
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. Always lay1 in ASCII. |
0x04 | UInt32 | Section size. |
0x08 | Byte | Is Centered. |
0x09 | Byte[3] | Padding? |
0x0C | UInt32 | Width. |
0x10 | UInt32 | Height. |
txl1
The txl1 sections stores TPL filenames. The section starts with a header:
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. Always txl1 in ASCII. |
0x04 | UInt32 | Section size. |
0x08 | UInt16 | Number of TPL filenames. |
0x0A | UInt16 | Unknown. |
After this section header comes the offsets to the strings. Each entry has the following structure.
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Offset to a TPL filename which is stored as a null-termined string. Relative to the start of the txl1 section. |
0x04 | UInt32 | Padding. |
mat1
The mat1 section holds data about materials used in the layout. The section starts with a header:
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. Always mat1 in ASCII. |
0x04 | UInt32 | Section size. |
0x08 | UInt16 | N= Number of materials. |
0x0A | UInt16 | Unknown. |
0x0C | UInt32[N] | Offsets to the materials. Relative to the start of this section. |
Each material is the following structure:
Offset | Type | Description |
---|---|---|
0x00 | String | Material name. The length is always 0x14, unused bytes are set to 00. |
0x14 | Int16[4] | Fore Color in RGBA format. |
0x1C | Int16[4] | Back Color in RGBA format. |
0x24 | Int16[4] | TevREG3 in RGBA format. |
0x2C | Int16[4] | TevKColor in RGBA format. |
0x24 | UInt32 | Flags. |
fnl1
The fnl1 section is a list of fonts.
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. Always mat1 in ASCII. |
0x04 | UInt32 | Section size. |
0x08 | UInt16 | N= Number of fonts. |
0x0A | UInt16 | Unknown. |
After this section header comes the offsets to the strings. Each entry has the following structure.
Offset | Type | Description |
---|---|---|
0x00 | UInt32 | Offset to a font filename which is stored as a null-termined string. Relative to the start of the fnl1 section. |
0x04 | UInt32 | Padding. |
Tools
The following tools can handle BRLYT files:
- Benzin (converts BRLYT to XML and viceversa)
- Wii Layout Editor