mirror of
https://github.com/n64decomp/mk64
synced 2026-08-07 18:02:04 -04:00
Rename surface map to collision mesh (#637)
This commit is contained in:
+15
-13
@@ -203,15 +203,17 @@ typedef struct {
|
||||
//bit 4: 1 = out of bounds
|
||||
//bit 3: 1 = player tumbles upon contact (may fall right through)
|
||||
/* 0x02 */ u16 surfaceType;
|
||||
/* 0x04 */ s16 vtx31;
|
||||
s16 vtx32;
|
||||
s16 vtx33; //X, Y, Z of poly's third vertex
|
||||
s16 vtx21;
|
||||
s16 vtx22;
|
||||
/* 0x0A */ s16 vtx23; //X, Y, Z of poly's second vertex
|
||||
/* 0x10 */ Vtx *vtxPoly1; //pointer to the 3 vertices of this poly
|
||||
Vtx *vtxPoly2;
|
||||
Vtx *vtxPoly3;
|
||||
|
||||
// For AABB bounding-box style collision. Box style collision is cheaper than checking each vtx.
|
||||
/* 0x04 */ s16 minX; // Minimum x coordinate
|
||||
s16 minY; // Minimum y coordinate
|
||||
s16 minZ; // Minimum z coordinate
|
||||
s16 maxX; // Maximum x coordinate
|
||||
s16 maxY; // Maximum y coordinate
|
||||
/* 0x0A */ s16 maxZ; // Maximum z coordinate
|
||||
/* 0x10 */ Vtx *vtx1; //pointer to the 3 vertices of this poly
|
||||
Vtx *vtx2;
|
||||
Vtx *vtx3;
|
||||
//unsure why this exists along with a copy of two of the vertices.
|
||||
//both are involved in hit detection.
|
||||
/* 0x1C */ f32 height;
|
||||
@@ -227,17 +229,17 @@ typedef struct {
|
||||
/* 0x24 */ f32 rotation; //normally about -0.001. no idea what this actually is.
|
||||
/* 0x28 */ f32 height2; //changes Y position of all vertices (but not graphics or
|
||||
//Lakitu drop position). Normally set to (track_height * -1) + about 6.
|
||||
} mk64_surface_map_ram; // size = 0x2C
|
||||
} CollisionTriangle; // size = 0x2C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f cornerPos;
|
||||
// Type of surface the corner is above
|
||||
/* 0x0C */ u8 surfaceType;
|
||||
// Close to being a copy of the top byte of the surface_map "flag" member
|
||||
// Close to being a copy of the top byte of the CollisionTriangle "flags" member
|
||||
/* 0x0D */ u8 surfaceFlags;
|
||||
// Don't know if "tile" is right the right term
|
||||
// gSurfaceMap is a pointer to an array of "tile" structs. This is an index to that array
|
||||
/* 0x0E */ u16 surfaceMapIndex;
|
||||
// gCollisionMesh is a pointer to an array of "tile" structs. This is an index to that array
|
||||
/* 0x0E */ u16 collisionMeshIndex;
|
||||
// cornerPos places the corner "in the air" as it were, this member indicates the Y position of the corner's "on the ground" sibling
|
||||
// On flat ground this value should be cornerY - gKartBoundingBoxTable[characterId]
|
||||
/* 0x10 */ f32 cornerGroundY;
|
||||
|
||||
Reference in New Issue
Block a user