Difference between revisions of "BRCTR (File Format)"
m (→Section 4: New thing found) |
(No indices of strings are used, only offsets) |
||
Line 132: | Line 132: | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || UInt16 || | + | | 0x00 || UInt16 || '''[[BRLYT]] text pane name offset'''. Links to the [[BRLYT]] text pane to use with the message (0 if used in all text panes => links to no name). This is relative to the start of the [[#NameTable|NameTable]]. |
|- | |- | ||
− | | 0x02 || UInt16 | | + | | 0x02 || UInt16 || '''Name offset''' (0 = no name). This is relative to the start of the [[#NameTable|NameTable]]. |
|- | |- | ||
| 0x04 || UInt32 || [[BMG#Message IDs|Message ID]]. | | 0x04 || UInt32 || [[BMG#Message IDs|Message ID]]. | ||
Line 149: | Line 149: | ||
== NameTable == | == NameTable == | ||
− | At the end of the file, there is a section with null-termined strings. It contains references to [[BRLYT]] pane names, functions found in [[Filesystem/rel/StaticR.rel|StaticR.rel]], [[BRLAN]] files and [[BRLAN (File Format)#pat1|BRLAN pat1 names]], which probably establish a link between them (they're configured in the previous sections) to load correctly in the game. The amount is not stored, so null-terminated strings should be read until the end of the file. | + | At the end of the file, there is a section with null-termined strings. The first byte is always 00, because of the offsets in the sections that doesn't have a name should be zero. It contains references to [[BRLYT]] pane names, functions found in [[Filesystem/rel/StaticR.rel|StaticR.rel]], [[BRLAN]] files and [[BRLAN (File Format)#pat1|BRLAN pat1 names]], which probably establish a link between them (they're configured in the previous sections) to load correctly in the game. The amount is not stored, so null-terminated strings should be read until the end of the file. |
= Tools = | = Tools = |
Revision as of 21:01, 27 February 2017
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. This kind of file is always found into the UI directory from the game's filesystem, and specifically into SZS files. They're located into ctrl folders.
File Format
File Header
The file starts with a header that is 0x14 byte long.
Offset | Type | Description |
---|---|---|
0x00 | String | File magic. Always bctr in ASCII. |
0x04 | UInt16 | Probably number of Sub-Headers. Always 00 02. |
0x06 | UInt16 | Probably number of NameTables. Always 00 01. |
0x08 | UInt16 | Unknown. |
0x0A | UInt16 | Unknown. |
0x0C | UInt16 | Offset to Sub-Header 1. |
0x0E | UInt16 | Offset to Sub-Header 2. |
0x10 | UInt16 | Offset to NameTable. |
0x12 | UInt16 | Unknown. |
Sub-Header 1
Offset | Type | Description |
---|---|---|
0x00 | UInt16 | Offset to start of section 1 (relative to the start of this header). |
0x02 | UInt16 | Number of section 1 entries. |
0x04 | UInt16 | Offset to start of section 2 (relative to the start of this header). |
0x06 | UInt16 | Number of section 2 entries. |
Section 1
Offset | Type | Description |
---|---|---|
0x00 | UInt16[2] | Name offsets (0 = no name). This is relative to the start of the NameTable. |
0x04 | UInt16 | This value refers to a section 2 ID. |
0x06 | UInt16 | Number of section 2 entries to use. |
Section 2
Offset | Type | Description |
---|---|---|
0x00 | UInt16[4] | Name offsets (0 = no name). This is relative to the start of the NameTable. |
0x08 | Float | Unknown. |
Sub-Header 2
Offset | Type | Description |
---|---|---|
0x00 | UInt16 | Offset to start of section 3 (relative to the start of this header). |
0x02 | UInt16 | Number of section 3 entries. |
0x04 | UInt16 | Offset to start of section 4 (relative to the start of this header). |
0x06 | UInt16 | Number of section 4 entries. |
0x08 | UInt16 | Offset to start of section 5 (relative to the start of this header). |
0x0A | UInt16 | Number of section 5 entries. |
Section 3
This is the section that is best 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 | Name offset (0 = no name). This is relative to the start of the NameTable. |
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 | This value refers to a section 4 ID. |
0x36 | UInt16 | Number of section 4 entries to use. |
0x38 | UInt16 | This value refers to a section 5 ID. |
0x3A | UInt16 | Number of section 5 entries to use. |
Section 4
This section refers to a message ID found in BMG files.
Offset | Type | Description |
---|---|---|
0x00 | UInt16 | BRLYT text pane name offset. Links to the BRLYT text pane to use with the message (0 if used in all text panes => links to no name). This is relative to the start of the NameTable. |
0x02 | UInt16 | Name offset (0 = no name). This is relative to the start of the NameTable. |
0x04 | UInt32 | Message ID. |
Section 5
This section consists of two name offsets to the NameTable.
Offset | Type | Description |
---|---|---|
0x00 | UInt16[2] | Name offsets (0 = no name). This is relative to the start of the NameTable. |
NameTable
At the end of the file, there is a section with null-termined strings. The first byte is always 00, because of the offsets in the sections that doesn't have a name should be zero. It contains references to BRLYT pane names, functions found in StaticR.rel, BRLAN files and BRLAN pat1 names, which probably establish a link between them (they're configured in the previous sections) to load correctly in the game. The amount is not stored, so null-terminated strings should be read until the end of the file.
Tools
The following tools can handle BRCTR files:
- BRCTR Position Editor, by Wexos (only positions are editable)