Added more actor types and some defines (#194)

* Added more actor types and some defines

Also adjusted the generic Actor struct to have some of its members
 have names that are generally reasonable for all types of actors

Added a union to the BananActor struct, makes accessing the `rot`
 member and the overlapping id/index members more sensible

Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
Tyler McGavran 2022-05-11 23:07:18 -04:00 committed by GitHub
parent 92ad254c24
commit 49845b1fe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2283 additions and 2137 deletions

View File

@ -8,7 +8,7 @@ glabel func_80296D10
/* 100338 80296D28 0C0AD4B6 */ jal vec3f_copy
/* 10033C 80296D2C 24840018 */ addiu $a0, $a0, 0x18
/* 100340 80296D30 26040010 */ addiu $a0, $s0, 0x10
/* 100344 80296D34 0C0AD4C1 */ jal func_802B5304
/* 100344 80296D34 0C0AD4C1 */ jal vec3s_copy
/* 100348 80296D38 8FA50038 */ lw $a1, 0x38($sp)
/* 10034C 80296D3C 26040024 */ addiu $a0, $s0, 0x24
/* 100350 80296D40 0C0AD4B6 */ jal vec3f_copy

View File

@ -5,7 +5,121 @@
// Made this because there will likely be a lot of structs in this file that will be compiled into one eventually.
// This keeps the other files cleaner.
struct piranha_plant {
#define ACTOR_FALLING_ROCK 0x05
#define ACTOR_BANANA 0x06
#define ACTOR_GREEN_SHELL 0x07
#define ACTOR_RED_SHELL 0x08
#define ACTOR_YOSHI_VALLEY_EGG 0x09
#define ACTOR_PIRANHA_PLANT 0x0A
#define ACTOR_ITEM_BOX 0x0C
#define ACTOR_FAKE_ITEM_BOX 0x0D
#define ACTOR_BANANA_BUNCH 0x0E
#define ACTOR_TRAIN_ENGINE 0x0F
#define ACTOR_TRAIN_TENDER 0x10
#define ACTOR_TRAIN_PASSENGER_CAR 0x11
#define ACTOR_TRIPLE_GREEN_SHELL 0x15
#define ACTOR_TRIPLE_RED_SHELL 0x16
#define ACTOR_MARIO_RACEWAY_SIGN 0x17
#define ACTOR_WARIO_STADIUM_SIGN 0x23
#define ACTOR_PADDLE_WHEEL_BOAT 0x26
#define ACTOR_RAILROAD_CROSSING 0x27
#define ACTOR_BLUE_SPINY_SHELL 0x2A
#define ACTOR_HOT_AIR_BALLOON_ITEM_BOX 0x2B
#define ACTOR_KIWANO_FRUIT 0x2D
/*
Used by the locomotive, tender, and passenger car
*/
struct TrainCar {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 unk_04;
/* 0x06 */ s16 wheelRot;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 unk_0C;
/* 0x10 */ Vec3s rot;
/* 0x10 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct RailroadCrossing {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 someTimer;
/* 0x06 */ s16 crossingId;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 unk_0C;
/* 0x10 */ Vec4s unk_10;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct FallingRock {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 respawnTimer;
/* 0x06 */ s16 unk_06;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 boundingBoxSize;
/* 0x10 */ Vec3s rot;
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct YoshiValleyEgg {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 unk_04;
/* 0x06 */ s16 unk_06;
/* 0x08 */ f32 pathRadius;
/* 0x0C */ f32 boundingBoxSize;
/* 0x10 */ s16 pathRot;
/* 0x12 */ s16 eggRot;
/* 0x14 */ s16 unk_14;
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
// 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;
}; // size = 0x70
struct KiwanoFruit {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 targetPlayer; // Id of the player this actor tracks. Each player has their own kiwano actor just for them
/* 0x06 */ s16 state;
/* 0x08 */ f32 bonkTimer; // bonkState? Not sure what this is tracking, but its some form of count down that starts after the fruit hits you
/* 0x0C */ f32 boundingBoxSize;
/* 0x10 */ s16 animState;
/* 0x12 */ s16 animTimer;
/* 0x14 */ s16 unk_14;
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct PaddleWheelBoat {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 unk_04;
/* 0x06 */ s16 wheelRot;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 unk_0C;
/* 0x10 */ Vec3s boatRot;
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct PiranhaPlant {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ Vec4s visibilityStates; // A per-camera visibilty state tracker
@ -15,9 +129,9 @@ struct piranha_plant {
/* 0x24 */ Vec4s timers; // A per-camera timer. Might be more appropriate to call this state
/* 0x2C */ f32 unk_02C;
/* 0x30 */ UnkActorInner unk30;
};
}; // size = 0x70
struct triple_shell_parent {
struct TripleShellParent {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 shellsAvailable;
@ -33,7 +147,7 @@ struct triple_shell_parent {
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct shell_actor {
struct ShellActor {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
// Index in D_8015F9B8 for the parent actor of this shell
@ -51,7 +165,7 @@ struct shell_actor {
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct item_box {
struct ItemBox {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 someTimer;
@ -69,7 +183,7 @@ struct item_box {
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct fake_item_box {
struct FakeItemBox {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 someTimer;
@ -85,7 +199,7 @@ struct fake_item_box {
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct banana_bunch_parent {
struct BananaBunchParent {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 unk_04;
@ -100,7 +214,7 @@ struct banana_bunch_parent {
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct banana_actor {
struct BananaActor {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 unk_04;
@ -108,28 +222,28 @@ struct banana_actor {
/* 0x08 */ s16 parentIndex;
/* 0x0A */ s16 bananaId; // ? Appears to indiciate which banana of the bunch this one is
/* 0x0C */ f32 boundingBoxSize;
/* 0x10 */ s16 playerId; // Player that owns this particular banana
/* 0x12 */ s16 elderIndex; // Index of the next-oldest banana in the bunch
/* 0x14 */ s16 youngerIndex; // Index of the next-youngest banana in the bunch. -1 if this banana is the youngest
/* 0x16 */ s16 unk_16; // Index of the next-youngest banana in the bunch. -1 if this banana is the youngest
union {
/* 0x10 */ Vec3s rot;
/* 0x10 */ s16 playerId; // Id of the player that owns this banana
/* 0x12 */ s16 elderIndex; // Index in D_8015F9B8 of the next-oldest banana in the bunch
/* 0x14 */ s16 youngerIndex; // Index in D_8015F9B8 of the next-youngest banana in the bunch
};
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct Actor {
/* 0x00 */ s16 unk0; // 0xC, 0xD, or 0x2B
#ifdef AVOID_UB
/* 0x02 */ u16 unk2;
#else
s16 unk2; // bitflags
#endif
/* 0x04 */ s16 unk4; // Timer?
/* 0x06 */ s16 unk6; // 1 // train wheel rot?
/* 0x08 */ f32 unk8;
f32 unkC;
/* 0x0C */ Vec3s unk10; // Actor rotation
/* 0x18 */ Vec3f unk18;
/* 0x24 */ Vec3f unk24;
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 unk_04;
/* 0x06 */ s16 state;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 boundingBoxSize;
/* 0x10 */ Vec3s rot;
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ UnkActorInner unk30;
};
}; // size = 0x70

File diff suppressed because it is too large Load Diff

View File

@ -25,34 +25,34 @@ extern struct Actor D_8015F9B8[];
void func_802B02B4(struct Actor *arg0, s32 arg1) {
s32 temp_f6;
struct Actor *temp_v0 = &D_8015F9B8[arg0->unk4];
struct Actor *temp_v0 = &D_8015F9B8[arg0->unk_04];
temp_v0->unk4--;
temp_v0->unk_04--;
switch((s16)arg0->unk8) {
switch((s16)arg0->unk_08) {
case 0:
temp_v0->unk24[0] = -1.0f;
temp_v0->velocity[0] = -1.0f;
break;
case 1:
temp_v0->unk24[1] = -1.0f;
temp_v0->velocity[1] = -1.0f;
break;
case 2:
temp_v0->unk24[2] = -1.0f;
temp_v0->velocity[2] = -1.0f;
break;
}
arg0->unk2 = 0x8000; // bitflag
arg0->unk10[1] = 0;
arg0->unk24[1] = 3.0f;
arg0->unk4 = 60;
arg0->flags = 0x8000; // bitflag
arg0->rot[1] = 0;
arg0->velocity[1] = 3.0f;
arg0->unk_04 = 60;
switch(arg1) {
case 7:
arg0->unk6 = 5;
arg0->state = 5;
break;
case 8:
arg0->unk6 = 7;
arg0->state = 7;
break;
}
}
@ -69,8 +69,8 @@ void func_802B039C(void *arg0) {
f32 phi_f6;
arg0->unk6 = 1;
arg0->unk4 = 0xB4;
arg0->unk24 = (random_int(0xC8) - 0x64) * D_802B9E80;
arg0->unk_04 = 0xB4;
arg0->velocity = (random_int(0xC8) - 0x64) * D_802B9E80;
temp_v0 = random_int(0xC8);
temp_f6 = temp_v0;
phi_f6 = temp_f6;
@ -146,19 +146,19 @@ void func_802B0570(void *arg0) {
func_802B0464(arg0->unk14);
func_802B04E8(arg0, arg0->unk12);
temp_v0 = arg0->unk10;
temp_v0 = arg0->rot;
if ((*(&gPlayers + (temp_v0 * 0xDD8)) & 0x4000) != 0) {
func_800C9060(temp_v0 & 0xFF, 0x19019053);
}
arg0->unk2 = -0x8000;
arg0->unk4 = 0x3C;
arg0->unk_04 = 0x3C;
arg0->unk6 = 5;
temp_v0_2 = (arg0->unk8 * 0x70) + &D_8015F9B8;
temp_v0_2 = (arg0->unk_08 * 0x70) + &D_8015F9B8;
arg0->unk28 = 3.0f;
temp_v0_2->unk12 = -1;
temp_v0_2->unk14 = -1;
temp_v0_2->unk16 = -1;
temp_v0_2->unk18 = -1;
temp_v0_2->pos = -1;
temp_v0_2->unk1A = -1;
}
#else
@ -167,7 +167,7 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B0570.s")
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
void func_802B0648(struct banana_bunch_parent *banana_bunch) {
void func_802B0648(struct BananaBunchParent *banana_bunch) {
s16 temp_v0;
s16 temp_v0_2;
s16 temp_v0_3;
@ -218,8 +218,8 @@ void func_802B0648(struct banana_bunch_parent *banana_bunch) {
block_10:
temp_v0_6 = phi_v1->unk12;
phi_v1->unk6 = 1;
phi_v1->unk4 = 0x00B4;
phi_v1->unk24 = 0.0f;
phi_v1->unk_04 = 0x00B4;
phi_v1->velocity = 0.0f;
phi_v1->unk2C = 0.0f;
phi_v1->unk28 = 1.5f;
if (temp_v0_6 != -1) {
@ -236,7 +236,7 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B0648.s")
? func_802B64C4(f32 *, s16); /* extern */
? load_giant_egg(f32, f32 *, ?, f32, f32); /* extern */
void func_802B0788(s16 arg0, struct banana_bunch_parent *banana_bunch, Player *player) {
void func_802B0788(s16 arg0, struct BananaBunchParent *banana_bunch, Player *player) {
f32 sp34;
void *sp30;
f32 temp_f0;
@ -293,7 +293,7 @@ void func_802B0788(s16 arg0, struct banana_bunch_parent *banana_bunch, Player *p
block_10:
temp_a1 = phi_v0->unk12;
phi_v0->unk6 = 1;
phi_v0->unk4 = 0x001E;
phi_v0->unk_04 = 0x001E;
if (temp_a1 != -1) {
(D_8015F9B8 + (temp_a1 * 0x70))->unk14 = -1;
}
@ -309,7 +309,7 @@ block_10:
sp30 = phi_v0;
load_giant_egg(phi_f12, &sp34, 0, phi_f0, phi_f12);
func_802B64C4(&sp34, (s16) (player->unk_02E + player->unk_0C0));
sp30->unk24 = sp34;
sp30->velocity = sp34;
sp30->unk28 = sp38;
sp30->unk2C = sp3C;
}
@ -319,11 +319,11 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B0788.s")
#endif
s32 func_802B09C0(s16 bananaId) {
struct banana_actor *banana;
struct BananaActor *banana;
if (bananaId == -1) {
return 0;
}
banana = (struct banana_actor*) &D_8015F9B8[bananaId];
banana = (struct BananaActor*) &D_8015F9B8[bananaId];
if (banana->state == 2) {
return 1;
}
@ -336,13 +336,13 @@ s32 func_802B09C0(s16 bananaId) {
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_800C9060(s32, ?); /* extern */
? func_8029E854(struct banana_bunch_parent *, s32); /* extern */
? func_802B0648(struct banana_bunch_parent *); /* extern */
? func_802B0788(s16, struct banana_bunch_parent *, Player *, Player *); /* extern */
? func_8029E854(struct BananaBunchParent *, s32); /* extern */
? func_802B0648(struct BananaBunchParent *); /* extern */
? func_802B0788(s16, struct BananaBunchParent *, Player *, Player *); /* extern */
s32 func_802B09C0(s16, s32); /* extern */
? func_802B2914(struct banana_bunch_parent *, Player *, ?, Player *); /* extern */
? func_802B2914(struct BananaBunchParent *, Player *, ?, Player *); /* extern */
void update_obj_banana_bunch(struct banana_bunch_parent *banana_bunch) {
void update_obj_banana_bunch(struct BananaBunchParent *banana_bunch) {
Player *sp2C;
struct Controller *sp28;
s32 sp24;
@ -350,11 +350,11 @@ void update_obj_banana_bunch(struct banana_bunch_parent *banana_bunch) {
s16 temp_a0_2;
s16 temp_v1_2;
struct Controller *temp_v0;
struct banana_actor *temp_a0;
struct banana_actor *temp_a1;
struct banana_actor *temp_a2;
struct banana_actor *temp_a3_2;
struct banana_actor *temp_t0;
struct BananaActor *temp_a0;
struct BananaActor *temp_a1;
struct BananaActor *temp_a2;
struct BananaActor *temp_a3_2;
struct BananaActor *temp_t0;
u16 temp_t9;
u16 temp_v1;
s32 phi_v1;
@ -486,11 +486,11 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/update_obj_banana_bunch.s")
#endif
s32 func_802B0E14(s16 arg0) {
struct shell_actor *temp;
struct ShellActor *temp;
if (arg0 < 0) {
return 0;
}
temp = (struct shell_actor*) &D_8015F9B8[arg0];
temp = (struct ShellActor*) &D_8015F9B8[arg0];
if (temp->type == 7) {
if (temp->state == 4) {
return 1;
@ -509,14 +509,14 @@ s32 func_802B0E14(s16 arg0) {
? func_8000EDC8(s32); /* extern */
? func_800C9060(u8, ?); /* extern */
? func_800C90F4(u8, s32); /* extern */
? func_8029E854(struct triple_shell_parent *); /* extern */
? func_8029E854(struct TripleShellParent *); /* extern */
s32 func_802B0E14(s16, s16); /* extern */
s32 func_802B19EC(struct triple_shell_parent *, Player *, s16, ?); /* extern */
s32 func_802B19EC(struct TripleShellParent *, Player *, s16, ?); /* extern */
? func_802B64C4(f32 *, s16); /* extern */
void update_obj_triple_shell(struct triple_shell_parent *actor, s16 arg1) {
void update_obj_triple_shell(struct TripleShellParent *actor, s16 arg1) {
s16 sp4E;
struct shell_actor *sp44;
struct ShellActor *sp44;
f32 sp40;
f32 sp3C;
f32 sp38;
@ -538,12 +538,12 @@ void update_obj_triple_shell(struct triple_shell_parent *actor, s16 arg1) {
s16 temp_v1_6;
s32 temp_v1;
struct Controller *temp_v0_5;
struct shell_actor *temp_v0_2;
struct shell_actor *temp_v0_3;
struct shell_actor *temp_v0_4;
struct shell_actor *temp_v0_6;
struct shell_actor *temp_v0_7;
struct shell_actor *temp_v0_8;
struct ShellActor *temp_v0_2;
struct ShellActor *temp_v0_3;
struct ShellActor *temp_v0_4;
struct ShellActor *temp_v0_6;
struct ShellActor *temp_v0_7;
struct ShellActor *temp_v0_8;
u16 temp_t9;
s16 phi_v1;
s16 phi_v1_2;
@ -768,7 +768,7 @@ s16 func_802B17F4(void *arg0) {
}
temp_v1 = (temp_v0 * 0x70) + &D_8015F9B8;
temp_v1->unk6 = 0;
temp_v1->unk10 = (arg0 - gPlayerOne) / 0xDD8;
temp_v1->rot = (arg0 - gPlayerOne) / 0xDD8;
arg0->unkC = arg0->unkC | 0x40000;
return temp_v0;
}
@ -805,11 +805,11 @@ s16 func_802B18E4(s32 arg0, s16 arg1) {
}
temp_v1 = (temp_v0 * 0x70) + &D_8015F9B8;
temp_v1->unk6 = 0;
temp_v1->unk10 = 0x5B0;
temp_v1->rot = 0x5B0;
temp_v1->unk12 = -0x8000;
temp_v1->unk14 = (arg0 - gPlayerOne) / 0xDD8;
temp_v1->unk4 = 0;
temp_v1->unk8 = 0.0f;
temp_v1->unk_04 = 0;
temp_v1->unk_08 = 0.0f;
return temp_v0;
}
#else
@ -825,7 +825,7 @@ s16 func_8029EC88(f32 *, ? *, ? *, s16); /* extern */
static ? D_802B9180; /* unable to generate initializer */
static ? D_802B918C; /* unable to generate initializer */
s32 func_802B19EC(struct triple_shell_parent *arg0, Player *player, s16 arg2, u16 arg3) {
s32 func_802B19EC(struct TripleShellParent *arg0, Player *player, s16 arg2, u16 arg3) {
? sp54;
? sp4C;
f32 sp48;
@ -863,7 +863,7 @@ s32 func_802B19EC(struct triple_shell_parent *arg0, Player *player, s16 arg2, u1
temp_s0 = (temp_t3 * 0x10) + D_8015F9B8;
sp44 = player->pos[1];
sp48 = player->pos[2];
func_802AD950(temp_s0 + 0x30, temp_s0->unkC + 1.0f, temp_s0->unk18, temp_s0->unk1C, temp_s0->unk20, sp40, sp44, sp48);
func_802AD950(temp_s0 + 0x30, temp_s0->unkC + 1.0f, temp_s0->pos, temp_s0->unk1C, temp_s0->unk20, sp40, sp44, sp48);
func_802B4E30(temp_s0);
temp_s0->unk2 = -0x7000;
switch (arg2) { /* irregular */
@ -874,11 +874,11 @@ s32 func_802B19EC(struct triple_shell_parent *arg0, Player *player, s16 arg2, u1
temp_s0->unk6 = 6;
break;
}
temp_s0->unk10 = 0;
temp_s0->rot = 0;
temp_s0->unk12 = -0x8000;
temp_s0->unk14 = (s16) ((s32) (player - gPlayerOne) / 3544);
temp_s0->unk4 = (s16) ((s32) (arg0 - D_8015F9B8) / 112);
temp_s0->unk8 = (f32) arg3;
temp_s0->unk_04 = (s16) ((s32) (arg0 - D_8015F9B8) / 112);
temp_s0->unk_08 = (f32) arg3;
arg0->shellIndices[arg3] = (f32) ((s32) (temp_s0 - D_8015F9B8) / 112);
return 1;
}
@ -920,7 +920,7 @@ s16 func_802B1C9C(void *arg0) {
func_802B63B8(&sp40, arg0 + 0x174);
temp_a0 = &sp40;
sp40 = 0.0f + arg0->unk14;
sp44 += arg0->unk18;
sp44 += arg0->pos;
sp48 += arg0->unk1C;
temp_v0 = func_8029EC88(temp_a0, &sp4C, &sp54, 7);
temp_v1 = temp_v0;
@ -930,13 +930,13 @@ s16 func_802B1C9C(void *arg0) {
temp_t8 = temp_v1 * 7;
sp40 = arg0->unk14;
temp_s0 = (temp_t8 * 0x10) + &D_8015F9B8;
sp44 = arg0->unk18;
sp44 = arg0->pos;
sp48 = arg0->unk1C;
sp3E = temp_v1;
func_802AD950(temp_s0 + 0x30, temp_s0->unkC + 1.0f, temp_s0->unk18, temp_s0->unk1C, temp_s0->unk20, sp40, sp44, sp48);
func_802AD950(temp_s0 + 0x30, temp_s0->unkC + 1.0f, temp_s0->pos, temp_s0->unk1C, temp_s0->unk20, sp40, sp44, sp48);
func_802B4E30(temp_s0);
temp_s0->unk6 = 0;
temp_s0->unk10 = 0;
temp_s0->rot = 0;
temp_s0->unk12 = -0x8000;
temp_s0->unk14 = (arg0 - gPlayerOne) / 0xDD8;
return sp3E;
@ -979,7 +979,7 @@ s16 func_802B1E48(void *arg0) {
func_802B63B8(&sp40, arg0 + 0x174);
temp_a0 = &sp40;
sp40 = 0.0f + arg0->unk14;
sp44 += arg0->unk18;
sp44 += arg0->pos;
sp48 += arg0->unk1C;
temp_v0 = func_8029EC88(temp_a0, &sp4C, &sp54, 8);
temp_v1 = temp_v0;
@ -989,13 +989,13 @@ s16 func_802B1E48(void *arg0) {
temp_t8 = temp_v1 * 7;
sp40 = arg0->unk14;
temp_s0 = (temp_t8 * 0x10) + &D_8015F9B8;
sp44 = arg0->unk18;
sp44 = arg0->pos;
sp48 = arg0->unk1C;
sp3E = temp_v1;
func_802AD950(temp_s0 + 0x30, temp_s0->unkC + 1.0f, temp_s0->unk18, temp_s0->unk1C, temp_s0->unk20, sp40, sp44, sp48);
func_802AD950(temp_s0 + 0x30, temp_s0->unkC + 1.0f, temp_s0->pos, temp_s0->unk1C, temp_s0->unk20, sp40, sp44, sp48);
func_802B4E30(temp_s0);
temp_s0->unk6 = 0;
temp_s0->unk10 = 0;
temp_s0->rot = 0;
temp_s0->unk12 = arg0->unk2E - 0x8000;
temp_s0->unk14 = (arg0 - gPlayerOne) / 0xDD8;
return sp3E;
@ -1019,10 +1019,10 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B1FFC.s")
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_800C9060(s32, ?, u16); /* extern */
? func_8029E854(struct banana_actor *); /* extern */
? func_8029FDC8(f32, struct banana_actor *); /* extern */
? func_8029E854(struct BananaActor *); /* extern */
? func_8029FDC8(f32, struct BananaActor *); /* extern */
? func_802ADDC8(f32, UnkActorInner *, UnkActorInner *, f32, f32, f32, f32); /* extern */
? func_802B4E30(struct banana_actor *); /* extern */
? func_802B4E30(struct BananaActor *); /* extern */
? func_802B64C4(f32 *, s16); /* extern */
? load_giant_egg(f32, f32 *, ?, f32, f32); /* extern */
extern s16 D_8015F6E8;
@ -1037,7 +1037,7 @@ static f32 D_802B9EE8 = 0.2f;
static f32 D_802B9EEC = 0.2f;
static f32 D_802B9EF0 = 0.3f;
void update_obj_banana(struct banana_actor *banana) {
void update_obj_banana(struct BananaActor *banana) {
Player *sp88;
struct Actor *sp84;
struct Controller *sp80;
@ -1295,7 +1295,7 @@ s16 func_8029EC88(f32 *, s16 *, f32 *, ?); /* extern */
? func_802B4E30(void *); /* extern */
? func_802B63B8(f32 *, f32 *); /* extern */
void func_802B2914(struct banana_bunch_parent *banana_bunch, Player *player, s16 bananaId) {
void func_802B2914(struct BananaBunchParent *banana_bunch, Player *player, s16 bananaId) {
s16 sp6E;
f32 sp68;
f32 sp64;
@ -1313,7 +1313,7 @@ void func_802B2914(struct banana_bunch_parent *banana_bunch, Player *player, s16
s16 temp_v0;
s32 temp_lo;
void *temp_s0;
struct banana_actor *phi_v0;
struct BananaActor *phi_v0;
sp4C = 0.0f;
sp50 = -player->boundingBoxSize;
@ -1340,13 +1340,13 @@ void func_802B2914(struct banana_bunch_parent *banana_bunch, Player *player, s16
temp_s0 = D_8015F9B8 + temp_lo;
sp54 = player->pos[2];
sp6E = temp_t6;
func_802AD950(temp_s0 + 0x30, temp_s0->unkC + 1.0f, temp_s0->unk18, temp_s0->unk1C, temp_s0->unk20, sp4C, sp50, sp54);
func_802AD950(temp_s0 + 0x30, temp_s0->unkC + 1.0f, temp_s0->pos, temp_s0->unk1C, temp_s0->unk20, sp4C, sp50, sp54);
func_802B4E30(temp_s0);
temp_s0->unk2 = -0x7000;
temp_s0->unk10 = (s16) ((s32) (player - gPlayerOne) / 3544);
temp_s0->unk8 = (s16) ((s32) (banana_bunch - D_8015F9B8) / 112);
temp_s0->rot = (s16) ((s32) (player - gPlayerOne) / 3544);
temp_s0->unk_08 = (s16) ((s32) (banana_bunch - D_8015F9B8) / 112);
temp_s0->unk14 = -1;
temp_s0->unk4 = 0x0014;
temp_s0->unk_04 = 0x0014;
temp_s0->unkA = bananaId;
switch (bananaId) {
case 0:
@ -1420,7 +1420,7 @@ s16 func_802B2C40(void *arg0) {
temp_a1 = &sp30;
temp_a2 = &sp38;
sp24 += arg0->unk14;
sp28 += arg0->unk18;
sp28 += arg0->pos;
sp2C += arg0->unk1C;
sp38 = arg0->unk34;
sp3C = arg0->unk38;
@ -1434,7 +1434,7 @@ s16 func_802B2C40(void *arg0) {
}
temp_v1 = (temp_v0 * 0x70) + &D_8015F9B8;
temp_v1->unk6 = 0;
temp_v1->unk24 = (arg0 - gPlayerOne) / 0xDD8;
temp_v1->velocity = (arg0 - gPlayerOne) / 0xDD8;
arg0->unkC = arg0->unkC | 0x40000;
return temp_v0;
}
@ -1479,7 +1479,7 @@ s16 func_802B2D70(void *arg0) {
temp_a1 = &sp34;
temp_a2 = &sp3C;
sp28 += arg0->unk14;
sp2C += arg0->unk18;
sp2C += arg0->pos;
sp30 += arg0->unk1C;
sp3C = arg0->unk34;
sp40 = arg0->unk38;
@ -1492,9 +1492,9 @@ s16 func_802B2D70(void *arg0) {
return temp_v0;
}
temp_v1 = (temp_v0 * 0x70) + &D_8015F9B8;
temp_v1->unk10 = temp_t0;
temp_v1->rot = temp_t0;
temp_v1->unk6 = 0;
temp_v1->unk4 = 0x14;
temp_v1->unk_04 = 0x14;
arg0->unkC = arg0->unkC | 0x40000;
return temp_v0;
}
@ -1571,7 +1571,7 @@ void func_802B2FA0(Player *player) {
s16 temp_t9;
sp1C = (player - gPlayerOne) / 3544;
temp_t9 = player->unk10;
temp_t9 = player->rot;
switch (temp_t9) {
case 3:
func_802B1C9C();
@ -1658,7 +1658,7 @@ void func_802B30EC(void) {
phi_s1 = gControllerEight;
}
}
if (((temp_v0 & 0x4000) != 0) && (phi_s0->unk10 != 0) && ((temp_v0 & 0x2000) == 0)) {
if (((temp_v0 & 0x4000) != 0) && (phi_s0->rot != 0) && ((temp_v0 & 0x2000) == 0)) {
temp_v0_2 = phi_s1->unk6;
if ((temp_v0_2 & 0x2000) != 0) {
phi_s1->unk6 = temp_v0_2 & ~0x2000;
@ -1681,13 +1681,13 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B30EC.s")
? func_800C9060(u8, ?); /* extern */
? func_800C90F4(u8, s32); /* extern */
? func_800C98B8(f32 *, f32 *, ?); /* extern */
? func_8029E854(f32, struct shell_actor *); /* extern */
? func_8029FDC8(f32, struct shell_actor *); /* extern */
? func_8029E854(f32, struct ShellActor *); /* extern */
? func_8029FDC8(f32, struct ShellActor *); /* extern */
f32 func_802ABE30(f32, f32, f32, u16); /* extern */
? func_802AC098(UnkActorInner *, f32 *); /* extern */
? func_802AD950(UnkActorInner *, ?, f32, f32, f32, f32, f32, f32); /* extern */
? func_802B0210(UnkActorInner *, UnkActorInner *); /* extern */
? func_802B4E30(struct shell_actor *); /* extern */
? func_802B4E30(struct ShellActor *); /* extern */
? func_802B63B8(f32 *, f32 *, f32 *); /* extern */
? func_802B64C4(f32 *, s16); /* extern */
extern s16 D_8015F6E8;
@ -1699,7 +1699,7 @@ static f32 D_802B9F5C = 1.2f;
static f32 D_802B9F60 = 1.2f;
static f32 D_802B9F64 = 0.3f;
void update_obj_green_shell(struct shell_actor *shell) {
void update_obj_green_shell(struct ShellActor *shell) {
f32 sp80;
f32 sp7C;
f32 sp78;
@ -1725,7 +1725,7 @@ void update_obj_green_shell(struct shell_actor *shell) {
s16 temp_v0_2;
s16 temp_v0_3;
struct Controller *temp_v0;
struct shell_actor *temp_v0_4;
struct ShellActor *temp_v0_4;
u16 temp_t3;
u16 temp_v1;
f32 phi_f2;
@ -1911,11 +1911,11 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/update_obj_green_shell.s")
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_802AD950(UnkActorInner *, f32, f32, f32, f32, f32, f32, f32); /* extern */
? func_802B4E30(struct shell_actor *); /* extern */
? func_802B4E30(struct ShellActor *); /* extern */
extern u16 D_80164430;
extern s32 D_80164490;
void func_802B3B44(struct shell_actor *shell) {
void func_802B3B44(struct ShellActor *shell) {
f32 spAC;
f32 spA8;
f32 spA4;
@ -1970,7 +1970,7 @@ void func_802B3B44(struct shell_actor *shell) {
temp_a3 = temp_a1 & 0xFFFF;
temp_f2 = (f32) temp_v0->unk0;
temp_f12 = (f32) temp_v0->unk2;
temp_f28 = (f32) temp_v0->unk4;
temp_f28 = (f32) temp_v0->unk_04;
phi_a2 = temp_a1 & 0xFFFF;
if (temp_a3 >= (s32) temp_t0) {
phi_a2 = (temp_a3 - temp_t0) & 0xFFFF;
@ -1989,7 +1989,7 @@ void func_802B3B44(struct shell_actor *shell) {
if (temp_f14 > 400.0f) {
temp_f0_2 = (f32) temp_v0_2->unk0 - sp60;
temp_f2_2 = (f32) temp_v0_2->unk2 - sp5C;
temp_f12_2 = (f32) temp_v0_2->unk4 - sp58;
temp_f12_2 = (f32) temp_v0_2->unk_04 - sp58;
if (((temp_f0_2 * temp_f0_2) + (temp_f2_2 * temp_f2_2) + (temp_f12_2 * temp_f12_2)) < temp_f14) {
shell->rotAngle = phi_a2;
return;
@ -2036,7 +2036,7 @@ void func_802B3B44(struct shell_actor *shell) {
}
temp_f16_3 = (f32) temp_v0_3->unk0;
temp_f18_3 = (f32) temp_v0_3->unk2;
temp_f26 = (f32) temp_v0_3->unk4;
temp_f26 = (f32) temp_v0_3->unk_04;
shell->pos[0] = (temp_f2 + temp_f16_3) * 0.5f;
shell->pos[1] = ((temp_f12 + temp_f18_3) * 0.5f) + shell->boundingBoxSize;
shell->pos[2] = (temp_f28 + temp_f26) * 0.5f;
@ -2050,12 +2050,12 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B3B44.s")
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_8029FDC8(f32, f32, struct shell_actor *, ?); /* extern */
? func_8029FDC8(f32, f32, struct ShellActor *, ?); /* extern */
? func_802AD950(f32, f32, UnkActorInner *, ?, f32, f32, f32, f32, f32, f32); /* extern */
? func_802B4104(struct shell_actor *); /* extern */
? func_802B4E30(struct shell_actor *); /* extern */
? func_802B4104(struct ShellActor *); /* extern */
? func_802B4E30(struct ShellActor *); /* extern */
void func_802B3E7C(struct shell_actor *shell, Player *player) {
void func_802B3E7C(struct ShellActor *shell, Player *player) {
f32 sp44;
f32 sp40;
f32 sp38;
@ -2106,7 +2106,7 @@ f32 func_802B51E8(void *, f32 *); /* extern */
extern ? gPlayerBalloonCount;
static f32 D_802B9F68 = 2.5e7f;
s16 func_802B3FD0(Player *player, struct shell_actor *shell) {
s16 func_802B3FD0(Player *player, struct ShellActor *shell) {
f32 temp_f0;
s32 temp_s1;
Player *phi_s0;
@ -2145,7 +2145,7 @@ void func_802B4104(void *arg0) {
f32 temp_f0;
f32 temp_f0_2;
if ((arg0->unk3C < 0.0f) && ((temp_f0 = arg0->unk4C, (temp_f0 < 0.25f)) || (temp_f0 > -0.25f))) {
if ((arg0->unk3C < 0.0f) && ((temp_f0 = arg0->unk_04C, (temp_f0 < 0.25f)) || (temp_f0 > -0.25f))) {
func_8029FDC8(arg0);
func_800C98B8(arg0 + 0x18, arg0 + 0x24, 0x19008054);
arg0->unk2 = arg0->unk2 | 0x80;
@ -2168,16 +2168,16 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B4104.s")
? func_800C9060(u8, ?); /* extern */
? func_800C90F4(u8, s32); /* extern */
? func_800C9D80(f32 *, f32 *, ?); /* extern */
? func_8029E854(f32, struct shell_actor *); /* extern */
? func_8029FDC8(f32, struct shell_actor *); /* extern */
? func_8029E854(f32, struct ShellActor *); /* extern */
? func_8029FDC8(f32, struct ShellActor *); /* extern */
f32 func_802ABE30(f32, f32, f32, u16); /* extern */
? func_802AD950(UnkActorInner *, ?, f32, f32, f32, f32, f32, f32); /* extern */
? func_802B0210(UnkActorInner *, UnkActorInner *); /* extern */
? func_802B3B44(struct shell_actor *); /* extern */
? func_802B3E7C(struct shell_actor *, Player *); /* extern */
s16 func_802B3FD0(Player *, struct shell_actor *); /* extern */
? func_802B4104(struct shell_actor *); /* extern */
? func_802B4E30(struct shell_actor *); /* extern */
? func_802B3B44(struct ShellActor *); /* extern */
? func_802B3E7C(struct ShellActor *, Player *); /* extern */
s16 func_802B3FD0(Player *, struct ShellActor *); /* extern */
? func_802B4104(struct ShellActor *); /* extern */
? func_802B4E30(struct ShellActor *); /* extern */
? func_802B63B8(f32 *, f32 *); /* extern */
? func_802B64C4(f32 *, s16); /* extern */
extern s16 D_8015F6E8;
@ -2194,7 +2194,7 @@ static f32 D_802B9F98 = 40000.0f;
static f32 D_802B9F9C = 0.3f;
static f32 D_802B9FA0 = 40000.0f;
void update_obj_red_blue_shell(struct shell_actor *shell) {
void update_obj_red_blue_shell(struct ShellActor *shell) {
f32 sp94;
f32 sp90;
f32 sp8C;
@ -2228,7 +2228,7 @@ void update_obj_red_blue_shell(struct shell_actor *shell) {
s16 temp_v0_4;
s16 temp_v0_5;
s16 temp_v0_6;
struct triple_shell_parent *temp_v0_7;
struct TripleShellParent *temp_v0_7;
u16 temp_t4;
u16 temp_v1;
u16 temp_v1_2;
@ -2499,18 +2499,18 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/update_obj_red_blue_shell.s")
void func_802B4E30(struct Actor *arg0) {
if ((arg0->unk30.unk44 < 0.0f) && (arg0->unk30.unk34 == 1)) {
arg0->unk18[0] -= (arg0->unk30.unk60[0] * arg0->unk30.unk44);
arg0->unk18[1] -= (arg0->unk30.unk60[1] * arg0->unk30.unk44);
arg0->unk18[2] -= (arg0->unk30.unk60[2] * arg0->unk30.unk44);
arg0->pos[0] -= (arg0->unk30.unk60[0] * arg0->unk30.unk44);
arg0->pos[1] -= (arg0->unk30.unk60[1] * arg0->unk30.unk44);
arg0->pos[2] -= (arg0->unk30.unk60[2] * arg0->unk30.unk44);
}
if ((arg0->unk30.unk3C < 0.0f) && (arg0->unk30.unk30 == 1)) {
arg0->unk18[0] -= (arg0->unk30.unk48[0] * arg0->unk30.unk3C);
arg0->unk18[1] -= (arg0->unk30.unk48[1] * arg0->unk30.unk3C);
arg0->unk18[2] -= (arg0->unk30.unk48[2] * arg0->unk30.unk3C);
arg0->pos[0] -= (arg0->unk30.unk48[0] * arg0->unk30.unk3C);
arg0->pos[1] -= (arg0->unk30.unk48[1] * arg0->unk30.unk3C);
arg0->pos[2] -= (arg0->unk30.unk48[2] * arg0->unk30.unk3C);
}
if ((arg0->unk30.unk40 < 0.0f) && (arg0->unk30.unk32 == 1)) {
arg0->unk18[0] -= (arg0->unk30.unk54[0] * arg0->unk30.unk40);
arg0->unk18[1] -= (arg0->unk30.unk54[1] * arg0->unk30.unk40);
arg0->unk18[2] -= (arg0->unk30.unk54[2] * arg0->unk30.unk40);
arg0->pos[0] -= (arg0->unk30.unk54[0] * arg0->unk30.unk40);
arg0->pos[1] -= (arg0->unk30.unk54[1] * arg0->unk30.unk40);
arg0->pos[2] -= (arg0->unk30.unk54[2] * arg0->unk30.unk40);
}
}

View File

@ -118,7 +118,7 @@ void *vec3f_copy(Vec3f dest, Vec3f src) {
return &dest; //! warning: function returns address of local variable
}
void func_802B5304(Vec3s dest, Vec3s src) {
void vec3s_copy(Vec3s dest, Vec3s src) {
dest[0] = src[0];
dest[1] = src[1];
dest[2] = src[2];