summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2023-08-22 19:12:51 -0600
committerGitHub <noreply@github.com>2023-08-22 19:12:51 -0600
commit6e3f6aee638adfaee3ccbd72dc0d18f10d9f4ef6 (patch)
tree5e02a7a8f34a17d14d07fc6ee2f94ebe287a0804 /include
parent6e5663895009a556afd7320aa4663434ddd46822 (diff)
Matched some funcs (#378)
* Matched code
Diffstat (limited to 'include')
-rw-r--r--include/actor_types.h32
-rw-r--r--include/bomb_kart.h2
-rw-r--r--include/common_structs.h18
-rw-r--r--include/course.h9
-rw-r--r--include/mk64.h2
-rw-r--r--include/objects.h2
-rw-r--r--include/variables.h4
7 files changed, 38 insertions, 31 deletions
diff --git a/include/actor_types.h b/include/actor_types.h
index f4f59eab2..3244c36c2 100644
--- a/include/actor_types.h
+++ b/include/actor_types.h
@@ -23,7 +23,7 @@ Specialized structs are customizable so long as the following member specificati
In general:
0x00 -> s16 type
0x02 -> s16 flags
- 0x30 -> UnkActorInner unk30
+ 0x30 -> Collision unk30
If player can collide with the actor:
0x0C -> f32 boundingBoxSize
@@ -102,7 +102,7 @@ struct Actor {
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
- /* 0x30 */ UnkActorInner unk30;
+ /* 0x30 */ Collision unk30;
}; // size = 0x70
extern struct Actor gActorList[ACTOR_LIST_SIZE]; // D_8015F9B8
@@ -125,7 +125,7 @@ struct TrainCar {
/* 0x10 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
- /* 0x30 */ UnkActorInner unk30;
+ /* 0x30 */ Collision unk30;
}; // size = 0x70
struct RailroadCrossing {
@@ -139,7 +139,7 @@ struct RailroadCrossing {
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
- /* 0x30 */ UnkActorInner unk30;
+ /* 0x30 */ Collision unk30;
}; // size = 0x70
struct FallingRock {
@@ -153,7 +153,7 @@ struct FallingRock {
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
- /* 0x30 */ UnkActorInner unk30;
+ /* 0x30 */ Collision unk30;
}; // size = 0x70
struct ActorSpawnData {
@@ -197,7 +197,7 @@ struct YoshiValleyEgg {
// Note, pathCenter[1] should be understood to be the Y velocity of the egg
// pathCenter[0] and pathCenter[2] are the X,Z coordinates of the center of the path
/* 0x24 */ Vec3f pathCenter;
- /* 0x30 */ UnkActorInner unk30;
+ /* 0x30 */ Collision unk30;
}; // size = 0x70
struct KiwanoFruit {
@@ -213,7 +213,7 @@ struct KiwanoFruit {
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
- /* 0x30 */ UnkActorInner unk30;
+ /* 0x30 */ Collision unk30;
}; // size = 0x70
struct PaddleWheelBoat {
@@ -227,7 +227,7 @@ struct PaddleWheelBoat {
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
- /* 0x30 */ UnkActorInner unk30;
+ /* 0x30 */ Collision unk30;
}; // size = 0x70
struct PiranhaPlant {
@@ -239,7 +239,7 @@ struct PiranhaPlant {
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec4s timers; // A per-camera timer. Might be more appropriate to call this state
/* 0x2C */ f32 unk_02C;
- /* 0x30 */ UnkActorInner unk30;
+ /* 0x30 */ Collision unk30;
}; // size = 0x70
// Copied from PiranhaPlant, may not be accurate.
@@ -253,7 +253,7 @@ struct PalmTree {
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec4s timers; // A per-camera timer. Might be more appropriate to call this state
/* 0x2C */ f32 unk_02C;
- /* 0x30 */ UnkActorInner unk30;
+ /* 0x30 */ Collision unk30;
}; // size = 0x70
typedef struct {
@@ -269,7 +269,7 @@ typedef struct {
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f unk_18;
/* 0x24 */ Vec3f shellIndices; // Indices in gActorList for the shells "owned" by this parent
- /* 0x30 */ UnkActorInner unk30;
+ /* 0x30 */ Collision unk30;
} TripleShellParent; // size = 0x70
struct ShellActor {
@@ -295,7 +295,7 @@ struct ShellActor {
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity; // All 0 until the shell is fired
- /* 0x30 */ UnkActorInner unk30;
+ /* 0x30 */ Collision unk30;
}; // size = 0x70
struct ItemBox {
@@ -313,7 +313,7 @@ struct ItemBox {
/* 0x24 */ f32 origY; // Original Y position. Basically the Y position the box will reset to after being touched
/* 0x28 */ f32 unk_028;
/* 0x2C */ f32 unk_02C;
- /* 0x30 */ UnkActorInner unk30;
+ /* 0x30 */ Collision unk30;
}; // size = 0x70
struct FakeItemBox {
@@ -329,7 +329,7 @@ struct FakeItemBox {
/* 0x24 */ f32 playerId;
/* 0x28 */ f32 targetY;
/* 0x2C */ f32 unk_02C;
- /* 0x30 */ UnkActorInner unk30;
+ /* 0x30 */ Collision unk30;
}; // size = 0x70
struct BananaBunchParent {
@@ -344,7 +344,7 @@ struct BananaBunchParent {
/* 0x1C */ s16 bananasAvailable;
/* 0x1E */ s16 unk_1E;
/* 0x20 */ f32 unk_20[4];
- /* 0x30 */ UnkActorInner unk30;
+ /* 0x30 */ Collision unk30;
}; // size = 0x70
struct BananaActor {
@@ -366,7 +366,7 @@ struct BananaActor {
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
- /* 0x30 */ UnkActorInner unk30;
+ /* 0x30 */ Collision unk30;
}; // size = 0x70
//#pragma GCC diagnostic pop
diff --git a/include/bomb_kart.h b/include/bomb_kart.h
index 428bf3531..f02910866 100644
--- a/include/bomb_kart.h
+++ b/include/bomb_kart.h
@@ -55,7 +55,7 @@ typedef struct {
extern s32 D_80183DD8[NUM_BOMB_KARTS_MAX];
extern struct_D_80163DE8_entry D_80163DE8[NUM_BOMB_KARTS_MAX];
-extern UnkActorInner D_80164038[NUM_BOMB_KARTS_MAX];
+extern Collision D_80164038[NUM_BOMB_KARTS_MAX];
// data/data_0DD0A0_1.s
extern BombKartSpawn D_800DCC08[NUM_COURSES][NUM_BOMB_KARTS_MAX];
diff --git a/include/common_structs.h b/include/common_structs.h
index b324800cf..3372ea73a 100644
--- a/include/common_structs.h
+++ b/include/common_structs.h
@@ -120,7 +120,7 @@ typedef struct {
/* 0x24 */ Vec3f unk54;
/* 0x30 */ Vec3f unk60;
/* 0x3C */ f32 unk6C;
-} UnkActorInner;
+} Collision;
typedef struct {
/* 0x00 */ Vec3f unk_000;
@@ -181,9 +181,15 @@ typedef struct {
//bit 4: 1 = out of bounds
//bit 3: 1 = player tumbles upon contact (may fall right through)
/* 0x02 */ u16 surfaceType;
- /* 0x04 */ s16 vtx3[3]; //X, Y, Z of poly's third vertex
- /* 0x0A */ s16 vtx2[3]; //X, Y, Z of poly's second vertex
- /* 0x10 */ Vtx *vtxs[3]; //pointer to the 3 vertices of this poly
+ /* 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;
//unsure why this exists along with a copy of two of the vertices.
//both are involved in hit detection.
/* 0x1C */ f32 height;
@@ -208,7 +214,7 @@ typedef struct {
// Close to being a copy of the top byte of the surface_map "flag" member
/* 0x0D */ u8 surfaceFlags;
// Don't know if "tile" is right the right term
- // D_8015F580 is a pointer to an array of "tile" structs. This is an index to that array
+ // gSurfaceMap is a pointer to an array of "tile" structs. This is an index to that array
/* 0x0E */ u16 surfaceMapIndex;
// 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]
@@ -317,7 +323,7 @@ typedef struct {
/* 0x0108 */ f32 unk_108;
/* 0x010C */ s16 unk_10C;
/* 0x010E */ char unk_10E[0x2];
- /* 0x0110 */ UnkActorInner unk_110;
+ /* 0x0110 */ Collision unk_110;
/* 0x0150 */ Mat3 unk_150;
/* 0x0174 */ Mat3 unk_174;
/* 0x0198 */ KartBoundingBoxCorner boundingBoxCorners[4];
diff --git a/include/course.h b/include/course.h
index 5137a17c0..3f4498766 100644
--- a/include/course.h
+++ b/include/course.h
@@ -9,10 +9,11 @@
* @file Include for course gfx.inc.c.
*/
-// This could be *func(arg) instead.
-struct CourseAddrUnkStruct {
+typedef struct {
Gfx *addr;
- s32 value;
-};
+ u8 surfaceType;
+ u8 sectionId;
+ u16 flags;
+} TrackSections;
#endif // COURSE_H
diff --git a/include/mk64.h b/include/mk64.h
index 2ee6eed95..8053c9cf2 100644
--- a/include/mk64.h
+++ b/include/mk64.h
@@ -6,7 +6,7 @@
#include <types.h>
#include "config.h"
-
+#define GFX_GET_OPCODE(var) ((s32)((var) & 0xFF000000))
// Pointer casting is technically UB, and avoiding it gets rid of endian issues
// as well as a nice side effect.
diff --git a/include/objects.h b/include/objects.h
index d86e5d581..461ad59b7 100644
--- a/include/objects.h
+++ b/include/objects.h
@@ -102,7 +102,7 @@ extern s32 D_8018D1D8;
// Limit on some object type (ice chips?) in Sherbet Land
extern s32 D_8018D3C0;
-extern UnkActorInner D_8018C0B0[];
+extern Collision D_8018C0B0[];
/**
* D_80183EA0, D_80183F28, D_8018BFA8, and D_8018C030 are all lists of indices in D_80165C18.
diff --git a/include/variables.h b/include/variables.h
index bb115086f..71f0f6417 100644
--- a/include/variables.h
+++ b/include/variables.h
@@ -94,8 +94,8 @@ extern struct_D_802874D8 D_802874D8;
//extern struct GfxPool *gGfxPool; // D_8014EF40
-extern mk64_surface_map_ram *D_8015F580; // This is techinally a pointer to an array, but declaring it as such create regalloc issues elsewhere
-extern u16 D_8015F588; // Number of entires in D_8015F580
+extern mk64_surface_map_ram *gSurfaceMap; // This is techinally a pointer to an array, but declaring it as such create regalloc issues elsewhere
+extern u16 D_8015F588; // Number of entires in gSurfaceMap
extern Vec3f D_80165070[];