BRLAN (File Format)

From Custom Mario Kart
Revision as of 13:52, 4 June 2016 by Wexos (talk | contribs) (Created page with "'''BRLAN''' files ('''B'''inary '''R'''evolution '''L'''ayout '''A'''nimatio'''N''') controls animation on the UI layout. Together with BRCTR (File Format) and BRLYT (Fi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

BRLAN files (Binary Revolution Layout AnimatioN) controls animation on the UI layout. Together with BRCTR (File Format) and BRLYT (File Format) it controls the layout.

File Format

Header

The file starts with a header that is 0x10 bytes long.

Offset Type Description
0x00 String File identifier. RLAN in ASCII
0x04 UInt16 Byte order mark (BOM): FE FF for big endian and FF FE for little endian.
0x06 UInt16 Version number of file format.
0x08 UInt32 Length of the file in bytes.
0x0C UInt16 Offset to root section relative to start (usually 0x0010).
0x0E UInt16 Unknown (Always 00 02 in MKW?)
0x10 End of file header

pat1 Section

After the header comes the pat1 section.

Offset Type Description
0x00 String Section identifier. pat1 in ASCII
0x04 UInt32 Size of this section = S
0x08 UInt16 Unknown
0x0A UInt16 Unknown
0x0C UInt32 Unknown
0x10 UInt32 Size of this section
0x14 UInt16 Unknown
0x16 UInt16 Unknown
0x18 Byte isDescendingBind
0x19 Byte Unknown
0x1A UInt16 Unknown
0x1C String Name. Length = N (not stored)
0x1C + N Byte[] Padding
S End of section

pai1 Section

After the pat1 section comes the pai1 section.

Offset Type Description
0x00 String Section identifier. pat1 in ASCII
0x04 UInt32 Size of this section
0x08 UInt16 Number of frames
0x0A Byte Flags
0x0B Byte Unknown
0x0C UInt32 Number of entries = N
0x10 UInt16 Offset to entries (relative to the start of this section)
0x12 End of this section

Entries

The offset in the previous section points to this. This is simple an array of UInt32s that links to the next structure.

Offset Type Description
0x00 UInt32[N] Offset to Data (relative to the start of this section)
0x00 + 4 * N End of this section

The data points to this structure.

Offset Type Description
0x00 String Name. Always 0x14, unused bytes are padding (0)
0x14 UInt32 Unknown
0x18 UInt32 Size of this structure
0x1C End of this structure

Animation Header

This is the header for the actual animation

Offset Type Description
0x00 String Animation Type
0x04 Byte Number of animations
0x05 Byte[3] Padding?
0x05 Byte[3] Padding?
0x08 UInt32 Unknown
0x0C UInt32 Unknown
0x10 End of animation header

Animation

Before each animation entry there is a section

Offset Type Description
0x00 Byte Type 1
0x01 Byte Type 2
0x02 UInt16 Unknown
0x04 UInt16 Number of animation entries
0x06 UInt16 Unknown
0x08 UInt32 Unknown
0x0C End of this structure

After this structure comes the animations.

Offset Type Description
0x00 Float Frame
0x04 Float Value
0x08 Float Blend
0x0C End of this structure