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
The lyt1 sections comes after the header and defines the main layout.
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. Always lyt1 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 fnl1 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. |
pan1
The pan1 section contains information about a pane and starts a pane.
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. Always pan1 in ASCII. |
0x04 | UInt32 | Section size. |
0x08 | Byte | Visibility. |
0x09 | Byte | Origin. |
0x0A | Byte | Alpha. |
0x0B | Byte | Padding. |
0x0C | String | Pane name. The length is always 0x10, unused bytes are set to 00. |
0x1C | String | User data. |
0x24 | Float[3] | Translation. |
0x30 | Float[3] | Rotation. |
0x3C | Float[2] | Scale. |
0x44 | Float | Width. |
0x48 | Float | Height. |
pas1
The pas1 section is used as start of pane children data, after this section other panes can be defined. pae1 ends it.
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. Always pas1 in ASCII. |
0x04 | UInt32 | Section size. |
pae1
The pae1 section is used to end pane chilrens. pas1 starts it.
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. Always pae1 in ASCII. |
0x04 | UInt32 | Section size. |
grp1
The grp1 section defines a group.
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. Always grp1 in ASCII. |
0x04 | UInt32 | Section size. |
0x08 | String | Group name. The length is always 0x10 bytes long, unused characters are set to 00. |
0x18 | UInt16 | N = Number of entries. |
0x1A | UInt16 | Unknown. |
0x1C | String[N] | An array of entries in this group. The length of each string is always 0x10, unused characters are set to 00. |
pic1
The pic1 section defines an image.
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. Always grp1 in ASCII. |
0x04 | UInt32 | Section size. |
0x08 | Byte | Visibility. |
0x09 | Byte | Origin. |
0x0A | Byte | Alpha1. |
0x0B | Byte | Alpha2. |
0x0C | String | Image name. The length is always 0x18, unused characters are set to 00. |
0x24 | Float[3] | Position. |
0x30 | Float[2] | Flip. |
0x38 | Float | Angle. |
0x3C | Float[2] | Mag. |
0x44 | Float | Width. |
0x48 | Float | Height. |
txt1
Unknown.
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. Always txt1 in ASCII. |
bnd1
Unknown.
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. Always bnd1 in ASCII. |
grs1
The grs1 section defines a group of groups. gre1 ends the group of groups.
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. Always grs1 in ASCII. |
gre1
The gre1 section ends a group of groups. grs1 starts the group of groups.
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. Always gre1 in ASCII. |
Tools
The following tools can handle BRLYT files:
- Benzin (converts BRLYT to XML and viceversa)
- Wii Layout Editor