SRT0 (File Format)

From Custom Mario Kart
Jump to navigation Jump to search
Under Construction
This article is not finished. Help improve it by adding accurate information or correcting grammar and spelling.


This page describes the Mario Kart Wii SRT0 file format, as found within BRRES files. They are Scale, Rotate and Translate texture animation files.

File Format

File Header

Offset Size Description
0x00 4 The magic "SRT0" to identify the sub file. See »BRRES Sub Files« for other magics.
0x04 4 Length of the sub file.
0x08 4 Sub file version number. The number of sections (N) is dependent of this version number. See »BRRES Sub Files« for details.
0x0C 4 Offset to outer BRRES File (negative value).
0x10 N*4 N section offsets. N is implied in the version number (offset 0x08).
0x10+N*4 4 String offset to the name of this sub file. This name equal to the name of the entry name of the BRRES Index Group pointing to this data.
0x14+N*4 End of this header

SRT0 Header

The SRT0 header follows directly after the file header. For SRT0 version 5, it starts at offset 0x1c and has the following layout:

offset size description
0x00 4 Unknown.
0x04 2 Frame count.
0x06 2 Animation data count.
0x08 4 Unsure. Matrix Mode: 0x0000 = Maya, 0x0001 = XSI, 0x0002 = 3ds Max.
0x0c 4 Looping 0x00=disabled 0x01=enabled.
0x10 End of header/Start of a filler

Animation Data (Section 0)

The start of section 0 is defined in the file header. It contains the animation data for the file. It starts with a BRRES Index Group. Each of the entries in the index group points to the animation information for one texture.

Texture Animation Data

The structure of the texture animation data which the index group points to has the following layout:

offset size description
0x00 4 String offset to the name of the material to animate.
0x04 4 Texture flags (M bits in this are set).
0x08 4 Unknown.
0x0c M*4 Entry offsets.
0x0c+M*4 End of structure

The animation animates a given material, with the texture flags field having bits set to indicate which of the eight possible textures to animate. The entries mentioned in the structure actually describe what to animate about the texture. Each one has the following layout:

offset size description
0x00 4 Animation type code. Determines how many animation data is required (P).
0x04 P*4 Animation data.
0x04+P*4 End of structure

The animation type code is a 32 bit structure with the following layout (msb first):

Bit 1f 1e 1d 1c 1b 1a 19 18 17 16 15 14 13 12 11 10
Meaning Unknown
Bit f e d c b a 9 8 7 6 5 4 3 2 1 0
Meaning Unknown Fixed Y Translation Fixed X Translation Fixed Rotation Fixed Y Scale Fixed Scale X Has Isotropic Scale Has Translation Has Rotation Has Scale Unknown

If present, the animation data is stored in the following order:

  1. Unknown
  2. Scale
  3. Rotation
  4. Translation X
  5. Translation Y

If the value is 'fixed', then the animation data contains a single to set the value to. If it is not fixed, the animation data field contains a pointer to an animation frame data structure data, which has the following layout:

offset size description
0x00 2 Frame count (Q).
0x02 2 Unknown.
0x04 4 Frame scale (single).
0x08 Q*12 Frame information.
0x08+Q*12 End of structure

The frame information data each has the following layout:

offset size description
0x00 4 Tangent (single).
0x04 4 Value (single).
0x08 4 Index (single).
0x0c End of structure

All information about the implementation of these structures is presently unknown.

Unknown Section (Section 1)



The following tools can handle SRT0 files:


All about BRRES files

BRRES fileIndex GroupSub Files