SpaghettiKart/src/code_80296A50.c

7088 lines
242 KiB
C

#include <ultra64.h>
#include <macros.h>
#include <PR/os.h>
#include "types.h"
#include <common_structs.h>
#include <actor_types.h>
#include <defines.h>
#include <PR/gbi.h>
f32 sins(u16); /* extern */
f32 coss(u16); /* extern */
f32 func_802B80D0(Vec3f, Vec3f, u16, f32, f32, f32); // extern
void func_800C98B8(Vec3f, Vec3f, u32); // extern
void func_8029794C(Vec3f, Vec3s, f32);
s32 func_802B4FF8(Mat4, s32);
void func_802B5F74(Mat4, Vec3f, Vec3s);
void func_802B5F00(Mat4, f32);
void mtxf_translate(Mat4, Vec3f); /* extern */
void func_802B52BC(Vec3s, s16, s16, s16);
void load_giant_egg(Vec3f, f32, f32, f32);
s16 func_8029EC88(Vec3f, Vec3s, Vec3f, s16);
extern Player gPlayers[];
extern Player *gPlayerOne;
extern struct Controller gControllers[];
extern s32 gActiveScreenMode;
extern Camera *camera1;
extern struct Actor D_8015F9B8[];
extern Gfx *gDisplayListHead;
extern s32 gModeSelection;
extern s16 gCurrentCourseId;
extern f32 D_80150130[];
extern u16 D_801637B8[];
extern Lights1 D_800DC610[];
extern f32 gCourseDirection;
extern uintptr_t gSegmentTable[];
extern s8 D_0D004E38[];
s32 D_802BA050;
s32 D_802BA054;
s32 D_802BA058;
struct Actor *D_802BA05C;
s8 D_802BA060[512]; // tlut 256
u16 D_802BA260;
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
? func_8000EE58(u16, void *, u16, s32); /* extern */
? func_8029E854(void *, void *); /* extern */
extern u16 D_8015F6FE;
extern u16 D_8015F900;
extern ? D_8015F9B8;
void func_80296A50(s32 arg0, s32 arg3) {
void *sp1C;
s16 temp_t3;
s16 temp_t7;
s16 temp_v0;
s32 temp_a2;
s32 temp_a2_2;
s32 temp_a2_3;
s32 temp_a2_4;
u16 temp_t1;
void *phi_a1;
u16 phi_a2;
void *phi_a1_2;
u16 phi_a2_2;
s32 phi_a2_3;
void *phi_a1_3;
u16 phi_a2_4;
s32 phi_a2_5;
void *phi_a1_4;
u16 phi_a2_6;
s32 phi_a3;
temp_t1 = D_8015F900;
phi_a2 = temp_t1;
phi_a3 = arg3;
if (temp_t1 < 0x64) {
phi_a1 = (temp_t1 * 0x70) + &D_8015F9B8;
loop_2:
if ((arg0 != phi_a1) && ((phi_a1->unk2 & 0xF) == 0) && (phi_a1->unk0 == 7)) {
if (phi_a1->unk6 == 2) {
sp1C = phi_a1;
func_8000EE58(phi_a2, phi_a1, phi_a2, 2);
}
D_8015F6FE += -1;
func_8029E854(phi_a1, phi_a1);
return;
}
temp_a2 = phi_a2 + 1;
phi_a1 += 0x70;
phi_a2 = temp_a2;
if (temp_a2 >= 0x64) {
goto block_10;
}
goto loop_2;
}
block_10:
phi_a2_2 = D_8015F900;
phi_a2_3 = D_8015F900;
if (D_8015F900 < 0x64) {
phi_a1_2 = (D_8015F900 * 0x70) + &D_8015F9B8;
loop_12:
if ((arg0 != phi_a1_2) && ((phi_a1_2->unk2 & 0xF) == 0) && (phi_a1_2->unk0 == 8)) {
temp_t3 = phi_a1_2->unk6;
switch (temp_t3) { /* switch 1 */
case 2: /* switch 1 */
case 3: /* switch 1 */
case 4: /* switch 1 */
case 5: /* switch 1 */
case 8: /* switch 1 */
case 9: /* switch 1 */
sp1C = phi_a1_2;
func_8000EE58(phi_a2_2, phi_a1_2, phi_a2_2);
/* fallthrough */
case 7: /* switch 1 */
D_8015F6FE += -1;
func_8029E854(phi_a1_2, phi_a1_2);
return;
}
} else {
default: /* switch 1 */
temp_a2_2 = phi_a2_2 + 1;
phi_a1_2 += 0x70;
phi_a2_2 = temp_a2_2;
if (temp_a2_2 >= 0x64) {
phi_a2_3 = temp_t1;
goto block_21;
}
goto loop_12;
}
} else {
block_21:
phi_a2_4 = phi_a2_3;
phi_a2_5 = phi_a2_3;
if (phi_a2_3 < 0x64) {
phi_a1_3 = (phi_a2_3 * 0x70) + &D_8015F9B8;
phi_a3 = 2;
loop_23:
if ((arg0 != phi_a1_3) && (phi_a1_3->unk0 == 7)) {
temp_v0 = phi_a1_3->unk6;
if (temp_v0 != 2) {
if (temp_v0 != 7) {
goto block_30;
}
goto block_29;
}
sp1C = phi_a1_3;
func_8000EE58(phi_a2_4, phi_a1_3, phi_a2_4, 2);
block_29:
D_8015F6FE += -1;
func_8029E854(phi_a1_3, phi_a1_3);
return;
}
block_30:
temp_a2_3 = phi_a2_4 + 1;
phi_a1_3 += 0x70;
phi_a2_4 = temp_a2_3;
if (temp_a2_3 >= 0x64) {
phi_a2_5 = temp_t1;
goto block_32;
}
goto loop_23;
}
block_32:
phi_a2_6 = phi_a2_5;
if (phi_a2_5 < 0x64) {
phi_a1_4 = (phi_a2_5 * 0x70) + &D_8015F9B8;
loop_34:
if ((arg0 != phi_a1_4) && (phi_a1_4->unk0 == 8)) {
temp_t7 = phi_a1_4->unk6;
switch (temp_t7) { /* switch 2 */
case 2: /* switch 2 */
case 3: /* switch 2 */
case 4: /* switch 2 */
case 5: /* switch 2 */
case 8: /* switch 2 */
case 9: /* switch 2 */
sp1C = phi_a1_4;
func_8000EE58(phi_a2_6, phi_a1_4, phi_a2_6, phi_a3);
/* fallthrough */
case 7: /* switch 2 */
D_8015F6FE += -1;
func_8029E854(phi_a1_4, phi_a1_4);
return;
}
} else {
default: /* switch 2 */
temp_a2_4 = phi_a2_6 + 1;
phi_a1_4 += 0x70;
phi_a2_6 = temp_a2_4;
if (temp_a2_4 >= 0x64) {
/* Duplicate return node #41. Try simplifying control flow for better match */
return;
}
goto loop_34;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80296A50.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_80296A50(struct Actor *); /* extern */
? func_802AAAAC(UnkActorInner *); /* extern */
? func_802ADDC8(UnkActorInner *, f32, f32, f32, f32); /* extern */
? vec3s_copy(s16 *, s16 *); /* extern */
? vec3f_copy(f32 *, f32 *); /* extern */
extern u16 D_8015F6FE;
extern u16 D_802BA260;
static f32 D_802B95F0 = 1.925f;
static f32 D_802B95F4 = 0.35f;
void func_80296D10(struct Actor *actor, s32 arg1, Vec3s arg2, Vec3f arg3, s16 actorType) {
UnkActorInner *sp2C;
UnkActorInner *temp_a0;
f32 temp_f0;
u16 temp_v0;
s16 phi_v0;
vec3f_copy(actor->pos);
vec3s_copy(actor->rot, arg2);
vec3f_copy(actor->velocity, arg3);
actor->flags = -0x8000;
actor->unk_04 = 0;
actor->state = 0;
temp_a0 = &actor->unk30;
actor->type = actorType;
actor->unk_08 = 0.0f;
actor->boundingBoxSize = 0.0f;
sp2C = temp_a0;
func_802AAAAC(temp_a0);
switch (actorType) {
case 37:
temp_v0 = D_802BA260;
phi_v0 = (s16) temp_v0;
if ((s32) temp_v0 >= 3) {
D_802BA260 = 0;
phi_v0 = 0 & 0xFFFF;
}
actor->state = phi_v0;
D_802BA260 += 1;
return;
case ACTOR_YOSHI_VALLEY_EGG:
actor->flags |= 0x4000;
actor->velocity[2] = actor->pos[2] + 70.0f;
actor->unk_08 = 70.0f;
actor->boundingBoxSize = 20.0f;
actor->velocity[0] = actor->pos[0];
actor->velocity[1] = actor->pos[1];
return;
case ACTOR_KIWANO_FRUIT:
actor->state = 0;
actor->rot[0] = 0;
actor->rot[1] = 0;
actor->rot[2] = 0;
actor->boundingBoxSize = 2.0f;
return;
case ACTOR_FALLING_ROCK:
actor->flags |= 0x4000;
actor->boundingBoxSize = 10.0f;
return;
case ACTOR_TRAIN_ENGINE:
actor->unk_08 = 10.0f;
return;
case ACTOR_BANANA:
actor->flags |= 0x5000;
actor->boundingBoxSize = 2.0f;
return;
case ACTOR_GREEN_SHELL:
D_8015F6FE += 1;
actor->unk_04 = 0;
actor->boundingBoxSize = 4.0f;
actor->flags |= 0x7000;
if ((s32) D_8015F6FE >= 0x15) {
func_80296A50(actor);
return;
}
default:
return;
case ACTOR_RED_SHELL:
D_8015F6FE += 1;
actor->unk_04 = 0;
actor->boundingBoxSize = 4.0f;
actor->flags |= 0x7000;
if ((s32) D_8015F6FE >= 0x15) {
func_80296A50(actor);
return;
}
break;
case 2:
D_8015F6FE += 1;
actor->flags |= 0x4000;
actor->state = 0x0043;
actor->boundingBoxSize = 3.0f;
actor->unk_08 = 20.0f;
return;
case 3:
actor->flags |= 0x4000;
actor->state = 0x0043;
actor->boundingBoxSize = 3.0f;
actor->unk_08 = 23.0f;
return;
case 4:
actor->flags |= 0x4000;
actor->state = 0x0043;
actor->boundingBoxSize = 3.0f;
actor->unk_08 = 17.0f;
return;
case 19:
actor->state = 0x0043;
actor->flags = -0x8000;
actor->boundingBoxSize = 3.0f;
actor->unk_08 = 17.0f;
return;
case 26:
actor->flags |= 0x4000;
actor->state = 0x0043;
actor->boundingBoxSize = 3.0f;
actor->unk_08 = 17.0f;
return;
case 28:
actor->state = 0x0043;
actor->flags = -0x8000;
actor->boundingBoxSize = 3.0f;
actor->unk_08 = 17.0f;
return;
case 33:
actor->flags |= 0x4000;
actor->state = 0x0043;
actor->boundingBoxSize = 3.0f;
actor->unk_08 = 17.0f;
return;
case 29:
actor->flags |= 0x4000;
actor->state = 0x0043;
actor->boundingBoxSize = 3.0f;
actor->unk_08 = 17.0f;
return;
case 30:
actor->flags |= 0x4000;
actor->state = 0x0019;
actor->boundingBoxSize = 3.0f;
actor->unk_08 = 7.0f;
return;
case 31:
actor->flags |= 0x4000;
actor->state = 0x0019;
actor->boundingBoxSize = 3.0f;
actor->unk_08 = 7.0f;
return;
case 32:
actor->flags |= 0x4000;
actor->state = 0x0019;
actor->boundingBoxSize = 3.0f;
actor->unk_08 = 7.0f;
return;
case 25:
actor->flags |= 0x4000;
actor->state = 0x003C;
actor->boundingBoxSize = 3.0f;
actor->unk_08 = 13.0f;
return;
case ACTOR_FAKE_ITEM_BOX:
temp_f0 = D_802B95F0;
actor->flags |= 0x5000;
actor->boundingBoxSize = temp_f0;
actor->unk_08 = D_802B95F4;
func_802ADDC8(temp_a0, temp_f0, actor->pos[0], actor->pos[1], actor->pos[2]);
return;
case ACTOR_HOT_AIR_BALLOON_ITEM_BOX:
actor->flags |= 0x4000;
actor->unk_04 = 0;
actor->state = 5;
actor->boundingBoxSize = 5.5f;
return;
case ACTOR_ITEM_BOX:
actor->flags |= 0x4000;
actor->unk_04 = 0;
actor->state = 0;
actor->boundingBoxSize = 5.5f;
return;
case ACTOR_PIRANHA_PLANT:
actor->flags |= 0x4000;
actor->state = 0x001E;
actor->boundingBoxSize = 5.0f;
break;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80296D10.s")
#endif
void func_80297230(Camera *arg0, struct Actor *arg1) {
switch(arg0 - camera1) {
case 0:
arg1->flags &= 0xFFFE;
break;
case 1:
arg1->flags &= 0xFFFD;
break;
case 2:
arg1->flags &= 0xFFFB;
break;
case 3:
arg1->flags &= 0xFFF7;
break;
}
}
void func_802972B8(Camera *arg0, struct Actor *arg1) {
switch(arg0 - camera1) {
case 0:
arg1->flags |= 1;
break;
case 1:
arg1->flags |= 2;
break;
case 2:
arg1->flags |= 4;
break;
case 3:
arg1->flags |= 8;
break;
}
}
extern s8 D_0D001C20[];
extern s8 D_0D001C88[];
extern s8 D_0D001B90[];
extern s8 D_0D001BD8[];
extern s32 D_800DC50C;
extern Vec3f D_8015F8D0;
extern s32 D_801625EC;
extern s32 D_801625F0;
extern s32 D_801625F4;
extern u16 D_800DC5BC;
void func_80297340(Camera *arg0) {
Mat4 sp38;
s16 temp = D_8015F8D0[2];
if (D_800DC50C == CREDITS_SEQUENCE) { return; }
mtxf_translate(sp38, D_8015F8D0);
if (func_802B4FF8(sp38, 0) == 0) { return; }
if (temp < arg0->pos[2]) {
if (D_800DC5BC != 0) {
gDPSetFogColor(gDisplayListHead++, D_801625EC, D_801625F4, D_801625F0, 0xFF);
gSPDisplayList(gDisplayListHead++, &D_0D001C20);
} else {
gSPDisplayList(gDisplayListHead++, &D_0D001B90);
}
} else if (D_800DC5BC != 0) {
gDPSetFogColor(gDisplayListHead++, D_801625EC, D_801625F4, D_801625F0, 0xFF);
gSPDisplayList(gDisplayListHead++, &D_0D001C88);
} else {
gSPDisplayList(gDisplayListHead++, &D_0D001BD8);
}
}
#ifdef NON_MATCHING
// Possibly gDPLoadTextureBlock
UNUSED void func_80297524(intptr_t addr, s32 a, s32 b) {
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, addr);
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD);
gDPLoadSync(gDisplayListHead++);
/*
if (temp_t4 < 0x7FF) {
phi_a0 = temp_t4;
} else {
phi_a0 = 0x7FF;
}
temp_t1 = arg1 * 2;
temp_v0_4 = temp_t1 / 8;
phi_t2 = temp_v0_4;
if (temp_v0_4 <= 0) {
phi_t2 = 1;
}
if (temp_v0_4 <= 0) {
phi_t3 = 1;
} else {
phi_t3 = temp_v0_4;
}
*/
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 0, 0);
gDPPipeSync(gDisplayListHead++);
gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD);
gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, 0, 0);
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80297524.s")
#endif
void func_802976D8(Vec3s arg0) {
arg0[0] = 0x4000;
arg0[1] = 0;
arg0[2] = 0;
}
s16 func_802B7830(f32, f32); // extern
void func_802976EC(UnkActorInner *arg0, Vec3s arg1) {
f32 x, y, z;
if (arg0->unk34 == 0) {
func_802976D8(arg1);
return;
}
//sp1C = arg0->unk30;
x = arg0->unk60[0];
y = arg0->unk60[1];
z = arg0->unk60[2];
arg1[0] = func_802B7830(z, y) + 0x4000;
arg1[1] = 0;
arg1[2] = func_802B7830(x, y);
}
f32 func_802ABE30(f32, f32, f32, u16); // extern
void func_80297760(struct Actor *arg0, Vec3f arg1) {
arg1[0] = arg0->pos[0];
arg1[1] = arg0->pos[1];
arg1[2] = arg0->pos[2];
arg1[1] = func_802ABE30(arg1[0], arg1[1], arg1[2], arg0->unk30.unk3A);
}
void func_802977B0(Player *arg0) {
arg0->boundingBoxCorners[1].unk_14 |= 2;
arg0->boundingBoxCorners[0].unk_14 |= 2;
arg0->boundingBoxCorners[3].unk_14 |= 2;
arg0->boundingBoxCorners[2].unk_14 |= 2;
}
void func_802977E4(Player *arg0) {
arg0->boundingBoxCorners[1].unk_14 &= 0xFFFD;
arg0->boundingBoxCorners[0].unk_14 &= 0xFFFD;
arg0->boundingBoxCorners[3].unk_14 &= 0xFFFD;
arg0->boundingBoxCorners[2].unk_14 &= 0xFFFD;
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
//extern ? D_0D004E38;
//extern s16 D_802BA060;
//extern ? gSegmentTable;
extern s8 D_0D004E38[];
void func_80297818(void) {
s16 *temp_v0;
s16 *temp_v1;
s16 temp_a0;
s16 temp_a0_2;
s16 temp_a0_3;
s16 temp_a0_4;
s32 temp_a1;
s16 *phi_v1;
s16 *phi_v0;
s32 phi_a1;
s32 i;
phi_v1 = &gSegmentTable[D_0D004738[0] + D_0D004C68[0x1D0] & 0xFFFFFF] + 0x80000000;
//phi_v1 = *(&gSegmentTable + ((&D_0D004E38 >> 0x18) * 4)) + (&D_0D004E38 & 0xFFFFFF) + 0x80000000;
phi_v0 = &D_802BA060;
phi_a1 = 0;
for (i = 0; i < 100; i++) {
//do {
temp_a0 = *phi_v1;
temp_a1 = phi_a1 + 4;
temp_v1 = phi_v1 + 8;
*phi_v0 = ((temp_a0 & 0xF800) >> 5) | ((temp_a0 & 0x7C0) << 5) | (temp_a0 & 0x3E) | (temp_a0 & 1);
temp_a0_2 = temp_v1->unk-6;
temp_v0 = phi_v0 + 8;
temp_v0->unk-6 = ((temp_a0_2 & 0xF800) >> 5) | ((temp_a0_2 & 0x7C0) << 5) | (temp_a0_2 & 0x3E) | (temp_a0_2 & 1);
temp_a0_3 = temp_v1->unk-4;
temp_v0->unk-4 = ((temp_a0_3 & 0xF800) >> 5) | ((temp_a0_3 & 0x7C0) << 5) | (temp_a0_3 & 0x3E) | (temp_a0_3 & 1);
temp_a0_4 = temp_v1->unk-2;
temp_v0->unk-2 = ((temp_a0_4 & 0xF800) >> 5) | ((temp_a0_4 & 0x7C0) << 5) | (temp_a0_4 & 0x3E) | (temp_a0_4 & 1);
phi_v1 = temp_v1;
phi_v0 = temp_v0;
phi_a1 = temp_a1;
} //while (temp_a1 != 0x100);
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80297818.s")
#endif
extern Gfx D_0D007B20[];
void func_8029794C(Vec3f arg0, Vec3s arg1, f32 arg2) {
Mat4 sp20;
arg0[1] += 2.0f;
func_802B5F74(sp20, arg0, arg1);
func_802B5F00(sp20, arg2);
if (func_802B4FF8(sp20, 0) != 0) {
gSPDisplayList(gDisplayListHead++, D_0D007B20);
arg0[1] -= 2.0f;
}
}
void func_802976EC(UnkActorInner*, Vec3s);
void func_802979F8(struct Actor *arg0, f32 arg1) {
Vec3f sp24;
Vec3s sp1C;
if (arg0->unk30.unk34 != 0) {
func_802976EC(&arg0->unk30, sp1C); // arg0 + 0x30
func_80297760(arg0, sp24);
func_8029794C(sp24, sp1C, 0.45f);
}
}
extern s8 D_06013C00[];
extern s8 D_06013CA0[];
extern s8 D_06013D20[];
extern s8 D_06013DA0[];
extern s8 D_06013E20[];
extern f32 D_802B95F8;
#ifdef MISSING_RODATA // jpt_802B95FC
void func_80297A50(Camera *camera, Mat4 arg1, struct Actor *arg2) {
u16 temp_t0;
f32 temp = func_802B80D0(camera->pos, arg2->unk18, camera->rotX[1], 0, D_80150130[camera - camera1], D_802B95F8);
if (temp < 0.0f) { return; }
arg1[3][0] = arg2->unk18[0];
arg1[3][1] = arg2->unk18[1];
arg1[3][2] = arg2->unk18[2];
if (func_802B4FF8(arg1, 0) != 0) { return; }
temp_t0 = arg2->unk6;
switch (temp_t0) {
case 0:
gSPDisplayList(gDisplayListHead++, D_06013C00);
break;
case 1:
gSPDisplayList(gDisplayListHead++, D_06013CA0);
break;
case 2:
gSPDisplayList(gDisplayListHead++, D_06013D20);
break;
case 3:
gSPDisplayList(gDisplayListHead++, D_06013DA0);
break;
case 4:
gSPDisplayList(gDisplayListHead++, D_06013E20);
break;
}
}
#endif
GLOBAL_ASM("asm/non_matchings/code_actors/func_80297A50.s")
extern f64 D_802B9610;
void update_obj_yoshi_valley_egg(struct YoshiValleyEgg *egg) {
egg->pathRot += 0x5B;
egg->pos[0] = egg->pathCenter[0] + (sins(egg->pathRot) * egg->pathRadius);
egg->pos[2] = egg->pathCenter[2] + (coss(egg->pathRot) * egg->pathRadius);
if ((egg->flags & 0x400) != 0) {
egg->pathCenter[1] -= D_802B9610;
if (egg->pathCenter[1] < -3.0f) {
egg->pathCenter[1] = -3.0f;
}
egg->pos[1] += egg->pathCenter[1];
if (egg->pos[1] < 0.0f) {
egg->pos[1] = 0.0f;
egg->pathCenter[1] = 0.0f;
egg->flags &= 0xFBFF;
}
egg->eggRot -= 0x4FA;
}
egg->eggRot -= 0x222;
}
void update_obj_trees_cacti_shrubs(struct Actor *arg0) {
if (((arg0->flags & 0x800) == 0) && ((arg0->flags & 0x400) != 0)) {
arg0->pos[1] = arg0->pos[1] + 4.0f;
if (arg0->pos[1] > 800.0f) {
arg0->flags |= 0x800;
}
}
}
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_800C9060(f32, f32, s32, ?, struct KiwanoFruit *, Player **); /* extern */
s32 func_802ABD10(u16); /* extern */
extern s32 D_80162DF8;
extern u16 D_80164438;
extern s32 D_80164490;
static f32 D_802B9618 = 2.3f;
static f32 D_802B961C = 0.7f;
static f32 D_802B9620 = 0.3f;
void update_obj_kiwano_fruit(struct KiwanoFruit *fruit) {
Player *sp24;
f32 sp20;
f32 sp1C;
f32 sp18;
Player *temp_v1;
f32 temp_f12;
f32 temp_f12_2;
f32 temp_f14;
f32 temp_f14_2;
f32 temp_f16;
f32 temp_f16_2;
f32 temp_f18;
f32 temp_f2;
f32 temp_f2_2;
s16 temp_a0;
s16 temp_t6;
s32 temp_v0_2;
struct KiwanoFruit *temp_a2;
void *temp_v0;
/* old unfinished wip decomp
u32 temp_t7 = arg0->unk4;
Player *temp_v1 = &gPlayers[temp_t7];
void *phi_a2;
s16 phi_a0;
void *phi_a2_2;
void *phi_a2_3;
temp_a2 = arg0;
phi_a2 = temp_a2;
phi_a2_2 = temp_a2;
phi_a2_3 = temp_a2;
if (((temp_v1->unk_000 & 0x1000) != 0) || (temp_v1->unk_110.unk34 == 0)) {
arg0->unk6 = 0;
return;
}
switch(arg0->unk6) {
case 0:
//sp24 = temp_v1;
//phi_a2 = arg0;
if ((func_802ABD10(temp_v1->unk_110.unk3A, arg0) & 0xFF) == 8) {
arg0->unk6 = 1;
arg0->unk24[0] = 80.0f;
break;
case 1:
temp_v0 = D_80164490 + D_80164438[(u16)(temp_v1 - gPlayerOne)];
temp_f2 = temp_v1->pos - temp_v0->unk0;
arg0 = phi_a2;
sp20 = temp_f2;
//sp24 = temp_t7 + &gPlayers;
temp_f16 = (temp_t7 + &gPlayers)->unk18 - temp_v0->unk2;
sp1C = temp_f16;
temp_f14 = (temp_t7 + &gPlayers)->unk1C - temp_v0->unk4;
sp18 = temp_f14;
temp_a2_2 = arg0;
temp_f18 = temp_a2_2->unk24;
temp_f12 = temp_f18 / sqrtf((temp_f2 * temp_f2) + (temp_f16 * temp_f16) + (temp_f14 * temp_f14));
temp_f2_2 = temp_f2 * temp_f12;
temp_f16_2 = temp_f16 * temp_f12;
temp_a2_2->unk18 = (temp_t7 + &gPlayers)->unk14 + temp_f2_2;
temp_f14_2 = temp_f14 * temp_f12;
temp_a2_2->unk1C = (temp_t7 + &gPlayers)->unk18 + temp_f16_2;
temp_a2_2->unk24 = temp_f18 - 2.0f;
temp_a2_2->unk20 = (temp_t7 + &gPlayers)->unk1C + temp_f14_2;
phi_a2_3 = temp_a2_2;
if (temp_a2_2->unk24 <= 0.0f) {
temp_a2_2->unk6 = 2;
temp_a2_2->unk8 = 30.0f;
temp_a2_2->unk24 = 0.0f;
temp_a2_2->unk28 = D_802B9618;
temp_a2_2->unk2C = 0.0f;
temp_v0_2 = (temp_t7 + &gPlayers)->unkBC;
if ((temp_v0_2 & 0x200) != 0) {
arg0 = temp_a2_2;
func_800C9060((u8)(temp_t7 - gPlayerOne), 0x1900A052);
phi_a2_3 = arg0;
} else {
temp_f12_2 = D_802B961C;
(temp_t7 + &gPlayers)->unkBC = temp_v0_2 | 0x8000;
(temp_t7 + &gPlayers)->unk14 = (temp_t7 + &gPlayers)->unk14 - (temp_f2_2 * 4.0f);
(temp_t7 + &gPlayers)->unk1C = (temp_t7 + &gPlayers)->unk1C - (temp_f14_2 * 4.0f);
(temp_t7 + &gPlayers)->unk34 = (temp_t7 + &gPlayers)->unk34 - (temp_f2_2 * temp_f12_2);
(temp_t7 + &gPlayers)->unk3C = (temp_t7 + &gPlayers)->unk3C - (temp_f14_2 * temp_f12_2);
arg0 = temp_a2_2;
func_800C9060((u8)(temp_t7 - gPlayerOne), 0x19007018);
phi_a2_3 = arg0;
if (gModeSelection != GRAND_PRIX) {
D_80162DF8 = 1;
}
}
}
break;
case 2:
arg0->unk24[1] -= D_802B9620;
arg0->unk18[0] += arg0->unk24[0];
arg0->unk18[1] += arg0->unk24[1];
arg0->unk18[2] += arg0->unk24[2];
arg0->unk8 = arg0->unk8 - 1.0f;
if (arg0->unk8 < 0.0f) {
arg0->unk6 = 0;
}
goto block_17;
break;
}
phi_a0 = phi_a2_3->unk6;
phi_a2_2 = phi_a2_3;
if (phi_a0 != 0) {
phi_a2_2->unk12 = phi_a2_2->unk12 + 1;
if (phi_a2_2->unk12 == 8) {
phi_a2_2->unk12 = 0;
phi_a2_2->unk10 = phi_a2_2->unk10 + 1;
if (phi_a2_2->unk10 == 3) {
phi_a2_2->unk10 = 0;
*/
s16 phi_a0;
struct KiwanoFruit *phi_a2;
struct KiwanoFruit *phi_a2_2;
temp_t6 = fruit->targetPlayer;
temp_v1 = &gPlayers[temp_t6];
phi_a2 = fruit;
phi_a2_2 = fruit;
if (((temp_v1->unk_000 & 0x1000) != 0) || (temp_v1->unk_110.unk34 == 0)) {
fruit->state = 0;
return;
}
temp_a0 = fruit->state;
phi_a0 = temp_a0;
switch (temp_a0) { /* irregular */
case 0:
fruit = fruit;
sp24 = temp_v1;
if ((func_802ABD10(temp_v1->unk_110.unk3A) & 0xFF) == 8) {
fruit->state = 1;
fruit->velocity[0] = 80.0f;
case 1:
temp_v0 = D_80164490 + (*(&D_80164438 + ((((s32) (&gPlayers[temp_t6] - gPlayerOne) / 3544) & 0xFFFF) * 2)) * 8);
temp_f2 = gPlayers[temp_t6].pos[0] - (f32) temp_v0->unk0;
fruit = fruit;
sp20 = temp_f2;
sp24 = &gPlayers[temp_t6];
temp_f16 = gPlayers[temp_t6].pos[1] - (f32) temp_v0->unk2;
sp1C = temp_f16;
temp_f14 = gPlayers[temp_t6].pos[2] - (f32) temp_v0->unk_04;
sp18 = temp_f14;
temp_a2 = fruit;
temp_f18 = temp_a2->velocity[0];
temp_f12 = temp_f18 / sqrtf((temp_f2 * temp_f2) + (temp_f16 * temp_f16) + (temp_f14 * temp_f14));
temp_f2_2 = temp_f2 * temp_f12;
temp_f16_2 = temp_f16 * temp_f12;
temp_a2->pos[0] = gPlayers[temp_t6].pos[0] + temp_f2_2;
temp_f14_2 = temp_f14 * temp_f12;
temp_a2->pos[1] = gPlayers[temp_t6].pos[1] + temp_f16_2;
temp_a2->velocity[0] = temp_f18 - 2.0f;
temp_a2->pos[2] = gPlayers[temp_t6].pos[2] + temp_f14_2;
phi_a2_2 = temp_a2;
if (temp_a2->velocity[0] <= 0.0f) {
temp_a2->state = 2;
temp_a2->bonkTimer = 30.0f;
temp_a2->velocity[0] = 0.0f;
temp_a2->velocity[1] = D_802B9618;
temp_a2->velocity[2] = 0.0f;
temp_v0_2 = gPlayers[temp_t6].unk_0BC;
if ((temp_v0_2 & 0x200) != 0) {
fruit = temp_a2;
func_800C9060(temp_f12, temp_f14_2, ((s32) (&gPlayers[temp_t6] - gPlayerOne) / 3544) & 0xFF, 0x1900A052, temp_a2, &gPlayerOne);
phi_a2_2 = fruit;
} else {
temp_f12_2 = D_802B961C;
gPlayers[temp_t6].unk_0BC = temp_v0_2 | 0x8000;
gPlayers[temp_t6].pos[0] -= temp_f2_2 * 4.0f;
gPlayers[temp_t6].pos[2] -= temp_f14_2 * 4.0f;
gPlayers[temp_t6].unk_034 -= temp_f2_2 * temp_f12_2;
gPlayers[temp_t6].unk_03C -= temp_f14_2 * temp_f12_2;
fruit = temp_a2;
func_800C9060(temp_f12_2, temp_f14_2, ((s32) (&gPlayers[temp_t6] - gPlayerOne) / 3544) & 0xFF, 0x19007018, temp_a2, &gPlayerOne);
phi_a2_2 = fruit;
if (gModeSelection != 0) {
D_80162DF8 = 1;
}
}
}
block_17:
phi_a0 = phi_a2_2->state;
phi_a2 = phi_a2_2;
default:
if (phi_a0 != 0) {
phi_a2->animTimer += 1;
if (phi_a2->animTimer == 8) {
phi_a2->animTimer = 0;
phi_a2->animState += 1;
if (phi_a2->animState == 3) {
phi_a2->animState = 0;
}
}
}
}
break;
case 2:
fruit->velocity[1] -= D_802B9620;
fruit->pos[0] += fruit->velocity[0];
fruit->pos[1] += fruit->velocity[1];
fruit->pos[2] += fruit->velocity[2];
fruit->bonkTimer -= 1.0f;
if (fruit->bonkTimer < 0.0f) {
fruit->state = 0;
}
goto block_17;
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/update_obj_kiwano_fruit.s")
#endif
void update_obj_paddle_wheel(struct PaddleWheelBoat *boat) {
boat->wheelRot += 0x38E;
}
extern void func_800C9D80(Vec3f *arg0, Vec3f *arg1, u32 arg2); // extern
// wheels
void update_obj_train_engine(struct TrainCar *arg0) {
arg0->wheelRot -= 0x666;
if (arg0->unk_08 != 0.0f) {
arg0->unk_08 = 0.0f;
func_800C9D80(arg0->pos, arg0->velocity, 0x51018000);
}
}
// wheels
void update_obj_train_car1(struct TrainCar *arg0) {
arg0->wheelRot -= 0x4FA;
}
// wheels
void update_obj_train_car2(struct TrainCar *arg0) {
arg0->wheelRot -= 0x666;
}
void update_obj_piranha_plant(struct PiranhaPlant *arg0) {
if ((arg0->flags & 0x800) == 0) {
if ((arg0->flags & 0x400) != 0) {
arg0->pos[1] += 4.0f;
if (arg0->pos[1] > 800.0f) {
arg0->flags |= 0x800;
}
} else {
// This has to be an unrolled loop
if (arg0->visibilityStates[0] == 1) {
arg0->timers[0]++;
if (arg0->timers[0] > 60) {
arg0->timers[0] = 6;
}
} else {
arg0->timers[0] = 0;
}
if (arg0->visibilityStates[1] == 1) {
arg0->timers[1]++;
if (arg0->timers[1] > 60) {
arg0->timers[1] = 6;
}
} else {
arg0->timers[1] = 0;
}
if (arg0->visibilityStates[2] == 1) {
arg0->timers[2]++;
if (arg0->timers[2] > 60) {
arg0->timers[2] = 6;
}
} else {
arg0->timers[2] = 0;
}
if (arg0->visibilityStates[3] == 1) {
arg0->timers[3]++;
if (arg0->timers[3] > 60) {
arg0->timers[3] = 6;
}
} else {
arg0->timers[3] = 0;
}
}
}
}
extern s8 D_06006990[];
extern s8 D_0600D850[];
extern f32 D_802B9624;
extern f32 D_802B9628;
extern s32 D_802BA058;
// Mario Raceway Load piranha plant textures?
void func_80298328(Camera *arg0, Mat4 arg1, struct PiranhaPlant *arg2) {
s32 pad;
s32 addr;
s16 temp_lo = arg0 - camera1;
s16 phi_t4;
s16 temp = arg2->flags;
f32 temp_f0;
if (temp & 0x800) { return; }
temp_f0 = func_802B80D0(arg0->pos, arg2->pos, arg0->rotX[1], 0, D_80150130[arg0 - camera1], D_802B9624);
if (temp_f0 < 0.0f) {
switch(temp_lo) {
case 0:
arg2->visibilityStates[0] = -1;
break;
case 1:
arg2->visibilityStates[1] = -1;
break;
case 2:
arg2->visibilityStates[2] = -1;
break;
case 3:
arg2->visibilityStates[3] = -1;
break;
}
return;
}
arg1[3][0] = arg2->pos[0];
arg1[3][1] = arg2->pos[1];
arg1[3][2] = arg2->pos[2];
if (func_802B4FF8(arg1, 0) == 0) { return; }
if (D_802B9628 < temp_f0) {
switch(temp_lo) {
case 0:
arg2->visibilityStates[0] = 0;
break;
case 1:
arg2->visibilityStates[1] = 0;
break;
case 2:
arg2->visibilityStates[2] = 0;
break;
case 3:
arg2->visibilityStates[3] = 0;
break;
}
phi_t4 = 0;
} else {
switch(temp_lo) {
case 0:
arg2->visibilityStates[0] = 1;
break;
case 1:
arg2->visibilityStates[1] = 1;
break;
case 2:
arg2->visibilityStates[2] = 1;
break;
case 3:
arg2->visibilityStates[3] = 1;
break;
}
switch(temp_lo) {
case 0:
phi_t4 = arg2->timers[0];
break;
case 1:
phi_t4 = arg2->timers[1];
break;
case 2:
phi_t4 = arg2->timers[2];
break;
case 3:
phi_t4 = arg2->timers[3];
break;
}
}
phi_t4 /= 6;
if (phi_t4 > 8) {
phi_t4 = 8;
}
addr = D_802BA058 + (phi_t4 << 0xB);
gDPLoadTextureBlock(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(addr), G_IM_FMT_CI, G_IM_SIZ_8b, 32, 64, 0,
G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
if (gCurrentCourseId == COURSE_MARIO_RACEWAY) {
gSPDisplayList(gDisplayListHead++, &D_06006990);
} else {
gSPDisplayList(gDisplayListHead++, &D_0600D850);
}
}
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_800C98B8(? *, ? *, ?); /* extern */
? func_800C99E0(? *, ?); /* extern */
s32 func_802B4FF8(f32 (*)[4], ?); /* extern */
f32 func_802B80D0(Camera *, f32 *, u16, f32, f32, f32); /* extern */
extern ? D_06013C00;
extern ? D_06013CA0;
extern ? D_06013D20;
extern ? D_06013DA0;
extern ? D_06013E20;
extern ? D_06014200;
extern u16 D_80150112;
extern ? D_80150130;
extern u16 D_8015F700;
extern u16 D_8015F702;
extern f32 D_8015F704;
extern ? D_8015F708;
extern f32 gCourseDirection;
static ? D_802B91C8; /* unable to generate initializer */
static f32 D_802B962C = 6.4e7f;
static f32 D_802B9630 = 4000000.0f;
static f32 D_802B9648 = 160000.0f;
void func_802986B4(Camera *camera, f32 (*arg1)[4], struct Actor *arg2) {
s16 *sp9C;
f32 sp90;
f32 sp8C;
f32 sp88;
Gfx *temp_v0;
Gfx *temp_v0_2;
Gfx *temp_v0_3;
Gfx *temp_v0_4;
Gfx *temp_v0_5;
Gfx *temp_v0_6;
Gfx *temp_v0_7;
Gfx *temp_v0_8;
f32 *temp_a1;
f32 temp_f0;
s16 *temp_t1;
s16 temp_v0_9;
u16 temp_s1;
u16 temp_t4;
u16 temp_v0_10;
s16 phi_v0;
s16 *phi_s1;
Gfx *phi_v0_2;
s16 *phi_s5;
s16 *phi_t1;
s16 *phi_s5_2;
s16 *phi_s5_3;
temp_t1 = gSegmentTable[(u32) &D_06014200 >> 0x18] + ((s32) &D_06014200 & 0xFFFFFF) + 0x80000000;
D_8015F704 = D_802B962C;
temp_v0 = gDisplayListHead;
gDisplayListHead = temp_v0 + 8;
temp_v0->words.w1 = -1U;
temp_v0->words.w0 = 0xBB000001;
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->words.w1 = -0x00000C07U;
temp_v0_2->words.w0 = 0xFC127E24;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->words.w1 = 0x00553078;
temp_v0_3->words.w0 = 0xB900031D;
phi_s1 = temp_t1;
phi_s5 = NULL;
phi_t1 = temp_t1;
phi_s5_3 = NULL;
if (*temp_t1 != -0x8000) {
sp9C = temp_t1;
phi_v0 = *temp_t1;
loop_2:
temp_a1 = &sp88;
sp88 = (f32) phi_v0 * gCourseDirection;
sp8C = (f32) phi_s1->unk2;
sp90 = (f32) phi_s1->unk_04;
temp_f0 = func_802B80D0(camera, temp_a1, (u16) camera->rotX2, 0.0f, *(&D_80150130 + (((s32) (camera - camera1) / 184) * 4)), D_802B9630);
phi_s5_2 = phi_s5_3;
phi_s5_2 = phi_s5_3;
if (temp_f0 > 0.0f) {
if (temp_f0 < D_8015F704) {
D_8015F704 = temp_f0;
phi_s5_2 = phi_s1;
}
arg1->unk30 = sp88;
arg1->unk34 = sp8C;
arg1->unk38 = sp90;
if (((s32) D_80150112 < 0x80) && (func_802B4FF8(arg1, 0) != 0)) {
temp_t4 = phi_s1->unk6;
switch (temp_t4) {
case 0:
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->words.w1 = (u32) &D_06013C00;
phi_v0_2 = temp_v0_4;
block_14:
phi_v0_2->words.w0 = 0x06000000;
break;
case 1:
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->words.w1 = (u32) &D_06013CA0;
phi_v0_2 = temp_v0_5;
goto block_14;
case 2:
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->words.w1 = (u32) &D_06013D20;
phi_v0_2 = temp_v0_6;
goto block_14;
case 3:
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->words.w1 = (u32) &D_06013DA0;
phi_v0_2 = temp_v0_7;
goto block_14;
case 4:
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->words.w1 = (u32) &D_06013E20;
phi_v0_2 = temp_v0_8;
goto block_14;
}
goto block_15;
}
} else {
block_15:
temp_v0_9 = phi_s1->unk_08;
phi_v0 = temp_v0_9;
phi_s1 += 8;
phi_s5 = phi_s5_2;
phi_s5_3 = phi_s5_2;
if (temp_v0_9 == -0x8000) {
phi_t1 = sp9C;
goto block_17;
}
goto loop_2;
}
} else {
block_17:
if ((camera == camera1) && (phi_s5 != NULL)) {
temp_v0_10 = D_8015F700;
if (temp_v0_10 == 0) {
temp_s1 = ((s32) (phi_s5 - phi_t1) >> 3) & 0xFFFF;
if ((D_8015F702 != temp_s1) && (D_8015F704 < D_802B9648)) {
func_800C99E0(&D_8015F708, 0x1901904D);
D_8015F708.unk0 = (f32) ((f32) phi_s5->unk0 * gCourseDirection);
D_8015F708.unk4 = (f32) phi_s5->unk2;
D_8015F708.unk8 = (f32) phi_s5->unk_04;
D_8015F702 = temp_s1;
func_800C98B8(&D_8015F708, &D_802B91C8, 0x1901904D);
D_8015F700 = 0x00F0;
}
} else {
D_8015F700 = temp_v0_10 - 1;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_802986B4.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_800C9060(s32, ?); /* extern */
? func_800C90F4(s32, s32); /* extern */
? func_800C98B8(f32 *, f32 *, ?); /* extern */
s32 func_8029EEB8(Player *, f32 *, ?, ?, f32); /* extern */
extern ? D_06013F78;
extern f32 gCourseDirection;
static f32 D_802B964C = 0.8f;
void func_80298AC0(Player *player) {
f32 sp6C;
f32 sp68;
f32 sp64;
f32 *temp_a1;
s16 *temp_s0;
s16 temp_v0;
s16 temp_v0_2;
s16 phi_v0;
s16 *phi_s0;
temp_s0 = gSegmentTable[(u32) &D_06013F78 >> 0x18] + ((s32) &D_06013F78 & 0xFFFFFF) + 0x80000000;
temp_v0 = *temp_s0;
phi_v0 = temp_v0;
phi_s0 = temp_s0;
if (temp_v0 != -0x8000) {
loop_2:
temp_a1 = &sp64;
sp64 = (f32) phi_v0 * gCourseDirection;
sp68 = (f32) phi_s0->unk2;
sp6C = (f32) phi_s0->unk_04;
if (func_8029EEB8(player, temp_a1, 0x40A00000, 0x42200000, D_802B964C) == 1) {
if ((player->unk_0BC & 0x200) != 0) {
func_800C98B8(player->pos, &player->unk_034, 0x19018010);
func_800C90F4(((s32) (player - gPlayerOne) / 3544) & 0xFF, (player->characterId * 0x10) + 0x2900800D);
phi_s0->unk6 = (s16) (phi_s0->unk6 | 0x400);
}
if ((player->unk_000 & 0x100) == 0) {
func_800C9060(((s32) (player - gPlayerOne) / 3544) & 0xFF, 0x19007018);
}
} else {
temp_v0_2 = phi_s0->unkA;
phi_v0 = temp_v0_2;
phi_s0 += 0xA;
if (temp_v0_2 == -0x8000) {
} else {
goto loop_2;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80298AC0.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_80298AC0(Player *arg0); // extern
s8 func_802ABD10(u16); // extern
extern Player *gPlayers;
void func_80298C94(void) {
Player *phi_s0;
s32 i;
s8 temp_s0;
for (i = 0; i < 4; i++) {
phi_s0 = &gPlayers[i];
if ((phi_s0->unk_000 & 0xC000) != 0) {
temp_s0 = (u8)func_802ABD10(phi_s0->unk_11A);
if (temp_s0 == 8) {
func_80298AC0(phi_s0);
}
}
//temp_s0 = phi_s0 + 0xDD8;
//phi_s0 = temp_s0;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80298C94.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern ? D_06013F78;
extern ? gSegmentTable;
void func_80298D10(void) {
s16 *temp_v1;
s16 *temp_v1_2;
s16 *phi_v1;
temp_v1 = *(&gSegmentTable + ((&D_06013F78 >> 0x18) * 4)) + (&D_06013F78 & 0xFFFFFF) + 0x80000000;
phi_v1 = temp_v1;
if (*temp_v1 != -0x8000) {
do {
phi_v1->unk6 = phi_v1->unk6 & 0xF;
temp_v1_2 = phi_v1 + 0xA;
temp_v1_2->unk-8 = phi_v1->unk_08;
phi_v1 = temp_v1_2;
} while (phi_v1->unkA != -0x8000);
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80298D10.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_802B4FF8(f32 (*)[4], ?); /* extern */
? func_802B5F74(f32 (*)[4], f32 *, ? *); /* extern */
f32 func_802B80D0(Camera *, f32 *, u16, f32, f32, f32); /* extern */
extern ? D_06010CC0;
extern ? D_06011DC8;
extern ? D_06012EF0;
extern ? D_060138D0;
extern ? D_06013F78;
extern u16 D_80150112;
extern ? D_80150130;
extern f32 gCourseDirection;
static ? D_802B87E0; /* unable to generate initializer */
static f32 D_802B9650 = 9e6.0f;
static f32 D_802B9654 = 1000000.0f;
void func_80298D7C(Camera *camera, f32 (*arg1)[4], struct Actor *arg2) {
f32 spDC;
f32 spD8;
f32 spD4;
? sp88;
Gfx *temp_v0;
Gfx *temp_v0_2;
Gfx *temp_v0_3;
Gfx *temp_v0_4;
Gfx *temp_v0_5;
Gfx *temp_v0_6;
Gfx *temp_v0_7;
Gfx *temp_v0_8;
f32 *temp_a1;
f32 *temp_s7;
s16 *temp_s1;
s16 *temp_s1_2;
s16 temp_s0;
s16 temp_t0;
s16 *phi_s1;
f32 phi_f22;
Gfx *phi_v0;
temp_s1 = gSegmentTable[(u32) &D_06013F78 >> 0x18] + ((s32) &D_06013F78 & 0xFFFFFF) + 0x80000000;
sp88.unk0 = (s32) D_802B87E0.unk0;
sp88.unk4 = (u16) D_802B87E0.unk4;
phi_s1 = temp_s1;
if (D_800DC50C == 9) {
phi_f22 = D_802B9650;
} else {
phi_f22 = D_802B9654;
}
temp_v0 = gDisplayListHead;
gDisplayListHead = temp_v0 + 8;
temp_v0->words.w1 = -1U;
temp_v0->words.w0 = 0xBB000001;
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->words.w1 = -0x00000C07U;
temp_v0_2->words.w0 = 0xFC127E24;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->words.w0 = 0xB900031D;
temp_v0_3->words.w1 = 0x00553078;
temp_s7 = &spD4;
if (*temp_s1 != -0x8000) {
loop_5:
temp_s0 = phi_s1->unk6;
if ((temp_s0 & 0x800) != 0) {
goto block_29;
}
if (((temp_s0 & 0x400) != 0) && ((D_800DC5FC == 0) || (camera == camera1))) {
phi_s1->unk2 = (s16) (phi_s1->unk2 + 0xA);
if (phi_s1->unk2 >= 0x321) {
phi_s1->unk6 = (s16) (phi_s1->unk6 | 0x800);
}
}
temp_a1 = temp_s7;
spD4 = (f32) phi_s1->unk0 * gCourseDirection;
spD8 = (f32) phi_s1->unk2;
spDC = (f32) phi_s1->unk_04;
temp_t0 = temp_s0 & 0xF;
if (func_802B80D0(camera, temp_a1, (u16) camera->rotX2, 0.0f, *(&D_80150130 + (((s32) (camera - camera1) / 184) * 4)), phi_f22) < 0.0f) {
goto block_29;
}
if (temp_t0 == 6) {
func_802B5F74((f32 (*)[4]) &sp90[0], temp_s7, &sp88);
if ((s32) D_80150112 < 0x80) {
func_802B4FF8((f32 (*)[4]) &sp90[0], 0);
goto block_19;
}
} else {
arg1->unk30 = spD4;
arg1->unk34 = spD8;
arg1->unk38 = spDC;
if ((s32) D_80150112 < 0x80) {
func_802B4FF8(arg1, 0);
block_19:
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->words.w1 = 0x00020000;
temp_v0_4->words.w0 = 0xB6000000;
switch (temp_t0) { /* irregular */
case 0:
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->words.w1 = (u32) &D_06010CC0;
phi_v0 = temp_v0_5;
block_28:
phi_v0->words.w0 = 0x06000000;
break;
case 4:
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->words.w1 = (u32) &D_06011DC8;
phi_v0 = temp_v0_6;
goto block_28;
case 5:
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->words.w1 = (u32) &D_06012EF0;
phi_v0 = temp_v0_7;
goto block_28;
case 6:
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->words.w1 = (u32) &D_060138D0;
phi_v0 = temp_v0_8;
goto block_28;
}
block_29:
temp_s1_2 = phi_s1 + 0xA;
phi_s1 = temp_s1_2;
if (*temp_s1_2 != -0x8000) {
goto loop_5;
}
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80298D7C.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_8029794C(f32 *, s16 *, ?, f32 (*)[4]); /* extern */
s32 func_802B4FF8(f32 (*)[4], ?); /* extern */
f32 func_802B80D0(f32 *, u16, ?, f32, f32); /* extern */
extern ? D_06006A68;
extern ? D_0D004C68;
extern ? D_80150130;
static f32 D_802B9658 = 1.6e7f;
static f32 D_802B965C = 250000.0f;
void func_80299144(Camera *camera, f32 (*arg1)[4], struct Actor *arg2) {
s16 sp4A;
f32 *sp28;
Gfx *temp_v0_2;
Gfx *temp_v0_3;
Gfx *temp_v0_4;
Gfx *temp_v0_5;
Gfx *temp_v0_6;
Gfx *temp_v0_7;
Gfx *temp_v0_8;
f32 *temp_a1;
f32 temp_f0;
s16 temp_v0;
temp_v0 = arg2->flags;
temp_a1 = arg2->pos;
if ((temp_v0 & 0x800) == 0) {
sp28 = temp_a1;
sp4A = temp_v0;
temp_f0 = func_802B80D0(temp_a1, (u16) camera->rotX2, 0, *(&D_80150130 + (((s32) (camera - camera1) / 184) * 4)), D_802B9658);
if (!(temp_f0 < 0.0f)) {
if (((temp_v0 & 0x400) == 0) && (temp_f0 < D_802B965C)) {
func_8029794C(sp28, arg2->rot, 0x40400000, arg1);
}
arg1->unk30 = (f32) arg2->pos[0];
arg1->unk34 = (f32) arg2->pos[1];
arg1->unk38 = (f32) arg2->pos[2];
if (func_802B4FF8(arg1, 0) != 0) {
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->words.w0 = 0xFD100000;
temp_v0_2->words.w1 = (u32) &D_0D004C68;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->words.w1 = 0;
temp_v0_3->words.w0 = 0xE8000000;
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->words.w1 = 0x07000000;
temp_v0_4->words.w0 = 0xF5000100;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->words.w1 = 0;
temp_v0_5->words.w0 = 0xE6000000;
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->words.w1 = 0x073FC000;
temp_v0_6->words.w0 = 0xF0000000;
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->words.w1 = 0;
temp_v0_7->words.w0 = 0xE7000000;
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->words.w1 = (u32) &D_06006A68;
temp_v0_8->words.w0 = 0x06000000;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80299144.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8029794C(void *, void *, ?, void *); // extern
s32 func_802B4FF8(void *, ?); // extern
f32 func_802B80D0(void *, u16, ?, f32, f32); // extern
extern ? D_06015B48;
extern ? D_0D004C68;
extern f32 D_802B9660;
extern f32 D_802B9664;
void func_8029930C(void *arg0, void *arg1, void *arg2) {
s16 sp4A;
void *sp28;
f32 temp_f0;
s16 temp_v0;
void *temp_a1;
void *temp_v0_2;
void *temp_v0_3;
void *temp_v0_4;
void *temp_v0_5;
void *temp_v0_6;
void *temp_v0_7;
void *temp_v0_8;
temp_v0 = arg2->unk2;
temp_a1 = arg2 + 0x18;
if ((temp_v0 & 0x800) == 0) {
sp28 = temp_a1;
sp4A = temp_v0;
temp_f0 = func_802B80D0(temp_a1, arg0->unk26, 0, (&D_80150130)[(arg0 - camera1) / 0xB8], D_802B9660);
if (!(temp_f0 < 0.0f)) {
if (((temp_v0 & 0x400) == 0) && (temp_f0 < D_802B9664)) {
func_8029794C(sp28, arg2 + 0x10, 0x40333333, arg1);
}
arg1->unk30 = arg2->pos;
arg1->unk34 = arg2->unk1C;
arg1->unk38 = arg2->unk20;
if (func_802B4FF8(arg1, 0) != 0) {
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->unk0 = 0xFD100000;
temp_v0_2->unk_04 = &D_0D004C68;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->unk_04 = 0;
temp_v0_3->unk0 = 0xE8000000;
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->unk_04 = 0x7000000;
temp_v0_4->unk0 = 0xF5000100;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->unk_04 = 0;
temp_v0_5->unk0 = 0xE6000000;
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->unk_04 = 0x73FC000;
temp_v0_6->unk0 = 0xF0000000;
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->unk_04 = 0;
temp_v0_7->unk0 = 0xE7000000;
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->unk_04 = &D_06015B48;
temp_v0_8->unk0 = 0x6000000;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029930C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8029794C(void *, void *, ?, void *); // extern
s32 func_802B4FF8(void *, ?); // extern
f32 func_802B80D0(void *, u16, ?, f32, f32); // extern
extern ? D_0600D4A0;
extern ? D_0D004C68;
extern f32 D_802B9668;
extern f32 D_802B966C;
void func_802994D4(void *arg0, void *arg1, void *arg2) {
s16 sp4A;
void *sp28;
f32 temp_f0;
s16 temp_v0;
void *temp_a1;
void *temp_v0_2;
void *temp_v0_3;
void *temp_v0_4;
void *temp_v0_5;
void *temp_v0_6;
void *temp_v0_7;
void *temp_v0_8;
temp_v0 = arg2->unk2;
temp_a1 = arg2 + 0x18;
if ((temp_v0 & 0x800) == 0) {
sp28 = temp_a1;
sp4A = temp_v0;
temp_f0 = func_802B80D0(temp_a1, arg0->unk26, 0, (&D_80150130)[(arg0 - camera1) / 0xB8], D_802B9668);
if (!(temp_f0 < 0.0f)) {
if (((temp_v0 & 0x400) == 0) && (temp_f0 < D_802B966C)) {
func_8029794C(sp28, arg2 + 0x10, 0x40333333, arg1);
}
arg1->unk30 = arg2->pos;
arg1->unk34 = arg2->unk1C;
arg1->unk38 = arg2->unk20;
if (func_802B4FF8(arg1, 0) != 0) {
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->unk0 = 0xFD100000;
temp_v0_2->unk_04 = &D_0D004C68;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->unk_04 = 0;
temp_v0_3->unk0 = 0xE8000000;
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->unk_04 = 0x7000000;
temp_v0_4->unk0 = 0xF5000100;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->unk_04 = 0;
temp_v0_5->unk0 = 0xE6000000;
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->unk_04 = 0x73FC000;
temp_v0_6->unk0 = 0xF0000000;
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->unk_04 = 0;
temp_v0_7->unk0 = 0xE7000000;
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->unk_04 = &D_0600D4A0;
temp_v0_8->unk0 = 0x6000000;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_802994D4.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8029794C(void *, void *, ?, void *); // extern
s32 func_802B4FF8(void *, ?); // extern
f32 func_802B80D0(void *, u16, ?, f32, f32); // extern
extern ? D_06013F20;
extern ? D_0D004C68;
extern f32 D_802B9670;
void func_8029969C(void *arg0, void *arg1, void *arg2) {
s16 sp4A;
void *sp28;
f32 temp_f0;
s16 temp_v0;
void *temp_a1;
void *temp_v0_2;
void *temp_v0_3;
void *temp_v0_4;
void *temp_v0_5;
void *temp_v0_6;
void *temp_v0_7;
void *temp_v0_8;
temp_v0 = arg2->unk2;
temp_a1 = arg2 + 0x18;
if ((temp_v0 & 0x800) == 0) {
sp28 = temp_a1;
sp4A = temp_v0;
temp_f0 = func_802B80D0(temp_a1, arg0->unk26, 0, (&D_80150130)[(arg0 - camera1) / 0xB8], D_802B9670);
if (!(temp_f0 < 0.0f)) {
if (((temp_v0 & 0x400) == 0) && (temp_f0 < 600.0f)) {
func_8029794C(sp28, arg2 + 0x10, 0x40A00000, arg1);
}
arg1->unk30 = arg2->pos;
arg1->unk34 = arg2->unk1C;
arg1->unk38 = arg2->unk20;
if (func_802B4FF8(arg1, 0) != 0) {
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->unk0 = 0xFD100000;
temp_v0_2->unk_04 = &D_0D004C68;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->unk_04 = 0;
temp_v0_3->unk0 = 0xE8000000;
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->unk_04 = 0x7000000;
temp_v0_4->unk0 = 0xF5000100;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->unk_04 = 0;
temp_v0_5->unk0 = 0xE6000000;
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->unk_04 = 0x73FC000;
temp_v0_6->unk0 = 0xF0000000;
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->unk_04 = 0;
temp_v0_7->unk0 = 0xE7000000;
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->unk_04 = &D_06013F20;
temp_v0_8->unk0 = 0x6000000;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029969C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8029794C(void *, void *, ?, void *); // extern
s32 func_802B4FF8(void *, ?); // extern
f32 func_802B80D0(void *, u16, ?, f32, f32); // extern
extern ? D_0600FC70;
extern ? D_0D004C68;
extern f32 D_802B9674;
extern f32 D_802B9678;
void func_80299864(void *arg0, void *arg1, void *arg2) {
s16 sp4A;
void *sp28;
f32 temp_f0;
s16 temp_v0;
void *temp_a1;
void *temp_v0_2;
void *temp_v0_3;
void *temp_v0_4;
void *temp_v0_5;
void *temp_v0_6;
void *temp_v0_7;
void *temp_v0_8;
temp_v0 = arg2->unk2;
temp_a1 = arg2 + 0x18;
if ((temp_v0 & 0x800) == 0) {
sp28 = temp_a1;
sp4A = temp_v0;
temp_f0 = func_802B80D0(temp_a1, arg0->unk26, 0, (&D_80150130)[(arg0 - camera1) / 0xB8], D_802B9674);
if (!(temp_f0 < 0.0f)) {
if (((temp_v0 & 0x400) == 0) && (temp_f0 < D_802B9678)) {
func_8029794C(sp28, arg2 + 0x10, 0x40333333, arg1);
}
arg1->unk30 = arg2->pos;
arg1->unk34 = arg2->unk1C;
arg1->unk38 = arg2->unk20;
if (func_802B4FF8(arg1, 0) != 0) {
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->unk0 = 0xFD100000;
temp_v0_2->unk_04 = &D_0D004C68;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->unk_04 = 0;
temp_v0_3->unk0 = 0xE8000000;
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->unk_04 = 0x7000000;
temp_v0_4->unk0 = 0xF5000100;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->unk_04 = 0;
temp_v0_5->unk0 = 0xE6000000;
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->unk_04 = 0x73FC000;
temp_v0_6->unk0 = 0xF0000000;
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->unk_04 = 0;
temp_v0_7->unk0 = 0xE7000000;
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->unk_04 = &D_0600FC70;
temp_v0_8->unk0 = 0x6000000;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80299864.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8029794C(void *, void *, ?, void *); // extern
s32 func_802B4FF8(void *, ?); // extern
f32 func_802B80D0(void *, u16, ?, f32, f32); // extern
extern ? D_0600D578;
extern ? D_0D004C68;
extern f32 D_802B967C;
extern f32 D_802B9680;
void func_80299A2C(void *arg0, void *arg1, void *arg2) {
s16 sp4A;
void *sp28;
f32 temp_f0;
s16 temp_v0;
void *temp_a1;
void *temp_v0_2;
void *temp_v0_3;
void *temp_v0_4;
void *temp_v0_5;
void *temp_v0_6;
void *temp_v0_7;
void *temp_v0_8;
temp_v0 = arg2->unk2;
temp_a1 = arg2 + 0x18;
if ((temp_v0 & 0x800) == 0) {
sp28 = temp_a1;
sp4A = temp_v0;
temp_f0 = func_802B80D0(temp_a1, arg0->unk26, 0, (&D_80150130)[(arg0 - camera1) / 0xB8], D_802B967C);
if (!(temp_f0 < 0.0f)) {
if (((temp_v0 & 0x400) == 0) && (temp_f0 < D_802B9680)) {
func_8029794C(sp28, arg2 + 0x10, 0x40333333, arg1);
}
arg1->unk30 = arg2->pos;
arg1->unk34 = arg2->unk1C;
arg1->unk38 = arg2->unk20;
if (func_802B4FF8(arg1, 0) != 0) {
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->unk0 = 0xFD100000;
temp_v0_2->unk_04 = &D_0D004C68;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->unk_04 = 0;
temp_v0_3->unk0 = 0xE8000000;
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->unk_04 = 0x7000000;
temp_v0_4->unk0 = 0xF5000100;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->unk_04 = 0;
temp_v0_5->unk0 = 0xE6000000;
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->unk_04 = 0x73FC000;
temp_v0_6->unk0 = 0xF0000000;
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->unk_04 = 0;
temp_v0_7->unk0 = 0xE7000000;
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->unk_04 = &D_0600D578;
temp_v0_8->unk0 = 0x6000000;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80299A2C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8029794C(void *, void *, ?, void *); // extern
s32 func_802B4FF8(void *, ?); // extern
f32 func_802B80D0(void *, u16, ?, f32, f32); // extern
extern ? D_060090C8;
extern ? D_0D004C68;
extern f32 D_802B9684;
extern f32 D_802B9688;
void func_80299BF4(void *arg0, void *arg1, void *arg2) {
s16 sp4A;
void *sp28;
f32 temp_f0;
s16 temp_v0;
void *temp_a1;
void *temp_v0_2;
void *temp_v0_3;
void *temp_v0_4;
void *temp_v0_5;
void *temp_v0_6;
void *temp_v0_7;
void *temp_v0_8;
temp_v0 = arg2->unk2;
temp_a1 = arg2 + 0x18;
if ((temp_v0 & 0x800) == 0) {
sp28 = temp_a1;
sp4A = temp_v0;
temp_f0 = func_802B80D0(temp_a1, arg0->unk26, 0, (&D_80150130)[(arg0 - camera1) / 0xB8], D_802B9684);
if (!(temp_f0 < 0.0f)) {
if (((temp_v0 & 0x400) == 0) && (temp_f0 < D_802B9688)) {
func_8029794C(sp28, arg2 + 0x10, 0x40333333, arg1);
}
arg1->unk30 = arg2->pos;
arg1->unk34 = arg2->unk1C;
arg1->unk38 = arg2->unk20;
if (func_802B4FF8(arg1, 0) != 0) {
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->unk0 = 0xFD100000;
temp_v0_2->unk_04 = &D_0D004C68;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->unk_04 = 0;
temp_v0_3->unk0 = 0xE8000000;
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->unk_04 = 0x7000000;
temp_v0_4->unk0 = 0xF5000100;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->unk_04 = 0;
temp_v0_5->unk0 = 0xE6000000;
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->unk_04 = 0x73FC000;
temp_v0_6->unk0 = 0xF0000000;
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->unk_04 = 0;
temp_v0_7->unk0 = 0xE7000000;
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->unk_04 = &D_060090C8;
temp_v0_8->unk0 = 0x6000000;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80299BF4.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8029794C(void *, void *, ?, void *); // extern
s32 func_802B4FF8(void *, ?); // extern
f32 func_802B80D0(void *, u16, ?, f32, f32); // extern
extern ? D_060075A0;
extern f32 D_802B968C;
extern f32 D_802B9690;
void func_80299DBC(void *arg0, void *arg1, void *arg2) {
s16 sp32;
void *sp28;
f32 temp_f0;
s16 temp_v0;
void *temp_a1;
void *temp_v1;
temp_v0 = arg2->unk2;
temp_a1 = arg2 + 0x18;
if ((temp_v0 & 0x800) == 0) {
sp28 = temp_a1;
sp32 = temp_v0;
temp_f0 = func_802B80D0(temp_a1, arg0->unk26, 0, (&D_80150130)[(arg0 - camera1) / 0xB8], D_802B968C);
if (!(temp_f0 < 0.0f)) {
if (((temp_v0 & 0x400) == 0) && (temp_f0 < D_802B9690)) {
func_8029794C(sp28, arg2 + 0x10, 0x40333333, arg1);
}
arg1->unk30 = arg2->pos;
arg1->unk34 = arg2->unk1C;
arg1->unk38 = arg2->unk20;
if (func_802B4FF8(arg1, 0) != 0) {
temp_v1 = gDisplayListHead;
gDisplayListHead = temp_v1 + 8;
temp_v1->unk0 = 0x6000000;
temp_v1->unk_04 = &D_060075A0;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80299DBC.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8029794C(void *, void *, ?, void *); // extern
s32 func_802B4FF8(void *, ?); // extern
f32 func_802B80D0(void *, u16, ?, f32, f32); // extern
extern ? D_06008528;
extern f32 D_802B9694;
extern f32 D_802B9698;
void func_80299EDC(void *arg0, void *arg1, void *arg2) {
s16 sp32;
void *sp28;
f32 temp_f0;
s16 temp_v0;
void *temp_a1;
void *temp_v1;
temp_v0 = arg2->unk2;
temp_a1 = arg2 + 0x18;
if ((temp_v0 & 0x800) == 0) {
sp28 = temp_a1;
sp32 = temp_v0;
temp_f0 = func_802B80D0(temp_a1, arg0->unk26, 0, (&D_80150130)[(arg0 - camera1) / 0xB8], D_802B9694);
if (!(temp_f0 < 0.0f)) {
if (((temp_v0 & 0x400) == 0) && (temp_f0 < D_802B9698)) {
func_8029794C(sp28, arg2 + 0x10, 0x3F800000, arg1);
}
arg1->unk30 = arg2->pos;
arg1->unk34 = arg2->unk1C;
arg1->unk38 = arg2->unk20;
if (func_802B4FF8(arg1, 0) != 0) {
temp_v1 = gDisplayListHead;
gDisplayListHead = temp_v1 + 8;
temp_v1->unk0 = 0x6000000;
temp_v1->unk_04 = &D_06008528;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80299EDC.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8029794C(void *, void *, ?, void *); // extern
s32 func_802B4FF8(void *, ?); // extern
f32 func_802B80D0(void *, u16, ?, f32, f32); // extern
extern ? D_06008628;
extern f32 D_802B969C;
extern f32 D_802B96A0;
void func_80299FFC(void *arg0, void *arg1, void *arg2) {
s16 sp32;
void *sp28;
f32 temp_f0;
s16 temp_v0;
void *temp_a1;
void *temp_v1;
temp_v0 = arg2->unk2;
temp_a1 = arg2 + 0x18;
if ((temp_v0 & 0x800) == 0) {
sp28 = temp_a1;
sp32 = temp_v0;
temp_f0 = func_802B80D0(temp_a1, arg0->unk26, 0, (&D_80150130)[(arg0 - camera1) / 0xB8], D_802B969C);
if (!(temp_f0 < 0.0f)) {
if (((temp_v0 & 0x400) == 0) && (temp_f0 < D_802B96A0)) {
func_8029794C(sp28, arg2 + 0x10, 0x3F800000, arg1);
}
arg1->unk30 = arg2->pos;
arg1->unk34 = arg2->unk1C;
arg1->unk38 = arg2->unk20;
if (func_802B4FF8(arg1, 0) != 0) {
temp_v1 = gDisplayListHead;
gDisplayListHead = temp_v1 + 8;
temp_v1->unk0 = 0x6000000;
temp_v1->unk_04 = &D_06008628;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80299FFC.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8029794C(void *, void *, ?, void *); // extern
s32 func_802B4FF8(void *, ?); // extern
f32 func_802B80D0(void *, u16, ?, f32, f32); // extern
extern ? D_06008728;
extern f32 D_802B96A4;
extern f32 D_802B96A8;
void func_8029A11C(void *arg0, void *arg1, void *arg2) {
s16 sp32;
void *sp28;
f32 temp_f0;
s16 temp_v0;
void *temp_a1;
void *temp_v1;
temp_v0 = arg2->unk2;
temp_a1 = arg2 + 0x18;
if ((temp_v0 & 0x800) == 0) {
sp28 = temp_a1;
sp32 = temp_v0;
temp_f0 = func_802B80D0(temp_a1, arg0->unk26, 0, (&D_80150130)[(arg0 - camera1) / 0xB8], D_802B96A4);
if (!(temp_f0 < 0.0f)) {
if (((temp_v0 & 0x400) == 0) && (temp_f0 < D_802B96A8)) {
func_8029794C(sp28, arg2 + 0x10, 0x3F4CCCCD, arg1);
}
arg1->unk30 = arg2->pos;
arg1->unk34 = arg2->unk1C;
arg1->unk38 = arg2->unk20;
if (func_802B4FF8(arg1, 0) != 0) {
temp_v1 = gDisplayListHead;
gDisplayListHead = temp_v1 + 8;
temp_v1->unk0 = 0x6000000;
temp_v1->unk_04 = &D_06008728;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029A11C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
s32 func_802B4FF8(void *, ?); // extern
extern ? D_06013BB8;
void func_8029A23C(s32 arg0, void *arg1, void *arg2) {
void *temp_v0;
void *temp_v0_2;
void *temp_v0_3;
void *temp_v0_4;
void *temp_v0_5;
void *temp_v0_6;
void *temp_v0_7;
void *temp_v0_8;
if (arg2->unk6 != 0) {
arg1->unk30 = arg2->pos;
arg1->unk34 = arg2->unk1C;
arg1->unk38 = arg2->unk20;
if (func_802B4FF8(arg1, 0) != 0) {
temp_v0 = gDisplayListHead;
gDisplayListHead = temp_v0 + 8;
temp_v0->unk0 = 0xFD500000;
temp_v0->unk_04 = ((arg2->rot << 0xA) + 0x3009000) & 0x1FFFFFFF;
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->unk0 = 0xF5500000;
temp_v0_2->unk_04 = 0x7080200;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->unk_04 = 0;
temp_v0_3->unk0 = 0xE6000000;
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->unk_04 = 0x71FF200;
temp_v0_4->unk0 = 0xF3000000;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->unk_04 = 0;
temp_v0_5->unk0 = 0xE7000000;
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->unk0 = 0xF5480800;
temp_v0_6->unk_04 = 0x80200;
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->unk0 = 0xF2000000;
temp_v0_7->unk_04 = 0x7C07C;
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->unk0 = 0x6000000;
temp_v0_8->unk_04 = &D_06013BB8;
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029A23C.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_80297230(Camera *, struct ShellActor *); /* extern */
? func_802972B8(Camera *, struct ShellActor *); /* extern */
? func_802979F8(struct ShellActor *, ?, f32 (*)[4]); /* extern */
s32 func_802B4FF8(f32 (*)[4], ?, f32 (*)[4]); /* extern */
f32 func_802B80D0(f32 *, u16, ?, f32, f32); /* extern */
extern ? D_0D005338;
extern ? D_0D005368;
extern ? D_80150130;
extern s32 D_802BA050;
extern s32 D_802BA054;
static ? D_802B87E8; /* unable to generate initializer */
static f32 D_802B96AC = 490000.0f;
static f32 D_802B96B0 = 40000.0f;
void func_8029A3AC(Camera *camera, Mat4 arg1, struct ShellActor *shell) {
u16 sp7C;
? sp58;
s32 sp54;
f32 sp50;
Gfx *temp_v0;
Gfx *temp_v0_2;
Gfx *temp_v0_3;
Gfx *temp_v0_4;
Gfx *temp_v0_5;
Gfx *temp_v0_6;
Gfx *temp_v0_7;
Gfx *temp_v0_8;
Gfx *temp_v0_9;
f32 temp_f0;
s32 temp_t3;
u16 temp_t8;
s32 phi_t3;
sp58.unk0 = (s32) D_802B87E8.unk0;
sp58.unk4 = (s32) D_802B87E8.unk4;
sp58.unk8 = (s32) D_802B87E8.unk8;
sp58.unkC = (s32) D_802B87E8.unkC;
sp58.unk10 = (s32) D_802B87E8.unk10;
sp58.unk14 = (s32) D_802B87E8.unk14;
sp58.unk18 = (s32) D_802B87E8.unk18;
sp58.unk1C = (u16) D_802B87E8.unk1C;
temp_f0 = func_802B80D0(shell->pos, (u16) camera->rotX2, 0, *(&D_80150130 + (((s32) (camera - camera1) / 184) * 4)), D_802B96AC);
if (temp_f0 < 0.0f) {
func_80297230(camera, shell);
return;
}
sp50 = temp_f0;
func_802972B8(camera, shell);
if (temp_f0 < D_802B96B0) {
func_802979F8(shell, 0x4059999A, arg1);
}
if (shell->type == ACTOR_BLUE_SPINY_SHELL) {
phi_t3 = D_802BA054;
} else {
phi_t3 = D_802BA050;
}
temp_t8 = ((s32) (u16) shell->rotVelocity / 4369) & 0xFFFF;
arg1->unk30 = (f32) shell->pos[0];
temp_t3 = phi_t3 + (sp + (temp_t8 * 2))->unk58;
arg1->unk34 = (f32) ((shell->pos[1] - shell->boundingBoxSize) + 1.0f);
arg1->unk38 = (f32) shell->pos[2];
sp7C = temp_t8;
sp54 = temp_t3;
if (func_802B4FF8(arg1, 0, arg1) != 0) {
temp_v0 = gDisplayListHead;
gDisplayListHead = temp_v0 + 8;
temp_v0->words.w0 = 0xFD500000;
temp_v0->words.w1 = temp_t3 & 0x1FFFFFFF;
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->words.w0 = 0xF5500000;
temp_v0_2->words.w1 = 0x07080200;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->words.w1 = 0;
temp_v0_3->words.w0 = 0xE6000000;
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->words.w1 = 0x071FF200;
temp_v0_4->words.w0 = 0xF3000000;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->words.w1 = 0;
temp_v0_5->words.w0 = 0xE7000000;
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->words.w0 = 0xF5480800;
temp_v0_6->words.w1 = 0x00080200;
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->words.w0 = 0xF2000000;
temp_v0_7->words.w1 = 0x0007C07C;
if ((s32) sp7C < 8) {
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->words.w0 = 0x06000000;
temp_v0_8->words.w1 = (u32) &D_0D005338;
return;
}
temp_v0_9 = gDisplayListHead;
gDisplayListHead = temp_v0_9 + 8;
temp_v0_9->words.w0 = 0x06000000;
temp_v0_9->words.w1 = (u32) &D_0D005368;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029A3AC.s")
#endif
void func_8029A3AC(Camera*, Mat4, struct Actor*); // extern
void func_8029A690(Camera *arg0, Mat4 arg1, struct Actor *arg2) {
gDPLoadTLUT_pal256(gDisplayListHead++, &D_0D004E38);
func_8029A3AC(arg0, arg1, arg2);
}
void func_8029A75C(Camera *arg0, Mat4 arg1, struct Actor *arg2) {
gDPLoadTLUT_pal256(gDisplayListHead++, &D_802BA060);
func_8029A3AC(arg0, arg1, arg2);
}
extern s8 D_0D004E68[];
// Middle of a tlut access
void func_8029A828(Camera *arg0, Mat4 arg1, struct Actor *arg2) {
gDPLoadTLUT_pal256(gDisplayListHead++, &D_0D004E68[0x1D0]);
func_8029A3AC(arg0, arg1, arg2);
}
extern s8 D_0D004B48[];
extern s8 D_0D004BD8[];
extern f32 D_802B96B4;
extern s16 D_8015F6EE;
extern s16 D_8015F6EC;
void func_8029A8F4(Camera *arg0, Mat4 arg1, struct BananaActor *arg2) {
s32 pad[3];
Vec3s sp7C;
Mat4 sp3C;
f32 temp = func_802B80D0(arg0->pos, arg2->pos, arg0->rotX[1], 0, D_80150130[arg0 - camera1], D_802B96B4);
if (temp < 0.0f) {
func_80297230(arg0, arg2);
return;
}
if ((arg2->pos[1] > D_8015F6EC + 800.0f)) {
func_80297230(arg0, arg2);
return;
}
if (arg2->pos[1] < (D_8015F6EE - 800.0f)) {
func_80297230(arg0, arg2);
return;
}
func_802972B8(arg0, arg2);
if (arg2->state == 5) {
func_802B5F74(sp3C, arg2->pos, arg2->rot);
} else {
sp7C[0] = 0;
sp7C[1] = 0;
sp7C[2] = 0;
func_802B5F74(sp3C, arg2->pos, sp7C);
}
if (func_802B4FF8(sp3C, 0) == 0) { return; }
if (arg2->state != 5) {
gSPDisplayList(gDisplayListHead++, &D_0D004B48);
} else {
gSPDisplayList(gDisplayListHead++, &D_0D004BD8);
}
}
void update_obj_wario_stadium_sign(struct Actor *arg0) {
arg0->rot[1] += 0xB6;
}
/**
* If train close activate bell sound according to timing
**/
void update_obj_railroad_crossing(struct RailroadCrossing *arg0) {
// If train close?
if (D_801637B8[arg0->crossingId] != 0) {
// Timer++
arg0->someTimer++;
// Reset timer
if (arg0->someTimer > 40) {
arg0->someTimer = 1;
}
// Play Bell sound when timer hits 20 or 1.
if ((arg0->someTimer == 1) || (arg0->someTimer == 20)) {
func_800C98B8(arg0->pos, arg0->velocity, 0x19017016);
}
}
}
void update_obj_mario_raceway_sign(struct Actor *arg0) {
if ((arg0->flags & 0x800) == 0) {
if ((arg0->flags & 0x400) != 0) {
arg0->pos[1] += 4.0f;
if (arg0->pos[1] > 800.0f) {
arg0->flags |= 0x800;
arg0->rot[1] += 1820;
}
} else {
arg0->rot[1] += 182;
}
}
}
// UNUSED
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029ABD4.s")
#ifdef NON_MATCHING // needs jmpt table rodata aligned to match.
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
//s32 func_802B4FF8(void *, ?); /* extern */
//f32 func_802B80D0(void *, u16, ?, f32, f32); /* extern */
extern s8 D_0D001750[];
extern s8 D_0D001780[];
extern s8 D_0D001798[];
extern s8 D_0D0017B0[];
extern s8 D_0D0017C8[];
extern s8 D_0D0017E0[];
extern s8 D_0D0017F8[];
extern s8 D_0D001810[];
extern s8 D_0D001828[];
extern f32 D_802B96B8;
void func_8029AC18(Camera *camera, Mat4 arg1, struct Actor *arg2) {
f32 temp;
temp = func_802B80D0(camera->pos, arg2->pos, camera->rotX[1], 0, D_80150130[camera - camera1], D_802B96B8);
if (temp < 0.0f) { return; }
arg1[3][0] = arg2->pos[0]; // unk30
arg1[3][1] = arg2->pos[1] - arg2->boundingBoxSize; // unk34
arg1[3][2] = arg2->pos[2]; // unk38
if (func_802B4FF8(arg1, 0) != 0) {
gSPDisplayList(gDisplayListHead++, &D_0D001750);
switch (arg2->state) {
case 0:
gSPDisplayList(gDisplayListHead++, &D_0D001780);
break;
case 1:
gSPDisplayList(gDisplayListHead++, &D_0D001798);
break;
case 2:
gSPDisplayList(gDisplayListHead++, &D_0D0017B0);
break;
case 3:
gSPDisplayList(gDisplayListHead++, &D_0D0017C8);
break;
case 4:
gSPDisplayList(gDisplayListHead++, &D_0D0017E0);
break;
case 5:
gSPDisplayList(gDisplayListHead++, &D_0D0017F8);
break;
case 6:
gSPDisplayList(gDisplayListHead++, &D_0D001810);
break;
case 7:
gSPDisplayList(gDisplayListHead++, &D_0D001828);
break;
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029AC18.s")
#endif
void mtxf_translate(Mat4, Vec3f); // extern
void func_802B59DC(Mat4, s32); // extern
void func_802B71CC(Mat4, Mat4, Mat4); // extern
void load_giant_egg(Vec3f, f32, f32, f32); // extern
extern s8 D_0600E058[];
extern s8 D_0600E730[];
extern s8 D_0600FC28[];
extern s8 D_800DC628[];
extern s8 D_800DC630[];
extern f32 D_802B96DC;
void func_8029AE1C(Camera *arg0, struct PaddleWheelBoat *boat, Mat4 arg2, u16 arg3) {
s32 pad[3];
Vec3f sp120;
Mat4 spE0;
Mat4 spA0;
Mat4 sp60;
f32 temp;
if ((arg3 > 20) && (arg3 < 25)) { return; }
temp = func_802B80D0(arg0->pos, boat->pos, arg0->rotX[1], 90000.0f, D_80150130[arg0 - camera1], D_802B96DC);
if (temp < 0.0f) { return; }
gSPSetLights1(gDisplayListHead++, D_800DC610[1]);
gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_LIGHTING | G_SHADING_SMOOTH);
func_802B5F74(spE0, boat->pos, boat->boatRot);
if (func_802B4FF8(spE0, 1) != 0) {
gSPDisplayList(gDisplayListHead++, &D_0600E730);
gSPDisplayList(gDisplayListHead++, &D_0600E058);
func_802B59DC(spE0, boat->wheelRot);
load_giant_egg(sp120, 0, 16.0f, -255.0f);
mtxf_translate(spA0, sp120);
func_802B71CC(sp60, spE0, spA0);
if (func_802B4FF8(sp60, 3) != 0) {
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
gSPDisplayList(gDisplayListHead++, &D_0600FC28);
gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
}
}
}
extern s8 D_06023858[];
extern s8 D_060238A0[];
extern s8 D_060238E8[];
extern f32 D_802B96E0;
extern f32 D_802B96E4;
extern f32 D_802B96E8;
extern f32 D_802B96EC;
extern s8 toads_turnpike_dl_0[];
extern s8 toads_turnpike_dl_1[];
extern s8 toads_turnpike_dl_2[];
void func_8029B06C(Camera *arg0, struct Actor *arg1) {
s32 pad[6];
Mat4 spD8;
s32 pad2[32];
f32 temp_f0 = func_802B80D0(arg0->pos, arg1->pos, arg0->rotX[1], 2500.0f, D_80150130[arg0 - camera1], D_802B96E0);
if (temp_f0 < 0.0f) { return; }
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
func_802B5F74(spD8, arg1->pos, arg1->rot);
if (func_802B4FF8(spD8, 0) != 0) {
switch(arg1->state) {
case 0:
gSPDisplayList(gDisplayListHead++, &D_06023858);
break;
case 1:
gSPDisplayList(gDisplayListHead++, &D_060238A0);
break;
case 2:
gSPDisplayList(gDisplayListHead++, &D_060238E8);
break;
}
if (gActiveScreenMode == 0) {
if (temp_f0 < D_802B96E4) {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_0);
} else if (temp_f0 < D_802B96E8) {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_1);
} else {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_2);
}
} else if (temp_f0 < D_802B96EC) {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_1);
} else {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_2);
}
}
}
extern f32 D_802B96F0;
extern f32 D_802B96F4;
extern f32 D_802B96F8;
extern f32 D_802B96FC;
extern s8 toads_turnpike_dl_3[];
extern s8 toads_turnpike_dl_4[];
extern s8 toads_turnpike_dl_5[];
void func_8029B2E4(Camera *arg0, struct Actor *arg1) {
s32 pad[6];
Mat4 spC8;
s32 pad2[32];
f32 temp_f0;
temp_f0 = func_802B80D0(arg0->pos, arg1->pos, arg0->rotX[1], 2500.0f, D_80150130[arg0 - camera1], D_802B96F0);
if (temp_f0 < 0.0f) { return; }
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
func_802B5F74(spC8, arg1->pos, arg1->rot);
if (func_802B4FF8(spC8, 0) != 0) {
if (gActiveScreenMode == 0) {
if (temp_f0 < D_802B96F4) {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_3);
} else if (temp_f0 < D_802B96F8) {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_4);
} else {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_5);
}
} else if (temp_f0 < D_802B96FC) {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_4);
} else {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_5);
}
}
}
extern f32 D_802B9700;
extern f32 D_802B9704;
extern f32 D_802B9708;
extern f32 D_802B970C;
s32 func_802B4FF8(Mat4, s32);
extern s8 toads_turnpike_dl_10[];
extern s8 toads_turnpike_dl_11[];
extern s8 toads_turnpike_dl_9[];
void func_8029B4E0(Camera *arg0, struct Actor *arg1) {
s32 pad[6];
Mat4 spC8;
s32 pad2[32];
f32 temp_f0 = func_802B80D0(arg0->pos,arg1->pos, arg0->rotX[1], 2500.0f, D_80150130[arg0 - camera1], D_802B9700);
if (!(temp_f0 < 0.0f)) {
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
func_802B5F74(spC8, arg1->pos, arg1->rot);
func_802B5F00(spC8, 0.1f);
if (func_802B4FF8(spC8, 0) != 0) {
if (gActiveScreenMode == 0) {
if (temp_f0 < D_802B9704) {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_9);
} else if (temp_f0 < D_802B9708) {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_10);
} else {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_11);
}
} else if (temp_f0 < D_802B970C) {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_10);
} else {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_11);
}
}
}
}
extern f32 D_802B9710;
extern f32 D_802B9714;
extern f32 D_802B9718;
extern f32 D_802B971C;
extern Gfx toads_turnpike_dl_6[];
extern Gfx toads_turnpike_dl_7[];
extern Gfx toads_turnpike_dl_8[];
void func_8029B6EC(Camera *arg0, struct Actor* arg1) {
s32 pad[6];
Mat4 spC8;
s32 pad2[32];
f32 temp_f0 = func_802B80D0(arg0->pos, arg1->pos, arg0->rotX[1], 2500.0f, D_80150130[arg0 - camera1], D_802B9710);
if (!(temp_f0 < 0.0f)) {
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
func_802B5F74(spC8, arg1->pos, arg1->rot);
if (func_802B4FF8(spC8, 0) != 0) {
if (gActiveScreenMode == 0) {
if (temp_f0 < D_802B9714) {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_6);
} else if (temp_f0 < D_802B9718) {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_7);
} else {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_8);
}
} else if (temp_f0 < D_802B971C) {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_7);
} else {
gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_8);
}
}
}
}
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
s32 func_802B4FF8(f32 (*)[4], ?); /* extern */
? func_802B59DC(f32 (*)[4], s16); /* extern */
? func_802B5F74(f32 (*)[4], f32 *, s16 *); /* extern */
f32 func_802B80D0(f32 *, u16, ?, f32, f32); /* extern */
? load_giant_egg(f32 *, ?, ?, ?); /* extern */
extern ? D_0601B978;
extern ? D_0601C0F0;
extern ? D_0601D160;
extern ? D_0601D670;
extern ? D_0601E480;
extern ? D_0601E910;
extern ? D_06022D28;
extern f32 D_06022D70;
extern f32 D_06022DB8;
extern ? D_80150130;
static f32 D_802B9720 = 9e6.0f;
static f32 D_802B9724 = 122500.0f;
static f32 D_802B9728 = 640000.0f;
static f32 D_802B972C = 1440000.0f;
void func_8029B8E8(Camera *camera, struct TrainCar *actor) {
f32 sp160;
f32 sp9C;
f32 *sp30;
Gfx *temp_v0;
Gfx *temp_v0_10;
Gfx *temp_v0_11;
Gfx *temp_v0_12;
Gfx *temp_v0_13;
Gfx *temp_v0_14;
Gfx *temp_v0_15;
Gfx *temp_v0_16;
Gfx *temp_v0_17;
Gfx *temp_v0_18;
Gfx *temp_v0_19;
Gfx *temp_v0_20;
Gfx *temp_v0_21;
Gfx *temp_v0_22;
Gfx *temp_v0_23;
Gfx *temp_v0_24;
Gfx *temp_v0_25;
Gfx *temp_v0_26;
Gfx *temp_v0_2;
Gfx *temp_v0_3;
Gfx *temp_v0_4;
Gfx *temp_v0_5;
Gfx *temp_v0_6;
Gfx *temp_v0_7;
Gfx *temp_v0_8;
Gfx *temp_v0_9;
f32 *temp_a1;
f32 temp_f0;
f32 temp_f2;
temp_a1 = actor->pos;
sp30 = temp_a1;
temp_f0 = func_802B80D0(temp_a1, (u16) camera->rotX2, 0x451C4000, *(&D_80150130 + (((s32) (camera - camera1) / 184) * 4)), D_802B9720);
temp_f2 = temp_f0;
if (!(temp_f0 < 0.0f)) {
temp_v0 = gDisplayListHead;
gDisplayListHead = temp_v0 + 8;
temp_v0->words.w1 = 0x00020000;
temp_v0->words.w0 = 0xB6000000;
sp9C = temp_f2;
func_802B5F74((f32 (*)[4]) &sp120[0], temp_a1, actor->rot);
if (func_802B4FF8((f32 (*)[4]) &sp120[0], 0) != 0) {
if (sp9C < D_802B9724) {
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->words.w1 = (u32) &D_0601C0F0;
temp_v0_2->words.w0 = 0x06000000;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->words.w1 = (u32) &D_0601B978;
temp_v0_3->words.w0 = 0x06000000;
} else if (sp9C < D_802B9728) {
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->words.w1 = (u32) &D_0601D670;
temp_v0_4->words.w0 = 0x06000000;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->words.w1 = (u32) &D_0601D160;
temp_v0_5->words.w0 = 0x06000000;
} else {
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->words.w1 = (u32) &D_0601E910;
temp_v0_6->words.w0 = 0x06000000;
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->words.w1 = (u32) &D_0601E480;
temp_v0_7->words.w0 = 0x06000000;
}
if (!(D_802B972C < sp9C)) {
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->words.w1 = 0x00002000;
temp_v0_8->words.w0 = 0xB6000000;
temp_v0_9 = gDisplayListHead;
gDisplayListHead = temp_v0_9 + 8;
temp_v0_9->words.w1 = (u32) &D_06022D28;
temp_v0_9->words.w0 = 0x06000000;
func_802B59DC((f32 (*)[4]) &sp120[0], actor->wheelRot);
load_giant_egg(&sp160, 0x41880000, 0x40C00000, 0x42000000);
mtxf_translate((f32 (*)[4]) &spE0[0], &sp160);
func_802B71CC((f32 (*)[4]) &spA0[0], (f32 (*)[4]) &sp120[0], (f32 (*)[4]) &spE0[0]);
if (func_802B4FF8((f32 (*)[4]) &spA0[0], 3) != 0) {
temp_v0_10 = gDisplayListHead;
gDisplayListHead = temp_v0_10 + 8;
temp_v0_10->words.w1 = (u32) &D_06022DB8;
temp_v0_10->words.w0 = 0x06000000;
temp_v0_11 = gDisplayListHead;
gDisplayListHead = temp_v0_11 + 8;
temp_v0_11->words.w1 = 0;
temp_v0_11->words.w0 = 0xBD000000;
sp30 = &D_06022DB8;
func_802B59DC((f32 (*)[4]) &sp120[0], actor->wheelRot);
load_giant_egg(&sp160, 0xC1880000, 0x40C00000, 0x42000000);
mtxf_translate((f32 (*)[4]) &spE0[0], &sp160);
func_802B71CC((f32 (*)[4]) &spA0[0], (f32 (*)[4]) &sp120[0], (f32 (*)[4]) &spE0[0]);
if (func_802B4FF8((f32 (*)[4]) &spA0[0], 3) != 0) {
temp_v0_12 = gDisplayListHead;
gDisplayListHead = temp_v0_12 + 8;
temp_v0_12->words.w0 = 0x06000000;
temp_v0_12->words.w1 = (u32) sp30;
temp_v0_13 = gDisplayListHead;
gDisplayListHead = temp_v0_13 + 8;
temp_v0_13->words.w1 = 0;
temp_v0_13->words.w0 = 0xBD000000;
func_802B59DC((f32 (*)[4]) &sp120[0], (s16) (actor->wheelRot + 0x16C));
load_giant_egg(&sp160, 0x41880000, 0x40C00000, 0x41800000);
mtxf_translate((f32 (*)[4]) &spE0[0], &sp160);
func_802B71CC((f32 (*)[4]) &spA0[0], (f32 (*)[4]) &sp120[0], (f32 (*)[4]) &spE0[0]);
if (func_802B4FF8((f32 (*)[4]) &spA0[0], 3) != 0) {
temp_v0_14 = gDisplayListHead;
gDisplayListHead = temp_v0_14 + 8;
temp_v0_14->words.w0 = 0x06000000;
temp_v0_14->words.w1 = (u32) sp30;
temp_v0_15 = gDisplayListHead;
gDisplayListHead = temp_v0_15 + 8;
temp_v0_15->words.w1 = 0;
temp_v0_15->words.w0 = 0xBD000000;
func_802B59DC((f32 (*)[4]) &sp120[0], (s16) (actor->wheelRot + 0x16C));
load_giant_egg(&sp160, 0xC1880000, 0x40C00000, 0x41800000);
mtxf_translate((f32 (*)[4]) &spE0[0], &sp160);
func_802B71CC((f32 (*)[4]) &spA0[0], (f32 (*)[4]) &sp120[0], (f32 (*)[4]) &spE0[0]);
if (func_802B4FF8((f32 (*)[4]) &spA0[0], 3) != 0) {
temp_v0_16 = gDisplayListHead;
gDisplayListHead = temp_v0_16 + 8;
temp_v0_16->words.w0 = 0x06000000;
temp_v0_16->words.w1 = (u32) sp30;
temp_v0_17 = gDisplayListHead;
gDisplayListHead = temp_v0_17 + 8;
temp_v0_17->words.w1 = 0;
temp_v0_17->words.w0 = 0xBD000000;
func_802B59DC((f32 (*)[4]) &sp120[0], (s16) (actor->wheelRot + 0x444));
load_giant_egg(&sp160, 0x41880000, 0x41400000, 0xC1400000);
mtxf_translate((f32 (*)[4]) &spE0[0], &sp160);
func_802B71CC((f32 (*)[4]) &spA0[0], (f32 (*)[4]) &sp120[0], (f32 (*)[4]) &spE0[0]);
if (func_802B4FF8((f32 (*)[4]) &spA0[0], 3) != 0) {
temp_v0_18 = gDisplayListHead;
gDisplayListHead = temp_v0_18 + 8;
temp_v0_18->words.w1 = (u32) &D_06022D70;
temp_v0_18->words.w0 = 0x06000000;
temp_v0_19 = gDisplayListHead;
gDisplayListHead = temp_v0_19 + 8;
temp_v0_19->words.w1 = 0;
temp_v0_19->words.w0 = 0xBD000000;
sp30 = &D_06022D70;
func_802B59DC((f32 (*)[4]) &sp120[0], (s16) (actor->wheelRot + 0x444));
load_giant_egg(&sp160, 0xC1880000, 0x41400000, 0xC1400000);
mtxf_translate((f32 (*)[4]) &spE0[0], &sp160);
func_802B71CC((f32 (*)[4]) &spA0[0], (f32 (*)[4]) &sp120[0], (f32 (*)[4]) &spE0[0]);
if (func_802B4FF8((f32 (*)[4]) &spA0[0], 3) != 0) {
temp_v0_20 = gDisplayListHead;
gDisplayListHead = temp_v0_20 + 8;
temp_v0_20->words.w0 = 0x06000000;
temp_v0_20->words.w1 = (u32) sp30;
temp_v0_21 = gDisplayListHead;
gDisplayListHead = temp_v0_21 + 8;
temp_v0_21->words.w1 = 0;
temp_v0_21->words.w0 = 0xBD000000;
func_802B59DC((f32 (*)[4]) &sp120[0], (s16) (actor->wheelRot + 0x2D8));
load_giant_egg(&sp160, 0x41880000, 0x41400000, 0xC2080000);
mtxf_translate((f32 (*)[4]) &spE0[0], &sp160);
func_802B71CC((f32 (*)[4]) &spA0[0], (f32 (*)[4]) &sp120[0], (f32 (*)[4]) &spE0[0]);
if (func_802B4FF8((f32 (*)[4]) &spA0[0], 3) != 0) {
temp_v0_22 = gDisplayListHead;
gDisplayListHead = temp_v0_22 + 8;
temp_v0_22->words.w0 = 0x06000000;
temp_v0_22->words.w1 = (u32) sp30;
temp_v0_23 = gDisplayListHead;
gDisplayListHead = temp_v0_23 + 8;
temp_v0_23->words.w1 = 0;
temp_v0_23->words.w0 = 0xBD000000;
func_802B59DC((f32 (*)[4]) &sp120[0], (s16) (actor->wheelRot + 0x2D8));
load_giant_egg(&sp160, 0xC1880000, 0x41400000, 0xC2080000);
mtxf_translate((f32 (*)[4]) &spE0[0], &sp160);
func_802B71CC((f32 (*)[4]) &spA0[0], (f32 (*)[4]) &sp120[0], (f32 (*)[4]) &spE0[0]);
if (func_802B4FF8((f32 (*)[4]) &spA0[0], 3) != 0) {
temp_v0_24 = gDisplayListHead;
gDisplayListHead = temp_v0_24 + 8;
temp_v0_24->words.w0 = 0x06000000;
temp_v0_24->words.w1 = (u32) sp30;
temp_v0_25 = gDisplayListHead;
gDisplayListHead = temp_v0_25 + 8;
temp_v0_25->words.w1 = 0;
temp_v0_25->words.w0 = 0xBD000000;
temp_v0_26 = gDisplayListHead;
gDisplayListHead = temp_v0_26 + 8;
temp_v0_26->words.w1 = 0x00002000;
temp_v0_26->words.w0 = 0xB7000000;
}
}
}
}
}
}
}
}
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029B8E8.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
s32 func_802B4FF8(? *, ?); // extern
? mtxf_translate(? *, ? *); // extern
? func_802B59DC(? *, s16); // extern
? func_802B5F74(? *, ? *, s32); // extern
? func_802B71CC(? *, ? *, ? *); // extern
f32 func_802B80D0(? *, u16, ?, f32, f32); // extern
? load_giant_egg(? *, ?, ?, ?); // extern
extern ? D_0601F228;
extern ? D_0601F708;
extern ? D_0601FAF8;
extern ? D_06022D28;
extern ? D_06022DB8;
extern f32 D_802B9730;
extern f32 D_802B9734;
extern f32 D_802B9738;
extern f32 D_802B973C;
void func_8029BFB0(void *arg0, void *arg1) {
? sp100;
? spF4;
? spB4;
? sp74;
f32 sp70;
? *sp30;
? *temp_a1;
f32 temp_f0;
f32 temp_f2;
void *temp_v0;
void *temp_v0_10;
void *temp_v0_11;
void *temp_v0_12;
void *temp_v0_13;
void *temp_v0_14;
void *temp_v0_15;
void *temp_v0_2;
void *temp_v0_3;
void *temp_v0_4;
void *temp_v0_5;
void *temp_v0_6;
void *temp_v0_7;
void *temp_v0_8;
void *temp_v0_9;
temp_a1 = arg1 + 0x18;
sp30 = temp_a1;
temp_f0 = func_802B80D0(temp_a1, arg0->unk26, 0x441C4000, (&D_80150130)[(arg0 - camera1) / 0xB8], D_802B9730);
temp_f2 = temp_f0;
if (!(temp_f0 < 0.0f)) {
temp_v0 = gDisplayListHead;
gDisplayListHead = temp_v0 + 8;
temp_v0->unk_04 = 0x20000;
temp_v0->unk0 = 0xB6000000;
sp70 = temp_f2;
func_802B5F74(&sp100, temp_a1, arg1 + 0x10);
if (func_802B4FF8(&sp100, 0) != 0) {
if (temp_f2 < D_802B9734) {
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->unk_04 = &D_0601F228;
temp_v0_2->unk0 = 0x6000000;
} else if (temp_f2 < D_802B9738) {
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->unk_04 = &D_0601F708;
temp_v0_3->unk0 = 0x6000000;
} else {
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->unk_04 = &D_0601FAF8;
temp_v0_4->unk0 = 0x6000000;
}
if (!(D_802B973C < temp_f2)) {
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->unk_04 = 0x2000;
temp_v0_5->unk0 = 0xB6000000;
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->unk_04 = &D_06022D28;
temp_v0_6->unk0 = 0x6000000;
func_802B59DC(&sp100, arg1->unk6);
load_giant_egg(&spF4, 0x41880000, 0x40C00000, 0x41000000);
mtxf_translate(&spB4, &spF4);
func_802B71CC(&sp74, &sp100, &spB4);
if (func_802B4FF8(&sp74, 3) != 0) {
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->unk_04 = &D_06022DB8;
temp_v0_7->unk0 = 0x6000000;
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->unk_04 = 0;
temp_v0_8->unk0 = 0xBD000000;
sp30 = &D_06022DB8;
func_802B59DC(&sp100, arg1->unk6);
load_giant_egg(&spF4, 0xC1880000, 0x40C00000, 0x41000000);
mtxf_translate(&spB4, &spF4);
func_802B71CC(&sp74, &sp100, &spB4);
if (func_802B4FF8(&sp74, 3) != 0) {
temp_v0_9 = gDisplayListHead;
gDisplayListHead = temp_v0_9 + 8;
temp_v0_9->unk0 = 0x6000000;
temp_v0_9->unk_04 = sp30;
temp_v0_10 = gDisplayListHead;
gDisplayListHead = temp_v0_10 + 8;
temp_v0_10->unk_04 = 0;
temp_v0_10->unk0 = 0xBD000000;
func_802B59DC(&sp100, arg1->unk6 + 0x444);
load_giant_egg(&spF4, 0x41880000, 0x40C00000, 0xC1000000);
mtxf_translate(&spB4, &spF4);
func_802B71CC(&sp74, &sp100, &spB4);
if (func_802B4FF8(&sp74, 3) != 0) {
temp_v0_11 = gDisplayListHead;
gDisplayListHead = temp_v0_11 + 8;
temp_v0_11->unk0 = 0x6000000;
temp_v0_11->unk_04 = sp30;
temp_v0_12 = gDisplayListHead;
gDisplayListHead = temp_v0_12 + 8;
temp_v0_12->unk_04 = 0;
temp_v0_12->unk0 = 0xBD000000;
func_802B59DC(&sp100, arg1->unk6 + 0x444);
load_giant_egg(&spF4, 0xC1880000, 0x40C00000, 0xC1000000);
mtxf_translate(&spB4, &spF4);
func_802B71CC(&sp74, &sp100, &spB4);
if (func_802B4FF8(&sp74, 3) != 0) {
temp_v0_13 = gDisplayListHead;
gDisplayListHead = temp_v0_13 + 8;
temp_v0_13->unk0 = 0x6000000;
temp_v0_13->unk_04 = sp30;
temp_v0_14 = gDisplayListHead;
gDisplayListHead = temp_v0_14 + 8;
temp_v0_14->unk_04 = 0;
temp_v0_14->unk0 = 0xBD000000;
temp_v0_15 = gDisplayListHead;
gDisplayListHead = temp_v0_15 + 8;
temp_v0_15->unk_04 = 0x2000;
temp_v0_15->unk0 = 0xB7000000;
}
}
}
}
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029BFB0.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
s32 func_802B4FF8(? *, ?); // extern
? mtxf_translate(? *, ? *); // extern
? func_802B59DC(? *, s16); // extern
? func_802B5F74(? *, ? *, s32); // extern
? func_802B71CC(? *, ? *, ? *); // extern
f32 func_802B80D0(? *, u16, ?, f32, f32); // extern
? load_giant_egg(? *, ?, ?, ?); // extern
extern ? D_06020A08;
extern ? D_06020A20;
extern ? D_06021220;
extern ? D_06021550;
extern ? D_06021A80;
extern ? D_06021C90;
extern ? D_06022D28;
extern ? D_06022DB8;
extern f32 D_802B9740;
extern f32 D_802B9744;
extern f32 D_802B9748;
extern f32 D_802B974C;
void func_8029C3CC(void *arg0, void *arg1) {
? sp128;
? sp11C;
? spDC;
? sp9C;
f32 sp98;
? *sp2C;
? *temp_a1;
f32 temp_f0;
f32 temp_f2;
void *temp_v0;
void *temp_v0_10;
void *temp_v0_11;
void *temp_v0_12;
void *temp_v0_13;
void *temp_v0_14;
void *temp_v0_15;
void *temp_v0_16;
void *temp_v0_17;
void *temp_v0_18;
void *temp_v0_19;
void *temp_v0_20;
void *temp_v0_21;
void *temp_v0_22;
void *temp_v0_23;
void *temp_v0_24;
void *temp_v0_25;
void *temp_v0_26;
void *temp_v0_2;
void *temp_v0_3;
void *temp_v0_4;
void *temp_v0_5;
void *temp_v0_6;
void *temp_v0_7;
void *temp_v0_8;
void *temp_v0_9;
temp_a1 = arg1 + 0x18;
sp2C = temp_a1;
temp_f0 = func_802B80D0(temp_a1, arg0->unk26, 0x44FD2000, (&D_80150130)[(arg0 - camera1) / 0xB8], D_802B9740);
temp_f2 = temp_f0;
if (!(temp_f0 < 0.0f)) {
temp_v0 = gDisplayListHead;
gDisplayListHead = temp_v0 + 8;
temp_v0->unk_04 = 0x20000;
temp_v0->unk0 = 0xB6000000;
sp98 = temp_f2;
func_802B5F74(&sp128, temp_a1, arg1 + 0x10);
if (func_802B4FF8(&sp128, 0) != 0) {
if (temp_f2 < D_802B9744) {
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->unk_04 = &D_06020A20;
temp_v0_2->unk0 = 0x6000000;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->unk_04 = &D_06020A08;
temp_v0_3->unk0 = 0x6000000;
} else if (temp_f2 < D_802B9748) {
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->unk_04 = &D_06021550;
temp_v0_4->unk0 = 0x6000000;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->unk_04 = &D_06021220;
temp_v0_5->unk0 = 0x6000000;
} else {
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->unk_04 = &D_06021C90;
temp_v0_6->unk0 = 0x6000000;
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->unk_04 = &D_06021A80;
temp_v0_7->unk0 = 0x6000000;
}
if (!(D_802B974C < temp_f2)) {
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->unk_04 = 0x2000;
temp_v0_8->unk0 = 0xB6000000;
temp_v0_9 = gDisplayListHead;
gDisplayListHead = temp_v0_9 + 8;
temp_v0_9->unk_04 = &D_06022D28;
temp_v0_9->unk0 = 0x6000000;
func_802B59DC(&sp128, arg1->unk6);
load_giant_egg(&sp11C, 0x41880000, 0x40C00000, 0x41E00000);
mtxf_translate(&spDC, &sp11C);
func_802B71CC(&sp9C, &sp128, &spDC);
if (func_802B4FF8(&sp9C, 3) != 0) {
temp_v0_10 = gDisplayListHead;
gDisplayListHead = temp_v0_10 + 8;
temp_v0_10->unk_04 = &D_06022DB8;
temp_v0_10->unk0 = 0x6000000;
temp_v0_11 = gDisplayListHead;
gDisplayListHead = temp_v0_11 + 8;
temp_v0_11->unk_04 = 0;
temp_v0_11->unk0 = 0xBD000000;
sp2C = &D_06022DB8;
func_802B59DC(&sp128, arg1->unk6);
load_giant_egg(&sp11C, 0xC1880000, 0x40C00000, 0x41E00000);
mtxf_translate(&spDC, &sp11C);
func_802B71CC(&sp9C, &sp128, &spDC);
if (func_802B4FF8(&sp9C, 3) != 0) {
temp_v0_12 = gDisplayListHead;
gDisplayListHead = temp_v0_12 + 8;
temp_v0_12->unk0 = 0x6000000;
temp_v0_12->unk_04 = sp2C;
temp_v0_13 = gDisplayListHead;
gDisplayListHead = temp_v0_13 + 8;
temp_v0_13->unk_04 = 0;
temp_v0_13->unk0 = 0xBD000000;
func_802B59DC(&sp128, arg1->unk6 + 0x222);
load_giant_egg(&sp11C, 0x41880000, 0x40C00000, 0x41400000);
mtxf_translate(&spDC, &sp11C);
func_802B71CC(&sp9C, &sp128, &spDC);
if (func_802B4FF8(&sp9C, 3) != 0) {
temp_v0_14 = gDisplayListHead;
gDisplayListHead = temp_v0_14 + 8;
temp_v0_14->unk0 = 0x6000000;
temp_v0_14->unk_04 = sp2C;
temp_v0_15 = gDisplayListHead;
gDisplayListHead = temp_v0_15 + 8;
temp_v0_15->unk_04 = 0;
temp_v0_15->unk0 = 0xBD000000;
func_802B59DC(&sp128, arg1->unk6 + 0x222);
load_giant_egg(&sp11C, 0xC1880000, 0x40C00000, 0x41400000);
mtxf_translate(&spDC, &sp11C);
func_802B71CC(&sp9C, &sp128, &spDC);
if (func_802B4FF8(&sp9C, 3) != 0) {
temp_v0_16 = gDisplayListHead;
gDisplayListHead = temp_v0_16 + 8;
temp_v0_16->unk0 = 0x6000000;
temp_v0_16->unk_04 = sp2C;
temp_v0_17 = gDisplayListHead;
gDisplayListHead = temp_v0_17 + 8;
temp_v0_17->unk_04 = 0;
temp_v0_17->unk0 = 0xBD000000;
func_802B59DC(&sp128, arg1->unk6 + 0x5B0);
load_giant_egg(&sp11C, 0x41880000, 0x40C00000, 0xC1000000);
mtxf_translate(&spDC, &sp11C);
func_802B71CC(&sp9C, &sp128, &spDC);
if (func_802B4FF8(&sp9C, 3) != 0) {
temp_v0_18 = gDisplayListHead;
gDisplayListHead = temp_v0_18 + 8;
temp_v0_18->unk0 = 0x6000000;
temp_v0_18->unk_04 = sp2C;
temp_v0_19 = gDisplayListHead;
gDisplayListHead = temp_v0_19 + 8;
temp_v0_19->unk_04 = 0;
temp_v0_19->unk0 = 0xBD000000;
func_802B59DC(&sp128, arg1->unk6 + 0x5B0);
load_giant_egg(&sp11C, 0xC1880000, 0x40C00000, 0xC1000000);
mtxf_translate(&spDC, &sp11C);
func_802B71CC(&sp9C, &sp128, &spDC);
if (func_802B4FF8(&sp9C, 3) != 0) {
temp_v0_20 = gDisplayListHead;
gDisplayListHead = temp_v0_20 + 8;
temp_v0_20->unk0 = 0x6000000;
temp_v0_20->unk_04 = sp2C;
temp_v0_21 = gDisplayListHead;
gDisplayListHead = temp_v0_21 + 8;
temp_v0_21->unk_04 = 0;
temp_v0_21->unk0 = 0xBD000000;
func_802B59DC(&sp128, arg1->unk6 + 0x16C);
load_giant_egg(&sp11C, 0x41880000, 0x40C00000, 0xC1C00000);
mtxf_translate(&spDC, &sp11C);
func_802B71CC(&sp9C, &sp128, &spDC);
if (func_802B4FF8(&sp9C, 3) != 0) {
temp_v0_22 = gDisplayListHead;
gDisplayListHead = temp_v0_22 + 8;
temp_v0_22->unk0 = 0x6000000;
temp_v0_22->unk_04 = sp2C;
temp_v0_23 = gDisplayListHead;
gDisplayListHead = temp_v0_23 + 8;
temp_v0_23->unk_04 = 0;
temp_v0_23->unk0 = 0xBD000000;
func_802B59DC(&sp128, arg1->unk6 + 0x16C);
load_giant_egg(&sp11C, 0xC1880000, 0x40C00000, 0xC1C00000);
mtxf_translate(&spDC, &sp11C);
func_802B71CC(&sp9C, &sp128, &spDC);
if (func_802B4FF8(&sp9C, 3) != 0) {
temp_v0_24 = gDisplayListHead;
gDisplayListHead = temp_v0_24 + 8;
temp_v0_24->unk0 = 0x6000000;
temp_v0_24->unk_04 = sp2C;
temp_v0_25 = gDisplayListHead;
gDisplayListHead = temp_v0_25 + 8;
temp_v0_25->unk_04 = 0;
temp_v0_25->unk0 = 0xBD000000;
temp_v0_26 = gDisplayListHead;
gDisplayListHead = temp_v0_26 + 8;
temp_v0_26->unk_04 = 0x2000;
temp_v0_26->unk0 = 0xB7000000;
}
}
}
}
}
}
}
}
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029C3CC.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
f32 func_802ABE30(f32, f32, f32, u16); /* extern */
s32 func_802B4FF8(? *, ?); /* extern */
? func_802B5F74(? *, f32 *, s16 *); /* extern */
f32 func_802B80D0(f32 *, u16, ?, f32, f32); /* extern */
extern ? D_06006F88;
extern ? D_06006FE0;
extern ? D_80150130;
static f32 D_802B9750 = 4000000.0f;
static f32 D_802B9754 = 250000.0f;
void func_8029CA90(Camera *camera, struct FallingRock *rock) {
s16 sp9C;
s16 sp9A;
s16 sp98;
f32 sp94;
f32 sp90;
f32 sp8C;
? sp4C;
f32 *sp2C;
Gfx *temp_v1;
Gfx *temp_v1_2;
f32 *temp_a1;
f32 temp_f0;
f32 temp_f0_2;
temp_a1 = rock->pos;
if (rock->respawnTimer == 0) {
sp2C = temp_a1;
temp_f0 = func_802B80D0(temp_a1, (u16) camera->rotX2, 0x43C80000, *(&D_80150130 + (((s32) (camera - camera1) / 184) * 4)), D_802B9750);
if (!(temp_f0 < 0.0f)) {
if ((temp_f0 < D_802B9754) && (rock->unk30.unk34 == 1)) {
sp8C = rock->pos[0];
sp94 = rock->pos[2];
temp_f0_2 = func_802ABE30(sp8C, rock->pos[1], sp94, rock->unk30.unk3A);
sp98 = 0;
sp9A = 0;
sp9C = 0;
sp90 = temp_f0_2 + 2.0f;
func_802B5F74(&sp4C, &sp8C, &sp98);
if (func_802B4FF8(&sp4C, 0) != 0) {
temp_v1 = gDisplayListHead;
gDisplayListHead = temp_v1 + 8;
temp_v1->words.w0 = 0x06000000;
temp_v1->words.w1 = (u32) &D_06006F88;
goto block_6;
}
} else {
block_6:
func_802B5F74(&sp4C, sp2C, rock->rot);
if (func_802B4FF8(&sp4C, 0) != 0) {
temp_v1_2 = gDisplayListHead;
gDisplayListHead = temp_v1_2 + 8;
temp_v1_2->words.w1 = (u32) &D_06006FE0;
temp_v1_2->words.w0 = 0x06000000;
}
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029CA90.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
//s32 func_8029EC88(f32 *, ? *, ? *, ?); // extern
//extern ? gSegmentTable;
void place_piranha_plants(u32 arg0) {
Vec3f sp60;
//f32 sp68;
//f32 sp64;
Vec3f sp54;
Vec3s sp4C;
Vec3f temp_a0;
s16 *temp_s0;
s16 *temp_s0_2;
s16 temp_s1;
s16 temp_s1_2;
struct piranha_plant *temp_v1;
s16 phi_s1;
Vec3s *phi_s0;
temp_s0 = VIRTUAL_TO_PHYSICAL2(gSegmentTable[arg0 >> 18] + SEGMENT_OFFSET(arg0));
load_giant_egg(sp54, 0, 0, 0);
func_802B52BC(sp4C, 0, 0, 0);
//temp_s1 = *temp_s0;
//phi_s1 = temp_s1;
//if (temp_s1 != -0x8000) {
//phi_s0 = temp_s0;
while (temp_s1_2 != -0x8000) {
// temp_a0 = &sp60;
sp60[0] = phi_s1 * gCourseDirection;
sp60[1] = phi_s0->unk2;
sp60[2] = phi_s0->unk4;
temp_s0_2 = phi_s0 + 8;
temp_v1 = (struct piranha_plant *) &D_8015F9B8[func_8029EC88(temp_a0, sp4C, sp54, 0xA)];
temp_v1->unk4 = 0;
temp_v1->unk6 = 0;
temp_v1->unk_08 = 0;
temp_v1->unkA = 0;
temp_v1->velocity = 0;
temp_v1->unk26 = 0;
temp_v1->unk28 = 0;
temp_v1->unk2A = 0;
//temp_s1_2 = *temp_s0_2;
//phi_s1 = temp_s1_2;
//phi_s0 = temp_s0_2;
phi_s0++;
}
//}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/place_piranha_plants.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_802976EC(void *, void *); // extern
s32 func_8029EC88(f32 *, ? *, ? *, ?); // extern
? func_802ADDC8(void *, ?, s32, s32, f32); // extern
? func_802B52BC(? *, ?, ?, ?); // extern
? load_giant_egg(? *, ?, ?, ?); // extern
extern ? D_8015F9B8;
extern f32 gCourseDirection;
extern ? gSegmentTable;
void place_palm_trees(u32 arg0) {
f32 sp74;
f32 sp70;
f32 sp6C;
? sp60;
? sp58;
f32 *temp_a0;
f32 temp_f8;
s16 *temp_s0;
s16 temp_v0;
s16 temp_v0_2;
s32 temp_a2;
s32 temp_a3;
void *temp_s1;
s16 phi_v0;
s16 *phi_s0;
temp_s0 = *(&gSegmentTable + ((arg0 >> 0x18) * 4)) + (arg0 & 0xFFFFFF) + 0x80000000;
load_giant_egg(&sp60, 0, 0, 0);
func_802B52BC(&sp58, 0, 0, 0);
temp_v0 = *temp_s0;
phi_v0 = temp_v0;
if (temp_v0 != -0x8000) {
phi_s0 = temp_s0;
do {
temp_a0 = &sp6C;
sp6C = phi_v0 * gCourseDirection;
sp70 = phi_s0->unk2;
sp74 = phi_s0->unk_04;
temp_s1 = &D_8015F9B8 + (func_8029EC88(temp_a0, &sp58, &sp60, 0x19) * 0x70);
temp_f8 = temp_s1->unk20;
temp_a2 = temp_s1->pos;
temp_a3 = temp_s1->unk1C;
temp_s1->unk_04 = phi_s0->unk6;
func_802ADDC8(temp_s1 + 0x30, 0x40A00000, temp_a2, temp_a3, temp_f8);
func_802976EC(temp_s1 + 0x30, temp_s1 + 0x10);
temp_v0_2 = phi_s0->unk_08;
phi_v0 = temp_v0_2;
phi_s0 += 8;
} while (temp_v0_2 != -0x8000);
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/place_palm_trees.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_802B52BC(void *, ?, ?, ?); // extern
? load_giant_egg(s32, ?, ?, ?); // extern
extern ? D_802B8848;
extern f32 gCourseDirection;
extern ? gSegmentTable;
void func_8029CF0C(u32 arg0, void *arg1) {
? sp24;
s16 temp_v1;
void *temp_v0;
sp24.unk0 = D_802B8848.unk0;
sp24.unk4 = D_802B8848.unk4;
temp_v1 = arg1->unk6;
temp_v0 = *(&gSegmentTable + ((arg0 >> 0x18) * 4)) + (arg0 & 0xFFFFFF) + 0x80000000 + (temp_v1 * 8);
arg1->unk_04 = *(&sp24 + (temp_v1 * 2));
arg1->pos = temp_v0->unk0 * gCourseDirection;
arg1->unk1C = temp_v0->unk2 + 10.0f;
arg1->unk20 = temp_v0->unk_04;
load_giant_egg(arg1 + 0x24, 0, 0, 0);
func_802B52BC(arg1 + 0x10, 0, 0, 0);
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029CF0C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
s32 func_8029EC88(f32 *, ? *, ? *, ?); // extern
? func_802AAAAC(void *); // extern
? func_802B52BC(? *, ?, ?, ?); // extern
? load_giant_egg(? *, ?, ?, ?); // extern
extern ? D_8015F9B8;
extern f32 gCourseDirection;
extern ? gSegmentTable;
void place_falling_rocks(u32 arg0) {
f32 sp6C;
f32 sp68;
f32 sp64;
? sp58;
? sp50;
f32 *temp_s4;
s16 *temp_s0;
s16 temp_v0;
s16 temp_v0_2;
void *temp_a0;
void *temp_v1;
s16 phi_v0;
s16 *phi_s0;
temp_s0 = *(&gSegmentTable + ((arg0 >> 0x18) * 4)) + (arg0 & 0xFFFFFF) + 0x80000000;
temp_v0 = *temp_s0;
phi_v0 = temp_v0;
phi_s0 = temp_s0;
if (temp_v0 != -0x8000) {
temp_s4 = &sp64;
do {
sp64 = phi_v0 * gCourseDirection;
sp68 = phi_s0->unk2 + 10.0f;
sp6C = phi_s0->unk_04;
load_giant_egg(&sp58, 0, 0, 0);
func_802B52BC(&sp50, 0, 0, 0);
temp_v1 = &D_8015F9B8 + (func_8029EC88(temp_s4, &sp50, &sp58, 5) * 0x70);
temp_a0 = temp_v1 + 0x30;
temp_v1->unk6 = phi_s0->unk6;
func_802AAAAC(temp_a0);
temp_v0_2 = phi_s0->unk_08;
phi_v0 = temp_v0_2;
phi_s0 += 8;
} while (temp_v0_2 != -0x8000);
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/place_falling_rocks.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_800C98B8(f32 *, f32 *, ?); /* extern */
? func_8029CF0C(? *, struct FallingRock *); /* extern */
? func_802AC114(f32, f32 *, f32, f32 *, ?); /* extern */
? func_802ADDC8(f32, f32, UnkActorInner *, ?, f32, f32, f32); /* extern */
extern ? D_06007230;
extern f32 D_8015F8E4;
static f32 D_802B9758 = 5461.0f;
static f64 D_802B9760 = 0.1;
static f32 D_802B9768 = -1.2f;
static f32 D_802B976C = -1.2f;
static f32 D_802B9770 = -1.2f;
static f32 D_802B9774 = -1.2f;
static f32 D_802B9778 = -1.2f;
void update_obj_falling_rocks(struct FallingRock *rock) {
f32 sp4C;
f32 sp48;
f32 sp44;
f32 sp3C;
f32 sp34;
f32 *sp30;
f32 *temp_s1;
f32 *temp_s1_2;
f32 *temp_s1_3;
f32 temp_f0;
f32 temp_f0_2;
f32 temp_f0_3;
f32 temp_f10;
f32 temp_f14;
f32 temp_f2;
f32 temp_f2_2;
f32 temp_f2_3;
f32 temp_f4;
s16 temp_v0;
f32 phi_f12;
temp_v0 = rock->respawnTimer;
if (temp_v0 != 0) {
rock->respawnTimer = temp_v0 - 1;
return;
}
if (rock->pos[1] < D_8015F8E4) {
func_8029CF0C(&D_06007230, rock);
}
temp_f14 = D_802B9758;
rock->rot[0] += (s32) ((rock->velocity[2] * temp_f14) / 20.0f);
rock->rot[2] += (s32) ((rock->velocity[0] * temp_f14) / 20.0f);
rock->velocity[1] = (f32) ((f64) rock->velocity[1] - D_802B9760);
if (rock->velocity[1] < -2.0f) {
rock->velocity[1] = -2.0f;
}
rock->pos[0] += rock->velocity[0];
rock->pos[1] += rock->velocity[1];
rock->pos[2] += rock->velocity[2];
sp3C = rock->velocity[1];
func_802ADDC8(rock->velocity[0], temp_f14, &rock->unk30, 0x41200000, rock->pos[0], rock->pos[1], rock->pos[2]);
temp_f2 = rock->unk30.unk44;
phi_f12 = 0.0f;
if (temp_f2 < 0.0f) {
temp_s1 = rock->velocity;
sp44 = -rock->unk30.unk60[0];
sp48 = -rock->unk30.unk60[1];
sp4C = -rock->unk30.unk60[2];
temp_f0 = rock->unk30.unk44;
rock->pos[0] += sp44 * temp_f0;
rock->pos[1] += sp48 * temp_f0;
rock->pos[2] += sp4C * temp_f0;
func_802AC114(0.0f, &sp44, temp_f2, temp_s1, 0x40000000);
rock->velocity[1] = D_802B9768 * sp3C;
func_800C98B8(rock->pos, temp_s1, 0x1900800F);
}
temp_f2_2 = rock->unk30.unk3C;
phi_f12 = 0.0f;
if (temp_f2_2 < 0.0f) {
sp48 = -rock->unk30.unk48[1];
if (sp48 == 0.0f) {
rock->velocity[1] *= D_802B976C;
return;
}
temp_f4 = -rock->unk30.unk48[0];
temp_s1_2 = rock->velocity;
sp44 = temp_f4;
sp4C = -rock->unk30.unk48[2];
temp_f0_2 = rock->unk30.unk3C;
rock->pos[0] += temp_f4 * temp_f0_2;
rock->pos[1] += sp48 * temp_f0_2;
rock->pos[2] += sp4C * temp_f0_2;
sp30 = rock->pos;
sp34 = D_802B9770 * sp3C;
func_802AC114(0.0f, &sp44, temp_f2_2, temp_s1_2, 0x40000000);
rock->velocity[1] = sp34;
func_800C98B8(sp30, temp_s1_2, 0x1900800F);
goto block_12;
}
block_12:
temp_f2_3 = rock->unk30.unk40;
if (temp_f2_3 < phi_f12) {
sp48 = -rock->unk30.unk54[1];
if (phi_f12 == sp48) {
rock->velocity[1] *= D_802B9774;
return;
}
temp_s1_3 = rock->velocity;
temp_f10 = -rock->unk30.unk54[0];
sp44 = temp_f10;
sp4C = -rock->unk30.unk54[2];
temp_f0_3 = rock->unk30.unk40;
rock->pos[0] += temp_f10 * temp_f0_3;
rock->pos[1] += sp48 * temp_f0_3;
rock->pos[2] += sp4C * temp_f0_3;
sp30 = rock->pos;
sp3C = rock->velocity[1];
func_802AC114(phi_f12, &sp44, temp_f2_3, temp_s1_3, 0x40000000);
rock->velocity[1] = D_802B9778 * sp3C;
func_800C98B8(sp30, temp_s1_3, 0x1900800F);
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/update_obj_falling_rocks.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
? func_802976D8(void *); /* extern */
? func_802976EC(void *, void *); /* extern */
s32 func_8029EC88(f32 *, s16 *, ? *, s16); /* extern */
f32 func_802ABE30(?32, f32, ?32, u16); /* extern */
? func_802ADDC8(void *, ?, ?32, f32, ?32); /* extern */
? load_giant_egg(? *, f32, f32, f32); /* extern */
extern s32 D_800DC50C;
extern ? D_8015F9B8;
extern f32 gCourseDirection;
extern ? gSegmentTable;
static u16 gCurrentCourseId; /* type too large by 2; unable to generate initializer */
void place_segment_06(u32 arg0) {
f32 sp94;
f32 sp90;
f32 sp8C;
? sp80;
s16 sp7C;
s16 sp7A;
s16 sp78;
s16 sp74;
s16 *temp_s3;
s16 temp_v0;
s16 temp_v0_2;
s16 temp_v0_3;
s16 temp_v0_4;
u16 temp_t3;
void *temp_s0;
void *temp_s1;
s16 phi_v0;
s16 *phi_s3;
s16 phi_s2;
temp_s3 = *(&gSegmentTable + ((arg0 >> 0x18) * 4)) + (arg0 & 0xFFFFFF) + 0x80000000;
load_giant_egg(&sp80, 0.0f, 0.0f, 0.0f);
sp78 = 0x4000;
sp7A = 0;
sp7C = 0;
temp_v0 = *temp_s3;
phi_v0 = temp_v0;
if (temp_v0 != -0x8000) {
phi_s3 = temp_s3;
phi_s2 = sp74;
do {
temp_t3 = gCurrentCourseId;
sp8C = (f32) phi_v0 * gCourseDirection;
sp94 = (f32) phi_s3->unk_04;
sp90 = (f32) phi_s3->unk2;
switch (temp_t3) {
case 0:
phi_s2 = 2;
break;
case 2:
phi_s2 = 0x21;
break;
case 4:
phi_s2 = 3;
break;
case 5:
phi_s2 = 0x1D;
break;
case 7:
temp_v0_2 = phi_s3->unk6;
if (temp_v0_2 != 6) {
if (temp_v0_2 != 7) {
} else {
phi_s2 = 4;
}
} else {
phi_s2 = 0x1C;
}
break;
case 8:
phi_s2 = 0x1A;
break;
case 9:
phi_s2 = 0x13;
break;
case 11:
temp_v0_3 = phi_s3->unk6;
if (temp_v0_3 != 5) {
if (temp_v0_3 != 6) {
if (temp_v0_3 != 7) {
} else {
phi_s2 = 0x20;
}
} else {
phi_s2 = 0x1F;
}
} else {
phi_s2 = 0x1E;
}
break;
}
temp_s0 = &D_8015F9B8 + (func_8029EC88(&sp8C, &sp78, &sp80, phi_s2) * 0x70);
if (D_800DC50C == CREDITS_SEQUENCE) {
func_802976D8(temp_s0 + 0x10);
} else {
temp_s1 = temp_s0 + 0x30;
func_802ADDC8(temp_s1, 0x40A00000, temp_s0->pos, temp_s0->unk1C, temp_s0->unk20);
if (temp_s0->unk_044 < 0.0f) {
temp_s0->unk1C = func_802ABE30(temp_s0->pos, temp_s0->unk1C, temp_s0->unk20, temp_s0->unk3A);
}
func_802976EC(temp_s1, temp_s0 + 0x10);
}
temp_v0_4 = phi_s3->unk_08;
phi_v0 = temp_v0_4;
phi_s3 += 8;
} while (temp_v0_4 != -0x8000);
sp74 = phi_s2;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/place_segment_06.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
s16 func_8029EC88(f32 *, s16 *, ? *, ?); /* extern */
f32 func_802AE1C0(f32, f32, f32); /* extern */
? load_giant_egg(? *, ?, ?, ?); /* extern */
s16 random_u16(); /* extern */
extern f32 gCourseDirection;
extern s16 gPlaceItemBoxes;
void place_all_item_boxes(u32 arg0) {
f32 sp74;
f32 sp70;
f32 sp6C;
? sp60;
s16 sp5C;
s16 sp5A;
s16 sp58;
f32 *temp_s5;
f32 temp_f0;
f32 temp_f16;
s16 *temp_s0;
s16 *temp_s0_2;
s16 *temp_s6;
s16 temp_s1;
s16 temp_v1;
s16 temp_v1_2;
struct ItemBox *temp_v0;
s16 phi_v1;
s16 *phi_s0;
temp_s0 = gSegmentTable[arg0 >> 0x18] + (arg0 & 0xFFFFFF) + 0x80000000;
phi_s0 = temp_s0;
if ((gModeSelection != 1) && (gPlaceItemBoxes != 0)) {
load_giant_egg(&sp60, 0, 0, 0);
temp_v1 = *temp_s0;
phi_v1 = temp_v1;
if (temp_v1 != -0x8000) {
temp_s6 = &sp58;
temp_s5 = &sp6C;
do {
sp6C = (f32) phi_v1 * gCourseDirection;
sp70 = (f32) phi_s0->unk2;
sp74 = (f32) phi_s0->unk_04;
sp58 = random_u16();
sp5A = random_u16();
sp5C = random_u16();
temp_s1 = func_8029EC88(temp_s5, temp_s6, &sp60, 0xC);
temp_f0 = func_802AE1C0(sp6C, sp70 + 10.0f, sp74);
temp_f16 = temp_f0 - 20.0f;
temp_s0_2 = phi_s0 + 8;
temp_v0 = &D_8015F9B8[temp_s1];
temp_v0->resetDistance = temp_f0;
temp_v0->pos[1] = temp_f16;
temp_v0->origY = sp70;
temp_v1_2 = *temp_s0_2;
phi_v1 = temp_v1_2;
phi_s0 = temp_s0_2;
} while (temp_v1_2 != -0x8000);
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/place_all_item_boxes.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
s32 func_8029EC88(? *, ? *, ? *, ?); // extern
extern ? D_8015F9B8;
extern u16 gPlayers;
void func_8029D9F8(void) {
? sp64;
? sp58;
? sp50;
s16 temp_s0;
u16 temp_v0;
u16 *phi_s1;
s16 phi_s0;
phi_s1 = &gPlayers;
phi_s0 = 0;
do {
temp_v0 = *phi_s1;
if (((temp_v0 & 0x4000) != 0) && ((temp_v0 & 0x100) == 0)) {
(&D_8015F9B8 + (func_8029EC88(&sp64, &sp50, &sp58, 0x2D) * 0x70))->unk_04 = phi_s0;
}
temp_s0 = phi_s0 + 1;
phi_s1 += 0xDD8;
phi_s0 = temp_s0;
} while (temp_s0 != 4);
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029D9F8.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern s16 D_80150110;
//extern ? D_8015F9B8;
extern s32 D_80162578;
extern struct Actor D_8015F9B8[112];
void func_8029DAB8(void) {
struct Actor *temp_v1;
s32 i;
D_80150110 = 0;
for (i = 0; i < 100; i++) {
temp_v1 = &D_8015F9B8[i];
temp_v1->unk2 = 0;
temp_v1->unk0 = 0;
temp_v1->unk_04 = 0;
temp_v1->unk6 = 0;
temp_v1->unk_08 = 0.0f;
temp_v1->unkC = 0.0f;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029DAB8.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
? func_80298D10(); /* extern */
? func_8029D9F8(); /* extern */
s32 func_8029EC88(f32 *, ? *, ? *, ?); /* extern */
? func_802A14BC(f32, ?, ?); /* extern */
? func_802B52BC(? *, ?, ?, ?); /* extern */
? load_giant_egg(f32 *, ?, ?, ?); /* extern */
? place_all_item_boxes(? *); /* extern */
? place_falling_rocks(? *); /* extern */
? place_palm_trees(? *); /* extern */
? place_piranha_plants(? *); /* extern */
? place_segment_06(? *); /* extern */
extern ? D_06000028;
extern ? D_06000038;
extern ? D_06000058;
extern ? D_06000080;
extern ? D_06007230;
extern ? D_06007250;
extern ? D_06007718;
extern ? D_06007810;
extern ? D_06009290;
extern ? D_06009370;
extern ? D_06009498;
extern ? D_06009518;
extern ? D_06009570;
extern ? D_06009B80;
extern ? D_0600B3D0;
extern ? D_0600CB40;
extern ? D_0600D9F0;
extern ? D_0600DA78;
extern ? D_0600DB80;
extern ? D_0600FDE8;
extern ? D_0600FE80;
extern ? D_06013EC0;
extern ? D_06014330;
extern ? D_060143E0;
extern ? D_06016338;
extern ? D_060180A0;
extern ? D_06018110;
extern ? D_06018E78;
extern ? D_06018F70;
extern ? D_06022E88;
extern ? D_06022F08;
extern ? D_06023AE0;
extern u16 D_80150110;
extern u16 D_8015F900;
extern ? D_8015F9B8;
extern ? D_8015F9BE;
extern f32 gCourseDirection;
extern s32 gPlayerCountSelection1;
static ? D_802B8850; /* unable to generate initializer */
static ? D_802B885C; /* unable to generate initializer */
static u16 gCurrentCourseId; /* type too large by 2; unable to generate initializer */
// Place course actors
void func_8029DB44(void) {
f32 sp40;
? sp34;
? sp2C;
f32 *temp_a0;
f32 *temp_a0_10;
f32 *temp_a0_2;
f32 *temp_a0_3;
f32 *temp_a0_4;
f32 *temp_a0_5;
f32 *temp_a0_6;
f32 *temp_a0_7;
f32 *temp_a0_8;
f32 *temp_a0_9;
u16 temp_t9;
void *temp_v1;
sp34.unk0 = D_802B8850.unk0;
sp34.unk4 = D_802B8850.unk4;
sp34.unk8 = D_802B8850.unk8;
sp2C.unk0 = D_802B885C.unk0;
sp2C.unk4 = D_802B885C.unk4;
temp_t9 = gCurrentCourseId;
D_8015F900 = 0;
switch (temp_t9) {
case COURSE_MARIO_RACEWAY:
place_segment_06(&D_06009570);
place_piranha_plants(&D_06009518);
place_all_item_boxes(&D_06009498);
load_giant_egg(&sp40, 0x43160000, 0x42200000, 0xC4A28000);
temp_a0 = &sp40;
sp40 *= gCourseDirection;
func_8029EC88(temp_a0, &sp2C, &sp34, 0x17);
load_giant_egg(&sp40, 0x451D8000, 0, 0x449B0000);
temp_a0_2 = &sp40;
sp40 *= gCourseDirection;
temp_v1 = (func_8029EC88(temp_a0_2, &sp2C, &sp34, 0x17) * 0x70) + &D_8015F9B8;
temp_v1->unk2 = temp_v1->unk2 | 0x4000;
break;
case COURSE_CHOCO_MOUNTAIN:
place_all_item_boxes(&D_06007250);
place_falling_rocks(&D_06007230);
break;
case COURSE_BOWSER_CASTLE:
place_segment_06(&D_06009290);
place_all_item_boxes(&D_06009370);
break;
case COURSE_BANSHEE_BOARDWALK:
place_all_item_boxes(&D_0600B3D0);
break;
case COURSE_YOSHI_VALLEY:
place_segment_06(&D_060180A0);
place_all_item_boxes(&D_06018110);
load_giant_egg(&sp40, 0xC50FC000, 0, 0x441E8000);
temp_a0_3 = &sp40;
sp40 *= gCourseDirection;
func_8029EC88(temp_a0_3, &sp2C, &sp34, 9);
break;
case COURSE_FRAPPE_SNOWLAND:
place_segment_06(&D_06007718);
place_all_item_boxes(&D_06007810);
break;
case COURSE_KOOPA_BEACH:
func_802A14BC(328.0f * gCourseDirection, 0x428C0000, 0x451ED000);
place_all_item_boxes(&D_06018E78);
place_palm_trees(&D_06018F70);
break;
case COURSE_ROYAL_RACEWAY:
place_segment_06(&D_0600DA78);
place_all_item_boxes(&D_0600DB80);
place_piranha_plants(&D_0600D9F0);
break;
case COURSE_LUIGI_RACEWAY:
place_segment_06(&D_0600FE80);
place_all_item_boxes(&D_0600FDE8);
break;
case COURSE_MOO_MOO_FARM:
if (gPlayerCountSelection1 != 4) {
place_segment_06(&D_06014330);
}
place_all_item_boxes(&D_060143E0);
break;
case COURSE_TOADS_TURNPIKE:
place_all_item_boxes(&D_06023AE0);
break;
case COURSE_KALAMARI_DESERT:
place_segment_06(&D_06022F08);
place_all_item_boxes(&D_06022E88);
load_giant_egg(&sp40, 0xC4D20000, 0x40000000, 0x420C0000);
temp_a0_4 = &sp40;
sp40 *= gCourseDirection;
*(&D_8015F9BE + (func_8029EC88(temp_a0_4, &sp2C, &sp34, 0x27) * 0x70)) = 1;
load_giant_egg(&sp40, 0xC4C80000, 0x40000000, 0x420C0000);
temp_a0_5 = &sp40;
sp40 *= gCourseDirection;
*(&D_8015F9BE + (func_8029EC88(temp_a0_5, &sp2C, &sp34, 0x27) * 0x70)) = 1;
func_802B52BC(&sp2C, 0, -0x2000, 0);
load_giant_egg(&sp40, 0xC519B000, 0x40000000, 0x450D7000);
temp_a0_6 = &sp40;
sp40 *= gCourseDirection;
*(&D_8015F9BE + (func_8029EC88(temp_a0_6, &sp2C, &sp34, 0x27) * 0x70)) = 0;
load_giant_egg(&sp40, 0xC51A3000, 0x40000000, 0x45147000);
temp_a0_7 = &sp40;
sp40 *= gCourseDirection;
*(&D_8015F9BE + (func_8029EC88(temp_a0_7, &sp2C, &sp34, 0x27) * 0x70)) = 0;
break;
case COURSE_SHERBET_LAND:
place_all_item_boxes(&D_06009B80);
break;
case COURSE_RAINBOW_ROAD:
place_all_item_boxes(&D_06016338);
break;
case COURSE_WARIO_STADIUM:
place_all_item_boxes(&D_0600CB40);
load_giant_egg(&sp40, 0xC3030000, 0x42A60000, 0x438F0000);
temp_a0_8 = &sp40;
sp40 *= gCourseDirection;
func_8029EC88(temp_a0_8, &sp2C, &sp34, 0x23);
load_giant_egg(&sp40, 0xC5131000, 0x42900000, 0xC4C90000);
temp_a0_9 = &sp40;
sp40 *= gCourseDirection;
func_8029EC88(temp_a0_9, &sp2C, &sp34, 0x23);
load_giant_egg(&sp40, 0xC523E000, 0x429E0000, 0x4438C000);
temp_a0_10 = &sp40;
sp40 *= gCourseDirection;
func_8029EC88(temp_a0_10, &sp2C, &sp34, 0x23);
break;
case COURSE_BLOCK_FORT:
place_all_item_boxes(&D_06000038);
break;
case COURSE_SKYSCRAPER:
place_all_item_boxes(&D_06000080);
break;
case COURSE_DOUBLE_DECK:
place_all_item_boxes(&D_06000028);
break;
case COURSE_DK_JUNGLE:
place_all_item_boxes(&D_06013EC0);
func_8029D9F8();
func_80298D10();
break;
case COURSE_BIG_DONUT:
place_all_item_boxes(&D_06000058);
break;
}
D_8015F900 = D_80150110;
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029DB44.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
? func_800122D8(); /* extern */
? func_80297818(); /* extern */
? func_8029DAB8(); /* extern */
? func_8029DB44(); /* extern */
s32 func_802A84F4(? *, ?, ?); /* extern */
? set_segment_base_addr(?, s32); /* extern */
extern ? D_0F04CBE0;
extern ? D_0F04CE30;
extern ? D_0F04D080;
extern ? D_0F04D2D8;
extern ? D_0F04D538;
extern ? D_0F04D790;
extern ? D_0F04D9FC;
extern ? D_0F04DC5C;
extern ? D_0F04DEB0;
extern ? D_0F04E0DC;
extern ? D_0F04E314;
extern ? D_0F04E554;
extern ? D_0F04E798;
extern ? D_0F04E9F0;
extern ? D_0F04EC4C;
extern ? D_0F04EE88;
extern ? D_0F04F45C;
extern ? D_0F04F7A4;
extern ? D_0F04FB3C;
extern ? D_0F04FE28;
extern ? D_0F050118;
extern ? D_0F050468;
extern ? D_0F050678;
extern ? D_0F050D50;
extern ? D_0F0513CC;
extern ? D_0F051820;
extern ? D_0F051C54;
extern ? D_0F051FD8;
extern ? D_0F05232C;
extern ? D_0F0526B8;
extern ? D_0F052A20;
extern ? D_0F052D3C;
extern ? D_0F05300C;
extern ? D_0F0532F8;
extern ? D_0F05363C;
extern ? D_0F053950;
extern ? D_0F053C34;
extern ? D_0F053F74;
extern ? D_0F054270;
extern ? D_0F054518;
extern ? D_0F05488C;
extern ? D_0F054C3C;
extern ? D_0F054ECC;
extern ? D_0F0551C8;
extern ? D_0F0554CC;
extern ? D_0F055880;
extern ? D_0F055BA0;
extern ? D_0F055F10;
extern ? D_0F0561AC;
extern ? D_0F056408;
extern ? D_0F05662C;
extern ? D_0F05688C;
extern ? D_0F056AD0;
extern ? D_0F056CF0;
extern ? D_0F056EC8;
extern ? D_0F057084;
extern ? D_0F057288;
extern ? D_0F057590;
extern ? D_0F057EB4;
extern ? D_0F0581E4;
extern ? D_0F058550;
extern ? gTexture671A88;
extern ? gTexture6774D8;
extern ? gTextureShrub;
u16 gCurrentCourseId; /* unable to generate initializer */
void func_8029E158(void) {
u16 temp_t6;
set_segment_base_addr(3, gPrevLoadedAddress);
D_802BA050 = func_802A84F4(&D_0F04CBE0, 0x257, 0x400); // shell
func_802A84F4(&D_0F04CE30, 0x242, 0x400);
func_802A84F4(&D_0F04D080, 0x259, 0x400);
func_802A84F4(&D_0F04D2D8, 0x256, 0x400);
func_802A84F4(&D_0F04D538, 0x246, 0x400);
func_802A84F4(&D_0F04D790, 0x25E, 0x400);
func_802A84F4(&D_0F04D9FC, 0x25C, 0x400);
func_802A84F4(&D_0F04DC5C, 0x254, 0x400);
D_802BA054 = func_802A84F4(&D_0F04DEB0, 0x22A, 0x400);
func_802A84F4(&D_0F04E0DC, 0x237, 0x400);
func_802A84F4(&D_0F04E314, 0x23E, 0x400);
func_802A84F4(&D_0F04E554, 0x243, 0x400);
func_802A84F4(&D_0F04E798, 0x255, 0x400);
func_802A84F4(&D_0F04E9F0, 0x259, 0x400);
func_802A84F4(&D_0F04EC4C, 0x239, 0x400);
func_802A84F4(&D_0F04EE88, 0x236, 0x400);
func_802A84F4(&D_0F054C3C, 0x28E, 0x800);
func_802A84F4(&D_0F054ECC, 0x2FB, 0x800);
func_802A84F4(&D_0F0551C8, 0x302, 0x800);
func_802A84F4(&D_0F0554CC, 0x3B4, 0x800);
func_802A84F4(&D_0F055880, 0x31E, 0x800);
func_802A84F4(&D_0F055BA0, 0x36E, 0x800);
func_802A84F4(&D_0F055F10, 0x29C, 0x800);
func_802A84F4(&D_0F0561AC, 0x25B, 0x800);
func_802A84F4(&gTexture671A88, 0x400, 0x800);
func_802A84F4(&gTexture6774D8, 0x400, 0x800);
temp_t6 = gCurrentCourseId;
switch (temp_t6) {
case 0:
func_802A84F4(&D_0F04F45C, 0x35B, 0x800);
D_802BA058 = func_802A84F4(&D_0F056408, 0x3E8, 0x800);
func_802A84F4(&D_0F05662C, 0x3E8, 0x800);
func_802A84F4(&D_0F05688C, 0x3E8, 0x800);
func_802A84F4(&D_0F056AD0, 0x3E8, 0x800);
func_802A84F4(&D_0F056CF0, 0x3E8, 0x800);
func_802A84F4(&D_0F056EC8, 0x3E8, 0x800);
func_802A84F4(&D_0F057084, 0x3E8, 0x800);
func_802A84F4(&D_0F057288, 0x3E8, 0x800);
func_802A84F4(&D_0F057590, 0x3E8, 0x800);
break;
case 2:
func_802A84F4(&gTextureShrub, 0x3FF, 0x800);
break;
case 4:
func_802A84F4(&D_0F04F7A4, 0x3E8, 0x800);
break;
case 5:
func_802A84F4(&D_0F0513CC, 0x454, 0x800);
func_802A84F4(&D_0F051820, 0x432, 0x800);
break;
case 7:
func_802A84F4(&D_0F04FB3C, 0x3E8, 0x800);
func_802A84F4(&D_0F050D50, 0x3E8, 0x800);
D_802BA058 = func_802A84F4(&D_0F056408, 0x3E8, 0x800);
func_802A84F4(&D_0F05662C, 0x3E8, 0x800);
func_802A84F4(&D_0F05688C, 0x3E8, 0x800);
func_802A84F4(&D_0F056AD0, 0x3E8, 0x800);
func_802A84F4(&D_0F056CF0, 0x3E8, 0x800);
func_802A84F4(&D_0F056EC8, 0x3E8, 0x800);
func_802A84F4(&D_0F057084, 0x3E8, 0x800);
func_802A84F4(&D_0F057288, 0x3E8, 0x800);
func_802A84F4(&D_0F057590, 0x3E8, 0x800);
break;
case 8:
func_802A84F4(&D_0F050468, 0x3E8, 0x800);
func_802A84F4(&D_0F050678, 0x3E8, 0x800);
break;
case 9:
func_802A84F4(&D_0F04FE28, 0x3E8, 0x800);
func_802A84F4(&D_0F050118, 0x3E8, 0x800);
func_802A84F4(&D_0F051C54, 0x400, 0x800);
func_802A84F4(&D_0F051FD8, 0x400, 0x800);
func_802A84F4(&D_0F05232C, 0x400, 0x800);
func_802A84F4(&D_0F0526B8, 0x400, 0x800);
func_802A84F4(&D_0F052A20, 0x400, 0x800);
func_802A84F4(&D_0F052D3C, 0x400, 0x800);
func_802A84F4(&D_0F05300C, 0x400, 0x800);
func_802A84F4(&D_0F0532F8, 0x400, 0x800);
func_802A84F4(&D_0F05363C, 0x400, 0x800);
func_802A84F4(&D_0F053950, 0x400, 0x800);
break;
case 11:
func_802A84F4(&D_0F053C34, 0x33E, 0x800);
func_802A84F4(&D_0F053F74, 0x2FB, 0x800);
func_802A84F4(&D_0F054270, 0x2A8, 0x800);
func_802A84F4(&D_0F054518, 0x374, 0x800);
func_802A84F4(&D_0F05488C, 0x3AF, 0x800);
break;
case 18:
func_802A84F4(&D_0F057EB4, 0x32F, 0x400);
func_802A84F4(&D_0F0581E4, 0x369, 0x400);
func_802A84F4(&D_0F058550, 0x364, 0x400);
break;
}
func_80297818();
func_8029DAB8();
func_8029DB44();
func_800122D8();
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029E158.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800C99E0(void *, ?, void *); // extern
void func_8029E7DC(void *arg0) {
s16 temp_v0;
temp_v0 = arg0->unk2;
if ((temp_v0 & 0x200) != 0) {
func_800C99E0(arg0 + 0x18, 0x19019053, arg0);
return;
}
if ((temp_v0 & 0x100) != 0) {
func_800C99E0(arg0 + 0x18, 0x19018010, arg0);
return;
}
if ((temp_v0 & 0x80) != 0) {
func_800C99E0(arg0 + 0x18, 0x19008054, arg0);
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029E7DC.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8029E7DC(); // extern
extern u16 D_80150110;
void func_8029E854(void *arg0) {
func_8029E7DC();
arg0->unk2 = 0;
arg0->unk0 = 0;
D_80150110 = D_80150110 - 1;
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029E854.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_8000EE58(s16, s16, s32, s32); /* extern */
? func_80296D10(struct Actor *, s32, s16 *, f32 *, s32); /* extern */
? func_8029E7DC(struct Actor *, s16, s32, s32); /* extern */
extern u16 D_8015F900;
s16 func_8029E890(s32 arg0, s16 *arg1, f32 *arg2, s16 actorType) {
s16 temp_s1;
s16 temp_s1_2;
s16 temp_t4;
s16 temp_t4_2;
s16 temp_v0;
s16 temp_v0_2;
s16 temp_v0_3;
s16 temp_v0_4;
s16 temp_v0_5;
s16 temp_v0_6;
s16 temp_v0_7;
s16 temp_v0_8;
u16 temp_t3;
struct Actor *phi_s0;
s16 phi_s1;
struct Actor *phi_s0_2;
s16 phi_s1_2;
temp_t3 = D_8015F900;
phi_s1 = (s16) temp_t3;
if ((s32) temp_t3 < 0x64) {
phi_s0 = &D_8015F9B8[temp_t3];
loop_2:
if ((phi_s0->flags & 0xF) == 0) {
temp_v0 = phi_s0->type;
switch (temp_v0) { /* switch 5; irregular */
case ACTOR_RED_SHELL: /* switch 5 */
temp_t4 = phi_s0->state;
switch (temp_t4) { /* switch 1 */
case 2: /* switch 1 */
case 3: /* switch 1 */
case 4: /* switch 1 */
case 5: /* switch 1 */
case 8: /* switch 1 */
case 9: /* switch 1 */
func_8000EE58(phi_s1, 2, 6, 8);
/* fallthrough */
case 7: /* switch 1 */
func_8029E7DC(phi_s0);
func_80296D10(phi_s0, arg0, arg1, arg2, (s32) actorType);
return phi_s1;
}
break;
case ACTOR_GREEN_SHELL: /* switch 5 */
temp_v0_2 = phi_s0->state;
switch (temp_v0_2) { /* switch 6; irregular */
case 2: /* switch 6 */
func_8000EE58(phi_s1, 2, 6, 8);
/* fallthrough */
case 7: /* switch 6 */
func_8029E7DC(phi_s0);
func_80296D10(phi_s0, arg0, arg1, arg2, (s32) actorType);
return phi_s1;
}
break;
case ACTOR_BANANA: /* switch 5 */
temp_v0_3 = phi_s0->state;
if ((temp_v0_3 == 1) || (temp_v0_3 == 4) || (temp_v0_3 == 5)) {
func_8029E7DC(phi_s0, 2, 6, 8);
func_80296D10(phi_s0, arg0, arg1, arg2, (s32) actorType);
return phi_s1;
}
goto block_24;
case ACTOR_FAKE_ITEM_BOX: /* switch 5 */
temp_v0_4 = phi_s0->state;
if ((temp_v0_4 == 1) || (temp_v0_4 == 2)) {
func_8029E7DC(phi_s0, 2, 6, 8);
func_80296D10(phi_s0, arg0, arg1, arg2, (s32) actorType);
return phi_s1;
}
goto block_24;
}
} else {
default: /* switch 1 */
block_24:
temp_s1 = phi_s1 + 1;
phi_s0 += 0x70;
phi_s1 = temp_s1;
if (temp_s1 >= 0x64) {
goto block_26;
}
goto loop_2;
}
} else {
block_26:
phi_s1_2 = (s16) D_8015F900;
if ((s16) D_8015F900 < 0x64) {
phi_s0_2 = &D_8015F9B8[(s16) D_8015F900];
loop_28:
temp_v0_5 = phi_s0_2->type;
switch (temp_v0_5) { /* switch 3; irregular */
case ACTOR_RED_SHELL: /* switch 3 */
temp_t4_2 = phi_s0_2->state;
switch (temp_t4_2) { /* switch 2 */
case 2: /* switch 2 */
case 3: /* switch 2 */
case 4: /* switch 2 */
case 5: /* switch 2 */
case 8: /* switch 2 */
case 9: /* switch 2 */
func_8000EE58(phi_s1_2, 2, 6, 8);
/* fallthrough */
case 7: /* switch 2 */
func_8029E7DC(phi_s0_2);
func_80296D10(phi_s0_2, arg0, arg1, arg2, (s32) actorType);
return phi_s1_2;
default: /* switch 3 */
default: /* switch 2 */
block_49:
temp_s1_2 = phi_s1_2 + 1;
phi_s0_2 += 0x70;
phi_s1_2 = temp_s1_2;
if (temp_s1_2 >= 0x64) {
goto block_50;
}
goto loop_28;
}
break;
case ACTOR_GREEN_SHELL: /* switch 3 */
temp_v0_6 = phi_s0_2->state;
switch (temp_v0_6) { /* switch 4; irregular */
case 2: /* switch 4 */
func_8000EE58(phi_s1_2, 2, 6, 8);
/* fallthrough */
case 7: /* switch 4 */
func_8029E7DC(phi_s0_2);
func_80296D10(phi_s0_2, arg0, arg1, arg2, (s32) actorType);
return phi_s1_2;
}
break;
case ACTOR_BANANA: /* switch 3 */
temp_v0_7 = phi_s0_2->state;
if ((temp_v0_7 == 1) || (temp_v0_7 == 4) || (temp_v0_7 == 5)) {
func_8029E7DC(phi_s0_2, 2, 6, 8);
func_80296D10(phi_s0_2, arg0, arg1, arg2, (s32) actorType);
return phi_s1_2;
}
goto block_49;
case ACTOR_FAKE_ITEM_BOX: /* switch 3 */
temp_v0_8 = phi_s0_2->state;
if ((temp_v0_8 == 1) || (temp_v0_8 == 2)) {
func_8029E7DC(phi_s0_2, 2, 6, 8);
func_80296D10(phi_s0_2, arg0, arg1, arg2, (s32) actorType);
return phi_s1_2;
}
goto block_49;
}
} else {
block_50:
return -1;
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029E890.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_80296D10(? *, s32, s32, s32, s32); // extern
s16 func_8029E890(s16); // extern
extern u16 D_80150110;
extern ? D_8015F9B8;
s16 func_8029EC88(s32 arg0, s32 arg1, s32 arg2, s16 arg3) {
s32 sp24;
s32 temp_v1;
u16 temp_t0;
? *phi_a0;
s32 phi_v1;
temp_t0 = D_80150110;
if (temp_t0 >= 0x64) {
return func_8029E890(arg3);
}
phi_a0 = &D_8015F9B8;
phi_v1 = 0;
loop_3:
if (phi_a0->unk2 == 0) {
D_80150110 = temp_t0 + 1;
sp24 = phi_v1;
func_80296D10(phi_a0, arg0, arg1, arg2, arg3);
return phi_v1;
}
temp_v1 = phi_v1 + 1;
phi_a0 += 0x70;
phi_v1 = temp_v1;
if (temp_v1 == 0x64) {
return -1;
}
goto loop_3;
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029EC88.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
//void func_8029EC88(s32, s32 *, s32 *, s32); // extern
//void func_802B52BC(s32 *, s32, s32, s32); // extern
void func_8029ED38(Vec3f arg0, Vec3s arg1) {
//? sp24;
//? sp1C;
load_giant_egg(arg0, 0, 0, 0);
func_802B52BC(arg1, 0, 0, 0);
func_8029EC88(arg0, arg1, arg0, arg1);
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029ED38.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern f32 D_802B988C;
extern f32 D_802B9890;
extern f32 D_802B9894;
extern f32 D_802B9898;
? func_8029EEB8(void *arg0, void *arg1, f32 arg2, f32 arg3, f32 arg4) {
f32 sp44;
f32 sp40;
f32 sp3C;
f32 sp28;
f32 temp_f0;
f32 temp_f0_2;
f32 temp_f0_3;
f32 temp_f0_4;
f32 temp_f0_5;
f32 temp_f0_6;
f32 temp_f10;
f32 temp_f12;
f32 temp_f12_2;
f32 temp_f14;
f32 temp_f14_2;
f32 temp_f16;
f32 temp_f18;
f32 temp_f20;
f32 temp_f20_2;
f32 temp_f22;
f32 temp_f2;
f32 temp_f2_2;
s32 temp_v0;
f32 phi_f2;
temp_f0 = arg0->unk70;
temp_f22 = temp_f0 + arg2;
temp_f20 = arg1->unk0 - arg0->unk14;
temp_f12 = temp_f0 + arg3;
if (temp_f22 < temp_f20) {
return 0;
}
temp_f2 = -temp_f22;
if (temp_f20 < temp_f2) {
return 0;
}
temp_f0_2 = arg1->unk_04 - arg0->pos;
if (temp_f12 < temp_f0_2) {
return 0;
}
if (temp_f0_2 < -temp_f12) {
return 0;
}
temp_f14 = arg1->unk_08 - arg0->unk1C;
if (temp_f22 < temp_f14) {
return 0;
}
if (temp_f14 < temp_f2) {
return 0;
}
temp_f12_2 = (temp_f20 * temp_f20) + (temp_f0_2 * temp_f0_2) + (temp_f14 * temp_f14);
if (temp_f12_2 < D_802B988C) {
return 0;
}
if ((temp_f22 * temp_f22) < temp_f12_2) {
return 0;
}
sp44 = temp_f14;
temp_f0_3 = sqrtf(temp_f12_2);
sp28 = temp_f0_3 - temp_f22;
temp_v0 = arg0->unkBC;
temp_f16 = arg0->unk34;
temp_f18 = arg0->unk3C;
if ((temp_v0 & 0x200) != 0) {
goto block_25;
}
if (temp_f0_3 < D_802B9890) {
temp_f10 = temp_f16 * temp_f16;
arg0 = arg0;
sp40 = temp_f16;
sp3C = temp_f18;
temp_f0_4 = sqrtf(temp_f10 + (temp_f18 * temp_f18));
phi_f2 = temp_f0_4;
if (temp_f0_4 < 0.5f) {
phi_f2 = 0.5f;
}
arg0->unk34 = 0.0f;
arg0->unk3C = 0.0f;
arg0->unk14 = arg0->unk14 + ((temp_f16 / phi_f2) * temp_f22);
arg0->unk1C = arg0->unk1C + ((temp_f18 / phi_f2) * temp_f22);
goto block_25;
}
temp_f14_2 = temp_f14 / temp_f0_3;
arg0->unkBC = temp_v0 | 0x8000;
sp3C = temp_f18;
sp40 = temp_f16;
arg1 = arg1;
arg0 = arg0;
temp_f20_2 = temp_f20 / temp_f0_3;
sp44 = temp_f14_2;
temp_f0_5 = sqrtf((temp_f16 * temp_f16) + (temp_f18 * temp_f18));
if (temp_f0_5 < 0.25f) {
temp_f0_6 = D_802B9894;
arg0->unk14 = arg1->unk0 - (temp_f20_2 * temp_f22 * temp_f0_6);
arg0->unk34 = 0.0f;
arg0->unk3C = 0.0f;
arg0->unk1C = arg1->unk_08 - (temp_f14_2 * temp_f22 * temp_f0_6);
return 1;
}
temp_f2_2 = temp_f0_5 * (((temp_f20_2 * temp_f16) + (temp_f14_2 * temp_f18)) / temp_f0_5) * arg4 * D_802B9898;
arg0->unk34 = arg0->unk34 - (temp_f20_2 * temp_f2_2);
arg0->unk3C = arg0->unk3C - (temp_f14_2 * temp_f2_2);
arg0->unk14 = arg0->unk14 + (temp_f20_2 * sp28 * 0.5f);
arg0->unk1C = arg0->unk1C + (temp_f14_2 * sp28 * 0.5f);
block_25:
return 1;
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029EEB8.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800C9060(s32, ?); // extern
? func_800C90F4(s32, s32); // extern
? func_800C98B8(void *, void *, ?); // extern
s32 func_8029EEB8(s32, ?, ?, f32); // extern
extern f32 D_802B989C;
? func_8029F1F8(void *arg0, void *arg1) {
u16 temp_v0;
if (func_8029EEB8(arg1 + 0x18, 0x40E00000, 0x43480000, D_802B989C) == 1) {
temp_v0 = arg0->unk0;
if ((temp_v0 & 0x4000) != 0) {
if ((arg0->unkBC & 0x200) != 0) {
arg1->unk2 = arg1->unk2 | 0x400;
func_800C98B8(arg0 + 0x14, arg0 + 0x34, 0x19018010);
func_800C90F4(((arg0 - gPlayerOne) / 0xDD8) & 0xFF, (arg0->unk254 * 0x10) + 0x2900800D);
return 1;
}
if ((temp_v0 & 0x100) == 0) {
func_800C9060(((arg0 - gPlayerOne) / 0xDD8) & 0xFF, 0x1900701A);
}
goto block_6;
}
block_6:
return 1;
}
return 0;
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029F1F8.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800C9060(s32, ?); // extern
? func_800C90F4(s32, s32); // extern
? func_800C98B8(void *, void *, ?); // extern
s32 func_8029EEB8(void *, f32, f32, f32); // extern
? func_8029F2FC(void *arg0, void *arg1) {
f32 temp_f0;
u16 temp_v0;
temp_f0 = arg1->unkC;
if (func_8029EEB8(arg1 + 0x18, temp_f0, temp_f0, 2.5f) == 1) {
temp_v0 = arg0->unk0;
if ((temp_v0 & 0x4000) != 0) {
if ((arg0->unkBC & 0x200) != 0) {
arg1->unk2 = arg1->unk2 | 0x400;
func_800C98B8(arg0 + 0x14, arg0 + 0x34, 0x1901A24A);
func_800C90F4(((arg0 - gPlayerOne) / 0xDD8) & 0xFF, (arg0->unk254 * 0x10) + 0x2900800D);
return 1;
}
if ((temp_v0 & 0x100) == 0) {
func_800C9060(((arg0 - gPlayerOne) / 0xDD8) & 0xFF, 0x1900A052);
}
goto block_6;
}
block_6:
return 1;
}
return 0;
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029F2FC.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
? func_8008DABC(Player *, s8); /* extern */
? func_800C90F4(s32, s32); /* extern */
? func_800C98B8(f32 *, f32 *, ?, Player *); /* extern */
? func_802977B0(Player *); /* extern */
f32 sqrtf(f32, f32); /* extern */
extern s32 D_80162DF8;
s32 func_8029F408(Player *arg0, Player *arg1) {
f32 sp1C;
Player *temp_a0;
Player *temp_a3;
f32 temp_f0;
f32 temp_f0_2;
f32 temp_f2;
f32 temp_f2_2;
temp_f2 = arg1->posY - arg0->pos[0];
if ((temp_f2 < 0.0f) && (temp_f2 < -60.0f)) {
return 0;
}
if (temp_f2 > 60.0f) {
return 0;
}
temp_f0 = arg1->rotX - arg0->pos[2];
if ((temp_f0 < 0.0f) && (temp_f0 < -60.0f)) {
return 0;
}
if (temp_f0 > 60.0f) {
return 0;
}
arg0 = arg0;
temp_f0_2 = sqrtf((temp_f2 * temp_f2) + (temp_f0 * temp_f0), 60.0f);
temp_f2_2 = temp_f0_2;
temp_a0 = arg0;
if (temp_f0_2 > 60.0f) {
return 0;
}
arg0 = arg0;
sp1C = temp_f2_2;
func_802977B0(temp_a0);
temp_a3 = arg0;
if ((temp_a3->posY - arg1->posZ) < 0.0f) {
return 0;
}
if ((temp_a3->boundingBoxSize + (bitwise f32) arg1->unk_00C) < temp_f2_2) {
return 0;
}
if ((temp_a3->unk_000 & 0x4000) != 0) {
if ((temp_a3->unk_0BC & 0x200) != 0) {
arg1->unk_002 = (s16) arg1->unk_002 | 0x400;
arg1->rotZ = 8.0f;
arg0 = temp_a3;
func_800C98B8(&temp_a3->posX, &temp_a3->unk_034, 0x19018010, temp_a3);
func_800C90F4(((s32) (arg0 - gPlayerOne) / 3544) & 0xFF, (arg0->characterId * 0x10) + 0x2900800D);
} else {
arg0 = temp_a3;
func_8008DABC(temp_a3, (s8) ((s32) (temp_a3 - gPlayerOne) / 3544));
if ((gModeSelection == 1) && ((arg0->unk_000 & 0x1000) == 0)) {
D_80162DF8 = 1;
}
}
} else {
func_8008DABC(temp_a3, (s8) ((s32) (temp_a3 - gPlayerOne) / 3544));
}
return 1;
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029F408.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_80077AB0(f32 *, ?); // extern
? func_800C9060(s32, ?); // extern
? func_800C90F4(s32, s32); // extern
? func_800C98B8(void *, void *, ?, void *); // extern
? func_802977B0(void *); // extern
extern f32 D_802B98A0;
extern f32 D_802B98A4;
extern f32 D_802B98A8;
? func_8029F69C(void *arg0, void *arg1) {
f32 sp54;
f32 sp4C;
f32 sp48;
f32 sp44;
f32 sp40;
f32 sp3C;
f32 sp28;
f32 sp24;
f32 sp20;
f32 temp_f0;
f32 temp_f0_2;
f32 temp_f0_3;
f32 temp_f0_4;
f32 temp_f0_5;
f32 temp_f10;
f32 temp_f12;
f32 temp_f14;
f32 temp_f14_2;
f32 temp_f16;
f32 temp_f16_2;
f32 temp_f18;
f32 temp_f18_2;
f32 temp_f2;
f32 temp_f4;
f32 temp_f4_2;
f32 temp_f4_3;
f32 temp_f6;
f32 temp_f6_2;
s16 temp_v0_3;
s32 temp_cond;
s32 temp_v0_2;
u16 temp_v0;
void *temp_a0;
void *temp_a0_2;
void *temp_a1;
void *temp_a3;
void *phi_a3;
void *phi_a3_2;
temp_f6 = arg0->unk14;
temp_f4 = arg1->pos;
temp_f18 = temp_f4 - temp_f6;
temp_f16 = arg1->unk_08;
if ((temp_f18 < 0.0f) && (temp_f18 < -temp_f16)) {
return 0;
}
if (temp_f16 < temp_f18) {
return 0;
}
temp_f10 = arg1->unk20;
temp_f4_2 = arg0->unk1C;
temp_f14 = temp_f10 - temp_f4_2;
if ((temp_f14 < 0.0f) && (temp_f14 < -temp_f16)) {
return 0;
}
if (temp_f16 < temp_f14) {
return 0;
}
temp_f0 = arg0->pos - arg1->unk1C;
if (temp_f0 < 0.0f) {
return 0;
}
if (arg1->unk6 < temp_f0) {
return 0;
}
arg0 = arg0;
sp4C = temp_f14;
sp40 = temp_f16;
sp54 = temp_f18;
temp_f0_2 = sqrtf((temp_f18 * temp_f18) + (temp_f14 * temp_f14));
temp_cond = temp_f16 < temp_f0_2;
sp3C = temp_f0_2;
temp_a0 = arg0;
if (temp_cond) {
return 0;
}
arg0 = arg0;
sp4C = temp_f14;
sp54 = temp_f18;
func_802977B0(temp_a0);
temp_a3 = arg0;
temp_f6_2 = arg1->unkC;
temp_f4_3 = temp_a3->unk70;
temp_f16_2 = temp_f4_3 + temp_f6_2;
phi_a3 = temp_a3;
if (temp_f16_2 < sp3C) {
return 0;
}
sp48 = temp_a3->unk34;
sp44 = temp_a3->unk3C;
temp_v0 = temp_a3->unk0;
if ((temp_v0 & 0x4000) != 0) {
temp_a0_2 = temp_a3 + 0x14;
temp_a1 = temp_a3 + 0x34;
if ((temp_a3->unkBC & 0x200) != 0) {
arg1->unk2 = arg1->unk2 | 0x400;
arg0 = temp_a3;
func_800C98B8(temp_a0_2, temp_a1, 0x19018010, temp_a3);
func_800C90F4(((arg0 - gPlayerOne) / 0xDD8) & 0xFF, (arg0->unk254 * 0x10) + 0x2900800D);
goto block_36;
}
if ((temp_v0 & 0x100) == 0) {
arg0 = temp_a3;
sp4C = temp_f14;
sp40 = temp_f16_2;
sp54 = temp_f18;
func_800C9060(((temp_a3 - gPlayerOne) / 0xDD8) & 0xFF, 0x19007018);
phi_a3 = arg0;
}
goto block_23;
}
block_23:
temp_v0_2 = phi_a3->unkBC;
phi_a3_2 = phi_a3;
if ((temp_v0_2 & 0x200) == 0) {
phi_a3->unkBC = temp_v0_2 | 0x8000;
}
temp_v0_3 = gCurrentCourseId;
sp20 = arg1->pos;
sp24 = arg1->unk1C;
sp28 = arg1->unk20;
if (((temp_v0_3 == 0) || (temp_v0_3 == 4) || (temp_v0_3 == 7) || (temp_v0_3 == 8)) && (phi_a3->unk94 > 1.0f)) {
arg0 = phi_a3;
sp4C = temp_f10 - temp_f4_2;
sp40 = temp_f4_3 + temp_f6_2;
sp54 = temp_f4 - temp_f6;
func_80077AB0(&sp20, 0);
phi_a3_2 = arg0;
}
if (sp3C < D_802B98A0) {
arg0 = phi_a3_2;
sp4C = temp_f10 - temp_f4_2;
sp40 = temp_f4_3 + temp_f6_2;
sp54 = temp_f4 - temp_f6;
sqrtf((sp48 * sp48) + (sp44 * sp44));
temp_f0_3 = D_802B98A4;
arg0->unk34 = 0.0f;
arg0->unk3C = 0.0f;
arg0->unk14 = sp20 - ((temp_f4 - temp_f6) * (temp_f4_3 + temp_f6_2) * temp_f0_3);
arg0->unk1C = sp28 - ((temp_f10 - temp_f4_2) * (temp_f4_3 + temp_f6_2) * temp_f0_3);
goto block_36;
}
arg0 = phi_a3_2;
sp4C = temp_f10 - temp_f4_2;
sp40 = temp_f4_3 + temp_f6_2;
sp54 = temp_f4 - temp_f6;
temp_f0_4 = sqrtf((sp48 * sp48) + (sp44 * sp44));
temp_f14_2 = (temp_f10 - temp_f4_2) / sp3C;
temp_f18_2 = (temp_f4 - temp_f6) / sp3C;
if (temp_f0_4 < 0.25f) {
temp_f0_5 = D_802B98A8;
arg0->unk14 = sp20 - (temp_f18_2 * (temp_f4_3 + temp_f6_2) * temp_f0_5);
arg0->unk34 = 0.0f;
arg0->unk3C = 0.0f;
arg0->unk1C = sp28 - (temp_f14_2 * (temp_f4_3 + temp_f6_2) * temp_f0_5);
return 1;
}
temp_f12 = temp_f0_4 * (((temp_f18_2 * sp48) + (temp_f14_2 * sp44)) / temp_f0_4) * 1.5f;
arg0->unk34 = arg0->unk34 - (temp_f18_2 * temp_f12);
arg0->unk3C = arg0->unk3C - (temp_f14_2 * temp_f12);
temp_f2 = sp3C - (temp_f4_3 + temp_f6_2);
arg0->unk14 = arg0->unk14 + (temp_f18_2 * temp_f2 * 0.5f);
arg0->unk1C = arg0->unk1C + (temp_f14_2 * temp_f2 * 0.5f);
block_36:
return 1;
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029F69C.s")
#endif
extern f32 D_802B98AC;
s32 func_8029FB80(Player *arg0, struct Actor *arg1) {
f32 temp_f0;
f32 temp_f12_2;
f32 temp_f14;
f32 temp_f16;
f32 temp_f2;
temp_f0 = arg0->boundingBoxSize + arg1->boundingBoxSize;
temp_f2 = arg1->pos[0] - arg0->pos[0];
if (temp_f0 < temp_f2) {
return 0;
}
if (temp_f2 < -temp_f0) {
return 0;
}
temp_f14 = arg1->pos[1] - arg0->pos[1];
if (temp_f0 < temp_f14) {
return 0;
}
if (temp_f14 < -temp_f0) {
return 0;
}
temp_f16 = arg1->pos[2] - arg0->pos[2];
if (temp_f0 < temp_f16) {
return 0;
}
if (temp_f16 < -temp_f0) {
return 0;
}
temp_f12_2 = (temp_f2 * temp_f2) + (temp_f14 * temp_f14) + (temp_f16 * temp_f16);
if (temp_f12_2 < D_802B98AC) {
return 0;
}
if ((temp_f0 * temp_f0) < temp_f12_2) {
return 0;
}
return 1;
}
extern f32 D_802B98B0;
s32 func_8029FCA4(struct Actor *arg0, struct Actor *arg1) {
f32 temp_f0;
f32 temp_f12_2;
f32 temp_f14;
f32 temp_f16;
f32 temp_f2;
temp_f0 = arg0->boundingBoxSize + arg1->boundingBoxSize;
temp_f2 = arg0->pos[0] - arg1->pos[0];
if (temp_f0 < temp_f2) {
return 0;
}
if (temp_f2 < -temp_f0) {
return 0;
}
temp_f14 = arg0->pos[1] - arg1->pos[1];
if (temp_f0 < temp_f14) {
return 0;
}
if (temp_f14 < -temp_f0) {
return 0;
}
temp_f16 = arg0->pos[2] - arg1->pos[2];
if (temp_f0 < temp_f16) {
return 0;
}
if (temp_f16 < -temp_f0) {
return 0;
}
temp_f12_2 = (temp_f2 * temp_f2) + (temp_f14 * temp_f14) + (temp_f16 * temp_f16);
if (temp_f12_2 < D_802B98B0) {
return 0;
}
if ((temp_f0 * temp_f0) < temp_f12_2) {
return 0;
}
return 1;
}
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_8000EE58(s32); /* extern */
? func_800C9EF4(f32 *, ?, struct Actor *, s16); /* extern */
? func_802B02B4(struct Actor *, ?, struct Actor *, s16); /* extern */
? func_802B0570(struct Actor *); /* extern */
void func_8029FDC8(struct Actor *actor) {
Player *temp_v0_2;
Player *temp_v0_3;
f32 *temp_a0;
s16 temp_v0;
s16 temp_v1;
s16 temp_v1_2;
s16 temp_v1_3;
struct Actor *temp_a2;
u16 temp_t6;
struct Actor *phi_a2;
struct Actor *phi_a2_2;
struct Actor *phi_a2_3;
temp_v0 = actor->type;
temp_a2 = actor;
phi_a2 = temp_a2;
phi_a2_2 = temp_a2;
phi_a2_3 = temp_a2;
switch (temp_v0) { /* switch 4; irregular */
case ACTOR_BANANA: /* switch 4 */
temp_t6 = (u16) temp_a2->state;
switch (temp_t6) { /* switch 1 */
case 2: /* switch 1 */
case 3: /* switch 1 */
func_802B0570(temp_a2);
return;
case 0: /* switch 1 */
temp_v0_2 = &gPlayers[temp_a2->rot[0]];
temp_v0_2->unk_00C &= 0xFFFBFFFF;
/* fallthrough */
case 4: /* switch 1 */
temp_a2->flags = -0x8000;
temp_a2->unk_04 = 0x003C;
temp_a2->state = 5;
temp_a2->velocity[1] = 3.0f;
return;
default: /* switch 1 */
case 5: /* switch 5 */
default: /* switch 2 */
default: /* switch 3 */
return;
}
break;
case ACTOR_GREEN_SHELL: /* switch 4 */
temp_v1 = temp_a2->state;
switch (temp_v1) { /* switch 5; irregular */
case 2: /* switch 5 */
actor = temp_a2;
func_8000EE58((s32) (temp_a2 - D_8015F9B8) / 112);
phi_a2_3 = actor;
/* fallthrough */
case 0: /* switch 5 */
case 1: /* switch 5 */
phi_a2_3->flags = -0x8000;
phi_a2_3->rot[1] = 0;
phi_a2_3->unk_04 = 0x003C;
phi_a2_3->state = 5;
phi_a2_3->velocity[1] = 3.0f;
return;
case 4: /* switch 5 */
func_802B02B4(temp_a2, 7, temp_a2, 7);
return;
}
break;
case ACTOR_BLUE_SPINY_SHELL: /* switch 4 */
temp_v1_2 = temp_a2->state;
if (temp_v1_2 != 7) {
switch (temp_v1_2) { /* switch 2 */
case 2: /* switch 2 */
case 3: /* switch 2 */
case 4: /* switch 2 */
case 5: /* switch 2 */
case 8: /* switch 2 */
case 9: /* switch 2 */
temp_a0 = temp_a2->pos;
actor = temp_a2;
func_800C9EF4(temp_a0, 0x51018008, temp_a2, 7);
func_8000EE58((s32) (actor - D_8015F9B8) / 112);
phi_a2 = actor;
/* fallthrough */
case 0: /* switch 2 */
case 1: /* switch 2 */
phi_a2->flags = -0x8000;
phi_a2->rot[1] = 0;
phi_a2->unk_04 = 0x003C;
phi_a2->state = 7;
phi_a2->velocity[1] = 3.0f;
return;
}
}
break;
case ACTOR_RED_SHELL: /* switch 4 */
temp_v1_3 = temp_a2->state;
if (temp_v1_3 != 7) {
switch (temp_v1_3) { /* switch 3 */
case 2: /* switch 3 */
case 3: /* switch 3 */
case 4: /* switch 3 */
case 5: /* switch 3 */
case 8: /* switch 3 */
case 9: /* switch 3 */
actor = temp_a2;
func_8000EE58((s32) (temp_a2 - D_8015F9B8) / 112);
phi_a2_2 = actor;
/* fallthrough */
case 0: /* switch 3 */
case 1: /* switch 3 */
phi_a2_2->flags = -0x8000;
phi_a2_2->rot[1] = 0;
phi_a2_2->unk_04 = 0x003C;
phi_a2_2->state = 7;
phi_a2_2->velocity[1] = 3.0f;
return;
case 6: /* switch 3 */
func_802B02B4(temp_a2, 8, temp_a2, 7);
return;
}
}
break;
case ACTOR_FAKE_ITEM_BOX: /* switch 4 */
temp_v0_3 = &gPlayers[(s16) (s32) temp_a2->velocity[0]];
if (temp_a2->state == 0) {
temp_v0_3->unk_00C &= 0xFFFBFFFF;
}
temp_a2->state = 2;
temp_a2->flags = -0x8000;
temp_a2->unk_04 = 0;
break;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029FDC8.s")
#endif
void func_802A00E8(struct Actor *arg0, struct Actor *arg1) {
switch(arg0->type) {
case ACTOR_GREEN_SHELL:
if ((arg0->state == 0) || (arg0->state == 4)) {
arg0->flags |= 0x200;
func_800C98B8(arg0->pos, arg0->velocity, 0x19019053);
return;
}
break;
case ACTOR_RED_SHELL:
if ((arg0->state == 0) || (arg0->state == 6)) {
arg0->flags |= 0x200;
func_800C98B8(arg0->pos, arg0->velocity, 0x19019053);
return;
}
break;
case ACTOR_BLUE_SPINY_SHELL:
if (arg0->state == 0) {
arg0->flags |= 0x200;
func_800C98B8(arg0->pos, arg0->velocity, 0x19019053);
return;
}
break;
case ACTOR_FAKE_ITEM_BOX:
if (arg0->state == 0) {
arg0->flags |= 0x200;
func_800C98B8(arg0->pos, arg0->velocity, 0x19019053);
return;
}
break;
}
switch(arg1->type) {
case ACTOR_GREEN_SHELL:
if ((arg1->state == 0) || (arg1->state == 4)) {
arg1->flags |= 0x200;
func_800C98B8(arg1->pos, arg1->velocity, 0x19019053);
return;
}
break;
case ACTOR_RED_SHELL:
if ((arg1->state == 0) || (arg1->state == 6)) {
arg1->flags |= 0x200;
func_800C98B8(arg1->pos, arg1->velocity, 0x19019053);
return;
}
break;
case ACTOR_BLUE_SPINY_SHELL:
if (arg1->state == 0) {
arg1->flags |= 0x200;
func_800C98B8(arg1->pos, arg1->velocity, 0x19019053);
return;
}
break;
case ACTOR_FAKE_ITEM_BOX:
if (arg1->state == 0) {
arg1->flags |= 0x200;
func_800C98B8(arg1->pos, arg1->velocity, 0x19019053);
return;
}
break;
}
arg0->flags |= 0x100;
func_800C98B8(arg0->pos, arg0->velocity, 0x19018010);
}
s32 func_8029FCA4(struct Actor*, struct Actor*); // extern
void func_8029FDC8(struct Actor*);
void func_802A0350(struct Actor *arg0, struct Actor *arg1) {
if (func_8029FCA4(arg0, arg1) == 1) {
if ((arg0->type == ACTOR_BLUE_SPINY_SHELL) && (arg1->type == ACTOR_BLUE_SPINY_SHELL)) {
func_8029FDC8(arg0);
func_8029FDC8(arg1);
arg0->flags |= 256;
func_800C98B8(arg0->pos, arg0->velocity, 0x19018010);
return;
}
if (arg0->type == ACTOR_BLUE_SPINY_SHELL) {
if (arg0->state == 0) {
func_8029FDC8(arg0);
}
} else {
func_8029FDC8(arg0);
}
if (arg1->type == ACTOR_BLUE_SPINY_SHELL) {
if (arg1->state == 0) {
func_8029FDC8(arg1);
}
} else {
func_8029FDC8(arg1);
}
func_802A00E8(arg0, arg1);
}
}
//#else
//GLOBAL_ASM("asm/non_matchings/code_actors/func_802A0350.s")
//#endif
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_8007ABFC(s32, ?); /* extern */
? func_800C90F4(s32, s32); /* extern */
? func_800C98B8(f32 *, f32 *, ?, Player *); /* extern */
? func_8029F1F8(Player *, struct Actor *); /* extern */
? func_8029F2FC(Player *, struct Actor *); /* extern */
? func_8029F408(Player *, struct Actor *); /* extern */
? func_8029F69C(Player *, struct Actor *); /* extern */
s16 func_8029FB80(Player *, struct Actor *); /* extern */
? func_8029FDC8(struct Actor *); /* extern */
extern s32 D_80162DF8;
static f32 D_802B99C4 = 360000.0f;
static f32 D_802B99C8 = 360000.0f;
void func_802A0450(Player *player, struct Actor *actor) {
s16 sp42;
s16 sp36;
Player *sp24;
Player *temp_a0;
Player *temp_a0_2;
Player *temp_a0_3;
Player *temp_a0_4;
Player *temp_a0_5;
Player *temp_a0_6;
Player *temp_a0_7;
Player *temp_a0_8;
Player *temp_a3;
Player *temp_v0;
Player *temp_v0_2;
Player *temp_v0_3;
Player *temp_v0_4;
Player *temp_v0_5;
f32 temp_f0;
f32 temp_f0_2;
f32 temp_f2;
f32 temp_f2_2;
s16 temp_t0;
s16 temp_t2;
s16 temp_v1;
s16 temp_v1_2;
s16 temp_v1_3;
s16 temp_v1_4;
s32 temp_f16;
Player *phi_v0;
temp_t2 = actor->type;
temp_t0 = (s16) ((s32) (player - gPlayerOne) / 3544);
switch (temp_t2) {
case ACTOR_YOSHI_VALLEY_EGG:
if (((player->unk_0BC << 0) >= 0) && ((player->unk_000 & 0x100) == 0)) {
func_8029F408(player, actor);
return;
}
default:
return;
case ACTOR_BANANA:
if (((player->unk_0BC & 0x800008C0) == 0) && ((player->unk_00C & 1) == 0) && ((temp_v1 = actor->rot[0], temp_a0 = player, (temp_t0 != temp_v1)) || ((actor->flags & 0x1000) == 0))) {
sp36 = temp_v1;
player = player;
sp42 = temp_t0;
if (func_8029FB80(temp_a0, actor) == 1) {
player->unk_00C |= 1;
temp_v0 = &gPlayers[temp_v1];
if ((temp_v0->unk_000 & 0x4000) != 0) {
if ((actor->flags & 0xF) != 0) {
if (temp_t0 != temp_v1) {
func_800C90F4(temp_v1 & 0xFF, (temp_v0->characterId * 0x10) + 0x29008006);
}
} else {
temp_f0 = actor->pos[0] - temp_v0->pos[0];
temp_f2 = actor->pos[2] - temp_v0->pos[2];
if ((((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) < D_802B99C4) && (temp_t0 != temp_v1)) {
func_800C90F4(temp_v1 & 0xFF, (temp_v0->characterId * 0x10) + 0x29008006);
}
}
}
func_8029FDC8(actor);
return;
}
}
break;
case ACTOR_GREEN_SHELL:
if (((player->unk_0BC & 0x80000400) == 0) && ((player->unk_00C & 4) == 0) && ((temp_v1_2 = actor->rot[2], temp_a0_2 = player, (temp_t0 != temp_v1_2)) || ((actor->flags & 0x1000) == 0))) {
sp36 = temp_v1_2;
player = player;
sp42 = temp_t0;
if (func_8029FB80(temp_a0_2, actor) == 1) {
player->unk_00C |= 4;
sp42 = temp_t0;
sp36 = temp_v1_2;
func_800C98B8(player->pos, &player->unk_034, 0x19018010, player);
temp_v0_2 = &gPlayers[temp_v1_2];
if (((temp_v0_2->unk_000 & 0x4000) != 0) && (temp_t0 != temp_v1_2)) {
func_800C90F4(temp_v1_2 & 0xFF, (temp_v0_2->characterId * 0x10) + 0x29008006);
}
func_8029FDC8(actor);
return;
}
}
break;
case ACTOR_BLUE_SPINY_SHELL:
if (((player->unk_00C & 2) == 0) && ((temp_v1_3 = actor->rot[2], temp_a0_3 = player, (temp_t0 != temp_v1_3)) || ((actor->flags & 0x1000) == 0)) && (sp36 = temp_v1_3, player = player, sp42 = temp_t0, (func_8029FB80(temp_a0_3, actor) == 1))) {
if ((player->unk_0BC << 0) >= 0) {
player->unk_00C |= 2;
sp42 = temp_t0;
sp36 = temp_v1_3;
func_800C98B8(player->pos, &player->unk_034, 0x19018010, player);
}
temp_v0_3 = &gPlayers[actor->rot[2]];
if (((temp_v0_3->unk_000 & 0x4000) != 0) && (temp_t0 != actor->rot[2])) {
sp42 = temp_t0;
func_800C90F4(actor->rot[2] & 0xFF, (temp_v0_3->characterId * 0x10) + 0x29008006);
}
if (temp_t0 == actor->unk_04) {
func_8029FDC8(actor);
return;
}
}
break;
case ACTOR_RED_SHELL:
if (((player->unk_0BC << 7) >= 0) && ((player->unk_00C & 2) == 0) && ((temp_v1_4 = actor->rot[2], temp_a0_4 = player, (temp_t0 != temp_v1_4)) || ((actor->flags & 0x1000) == 0))) {
sp36 = temp_v1_4;
player = player;
sp42 = temp_t0;
if (func_8029FB80(temp_a0_4, actor) == 1) {
if ((player->unk_0BC << 0) >= 0) {
player->unk_00C |= 2;
sp42 = temp_t0;
sp36 = temp_v1_4;
func_800C98B8(player->pos, &player->unk_034, 0x19018010, player);
}
temp_v0_4 = &gPlayers[actor->rot[2]];
if (((temp_v0_4->unk_000 & 0x4000) != 0) && (temp_t0 != actor->rot[2])) {
func_800C90F4(actor->rot[2] & 0xFF, (temp_v0_4->characterId * 0x10) + 0x29008006);
}
func_8029FDC8(actor);
return;
}
}
break;
case ACTOR_PIRANHA_PLANT:
if ((player->unk_0BC << 0) >= 0) {
func_8029F2FC(player, actor);
return;
}
break;
case ACTOR_MARIO_RACEWAY_SIGN:
if ((player->unk_0BC << 0) >= 0) {
func_8029F1F8(player, actor);
return;
}
break;
case 2:
case 3:
case 4:
case 19:
case 25:
case 26:
case 28:
case 29:
case 30:
case 31:
case 32:
case 33:
if ((player->unk_0BC << 0) >= 0) {
func_8029F69C(player, actor);
return;
}
break;
case ACTOR_FALLING_ROCK:
if ((player->unk_0BC << 0) >= 0) {
temp_a0_5 = player;
if ((player->unk_000 & 0x100) == 0) {
player = player;
temp_a3 = player;
if (func_8029FB80(temp_a0_5, actor) == 1) {
player = temp_a3;
func_800C98B8(actor->pos, actor->velocity, 0x19009005, temp_a3);
if ((gModeSelection == 1) && ((player->unk_000 & 0x1000) == 0)) {
D_80162DF8 = 1;
}
if ((player->unk_0BC & 0x200) != 0) {
actor->velocity[1] = 10.0f;
return;
}
func_8008DABC(player, (s8) ((s32) (player - gPlayerOne) / 3544));
return;
}
}
}
break;
case ACTOR_FAKE_ITEM_BOX:
if (((player->unk_0BC << 0) >= 0) && ((temp_a0_6 = player, temp_f16 = (s32) actor->velocity[0], (temp_t0 != (s16) temp_f16)) || ((actor->flags & 0x1000) == 0))) {
sp36 = (s16) temp_f16;
player = player;
sp42 = temp_t0;
if (func_8029FB80(temp_a0_6, actor) == 1) {
player->unk_00C |= 0x400000;
temp_v0_5 = &gPlayers[(s16) temp_f16];
phi_v0 = temp_v0_5;
if ((temp_v0_5->unk_000 & 0x4000) != 0) {
if ((actor->flags & 0xF) != 0) {
if (temp_t0 != (s16) temp_f16) {
sp24 = temp_v0_5;
func_800C90F4((s16) temp_f16 & 0xFF, (temp_v0_5->characterId * 0x10) + 0x29008006);
phi_v0 = sp24;
}
} else {
temp_f0_2 = actor->pos[0] - temp_v0_5->pos[0];
temp_f2_2 = actor->pos[2] - temp_v0_5->pos[2];
if ((((temp_f0_2 * temp_f0_2) + (temp_f2_2 * temp_f2_2)) < D_802B99C8) && (temp_t0 != (s16) temp_f16)) {
sp24 = temp_v0_5;
func_800C90F4((s16) temp_f16 & 0xFF, (temp_v0_5->characterId * 0x10) + 0x29008006);
phi_v0 = sp24;
}
}
if (actor->state == 0) {
phi_v0->unk_00C &= 0xFFFBFFFF;
}
}
actor->state = 2;
actor->flags = -0x8000;
actor->unk_04 = 0;
return;
}
}
break;
case ACTOR_HOT_AIR_BALLOON_ITEM_BOX:
temp_a0_7 = player;
player = player;
if (func_8029FB80(temp_a0_7, actor) == 1) {
actor->state = 3;
actor->flags = -0x8000;
actor->unk_04 = 0;
if ((player->unk_000 & 0x4000) != 0) {
func_8007ABFC((s32) (player - gPlayerOne) / 3544, 7);
return;
}
} else if (actor->state == 0) {
actor->state = 1;
actor->flags = -0x8000;
}
break;
case ACTOR_ITEM_BOX:
temp_a0_8 = player;
player = player;
if (func_8029FB80(temp_a0_8, actor) == 1) {
actor->state = 3;
actor->flags = -0x8000;
actor->unk_04 = 0;
if ((player->unk_000 & 0x4000) != 0) {
func_8007ABFC((s32) (player - gPlayerOne) / 3544, 0);
return;
}
} else if (actor->state == 0) {
actor->state = 1;
actor->flags = -0x8000;
}
break;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_802A0450.s")
#endif
extern Player gPlayers[];
void func_802A0D54(void) {
struct Actor *temp_a1;
s32 i, j;
Player *phi_s1;
for (i = 0; i < 8; i++) {
phi_s1 = &gPlayers[i];
if (((phi_s1->unk_000 & 0x8000) != 0) && ((phi_s1->unk_0BC & 0x4000000) == 0)) {
func_802977E4(phi_s1);
for (j = 0; j < 100; j++) {
temp_a1 = &D_8015F9B8[j];
if ((phi_s1->unk_0BC & 0x4000000) == 0) {
// temp_v0 = temp_a1->unk2;
if (((temp_a1->flags & 0x8000) != 0) && ((temp_a1->flags & 0x4000) != 0)) {
func_802A0450(phi_s1, temp_a1);
}
}
}
}
}
}
extern u16 D_8015F900;
void func_802A0350(struct Actor*, struct Actor*);
void func_802A0E44(void) {
struct Actor *phi_s0;
struct Actor *temp_a1;
s32 i, j;
s32 pad;
for (i = D_8015F900; i < 99; i++) {
phi_s0 = &D_8015F9B8[i];
if ((phi_s0->flags & 0x8000) == 0) { continue; }
if ((phi_s0->flags & 0x4000) == 0) { continue; }
switch(phi_s0->type) {
case 6:
case 7:
case 8:
case 42:
case 13:
for (j = i + 1; j < 100; j++) {
temp_a1 = &D_8015F9B8[j];
if ((phi_s0->flags & 0x8000) == 0) {continue;}
if ((phi_s0->flags & 0x4000) == 0) {continue;}
if ((temp_a1->flags & 0x8000) == 0) { continue; }
if ((temp_a1->flags & 0x4000) == 0) { continue; }
switch(temp_a1->type) {
case ACTOR_BANANA:
if (phi_s0->type == 6) { continue; }
func_802A0350(phi_s0, temp_a1);
break;
case ACTOR_GREEN_SHELL:
if (phi_s0->type == 7) {
if (phi_s0->rot[2] == temp_a1->rot[2]) { continue; }
}
func_802A0350(phi_s0, temp_a1);
break;
case ACTOR_RED_SHELL:
if (phi_s0->type == 8) {
if (phi_s0->rot[2] == temp_a1->rot[2]) { continue; }
}
func_802A0350(phi_s0, temp_a1);
break;
case ACTOR_BLUE_SPINY_SHELL:
case ACTOR_FAKE_ITEM_BOX:
func_802A0350(phi_s0, temp_a1);
break;
}
}
break;
}
}
}
f32 func_802ABEAC(UnkActorInner*, Vec3f);
extern f32 D_802B99CC;
void func_802A1064(struct FakeItemBox *fake_item_box) {
if (fake_item_box - (struct FakeItemBox*)D_8015F9B8 > 100u) { return; }
if ((fake_item_box->flags & 0x8000) == 0) { return; }
if (fake_item_box->type == ACTOR_FAKE_ITEM_BOX) {
fake_item_box->state = 1;
fake_item_box->targetY = func_802ABEAC(&fake_item_box->unk30, fake_item_box->pos) + D_802B99CC;
fake_item_box->someTimer = 100;
}
}
extern f32 D_802B99D0;
extern f32 D_802B99D4;
void func_802ADDC8(UnkActorInner*, f32, f32, f32, f32);
void func_802B4E30(struct Actor*);
void update_obj_fake_item_box(struct FakeItemBox *fake_item_box) {
u32 temp_v1 = fake_item_box->playerId;
Player *temp_v0_4 = &gPlayers[temp_v1];
struct Controller *temp_v1_3;
s32 pad[7];
f32 temp_f2_2;
f32 temp_f14;
f32 temp_f16;
f32 temp_f18;
s32 pad2[3];
switch(fake_item_box->state) {
case 0:
fake_item_box->boundingBoxSize = fake_item_box->sizeScaling * 5.5f;
fake_item_box->rot[0] -= 0xB6;
fake_item_box->rot[1] += 0x16C;
fake_item_box->rot[2] -= 0xB6;
temp_f14 = temp_v0_4->pos[0] - fake_item_box->pos[0];
temp_f16 = temp_v0_4->pos[1] - fake_item_box->pos[1];
temp_f18 = temp_v0_4->pos[2] - fake_item_box->pos[2];
temp_f2_2 = sqrtf((temp_f14 * temp_f14) + (temp_f16 * temp_f16) + (temp_f18 * temp_f18)) / 10.0f;
temp_f14 /= temp_f2_2;
temp_f16 /= temp_f2_2;
temp_f18 /= temp_f2_2;
fake_item_box->pos[0] = temp_v0_4->pos[0] - temp_f14;
fake_item_box->pos[1] = (temp_v0_4->pos[1] - temp_f16) - 1.0f;
fake_item_box->pos[2] = temp_v0_4->pos[2] - temp_f18;
func_802ADDC8(&fake_item_box->unk30, fake_item_box->boundingBoxSize, fake_item_box->pos[0], fake_item_box->pos[1], fake_item_box->pos[2]);
func_802B4E30(fake_item_box);
temp_v1_3 = &gControllers[temp_v1];
if ((temp_v0_4->unk_000 & 0x4000) != 0) {
if ((temp_v1_3->buttonDepressed & Z_TRIG) != 0) {
temp_v1_3->buttonDepressed &= 0xDFFF;
func_802A1064(fake_item_box);
temp_v0_4->unk_00C &= 0xFFFBFFFF;
func_800C9060((u8)(temp_v0_4 - gPlayerOne), 0x19008012);
}
}
break;
case 1:
if (fake_item_box->sizeScaling < 1.0f) {
fake_item_box->sizeScaling += D_802B99D0;
} else if (fake_item_box->sizeScaling >= 1.0f) {
fake_item_box->sizeScaling = 1.0f;
}
fake_item_box->boundingBoxSize = fake_item_box->sizeScaling * 5.5f;
if (fake_item_box->targetY <= fake_item_box->pos[1]) {
fake_item_box->pos[1] = fake_item_box->targetY;
} else {
fake_item_box->pos[1] += D_802B99D4;
}
if ((fake_item_box->flags & 0x1000) != 0) {
if ((fake_item_box->someTimer <= 0) || (fake_item_box->someTimer >= 0x12D)) {
fake_item_box->flags &= 0xEFFF;
fake_item_box->someTimer = 0;
} else {
fake_item_box->someTimer--;
}
}
fake_item_box->rot[0] -= 0xB6;
fake_item_box->rot[1] += 0x16C;
fake_item_box->rot[2] -= 0xB6;
break;
case 2:
if ((fake_item_box->someTimer >= 0x14) || (fake_item_box->someTimer < 0)) {
func_8029E854(fake_item_box);
} else {
fake_item_box->someTimer++;
fake_item_box->rot[0] += 0x444;
fake_item_box->rot[1] -= 0x2D8;
fake_item_box->rot[2] += 0x16C;
}
break;
default:
func_8029E854(fake_item_box);
break;
}
}
void func_802A14BC(f32 arg0, f32 arg1, f32 arg2) {
Vec3f sp34;
Vec3f sp28;
Vec3s sp20;
s16 temp_a0;
if (gModeSelection != TIME_TRIALS) {
func_802B52BC(sp20, 0, 0, 0);
load_giant_egg(sp28, 0, 0, 0);
sp34[0] = arg0;
sp34[1] = arg1;
sp34[2] = arg2;
temp_a0 = func_8029EC88(sp34, sp20, sp28, 43);
D_802BA05C = &D_8015F9B8[temp_a0];
}
}
void update_obj_item_box_hot_air_balloon(struct ItemBox *itemBox) {
switch(itemBox->state) {
case 5:
itemBox->rot[0] += 0xB6;
itemBox->rot[1] -= 0x16C;
itemBox->rot[2] += 0xB6;
break;
case 3:
if (itemBox->someTimer == 0x14) {
itemBox->state = 5;
itemBox->flags = -0x4000;
} else {
itemBox->someTimer++;
itemBox->rot[0] += 0x444;
itemBox->rot[1] -= 0x2D8;
itemBox->rot[2] += 0x16C;
}
break;
}
}
extern f32 D_802B99D8;
extern f32 D_802B99DC;
void update_obj_item_box(struct ItemBox *itemBox) {
switch (itemBox->state) {
case 0:
itemBox->state = 1;
break;
case 1:
if ((itemBox->pos[1] - itemBox->origY) < D_802B99D8) {
itemBox->pos[1] += D_802B99DC;
} else {
itemBox->pos[1] = itemBox->origY + D_802B99D8;
itemBox->state = 2;
itemBox->flags = 0xC000;
}
break;
case 2:
itemBox->rot[0] += 0xB6;
itemBox->rot[1] -= 0x16C;
itemBox->rot[2] += 0xB6;
break;
case 3:
if (itemBox->someTimer == 20) {
itemBox->state = 0;
itemBox->pos[1] = itemBox->resetDistance - 20.0f;
itemBox->flags = 0xC000;
} else {
itemBox->someTimer++;
itemBox->rot[0] += 0x444;
itemBox->rot[1] -= 0x2D8;
itemBox->rot[2] += 0x16C;
}
break;
}
}
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_80297230(Camera *, struct Actor *); /* extern */
? func_802972B8(Camera *, struct Actor *); /* extern */
s32 func_802B4FF8(f32 *, ?); /* extern */
? func_802B5F74(f32 (*)[4], f32 *, s16 *); /* extern */
f32 func_802B80D0(f32 *, u16, ?, f32, f32); /* extern */
extern ? D_0D002F80;
extern ? D_0D003090;
extern ? D_0D0030F8;
extern ? D_0D003128;
extern ? D_0D003158;
extern ? D_0D003188;
extern ? D_0D0031B8;
extern ? D_0D0031E8;
extern ? D_80150130;
extern s16 D_8015F6EC;
extern s16 D_8015F6EE;
static f32 D_802B99E0 = 1000000.0f;
static f32 D_802B99E4 = 0.1f;
static f32 D_802B99E8 = 0.8f;
static f32 D_802B99EC = 2.3f;
static f32 D_802B99F0 = 1.2f;
static f32 D_802B99F4 = 1.8f;
static f32 D_802B99F8 = -0.8f;
static f32 D_802B99FC = 0.6f;
void func_802A171C(Camera *camera, struct Actor *actor) {
s16 sp184;
s16 sp182;
s16 sp180;
f32 sp170;
f32 sp16C;
f32 sp168;
f32 spA4;
f32 *sp38; /* compiler-managed */
f32 sp34;
f32 sp30;
f32 sp2C;
Gfx *temp_v0;
Gfx *temp_v0_10;
Gfx *temp_v0_11;
Gfx *temp_v0_12;
Gfx *temp_v0_13;
Gfx *temp_v0_14;
Gfx *temp_v0_15;
Gfx *temp_v0_16;
Gfx *temp_v0_17;
Gfx *temp_v0_18;
Gfx *temp_v0_19;
Gfx *temp_v0_20;
Gfx *temp_v0_21;
Gfx *temp_v0_22;
Gfx *temp_v0_23;
Gfx *temp_v0_24;
Gfx *temp_v0_2;
Gfx *temp_v0_3;
Gfx *temp_v0_4;
Gfx *temp_v0_5;
Gfx *temp_v0_6;
Gfx *temp_v0_7;
Gfx *temp_v0_8;
Gfx *temp_v0_9;
f32 *temp_a1;
f32 *temp_a2;
f32 *temp_a2_2;
f32 *temp_a2_3;
f32 *temp_a2_4;
f32 temp_f0;
f32 temp_f0_2;
f32 temp_f0_3;
f32 temp_f12;
f32 temp_f2;
f32 temp_f2_2;
s16 temp_v1;
f32 phi_f0;
temp_a1 = actor->pos;
sp38 = temp_a1;
if (func_802B80D0(temp_a1, (u16) camera->rotX2, 0x451C4000, *(&D_80150130 + (((s32) (camera - camera1) / 184) * 4)), D_802B99E0) < 0.0f) {
func_80297230(camera, actor);
return;
}
temp_f0 = actor->pos[1];
if (((f32) D_8015F6EC + 800.0f) < temp_f0) {
func_80297230(camera, actor);
return;
}
if (temp_f0 < ((f32) D_8015F6EE - 800.0f)) {
func_80297230(camera, actor);
return;
}
func_802972B8(camera, actor);
sp180 = 0;
sp184 = 0;
sp182 = actor->rot[1];
func_802B5F74((f32 (*)[4]) &sp128[0], sp38, &sp180);
func_802B5F00((f32 (*)[4]) &sp128[0], actor->unk_08);
if (actor->state != 2) {
if (func_802B4FF8(&sp128[0], 0) != 0) {
temp_v0 = gDisplayListHead;
gDisplayListHead = temp_v0 + 8;
temp_v0->words.w0 = 0x06000000;
temp_v0->words.w1 = (u32) &D_0D002F80;
func_802B5F74((f32 (*)[4]) &sp128[0], sp38, actor->rot);
func_802B5F00((f32 (*)[4]) &sp128[0], actor->unk_08);
if (func_802B4FF8(&sp128[0], 0) != 0) {
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->words.w1 = 0x00020000;
temp_v0_2->words.w0 = 0xB6000000;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->words.w0 = 0xFC121824;
temp_v0_3->words.w1 = 0xFF33FFFF;
temp_v1 = actor->rot[1];
if ((temp_v1 < 0xAA1) && (temp_v1 > 0)) {
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->words.w0 = 0xB900031D;
temp_v0_4->words.w1 = 0x00552078;
} else if ((temp_v1 >= 0x6AA5) && (temp_v1 < 0x754E)) {
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->words.w0 = 0xB900031D;
temp_v0_5->words.w1 = 0x00552078;
} else if ((temp_v1 >= 0x38E1) && (temp_v1 < 0x438A)) {
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->words.w0 = 0xB900031D;
temp_v0_6->words.w1 = 0x00552078;
} else if ((temp_v1 >= 0xC711) && (temp_v1 < 0xD1BA)) {
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->words.w0 = 0xB900031D;
temp_v0_7->words.w1 = 0x00552078;
} else {
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->words.w1 = 0;
temp_v0_8->words.w0 = 0xC0000000;
temp_v0_9 = gDisplayListHead;
gDisplayListHead = temp_v0_9 + 8;
temp_v0_9->words.w1 = 0x00504B50;
temp_v0_9->words.w0 = 0xB900031D;
}
temp_v0_10 = gDisplayListHead;
gDisplayListHead = temp_v0_10 + 8;
temp_v0_10->words.w0 = 0x06000000;
temp_v0_10->words.w1 = (u32) &D_0D003090;
}
}
} else {
temp_v0_11 = gDisplayListHead;
gDisplayListHead = temp_v0_11 + 8;
temp_v0_11->words.w1 = 0x00020000;
temp_v0_11->words.w0 = 0xB6000000;
temp_v0_12 = gDisplayListHead;
gDisplayListHead = temp_v0_12 + 8;
temp_v0_12->words.w1 = 0x00002000;
temp_v0_12->words.w0 = 0xB6000000;
temp_v0_13 = gDisplayListHead;
gDisplayListHead = temp_v0_13 + 8;
temp_v0_13->words.w1 = 0;
temp_v0_13->words.w0 = 0xC0000000;
spA4 = (f32) actor->unk_04;
func_802B5F74((f32 (*)[4]) &sp128[0], sp38, actor->rot);
if (spA4 < 10.0f) {
phi_f0 = 1.0f;
} else {
phi_f0 = 1.0f - ((spA4 - 10.0f) * D_802B99E4);
}
func_802B5F00((f32 (*)[4]) &sp128[0], phi_f0);
if ((actor->unk_04 & 1) != 0) {
temp_v0_14 = gDisplayListHead;
gDisplayListHead = temp_v0_14 + 8;
temp_v0_14->words.w1 = 0x00552078;
temp_v0_14->words.w0 = 0xB900031D;
} else {
temp_v0_15 = gDisplayListHead;
gDisplayListHead = temp_v0_15 + 8;
temp_v0_15->words.w1 = 0x004045D8;
temp_v0_15->words.w0 = 0xB900031D;
}
sp168 = 0.0f;
temp_f2 = 2.0f * spA4;
sp170 = spA4;
sp16C = temp_f2;
sp38 = temp_f2;
func_802B5450((f32 (*)[4]) &sp128[0], (f32 (*)[4]) &spE8[0], (f32 (*)[4]) &sp168);
if (func_802B4FF8(&spE8[0], 0) != 0) {
temp_v0_16 = gDisplayListHead;
gDisplayListHead = temp_v0_16 + 8;
temp_v0_16->words.w0 = 0x06000000;
temp_v0_16->words.w1 = (u32) &D_0D003158;
temp_f2_2 = D_802B99E8 * spA4;
temp_f12 = 0.5f * spA4;
sp168 = temp_f2_2;
sp34 = temp_f2_2;
sp16C = D_802B99EC * spA4;
sp170 = temp_f12;
sp30 = temp_f12;
func_802B5450((f32 (*)[4]) &sp128[0], (f32 (*)[4]) &spE8[0], (f32 (*)[4]) &sp168);
if (func_802B4FF8(&spE8[0], 0) != 0) {
temp_v0_17 = gDisplayListHead;
gDisplayListHead = temp_v0_17 + 8;
temp_v0_17->words.w0 = 0x06000000;
temp_v0_17->words.w1 = (u32) &D_0D0031B8;
temp_f0_2 = -0.5f * spA4;
temp_a2 = &sp168;
sp168 = sp34;
sp16C = D_802B99F0 * spA4;
sp170 = temp_f0_2;
sp2C = temp_f0_2;
func_802B5450((f32 (*)[4]) &sp128[0], (f32 (*)[4]) &spE8[0], (f32 (*)[4]) temp_a2);
if (func_802B4FF8(&spE8[0], 0) != 0) {
temp_v0_18 = gDisplayListHead;
gDisplayListHead = temp_v0_18 + 8;
temp_v0_18->words.w1 = (u32) &D_0D003128;
temp_v0_18->words.w0 = 0x06000000;
if ((actor->unk_04 & 1) == 0) {
temp_v0_19 = gDisplayListHead;
gDisplayListHead = temp_v0_19 + 8;
temp_v0_19->words.w1 = 0x00552078;
temp_v0_19->words.w0 = 0xB900031D;
} else {
temp_v0_20 = gDisplayListHead;
gDisplayListHead = temp_v0_20 + 8;
temp_v0_20->words.w1 = 0x004045D8;
temp_v0_20->words.w0 = 0xB900031D;
}
temp_a2_2 = &sp168;
sp168 = 0.0f;
sp16C = D_802B99F4 * spA4;
sp170 = -1.0f * spA4;
func_802B5450((f32 (*)[4]) &sp128[0], (f32 (*)[4]) &spE8[0], (f32 (*)[4]) temp_a2_2);
if (func_802B4FF8(&spE8[0], 0) != 0) {
temp_v0_21 = gDisplayListHead;
gDisplayListHead = temp_v0_21 + 8;
temp_v0_21->words.w1 = (u32) &D_0D0031E8;
temp_v0_21->words.w0 = 0x06000000;
temp_f0_3 = D_802B99F8 * spA4;
temp_a2_3 = &sp168;
sp170 = sp2C;
sp168 = temp_f0_3;
sp34 = temp_f0_3;
sp16C = D_802B99FC * spA4;
func_802B5450((f32 (*)[4]) &sp128[0], (f32 (*)[4]) &spE8[0], (f32 (*)[4]) temp_a2_3);
if (func_802B4FF8(&spE8[0], 0) != 0) {
temp_v0_22 = gDisplayListHead;
gDisplayListHead = temp_v0_22 + 8;
temp_v0_22->words.w1 = (u32) &D_0D003188;
temp_v0_22->words.w0 = 0x06000000;
temp_a2_4 = &sp168;
sp168 = sp34;
sp16C = sp38;
sp170 = sp30;
func_802B5450((f32 (*)[4]) &sp128[0], (f32 (*)[4]) &spE8[0], (f32 (*)[4]) temp_a2_4);
if (func_802B4FF8(&spE8[0], 0) != 0) {
temp_v0_23 = gDisplayListHead;
gDisplayListHead = temp_v0_23 + 8;
temp_v0_23->words.w1 = (u32) &D_0D0030F8;
temp_v0_23->words.w0 = 0x06000000;
temp_v0_24 = gDisplayListHead;
gDisplayListHead = temp_v0_24 + 8;
temp_v0_24->words.w1 = 0x00002000;
temp_v0_24->words.w0 = 0xB7000000;
}
}
}
}
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_802A171C.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
s32 func_802B4FF8(f32 (*)[4], ?); /* extern */
? func_802B5F74(f32 (*)[4], f32 *, s16 *, struct ItemBox *); /* extern */
f32 func_802B80D0(f32 *, u16, ?, f32, f32); /* extern */
extern ? D_0D002EE8;
extern ? D_0D003008;
extern ? D_0D003090;
extern ? D_0D0030F8;
extern ? D_0D003128;
extern ? D_0D003158;
extern ? D_0D003188;
extern ? D_0D0031B8;
extern ? D_0D0031E8;
extern ? D_80150130;
static f32 D_802B9A00 = 4000000.0f;
static f32 D_802B9A04 = 600000.0f;
static f32 D_802B9A08 = 100000.0f;
static f32 D_802B9A0C = 0.1f;
static f32 D_802B9A10 = 0.8f;
static f32 D_802B9A14 = 2.3f;
static f32 D_802B9A18 = 1.2f;
static f32 D_802B9A1C = 1.8f;
static f32 D_802B9A20 = -0.8f;
static f32 D_802B9A24 = 0.6f;
void func_802A1EA0(Camera *camera, struct ItemBox *item_box) {
f32 sp17C;
f32 sp178;
f32 sp174;
f32 sp170;
f32 sp16C;
f32 sp168;
s16 sp164;
s16 sp162;
s16 sp160;
f32 sp15C;
f32 *sp38; /* compiler-managed */
f32 sp34;
f32 sp30;
f32 sp2C;
Gfx *temp_v0;
Gfx *temp_v0_10;
Gfx *temp_v0_11;
Gfx *temp_v0_12;
Gfx *temp_v0_13;
Gfx *temp_v0_14;
Gfx *temp_v0_15;
Gfx *temp_v0_16;
Gfx *temp_v0_17;
Gfx *temp_v0_18;
Gfx *temp_v0_19;
Gfx *temp_v0_20;
Gfx *temp_v0_21;
Gfx *temp_v0_22;
Gfx *temp_v0_23;
Gfx *temp_v0_24;
Gfx *temp_v0_25;
Gfx *temp_v0_26;
Gfx *temp_v0_27;
Gfx *temp_v0_28;
Gfx *temp_v0_2;
Gfx *temp_v0_3;
Gfx *temp_v0_4;
Gfx *temp_v0_5;
Gfx *temp_v0_6;
Gfx *temp_v0_7;
Gfx *temp_v0_8;
Gfx *temp_v0_9;
f32 *temp_a1;
f32 *temp_a2_2;
f32 *temp_a2_3;
f32 *temp_a2_4;
f32 *temp_a2_5;
f32 temp_f0;
f32 temp_f0_2;
f32 temp_f0_3;
f32 temp_f12;
f32 temp_f2;
f32 temp_f2_2;
s16 *temp_a2;
s16 temp_a0;
s16 temp_v1;
s16 phi_a0;
s16 phi_a0_2;
struct ItemBox *phi_t1;
f32 phi_f0;
temp_a1 = item_box->pos;
sp38 = temp_a1;
temp_f0 = func_802B80D0(temp_a1, (u16) camera->rotX2, 0, *(&D_80150130 + (((s32) (camera - camera1) / 184) * 4)), D_802B9A00);
if (!(temp_f0 < 0.0f) && !(D_802B9A04 < temp_f0)) {
temp_a0 = item_box->state;
phi_a0 = temp_a0;
if ((temp_a0 == 2) && (temp_f0 < D_802B9A08)) {
sp160 = 0;
sp164 = 0;
sp162 = item_box->rot[1];
sp168 = item_box->pos[0];
sp16C = item_box->resetDistance + 2.0f;
sp170 = item_box->pos[2];
func_802B5F74((f32 (*)[4]) &sp118[0], &sp168, &sp160);
if (func_802B4FF8((f32 (*)[4]) &sp118[0], 0) != 0) {
temp_v0 = gDisplayListHead;
gDisplayListHead = temp_v0 + 8;
temp_v0->words.w0 = 0x06000000;
temp_v0->words.w1 = (u32) &D_0D002EE8;
sp162 = item_box->rot[1] * 2;
sp16C = item_box->pos[1];
func_802B5F74((f32 (*)[4]) &sp118[0], &sp168, &sp160, item_box);
if (func_802B4FF8((f32 (*)[4]) &sp118[0], 0) != 0) {
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->words.w1 = (u32) &D_0D003008;
temp_v0_2->words.w0 = 0x06000000;
phi_a0 = item_box->state;
goto block_7;
}
}
} else {
block_7:
phi_a0_2 = phi_a0;
phi_t1 = item_box;
if (phi_a0 == 5) {
func_802B5F74((f32 (*)[4]) &sp118[0], sp38, item_box + 0x10);
if (func_802B4FF8((f32 (*)[4]) &sp118[0], 0) != 0) {
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->words.w1 = (u32) &D_0D003008;
temp_v0_3->words.w0 = 0x06000000;
phi_a0_2 = item_box->state;
phi_t1 = item_box;
goto block_10;
}
} else {
block_10:
temp_a2 = phi_t1 + 0x10;
if (phi_a0_2 != 3) {
func_802B5F74((f32 (*)[4]) &sp118[0], sp38, temp_a2);
if (func_802B4FF8((f32 (*)[4]) &sp118[0], 0) != 0) {
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->words.w1 = 0x00020000;
temp_v0_4->words.w0 = 0xB6000000;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->words.w0 = 0xFC121824;
temp_v0_5->words.w1 = 0xFF33FFFF;
temp_v1 = item_box->rot[1];
if ((temp_v1 < 0xAA1) && (temp_v1 > 0)) {
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->words.w0 = 0xB900031D;
temp_v0_6->words.w1 = 0x00552078;
} else if ((temp_v1 >= 0x6AA5) && (temp_v1 < 0x754E)) {
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->words.w0 = 0xB900031D;
temp_v0_7->words.w1 = 0x00552078;
} else if ((temp_v1 >= 0x38E1) && (temp_v1 < 0x438A)) {
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->words.w0 = 0xB900031D;
temp_v0_8->words.w1 = 0x00552078;
} else if ((temp_v1 >= 0xC711) && (temp_v1 < 0xD1BA)) {
temp_v0_9 = gDisplayListHead;
gDisplayListHead = temp_v0_9 + 8;
temp_v0_9->words.w0 = 0xB900031D;
temp_v0_9->words.w1 = 0x00552078;
} else {
temp_v0_10 = gDisplayListHead;
gDisplayListHead = temp_v0_10 + 8;
temp_v0_10->words.w1 = 0;
temp_v0_10->words.w0 = 0xC0000000;
temp_v0_11 = gDisplayListHead;
gDisplayListHead = temp_v0_11 + 8;
temp_v0_11->words.w1 = 0x00504B50;
temp_v0_11->words.w0 = 0xB900031D;
}
temp_v0_12 = gDisplayListHead;
gDisplayListHead = temp_v0_12 + 8;
temp_v0_12->words.w1 = 0x00000200;
temp_v0_12->words.w0 = 0xB7000000;
temp_v0_13 = gDisplayListHead;
gDisplayListHead = temp_v0_13 + 8;
temp_v0_13->words.w0 = 0x06000000;
temp_v0_13->words.w1 = (u32) &D_0D003090;
goto block_42;
}
} else {
temp_v0_14 = gDisplayListHead;
gDisplayListHead = temp_v0_14 + 8;
temp_v0_14->words.w1 = 0x00020000;
temp_v0_14->words.w0 = 0xB6000000;
temp_v0_15 = gDisplayListHead;
gDisplayListHead = temp_v0_15 + 8;
temp_v0_15->words.w1 = 0x00002000;
temp_v0_15->words.w0 = 0xB6000000;
temp_v0_16 = gDisplayListHead;
gDisplayListHead = temp_v0_16 + 8;
temp_v0_16->words.w1 = 0;
temp_v0_16->words.w0 = 0xC0000000;
sp15C = (f32) phi_t1->someTimer;
func_802B5F74((f32 (*)[4]) &sp118[0], sp38, temp_a2);
if (sp15C < 10.0f) {
phi_f0 = 1.0f;
} else {
phi_f0 = 1.0f - ((sp15C - 10.0f) * D_802B9A0C);
}
func_802B5F00((f32 (*)[4]) &sp118[0], phi_f0);
if ((item_box->someTimer & 1) != 0) {
temp_v0_17 = gDisplayListHead;
gDisplayListHead = temp_v0_17 + 8;
temp_v0_17->words.w1 = 0x00552078;
temp_v0_17->words.w0 = 0xB900031D;
} else {
temp_v0_18 = gDisplayListHead;
gDisplayListHead = temp_v0_18 + 8;
temp_v0_18->words.w1 = 0x004045D8;
temp_v0_18->words.w0 = 0xB900031D;
}
sp174 = 0.0f;
temp_f2 = 2.0f * sp15C;
sp17C = sp15C;
sp178 = temp_f2;
sp38 = temp_f2;
func_802B5450((f32 (*)[4]) &sp118[0], (f32 (*)[4]) &spD8[0], (f32 (*)[4]) &sp174);
if (func_802B4FF8((f32 (*)[4]) &spD8[0], 0) != 0) {
temp_v0_19 = gDisplayListHead;
gDisplayListHead = temp_v0_19 + 8;
temp_v0_19->words.w0 = 0x06000000;
temp_v0_19->words.w1 = (u32) &D_0D003158;
temp_f2_2 = D_802B9A10 * sp15C;
temp_f12 = 0.5f * sp15C;
sp174 = temp_f2_2;
sp34 = temp_f2_2;
sp178 = D_802B9A14 * sp15C;
sp17C = temp_f12;
sp30 = temp_f12;
func_802B5450((f32 (*)[4]) &sp118[0], (f32 (*)[4]) &spD8[0], (f32 (*)[4]) &sp174);
if (func_802B4FF8((f32 (*)[4]) &spD8[0], 0) != 0) {
temp_v0_20 = gDisplayListHead;
gDisplayListHead = temp_v0_20 + 8;
temp_v0_20->words.w0 = 0x06000000;
temp_v0_20->words.w1 = (u32) &D_0D0031B8;
temp_f0_2 = -0.5f * sp15C;
temp_a2_2 = &sp174;
sp174 = sp34;
sp178 = D_802B9A18 * sp15C;
sp17C = temp_f0_2;
sp2C = temp_f0_2;
func_802B5450((f32 (*)[4]) &sp118[0], (f32 (*)[4]) &spD8[0], (f32 (*)[4]) temp_a2_2);
if (func_802B4FF8((f32 (*)[4]) &spD8[0], 0) != 0) {
temp_v0_21 = gDisplayListHead;
gDisplayListHead = temp_v0_21 + 8;
temp_v0_21->words.w1 = (u32) &D_0D003128;
temp_v0_21->words.w0 = 0x06000000;
if ((item_box->someTimer & 1) == 0) {
temp_v0_22 = gDisplayListHead;
gDisplayListHead = temp_v0_22 + 8;
temp_v0_22->words.w1 = 0x00552078;
temp_v0_22->words.w0 = 0xB900031D;
} else {
temp_v0_23 = gDisplayListHead;
gDisplayListHead = temp_v0_23 + 8;
temp_v0_23->words.w1 = 0x004045D8;
temp_v0_23->words.w0 = 0xB900031D;
}
temp_a2_3 = &sp174;
sp174 = 0.0f;
sp178 = D_802B9A1C * sp15C;
sp17C = -1.0f * sp15C;
func_802B5450((f32 (*)[4]) &sp118[0], (f32 (*)[4]) &spD8[0], (f32 (*)[4]) temp_a2_3);
if (func_802B4FF8((f32 (*)[4]) &spD8[0], 0) != 0) {
temp_v0_24 = gDisplayListHead;
gDisplayListHead = temp_v0_24 + 8;
temp_v0_24->words.w1 = (u32) &D_0D0031E8;
temp_v0_24->words.w0 = 0x06000000;
temp_f0_3 = D_802B9A20 * sp15C;
temp_a2_4 = &sp174;
sp17C = sp2C;
sp174 = temp_f0_3;
sp34 = temp_f0_3;
sp178 = D_802B9A24 * sp15C;
func_802B5450((f32 (*)[4]) &sp118[0], (f32 (*)[4]) &spD8[0], (f32 (*)[4]) temp_a2_4);
if (func_802B4FF8((f32 (*)[4]) &spD8[0], 0) != 0) {
temp_v0_25 = gDisplayListHead;
gDisplayListHead = temp_v0_25 + 8;
temp_v0_25->words.w1 = (u32) &D_0D003188;
temp_v0_25->words.w0 = 0x06000000;
temp_a2_5 = &sp174;
sp174 = sp34;
sp178 = sp38;
sp17C = sp30;
func_802B5450((f32 (*)[4]) &sp118[0], (f32 (*)[4]) &spD8[0], (f32 (*)[4]) temp_a2_5);
if (func_802B4FF8((f32 (*)[4]) &spD8[0], 0) != 0) {
temp_v0_26 = gDisplayListHead;
gDisplayListHead = temp_v0_26 + 8;
temp_v0_26->words.w1 = (u32) &D_0D0030F8;
temp_v0_26->words.w0 = 0x06000000;
temp_v0_27 = gDisplayListHead;
gDisplayListHead = temp_v0_27 + 8;
temp_v0_27->words.w1 = 0x00002000;
temp_v0_27->words.w0 = 0xB7000000;
block_42:
temp_v0_28 = gDisplayListHead;
gDisplayListHead = temp_v0_28 + 8;
temp_v0_28->words.w1 = -1U;
temp_v0_28->words.w0 = 0xBB000001;
}
}
}
}
}
}
}
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_802A1EA0.s")
#endif
extern s8 D_0600CA60[];
extern f32 D_802B9A28;
void func_802A269C(Camera *arg0, struct Actor *arg1) {
Mat4 sp38;
f32 unk = func_802B80D0(arg0->pos, arg1->pos, arg0->rotX[1], 0, D_80150130[arg0 - camera1], D_802B9A28);
if (!(unk < 0.0f)) {
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
func_802B5F74(sp38, arg1->pos, arg1->rot);
if (func_802B4FF8(sp38, 0) != 0) {
gSPDisplayList(gDisplayListHead++, D_0600CA60);
}
}
}
extern s8 D_06016D70[];
extern s8 D_06017FA8[];
extern f32 D_802B9A2C;
extern s32 D_800DC50C;
void func_802A27A0(Camera *arg0, Mat4 arg1, struct YoshiValleyEgg *egg, u16 arg3) {
Mat4 sp60;
Vec3s sp5C;
Vec3f sp54;
f32 temp_f0;
if (D_800DC50C != CREDITS_SEQUENCE) {
temp_f0 = func_802B80D0(arg0->pos, egg->pos, arg0->rotX[1], 200.0f, D_80150130[arg0 - camera1], D_802B9A2C);
if (temp_f0 < 0.0f) {
return;
}
} else {
arg3 = 15;
temp_f0 = 0.0f;
}
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
if ((arg3 > 12) && (arg3 < 20)) {
if (temp_f0 < 640000.0f) {
sp54[0] = egg->pos[0];
sp54[1] = 3.0f;
sp54[2] = egg->pos[2];
func_802976D8(sp5C);
func_8029794C(sp54, sp5C, 10.0f);
}
sp5C[0] = 0;
sp5C[1] = egg->eggRot;
sp5C[2] = 0;
func_802B5F74(sp60, egg->pos, sp5C);
if (func_802B4FF8(sp60, 0) == 0) { return; }
gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING);
gSPDisplayList(gDisplayListHead++, D_06016D70);
} else {
arg1[3][0] = egg->pos[0];
arg1[3][1] = egg->pos[1];
arg1[3][2] = egg->pos[2];
if (func_802B4FF8(arg1, 0) != 0) {
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
gSPDisplayList(gDisplayListHead++, D_06017FA8);
}
}
}
extern s8 D_06009330[];
void func_802A29BC(Camera *arg0, Mat4 arg1, struct Actor *arg2) {
Mat4 sp40;
f32 unk;
s16 temp = arg2->flags;
if (temp & 0x800) { return; }
unk = func_802B80D0(arg0->pos, arg2->pos, arg0->rotX[1], 0, D_80150130[arg0 - camera1], 16000000.0f);
if (!(unk < 0.0f)) {
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
func_802B5F74(&sp40, arg2->pos, arg2->rot);
if (func_802B4FF8(&sp40, 0) != 0) {
gSPDisplayList(gDisplayListHead++, D_06009330);
}
}
}
s32 D_802B8850[] = {0, 0, 0};
s16 D_802B885C[] = {0, 0, 0};
//s16 filla;
extern s8 D_06010AE8[];
extern s8 D_06010C10[];
extern s8 D_06010D38[];
extern s8 D_802B8864[];
void func_802A2AD0(Camera *arg0, struct Actor *arg1) {
Vec3s sp80 = {0, 0, 0};
Mat4 sp40;
f32 unk = func_802B80D0(arg0->pos, arg1->pos, arg0->rotX[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; }
gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING);
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
if (D_801637B8[arg1->state]) {
if (arg1->unk_04 < 20) {
gSPDisplayList(gDisplayListHead++, D_06010AE8);
} else {
gSPDisplayList(gDisplayListHead++, D_06010C10);
}
} else {
gSPDisplayList(gDisplayListHead++, D_06010D38);
}
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
}
extern s8 D_060185F8[];
extern s8 D_060186B8[];
extern s8 D_06018948[];
extern s8 D_06018A08[];
extern s8 D_06018C98[];
extern s8 D_06018D58[];
void func_802A2C78(Camera *arg0, Mat4 arg1, struct Actor *arg2) {
Vec3s spA8 = {0, 0, 0};
Mat4 sp68;
f32 temp_f0;
s16 temp_v0 = arg2->flags;
if ((temp_v0 & 0x800)) {
return;
}
temp_f0 = func_802B80D0(arg0->pos, arg2->pos, arg0->rotX[1], 0.0f, D_80150130[arg0 - camera1], 4000000.0f);
if (!(temp_f0 < 0.0f)) {
if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) {
func_8029794C(arg2->pos, arg2->rot, 2.0f);
}
func_802B5F74(sp68, arg2->pos, spA8);
if (func_802B4FF8(sp68, 0) != 0) {
gDPSetTextureLUT(gDisplayListHead++, G_TT_NONE);
gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING);
switch(arg2->unk_04) {
case 0:
gSPDisplayList(gDisplayListHead++, &D_060186B8);
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
gSPDisplayList(gDisplayListHead++, &D_060185F8);
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
break;
case 1:
gSPDisplayList(gDisplayListHead++, &D_06018A08);
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
gSPDisplayList(gDisplayListHead++, &D_06018948);
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
break;
case 2:
gSPDisplayList(gDisplayListHead++, &D_06018D58);
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
gSPDisplayList(gDisplayListHead++, &D_06018C98);
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
break;
}
}
}
}
void func_802A171C(Camera*, struct Actor*); // extern
void func_802A1EA0(Camera*, struct Actor*); // extern
extern s32 D_8015F8DC;
void func_802A2F34(struct UnkStruct_800DC5EC *arg0) {
Camera *temp_s1 = arg0->camera;
struct Actor *phi_s0;
s32 i;
D_8015F8DC = 0;
for (i = 0; i < 100; i++) {
phi_s0 = &D_8015F9B8[i];
if (phi_s0->flags == 0) {
continue;
}
switch(phi_s0->type) {
case ACTOR_FAKE_ITEM_BOX:
func_802A171C(temp_s1, phi_s0);
break;
case ACTOR_ITEM_BOX:
func_802A1EA0(temp_s1, phi_s0);
break;
case ACTOR_HOT_AIR_BALLOON_ITEM_BOX:
func_802A1EA0(temp_s1, phi_s0);
break;
}
}
}
void func_802986B4(Camera*, Mat4, struct Actor*);
void func_80298D7C(Camera*, Mat4, struct Actor*);
void func_802A27A0(Camera*, Mat4, struct YoshiValleyEgg*, u16);
//void func_8029AE1C(Camera*, Mat4, struct Actor*, u16);
extern Mat4 D_801502C0;
extern s32 D_8015F8E0;
void func_80299144(Camera *, Mat4, struct Actor*); /* extern */
void func_8029930C(Camera *, Mat4, struct Actor*); /* extern */
void func_802994D4(Camera *, Mat4, struct Actor*); /* extern */
void func_8029969C(Camera *, Mat4, struct Actor*); /* extern */
void func_80299864(Camera *, Mat4, struct Actor*); /* extern */
void func_80299A2C(Camera *, Mat4, struct Actor*); /* extern */
void func_80299BF4(Camera *, Mat4, struct Actor*); /* extern */
void func_80299DBC(Camera *, Mat4, struct Actor*); /* extern */
void func_80299EDC(Camera *, Mat4, struct Actor*); /* extern */
void func_80299FFC(Camera *, Mat4, struct Actor*); /* extern */
void func_8029A11C(Camera *, Mat4, struct Actor*); /* extern */
void func_8029A690(Camera *, Mat4, struct Actor*); /* extern */
void func_8029A23C(Camera *, Mat4, struct Actor*); /* extern */
void func_8029A75C(Camera *, Mat4, struct Actor*); /* extern */
void func_8029A828(Camera *, Mat4, struct Actor*); /* extern */
void func_8029A8F4(Camera *, Mat4, struct BananaActor*); /* extern */
void func_8029AC18(Camera *, Mat4, struct Actor*); /* extern */
//void func_8029AE1C(Camera *, struct Actor*, Mat4, u16); /* extern */
void func_8029B06C(Camera *, struct Actor*); /* extern */
void func_8029B2E4(Camera *, struct Actor*); /* extern */
void func_8029B6EC(Camera *, struct Actor*); /* extern */
void func_8029B4E0(Camera *, struct Actor*); /* extern */
void func_8029B8E8(Camera *, struct Actor*); /* extern */
void func_8029BFB0(Camera *, struct Actor*); /* extern */
void func_8029C3CC(Camera *, struct Actor*); /* extern */
void func_8029CA90(Camera *, struct Actor*); /* extern */
void func_80297A50(Camera *, Mat4, struct Actor*);
void func_802A269C(Camera *, struct Actor*); /* extern */
void func_802A29BC(Camera *, Mat4, struct Actor*); /* extern */
void func_802A2AD0(Camera *, struct Actor*); /* extern */
void func_802A2C78(Camera *, Mat4, struct Actor*); /* extern */
extern void func_80297340(Camera*);
void func_802A3008(struct UnkStruct_800DC5EC *arg0) {
Camera *temp_s1 = arg0->camera;
u16 sp92 = arg0->pathCounter;
s32 pad[12];
s32 i;
struct Actor *phi_s0;
Vec3f sp4C = {0.0f, 5.0f, 10.0f};
f32 sp48 = sins(temp_s1->rotX[1] - 0x8000); // unk26;
f32 temp_f0 = coss(temp_s1->rotX[1] - 0x8000);
D_801502C0[0][0] = temp_f0;
D_801502C0[0][2] = -sp48;
D_801502C0[2][2] = temp_f0;
D_801502C0[1][0] = 0.0f;
D_801502C0[0][1] = 0.0f;
D_801502C0[2][1] = 0.0f;
D_801502C0[1][2] = 0.0f;
D_801502C0[0][3] = 0.0f;
D_801502C0[1][3] = 0.0f;
D_801502C0[2][3] = 0.0f; // 2c
D_801502C0[2][0] = sp48;
D_801502C0[1][1] = 1.0f;
D_801502C0[3][3] = 1.0f; // unk3c
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
gSPSetLights1(gDisplayListHead++, D_800DC610[1]);
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
if (gModeSelection != BATTLE) {
func_80297340(temp_s1);
}
D_8015F8E0 = 0;
for (i = 0; i < 100; i++) {
phi_s0 = &D_8015F9B8[i];
if (phi_s0->flags == 0) {
continue;
}
switch (phi_s0->type) {
case 2:
func_80299144(temp_s1, D_801502C0, phi_s0);
break;
case 3:
func_8029930C(temp_s1, D_801502C0, phi_s0);
break;
case 4:
func_802994D4(temp_s1, D_801502C0, phi_s0);
break;
case 19:
func_8029969C(temp_s1, D_801502C0, phi_s0);
break;
case 26:
func_80299864(temp_s1, D_801502C0, phi_s0);
break;
case 28:
func_80299A2C(temp_s1, D_801502C0, phi_s0);
break;
case 33:
func_80299BF4(temp_s1, D_801502C0, phi_s0);
break;
case 29:
func_80299DBC(temp_s1, D_801502C0, phi_s0);
break;
case 30:
func_80299EDC(temp_s1, D_801502C0, phi_s0);
break;
case 31:
func_80299FFC(temp_s1, D_801502C0, phi_s0);
break;
case 32:
func_8029A11C(temp_s1, D_801502C0, phi_s0);
break;
case ACTOR_FALLING_ROCK:
func_8029CA90(temp_s1, phi_s0);
break;
case ACTOR_KIWANO_FRUIT:
func_8029A23C(temp_s1, D_801502C0, phi_s0);
break;
case ACTOR_BANANA:
func_8029A8F4(temp_s1, D_801502C0, phi_s0);
break;
case ACTOR_GREEN_SHELL:
func_8029A690(temp_s1, D_801502C0, phi_s0);
break;
case ACTOR_RED_SHELL:
func_8029A75C(temp_s1, D_801502C0, phi_s0);
break;
case ACTOR_BLUE_SPINY_SHELL:
func_8029A828(temp_s1, D_801502C0, phi_s0);
break;
case ACTOR_PIRANHA_PLANT:
func_80298328(temp_s1, D_801502C0, phi_s0);
break;
case ACTOR_TRAIN_ENGINE:
func_8029B8E8(temp_s1, phi_s0);
break;
case ACTOR_TRAIN_TENDER:
func_8029BFB0(temp_s1, phi_s0);
break;
case ACTOR_TRAIN_PASSENGER_CAR:
func_8029C3CC(temp_s1, phi_s0);
break;
case 18:
func_80297A50(temp_s1, D_801502C0, phi_s0);
break;
case 20:
func_8029AC18(temp_s1, D_801502C0, phi_s0);
break;
case ACTOR_MARIO_RACEWAY_SIGN:
func_802A29BC(temp_s1, D_801502C0, phi_s0);
break;
case ACTOR_WARIO_STADIUM_SIGN:
func_802A269C(temp_s1, phi_s0);
break;
case 25:
func_802A2C78(temp_s1, D_801502C0, phi_s0);
break;
case ACTOR_PADDLE_WHEEL_BOAT:
func_8029AE1C(temp_s1, phi_s0, D_801502C0, sp92);
break;
case 37:
func_8029B06C(temp_s1, phi_s0);
break;
case 40:
func_8029B2E4(temp_s1, phi_s0);
break;
case 41:
func_8029B6EC(temp_s1, phi_s0);
break;
case 44:
func_8029B4E0(temp_s1, phi_s0);
break;
case 39:
func_802A2AD0(temp_s1, phi_s0);
break;
case ACTOR_YOSHI_VALLEY_EGG:
func_802A27A0(temp_s1, D_801502C0, phi_s0, sp92);
break;
}
}
switch (gCurrentCourseId) {
case COURSE_MOO_MOO_FARM:
func_802986B4(temp_s1, D_801502C0, phi_s0);
break;
case COURSE_DK_JUNGLE:
func_80298D7C(temp_s1, D_801502C0, phi_s0);
break;
}
}
void update_simple_objects(void) {
struct Actor *phi_s0;
s32 i;
for (i = 0; i < 100; i++) {
phi_s0 = &D_8015F9B8[i];
if (phi_s0->flags == 0) {
continue;
}
switch (phi_s0->type) {
case ACTOR_FALLING_ROCK:
update_obj_falling_rocks(phi_s0);
break;
case ACTOR_GREEN_SHELL:
update_obj_green_shell(phi_s0);
break;
case ACTOR_RED_SHELL:
update_obj_red_blue_shell(phi_s0);
break;
case ACTOR_BLUE_SPINY_SHELL:
update_obj_red_blue_shell(phi_s0);
break;
case ACTOR_KIWANO_FRUIT:
update_obj_kiwano_fruit(phi_s0);
break;
case ACTOR_BANANA:
update_obj_banana(phi_s0);
break;
case ACTOR_PADDLE_WHEEL_BOAT:
update_obj_paddle_wheel(phi_s0);
break;
case ACTOR_TRAIN_ENGINE:
update_obj_train_engine(phi_s0);
break;
case ACTOR_TRAIN_TENDER:
update_obj_train_car1(phi_s0);
break;
case ACTOR_TRAIN_PASSENGER_CAR:
update_obj_train_car2(phi_s0);
break;
case ACTOR_ITEM_BOX:
update_obj_item_box(phi_s0);
break;
case ACTOR_HOT_AIR_BALLOON_ITEM_BOX:
update_obj_item_box_hot_air_balloon(phi_s0);
break;
case ACTOR_FAKE_ITEM_BOX:
update_obj_fake_item_box(phi_s0);
break;
case ACTOR_PIRANHA_PLANT:
update_obj_piranha_plant(phi_s0);
break;
case ACTOR_BANANA_BUNCH:
update_obj_banana_bunch(phi_s0);
break;
case ACTOR_TRIPLE_GREEN_SHELL:
update_obj_triple_shell(phi_s0, ACTOR_GREEN_SHELL);
break;
case ACTOR_TRIPLE_RED_SHELL:
update_obj_triple_shell(phi_s0, ACTOR_RED_SHELL);
break;
case ACTOR_MARIO_RACEWAY_SIGN:
update_obj_mario_raceway_sign(phi_s0);
break;
case ACTOR_WARIO_STADIUM_SIGN:
update_obj_wario_stadium_sign(phi_s0);
break;
case ACTOR_RAILROAD_CROSSING:
update_obj_railroad_crossing(phi_s0);
break;
case 2:
case 3:
case 4:
case 19:
case 25:
case 26:
case 27:
case 28:
case 29:
case 30:
case 31:
case 32:
case 33:
update_obj_trees_cacti_shrubs(phi_s0);
break;
case ACTOR_YOSHI_VALLEY_EGG:
update_obj_yoshi_valley_egg(phi_s0);
break;
}
}
func_802A0E44();
func_802B30EC();
}