MKAGP BIN (File Format): Difference between revisions
From Wexos's Wiki
Jump to navigationJump to search
(Created page with "{{under-construction}} '''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: {| class="wikitable" ! Offset !! Type !! Description |- | 0x00 || Int32 || '''Grid width''' ('''W'''). |- | 0x04 || Int32 || '''Grid length''' ('''L'''). |- | 0x10 || Float || '''Grid cell X size'''. |- | 0x14 || Float || '''Grid ce...") |
mNo edit summary |
||
| Line 1: | Line 1: | ||
'''MKAGP BIN''' is a collision format used in [[Mario Kart Arcade GP]] and [[Mario Kart Arcade GP 2]]. | '''MKAGP BIN''' is a collision format used in [[Mario Kart Arcade GP]] and [[Mario Kart Arcade GP 2]]. | ||
| Line 35: | Line 34: | ||
| 0x00 || UInt32 || '''Triangles offset'''. Garbage data if none for this cell. | | 0x00 || UInt32 || '''Triangles offset'''. Garbage data if none for this cell. | ||
|- | |- | ||
| 0x04 || Int32 || '''Number of [[#Triangle|Triangles]]''' | | 0x04 || Int32 || '''Number of [[#Triangle|Triangles]]'''. | ||
|- | |- | ||
| 0x08 || UInt32 || '''Cubes offset'''. Garbage data if none for this cell. | | 0x08 || UInt32 || '''Cubes offset'''. Garbage data if none for this cell. | ||
|- | |- | ||
| 0x0C || Int32 || '''Number of [[# | | 0x0C || Int32 || '''Number of [[#Quad|Quads]]'''. | ||
|} | |} | ||
| Line 63: | Line 62: | ||
|} | |} | ||
==== | ==== Quad ==== | ||
These seem to be used for the wall collision. | These seem to be used for the wall collision. | ||
Revision as of 18:21, 29 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). |
| 0x10 | Float | Grid cell X size. |
| 0x14 | Float | Grid cell Y size. |
| 0x18 | Float[3] | AABB minimum coordinate. |
| 0x24 | Float[3] | AABB maximal coordinate. |
Grid
At the end of the file, the grid cell headers are stored in 0x10 byte blocks, starting at EOF - (W * L * 0x10) - 0x10.
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] | Minimul 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)