MKAGP BIN (File Format): Difference between revisions
From Wexos's Wiki
Jump to navigationJump to search
No edit summary |
m (→Header) |
||
| Line 18: | Line 18: | ||
| 0x0C || Float || '''Grid cell Y size'''. | | 0x0C || Float || '''Grid cell Y size'''. | ||
|- | |- | ||
| 0x10 || Float[2] || '''AABB minimum coordinate'''. | | 0x10 || Float[2] || '''AABB minimum coordinate XZ'''. | ||
|- | |- | ||
| 0x18 || Float[2] || '''AABB maximum coordinate'''. | | 0x18 || Float[2] || '''AABB maximum coordinate XZ'''. | ||
|- | |- | ||
| 0x20 || Float[2] || '''Negaitive AABB minimum coordinate XZ'''. Unknown usage. | | 0x20 || Float[2] || '''Negaitive AABB minimum coordinate XZ'''. Unknown usage. | ||
Revision as of 14:00, 30 June 2025
MKAGP BIN is a collision format used in Mario Kart Arcade GP and Mario Kart Arcade GP 2.
File Format
The file byte order is always big endian.
Header
The file starts with the following header:
| Offset | Type | Description |
|---|---|---|
| 0x00 | Int32 | Grid width (W). |
| 0x04 | Int32 | Grid length (L). |
| 0x08 | Float | Grid cell X size. |
| 0x0C | Float | Grid cell Y size. |
| 0x10 | Float[2] | AABB minimum coordinate XZ. |
| 0x18 | Float[2] | AABB maximum coordinate XZ. |
| 0x20 | Float[2] | Negaitive AABB minimum coordinate XZ. Unknown usage. |
| 0x28 | UInt32 | Grids offset. |
Grid
At the end of the file, W * L grid cell headers are stored in 0x10 byte blocks.
Cell
All offsets are absolute.
| Offset | Type | Description |
|---|---|---|
| 0x00 | UInt32 | Triangles offset. Garbage data if none for this cell. |
| 0x04 | Int32 | Number of Triangles. |
| 0x08 | UInt32 | Cubes offset. Garbage data if none for this cell. |
| 0x0C | Int32 | Number of Quads. |
Triangle
| Offset | Type | Description |
|---|---|---|
| 0x00 | Float[2] | Minimal coordinate for this triangle. |
| 0x08 | Float[2] | Maximal coordinate for this triangle. |
| 0x10 | Float[3][3] | Triangle vertices XYZ position. |
| 0x34 | Float[3][3] | Triangle edges XYZ position. |
| 0x58 | UInt32 | Neighbour triangle flag, used to determine which edges connect to other triangles. |
| 0x5C | UInt32 | MKAGP BIN flag. |
| 0x60 | Float[3] | Triangle normal. |
| 0x6C | Float | Negative dot product between triangle center and triangle normal. |
Quad
These seem to be used for the wall collision.
| Offset | Type | Description |
|---|---|---|
| 0x00 | Float[2][4] | Quad XZ positions. |
Tools
The following tools can handle MKAGP BIN files:
- (none)