From ec3bc32c5cc3d36b242f42ffb8514c32a87d153b Mon Sep 17 00:00:00 2001 From: Ryan Myers Date: Fri, 5 Jan 2024 10:53:32 -0500 Subject: [PATCH] sf_77e40 - Match 30 more funcs (#69) * Match func_8007C9E0 * Match func_8007CAF0 * Match func_8007CC00 * Match func_8007CCBC * Match func_8007CD7C * Match func_8007CEBC * Match func_8007CF30 * Match 4 more funcs * Match 5 more funcs * Match func_8007D2F4 * Match func_8007D55C * func_8007D748 * Match several more * Match func_8007DB70 * Match func_8007DED4 * Match func_8007E014 * Match another handful * obj2F4->unk_0E8 -> obj2F4->vel * Object_8C.unk_54 -> Object_8C.vel * obj80->unk_64 -> obj80->vel * obj408->unk_06C -> obj408->vel * Name gravity * obj8C names * Run make format --- include/functions.h | 11 +- include/hud.h | 2 +- include/sf64math.h | 2 +- include/sf64object.h | 12 +- include/variables.h | 5 + src/main/fox_360.c | 22 +- src/main/fox_43AC0.c | 8 +- src/main/fox_beam.c | 10 +- src/main/fox_enmy.c | 66 ++-- src/main/fox_enmy2.c | 297 ++++++++------- src/main/fox_play.c | 24 +- src/main/sf_43E80.c | 14 +- src/main/sf_77E40.c | 871 ++++++++++++++++++++++++++++++++----------- src/main/sf_hud.c | 24 +- 14 files changed, 910 insertions(+), 458 deletions(-) diff --git a/include/functions.h b/include/functions.h index 03285825..3d2dbeb3 100644 --- a/include/functions.h +++ b/include/functions.h @@ -377,12 +377,13 @@ void func_8007C8C4(Object_8C*); void func_8007C85C(f32 posX, f32 posY, f32 posZ, f32 arg3); void func_8007C9E0(Object_8C*); void func_8007CAF0(Object_8C*); -void func_8007D074(f32, f32, f32, f32); -void func_8007D0E0(f32, f32, f32, f32); -void func_8007D10C(f32, f32, f32, f32); -void func_8007D1E0(f32, f32, f32, f32); +void func_8007CF30(f32 posX, f32 posY, f32 posZ, f32 scale2); +void func_8007D074(f32 posX, f32 posY, f32 posZ, f32 scale2); +void func_8007D0E0(f32 posX, f32 posY, f32 posZ, f32 scale2); +void func_8007D10C(f32 posX, f32 posY, f32 posZ, f32 scale2); +void func_8007D1E0(f32 posX, f32 posY, f32 posZ, f32 scale2); +void func_8007D24C(f32 posX, f32 posY, f32 posZ, f32 scale2); void func_8007D2C8(f32, f32, f32, f32); -void func_8007D24C(f32, f32, f32, f32); void func_8007D2F4(Object_8C*); void func_8007D55C(Object_8C*); void func_8007D748(Object_8C*); diff --git a/include/hud.h b/include/hud.h index 0a42a869..852b39f4 100644 --- a/include/hud.h +++ b/include/hud.h @@ -54,7 +54,7 @@ extern s32 D_1011D90[]; extern s32 D_1011E60[]; extern s32 D_1013580[]; extern s32 D_1013700[]; -extern s32 D_20031B0[]; +extern Gfx D_20031B0[]; extern Gfx D_2010A30[]; extern u16 D_3000B20[]; extern u16 D_30013E0[]; diff --git a/include/sf64math.h b/include/sf64math.h index 3e0babeb..be59d173 100644 --- a/include/sf64math.h +++ b/include/sf64math.h @@ -63,7 +63,7 @@ void Matrix_Push(Matrix** mtxStack); void Matrix_Pop(Matrix** mtxStack); void Matrix_Mult(Matrix*, Matrix*, u8); void Matrix_Translate(Matrix*, f32, f32, f32, u8); -void Matrix_Scale(Matrix*, f32, f32, f32, u8); +void Matrix_Scale(Matrix* mtx, f32 xScale, f32 yScale, f32 zScale, u8 mode); void Matrix_RotateX(Matrix*, f32, u8); void Matrix_RotateY(Matrix*, f32, u8); void Matrix_RotateZ(Matrix*, f32, u8); diff --git a/include/sf64object.h b/include/sf64object.h index cd868813..c3e5a8f7 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -148,7 +148,7 @@ typedef struct { /* 0x54 */ s32 unk_54; /* 0x58 */ char pad58[8]; /* 0x60 */ f32 unk_60; - /* 0x64 */ Vec3f unk_64; + /* 0x64 */ Vec3f vel; /* 0x70 */ Vec3f sfxPos; /* 0x7C */ char pad7C[4]; } Object_80; // size = 0x80 @@ -192,7 +192,7 @@ typedef struct { /* 0x4E */ s16 unk_4E; /* 0x50 */ u16 timer_50; /* 0x52 */ char pad52[0x2]; - /* 0x54 */ Vec3f unk_54; + /* 0x54 */ Vec3f vel; /* 0x60 */ Vec3f unk_60; /* 0x6C */ f32 scale1; /* 0x70 */ f32 scale2; @@ -223,9 +223,9 @@ typedef struct { /* 0x064 */ s16 unk_064; /* 0x066 */ s16 unk_066; /* 0x068 */ f32 unk_068; - /* 0x06C */ Vec3f unk_06C; + /* 0x06C */ Vec3f vel; /* 0x078 */ char pad78[0xC]; - /* 0x084 */ f32 unk_084; + /* 0x084 */ f32 gravity; /* 0x088 */ s16 unk_088; /* 0x08A */ s16 unk_08A; /* 0x08C */ char pad8C[6]; @@ -320,10 +320,10 @@ typedef struct { /* 0x0D8 */ Vec3f unk_0D8; /* 0x0E4 */ s16 unk_0E4; /* 0x0E6 */ s16 unk_0E6; - /* 0x0E8 */ Vec3f unk_0E8; + /* 0x0E8 */ Vec3f vel; /* 0x0F4 */ Vec3f unk_0F4; /* 0x100 */ Vec3f sfxPos; - /* 0x10C */ f32 unk_10C; + /* 0x10C */ f32 gravity; /* 0x110 */ f32 scale; /* 0x114 */ f32 unk_114; /* 0x118 */ f32 unk_118; diff --git a/include/variables.h b/include/variables.h index 795b8302..b3e3c7f7 100644 --- a/include/variables.h +++ b/include/variables.h @@ -216,6 +216,11 @@ extern s32 D_800D173C[]; extern Gfx* D_800D178C[6]; extern s32 D_800D18F0[]; //[6][4]? extern s32 D_800D1950[]; +extern Gfx* D_800D17A4[]; +extern f32 D_800D17F8[]; +extern u8 D_800D184C[][4]; +extern Gfx* D_800D18A0[]; +extern Gfx D_6004900[]; // sf_hud extern s16 D_800D1970; diff --git a/src/main/fox_360.c b/src/main/fox_360.c index 00799b25..1c2dc5cb 100644 --- a/src/main/fox_360.c +++ b/src/main/fox_360.c @@ -1967,15 +1967,15 @@ void func_800319AC(Object_2F4* this) { sp9C.x = spBC * sp9C.z; sp9C.z = spB4 * sp9C.z; - this->unk_0E8.x = this->unk_148 + sp9C.x; - this->unk_0E8.y = this->unk_14C + sp9C.y; - this->unk_0E8.z = this->unk_144 + sp9C.z; + this->vel.x = this->unk_148 + sp9C.x; + this->vel.y = this->unk_14C + sp9C.y; + this->vel.z = this->unk_144 + sp9C.z; this->unk_148 -= (this->unk_148 * 0.1f); this->unk_14C -= (this->unk_14C * 0.1f); this->unk_144 -= (this->unk_144 * 0.1f); - if ((this->obj.pos.y < D_80177940 + 40.0f) && (this->unk_0E8.y < 0.0f)) { + if ((this->obj.pos.y < D_80177940 + 40.0f) && (this->vel.y < 0.0f)) { this->obj.pos.y = D_80177940 + 40.0f; - this->unk_0E8.y = 0.0f; + this->vel.y = 0.0f; } if (this->unk_050 != 0) { this->unk_050 = 0; @@ -2054,14 +2054,14 @@ void func_800319AC(Object_2F4* this) { if (((gCurrentLevel == LEVEL_BOLSE) || (gCurrentLevel == LEVEL_SECTOR_Z)) && (this->timer_0C6 == 0)) { var_a3 = 3; } - sp90.x = this->unk_0E8.x; - sp90.y = this->unk_0E8.y; - sp90.z = this->unk_0E8.z; + sp90.x = this->vel.x; + sp90.y = this->vel.y; + sp90.z = this->vel.z; temp_v0_27 = func_8006351C(this->index, &this->obj.pos, &sp90, var_a3); if (temp_v0_27 != 0) { - this->obj.pos.x -= this->unk_0E8.x; - this->obj.pos.y -= this->unk_0E8.y; - this->obj.pos.z -= this->unk_0E8.z; + this->obj.pos.x -= this->vel.x; + this->obj.pos.y -= this->vel.y; + this->obj.pos.z -= this->vel.z; if ((temp_v0_27 >= 2) && (this->unk_0E4 >= 0xB)) { this->timer_0BE = 2; this->obj.status = 3; diff --git a/src/main/fox_43AC0.c b/src/main/fox_43AC0.c index a32259da..f664975e 100644 --- a/src/main/fox_43AC0.c +++ b/src/main/fox_43AC0.c @@ -67,15 +67,15 @@ void func_80042FF4(Object_2F4* obj2F4, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f obj2F4->obj.rot.x = arg4; obj2F4->obj.rot.y = arg5; obj2F4->obj.rot.z = arg6; - obj2F4->unk_0E8.x = arg7; - obj2F4->unk_0E8.y = arg8; - obj2F4->unk_0E8.z = arg9; + obj2F4->vel.x = arg7; + obj2F4->vel.y = arg8; + obj2F4->vel.z = arg9; obj2F4->scale = argA; obj2F4->timer_0BC = argC; obj2F4->timer_0BE = 20; Object_SetInfo(&obj2F4->info, obj2F4->obj.id); if (gLevelType == LEVELTYPE_PLANET) { - obj2F4->unk_10C = 0.5f; + obj2F4->gravity = 0.5f; } } diff --git a/src/main/fox_beam.c b/src/main/fox_beam.c index 8edaf297..61ed0ba7 100644 --- a/src/main/fox_beam.c +++ b/src/main/fox_beam.c @@ -9,7 +9,7 @@ void func_80035D30(Object_8C* obj8C, f32 xPos, f32 yPos, f32 zPos) { obj8C->obj.pos.x = xPos; obj8C->obj.pos.y = yPos; obj8C->obj.pos.z = zPos; - obj8C->unk_54.z = 0.0f; + obj8C->vel.z = 0.0f; obj8C->scale2 = 0.3f; obj8C->unk_4A = 100; obj8C->unk_48 = 3; @@ -1892,9 +1892,9 @@ void func_8003C4D0(PlayerShot* shot, s32 unkD6) { } } else if ((obj2F4->obj.id == OBJ_2F4_200) && (obj2F4->scale >= 0.5f) && (unkD6 >= 31)) { obj2F4->unk_0D4 = shot->playerNum + 1; - obj2F4->unk_0E8.x = sp68 * 0.03f; - obj2F4->unk_0E8.y = sp64 * 0.03f; - obj2F4->unk_0E8.z = sp60 * 0.03f; + obj2F4->vel.x = sp68 * 0.03f; + obj2F4->vel.y = sp64 * 0.03f; + obj2F4->vel.z = sp60 * 0.03f; obj2F4->obj.status = 3; obj2F4->timer_0BC = (s32) (Rand_ZeroOne() * 15.0f) + 10; obj2F4->timer_0BE = 0; @@ -1942,7 +1942,7 @@ void func_8003C4D0(PlayerShot* shot, s32 unkD6) { obj8C->unk_4E = 1; obj8C->unk_44 = 176; obj8C->unk_4C = 0; - obj8C->unk_54.x = obj8C->unk_54.y = obj8C->unk_54.z = 0.0f; + obj8C->vel.x = obj8C->vel.y = obj8C->vel.z = 0.0f; obj8C->scale2 = 20.0f; } } diff --git a/src/main/fox_enmy.c b/src/main/fox_enmy.c index 05109614..3806b7fa 100644 --- a/src/main/fox_enmy.c +++ b/src/main/fox_enmy.c @@ -355,7 +355,7 @@ void func_80061E48(Object_2F4* obj2F4, f32 xPos, f32 yPos, f32 zPos) { obj2F4->obj.pos.x = xPos; obj2F4->obj.pos.y = yPos; obj2F4->obj.pos.z = zPos; - obj2F4->unk_0E8.z = 10.0f; + obj2F4->vel.z = 10.0f; Object_SetInfo(&obj2F4->info, obj2F4->obj.id); } @@ -1343,9 +1343,9 @@ void func_80065380(Object_2F4* obj2F4, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f obj2F4->obj.id = OBJ_2F4_182; obj2F4->timer_0BC = (s32) (Rand_ZeroOne() * 10.0f) + 10; obj2F4->timer_0C2 = 30; - obj2F4->unk_0E8.x = arg4; - obj2F4->unk_0E8.y = arg5; - obj2F4->unk_0E8.z = arg6; + obj2F4->vel.x = arg4; + obj2F4->vel.y = arg5; + obj2F4->vel.z = arg6; obj2F4->obj.pos.x = xPos; obj2F4->obj.pos.y = yPos; obj2F4->obj.pos.z = zPos; @@ -1695,13 +1695,13 @@ void func_80066254(Object_2F4* obj2F4) { } void func_8006654C(Object_2F4* obj2F4) { - obj2F4->unk_10C = 0.4f; + obj2F4->gravity = 0.4f; if (obj2F4->obj.pos.y <= D_80177940 + 130.0f) { obj2F4->obj.pos.y = D_80177940 + 130.0f; - obj2F4->unk_0E8.y = 0.0f; + obj2F4->vel.y = 0.0f; } - obj2F4->unk_0E8.x = __sinf(obj2F4->obj.rot.y * M_DTOR) * (*obj2F4).unk_114; - obj2F4->unk_0E8.z = __cosf(obj2F4->obj.rot.y * M_DTOR) * (*obj2F4).unk_114; + obj2F4->vel.x = __sinf(obj2F4->obj.rot.y * M_DTOR) * (*obj2F4).unk_114; + obj2F4->vel.z = __cosf(obj2F4->obj.rot.y * M_DTOR) * (*obj2F4).unk_114; switch (obj2F4->unk_0B8) { case 0: if (obj2F4->unk_114 < 20.0f) { @@ -1740,12 +1740,12 @@ void func_8006654C(Object_2F4* obj2F4) { obj2F4->scale = 0.8f; if (obj2F4->unk_0D0 != 0) { obj2F4->obj.status = 3; - obj2F4->unk_0E8.y = (Rand_ZeroOne() * 5.0f) + 6.0f; + obj2F4->vel.y = (Rand_ZeroOne() * 5.0f) + 6.0f; if (obj2F4->unk_0D0 == 2) { - obj2F4->unk_0E8.y = -2.0f; + obj2F4->vel.y = -2.0f; } - obj2F4->unk_0E8.z = -15.0f; - obj2F4->unk_10C = 0.5f; + obj2F4->vel.z = -15.0f; + obj2F4->gravity = 0.5f; func_8007D2C8(obj2F4->obj.pos.x, obj2F4->obj.pos.y + 30.0f, obj2F4->obj.pos.z, 13.0f); Audio_PlaySfx(0x2903A008, &obj2F4->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } @@ -1755,9 +1755,9 @@ void func_8006684C(Object_2F4* obj2F4) { s32 pad; if (obj2F4->timer_0BE != 0) { - obj2F4->unk_0E8.z = 0.0f; - obj2F4->unk_0E8.x = 0.0f; - obj2F4->unk_0E8.y = 0.0f; + obj2F4->vel.z = 0.0f; + obj2F4->vel.x = 0.0f; + obj2F4->vel.y = 0.0f; if (obj2F4->timer_0BE == 1) { Object_Kill(&obj2F4->obj, &obj2F4->sfxPos); obj2F4->unk_044 = 1; @@ -1770,7 +1770,7 @@ void func_8006684C(Object_2F4* obj2F4) { } else { obj2F4->obj.rot.x += 11.0f; obj2F4->obj.rot.y += 7.0f; - if (obj2F4->unk_0E8.y < -3.0f) { + if (obj2F4->vel.y < -3.0f) { func_8007BFFC(obj2F4->obj.pos.x, obj2F4->obj.pos.y + 30.0f, obj2F4->obj.pos.z, 0.0f, 0.0f, 0.0f, 7.0f, 5); obj2F4->timer_0BE = 3; } @@ -1843,8 +1843,8 @@ void func_80066D5C(Object_80* obj80) { Audio_PlaySfx(0x2900300F, &obj80->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); break; case 2: - obj80->unk_64.x += 0.05f; - obj80->obj.rot.x += obj80->unk_64.x; + obj80->vel.x += 0.05f; + obj80->obj.rot.x += obj80->vel.x; if (obj80->obj.rot.x >= 90.0f) { obj80->obj.rot.x = 90.0f; obj80->unk_44 = 40; @@ -1954,11 +1954,11 @@ void func_80067348(Object_2F4* obj2F4, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f obj2F4->obj.pos.z = zPos; obj2F4->obj.rot.x = xRot; obj2F4->obj.rot.y = yRot; - obj2F4->unk_0E8.x = arg6; - obj2F4->unk_0E8.y = arg7; - obj2F4->unk_0E8.z = arg8; + obj2F4->vel.x = arg6; + obj2F4->vel.y = arg7; + obj2F4->vel.z = arg8; obj2F4->timer_0BC = (s32) (Rand_ZeroOne() * 15.0f) + 25.0f; - obj2F4->unk_10C = 0.5f; + obj2F4->gravity = 0.5f; Object_SetInfo(&obj2F4->info, obj2F4->obj.id); } @@ -2475,10 +2475,10 @@ void func_800690D0(s32 index, ObjectId objId) { } void func_800693E8(Object_2F4* obj2F4) { - obj2F4->obj.pos.x += obj2F4->unk_0E8.x; - obj2F4->obj.pos.z += obj2F4->unk_0E8.z; - obj2F4->obj.pos.y += obj2F4->unk_0E8.y; - obj2F4->unk_0E8.y -= obj2F4->unk_10C; + obj2F4->obj.pos.x += obj2F4->vel.x; + obj2F4->obj.pos.z += obj2F4->vel.z; + obj2F4->obj.pos.y += obj2F4->vel.y; + obj2F4->vel.y -= obj2F4->gravity; if ((D_80161AB8 != 0) && (obj2F4->obj.id != OBJ_2F4_198) && ((gCurrentLevel != LEVEL_MACBETH) || (obj2F4->obj.id == OBJ_2F4_200))) { @@ -2522,10 +2522,10 @@ void func_800693E8(Object_2F4* obj2F4) { } void func_80069658(Object_408* obj408) { - obj408->obj.pos.x += obj408->unk_06C.x; - obj408->obj.pos.y += obj408->unk_06C.y; - obj408->obj.pos.z += obj408->unk_06C.z; - obj408->unk_06C.y -= obj408->unk_084; + obj408->obj.pos.x += obj408->vel.x; + obj408->obj.pos.y += obj408->vel.y; + obj408->obj.pos.z += obj408->vel.z; + obj408->vel.y -= obj408->gravity; if ((D_80161AB8 != 0) && ((obj408->obj.pos.z + D_80177D20) > (obj408->info.unk_10 - gPlayer[0].camEye.z))) { if (gPlayer[0].camEye.z) {} // fake Object_Kill(&obj408->obj, &obj408->sfxPos); @@ -2574,9 +2574,9 @@ void func_80069858(Object_4C* obj4C) { } void func_80069924(Object_8C* obj8C) { - obj8C->obj.pos.x += obj8C->unk_54.x; - obj8C->obj.pos.y += obj8C->unk_54.y; - obj8C->obj.pos.z += obj8C->unk_54.z; + obj8C->obj.pos.x += obj8C->vel.x; + obj8C->obj.pos.y += obj8C->vel.y; + obj8C->obj.pos.z += obj8C->vel.z; if (D_80161AB8 != 0) { if ((gPlayer[0].camEye.z + obj8C->info.unk_10) < (obj8C->obj.pos.z + D_80177D20)) { Object_Kill(&obj8C->obj, &obj8C->sfxPos); diff --git a/src/main/fox_enmy2.c b/src/main/fox_enmy2.c index d000d772..43a809ec 100644 --- a/src/main/fox_enmy2.c +++ b/src/main/fox_enmy2.c @@ -69,7 +69,7 @@ void func_8006A984(Object_8C* obj8C, f32 xPos, f32 yPos, f32 zPos) { obj8C->unk_44 = 40; obj8C->scale2 = 5.0f; obj8C->scale1 = 2.0f * (Rand_ZeroOne() - 0.5f); - obj8C->unk_54.y = 10.0f; + obj8C->vel.y = 10.0f; obj8C->obj.rot.z = Rand_ZeroOne() * 360.0f; Object_SetInfo(&obj8C->info, obj8C->obj.id); } @@ -128,15 +128,15 @@ void func_8006AC08(Object_2F4* obj2F4) { void func_8006AD18(Object_2F4* obj2F4) { bool sp34; - obj2F4->unk_10C = 1.5f; + obj2F4->gravity = 1.5f; sp34 = false; obj2F4->obj.rot.y = Math_RadToDeg( Math_Atan2F(gPlayer[gPlayerNum].pos.x - obj2F4->obj.pos.x, gPlayer[gPlayerNum].unk_138 - obj2F4->obj.pos.z)); if (obj2F4->obj.pos.y < -500.0f) { obj2F4->obj.pos.y = -500.0f; - obj2F4->unk_0E8.y = 0.0f; - obj2F4->unk_0E8.x = 0.0f; - obj2F4->unk_0E8.z = 0.0f; + obj2F4->vel.y = 0.0f; + obj2F4->vel.x = 0.0f; + obj2F4->vel.z = 0.0f; sp34 = true; obj2F4->unk_054 = true; } @@ -156,25 +156,25 @@ void func_8006AD18(Object_2F4* obj2F4) { if (obj2F4->unk_0B6 == 0x15) { obj2F4->unk_0B8 = 1; - obj2F4->unk_0E8.y = 40.0f; - obj2F4->unk_0E8.z = -40.0f; - obj2F4->unk_0E8.x = 10.0f; + obj2F4->vel.y = 40.0f; + obj2F4->vel.z = -40.0f; + obj2F4->vel.x = 10.0f; obj2F4->unk_050 = 1 - obj2F4->unk_050; if (obj2F4->unk_050) { - obj2F4->unk_0E8.x *= -1.0f; + obj2F4->vel.x *= -1.0f; } if (obj2F4->unk_054) { - obj2F4->unk_0E8.x = 0.0f; - obj2F4->unk_0E8.z = -20.0f; + obj2F4->vel.x = 0.0f; + obj2F4->vel.z = -20.0f; } } break; case 1: - if (obj2F4->unk_0E8.y > 10.0f) { + if (obj2F4->vel.y > 10.0f) { obj2F4->unk_0B6++; if (obj2F4->unk_0B6 >= 30) { obj2F4->unk_0B6 = 29; @@ -196,8 +196,8 @@ void func_8006AD18(Object_2F4* obj2F4) { obj2F4->unk_0CE -= 10; if ((obj2F4->unk_0CE <= 0) || (obj2F4->unk_0D0 >= 2)) { func_8007D2C8(obj2F4->obj.pos.x, obj2F4->obj.pos.y + 180.0f, obj2F4->obj.pos.z, 10.0f); - func_8007BFFC(obj2F4->obj.pos.x, obj2F4->obj.pos.y + 180.0f, obj2F4->obj.pos.z, obj2F4->unk_0E8.x, - obj2F4->unk_0E8.y, obj2F4->unk_0E8.z, 8.0f, 30); + func_8007BFFC(obj2F4->obj.pos.x, obj2F4->obj.pos.y + 180.0f, obj2F4->obj.pos.z, obj2F4->vel.x, + obj2F4->vel.y, obj2F4->vel.z, 8.0f, 30); Object_Kill(&obj2F4->obj, &obj2F4->sfxPos); func_8007A6F0(&obj2F4->obj.pos, 0x2903A008); gHitCount += obj2F4->info.bonus; @@ -246,9 +246,9 @@ void func_8006B0A0(Object_2F4* obj2F4) { Math_Vec3fFromAngles(&sp34, obj2F4->obj.rot.x, obj2F4->obj.rot.y, 40.0f); - obj2F4->unk_0E8.x = sp34.x; - obj2F4->unk_0E8.y = sp34.y; - obj2F4->unk_0E8.z = sp34.z; + obj2F4->vel.x = sp34.x; + obj2F4->vel.y = sp34.y; + obj2F4->vel.z = sp34.z; if ((obj2F4->timer_0BC == 0) && !(gFrameCount & 3)) { temp_hi = (D_800CFF94[obj2F4->unk_04A] + obj2F4->unk_04E) % 100; @@ -325,19 +325,19 @@ void func_8006B74C(Object_2F4* obj2F4) { } void func_8006B95C(Object_80* obj80) { - obj80->obj.pos.x += obj80->unk_64.x; - obj80->obj.pos.y += obj80->unk_64.y; - obj80->obj.pos.z += obj80->unk_64.z; + obj80->obj.pos.x += obj80->vel.x; + obj80->obj.pos.y += obj80->vel.y; + obj80->obj.pos.z += obj80->vel.z; switch (obj80->unk_48) { case 0: - obj80->unk_64.y -= 1.0f; + obj80->vel.y -= 1.0f; if (obj80->obj.pos.y < D_80177940 + 40.0f) { obj80->obj.pos.y = D_80177940 + 40.0f; Audio_PlaySfx(0x19130003, &obj80->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C); obj80->unk_48 = 2; - obj80->unk_64.y = 0.0f; + obj80->vel.y = 0.0f; } break; @@ -404,14 +404,14 @@ void func_8006BB78(Object_2F4* obj2F4) { } Math_Vec3fFromAngles(&sp44, obj2F4->obj.rot.x, obj2F4->obj.rot.y, 10.0f); - obj2F4->unk_0E8.x = sp44.x; - obj2F4->unk_0E8.y = sp44.y; - obj2F4->unk_0E8.z = sp44.z; + obj2F4->vel.x = sp44.x; + obj2F4->vel.y = sp44.y; + obj2F4->vel.z = sp44.z; if (fabsf((obj2F4->obj.pos.z + obj2F4->unk_13C) - gPlayer[0].unk_138) < 3000.0f) { obj2F4->unk_0B8 = 2; obj2F4->timer_0BC = 20; - obj2F4->unk_0E8.z = 0.0f; - obj2F4->unk_0E8.x = 0.0f; + obj2F4->vel.z = 0.0f; + obj2F4->vel.x = 0.0f; } break; @@ -421,8 +421,8 @@ void func_8006BB78(Object_2F4* obj2F4) { obj2F4->unk_0B6 = 1; obj2F4->obj.pos.y += 30.0f; obj2F4->timer_0BC = 30; - obj2F4->unk_0E8.y = 30.0f; - obj2F4->unk_10C = 1.0f; + obj2F4->vel.y = 30.0f; + obj2F4->gravity = 1.0f; } break; @@ -430,15 +430,15 @@ void func_8006BB78(Object_2F4* obj2F4) { if (obj2F4->timer_0BC == 1) { func_8007F11C(OBJ_8C_353, obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z, D_80177828); } - if (obj2F4->unk_0E8.y < 12.0f) { + if (obj2F4->vel.y < 12.0f) { Math_SmoothStepToF(&obj2F4->obj.rot.x, 180.0f, 0.1f, 7.0f, 0.01f); } if (obj2F4->obj.pos.y < (D_80177940 + 10.0f)) { obj2F4->obj.pos.y = D_80177940; obj2F4->unk_0B8 = 4; obj2F4->unk_0B6 = 0; - obj2F4->unk_0E8.y = 0.0f; - obj2F4->unk_10C = 0.0f; + obj2F4->vel.y = 0.0f; + obj2F4->gravity = 0.0f; obj2F4->obj.rot.x = 0.0f; } break; @@ -461,7 +461,7 @@ void func_8006BB78(Object_2F4* obj2F4) { } if ((obj2F4->unk_0D0 != 0) && (obj2F4->unk_0B6 != 0)) { - func_8007BFFC(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z, 0.0f, obj2F4->unk_0E8.y, 0.0f, 3.0f, 5); + func_8007BFFC(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z, 0.0f, obj2F4->vel.y, 0.0f, 3.0f, 5); Object_Kill(&obj2F4->obj, &obj2F4->sfxPos); obj2F4->unk_044 = 1; func_80066254(obj2F4); @@ -506,10 +506,10 @@ void func_8006C008(Object_2F4* obj2F4) { obj2F4->unk_11C = 0.0f; obj2F4->unk_118 = 0.0f; obj2F4->unk_114 = 0.0f; - obj2F4->unk_0E8.x = 0.0f; - obj2F4->unk_0E8.y = 0.0f; - obj2F4->unk_0E8.z = 0.0f; - obj2F4->unk_10C = 0.0f; + obj2F4->vel.x = 0.0f; + obj2F4->vel.y = 0.0f; + obj2F4->vel.z = 0.0f; + obj2F4->gravity = 0.0f; } else { if (obj2F4->unk_04A & 4) { switch (obj2F4->unk_046) { @@ -524,14 +524,14 @@ void func_8006C008(Object_2F4* obj2F4) { Math_SmoothStepToF(&obj2F4->unk_114, 0.0f, 0.8f, 1.0f, 0.01f); Math_SmoothStepToF(&obj2F4->unk_118, 0.0f, 0.8f, 1.0f, 0.01f); Math_SmoothStepToF(&obj2F4->unk_11C, 0.0f, 0.8f, 1.0f, 0.01f); - Math_SmoothStepToF(&obj2F4->unk_0E8.x, 0.0f, 0.5f, 1.0f, 0.01f); + Math_SmoothStepToF(&obj2F4->vel.x, 0.0f, 0.5f, 1.0f, 0.01f); obj2F4->obj.pos.y = 0.0f; obj2F4->unk_050 += 1; - if (obj2F4->unk_0E8.y < 0.0f) { + if (obj2F4->vel.y < 0.0f) { if (obj2F4->unk_04A & 2) { - obj2F4->unk_0E8.y = obj2F4->unk_0E8.y * -0.05f; + obj2F4->vel.y = obj2F4->vel.y * -0.05f; } else { - obj2F4->unk_0E8.y = obj2F4->unk_0E8.y * -0.3f; + obj2F4->vel.y = obj2F4->vel.y * -0.3f; } } } @@ -555,15 +555,15 @@ void func_8006C008(Object_2F4* obj2F4) { obj2F4->obj.pos.y = sp48; obj2F4->unk_058++; if (obj2F4->unk_058 >= 2) { - obj2F4->unk_0E8.x = 0.0f; - obj2F4->unk_0E8.y = 0.0f; - obj2F4->unk_0E8.z = 0.0f; + obj2F4->vel.x = 0.0f; + obj2F4->vel.y = 0.0f; + obj2F4->vel.z = 0.0f; obj2F4->unk_114 = 0.0f; obj2F4->unk_118 = 0.0f; obj2F4->unk_11C = 0.0f; - obj2F4->unk_10C = 0.0f; + obj2F4->gravity = 0.0f; } else { - obj2F4->unk_0E8.y = -obj2F4->unk_0E8.y * 0.3f; + obj2F4->vel.y = -obj2F4->vel.y * 0.3f; } } break; @@ -575,10 +575,10 @@ void func_8006C008(Object_2F4* obj2F4) { obj2F4->obj.pos.y = obj2F4->unk_120 + sp48; obj2F4->unk_050 = 0; obj2F4->unk_058 = 1; - obj2F4->unk_0E8.x = 0.0f; - obj2F4->unk_0E8.y = 0.0f; - obj2F4->unk_0E8.z = 0.0f; - obj2F4->unk_10C = 0.0f; + obj2F4->vel.x = 0.0f; + obj2F4->vel.y = 0.0f; + obj2F4->vel.z = 0.0f; + obj2F4->gravity = 0.0f; obj2F4->unk_114 = 0.0f; obj2F4->unk_118 = 0.0f; obj2F4->unk_11C = 0.0f; @@ -667,7 +667,7 @@ void func_8006C008(Object_2F4* obj2F4) { obj2F4->obj.rot.y += obj2F4->unk_118; obj2F4->obj.rot.z += obj2F4->unk_11C; if (func_8006351C(obj2F4->index, &obj2F4->obj.pos, &D_800C9F2C, 1) != 0) { - obj2F4->unk_0E8.x *= -0.7f; + obj2F4->vel.x *= -0.7f; } if (obj2F4->obj.pos.y < D_80177940) { Object_Kill(&obj2F4->obj, &obj2F4->sfxPos); @@ -680,19 +680,19 @@ void func_8006C008(Object_2F4* obj2F4) { obj2F4->obj.rot.z += obj2F4->unk_11C; if (func_8006351C(obj2F4->index, &obj2F4->obj.pos, &D_800C9F2C, 1) != 0) { - obj2F4->unk_0E8.x *= -0.7f; + obj2F4->vel.x *= -0.7f; } if (obj2F4->obj.pos.y < D_80177940) { if (obj2F4->unk_050 >= 3) { - obj2F4->unk_0E8.y = 0.0f; - obj2F4->unk_10C = 0.0f; + obj2F4->vel.y = 0.0f; + obj2F4->gravity = 0.0f; obj2F4->unk_11C = 0.0f; obj2F4->unk_118 = 0.0f; obj2F4->unk_114 = 0.0f; } else { obj2F4->unk_050++; - obj2F4->unk_0E8.y = -obj2F4->unk_0E8.y * 0.7f; + obj2F4->vel.y = -obj2F4->vel.y * 0.7f; obj2F4->obj.pos.y = D_80177940; obj2F4->unk_114 *= 0.5f; obj2F4->unk_118 *= 0.5f; @@ -747,8 +747,8 @@ void func_8006C008(Object_2F4* obj2F4) { (func_8006351C(obj2F4->index, &obj2F4->obj.pos, &D_800D0030, 1) != 0) || (obj2F4->obj.pos.y < (D_80177940 + 10.0f))) && (obj2F4->timer_0BE == 0)) { - func_8007BFFC(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z, obj2F4->unk_0E8.x, - obj2F4->unk_0E8.y, obj2F4->unk_0E8.z, obj2F4->scale * 1.5f, 4); + func_8007BFFC(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z, obj2F4->vel.x, obj2F4->vel.y, + obj2F4->vel.z, obj2F4->scale * 1.5f, 4); Object_Kill(&obj2F4->obj, &obj2F4->sfxPos); func_8007A6F0(&obj2F4->obj.pos, 0x2903A008); } @@ -764,8 +764,8 @@ void func_8006C008(Object_2F4* obj2F4) { return; } - obj2F4->unk_0E8.y *= -0.2f; - obj2F4->obj.pos.y += obj2F4->unk_0E8.y * 5.0f; + obj2F4->vel.y *= -0.2f; + obj2F4->obj.pos.y += obj2F4->vel.y * 5.0f; obj2F4->unk_050++; if (obj2F4->unk_050 >= 2) { @@ -1307,9 +1307,9 @@ void func_8006D36C(Object_2F4* obj2F4) { if (gUnkEntities30[i].mode == 0) { gUnkEntities30[i].mode = 1; gUnkEntities30[i].unk_28 = 3.0f; - gUnkEntities30[i].unk_04.x = obj2F4->obj.pos.x - obj2F4->unk_0E8.x; - gUnkEntities30[i].unk_04.y = obj2F4->obj.pos.y - obj2F4->unk_0E8.y; - gUnkEntities30[i].unk_04.z = obj2F4->obj.pos.z - obj2F4->unk_0E8.z; + gUnkEntities30[i].unk_04.x = obj2F4->obj.pos.x - obj2F4->vel.x; + gUnkEntities30[i].unk_04.y = obj2F4->obj.pos.y - obj2F4->vel.y; + gUnkEntities30[i].unk_04.z = obj2F4->obj.pos.z - obj2F4->vel.z; gUnkEntities30[i].unk_2C = D_800D0DBC[temp_s1[obj2F4->unk_0E6 + 1]][0]; gUnkEntities30[i].unk_2D = D_800D0DBC[temp_s1[obj2F4->unk_0E6 + 1]][1]; gUnkEntities30[i].unk_2E = D_800D0DBC[temp_s1[obj2F4->unk_0E6 + 1]][2]; @@ -1851,8 +1851,8 @@ void func_8006F40C(Object_2F4* obj2F4) { break; case 11: - func_8007BFFC(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z, obj2F4->unk_0E8.x, - obj2F4->unk_0E8.y, obj2F4->unk_0E8.z, obj2F4->scale * 3.0f, 15); + func_8007BFFC(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z, obj2F4->vel.x, obj2F4->vel.y, + obj2F4->vel.z, obj2F4->scale * 3.0f, 15); func_80066254(obj2F4); Object_Kill(&obj2F4->obj, &obj2F4->sfxPos); func_8007A6F0(&obj2F4->obj.pos, 0x2903B009); @@ -2075,15 +2075,15 @@ void func_800701E0(Object_2F4* obj2F4) { obj2F4->timer_0BC = 300; if (gLevelMode != LEVELMODE_ALL_RANGE) { - obj2F4->unk_0E8.x *= 0.5f; - obj2F4->unk_0E8.y = Rand_ZeroOne() * 5.0f; - if (obj2F4->unk_0E8.z < 0.0f) { - obj2F4->unk_0E8.z = obj2F4->unk_0E8.z; + obj2F4->vel.x *= 0.5f; + obj2F4->vel.y = Rand_ZeroOne() * 5.0f; + if (obj2F4->vel.z < 0.0f) { + obj2F4->vel.z = obj2F4->vel.z; } else { - obj2F4->unk_0E8.z = obj2F4->unk_0E8.z * 0.3f; + obj2F4->vel.z = obj2F4->vel.z * 0.3f; } - if (((obj2F4->obj.pos.z + D_80177D20) > -3000.0f) && (obj2F4->unk_0E8.z > 0.0f)) { - obj2F4->unk_0E8.z = Rand_ZeroOne() * -10.0f; + if (((obj2F4->obj.pos.z + D_80177D20) > -3000.0f) && (obj2F4->vel.z > 0.0f)) { + obj2F4->vel.z = Rand_ZeroOne() * -10.0f; } } @@ -2101,10 +2101,10 @@ void func_800701E0(Object_2F4* obj2F4) { break; case 27: - obj2F4->obj.pos.y -= obj2F4->unk_0E8.y; + obj2F4->obj.pos.y -= obj2F4->vel.y; obj2F4->obj.status = 2; - func_8007D0E0(obj2F4->obj.pos.x - obj2F4->unk_0E8.x, obj2F4->obj.pos.y + 30.0f, - obj2F4->obj.pos.z - obj2F4->unk_0E8.z, obj2F4->scale * 5.0f); + func_8007D0E0(obj2F4->obj.pos.x - obj2F4->vel.x, obj2F4->obj.pos.y + 30.0f, + obj2F4->obj.pos.z - obj2F4->vel.z, obj2F4->scale * 5.0f); obj2F4->unk_0D0 = 0; obj2F4->timer_0C2 = 10000; obj2F4->info.unk_1C = 0.0f; @@ -2115,9 +2115,9 @@ void func_800701E0(Object_2F4* obj2F4) { default: obj2F4->timer_0BC = 35; obj2F4->timer_04C = 2; - obj2F4->unk_0E8.y = (Rand_ZeroOne() - 0.5f) * 20.0f; - obj2F4->unk_0E8.x = (Rand_ZeroOne() - 0.5f) * 20.0f; - obj2F4->unk_0E8.z = 0.0f; + obj2F4->vel.y = (Rand_ZeroOne() - 0.5f) * 20.0f; + obj2F4->vel.x = (Rand_ZeroOne() - 0.5f) * 20.0f; + obj2F4->vel.z = 0.0f; break; } } @@ -2190,14 +2190,14 @@ void func_800701E0(Object_2F4* obj2F4) { } if ((obj2F4->unk_080 == 0) && (obj2F4->unk_084 == 0) && (obj2F4->info.unk_16 != 2) && (gLevelType == LEVELTYPE_SPACE)) { - sp3C.x = obj2F4->unk_0E8.x; - sp3C.y = obj2F4->unk_0E8.y; - sp3C.z = obj2F4->unk_0E8.z; + sp3C.x = obj2F4->vel.x; + sp3C.y = obj2F4->vel.y; + sp3C.z = obj2F4->vel.z; if ((func_8006351C(obj2F4->index, &obj2F4->obj.pos, &sp3C, 0) != 0) || (obj2F4->obj.pos.y < (D_80177940 + 20.0f))) { obj2F4->obj.status = 3; - obj2F4->obj.pos.z -= obj2F4->unk_0E8.z; + obj2F4->obj.pos.z -= obj2F4->vel.z; obj2F4->unk_0D0 = 1; if (obj2F4->unk_0B4 == 13) { obj2F4->obj.id = OBJ_2F4_182; @@ -2217,8 +2217,8 @@ void func_80070BA8(Object_2F4* obj2F4) { obj2F4->unk_0D0 = 0; if ((obj2F4->unk_0B4 != 0x11) || ((obj2F4->unk_0B4 == 0x11) && (obj2F4->unk_0D2 == 0))) { obj2F4->timer_0C6 = 10; - func_8007C120(obj2F4->unk_0D8.x, obj2F4->unk_0D8.y, obj2F4->unk_0D8.z, obj2F4->unk_0E8.x, obj2F4->unk_0E8.y, - obj2F4->unk_0E8.z, 0.2f, 10); + func_8007C120(obj2F4->unk_0D8.x, obj2F4->unk_0D8.y, obj2F4->unk_0D8.z, obj2F4->vel.x, obj2F4->vel.y, + obj2F4->vel.z, 0.2f, 10); obj2F4->unk_0CE -= obj2F4->unk_0D6; Audio_PlaySfx(0x29033064, &obj2F4->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); if (obj2F4->unk_0CE <= 0) { @@ -2797,21 +2797,21 @@ void func_80071DC0(Object_2F4* obj2F4) { } if (!(gFrameCount & 1)) { - func_8007C120(obj2F4->obj.pos.x + sp38.x, obj2F4->obj.pos.y + sp38.y, obj2F4->obj.pos.z + sp38.z, - obj2F4->unk_0E8.x, obj2F4->unk_0E8.y, obj2F4->unk_0E8.z, 0.3f, 0x14); + func_8007C120(obj2F4->obj.pos.x + sp38.x, obj2F4->obj.pos.y + sp38.y, obj2F4->obj.pos.z + sp38.z, obj2F4->vel.x, + obj2F4->vel.y, obj2F4->vel.z, 0.3f, 0x14); } if (!(gFrameCount & 7)) { - func_8007BFFC(obj2F4->obj.pos.x + sp38.x, obj2F4->obj.pos.y + sp38.y, obj2F4->obj.pos.z + sp38.z, - obj2F4->unk_0E8.x, obj2F4->unk_0E8.y, obj2F4->unk_0E8.z, 10.0f, 9); + func_8007BFFC(obj2F4->obj.pos.x + sp38.x, obj2F4->obj.pos.y + sp38.y, obj2F4->obj.pos.z + sp38.z, obj2F4->vel.x, + obj2F4->vel.y, obj2F4->vel.z, 10.0f, 9); } if (!(gFrameCount & 0xF)) { Audio_PlaySfx(0x2903B009, &obj2F4->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); } - obj2F4->unk_0E8.y -= 0.1f; - obj2F4->unk_0E8.z = 0.0f; + obj2F4->vel.y -= 0.1f; + obj2F4->vel.z = 0.0f; obj2F4->obj.rot.x += 0.2f; obj2F4->obj.rot.z += 0.3f; @@ -2871,7 +2871,7 @@ void func_800722EC(Object_8C* obj8C, f32 xPos, f32 yPos, f32 zPos, f32 yRot) { sp2C.y = 0.0f; sp2C.z = 20.0f; Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp20); - obj8C->unk_54.x = sp20.x; + obj8C->vel.x = sp20.x; obj8C->obj.status = 1; obj8C->obj.id = OBJ_8C_365; obj8C->obj.pos.x = xPos; @@ -2962,8 +2962,8 @@ void func_80072594(Object_2F4* obj2F4) { obj2F4->obj.rot.y += obj2F4->unk_150; obj2F4->obj.rot.x += obj2F4->unk_154; if (!(gFrameCount & 0xF)) { - func_8007C120(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z, obj2F4->unk_0E8.x, obj2F4->unk_0E8.y, - obj2F4->unk_0E8.z, 0.3f, 0xA); + func_8007C120(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z, obj2F4->vel.x, obj2F4->vel.y, + obj2F4->vel.z, 0.3f, 0xA); } } else { if (((obj2F4->unk_0B4 == 0x11) || (obj2F4->unk_0B4 == 0x1E) || (obj2F4->unk_0B4 == 0x1F)) && @@ -3348,26 +3348,26 @@ void func_80072594(Object_2F4* obj2F4) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &spB8, &spAC); - obj2F4->unk_0E8.x = obj2F4->unk_148 + spAC.x; - obj2F4->unk_0E8.y = obj2F4->unk_14C + spAC.y; - obj2F4->unk_0E8.z = spAC.z; + obj2F4->vel.x = obj2F4->unk_148 + spAC.x; + obj2F4->vel.y = obj2F4->unk_14C + spAC.y; + obj2F4->vel.z = spAC.z; obj2F4->unk_148 -= obj2F4->unk_148 * 0.1f; obj2F4->unk_14C -= obj2F4->unk_14C * 0.1f; if (obj2F4->unk_064 == 0x80) { - obj2F4->unk_0E8.z -= obj2F4->unk_16C; + obj2F4->vel.z -= obj2F4->unk_16C; if ((gCurrentLevel == LEVEL_SECTOR_Y) && (D_80177D08 < 0.0f)) { - obj2F4->unk_0E8.z -= D_80177D08; + obj2F4->vel.z -= D_80177D08; } } if (obj2F4->unk_064 == 0x100) { - obj2F4->unk_0E8.z -= D_80177D08; + obj2F4->vel.z -= D_80177D08; } if (gPlayer->state_1C8 == PLAYERSTATE_1C8_8) { - obj2F4->unk_0E8.z = 100.0f; + obj2F4->vel.z = 100.0f; } func_80070D44(obj2F4); @@ -3543,9 +3543,9 @@ void func_80072594(Object_2F4* obj2F4) { obj8C->scale2 = 1.0f; Matrix_RotateY(gCalcMatrix, ((Rand_ZeroOne() * 180.0f) + 180.0f) * M_DTOR, 0); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp84, &sp78); - obj8C->unk_54.x = sp78.x; - obj8C->unk_54.y = sp78.y; - obj8C->unk_54.z = sp78.z; + obj8C->vel.x = sp78.x; + obj8C->vel.y = sp78.y; + obj8C->vel.z = sp78.z; obj8C->unk_60.x = (Rand_ZeroOne() - 0.5f) + 5.0f; obj8C->unk_60.y = (Rand_ZeroOne() - 0.5f) + 5.0f; obj8C->unk_60.z = (Rand_ZeroOne() - 0.5f) + 5.0f; @@ -3572,8 +3572,8 @@ void func_80072594(Object_2F4* obj2F4) { obj8C->scale2 = 9.0f; obj8C->obj.rot.z = Rand_ZeroOne() * 360.0f; - obj8C->unk_54.x = (Rand_ZeroOne() - 0.5f) * 5.0f; - obj8C->unk_54.y = (Rand_ZeroOne() - 0.5f) * 3.0f + 30.0f; + obj8C->vel.x = (Rand_ZeroOne() - 0.5f) * 5.0f; + obj8C->vel.y = (Rand_ZeroOne() - 0.5f) * 3.0f + 30.0f; obj8C->unk_44 = 100; obj8C->unk_46 = -8; obj8C->unk_60.z = 3; @@ -3583,7 +3583,7 @@ void func_80072594(Object_2F4* obj2F4) { } if (gFrameCount & 2) { - obj8C->unk_54.y = -obj8C->unk_54.y; + obj8C->vel.y = -obj8C->vel.y; } } @@ -3597,8 +3597,8 @@ void func_80072594(Object_2F4* obj2F4) { obj8C->obj.pos.z = ((Rand_ZeroOne() - 0.5f) * 3.0f) + obj2F4->obj.pos.z + 200.0f; obj8C->scale2 = 9.0f; obj8C->obj.rot.z = Rand_ZeroOne() * 360.0f; - obj8C->unk_54.x = (Rand_ZeroOne() - 0.5f) * 5.0f; - obj8C->unk_54.y = (Rand_ZeroOne() - 0.5f) * 3.0f + 10.0f; + obj8C->vel.x = (Rand_ZeroOne() - 0.5f) * 5.0f; + obj8C->vel.y = (Rand_ZeroOne() - 0.5f) * 3.0f + 10.0f; obj8C->unk_44 = 100; obj8C->unk_46 = -8; obj8C->unk_60.z = 3; @@ -3608,7 +3608,7 @@ void func_80072594(Object_2F4* obj2F4) { } if (gFrameCount & 4) { - obj8C->unk_54.y = -obj8C->unk_54.y; + obj8C->vel.y = -obj8C->vel.y; } } } @@ -3788,8 +3788,8 @@ void func_80074FF0(Object_2F4* obj2F4) { if ((obj2F4->unk_0B4 != 0xD) && (obj2F4->unk_0B4 != 0xE) && (obj2F4->unk_0B4 != 0x3D) && (obj2F4->unk_0B4 != 0x3E) && (obj2F4->unk_0B4 != 0x53) && (obj2F4->unk_0B4 != 0x62) && (obj2F4->scale > 0.5f) && (obj2F4->timer_0C6 >= 9) && !(obj2F4->timer_0C6 & 3) && (D_80177854 != 0x64)) { - func_8007C120(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z, obj2F4->unk_0E8.x, obj2F4->unk_0E8.y, - obj2F4->unk_0E8.z, obj2F4->scale * 0.07f, 3); + func_8007C120(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z, obj2F4->vel.x, obj2F4->vel.y, + obj2F4->vel.z, obj2F4->scale * 0.07f, 3); } if ((obj2F4->unk_0B4 != 0x15) && (obj2F4->unk_0B4 != 0x17) && (obj2F4->unk_0B4 != 0x4F) && @@ -4125,18 +4125,18 @@ void func_800763A4(Object_2F4* obj2F4) { s32 pad; if (obj2F4->unk_0B4 == 27) { - obj2F4->obj.pos.y -= obj2F4->unk_0E8.y; + obj2F4->obj.pos.y -= obj2F4->vel.y; obj2F4->obj.status = 2; - func_8007D0E0(obj2F4->obj.pos.x - obj2F4->unk_0E8.x, obj2F4->obj.pos.y + 30.0f, - obj2F4->obj.pos.z - obj2F4->unk_0E8.z, obj2F4->scale * 5.0f); + func_8007D0E0(obj2F4->obj.pos.x - obj2F4->vel.x, obj2F4->obj.pos.y + 30.0f, obj2F4->obj.pos.z - obj2F4->vel.z, + obj2F4->scale * 5.0f); obj2F4->timer_0C2 = 10000; return; } if (obj2F4->timer_0BE != 0) { - obj2F4->unk_0E8.z = 0.0f; - obj2F4->unk_0E8.x = 0.0f; - obj2F4->unk_0E8.y = 0.0f; + obj2F4->vel.z = 0.0f; + obj2F4->vel.x = 0.0f; + obj2F4->vel.y = 0.0f; if (obj2F4->timer_0BE == 1) { Object_Kill(&obj2F4->obj, &obj2F4->sfxPos); @@ -4151,7 +4151,7 @@ void func_800763A4(Object_2F4* obj2F4) { } } else { if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) { - obj2F4->unk_10C = 0.4f; + obj2F4->gravity = 0.4f; } switch (obj2F4->timer_04C) { case 0: @@ -4171,7 +4171,7 @@ void func_800763A4(Object_2F4* obj2F4) { case 3: obj2F4->obj.rot.y += 6.0f; obj2F4->obj.rot.x += 18.3f; - obj2F4->unk_10C = 0.7f; + obj2F4->gravity = 0.7f; break; case 4: @@ -4196,40 +4196,39 @@ void func_800763A4(Object_2F4* obj2F4) { if (func_E6A810_801B6AEC(obj2F4->obj.pos.x, obj2F4->obj.pos.y - 10.0f, obj2F4->obj.pos.z + D_80177D20) != 0) { func_8007D2C8(obj2F4->obj.pos.x, obj2F4->obj.pos.y + 20.0f, obj2F4->obj.pos.z, obj2F4->scale * 6.0f); - func_8007BFFC(obj2F4->obj.pos.x - obj2F4->unk_0E8.x, obj2F4->obj.pos.y + 30.0f, - obj2F4->obj.pos.z - obj2F4->unk_0E8.z, 0.0f, 0.0f, 0.0f, obj2F4->scale * 4.0f, 20); + func_8007BFFC(obj2F4->obj.pos.x - obj2F4->vel.x, obj2F4->obj.pos.y + 30.0f, + obj2F4->obj.pos.z - obj2F4->vel.z, 0.0f, 0.0f, 0.0f, obj2F4->scale * 4.0f, 20); func_80062C38(obj2F4->obj.pos.x, obj2F4->obj.pos.z); obj2F4->timer_0BE = 2; func_8007A6F0(&obj2F4->obj.pos, 0x2903A008); return; } } else { - sp4C.x = obj2F4->unk_0E8.x; - sp4C.y = obj2F4->unk_0E8.y; - sp4C.z = obj2F4->unk_0E8.z; + sp4C.x = obj2F4->vel.x; + sp4C.y = obj2F4->vel.y; + sp4C.z = obj2F4->vel.z; sp60 = func_8006351C(obj2F4->index, &obj2F4->obj.pos, &sp4C, 0); if ((sp60 != 0) || (obj2F4->obj.pos.y < (D_80177940 + 30.0f))) { if ((Rand_ZeroOne() < 0.5f) && (obj2F4->timer_04C < 3) && (gLevelType == LEVELTYPE_PLANET) && - (sp60 != 999) && (D_80161A88 != 2) && - ((obj2F4->unk_0E8.z < -20.0f) || (obj2F4->unk_0E8.z > 0.0f))) { + (sp60 != 999) && (D_80161A88 != 2) && ((obj2F4->vel.z < -20.0f) || (obj2F4->vel.z > 0.0f))) { if (gCurrentLevel == LEVEL_FORTUNA) { - func_8006BF7C(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z - obj2F4->unk_0E8.z); + func_8006BF7C(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z - obj2F4->vel.z); func_80062C38(obj2F4->obj.pos.x, obj2F4->obj.pos.z); } - obj2F4->obj.pos.y -= obj2F4->unk_0E8.y; - obj2F4->unk_0E8.y = Rand_ZeroOne() * 10.0f; + obj2F4->obj.pos.y -= obj2F4->vel.y; + obj2F4->vel.y = Rand_ZeroOne() * 10.0f; obj2F4->timer_04C = 3; if (gLevelMode == LEVELMODE_ALL_RANGE) { - func_8007D2C8(obj2F4->obj.pos.x - obj2F4->unk_0E8.x, obj2F4->obj.pos.y, - obj2F4->obj.pos.z - obj2F4->unk_0E8.z, obj2F4->scale * 3.0f); + func_8007D2C8(obj2F4->obj.pos.x - obj2F4->vel.x, obj2F4->obj.pos.y, + obj2F4->obj.pos.z - obj2F4->vel.z, obj2F4->scale * 3.0f); } - func_8007D2C8(obj2F4->obj.pos.x - obj2F4->unk_0E8.x, obj2F4->obj.pos.y, - obj2F4->obj.pos.z - obj2F4->unk_0E8.z, obj2F4->scale * 3.0f); + func_8007D2C8(obj2F4->obj.pos.x - obj2F4->vel.x, obj2F4->obj.pos.y, + obj2F4->obj.pos.z - obj2F4->vel.z, obj2F4->scale * 3.0f); if ((obj2F4->obj.id == OBJ_2F4_197) && (obj2F4->unk_0E4 < 8)) { func_8007A6F0(&obj2F4->obj.pos, 0x2903B009); @@ -4249,7 +4248,7 @@ void func_800763A4(Object_2F4* obj2F4) { } } else { if ((obj2F4->obj.pos.y < (D_80177940 + 30.0f)) && (gLevelType == LEVELTYPE_PLANET)) { - obj2F4->unk_0E8.z = 0.0f; + obj2F4->vel.z = 0.0f; if (D_80161A88 == 2) { func_8007D9DC(obj2F4->obj.pos.x, D_80177940 + 2.0f, obj2F4->obj.pos.z, 3.0f, 20.0f, 0); func_8007D9DC(obj2F4->obj.pos.x, D_80177940 + 2.0f, obj2F4->obj.pos.z, 3.0f, 20.0f, 10); @@ -4269,12 +4268,12 @@ void func_800763A4(Object_2F4* obj2F4) { } } - obj2F4->obj.pos.y -= obj2F4->unk_0E8.y; - func_8007D0E0(obj2F4->obj.pos.x - obj2F4->unk_0E8.x, obj2F4->obj.pos.y + 30.0f, - obj2F4->obj.pos.z - obj2F4->unk_0E8.z, obj2F4->scale * 5.0f); + obj2F4->obj.pos.y -= obj2F4->vel.y; + func_8007D0E0(obj2F4->obj.pos.x - obj2F4->vel.x, obj2F4->obj.pos.y + 30.0f, + obj2F4->obj.pos.z - obj2F4->vel.z, obj2F4->scale * 5.0f); if (gLevelMode == LEVELMODE_ALL_RANGE) { - func_8007BFFC(obj2F4->obj.pos.x, obj2F4->obj.pos.y + 30.0f, obj2F4->obj.pos.z, - obj2F4->unk_0E8.x, 10.0f, obj2F4->unk_0E8.z, obj2F4->scale * 3.0f, 20); + func_8007BFFC(obj2F4->obj.pos.x, obj2F4->obj.pos.y + 30.0f, obj2F4->obj.pos.z, obj2F4->vel.x, + 10.0f, obj2F4->vel.z, obj2F4->scale * 3.0f, 20); if (sp60 == 999) { func_8007C688(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z, obj2F4->scale * 3.0f, 70); @@ -4289,8 +4288,8 @@ void func_800763A4(Object_2F4* obj2F4) { } } } else { - func_8007BFFC(obj2F4->obj.pos.x - obj2F4->unk_0E8.x, obj2F4->obj.pos.y + 30.0f, - (obj2F4->obj.pos.z - obj2F4->unk_0E8.z) + 48.0f, 0.0f, 0.0f, 0.0f, + func_8007BFFC(obj2F4->obj.pos.x - obj2F4->vel.x, obj2F4->obj.pos.y + 30.0f, + (obj2F4->obj.pos.z - obj2F4->vel.z) + 48.0f, 0.0f, 0.0f, 0.0f, obj2F4->scale * 3.0f, 5); } @@ -4317,18 +4316,18 @@ void func_800763A4(Object_2F4* obj2F4) { } } - func_8007BFFC(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z, obj2F4->unk_0E8.x, - obj2F4->unk_0E8.y, obj2F4->unk_0E8.z, 5.0f, 15); - func_8007D0E0(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z - obj2F4->unk_0E8.z, 8.0f); + func_8007BFFC(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z, obj2F4->vel.x, obj2F4->vel.y, + obj2F4->vel.z, 5.0f, 15); + func_8007D0E0(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z - obj2F4->vel.z, 8.0f); } else { if ((obj2F4->unk_0B4 != 0xD) && (obj2F4->unk_0B4 != 61)) { - func_8007D0E0(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z - obj2F4->unk_0E8.z, + func_8007D0E0(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z - obj2F4->vel.z, obj2F4->scale * 5.0f); } if (obj2F4->unk_0B4 == 0x24) { - func_8007BFFC(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z, obj2F4->unk_0E8.x, - obj2F4->unk_0E8.y, obj2F4->unk_0E8.z, 5.0f, 0xF); + func_8007BFFC(obj2F4->obj.pos.x, obj2F4->obj.pos.y, obj2F4->obj.pos.z, obj2F4->vel.x, obj2F4->vel.y, + obj2F4->vel.z, 5.0f, 0xF); } } @@ -4365,9 +4364,9 @@ void func_800771CC(Object_2F4* obj2F4) { Vec3f sp24; Math_Vec3fFromAngles(&sp24, obj2F4->obj.rot.x, obj2F4->obj.rot.y, 50.0f); - obj2F4->unk_0E8.x = sp24.x; - obj2F4->unk_0E8.y = sp24.y; - obj2F4->unk_0E8.z = sp24.z; + obj2F4->vel.x = sp24.x; + obj2F4->vel.y = sp24.y; + obj2F4->vel.z = sp24.z; } void func_80077218(Object_2F4* obj2F4) { diff --git a/src/main/fox_play.c b/src/main/fox_play.c index 17961c2e..dbb0ba99 100644 --- a/src/main/fox_play.c +++ b/src/main/fox_play.c @@ -694,30 +694,30 @@ void func_800A670C(Object_2F4* obj2F4, s32 arg1, f32 arg2, f32 arg3, f32 arg4) { obj2F4->obj.pos.x = arg2; obj2F4->obj.pos.y = arg3; obj2F4->obj.pos.z = arg4; - obj2F4->unk_10C = 0.5f; + obj2F4->gravity = 0.5f; if ((arg1 == 0) || (arg1 == 1)) { - obj2F4->unk_0E8.y = (Rand_ZeroOne() * 5.0f) + 10.0f; - obj2F4->unk_0E8.x = 10.0f; + obj2F4->vel.y = (Rand_ZeroOne() * 5.0f) + 10.0f; + obj2F4->vel.x = 10.0f; if (arg1 == 0) { - obj2F4->unk_0E8.x = -10.0f; + obj2F4->vel.x = -10.0f; } obj2F4->timer_0BC = 15; } else { if (gLevelType == LEVELTYPE_PLANET) { - obj2F4->unk_0E8.y = (Rand_ZeroOne() * 7.0f) + 7.0f; - obj2F4->unk_0E8.x = (Rand_ZeroOne() - 0.5f) * 10.0f; - obj2F4->unk_0E8.z = (Rand_ZeroOne() * 5.0f) + 5.0f; + obj2F4->vel.y = (Rand_ZeroOne() * 7.0f) + 7.0f; + obj2F4->vel.x = (Rand_ZeroOne() - 0.5f) * 10.0f; + obj2F4->vel.z = (Rand_ZeroOne() * 5.0f) + 5.0f; if (gLevelMode == LEVELMODE_ALL_RANGE) { - obj2F4->unk_0E8.z = (Rand_ZeroOne() - 0.5f) * 10.0f; + obj2F4->vel.z = (Rand_ZeroOne() - 0.5f) * 10.0f; } obj2F4->timer_0BC = (s32) (Rand_ZeroOne() * 10.0f) + 10; } else { - obj2F4->unk_0E8.x = (Rand_ZeroOne() - 0.5f) * 10.0f; - obj2F4->unk_0E8.y = (Rand_ZeroOne() - 0.5f) * 10.0f; - obj2F4->unk_0E8.z = (Rand_ZeroOne() - 0.5f) * 10.0f; + obj2F4->vel.x = (Rand_ZeroOne() - 0.5f) * 10.0f; + obj2F4->vel.y = (Rand_ZeroOne() - 0.5f) * 10.0f; + obj2F4->vel.z = (Rand_ZeroOne() - 0.5f) * 10.0f; obj2F4->timer_0BC = (s32) (Rand_ZeroOne() * 25.0f) + 25; - obj2F4->unk_10C = 0.0f; + obj2F4->gravity = 0.0f; } if (arg1 == 2) { obj2F4->scale = (Rand_ZeroOne() * 1.5f) + 0.75f; diff --git a/src/main/sf_43E80.c b/src/main/sf_43E80.c index a77cb57d..7c41d022 100644 --- a/src/main/sf_43E80.c +++ b/src/main/sf_43E80.c @@ -147,9 +147,9 @@ void func_800438E0(Object_8C* obj8C, f32 xPos, f32 yPos, f32 zPos, f32 scale) { obj8C->obj.pos.x = xPos; obj8C->obj.pos.y = yPos; obj8C->obj.pos.z = zPos; - obj8C->unk_54.x = Rand_ZeroOne() - (2.0f * Rand_ZeroOne()); - obj8C->unk_54.y = ((Rand_ZeroOne() * 3.0f) - (gPlayer->vel.z / 5.0f)) + 3.0f; - obj8C->unk_54.z = ((Rand_ZeroOne() * 3.0f) - (gPlayer->vel.z / 5.0f)) + 2.0f; + obj8C->vel.x = Rand_ZeroOne() - (2.0f * Rand_ZeroOne()); + obj8C->vel.y = ((Rand_ZeroOne() * 3.0f) - (gPlayer->vel.z / 5.0f)) + 3.0f; + obj8C->vel.z = ((Rand_ZeroOne() * 3.0f) - (gPlayer->vel.z / 5.0f)) + 2.0f; obj8C->scale2 = ((Rand_ZeroOne() * 0.8f) + 0.3f) * scale; obj8C->timer_50 = (s32) (Rand_ZeroOne() * 5.0f) + 8; obj8C->obj.rot.x = Rand_ZeroOne() * 360.0f; @@ -1427,12 +1427,12 @@ void func_800481F4(Player* player) { obj2F4->obj.pos.z, obj2F4->obj.rot.x, obj2F4->obj.rot.y, obj2F4->obj.rot.z, 0.0f, 0.0f, 0.0f) != 0) { if (player->pos.x < obj2F4->obj.pos.x) { - player->unk_0D8.x = (obj2F4->unk_0E8.z > 5.0f) ? -5.0f : -1.5f; + player->unk_0D8.x = (obj2F4->vel.z > 5.0f) ? -5.0f : -1.5f; player->unk_1DC = 8; player->timer_1E8 = 15; player->unk_1EC = player->unk_1F0 = 20; } else { - player->unk_0D8.x = (obj2F4->unk_0E8.z > 5.0f) ? 5.0f : 1.5f; + player->unk_0D8.x = (obj2F4->vel.z > 5.0f) ? 5.0f : 1.5f; player->unk_1DC = 8; player->timer_1E8 = 15; player->unk_1EC = player->unk_1F0 = -20; @@ -1453,12 +1453,12 @@ void func_800481F4(Player* player) { Math_SmoothStepToF(&player->unk_0D0, 15.0f, 0.3f, 3.5f, 0.001f); Math_SmoothStepToF(&player->unk_08C, 0, 0.3f, 3.5f, 0.001f); if (player->pos.x < (obj2F4->unk_170 + obj2F4->obj.pos.x)) { - player->unk_0D8.x = (obj2F4->unk_0E8.z > 5.0f) ? -5.0f : -1.5f; + player->unk_0D8.x = (obj2F4->vel.z > 5.0f) ? -5.0f : -1.5f; player->unk_1DC = 8; player->timer_1E8 = 15; player->unk_1EC = player->unk_1F0 = 20; } else { - player->unk_0D8.x = (obj2F4->unk_0E8.z > 5.0f) ? 5.0f : 1.5f; + player->unk_0D8.x = (obj2F4->vel.z > 5.0f) ? 5.0f : 1.5f; player->unk_1DC = 8; player->timer_1E8 = 15; player->unk_1EC = player->unk_1F0 = -20; diff --git a/src/main/sf_77E40.c b/src/main/sf_77E40.c index 7caf8282..1942b6b7 100644 --- a/src/main/sf_77E40.c +++ b/src/main/sf_77E40.c @@ -135,9 +135,9 @@ void func_800778C4(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 arg4, f32 obj8C->obj.pos.x = posX; obj8C->obj.pos.y = posY; obj8C->obj.pos.z = posZ; - obj8C->unk_54.x = arg4; - obj8C->unk_54.y = arg5; - obj8C->unk_54.z = arg6; + obj8C->vel.x = arg4; + obj8C->vel.y = arg5; + obj8C->vel.z = arg6; obj8C->scale2 = arg7; obj8C->unk_4C = 0; obj8C->scale1 = 0.5f; @@ -422,9 +422,9 @@ void func_80078D60(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 arg4) { obj8C->obj.pos.z = posZ; obj8C->scale2 = arg4; if (arg4 == 3.1f) { - obj8C->unk_54.x = gObjects2F4[8].unk_0E8.x; - obj8C->unk_54.y = gObjects2F4[8].unk_0E8.y; - obj8C->unk_54.z = gObjects2F4[8].unk_0E8.z; + obj8C->vel.x = gObjects2F4[8].vel.x; + obj8C->vel.y = gObjects2F4[8].vel.y; + obj8C->vel.z = gObjects2F4[8].vel.z; } if (arg4 != 30.0f) { obj8C->unk_4E = 1; @@ -449,9 +449,9 @@ void func_80078E50(f32 posX, f32 posY, f32 posZ, f32 arg3) { void func_80078EBC(Object_8C* obj8C) { if (obj8C->unk_4E == 2) { - obj8C->unk_54.x = gPlayer[0].vel.x; - obj8C->unk_54.y = gPlayer[0].vel.y; - obj8C->unk_54.z = gPlayer[0].vel.z; + obj8C->vel.x = gPlayer[0].vel.x; + obj8C->vel.y = gPlayer[0].vel.y; + obj8C->vel.z = gPlayer[0].vel.z; } obj8C->obj.rot.z += 35.0f; if (obj8C->timer_50 >= 7) { @@ -493,15 +493,15 @@ void func_8007905C(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 arg4, u8 obj8C->obj.pos.z = posZ; obj8C->unk_4C = arg5; if (arg4 == 1.6f) { - obj8C->unk_54.x = (posX - gObjects408[1].obj.pos.x) * 0.1f; - obj8C->unk_54.z = (posZ - gObjects408[1].obj.pos.z) * 0.1f; + obj8C->vel.x = (posX - gObjects408[1].obj.pos.x) * 0.1f; + obj8C->vel.z = (posZ - gObjects408[1].obj.pos.z) * 0.1f; } else if (arg4 == 1.3f) { - obj8C->unk_54.x = ((Rand_ZeroOne() * 0.05f) + 0.03f) * posX; - obj8C->unk_54.z = ((Rand_ZeroOne() * 0.05f) + 0.03f) * posZ; - obj8C->unk_54.y = 5.0f; + obj8C->vel.x = ((Rand_ZeroOne() * 0.05f) + 0.03f) * posX; + obj8C->vel.z = ((Rand_ZeroOne() * 0.05f) + 0.03f) * posZ; + obj8C->vel.y = 5.0f; } else if (arg4 == 1.55f) { - obj8C->unk_54.x = (Rand_ZeroOne() - 0.5f) * 10.0f; - obj8C->unk_54.z = (Rand_ZeroOne() - 0.5f) * 10.0f; + obj8C->vel.x = (Rand_ZeroOne() - 0.5f) * 10.0f; + obj8C->vel.z = (Rand_ZeroOne() - 0.5f) * 10.0f; } else if ((gCurrentLevel == LEVEL_BOLSE) && ((arg4 == 5.11f) || (arg4 == 7.22f))) { sp3C.x = gPlayer[0].pos.x; sp3C.y = gPlayer[0].pos.y; @@ -515,14 +515,14 @@ void func_8007905C(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 arg4, u8 sp54.y = (Rand_ZeroOne() - 0.5f) * 50.0f; sp54.z = (Rand_ZeroOne() * 10.0f) + 150.0f; Matrix_MultVec3f(gCalcMatrix, &sp54, &sp48); - obj8C->unk_54.x = sp48.x; - obj8C->unk_54.y = sp48.y; - obj8C->unk_54.z = sp48.z; + obj8C->vel.x = sp48.x; + obj8C->vel.y = sp48.y; + obj8C->vel.z = sp48.z; } else { - obj8C->unk_54.y = + obj8C->vel.y = (gLevelType == LEVELTYPE_PLANET) ? (Rand_ZeroOne() * 7.0f) + 7.0f : (Rand_ZeroOne() - 0.5f) * 10.0f; - obj8C->unk_54.x = (Rand_ZeroOne() - 0.5f) * 10.0f; - obj8C->unk_54.z = (Rand_ZeroOne() - 0.5f) * 10.0f; + obj8C->vel.x = (Rand_ZeroOne() - 0.5f) * 10.0f; + obj8C->vel.z = (Rand_ZeroOne() - 0.5f) * 10.0f; } obj8C->scale2 = ((Rand_ZeroOne() * 0.8f) + 0.3f) * arg4; obj8C->timer_50 = (s32) (Rand_ZeroOne() * 50.0f) + 0x46; @@ -594,12 +594,12 @@ void func_8007968C(Object_8C* obj8C) { obj8C->obj.rot.y += obj8C->unk_60.y; obj8C->obj.rot.z += obj8C->unk_60.z; if (gLevelType == LEVELTYPE_PLANET) { - obj8C->unk_54.y -= 0.5f; + obj8C->vel.y -= 0.5f; } if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (D_80177A80 >= 176)) { - obj8C->unk_54.x *= 0.95f; - obj8C->unk_54.y *= 0.95f; - obj8C->unk_54.z *= 0.95f; + obj8C->vel.x *= 0.95f; + obj8C->vel.y *= 0.95f; + obj8C->vel.z *= 0.95f; } if ((gCurrentLevel == LEVEL_MACBETH) && (obj8C->unk_44 == 10)) { obj8C->obj.rot.x = 0.0f; @@ -882,7 +882,7 @@ void func_8007A818(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 arg4, u8 obj8C->unk_60.z = (Rand_ZeroOne() - 0.5f) * 10.0f; obj8C->unk_60.y = arg4 * 0.1f; if (arg7 != 0) { - obj8C->unk_54.x = (Rand_ZeroOne() - 0.5f) * 30.0f; + obj8C->vel.x = (Rand_ZeroOne() - 0.5f) * 30.0f; } Object_SetInfo(&obj8C->info, obj8C->obj.id); } @@ -903,7 +903,7 @@ void func_8007A900(f32 posX, f32 posY, f32 posZ, f32 arg3, u8 arg4, u8 arg5, u16 void func_8007A994(Object_8C* obj8C) { Math_SmoothStepToF(&obj8C->scale2, obj8C->scale1, 0.1f, 10.0f, 0.01f); obj8C->obj.rot.z += obj8C->unk_60.z; - obj8C->unk_54.y += obj8C->unk_60.y; + obj8C->vel.y += obj8C->unk_60.y; if (obj8C->unk_4A & 1) { obj8C->unk_48++; if (obj8C->unk_48 >= 6) { @@ -960,8 +960,8 @@ void func_8007AC0C(Object_8C* obj8C, f32 posX, f32 unused_posY, f32 posZ, f32 ar obj8C->scale2 = arg4; obj8C->scale1 = arg5; obj8C->obj.rot.y = arg6; - obj8C->unk_54.x = gPlayer[0].vel.x * 0.6f; - obj8C->unk_54.z = gPlayer[0].vel.z * 0.6; // Forgotten f means bad codegen + obj8C->vel.x = gPlayer[0].vel.x * 0.6f; + obj8C->vel.z = gPlayer[0].vel.z * 0.6; // Forgotten f means bad codegen Object_SetInfo(&obj8C->info, obj8C->obj.id); } @@ -1017,8 +1017,8 @@ void func_8007AF30(Object_8C* obj8C, f32 posX, f32 posZ, f32 arg3, f32 arg4, f32 obj8C->obj.pos.x = posX; obj8C->obj.pos.y = -10.0f; obj8C->obj.pos.z = posZ; - obj8C->unk_54.x = arg3; - obj8C->unk_54.z = arg4 - D_80177D08; + obj8C->vel.x = arg3; + obj8C->vel.z = arg4 - D_80177D08; obj8C->scale1 = arg5; obj8C->timer_50 = 0x64; Object_SetInfo(&obj8C->info, obj8C->obj.id); @@ -1200,9 +1200,9 @@ void func_8007B67C(Object_8C* obj8C) { if (var_v1 > 10) { var_v1 -= 10; } - obj8C->unk_54.x = gPlayer[var_v1 - 1].vel.x; - obj8C->unk_54.y = gPlayer[var_v1 - 1].vel.y; - obj8C->unk_54.z = gPlayer[var_v1 - 1].vel.z; + obj8C->vel.x = gPlayer[var_v1 - 1].vel.x; + obj8C->vel.y = gPlayer[var_v1 - 1].vel.y; + obj8C->vel.z = gPlayer[var_v1 - 1].vel.z; } } @@ -1222,8 +1222,8 @@ void func_8007B7E8(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 arg4) { obj8C->obj.pos.x = posX; obj8C->obj.pos.y = posY; obj8C->obj.pos.z = posZ; - obj8C->unk_54.x = (Rand_ZeroOne() - 0.5f) * 5.0f; - obj8C->unk_54.y = (Rand_ZeroOne() - 0.5f) * 3.0f; + obj8C->vel.x = (Rand_ZeroOne() - 0.5f) * 5.0f; + obj8C->vel.y = (Rand_ZeroOne() - 0.5f) * 3.0f; obj8C->unk_48 = 3; if (Rand_ZeroOne() < 0.5f) { obj8C->unk_48 = -obj8C->unk_48; @@ -1253,17 +1253,17 @@ void func_8007B960(Object_8C* obj8C) { Object_Kill(&obj8C->obj, &obj8C->sfxPos); } obj8C->obj.rot.z += obj8C->unk_48; - obj8C->unk_54.y += 0.2f; + obj8C->vel.y += 0.2f; } -void func_8007B9DC(Object_8C* arg0) { +void func_8007B9DC(Object_8C* obj8C) { //! DEBUG if (gControllerHold[3].button & Z_TRIG) { RCP_SetupDL(&gMasterDisp, 4); } - Graphics_SetScaleMtx(arg0->scale2); + Graphics_SetScaleMtx(obj8C->scale2); if (gCurrentLevel != LEVEL_MACBETH) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 140, 99, 58, arg0->unk_4A); + gDPSetPrimColor(gMasterDisp++, 0, 0, 140, 99, 58, obj8C->unk_4A); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, (gFrameCount & 3) + 5, (gFrameCount & 3) + 3, (gFrameCount & 3) + 3, 220); } @@ -1277,31 +1277,31 @@ void func_8007B9DC(Object_8C* arg0) { } } -void func_8007BB14(Object_8C* arg0, f32 posX, f32 posY, f32 posZ, f32 arg4) { - Object_8C_Initialize(arg0); - arg0->obj.status = 1; - arg0->obj.id = OBJ_8C_362; - arg0->obj.pos.x = posX; - arg0->obj.pos.y = posY; - arg0->obj.pos.z = posZ; - arg0->unk_54.x = (Rand_ZeroOne() - 0.5f) * 5.0f; - arg0->unk_54.y = (Rand_ZeroOne() - 0.5f) * 3.0f; - arg0->unk_48 = 3; +void func_8007BB14(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 arg4) { + Object_8C_Initialize(obj8C); + obj8C->obj.status = 1; + obj8C->obj.id = OBJ_8C_362; + obj8C->obj.pos.x = posX; + obj8C->obj.pos.y = posY; + obj8C->obj.pos.z = posZ; + obj8C->vel.x = (Rand_ZeroOne() - 0.5f) * 5.0f; + obj8C->vel.y = (Rand_ZeroOne() - 0.5f) * 3.0f; + obj8C->unk_48 = 3; if (Rand_ZeroOne() < 0.5f) { - arg0->unk_48 = -arg0->unk_48; + obj8C->unk_48 = -obj8C->unk_48; } - arg0->unk_4A = 0xB4; - arg0->unk_46 = 8; + obj8C->unk_4A = 0xB4; + obj8C->unk_46 = 8; if (arg4 > 15.0f) { - arg0->unk_46 = 5; - arg0->unk_4A = 0x50; + obj8C->unk_46 = 5; + obj8C->unk_4A = 0x50; } - arg0->scale2 = arg4 * 0.25f; - arg0->obj.rot.z = Rand_ZeroOne() * 360.0f; + obj8C->scale2 = arg4 * 0.25f; + obj8C->obj.rot.z = Rand_ZeroOne() * 360.0f; if (arg4 == 6.0f) { - arg0->unk_54.z = gPlayer->vel.z * 0.6f; + obj8C->vel.z = gPlayer->vel.z * 0.6f; } - Object_SetInfo(&arg0->info, arg0->obj.id); + Object_SetInfo(&obj8C->info, obj8C->obj.id); } void func_8007BC7C(f32 posX, f32 posY, f32 posZ, f32 arg3) { @@ -1315,64 +1315,64 @@ void func_8007BC7C(f32 posX, f32 posY, f32 posZ, f32 arg3) { } } -void func_8007BCE8(Object_8C* arg0) { +void func_8007BCE8(Object_8C* obj8C) { if (gPlayer->state_1C8 == PLAYERSTATE_1C8_7) { - arg0->obj.rot.x = (gPlayer->unk_05C * 180.0f) / M_PI; - arg0->obj.rot.y = (-gPlayer->unk_058 * 180.0f) / M_PI; + obj8C->obj.rot.x = (gPlayer->unk_05C * 180.0f) / M_PI; + obj8C->obj.rot.y = (-gPlayer->unk_058 * 180.0f) / M_PI; } if (gPlayer->state_1C8 == PLAYERSTATE_1C8_6) { - arg0->unk_46 = 2; - arg0->unk_54.y -= 0.13f; + obj8C->unk_46 = 2; + obj8C->vel.y -= 0.13f; } - arg0->scale2 += 0.07f; - arg0->unk_4A -= arg0->unk_46; - if (arg0->unk_4A < 0) { - Object_Kill(&arg0->obj, &arg0->sfxPos); + obj8C->scale2 += 0.07f; + obj8C->unk_4A -= obj8C->unk_46; + if (obj8C->unk_4A < 0) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); } - arg0->obj.rot.z += arg0->unk_48; - arg0->unk_54.y += 0.2f; + obj8C->obj.rot.z += obj8C->unk_48; + obj8C->vel.y += 0.2f; } -void func_8007BDE0(Object_8C* arg0) { - arg0->scale2 += 0.04f; - arg0->unk_4A -= 2; - if (arg0->unk_4A < 0) { - Object_Kill(&arg0->obj, &arg0->sfxPos); +void func_8007BDE0(Object_8C* obj8C) { + obj8C->scale2 += 0.04f; + obj8C->unk_4A -= 2; + if (obj8C->unk_4A < 0) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); } - arg0->obj.rot.z += arg0->unk_48; - arg0->unk_54.y += arg0->scale1; + obj8C->obj.rot.z += obj8C->unk_48; + obj8C->vel.y += obj8C->scale1; } -void func_8007BE54(Object_8C* arg0) { - arg0->scale2 += 0.02f; - arg0->unk_4A -= 3; - if (arg0->unk_4A < 0) { - Object_Kill(&arg0->obj, &arg0->sfxPos); +void func_8007BE54(Object_8C* obj8C) { + obj8C->scale2 += 0.02f; + obj8C->unk_4A -= 3; + if (obj8C->unk_4A < 0) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); } - arg0->unk_54.z = gPlayer->vel.z + 7.0f; - arg0->obj.rot.z += arg0->unk_48; - arg0->unk_54.y += 0.1f; + obj8C->vel.z = gPlayer->vel.z + 7.0f; + obj8C->obj.rot.z += obj8C->unk_48; + obj8C->vel.y += 0.1f; } -void func_8007BEE8(Object_8C* arg0) { - Graphics_SetScaleMtx(arg0->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, arg0->unk_4A); +void func_8007BEE8(Object_8C* obj8C) { + Graphics_SetScaleMtx(obj8C->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, obj8C->unk_4A); gSPDisplayList(gMasterDisp++, D_2010A30); } -void func_8007BF64(Object_8C* arg0, f32 posX, f32 posY, f32 posZ, f32 x, f32 y, f32 z, f32 arg7, s32 arg8) { - Object_8C_Initialize(arg0); - arg0->obj.status = 1; - arg0->obj.id = OBJ_8C_386; - arg0->obj.pos.x = posX; - arg0->obj.pos.y = posY; - arg0->obj.pos.z = posZ; - arg0->unk_54.x = x; - arg0->unk_54.y = y; - arg0->unk_54.z = z; - arg0->scale2 = arg7; - arg0->timer_50 = arg8; - Object_SetInfo(&arg0->info, arg0->obj.id); +void func_8007BF64(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 x, f32 y, f32 z, f32 arg7, s32 arg8) { + Object_8C_Initialize(obj8C); + obj8C->obj.status = 1; + obj8C->obj.id = OBJ_8C_386; + obj8C->obj.pos.x = posX; + obj8C->obj.pos.y = posY; + obj8C->obj.pos.z = posZ; + obj8C->vel.x = x; + obj8C->vel.y = y; + obj8C->vel.z = z; + obj8C->scale2 = arg7; + obj8C->timer_50 = arg8; + Object_SetInfo(&obj8C->info, obj8C->obj.id); } void func_8007BFFC(f32 posX, f32 posY, f32 posZ, f32 x, f32 y, f32 z, f32 arg6, s32 arg7) { @@ -1386,19 +1386,19 @@ void func_8007BFFC(f32 posX, f32 posY, f32 posZ, f32 x, f32 y, f32 z, f32 arg6, } } -void func_8007C088(Object_8C* arg0, f32 posX, f32 posY, f32 posZ, f32 x, f32 y, f32 z, f32 arg7, s32 arg8) { - Object_8C_Initialize(arg0); - arg0->obj.status = 1; - arg0->obj.id = OBJ_8C_390; - arg0->obj.pos.x = posX; - arg0->obj.pos.y = posY; - arg0->obj.pos.z = posZ; - arg0->unk_54.x = x; - arg0->unk_54.y = y; - arg0->unk_54.z = z; - arg0->scale2 = arg7; - arg0->timer_50 = arg8; - Object_SetInfo(&arg0->info, arg0->obj.id); +void func_8007C088(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 x, f32 y, f32 z, f32 arg7, s32 arg8) { + Object_8C_Initialize(obj8C); + obj8C->obj.status = 1; + obj8C->obj.id = OBJ_8C_390; + obj8C->obj.pos.x = posX; + obj8C->obj.pos.y = posY; + obj8C->obj.pos.z = posZ; + obj8C->vel.x = x; + obj8C->vel.y = y; + obj8C->vel.z = z; + obj8C->scale2 = arg7; + obj8C->timer_50 = arg8; + Object_SetInfo(&obj8C->info, obj8C->obj.id); } void func_8007C120(f32 posX, f32 posY, f32 posZ, f32 x, f32 y, f32 z, f32 arg6, s32 arg7) { @@ -1424,46 +1424,46 @@ void func_8007C1AC(f32 posX, f32 posY, f32 posZ, f32 x, f32 y, f32 z, f32 arg6, } } -void func_8007C250(Object_8C* arg0) { +void func_8007C250(Object_8C* obj8C) { f32 randX; f32 randY; f32 randOther; s32 var_v0; - Math_SmoothStepToF(&arg0->unk_54.x, 0.0f, 0.2f, 10.0f, 0.1f); - Math_SmoothStepToF(&arg0->unk_54.y, 0.0f, 0.2f, 10.0f, 0.1f); - Math_SmoothStepToF(&arg0->unk_54.z, 0.0f, 0.2f, 10.0f, 0.1f); + Math_SmoothStepToF(&obj8C->vel.x, 0.0f, 0.2f, 10.0f, 0.1f); + Math_SmoothStepToF(&obj8C->vel.y, 0.0f, 0.2f, 10.0f, 0.1f); + Math_SmoothStepToF(&obj8C->vel.z, 0.0f, 0.2f, 10.0f, 0.1f); var_v0 = 3; if (gLevelMode == LEVELMODE_ALL_RANGE) { var_v0 = 1; } - if (!(arg0->timer_50 & var_v0)) { + if (!(obj8C->timer_50 & var_v0)) { randX = (Rand_ZeroOne() - 0.5f) * 40.0f; randY = (Rand_ZeroOne() - 0.5f) * 40.0f; randOther = ((Rand_ZeroOne() * 0.5f) + 1.0f); - func_8007D0E0(arg0->obj.pos.x + randX, arg0->obj.pos.y + randY, arg0->obj.pos.z, arg0->scale2 * randOther); - if (arg0->timer_50 == 0) { - Object_Kill(&arg0->obj, &arg0->sfxPos); + func_8007D0E0(obj8C->obj.pos.x + randX, obj8C->obj.pos.y + randY, obj8C->obj.pos.z, obj8C->scale2 * randOther); + if (obj8C->timer_50 == 0) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); } } } -void func_8007C3B4(Object_8C* arg0, f32 posX, f32 posY, f32 posZ, f32 x, f32 y, f32 z, f32 arg7, s32 arg8) { - Object_8C_Initialize(arg0); - arg0->obj.status = 1; - arg0->obj.id = OBJ_8C_389; - arg0->obj.pos.x = posX; - arg0->obj.pos.y = posY; - arg0->obj.pos.z = posZ; - arg0->unk_54.x = x; - arg0->unk_54.y = y; - arg0->unk_54.z = z; - arg0->scale2 = arg7; - arg0->unk_4A = arg8; - arg0->unk_4C = (s32) (Rand_ZeroOne() * 12.0f); - arg0->obj.rot.z = Rand_ZeroOne() * 360.0f; - Object_SetInfo(&arg0->info, arg0->obj.id); - arg0->unk_44 = 0xFF; +void func_8007C3B4(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 x, f32 y, f32 z, f32 arg7, s32 arg8) { + Object_8C_Initialize(obj8C); + obj8C->obj.status = 1; + obj8C->obj.id = OBJ_8C_389; + obj8C->obj.pos.x = posX; + obj8C->obj.pos.y = posY; + obj8C->obj.pos.z = posZ; + obj8C->vel.x = x; + obj8C->vel.y = y; + obj8C->vel.z = z; + obj8C->scale2 = arg7; + obj8C->unk_4A = arg8; + obj8C->unk_4C = (s32) (Rand_ZeroOne() * 12.0f); + obj8C->obj.rot.z = Rand_ZeroOne() * 360.0f; + Object_SetInfo(&obj8C->info, obj8C->obj.id); + obj8C->unk_44 = 0xFF; } void func_8007C484(f32 posX, f32 posY, f32 posZ, f32 x, f32 y, f32 z, f32 arg6, s32 arg7) { @@ -1477,33 +1477,33 @@ void func_8007C484(f32 posX, f32 posY, f32 posZ, f32 x, f32 y, f32 z, f32 arg6, } } -void func_8007C50C(Object_8C* arg0) { +void func_8007C50C(Object_8C* obj8C) { f32 randX; f32 randY; f32 randOther; - if (!(arg0->timer_50 & 7)) { - randX = (Rand_ZeroOne() - 0.5f) * 40.0f * arg0->scale2; - randY = (Rand_ZeroOne() - 0.5f) * 40.0f * arg0->scale2; + if (!(obj8C->timer_50 & 7)) { + randX = (Rand_ZeroOne() - 0.5f) * 40.0f * obj8C->scale2; + randY = (Rand_ZeroOne() - 0.5f) * 40.0f * obj8C->scale2; randOther = (Rand_ZeroOne() + 1.0f); - func_8007C484(arg0->obj.pos.x + randX, arg0->obj.pos.y + randY, arg0->obj.pos.z, arg0->unk_54.x, arg0->unk_54.y, - arg0->unk_54.z, arg0->scale2 * randOther, 0); - if (arg0->timer_50 == 0) { - Object_Kill(&arg0->obj, &arg0->sfxPos); + func_8007C484(obj8C->obj.pos.x + randX, obj8C->obj.pos.y + randY, obj8C->obj.pos.z, obj8C->vel.x, obj8C->vel.y, + obj8C->vel.z, obj8C->scale2 * randOther, 0); + if (obj8C->timer_50 == 0) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); } } } -void func_8007C608(Object_8C* arg0, f32 posX, f32 posY, f32 posZ, f32 arg4, s32 arg5) { - Object_8C_Initialize(arg0); - arg0->obj.status = 1; - arg0->obj.id = OBJ_8C_387; - arg0->obj.pos.x = posX; - arg0->obj.pos.y = posY; - arg0->obj.pos.z = posZ; - arg0->scale2 = arg4; - arg0->timer_50 = arg5; - Object_SetInfo(&arg0->info, arg0->obj.id); +void func_8007C608(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 arg4, s32 arg5) { + Object_8C_Initialize(obj8C); + obj8C->obj.status = 1; + obj8C->obj.id = OBJ_8C_387; + obj8C->obj.pos.x = posX; + obj8C->obj.pos.y = posY; + obj8C->obj.pos.z = posZ; + obj8C->scale2 = arg4; + obj8C->timer_50 = arg5; + Object_SetInfo(&obj8C->info, obj8C->obj.id); } void func_8007C688(f32 posX, f32 posY, f32 posZ, f32 arg3, s32 arg4) { @@ -1517,33 +1517,33 @@ void func_8007C688(f32 posX, f32 posY, f32 posZ, f32 arg3, s32 arg4) { } } -void func_8007C6FC(Object_8C* arg0, f32 posX, f32 posY, f32 posZ, f32 arg4) { - Object_8C_Initialize(arg0); - arg0->obj.status = 1; - arg0->obj.id = OBJ_8C_343; - arg0->obj.pos.x = posX; - arg0->obj.pos.y = posY; - arg0->obj.pos.z = posZ; - arg0->unk_48 = 3; - arg0->unk_54.y = 5.0f; +void func_8007C6FC(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 arg4) { + Object_8C_Initialize(obj8C); + obj8C->obj.status = 1; + obj8C->obj.id = OBJ_8C_343; + obj8C->obj.pos.x = posX; + obj8C->obj.pos.y = posY; + obj8C->obj.pos.z = posZ; + obj8C->unk_48 = 3; + obj8C->vel.y = 5.0f; if (Rand_ZeroOne() < 0.5f) { - arg0->unk_48 = -arg0->unk_48; + obj8C->unk_48 = -obj8C->unk_48; } if ((gCurrentLevel == LEVEL_FORTUNA) && (gPlayer->state_1C8 != PLAYERSTATE_1C8_6)) { - arg0->unk_4A = 180; + obj8C->unk_4A = 180; } else { - arg0->unk_4A = 255; + obj8C->unk_4A = 255; } - arg0->scale2 = arg4 * 0.25f; - arg0->obj.rot.z = Rand_ZeroOne() * 360.0f; - arg0->unk_44 = 0; + obj8C->scale2 = arg4 * 0.25f; + obj8C->obj.rot.z = Rand_ZeroOne() * 360.0f; + obj8C->unk_44 = 0; if (Rand_ZeroOne() < 0.3f) { - arg0->unk_44 = 1; - arg0->unk_4A = 255; - arg0->scale2 = arg4 * 0.3f; + obj8C->unk_44 = 1; + obj8C->unk_4A = 255; + obj8C->scale2 = arg4 * 0.3f; } - arg0->scale1 = Rand_ZeroOne() * 0.2f; - Object_SetInfo(&arg0->info, arg0->obj.id); + obj8C->scale1 = Rand_ZeroOne() * 0.2f; + Object_SetInfo(&obj8C->info, obj8C->obj.id); } void func_8007C85C(f32 posX, f32 posY, f32 posZ, f32 arg3) { @@ -1557,7 +1557,7 @@ void func_8007C85C(f32 posX, f32 posY, f32 posZ, f32 arg3) { } } -void func_8007C8C4(Object_8C* arg0) { +void func_8007C8C4(Object_8C* obj8C) { f32 randX; f32 randY; f32 randOther; @@ -1567,76 +1567,523 @@ void func_8007C8C4(Object_8C* arg0) { if ((gCurrentLevel == LEVEL_FORTUNA) && (gPlayer->state_1C8 != PLAYERSTATE_1C8_6)) { var_v0 = 3; } - if (!(arg0->timer_50 & var_v0) && (gLevelType == LEVELTYPE_PLANET)) { + if (!(obj8C->timer_50 & var_v0) && (gLevelType == LEVELTYPE_PLANET)) { randX = (Rand_ZeroOne() - 0.5f) * 10.0f; randY = (Rand_ZeroOne() - 0.5f) * 10.0f; randOther = ((Rand_ZeroOne() * 0.5f) + 1.0f); - func_8007C85C(arg0->obj.pos.x + randX, arg0->obj.pos.y + randY, arg0->obj.pos.z, arg0->scale2 * randOther); - if (arg0->timer_50 == 0) { - Object_Kill(&arg0->obj, &arg0->sfxPos); + func_8007C85C(obj8C->obj.pos.x + randX, obj8C->obj.pos.y + randY, obj8C->obj.pos.z, obj8C->scale2 * randOther); + if (obj8C->timer_50 == 0) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); } } } -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007C9E0.s") +void func_8007C9E0(Object_8C* obj8C) { + if (obj8C->unk_44 == 0) { + obj8C->scale2 *= 1.03f; + obj8C->unk_4A -= 3; + if (obj8C->unk_4A < 0) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); + } + obj8C->obj.rot.z += obj8C->unk_48; + obj8C->vel.y += 0.3f; + obj8C->vel.x += obj8C->scale1; + } else { + obj8C->scale2 *= 1.03f; + obj8C->unk_4A -= 7; + if (obj8C->unk_4A < 0) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); + } + obj8C->obj.rot.z += obj8C->unk_48; + obj8C->vel.y += 0.3f; + obj8C->vel.x += obj8C->scale1; + } +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007CAF0.s") +void func_8007CAF0(Object_8C* obj8C) { + Graphics_SetScaleMtx(obj8C->scale2); + if (obj8C->unk_44 == 0) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, obj8C->unk_4A); + gSPDisplayList(gMasterDisp++, D_102A010); + } else { + Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, 1); + Matrix_SetGfxMtx(&gMasterDisp); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, obj8C->unk_4A); + gSPDisplayList(gMasterDisp++, D_20031B0); + } +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007CC00.s") +void func_8007CC00(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 scale2) { + Object_8C_Initialize(obj8C); + obj8C->obj.status = 1; + obj8C->obj.id = OBJ_8C_339; + obj8C->obj.pos.x = posX; + obj8C->obj.pos.y = posY; + obj8C->obj.pos.z = posZ; + obj8C->scale2 = scale2; + obj8C->scale1 = 0.5f; + obj8C->unk_4C = 0; + obj8C->obj.rot.z = Rand_ZeroOne() * 360.0f; + Object_SetInfo(&obj8C->info, obj8C->obj.id); + if (gLevelType == LEVELTYPE_PLANET) { + obj8C->unk_44 = 230; + } else { + obj8C->unk_44 = 0xFF; + } +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007CCBC.s") +void func_8007CCBC(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 scale2) { + Object_8C_Initialize(obj8C); + obj8C->obj.status = 1; + obj8C->obj.id = OBJ_8C_340; + obj8C->obj.pos.x = posX; + obj8C->obj.pos.y = posY; + obj8C->obj.pos.z = posZ; + obj8C->scale2 = scale2; + obj8C->unk_4C = 3; + obj8C->scale1 = 0.2f; + obj8C->obj.rot.z = Rand_ZeroOne() * 360.0f; + Object_SetInfo(&obj8C->info, obj8C->obj.id); + if (gLevelType == LEVELTYPE_PLANET) { + obj8C->unk_44 = 230; + } else { + obj8C->unk_44 = 0xFF; + } +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007CD7C.s") +void func_8007CD7C(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 scale2, s32 timer50) { + Object_8C_Initialize(obj8C); + obj8C->obj.status = 1; + obj8C->obj.id = OBJ_8C_342; + obj8C->timer_50 = timer50; + obj8C->obj.pos.x = posX; + obj8C->obj.pos.y = posY; + obj8C->obj.pos.z = posZ; + obj8C->unk_48 = 3; + if (Rand_ZeroOne() < 0.5f) { + obj8C->unk_48 = -obj8C->unk_48; + } + obj8C->unk_4A = 0xFF; + obj8C->scale2 = scale2; + obj8C->obj.rot.z = Rand_ZeroOne() * 360.0f; + if ((Rand_ZeroOne() < 0.5f) && (gLevelType == LEVELTYPE_PLANET) && (timer50 != 1)) { + obj8C->unk_44 = 1; + } + if (timer50 == 2) { + obj8C->unk_44 = 1; + } + if (scale2 == 2.2f) { + obj8C->unk_44 = 0; + } + Object_SetInfo(&obj8C->info, obj8C->obj.id); +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007CEBC.s") +void func_8007CEBC(f32 posX, f32 posY, f32 posZ, f32 scale2, s32 timer50) { + s32 i; -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007CF30.s") + for (i = ARRAY_COUNT(gObjects8C) - 1; i >= 0; i--) { + if (gObjects8C[i].obj.status == 0) { + func_8007CD7C(&gObjects8C[i], posX, posY, posZ, scale2, timer50); + break; + } + } +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007CF9C.s") +void func_8007CF30(f32 posX, f32 posY, f32 posZ, f32 scale2) { + s32 i; -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007D008.s") + for (i = ARRAY_COUNT(gObjects8C) - 1; i >= 0; i--) { + if (gObjects8C[i].obj.status == 0) { + func_8007CC00(&gObjects8C[i], posX, posY, posZ, scale2); + break; + } + } +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007D074.s") +void func_8007CF9C(f32 posX, f32 posY, f32 posZ, f32 scale2) { + s32 i; -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007D0E0.s") + for (i = ARRAY_COUNT(gObjects8C) - 1; i >= 0; i--) { + if (gObjects8C[i].obj.status == 0) { + func_8007CCBC(&gObjects8C[i], posX, posY, posZ, scale2); + break; + } + } +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007D10C.s") +void func_8007D008(f32 posX, f32 posY, f32 posZ, f32 scale2) { + s32 i; -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007D138.s") + for (i = ARRAY_COUNT(gObjects8C) - 1; i >= 0; i--) { + if (gObjects8C[i].obj.status == 0) { + func_8007CC00(&gObjects8C[i], posX, posY, posZ, scale2); + break; + } + } +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007D1E0.s") +void func_8007D074(f32 posX, f32 posY, f32 posZ, f32 scale2) { + s32 i; -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007D24C.s") + for (i = ARRAY_COUNT(gObjects8C) - 1; i >= 0; i--) { + if (gObjects8C[i].obj.status == 0) { + func_8007CCBC(&gObjects8C[i], posX, posY, posZ, scale2); + break; + } + } +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007D2C8.s") +void func_8007D0E0(f32 posX, f32 posY, f32 posZ, f32 scale2) { + func_8007CF30(posX, posY, posZ, scale2); +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007D2F4.s") +void func_8007D10C(f32 posX, f32 posY, f32 posZ, f32 scale2) { + func_8007CF9C(posX, posY, posZ, scale2); +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007D55C.s") +void func_8007D138(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 scale2) { + Object_8C_Initialize(obj8C); + obj8C->obj.status = 1; + obj8C->obj.id = OBJ_8C_341; + obj8C->obj.pos.x = posX; + obj8C->obj.pos.y = posY; + obj8C->obj.pos.z = posZ; + obj8C->scale2 = scale2; + obj8C->obj.rot.z = Rand_ZeroOne() * 360.0f; + Object_SetInfo(&obj8C->info, obj8C->obj.id); + if (gLevelType == LEVELTYPE_PLANET) { + obj8C->unk_4C = 15; + } + obj8C->unk_44 = 180; +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007D748.s") +void func_8007D1E0(f32 posX, f32 posY, f32 posZ, f32 scale2) { + s32 i; -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007D8A8.s") + for (i = ARRAY_COUNT(gObjects8C) - 1; i >= 0; i--) { + if (gObjects8C[i].obj.status == 0) { + func_8007D138(&gObjects8C[i], posX, posY, posZ, scale2); + break; + } + } +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007D94C.s") +void func_8007D24C(f32 posX, f32 posY, f32 posZ, f32 scale2) { + if (gLevelType == LEVELTYPE_PLANET) { + func_8007D1E0(posX, posY, posZ, scale2); + func_8007CEBC(posX, scale2 + posY, posZ, scale2, 9); + } else { + func_8007D0E0(posX, posY, posZ, scale2); + } +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007D9DC.s") +void func_8007D2C8(f32 posX, f32 posY, f32 posZ, f32 scale2) { + func_8007D008(posX, posY, posZ, scale2); +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007DA58.s") +void func_8007D2F4(Object_8C* obj8C) { + if (gLevelType == LEVELTYPE_PLANET) { + if ((gCurrentLevel == LEVEL_KATINA) && (gPlayer->state_1C8 == PLAYERSTATE_1C8_7)) { + obj8C->vel.y += 0.1f; + if (obj8C->timer_50 == 0) { + obj8C->unk_4C++; + obj8C->timer_50 = 4; + if (obj8C->unk_4C > 15) { + obj8C->timer_50 = 5; + } + if (obj8C->unk_4C > 20) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); + } + } + } else { + if ((gCurrentLevel == LEVEL_MACBETH) && (gPlayer->state_1C8 == PLAYERSTATE_1C8_7) && (obj8C->vel.x != 0)) { + Math_SmoothStepToF(&obj8C->vel.x, -1.0f, 1.0f, 1.0f, 0.0f); + Math_SmoothStepToF(&obj8C->vel.z, 4.0f, 1.0f, 1.0f, 0.0f); + obj8C->vel.y += 1.7f; + } + obj8C->vel.y += 0.3f; + if (obj8C->timer_50 == 0) { + obj8C->unk_4C++; + if (obj8C->unk_4C > 15) { + obj8C->timer_50 = 2; + } + if (obj8C->unk_4C > 20) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); + } + } + } + } else { + if (obj8C->timer_50 == 0) { + obj8C->unk_4C++; + obj8C->timer_50 = obj8C->unk_46; + if (obj8C->unk_4C > 13) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); + } + } + obj8C->unk_44 -= 15; + } + if (D_8017836C < obj8C->scale1) { + D_8017836C = obj8C->scale1; + D_80178370 = obj8C->obj.pos.x; + D_80178374 = obj8C->obj.pos.y; + D_80178378 = obj8C->obj.pos.z; + D_80178360 = 0xFF; + D_80178364 = 50; + D_80178368 = 0; + } + Math_SmoothStepToF(&obj8C->scale1, 0.0f, 1.0f, 0.05f, 0.0f); +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007DAE4.s") +void func_8007D55C(Object_8C* obj8C) { + f32 scale; -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007DB70.s") + Graphics_SetScaleMtx(obj8C->scale2); + if (gLevelType == LEVELTYPE_PLANET) { + gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D184C[obj8C->unk_4C][0], D_800D184C[obj8C->unk_4C][1], + D_800D184C[obj8C->unk_4C][2], D_800D184C[obj8C->unk_4C][3]); + scale = D_800D17F8[obj8C->unk_4C] - 0.5f; + Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, 1); + Matrix_SetGfxMtx(&gMasterDisp); + gSPDisplayList(gMasterDisp++, D_800D17A4[obj8C->unk_4C]); + return; + } + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 100, obj8C->unk_44); + if (obj8C->unk_4C == 0) { + Matrix_Scale(gGfxMatrix, 2.5f, 2.5f, 2.5f, 1); + Matrix_SetGfxMtx(&gMasterDisp); + gSPDisplayList(gMasterDisp++, D_800D18A0[obj8C->unk_4C]); + return; + } + gSPDisplayList(gMasterDisp++, D_800D18A0[obj8C->unk_4C]); +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007DED4.s") +void func_8007D748(Object_8C* obj8C) { + if (gLevelType == LEVELTYPE_PLANET) { + obj8C->vel.y += 0.3f; + if (obj8C->timer_50 == 0) { + if (obj8C->unk_4C > 15) { + obj8C->timer_50 = 2; + obj8C->unk_4C = obj8C->unk_4C + 1; + } else { + obj8C->unk_4C = obj8C->unk_4C + 2; + } + if (obj8C->unk_4C > 20) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); + } + } + } else { + if (obj8C->timer_50 == 0) { + obj8C->unk_4C++; + obj8C->timer_50 = 0; + if (obj8C->unk_4C > 13) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); + } + } + obj8C->unk_44 -= 15; + } + if (D_8017836C < obj8C->scale1) { + D_8017836C = obj8C->scale1; + D_80178370 = obj8C->obj.pos.x; + D_80178374 = obj8C->obj.pos.y; + D_80178378 = obj8C->obj.pos.z; + D_80178360 = 0xFF; + D_80178364 = 50; + D_80178368 = 0; + } + Math_SmoothStepToF(&obj8C->scale1, 0, 1.0f, 0.1f, 0.0f); +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007E014.s") +void func_8007D8A8(Object_8C* obj8C) { + if (gLevelType == LEVELTYPE_SPACE) { + func_8007D2F4(obj8C); + return; + } + obj8C->vel.y += 0.3f; + if (obj8C->timer_50 == 0) { + obj8C->unk_4C++; + obj8C->timer_50 = 2; + if (obj8C->unk_4C >= 20) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); + } + } + if (obj8C->unk_4C >= 16) { + obj8C->unk_44 -= 20; + } +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007E258.s") +void func_8007D94C(Object_8C* obj8C, f32 posX, f32 posY, f32 posZ, f32 scale2, f32 scale1, s32 timer50) { + Object_8C_Initialize(obj8C); + obj8C->obj.status = 1; + obj8C->obj.id = OBJ_8C_367; + obj8C->obj.pos.x = posX; + obj8C->obj.pos.y = posY; + obj8C->obj.pos.z = posZ; + obj8C->unk_44 = 80; + obj8C->scale2 = scale2; + obj8C->scale1 = scale1; + obj8C->timer_50 = timer50; + Object_SetInfo(&obj8C->info, obj8C->obj.id); +} -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007E298.s") +void func_8007D9DC(f32 posX, f32 posY, f32 posZ, f32 scale2, f32 scale1, s32 timer50) { + s32 i; -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007E330.s") + for (i = ARRAY_COUNT(gObjects8C) - 1; i >= 0; i--) { + if (gObjects8C[i].obj.status == 0) { + func_8007D94C(&gObjects8C[i], posX, posY, posZ, scale2, scale1, timer50); + break; + } + } +} + +void func_8007DA58(Object_8C* obj8C) { + obj8C->scale2 += obj8C->scale1; + if (obj8C->scale1 > 0.0f) { + obj8C->scale1 -= 0.01f; + } else { + obj8C->scale1 -= 0.001f; + } + obj8C->obj.rot.y += obj8C->unk_60.y; + if (obj8C->scale2 < 0.01f) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); + } +} + +void func_8007DAE4(Object_8C* obj8C) { + Graphics_SetScaleMtx(obj8C->scale2); + RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); + gSPDisplayList(gMasterDisp++, D_6004900); + RCP_SetupDL(&gMasterDisp, 0x40); +} + +extern Vec3f D_800D18D8; +// Vec3f D_800D18D8 = { 0.0f, -10.0f, 0.0f }; + +void func_8007DB70(Object_8C* obj8C) { + Vec3f sp54 = D_800D18D8; + + switch (obj8C->unk_4E) { + case 0: + obj8C->vel.y -= 0.5f; + if ((obj8C->timer_50 == 0) && + ((func_8006351C(1000, &obj8C->obj.pos, &sp54, 1) != 0) || (obj8C->obj.pos.y < (D_80177940 + 10.0f)))) { + obj8C->vel.y = 0.0f; + if (obj8C->obj.pos.y < (D_80177940 + 10.0f)) { + obj8C->obj.pos.y = D_80177940; + } + obj8C->unk_4E = 1; + obj8C->timer_50 = 30; + obj8C->unk_44 = 192; + obj8C->scale2 = 2.5f; + obj8C->scale1 = 2.5f; + Audio_PlaySfx(0x2903B009, &obj8C->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C); + func_8007D0E0(obj8C->obj.pos.x, obj8C->obj.pos.y + 30.0f, obj8C->obj.pos.z, 7.0f); + func_8007BFFC(obj8C->obj.pos.x, obj8C->obj.pos.y + 30.0f, obj8C->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); + if ((obj8C->obj.pos.y < (D_80177940 + 10.0f)) || (D_80161A88 != 2)) { + func_800365E4(obj8C->obj.pos.x, 3.0f, obj8C->obj.pos.z, obj8C->obj.pos.x, obj8C->obj.pos.z, 0.0f, + 0.0f, 90.0f, 5.0f, 0, 0); + break; + } + } + break; + case 1: + obj8C->scale2 += ((20.0f - obj8C->scale2) * 0.1f); + if (obj8C->scale2 > 19.0f) { + obj8C->scale1 -= 0.3f; + obj8C->unk_44 -= 20; + if (obj8C->unk_44 < 0) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); + } + } + obj8C->obj.rot.y = 180.0f - obj8C->obj.rot.y; + if ((fabsf(gPlayer->unk_138 - obj8C->obj.pos.z) < 40.0f) && + (fabsf(gPlayer->pos.x - obj8C->obj.pos.x) < 80.0f)) { + if ((obj8C->obj.pos.y < gPlayer->pos.y) && + ((gPlayer->pos.y - obj8C->obj.pos.y) < (obj8C->scale2 * 35.0f)) && (gPlayer->timer_498 == 0)) { + Player_ApplyDamage(gPlayer, 0, obj8C->info.damage); + } + } + break; + } +} + +extern Gfx D_4008CE0[]; +extern Gfx D_4008F70[]; + +void func_8007DED4(Object_8C* obj8C) { + switch (obj8C->unk_4E) { + case 0: + Graphics_SetScaleMtx(obj8C->scale2); + RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); + gSPDisplayList(gMasterDisp++, D_4008CE0); + RCP_SetupDL(&gMasterDisp, 0x40); + return; + case 1: + Matrix_Scale(gGfxMatrix, obj8C->scale1, obj8C->scale2, 2.5f, 1); + Matrix_SetGfxMtx(&gMasterDisp); + RCP_SetupDL_40(); + gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); + gSPDisplayList(gMasterDisp++, D_4008F70); + RCP_SetupDL(&gMasterDisp, 0x40); + return; + } +} + +void func_8007E014(Object_8C* obj8C) { + s32 i; + f32 x; + f32 z; + f32 y; + + if (D_801784AC == 4) { + func_E6A810_801B6E20(obj8C->obj.pos.x, obj8C->obj.pos.z + D_80177D20, &x, &y, &z); + obj8C->obj.pos.y = y + 3.0f; + obj8C->obj.rot.x = (x * 180.0f) / M_PI; + obj8C->obj.rot.z = (z * 180.0f) / M_PI; + } + if (((obj8C->unk_44 == 1) || (obj8C->unk_44 == 3)) && ((obj8C->timer_50 & 3) == 1) && (Rand_ZeroOne() < 0.5f)) { + func_8007D10C(obj8C->obj.pos.x, obj8C->obj.pos.y + (obj8C->scale2 * 5.0f), obj8C->obj.pos.z + 3.0f, + ((Rand_ZeroOne() * 0.7f) + 1.0f) * (obj8C->scale2 * 1.2f)); + } + for (i = 0; i < ARRAY_COUNT(gObjects8C); i++) { + if ((gObjects8C[i].obj.status == 2) && (gObjects8C[i].obj.id == OBJ_8C_344) && (i != obj8C->index) && + (fabsf(obj8C->obj.pos.z - gObjects8C[i].obj.pos.z) < 20.0f) && + (fabsf(obj8C->obj.pos.x - gObjects8C[i].obj.pos.x) < 20.0f) && + (fabsf(obj8C->obj.pos.y - gObjects8C[i].obj.pos.y) < 20.0f)) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); + } + } +} + +void func_8007E258(Object_8C* obj8C) { + if ((gCamCount != 1) && (obj8C->timer_50 == 0)) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); + } +} + +void func_8007E298(Object_8C* obj8C) { + if (obj8C->timer_50 == 0) { + obj8C->scale2 *= 1.035f; + obj8C->unk_4A -= 8; + if (obj8C->unk_4A < 0) { + Object_Kill(&obj8C->obj, &obj8C->sfxPos); + } + } + obj8C->obj.rot.z += obj8C->unk_48; + if (gLevelType == LEVELTYPE_PLANET) { + obj8C->vel.y += 0.2f; + } +} + +void func_8007E330(Object_8C* obj8C) { + Graphics_SetScaleMtx(obj8C->scale2); + if (obj8C->unk_44 == 0) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, obj8C->unk_4A); + } else { + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, obj8C->unk_4A); + } + gSPDisplayList(gMasterDisp++, D_2010A30); +} #pragma GLOBAL_ASM("asm/us/nonmatchings/main/sf_77E40/func_8007E3E4.s") diff --git a/src/main/sf_hud.c b/src/main/sf_hud.c index af539842..47920fb7 100644 --- a/src/main/sf_hud.c +++ b/src/main/sf_hud.c @@ -2015,19 +2015,19 @@ bool func_80091B90(Object_2F4* obj2F4) { Math_Vec3fFromAngles(&vec, obj2F4->obj.rot.x, obj2F4->obj.rot.y, obj2F4->unk_138 + obj2F4->unk_114); - obj2F4->unk_0E8.y = obj2F4->unk_14C + vec.y; - obj2F4->unk_0E8.x = obj2F4->unk_148 + vec.x; - obj2F4->unk_0E8.z = obj2F4->unk_144 + vec.z; + obj2F4->vel.y = obj2F4->unk_14C + vec.y; + obj2F4->vel.x = obj2F4->unk_148 + vec.x; + obj2F4->vel.z = obj2F4->unk_144 + vec.z; obj2F4->unk_148 -= obj2F4->unk_148 * 0.1f; obj2F4->unk_14C -= obj2F4->unk_14C * 0.1f; obj2F4->unk_144 -= obj2F4->unk_144 * 0.1f; - if ((obj2F4->obj.pos.y < D_80177940 + 40.0f) && (obj2F4->unk_0E8.y < 0.0f) && (gLevelType == LEVELTYPE_PLANET)) { + if ((obj2F4->obj.pos.y < D_80177940 + 40.0f) && (obj2F4->vel.y < 0.0f) && (gLevelType == LEVELTYPE_PLANET)) { obj2F4->obj.pos.y = D_80177940 + 40.0f; - obj2F4->unk_0E8.y = 0.0f; + obj2F4->vel.y = 0.0f; } - obj2F4->unk_0E8.z -= D_80177D08; + obj2F4->vel.z -= D_80177D08; return false; } @@ -2190,8 +2190,8 @@ void func_800922F4(Object_2F4* obj2F4) { if (Rand_ZeroOne() < 0.5f) { func_8007C120(obj2F4->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 30.0f), obj2F4->obj.pos.y + (Rand_ZeroOne() * 10.0f), - obj2F4->obj.pos.z + ((Rand_ZeroOne() - 0.5f) * 30.0f), obj2F4->unk_0E8.x, - obj2F4->unk_0E8.y, obj2F4->unk_0E8.z, obj2F4->scale * 0.07f, 3); + obj2F4->obj.pos.z + ((Rand_ZeroOne() - 0.5f) * 30.0f), obj2F4->vel.x, obj2F4->vel.y, + obj2F4->vel.z, obj2F4->scale * 0.07f, 3); } } } @@ -2245,8 +2245,8 @@ void func_800933D8(f32 x, f32 y, f32 z, f32 arg3) { obj8C->unk_48 = -obj8C->unk_48; } } else { - obj8C->unk_54.x = (Rand_ZeroOne() - 0.5f) * 5.0f; - obj8C->unk_54.y = (Rand_ZeroOne() - 0.5f) * 3.0f; + obj8C->vel.x = (Rand_ZeroOne() - 0.5f) * 5.0f; + obj8C->vel.y = (Rand_ZeroOne() - 0.5f) * 3.0f; obj8C->unk_48 = 0; if (Rand_ZeroOne() < 0.5f) { @@ -2299,7 +2299,7 @@ void func_80094954(Object_8C* obj8C) { Object_Kill(&obj8C->obj, &obj8C->sfxPos); } - obj8C->unk_54.y += obj8C->scale1; + obj8C->vel.y += obj8C->scale1; obj8C->scale1 -= 0.05f; if (obj8C->scale1 < -1.0f) { @@ -2317,7 +2317,7 @@ void func_80094954(Object_8C* obj8C) { if (player->state_1C8 == PLAYERSTATE_1C8_6) { obj8C->unk_46 = 2; if (player->unk_1D0 >= 4) { - obj8C->unk_54.y -= 0.13f; + obj8C->vel.y -= 0.13f; } }