BRCTR (File Format)
The BRCTR (Binary Revolution ConTRol) filetype applies specific settings for BRLYT files and makes possible the use of BRLAN animation files in Mario Kart Wii's User Interface elements, such as buttons, backgrounds and layouts.
File Format
The file byte order is always big endian.
File Header
The file starts with a header that is 0x14 bytes long.
Offset | Type | Description |
---|---|---|
0x00 | Char[4] | File magic. Always bctr in ASCII. |
0x04 | UInt16 | Probably number of Sub-Headers. Always 00 02. |
0x06 | UInt16 | Main BRLYT name offset, relative to the start of the string table. |
0x08 | UInt16 | Namespace name offset, relative to the start of the string table. Usually Common, Menu, Number or Race. |
0x0A | UInt16 | Resource BRLYT name offset, relative to the start of the string table. |
0x0C | UInt16 | Sub-Header 1 offset, relative to the start of the file. |
0x0E | UInt16 | Sub-Header 2 offset, relative to the start of the file. |
0x10 | UInt16 | String table offset, relative to the start of the file. |
0x12 | UInt16 | Unknown. |
Sub-Header 1
Offset | Type | Description |
---|---|---|
0x00 | UInt16 | Section 1 offset, relative to the start of this header. |
0x02 | UInt16 | Number of section 1 entries. |
0x04 | UInt16 | Section 2 offset, relative to the start of this header. |
0x06 | UInt16 | Number of section 2 entries. |
Section 1
Section 1 configure a BRLYT group with animations.
Offset | Type | Description |
---|---|---|
0x02 | UInt16 | Function name offset, relative to the start of the string table. |
0x00 | UInt16 | BRLYT group name offset, relative to the start of the string table. Unknown if this only can be a group. |
0x04 | UInt16 | Section 2 ID. |
0x06 | UInt16 | Number of section 2 entries linked by this entry. |
Section 2
Section 2 stores data about BRLAN animations.
Offset | Type | Description |
---|---|---|
0x00 | UInt16 | Function name offsets, relative to the start of the string table. |
0x02 | UInt16 | BRLAN file name offset, relative to the start of the string table. Links to the filename of a BRLAN. |
0x04 | UInt16 | Next function name offset, relative to the start of the string table. If not empty, it links to the next function. |
0x06 | UInt16 | BRLYT name offset, relative to the start of the string table. Unknown usage. |
0x08 | Float | BRLAN animation speed multiplier. |
Sub-Header 2
Offset | Type | Description |
---|---|---|
0x00 | UInt16 | Section 3 offset, relative to the start of this header. |
0x02 | UInt16 | Number of section 3 entries. |
0x04 | UInt16 | Section 4 offset, relative to the start of this header. |
0x06 | UInt16 | Number of section 4 entries. |
0x08 | UInt16 | Section 5 offset, relative to the start of this header. |
0x0A | UInt16 | Number of section 5 entries. |
Section 3
This is the section that is most known. It contains float data specifying where to set the final position of a BRLYT pane, in 4:3 and 16:9 aspect ratios.
Offset | Type | Description |
---|---|---|
0x00 | UInt16 | Object name offset, relative to the start of the string table. |
0x02 | UInt16 | Alpha channel (0xFF = opaque, 0x00 = transparent). |
0x04 | UInt16 | 0 = don't use animation, 1 = use animation. |
0x06 | UInt16 | Padding? |
0x08 | Float | Delay time for the animation. When going back, the delay works inverse. |
0x0C | Float | Translation X (4:3). |
0x10 | Float | Translation Y (4:3). |
0x14 | Float | Translation Z (4:3). |
0x18 | Float | Scale X (4:3). |
0x1C | Float | Scale Y (4:3). |
0x20 | Float | Translation X (16:9). |
0x24 | Float | Translation Y (16:9). |
0x28 | Float | Translation Z (16:9). |
0x2C | Float | Scale X (16:9). |
0x30 | Float | Scale Y (16:9). |
0x34 | UInt16 | Section 4 ID. |
0x36 | UInt16 | Number of section 4 entries linked by this entry. |
0x38 | UInt16 | Ssection 5 ID. |
0x3A | UInt16 | Number of section 5 entries linked by this entry. |
Section 4
This section refers to a message ID found in BMG files.
Offset | Type | Description |
---|---|---|
0x00 | UInt16 | BRLYT text pane name offset, relative to the start of the string table. Links to the BRLYT text pane to use with the message. If empty, all text panes are used. |
0x02 | UInt16 | Unknown name offset, relative to the start of the string table. |
0x04 | UInt32 | BMG Message ID. |
Section 5
This section consists of two unknown names.
Offset | Type | Description |
---|---|---|
0x00 | UInt16 | Unknown name offset, relative to the start of the string table. |
0x02 | UInt16 | Unknown name offset, relative to the start of the string table. |
String Table
At the end of the file, there is a section with null-terminated strings. All string offsets are relative to the start of the string table, which is linked in the header. The first byte is always 00, because empty strings has offset 0. The string table contains references to BRLYT file names, BRLYT pane names, functions/objects found in StaticR.rel and BRLAN files, which probably establishes a link between them to load correctly in the game.
Tools
The following tools can handle BRCTR files:
- Wexos's Toolbox, by Wexos