DIV (File Format)

From Wexos's Wiki
(Redirected from DIV)
Jump to navigationJump to search

DIV files (DIVision) are used in Mario Kart 7 tracks to subdivide the course model in clipping bounding boxes, to reduce lag.

File Format

The file byte order is always little endian.

Header

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

Offset Type Description
0x00 Char[4] File magic. Always BADC in ASCII.
0x04 UInt32 File size in bytes.
0x08 UInt32 PAHS offset. Always 0x10.
0x0C Int32 Unknown. Always 1000.

PAHS

The PAHS section (SHAPe) contains a group of streams, one per polygon in the course BCRES file. The streams follow the same order as the polygons.

Offset Type Description
0x00 Char[4] Section magic. Always PAHS in ASCII.
0x04 Int32 Number of MRTS sections.

MRTS

The MRTS section (STReaM) contains axis-aligned bounding boxes (AABBs) that correspond to the polygon from the course model.

Offset Type Description
0x00 Char[4] Section magic. Always MRTS in ASCII.
0x04 UInt16 Number of bounding boxes (N).
0x06 UInt16 Number of vertices in the polygon.
0x08 + 0x10*N Float[2] Minimum position of the AABB.
0x10 + 0x10*N Float[2] Maximum position of the AABB.

Tools

The following tools can handle DIV files:

  • (none)