Add structs for "vehicle" types in 80005FD0 (#248)

Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
Tyler McGavran
2022-07-27 22:03:35 -04:00
committed by GitHub
parent db95b4b9e8
commit a536985a13
14 changed files with 699 additions and 1223 deletions
+17 -15
View File
@@ -202,7 +202,7 @@ void func_80296D10(struct Actor *actor, Vec3f startingPos, Vec3s startingRot, Ve
sp2C = temp_a0;
func_802AAAAC(temp_a0);
switch ((s16) actorType) {
case 37:
case ACTOR_BOX_TRUCK:
temp_v0 = D_802BA260;
phi_v0 = (s16) temp_v0;
if ((s32) temp_v0 >= 3) {
@@ -326,7 +326,7 @@ void func_80296D10(struct Actor *actor, Vec3f startingPos, Vec3s startingRot, Ve
actor->boundingBoxSize = 3.0f;
actor->unk_08 = 7.0f;
return;
case 25:
case ACTOR_PALM_TREE:
actor->flags |= 0x4000;
actor->state = 0x003C;
actor->boundingBoxSize = 3.0f;
@@ -5030,21 +5030,21 @@ void func_802A29BC(Camera *arg0, Mat4 arg1, struct Actor *arg2) {
s32 D_802B8850[] = {0, 0, 0};
s16 D_802B885C[] = {0, 0, 0};
void func_802A2AD0(Camera *arg0, struct Actor *arg1) {
void func_802A2AD0(Camera *arg0, struct RailroadCrossing *rr_crossing) {
Vec3s sp80 = {0, 0, 0};
Mat4 sp40;
f32 unk = func_802B80D0(arg0->pos, arg1->pos, arg0->rot[1], 0.0f, D_80150130[arg0 - camera1], 4000000.0f);
f32 unk = func_802B80D0(arg0->pos, rr_crossing->pos, arg0->rot[1], 0.0f, D_80150130[arg0 - camera1], 4000000.0f);
if (unk < 0.0f) { return; }
func_802B5F74(sp40, arg1->pos, arg1->rot);
if (func_802B4FF8(sp40, 0) == 0) { return; }
if (!(unk < 0.0f)) {
func_802B5F74(sp40, rr_crossing->pos, rr_crossing->rot);
if (func_802B4FF8(sp40, 0) != 0) {
gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING);
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
if (D_801637B8[arg1->state]) {
if (D_801637B8[rr_crossing->crossingId]) {
if (arg1->unk_04 < 20) {
if (rr_crossing->someTimer < 20) {
gSPDisplayList(gDisplayListHead++, D_06010AE8);
} else {
gSPDisplayList(gDisplayListHead++, D_06010C10);
@@ -5053,6 +5053,8 @@ void func_802A2AD0(Camera *arg0, struct Actor *arg1) {
gSPDisplayList(gDisplayListHead++, D_06010D38);
}
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
}
}
}
void func_802A2C78(Camera *arg0, Mat4 arg1, struct Actor *arg2) {
@@ -5249,25 +5251,25 @@ void func_802A3008(struct UnkStruct_800DC5EC *arg0) {
case ACTOR_WARIO_STADIUM_SIGN:
func_802A269C(temp_s1, actor);
break;
case 25:
case ACTOR_PALM_TREE:
func_802A2C78(temp_s1, D_801502C0, actor);
break;
case ACTOR_PADDLE_WHEEL_BOAT:
func_8029AE1C(temp_s1, actor, D_801502C0, sp92);
break;
case 37:
case ACTOR_BOX_TRUCK:
func_8029B06C(temp_s1, actor);
break;
case 40:
case ACTOR_SCHOOL_BUS:
func_8029B2E4(temp_s1, actor);
break;
case 41:
case ACTOR_TANKER_TRUCK:
func_8029B6EC(temp_s1, actor);
break;
case 44:
case ACTOR_CAR:
func_8029B4E0(temp_s1, actor);
break;
case 39:
case ACTOR_RAILROAD_CROSSING:
func_802A2AD0(temp_s1, actor);
break;
case ACTOR_YOSHI_VALLEY_EGG:
+1 -1
View File
@@ -97,7 +97,7 @@ void func_802A1EA0(Camera*, struct Actor*);
void func_802A269C(Camera*, struct Actor*);
void func_802A27A0(Camera*, Mat4, struct YoshiValleyEgg*, u16);
void func_802A29BC(Camera*, Mat4, struct Actor*);
void func_802A2AD0(Camera*, struct Actor*);
void func_802A2AD0(Camera*, struct RailroadCrossing*);
void func_802A2C78(Camera*, Mat4, struct Actor*);
void func_802A2F34(struct UnkStruct_800DC5EC*);
void func_802A3008(struct UnkStruct_800DC5EC*);
+543 -750
View File
File diff suppressed because it is too large Load Diff
+24 -1
View File
@@ -2,6 +2,7 @@
#define CODE_80005FD0_H
#include "common_structs.h"
#include "vehicles.h"
/* Function Prototypes */
s16 func_80005FD0(Vec3f, Vec3f);
@@ -29,6 +30,9 @@ s16 func_8000CD24(f32, f32, f32, s16, Player*, s32, s32);
s16 func_8000D24C(f32, f32, f32, s32*);
s16 func_8000D2B4(f32, f32, f32, s16, s32);
s16 func_8000D33C(f32, f32, f32, s16, s32);
s16 func_8000D6D0(Vec3f, s16 *, f32, f32, s32, s32);
s16 func_8000D940(Vec3f, s16 *, f32, f32, s32);
s16 func_8000DBAC(Vec3f, s16*, f32);
void func_8000F0E0(void);
void func_8000F124(void);
void func_80010218(s32);
@@ -39,14 +43,33 @@ void func_80010DBC(s32);
f32 func_80010F40(f32, f32, f32, s32);
f32 func_80010FA0(f32, f32, f32, s32);
s32 process_path_data(struct TrackWayPoint*, struct TrackWayPoint*);
void func_80012220(VehicleStuff*);
void func_80012A48(TrainCarStuff*, s16);
f32 func_80013C74(s16, s16);
void func_80013D20(VehicleStuff*);
void func_80013F7C(s32, Player*, VehicleStuff*, f32, f32, s32, u32);
f32 func_800145A8(s16, f32, s16);
void func_800146B8(s32, s32, VehicleStuff*);
void func_8001487C();
void func_800148C4(s32, Player*);
void func_8001490C(s32);
void func_800149D0();
void func_80014A18(s32, Player*);
void func_80014A60(s32);
void func_80014B24();
void func_80014B6C(s32, Player*);
void func_80014BB4(s32);
void func_80014C78();
void func_80014CC0(s32, Player*);
void func_80014D08(s32);
void func_80014D30(s32, s32);
void func_8001968C();
/* This is where I'd put my static data, if I had any */
// 0 or 1, only 1 when when in extra (mirror) mode
extern s16 D_8016347A;
// Might belong in menus.h?
extern s8 D_8018EDF3;
extern s8 D_8018EDF3;
// Suspected to be the "width" of each wayPoint. See data_0DD0A0_1.s
extern f32 D_800DCA4C[];