From 4a6a66ce62e654a9a46b1dcb5acd1f0ef9bf2646 Mon Sep 17 00:00:00 2001 From: Elliptic Ellipsis Date: Tue, 20 Sep 2022 16:24:55 +0100 Subject: [PATCH] One left --- src/overlays/actors/ovl_Boss_05/z_boss_05.c | 2312 ++++++++----------- src/overlays/actors/ovl_Boss_05/z_boss_05.h | 7 +- 2 files changed, 966 insertions(+), 1353 deletions(-) diff --git a/src/overlays/actors/ovl_Boss_05/z_boss_05.c b/src/overlays/actors/ovl_Boss_05/z_boss_05.c index 249bfcc0e..521149654 100644 --- a/src/overlays/actors/ovl_Boss_05/z_boss_05.c +++ b/src/overlays/actors/ovl_Boss_05/z_boss_05.c @@ -327,14 +327,864 @@ void Boss05_Destroy(Actor* thisx, PlayState* play) { } } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_05/func_809EECBC.s") +s32 func_809EECBC(Boss05* this, PlayState* play) { + if (this->unk16C == 0) { + s32 var_v0 = 0; + ColliderJntSphElement* var_v1 = &this->unk1C8.elements[0]; + + while (true) { + var_v0 += 0x40; + + if (var_v1->info.bumperFlags & BUMP_HIT) { + switch (this->dyna.actor.colChkInfo.damageEffect) { + case 2: + return 11; + case 3: + return 20; + case 4: + return 30; + default: + return 10; + } + } + var_v1++; + + if (var_v0 == 0x80) { + if (this->unk368.elements[0].info.bumperFlags & BUMP_HIT) { + u8 damage = this->dyna.actor.colChkInfo.damage; + this->dyna.actor.colChkInfo.health -= damage; + if ((s8)this->dyna.actor.colChkInfo.health <= 0) { + Enemy_StartFinishingBlow(play, &this->dyna.actor); + return 2; + } else { + Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EN_MIZUBABA2_DAMAGE); + this->unk16C = 15; + this->unk15C = 0; + this->unk162[0] = 30; + return 0; + } + } + + break; + } + } + } + + return 0; +} void func_809EEDD0(Boss05* this, PlayState* play) { this->actionFunc = func_809EEDE8; } +extern Vec3s D_809F1C60[]; +extern Vec3s D_809F1C8C[]; +// Vec3s D_809F1C60[7] = { +// { 0x3200, 0, 0 }, +// { -0x1E00, 0, 0 }, +// { -0x1400, 0, 0 }, +// { 0, 0, 0 }, +// { 0, 0, 0 }, +// { 0, 0, 0 }, +// { 0, 0, 0 }, +// }; + +// Vec3s D_809F1C8C[7] = { +// { -0x3200, 0, 0 }, +// { 0, 0, 0 }, +// { 0x1E00, 0, 0 }, +// { 0, 0, 0 }, +// { 0, 0, 0 }, +// { 0, 0, 0 }, +// { 0, 0, 0 }, +// }; + // The big one -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_05/func_809EEDE8.s") +// #pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_05/func_809EEDE8.s") +// struct _m2c_stack_func_809EEDE8 { +// /* 0x000 */ char pad0[0x5C]; +// /* 0x05C */ s16 *sp5C; +// /* 0x060 */ s16 *sp60; +// /* 0x064 */ char pad64[8]; /* maybe part of sp60[3]? */ +// /* 0x06C */ Vec3s *sp6C; +// /* 0x070 */ f32 sp70; +// /* 0x074 */ s32 sp74; +// /* 0x078 */ char pad78[8]; /* maybe part of sp74[3]? */ +// /* 0x080 */ f32 sp80; +// /* 0x084 */ char pad84[0x10]; /* maybe part of sp80[5]? */ +// /* 0x094 */ Vec3f sp94; +// /* 0x0A0 */ char padA0[4]; +// /* 0x0A4 */ f32 spA4; +// /* 0x0A8 */ char padA8[0xC]; /* maybe part of spA4[4]? */ +// /* 0x0B4 */ s32 spB4; +// /* 0x0B8 */ s32 spB8; +// /* 0x0BC */ s32 spBC; +// /* 0x0C0 */ s32 spC0; +// /* 0x0C4 */ s32 spC4; +// /* 0x0C8 */ s32 spC8; +// /* 0x0CC */ s32 spCC; +// /* 0x0D0 */ s32 spD0; +// /* 0x0D4 */ s32 spD4; +// /* 0x0D8 */ Vec3s spD8; +// /* 0x0DE */ char padDE[0x25]; /* maybe part of spD8[7]? */ +// /* 0x103 */ u8 sp103; +// /* 0x104 */ char pad104[4]; /* maybe part of sp103[5]? */ +// /* 0x108 */ Player *sp108; +// /* 0x10C */ char pad10C[4]; +// }; /* size = 0x110 */ + +// Vec3s D_809F1C60[7] = { +// { 0x3200, 0, 0 }, +// { -0x1E00, 0, 0 }, +// { -0x1400, 0, 0 }, +// { 0, 0, 0 }, +// { 0, 0, 0 }, +// { 0, 0, 0 }, +// { 0, 0, 0 }, +// }; +// Vec3s D_809F1C8C[7] = { +// { -0x3200, 0, 0 }, +// { 0, 0, 0 }, +// { 0x1E00, 0, 0 }, +// { 0, 0, 0 }, +// { 0, 0, 0 }, +// { 0, 0, 0 }, +// { 0, 0, 0 }, +// }; + +extern Vec3s D_809F1C60[]; +extern Vec3s D_809F1C8C[]; + +void func_809EEDE8(Boss05 *this, PlayState *play) { + s32 pad; + + Player *sp108; + + s32 pad1; + + u8 sp103; + Vec3s spD8[7]; + s32 spD4; + s32 spD0; + s32 spCC; + s32 spC8; + s32 spC4; + s32 spC0; + s32 spBC; + s32 spB8; + s32 spB4; + + s32 pad2; + + f32 spA4; + Vec3f sp94; + // f32 sp80; + // s32 sp74; + // f32 sp70; + // Vec3s *sp6C; + // s16 *sp60; + // s16 *sp5C; + // ? *temp_t5; + // ? temp_t2_2; + // ? temp_t4; + // ? temp_t5_4; + // Boss05 *temp_v0_6; + // Boss05 *temp_v0_7; + // Player *temp_v1; + // ActorContext *temp_s0_2; + // CollisionCheckContext *temp_s0_3; + // CollisionCheckContext *temp_s0_4; + // SkelAnime *temp_s0; + // Vec3s *var_s1; + // f32 *temp_s1; + // f32 temp_ft4; + f32 var_fv1; + // s16 var_s4; + // s16 var_s5; + s16 var_s6; + s16 var_s7; + // s32 temp_lo; + // s32 temp_v0_5; + // s32 var_s0; + s32 var_s0_2; + s32 var_s0_3; + s32 var_s3; + // s32 var_s3_2; + s32 var_s4_2; + s32 var_v1; + // u8 temp_v0; + // u8 temp_v0_2; + // void *temp_t1; + // void *temp_t1_2; + // void *temp_t2; + // void *temp_t2_3; + // void *temp_t2_4; + // void *temp_t3; + // void *temp_t3_2; + // void *temp_t5_2; + // void *temp_t5_3; + // void *temp_t6; + // void *temp_t6_2; + // void *temp_t7; + // void *temp_t8; + // void *temp_t8_2; + // void *temp_t9; + // void *temp_t9_2; + // void *temp_t9_3; + // Vec3s *temp_v0_3; + // Vec3s *temp_v0_4; + + + + sp108 = GET_PLAYER(play); + sp103 = 0; + // var_s3 = 0; + // temp_v0 = this->unk174; + this->dyna.actor.hintId = 8; + // var_s0 = 0; + // var_s1 = spD8; + if (this->unk174 == 0) { + spD4 = 0x3E8; + spD0 = 0x3E80; + spCC = 0x7D0; + spC8 = 0x5DC; + spC4 = 0x1770; + spC0 = 0xBB8; + spBC = 0x514; + spB8 = 0x5208; + spB4 = 0xDAC; + var_s6 = 0xA; + var_s7 = 0x300; + if (this->unk16C != 0) { + spD4 = 0x1B58; + spCC = 0x1770; + spC0 = 0x1770; + spBC = 0x1C84; + spB4 = 0x1964; + var_s6 = 1; + var_s7 = 0x1000; + } + } else { + if (this->unk174 == 3) { + spD4 = 0x1B58; + spD0 = 0x3E80; + spCC = 0x1388; + spC8 = 0x5DC; + spC4 = 0x2328; + spC0 = 0x1388; + spBC = 0x1C84; + spB8 = 0x5208; + spB4 = 0x157C; + var_s6 = 1; + var_s7 = 0x1000; + } else { + var_s6 = 0; + var_s7 = 0; + spB4 = 0; + spB8 = 0; + spBC = 0; + spC0 = 0; + spC4 = 0; + spC8 = 0; + spCC = 0; + spD0 = 0; + spD4 = 0; + } + } + + for (var_s3 = 0; var_s3 < 7; var_s3++) { + if ((this->unk174 == 0) || (this->unk174 == 3)) { + if (var_s3 < 3) { + spD8[var_s3].y = 0; + spD8[var_s3].x = (s32) (Math_SinS((this->unk160 * spD4) + (var_s3 * spD0)) * spCC); + } else { + spD8[var_s3].x = 0; + spD8[var_s3].y = (s32) (Math_SinS((this->unk160 * spC8) + (var_s3 * spC4)) * spC0); + } + + if ((var_s3 == 4) || (var_s3 == 6)) { + spD8[var_s3].z = (s32) (2.0f * (Math_SinS((this->unk160 * spBC) + var_s3 * spB8) * spB4)); + } else { + spD8[var_s3].z = (s32) (Math_SinS((this->unk160 * spBC) + var_s3 * spB8) * spB4); + } + } else if (this->unk174 == 1) { + var_s6 = 5; + var_s7 = 0x1000; + spD8[var_s3].x = D_809F1C60[var_s3].x; + spD8[var_s3].y = D_809F1C60[var_s3].y; + spD8[var_s3].z = D_809F1C60[var_s3].z; + } else if (this->unk174 == 2) { + var_s6 = 1; + var_s7 = 0x2000; + spD8[var_s3].x = D_809F1C8C[var_s3].x; + spD8[var_s3].y = D_809F1C8C[var_s3].y; + spD8[var_s3].z = D_809F1C8C[var_s3].z; + } + + Math_ApproachS(&this->unk19E[var_s3].x, spD8[var_s3].x, var_s6, var_s7); + Math_ApproachS(&this->unk19E[var_s3].y, spD8[var_s3].y, var_s6, var_s7); + Math_ApproachS(&this->unk19E[var_s3].z, spD8[var_s3].z, var_s6, var_s7); + + } + + spA4 = (sp108->actor.world.pos.y - this->dyna.actor.world.pos.y) + 10.0f; + if (spA4 < 0.0f) { + Math_ApproachS(&this->dyna.actor.shape.rot.y, this->dyna.actor.yawTowardsPlayer, var_s6, var_s7); + } + + SkelAnime_Update(&this->unk3C8); + Math_ApproachF(&this->unk35C, 1.0f, 0.1f, 0.1f); + if (this->unk15C != 0xA) { + Math_ApproachS(&this->dyna.actor.shape.rot.x, 0, 0x14, 0x800); + } + + switch (this->unk15C) { /* irregular */ + case 0: + this->unk174 = 0; + this->unk3C8.playSpeed = 1.0f; + if (spA4 < 0.0f) { + if (sp108->actor.speedXZ > 10.0f) { + var_fv1 = 220.0f; + } else { + var_fv1 = 150.0f; + } + if ((this->unk162[0] == 0) && (sqrtf(this->dyna.actor.xyzDistToPlayerSq) <= var_fv1)) { + this->unk15C = 1; + this->unk162[0] = 0xA; + } + this->unk15E = 0; + // goto block_42; + } else { + + sp103 = 1; + if (sqrtf(this->dyna.actor.xyzDistToPlayerSq) <= 40.0f) { + this->unk15E++; + if (this->unk15E > 0x1E) { + this->unk15C = 0xA; + this->unk162[0] = 0x1E; + Actor_PlaySfxAtPos(&this->dyna.actor, 0x3861U); + } + } else { + // block_42: + this->unk15E = 0; + } + } + if (!(this->unk160 & 3) && (Rand_ZeroOne() < 0.5f)) { + Actor_PlaySfxAtPos(&this->dyna.actor, 0x3860U); + } + break; + + case 10: + if (!(this->unk160 & 1)) { + Actor_PlaySfxAtPos(&this->dyna.actor, 0x3860U); + } + this->unk19C = (this->unk162[0] & 1) << 9; + this->unk174 = 3; + this->unk3C8.playSpeed = 4.0f; + Math_ApproachS(&this->dyna.actor.shape.rot.x, -0x8000, 2, 0x2000); + Math_ApproachS(&this->dyna.actor.shape.rot.y, this->dyna.actor.yawTowardsPlayer, 2, 0x2000); + if (this->unk162[0] == 0) { + this->unk15E = 0; + this->unk15C = 0; + this->unk162[0] = 0x64; + } + if (this->unk162[0] == 0x1B) { + Math_Vec3f_Copy(&sp94, &this->dyna.actor.world.pos); + sp94.y += 40.0f; + EffectSsGSplash_Spawn(play, &sp94, NULL, NULL, 1, 0x7D0); + Actor_PlaySfxAtPos(&this->dyna.actor, 0x2808U); + } + break; + + case 1: + if (Animation_OnFrame(&this->unk3C8, this->unk4FC)) { + this->unk3C8.playSpeed = 0.0f; + } + this->unk174 = 1; + if (this->unk162[0] == 0) { + this->unk15C = 2; + this->unk162[0] = 0x14; + Actor_PlaySfxAtPos(&this->dyna.actor, 0x3861U); + } + break; + + case 2: + if (!(this->unk160 & 1)) { + Actor_PlaySfxAtPos(&this->dyna.actor, 0x3860U); + } + this->unk19C = (this->unk162[0] & 1) << 9; + this->unk3C8.playSpeed = 4.0f; + Math_ApproachF(&this->unk35C, 1.5f, 1.0f, 0.7f); + this->unk174 = 2; + if (this->unk162[0] == 0) { + this->unk15C = 0; + this->unk162[0] = 0x1E; + } + break; + } + + var_s4_2 = func_809EECBC(this, play); + if ((var_s4_2 != 0) || (this->unk168 == 1)) { + this->dyna.actor.params = 2; + this->actionFunc = func_809EF9BC; + this->dyna.actor.flags &= ~1; + func_800BC154(play, &play->actorCtx, &this->dyna.actor, 1); + if (this->unk168 != 0) { + var_s4_2 = 0xA; + } + if (var_s4_2 >= 0xA) { + Boss05 *temp_v0_6 = (Boss05*)Actor_SpawnAsChild(&play->actorCtx, &this->dyna.actor, play, 0x12D, this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, this->dyna.actor.shape.rot.x, this->dyna.actor.shape.rot.y, this->dyna.actor.shape.rot.z, 3); + if (temp_v0_6 != NULL) { + Player* temp_v1 = GET_PLAYER(play); + if (&this->dyna.actor == temp_v1->targetActor) { + temp_v1->targetActor = &temp_v0_6->dyna.actor; + play->actorCtx.targetContext.arrowPointedActor = &temp_v0_6->dyna.actor; + play->actorCtx.targetContext.targetedActor = &temp_v0_6->dyna.actor; + } + + for (var_s0_2 = 0; var_s0_2 < 10; var_s0_2++) { + temp_v0_6->unk268.jointTable[var_s0_2] = this->unk268.jointTable[var_s0_2]; + } + + for (var_s0_2 = 0; var_s0_2 < 20; var_s0_2++) { + temp_v0_6->unk3C8.jointTable[var_s0_2] = this->unk3C8.jointTable[var_s0_2]; + } + + Actor_PlaySfxAtPos(&this->dyna.actor, 0x381EU); + if (var_s4_2 >= 0xB) { + temp_v0_6->unk188 = var_s4_2 - 0xA; + } + } + } else if (var_s4_2 == 2) { + for (var_s3 = 0; var_s3 < 2; var_s3++) { + Boss05 *temp_v0_6 = (Boss05*)Actor_SpawnAsChild(&play->actorCtx, &this->dyna.actor, play, 0x12D, this->unk324.x, this->unk324.y, this->unk324.z, this->unk330.x, this->unk330.y, this->unk330.z, var_s3 + 0xA); + if (temp_v0_6 != NULL) { + + for (var_v1 = 0; var_v1 < 20; var_v1++) { + temp_v0_6->unk3C8.jointTable[var_v1] = this->unk3C8.jointTable[var_v1]; + } + + temp_v0_6->unk162[0] = (s32) (Rand_ZeroFloat(20.0f) + 20.0f); + } + } + Actor_PlaySfxAtPos(&this->dyna.actor, 0x381FU); + } + + } + + if (sp103 == 0) { + CollisionCheck_SetAT(play, &play->colChkCtx, &this->unk1C8.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->unk368.base); + } + + CollisionCheck_SetAC(play, &play->colChkCtx, &this->unk1C8.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->unk368.base); +} +// void func_809EEDE8(Boss05 *this, PlayState *play) { +// Player *sp108; +// u8 sp103; +// Vec3s spD8; +// s32 spD4; +// s32 spD0; +// s32 spCC; +// s32 spC8; +// s32 spC4; +// s32 spC0; +// s32 spBC; +// s32 spB8; +// s32 spB4; +// f32 spA4; +// Vec3f sp94; +// f32 sp80; +// s32 sp74; +// f32 sp70; +// Vec3s *sp6C; +// s16 *sp60; +// s16 *sp5C; +// // ? *temp_t5; +// // ? temp_t2_2; +// // ? temp_t4; +// // ? temp_t5_4; +// Boss05 *temp_v0_6; +// Boss05 *temp_v0_7; +// Player *temp_v1; +// ActorContext *temp_s0_2; +// // CollisionCheckContext *temp_s0_3; +// // CollisionCheckContext *temp_s0_4; +// SkelAnime *temp_s0; +// Vec3s *var_s1; +// // f32 *temp_s1; +// f32 temp_ft4; +// f32 var_fv1; +// s16 var_s4; +// s16 var_s5; +// s16 var_s6; +// s16 var_s7; +// s32 temp_lo; +// s32 temp_v0_5; +// s32 var_s0; +// s32 var_s0_2; +// s32 var_s0_3; +// s32 var_s3; +// s32 var_s3_2; +// s32 var_s4_2; +// s32 var_v1; +// u8 temp_v0; +// u8 temp_v0_2; +// // void *temp_t1; +// // void *temp_t1_2; +// // void *temp_t2; +// // void *temp_t2_3; +// // void *temp_t2_4; +// // void *temp_t3; +// // void *temp_t3_2; +// // void *temp_t5_2; +// // void *temp_t5_3; +// // void *temp_t6; +// // void *temp_t6_2; +// // void *temp_t7; +// // void *temp_t8; +// // void *temp_t8_2; +// // void *temp_t9; +// // void *temp_t9_2; +// // void *temp_t9_3; +// Vec3s *temp_v0_3; +// Vec3s *temp_v0_4; + +// sp103 = 0; +// var_s3 = 0; +// sp108 = GET_PLAYER(play); +// temp_v0 = this->unk174; +// this->dyna.actor.hintId = 8; +// var_s0 = 0; +// var_s1 = &spD8; +// if (temp_v0 == 0) { +// spD4 = 0x3E8; +// spD0 = 0x3E80; +// spCC = 0x7D0; +// spC8 = 0x5DC; +// spC4 = 0x1770; +// spC0 = 0xBB8; +// spBC = 0x514; +// spB8 = 0x5208; +// spB4 = 0xDAC; +// var_s6 = 0xA; +// var_s7 = 0x300; +// if (this->unk16C != 0) { +// spD4 = 0x1B58; +// spCC = 0x1770; +// spC0 = 0x1770; +// spBC = 0x1C84; +// spB4 = 0x1964; +// var_s6 = 1; +// var_s7 = 0x1000; +// } +// } else { +// var_s7 = 0; +// if (temp_v0 == 3) { +// spD4 = 0x1B58; +// spD0 = 0x3E80; +// spCC = 0x1388; +// spC8 = 0x5DC; +// spC4 = 0x2328; +// spC0 = 0x1388; +// spBC = 0x1C84; +// spB8 = 0x5208; +// spB4 = 0x157C; +// var_s6 = 1; +// var_s7 = 0x1000; +// } else { +// var_s6 = 0; +// spB4 = 0; +// spB8 = 0; +// spBC = 0; +// spC0 = 0; +// spC4 = 0; +// spC8 = 0; +// spCC = 0; +// spD0 = 0; +// spD4 = 0; +// } +// } +// sp5C = &this->unk19E[0].z; +// sp60 = &this->unk19E[0].y; +// sp6C = this->unk19E; +// do { +// // temp_v0_2 = this->unk174; +// if ((this->unk174 == 0) || (this->unk174 == 3)) { +// temp_lo = var_s3 * spB8; +// var_s5 = var_s7; +// var_s4 = var_s6; +// sp70 = (f32) spB4; +// if (var_s3 < 3) { +// var_s1->y = 0; +// sp74 = temp_lo; +// sp80 = (f32) spCC; +// var_s1->x = (s32) (Math_SinS((this->unk160 * spD4) + (var_s3 * spD0)) * sp80); +// } else { +// var_s1->x = 0; +// sp74 = temp_lo; +// sp80 = (f32) spC0; +// var_s1->y = (s32) (Math_SinS((s16) ((this->unk160 * spC8) + (var_s3 * spC4))) * sp80); +// } +// if ((var_s3 == 4) || (var_s3 == 6)) { +// var_s1->z = (s32) (2.0f * (Math_SinS((this->unk160 * spBC) + temp_lo) * sp70)); +// } else { +// var_s1->z = (s32) (Math_SinS((this->unk160 * spBC) + temp_lo) * sp70); +// } +// } else { +// if (this->unk174 == 1) { +// temp_v0_3 = var_s0 + D_809F1C60; +// var_s6 = 5; +// var_s7 = 0x1000; +// var_s1->x = temp_v0_3->x; +// var_s1->y = temp_v0_3->y; +// var_s1->z = temp_v0_3->z; +// } else if (this->unk174 == 2) { +// temp_v0_4 = var_s0 + D_809F1C8C; +// var_s6 = 1; +// var_s7 = 0x2000; +// var_s1->x = temp_v0_4->x; +// var_s1->y = temp_v0_4->y; +// var_s1->z = temp_v0_4->z; +// } +// var_s5 = var_s7; +// var_s4 = var_s6; +// } +// Math_ApproachS(&sp6C->x, var_s1->x, var_s4, var_s5); +// Math_ApproachS(sp60, var_s1->y, var_s4, var_s5); +// Math_ApproachS(sp5C, var_s1->z, var_s4, var_s5); +// var_s3 += 1; +// sp5C += 6; +// sp60 += 6; +// sp6C += 6; +// var_s0 += 6; +// var_s1 += 6; +// } while (var_s3 < 7); + + +// temp_ft4 = (sp108->actor.world.pos.y - this->dyna.actor.world.pos.y) + 10.0f; +// spA4 = temp_ft4; +// if (temp_ft4 < 0.0f) { +// Math_ApproachS(&this->dyna.actor.shape.rot.y, this->dyna.actor.yawTowardsPlayer, var_s4, var_s5); +// } +// // temp_s0 = &this->unk3C8; +// SkelAnime_Update(&this->unk3C8); +// // temp_s1 = &this->unk35C; +// Math_ApproachF(&this->unk35C, 1.0f, 0.1f, 0.1f); +// if (this->unk15C != 0xA) { +// Math_ApproachS(&this->dyna.actor.shape.rot.x, 0, 0x14, 0x800); +// } + +// switch (this->unk15C) { /* irregular */ +// case 0: +// this->unk174 = 0; +// this->unk3C8.playSpeed = 1.0f; +// if (spA4 < 0.0f) { +// if (sp108->actor.speedXZ > 10.0f) { +// var_fv1 = 220.0f; +// } else { +// var_fv1 = 150.0f; +// } +// if ((this->unk162[0] == 0) && (sqrtf(this->dyna.actor.xyzDistToPlayerSq) <= var_fv1)) { +// this->unk15C = 1; +// this->unk162[0] = 0xA; +// } +// goto block_42; +// } +// sp103 = 1; +// if (sqrtf(this->dyna.actor.xyzDistToPlayerSq) <= 40.0f) { +// this->unk15E++; +// if (this->unk15E >= 0x1F) { +// this->unk15C = 0xA; +// this->unk162[0] = 0x1E; +// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3861U); +// } +// } else { +// block_42: +// this->unk15E = 0; +// } +// if (!(this->unk160 & 3) && (Rand_ZeroOne() < 0.5f)) { +// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3860U); +// } +// break; +// case 10: +// if (!(this->unk160 & 1)) { +// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3860U); +// } +// this->unk19C = (this->unk162[0] & 1) << 9; +// this->unk174 = 3; +// this->unk3C8.playSpeed = 4.0f; +// Math_ApproachS(&this->dyna.actor.shape.rot.x, -0x8000, 2, 0x2000); +// Math_ApproachS(&this->dyna.actor.shape.rot.y, this->dyna.actor.yawTowardsPlayer, 2, 0x2000); +// if (this->unk162[0] == 0) { +// this->unk162[0] = 0x64; +// this->unk15E = 0; +// this->unk15C = 0; +// } +// if (this->unk162[0] == 0x1B) { +// Math_Vec3f_Copy(&sp94, &this->dyna.actor.world.pos); +// sp94.y += 40.0f; +// EffectSsGSplash_Spawn(play, &sp94, NULL, NULL, (s16) 1, (s16) 0x7D0); +// Actor_PlaySfxAtPos(&this->dyna.actor, 0x2808U); +// } +// break; +// case 1: +// if (Animation_OnFrame(temp_s0, this->unk4FC)) { +// this->unk3C8.playSpeed = 0.0f; +// } +// this->unk174 = 1; +// if (this->unk162[0] == 0) { +// this->unk15C = 2; +// this->unk162[0] = 0x14; +// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3861U); +// } +// break; +// case 2: +// if (!(this->unk160 & 1)) { +// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3860U); +// } +// this->unk19C = (this->unk162[0] & 1) << 9; +// this->unk3C8.playSpeed = 4.0f; +// Math_ApproachF(&this->unk35C, 1.5f, 1.0f, 0.7f); +// this->unk174 = 2; +// if (this->unk162[0] == 0) { +// this->unk15C = 0; +// this->unk162[0] = 0x1E; +// } +// break; +// } + +// temp_v0_5 = func_809EECBC(this, play); +// var_s4_2 = temp_v0_5; +// if ((temp_v0_5 != 0) || (this->unk168 == 1)) { +// this->dyna.actor.params = 2; +// this->actionFunc = func_809EF9BC; +// this->dyna.actor.flags &= ~1; +// temp_s0_2 = &play->actorCtx; +// func_800BC154(play, temp_s0_2, &this->dyna.actor, 1); +// if (this->unk168 != 0) { +// var_s4_2 = 0xA; +// } +// if (var_s4_2 >= 0xA) { +// temp_v0_6 = (Boss05*)Actor_SpawnAsChild(temp_s0_2, &this->dyna.actor, play, 0x12D, this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, this->dyna.actor.shape.rot.x, this->dyna.actor.shape.rot.y, this->dyna.actor.shape.rot.z, 3); +// if (temp_v0_6 != NULL) { +// var_s0_2 = 0; +// temp_v1 = GET_PLAYER(play); +// if (&this->dyna.actor == temp_v1->targetActor) { +// temp_v1->targetActor = temp_v0_6; +// play->actorCtx.targetContext.arrowPointedActor = temp_v0_6; +// play->actorCtx.targetContext.targetedActor = temp_v0_6; +// } + +// // do { +// // temp_t5 = this->unk268.jointTable + var_s0_2; +// // temp_t4 = (unaligned s32) temp_t5->unk0; +// // temp_t1 = temp_v0_6->unk288 + var_s0_2; +// // var_s0_2 += 6; +// // temp_t1->unk0 = (unaligned s32) temp_t4; +// // temp_t1->unk4 = (u16) temp_t5->unk4; +// // } while (var_s0_2 < 0x3C); + +// for (var_s0_2 = 0; var_s0_2 < 10; var_s0_2++) { +// temp_v0_6->unk268.jointTable[var_s0_2] = this->unk268.jointTable[var_s0_2]; +// } + +// for (var_s0_3 = 0; var_s0_3 < 20; var_s0_3++) { +// temp_v0_6->unk3C8.jointTable[var_s0_3] = this->unk3C8.jointTable[var_s0_3]; +// } + +// // var_s0_3 = 0; +// // do { +// // temp_t9 = this->unk3C8.jointTable + var_s0_3; +// // temp_t7 = temp_v0_6->unk3E8 + var_s0_3; +// // temp_t7->unk0 = (unaligned s32) temp_t9->unk0; +// // temp_t7->unk4 = (u16) temp_t9->unk4; +// // temp_t6 = this->unk3C8.jointTable + var_s0_3; +// // temp_t3 = temp_v0_6->unk3E8 + var_s0_3; +// // temp_t3->unk6 = (unaligned s32) temp_t6->unk6; +// // temp_t3->unkA = (u16) temp_t6->unkA; +// // temp_t5_2 = this->unk3C8.jointTable + var_s0_3; +// // temp_t2 = temp_v0_6->unk3E8 + var_s0_3; +// // temp_t2->unkC = (unaligned s32) temp_t5_2->unkC; +// // temp_t2->unk10 = (u16) temp_t5_2->unk10; +// // temp_t9_2 = this->unk3C8.jointTable + var_s0_3; +// // temp_t2_2 = (unaligned s32) temp_t9_2->unk12; +// // temp_t8 = temp_v0_6->unk3E8 + var_s0_3; +// // var_s0_3 += 0x18; +// // temp_t8->unk12 = (unaligned s32) temp_t2_2; +// // temp_t8->unk16 = (u16) temp_t9_2->unk16; +// // } while (var_s0_3 != 0x78); + + +// Actor_PlaySfxAtPos(&this->dyna.actor, 0x381EU); +// if (var_s4_2 >= 0xB) { +// temp_v0_6->unk188 = (s8) (var_s4_2 - 0xA); +// } +// } +// } else { +// var_s3_2 = 0; +// if (var_s4_2 == 2) { +// for (var_s3_2 = 0; var_s3_2 < 2; var_s3_2++) { +// temp_v0_7 = (Boss05*)Actor_SpawnAsChild(temp_s0_2, &this->dyna.actor, play, 0x12D, this->unk324.x, this->unk324.y, this->unk324.z, this->unk330.x, this->unk330.y, this->unk330.z, var_s3_2 + 0xA); +// if (temp_v0_7 != NULL) { + +// for (var_v1 = 0; var_v1 < 20; var_v1++) { +// temp_v0_6->unk3C8.jointTable[var_v1] = this->unk3C8.jointTable[var_v1]; +// } + +// temp_v0_7->unk162[0] = (s32) (Rand_ZeroFloat(20.0f) + 20.0f); +// } +// } +// // do { +// // temp_v0_7 = (Boss05*)Actor_SpawnAsChild(temp_s0_2, &this->dyna.actor, play, 0x12D, this->unk324.x, this->unk324.y, this->unk324.z, this->unk330.x, this->unk330.y, this->unk330.z, var_s3_2 + 0xA); +// // if (temp_v0_7 != NULL) { + +// // for (var_v1 = 0; var_v1 < 20; var_v1++) { +// // temp_v0_6->unk3C8.jointTable[var_v1] = this->unk3C8.jointTable[var_v1]; +// // } + +// // // var_v1 = 0; +// // // do { +// // // temp_t2_3 = this->unk3C8.jointTable + var_v1; +// // // temp_t9_3 = temp_v0_7->unk3E8 + var_v1; +// // // temp_t9_3->unk0 = (unaligned s32) temp_t2_3->unk0; +// // // temp_t9_3->unk4 = (u16) temp_t2_3->unk4; +// // // temp_t8_2 = this->unk3C8.jointTable + var_v1; +// // // temp_t6_2 = temp_v0_7->unk3E8 + var_v1; +// // // temp_t6_2->unk6 = (unaligned s32) temp_t8_2->unk6; +// // // temp_t6_2->unkA = (u16) temp_t8_2->unkA; +// // // temp_t3_2 = this->unk3C8.jointTable + var_v1; +// // // temp_t5_3 = temp_v0_7->unk3E8 + var_v1; +// // // temp_t5_3->unkC = (unaligned s32) temp_t3_2->unkC; +// // // temp_t5_3->unk10 = (u16) temp_t3_2->unk10; +// // // temp_t2_4 = this->unk3C8.jointTable + var_v1; +// // // temp_t5_4 = (unaligned s32) temp_t2_4->unk12; +// // // temp_t1_2 = temp_v0_7->unk3E8 + var_v1; +// // // var_v1 += 0x18; +// // // temp_t1_2->unk12 = (unaligned s32) temp_t5_4; +// // // temp_t1_2->unk16 = (u16) temp_t2_4->unk16; +// // // } while (var_v1 != 0x78); + +// // temp_v0_7->unk162[0] = (s32) (Rand_ZeroFloat(20.0f) + 20.0f); +// // } +// // var_s3_2 += 1; +// // } while (var_s3_2 != 2); + +// Actor_PlaySfxAtPos(&this->dyna.actor, 0x381FU); +// } +// } +// } + +// if (sp103 == 0) { +// CollisionCheck_SetAT(play, &play->colChkCtx, &this->unk1C8.base); +// CollisionCheck_SetAT(play, &play->colChkCtx, &this->unk368.base); +// } + +// CollisionCheck_SetAC(play, &play->colChkCtx, &this->unk1C8.base); +// CollisionCheck_SetAC(play, &play->colChkCtx, &this->unk368.base); +// } + void func_809EF9BC(Boss05* this, PlayState* play) { Player* player = GET_PLAYER(play); @@ -357,7 +1207,77 @@ void func_809EF9BC(Boss05* this, PlayState* play) { } } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_05/func_809EFAB4.s") +void func_809EFAB4(Boss05* this, PlayState* play) { + s32 i; + Vec3f sp80; + Vec3f sp74; + Boss05* temp_v0; + Player* player; + + Actor_MoveWithGravity(&this->dyna.actor); + this->dyna.actor.world.pos.y -= 85.0f; + this->dyna.actor.prevPos.y -= 85.0f; + Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 20.0f, 50.0f, 40.0f, 0x44U); + this->dyna.actor.world.pos.y += 85.0f; + this->dyna.actor.prevPos.y += 85.0f; + + if (this->dyna.actor.bgCheckFlags & 0x20) { + this->dyna.actor.gravity = -0.3f; + this->dyna.actor.terminalVelocity = -5.0f; + } else { + this->dyna.actor.gravity = -2.0f; + this->dyna.actor.terminalVelocity = -20.0f; + } + + if (this->dyna.actor.bgCheckFlags & 0x40) { + this->dyna.actor.velocity.y = -3.0f; + this->dyna.actor.gravity = -0.3f; + this->dyna.actor.terminalVelocity = -5.0f; + Math_Vec3f_Copy(&sp80, &this->dyna.actor.world.pos); + sp80.y += 20.0f; + EffectSsGSplash_Spawn(play, &this->dyna.actor.world.pos, NULL, NULL, 1, 1000); + this->unk162[2] = 20; + } + + if (this->unk162[2] != 0) { + for (i = 0; i < 3; i++) { + sp74.x = randPlusMinusPoint5Scaled(40.0f) + this->dyna.actor.world.pos.x; + sp74.y = randPlusMinusPoint5Scaled(40.0f) + this->dyna.actor.world.pos.y; + sp74.z = randPlusMinusPoint5Scaled(40.0f) + this->dyna.actor.world.pos.z; + EffectSsBubble_Spawn(play, &sp74, 20.0f, 10.0f, 20.0f, 0.13f); + } + } + + if (this->dyna.actor.bgCheckFlags & 1) { + if ((this->unk189 == 0xA) && (this->unk17A != 0)) { + this->unk17A = 0; + } + + Math_ApproachZeroF(&this->unk198, 1.0f, 0.05f); + + if (this->unk198 == 0.0f) { + temp_v0 = (Boss05*)Actor_SpawnAsChild(&play->actorCtx, &this->dyna.actor, play, 0x12D, this->unk324.x, + this->unk324.y, this->unk324.z, this->unk330.x, this->unk330.y, + this->unk330.z, 4); + + if (temp_v0 != NULL) { + player = GET_PLAYER(play); + if (&this->dyna.actor == player->unk_730) { + player->unk_730 = temp_v0; + play->actorCtx.targetContext.arrowPointedActor = temp_v0; + play->actorCtx.targetContext.targetedActor = temp_v0; + } + + for (i = 0; i < 20; i++) { + temp_v0->unk3C8.jointTable[i] = this->unk3C8.jointTable[i]; + } + + Actor_PlaySfxAtPos(&temp_v0->dyna.actor, NA_SE_EN_MIZUBABA_TRANSFORM); + } + Actor_MarkForDeath(&this->dyna.actor); + } + } +} void func_809EFE50(Actor* thisx, PlayState* play2) { PlayState* play = play2; @@ -562,7 +1482,44 @@ void func_809F0708(Boss05* this, PlayState* play) { Actor_SetColorFilter(&this->dyna.actor, 0x4000U, 120, 0, 30); } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_05/func_809F0780.s") +// #pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Boss_05/func_809F0780.s") +void func_809F0780(Boss05* this, PlayState* play) { + s32 i; + s32 j; + Vec3f sp7C; + Boss05* temp_v0; + + SkelAnime_Update(&this->unk3C8); + if ((s8)this->dyna.actor.colChkInfo.health <= 0) { + if (Animation_OnFrame(&this->unk3C8, 22.0f)) { + for (i = 0; i < 14; i++) { + temp_v0 = (Boss05*)Actor_SpawnAsChild( + &play->actorCtx, &this->dyna.actor, play, 0x12D, this->dyna.actor.world.pos.x, + this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, this->dyna.actor.shape.rot.x, + this->dyna.actor.shape.rot.y, this->dyna.actor.shape.rot.z, i + 0xA); + + if (temp_v0 != NULL) { + for (j = 0; j < 20; j++) { + temp_v0->unk3C8.jointTable[j] = this->unk3C8.jointTable[j]; + } + } + } + + for (i = 0; i < 20; i++) { + sp7C.x = randPlusMinusPoint5Scaled(40.0f) + this->dyna.actor.world.pos.x; + sp7C.y = randPlusMinusPoint5Scaled(40.0f) + this->dyna.actor.world.pos.y; + sp7C.z = randPlusMinusPoint5Scaled(40.0f) + this->dyna.actor.world.pos.z; + EffectSsBubble_Spawn(play, &sp7C, 20.0f, 10.0f, 20.0f, 0.13f); + } + + SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 40, 0x381F); + Actor_MarkForDeath(&this->dyna.actor); + Item_DropCollectibleRandom(play, NULL, &this->dyna.actor.world.pos, 0xE0); + } + } else if (Animation_OnFrame(&this->unk3C8, this->unk4FC)) { + func_809F0474(this, play); + } +} void func_809F0A0C(Boss05* this, PlayState* play) { this->actionFunc = func_809F0ABC; @@ -1177,1350 +2134,3 @@ void Boss05_Draw(Actor* thisx, PlayState* play) { // 0xF1, // }, // }; - -// void func_809EE4E0(Boss05 *this, PlayState *play) { -// f32 sp94; -// f32 sp90; -// f32 sp8C; -// f32 sp88; -// f32 sp84; -// f32 sp80; -// s32 var_s1; - -// SoundSource_PlaySfxAtFixedWorldPos(play, &this->unk18C, 0x1EU, 0x28CBU); -// var_s1 = 0; -// do { -// sp80 = randPlusMinusPoint5Scaled(7.0f); -// sp88 = randPlusMinusPoint5Scaled(7.0f); -// sp84 = Rand_ZeroFloat(6.0f) + 4.0f; -// sp8C = this->unk18C.x + sp80; -// sp90 = this->unk18C.y + sp84; -// sp94 = this->unk18C.z + sp88; -// EffectSsEnIce_Spawn(play, (Vec3f *) &sp8C, Rand_ZeroFloat(0.5f) + 0.7f, (Vec3f *) &sp80, &D_809F1BF4, -// &D_809F1BEC, &D_809F1BF0, 0x1E); var_s1 += 1; -// } while (var_s1 != 8); -// } - -// void func_809EE668(s32 arg0, void *arg1, Vec3f *arg2) { -// s32 temp_v0; -// void *temp_v1; - -// temp_v0 = arg0 << 6; -// (arg1->unk1C + temp_v0)->unk30 = (s16) (s32) arg2->x; -// (arg1->unk1C + temp_v0)->unk32 = (s16) (s32) arg2->y; -// (arg1->unk1C + temp_v0)->unk34 = (s16) (s32) arg2->z; -// temp_v1 = arg1->unk1C + temp_v0; -// temp_v1->unk36 = (s16) (s32) (temp_v1->unk38 * (f32) temp_v1->unk2E); -// } - -// void Boss05_Init(Actor *thisx, PlayState *play) { -// CollisionHeader *sp34; -// s16 temp_v0; -// s32 temp_ft0; -// s32 temp_t0; -// Boss05 *this = (Boss05 *) thisx; - -// sp34 = NULL; -// this->dyna.actor.targetMode = 3; -// this->dyna.actor.colChkInfo.mass = 0xFE; -// this->dyna.actor.colChkInfo.health = 2; -// temp_t0 = (s32) Rand_ZeroFloat(1000.0f); -// this->unk35C = 1.0f; -// this->unk160 = (s16) temp_t0; -// this->dyna.actor.gravity = -0.3f; -// Actor_SetScale(&this->dyna.actor, 0.01f); -// temp_v0 = this->dyna.actor.params; -// if ((temp_v0 == 0) || (temp_v0 == 1)) { -// if (this->dyna.actor.world.rot.z == 0) { -// this->dyna.actor.world.rot.z = 0; -// } -// this->dyna.actor.shape.rot.z = 0; -// this->unk168 = this->dyna.actor.world.rot.z; -// this->dyna.actor.colChkInfo.damageTable = &D_809F1C00; -// this->dyna.actor.world.rot.z = this->dyna.actor.shape.rot.z; -// DynaPolyActor_Init(&this->dyna, 0); -// CollisionHeader_GetVirtual(&D_809F1B00, &sp34); -// this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, sp34); -// func_809EEDD0(this, play); -// SkelAnime_InitFlex(play, &this->unk268, &D_060024E0, &D_06000ABC, this->unk2AC, this->unk2E8, 0xA); -// SkelAnime_InitFlex(play, &this->unk3C8, &D_06006378, &D_06006484, this->unk40C, this->unk484, 0x14); -// this->unk4FC = (f32) Animation_GetLastFrame(&D_06006484); -// Collider_InitAndSetJntSph(play, &this->unk1C8, &this->dyna.actor, &D_809F1B74, this->unk1E8); -// Collider_InitAndSetJntSph(play, &this->unk368, &this->dyna.actor, &D_809F1BA8, this->unk388); -// if (Flags_GetClear(play, (s32) play->roomCtx.currRoom.num) != 0) { -// this->dyna.actor.params = 2; -// this->actionFunc = func_809EF9BC; -// this->dyna.actor.flags &= ~1; -// func_800BC154(play, &play->actorCtx, &this->dyna.actor, 1U); -// } -// } else { -// if (temp_v0 == 2) { -// this->actionFunc = func_809EF9BC; -// CollisionHeader_GetVirtual(&D_809F1B00, &sp34); -// this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, sp34); -// SkelAnime_InitFlex(play, &this->unk268, &D_060024E0, &D_06000ABC, this->unk2AC, this->unk2E8, 0xA); -// this->dyna.actor.flags &= ~1; -// func_800BC154(play, &play->actorCtx, &this->dyna.actor, 1U); -// return; -// } -// if (temp_v0 == 3) { -// this->actionFunc = func_809EFAB4; -// this->unk198 = 1.0f; -// SkelAnime_InitFlex(play, &this->unk268, &D_060024E0, &D_06000ABC, this->unk2AC, this->unk2E8, 0xA); -// SkelAnime_InitFlex(play, &this->unk3C8, &D_06006378, &D_06006484, this->unk40C, this->unk484, 0x14); -// this->unk4FC = (f32) Animation_GetLastFrame(&D_06006484); -// Collider_InitAndSetJntSph(play, &this->unk1C8, &this->dyna.actor, &D_809F1B74, this->unk1E8); -// Collider_InitAndSetJntSph(play, &this->unk368, &this->dyna.actor, &D_809F1BA8, this->unk388); -// ActorShape_Init(&this->dyna.actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); -// this->dyna.actor.colChkInfo.damageTable = &D_809F1C00; -// return; -// } -// if (temp_v0 == 4) { -// func_809F00CC(this, play); -// this->dyna.actor.colChkInfo.mass = 0x5A; -// SkelAnime_InitFlex(play, &this->unk3C8, &D_06006378, &D_06006484, this->unk40C, this->unk484, 0x14); -// Collider_InitAndSetJntSph(play, &this->unk368, &this->dyna.actor, &D_809F1BDC, this->unk388); -// ActorShape_Init(&this->dyna.actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); -// this->dyna.actor.colChkInfo.damageTable = &D_809F1C20; -// this->dyna.actor.flags |= 0x30; -// return; -// } -// if (temp_v0 >= 0xA) { -// SkelAnime_InitFlex(play, &this->unk3C8, &D_06006378, &D_06006484, this->unk40C, this->unk484, 0x14); -// this->dyna.actor.gravity = 0.0f; -// this->dyna.actor.world.rot.y = (s16) (s32) Rand_ZeroFloat(32768.0f); -// this->dyna.actor.speedXZ = Rand_ZeroFloat(3.0f) + 3.0f; -// this->dyna.actor.velocity.y = Rand_ZeroFloat(1.5f) + 1.5f; -// this->unk500 = (s16) (s32) randPlusMinusPoint5Scaled(700.0f); -// this->unk502 = (s16) (s32) randPlusMinusPoint5Scaled(1500.0f); -// temp_ft0 = (s32) (Rand_ZeroFloat(30.0f) + 50.0f); -// this->dyna.actor.flags &= ~1; -// this->actionFunc = func_809F0B0C; -// this->unk162[0] = (s16) temp_ft0; -// } -// } -// } - -// void Boss05_Destroy(Actor *thisx, PlayState *play) { -// s16 temp_v0; -// Boss05 *this = (Boss05 *) thisx; - -// temp_v0 = this->dyna.actor.params; -// if ((temp_v0 == 2) || (temp_v0 == 0) || (temp_v0 == 1)) { -// DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); -// } -// } - -// s32 func_809EECBC(Actor *arg0, PlayState *arg1) { -// s32 var_v0; -// u8 temp_v0; -// void *var_v1; - -// var_v0 = 0; -// if (arg0->unk16C == 0) { -// var_v1 = arg0->unk1E4; -// loop_2: -// var_v0 += 0x40; -// if (var_v1->unk16 & 2) { -// temp_v0 = arg0->colChkInfo.damageEffect; -// switch (temp_v0) { /* irregular */ -// case 2: -// return 0xB; -// case 3: -// return 0x14; -// case 4: -// return 0x1E; -// default: -// return 0xA; -// } -// } else { -// var_v1 += 0x40; -// if (var_v0 == 0x80) { -// if (arg0->unk384->unk16 & 2) { -// arg0->colChkInfo.health -= arg0->colChkInfo.damage; -// if ((s8) arg0->colChkInfo.health <= 0) { -// Enemy_StartFinishingBlow(arg1, arg0); -// return 2; -// } -// Actor_PlaySfxAtPos(arg0, 0x3807U); -// arg0->unk16C = 0xF; -// arg0->unk15C = 0; -// arg0->unk162 = 0x1E; -// return 0; -// } -// goto block_16; -// } -// goto loop_2; -// } -// } else { -// block_16: -// return 0; -// } -// } - -// void func_809EEDD0(Boss05 *this, PlayState *play) { -// this->actionFunc = func_809EEDE8; -// } - -// void func_809EEDE8(Boss05 *this, PlayState *play) { -// Actor *sp108; -// u8 sp103; -// ? spD8; -// s32 spD4; -// s32 spD0; -// s32 spCC; -// s32 spC8; -// s32 spC4; -// s32 spC0; -// s32 spBC; -// s32 spB8; -// s32 spB4; -// f32 spA4; -// Vec3f sp94; -// f32 sp80; -// s32 sp74; -// f32 sp70; -// s16 *sp6C; -// s16 *sp60; -// s16 *sp5C; -// ? *temp_t5; -// ? *var_s1; -// ? temp_t2_2; -// ? temp_t4; -// ? temp_t5_4; -// Actor *temp_v0_6; -// Actor *temp_v0_7; -// Actor *temp_v1; -// ActorContext *temp_s0_2; -// CollisionCheckContext *temp_s0_3; -// CollisionCheckContext *temp_s0_4; -// SkelAnime *temp_s0; -// f32 *temp_s1; -// f32 temp_ft4; -// f32 var_fv1; -// s16 var_s4; -// s16 var_s5; -// s16 var_s6; -// s16 var_s7; -// s32 temp_lo; -// s32 temp_v0_5; -// s32 var_s0; -// s32 var_s0_2; -// s32 var_s0_3; -// s32 var_s3; -// s32 var_s3_2; -// s32 var_s4_2; -// s32 var_v1; -// u8 temp_v0; -// u8 temp_v0_2; -// void *temp_t1; -// void *temp_t1_2; -// void *temp_t2; -// void *temp_t2_3; -// void *temp_t2_4; -// void *temp_t3; -// void *temp_t3_2; -// void *temp_t5_2; -// void *temp_t5_3; -// void *temp_t6; -// void *temp_t6_2; -// void *temp_t7; -// void *temp_t8; -// void *temp_t8_2; -// void *temp_t9; -// void *temp_t9_2; -// void *temp_t9_3; -// void *temp_v0_3; -// void *temp_v0_4; - -// sp103 = 0; -// var_s3 = 0; -// sp108 = play->actorCtx.actorLists[2].first; -// temp_v0 = this->unk174; -// this->dyna.actor.hintId = 8; -// var_s0 = 0; -// var_s1 = &spD8; -// if (temp_v0 == 0) { -// spD4 = 0x3E8; -// spD0 = 0x3E80; -// spCC = 0x7D0; -// spC8 = 0x5DC; -// spC4 = 0x1770; -// spC0 = 0xBB8; -// spBC = 0x514; -// spB8 = 0x5208; -// spB4 = 0xDAC; -// var_s6 = 0xA; -// var_s7 = 0x300; -// if (this->unk16C != 0) { -// spD4 = 0x1B58; -// spCC = 0x1770; -// spC0 = 0x1770; -// spBC = 0x1C84; -// spB4 = 0x1964; -// var_s6 = 1; -// var_s7 = 0x1000; -// } -// } else { -// var_s7 = 0; -// if (temp_v0 == 3) { -// spD4 = 0x1B58; -// spD0 = 0x3E80; -// spCC = 0x1388; -// spC8 = 0x5DC; -// spC4 = 0x2328; -// spC0 = 0x1388; -// spBC = 0x1C84; -// spB8 = 0x5208; -// spB4 = 0x157C; -// var_s6 = 1; -// var_s7 = 0x1000; -// } else { -// var_s6 = 0; -// spB4 = 0; -// spB8 = 0; -// spBC = 0; -// spC0 = 0; -// spC4 = 0; -// spC8 = 0; -// spCC = 0; -// spD0 = 0; -// spD4 = 0; -// } -// } -// sp5C = &this->unk1A2; -// sp60 = &this->unk1A0; -// sp6C = &this->unk19E; -// do { -// temp_v0_2 = this->unk174; -// if ((temp_v0_2 == 0) || (temp_v0_2 == 3)) { -// temp_lo = var_s3 * spB8; -// var_s5 = var_s7; -// var_s4 = var_s6; -// sp70 = (f32) spB4; -// if (var_s3 < 3) { -// var_s1->unk2 = 0; -// sp74 = temp_lo; -// sp80 = (f32) spCC; -// var_s1->unk0 = (s16) (s32) (Math_SinS((s16) ((this->unk160 * spD4) + (var_s3 * spD0))) * sp80); -// } else { -// var_s1->unk0 = 0; -// sp74 = temp_lo; -// sp80 = (f32) spC0; -// var_s1->unk2 = (s16) (s32) (Math_SinS((s16) ((this->unk160 * spC8) + (var_s3 * spC4))) * sp80); -// } -// if ((var_s3 == 4) || (var_s3 == 6)) { -// var_s1->unk4 = (s16) (s32) (2.0f * (Math_SinS((s16) ((this->unk160 * spBC) + temp_lo)) * sp70)); -// } else { -// var_s1->unk4 = (s16) (s32) (Math_SinS((s16) ((this->unk160 * spBC) + temp_lo)) * sp70); -// } -// } else { -// if (temp_v0_2 == 1) { -// temp_v0_3 = var_s0 + &D_809F1C60; -// var_s6 = 5; -// var_s7 = 0x1000; -// var_s1->unk0 = (s16) temp_v0_3->unk0; -// var_s1->unk2 = (s16) temp_v0_3->unk2; -// var_s1->unk4 = (s16) temp_v0_3->unk4; -// } else if (temp_v0_2 == 2) { -// temp_v0_4 = var_s0 + &D_809F1C8C; -// var_s6 = 1; -// var_s7 = 0x2000; -// var_s1->unk0 = (s16) temp_v0_4->unk0; -// var_s1->unk2 = (s16) temp_v0_4->unk2; -// var_s1->unk4 = (s16) temp_v0_4->unk4; -// } -// var_s5 = var_s7; -// var_s4 = var_s6; -// } -// Math_ApproachS(sp6C, var_s1->unk0, var_s4, var_s5); -// Math_ApproachS(sp60, var_s1->unk2, var_s4, var_s5); -// Math_ApproachS(sp5C, var_s1->unk4, var_s4, var_s5); -// var_s3 += 1; -// sp5C += 6; -// sp60 += 6; -// sp6C += 6; -// var_s0 += 6; -// var_s1 += 6; -// } while (var_s3 < 7); -// temp_ft4 = (sp108->world.pos.y - this->dyna.actor.world.pos.y) + 10.0f; -// spA4 = temp_ft4; -// if (temp_ft4 < 0.0f) { -// Math_ApproachS(&this->dyna.actor.shape.rot.y, this->dyna.actor.yawTowardsPlayer, var_s4, var_s5); -// } -// temp_s0 = &this->unk3C8; -// SkelAnime_Update(temp_s0); -// temp_s1 = &this->unk35C; -// Math_ApproachF(temp_s1, 1.0f, 0.1f, 0.1f); -// if (this->unk15C != (u8) 0xA) { -// Math_ApproachS(&this->dyna.actor.shape.rot.x, 0, 0x14, 0x800); -// } -// switch (this->unk15C) { /* irregular */ -// case 0: -// this->unk174 = 0; -// this->unk3C8.playSpeed = 1.0f; -// if (spA4 < 0.0f) { -// if (sp108->speedXZ > 10.0f) { -// var_fv1 = 220.0f; -// } else { -// var_fv1 = 150.0f; -// } -// if ((this->unk162[0] == 0) && (sqrtf(this->dyna.actor.xyzDistToPlayerSq) <= var_fv1)) { -// this->unk15C = 1; -// this->unk162[0] = 0xA; -// } -// goto block_42; -// } -// sp103 = 1; -// if (sqrtf(this->dyna.actor.xyzDistToPlayerSq) <= 40.0f) { -// this->unk15E += 1; -// if (this->unk15E >= 0x1F) { -// this->unk15C = 0xA; -// this->unk162[0] = 0x1E; -// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3861U); -// } -// } else { -// block_42: -// this->unk15E = 0; -// } -// if (!(this->unk160 & 3) && (Rand_ZeroOne() < 0.5f)) { -// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3860U); -// } -// break; -// case 10: -// if (!(this->unk160 & 1)) { -// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3860U); -// } -// this->unk19C = (this->unk162[0] & 1) << 9; -// this->unk174 = 3; -// this->unk3C8.playSpeed = 4.0f; -// Math_ApproachS(&this->dyna.actor.shape.rot.x, -0x8000, 2, 0x2000); -// Math_ApproachS(&this->dyna.actor.shape.rot.y, this->dyna.actor.yawTowardsPlayer, 2, 0x2000); -// if (this->unk162[0] == 0) { -// this->unk162[0] = 0x64; -// this->unk15E = 0; -// this->unk15C = 0; -// } -// if (this->unk162[0] == 0x1B) { -// Math_Vec3f_Copy(&sp94, &this->dyna.actor.world.pos); -// sp94.y += 40.0f; -// EffectSsGSplash_Spawn(play, &sp94, NULL, NULL, (s16) 1, (s16) 0x7D0); -// Actor_PlaySfxAtPos(&this->dyna.actor, 0x2808U); -// } -// break; -// case 1: -// if (Animation_OnFrame(temp_s0, this->unk4FC) != 0) { -// this->unk3C8.playSpeed = 0.0f; -// } -// this->unk174 = 1; -// if (this->unk162[0] == 0) { -// this->unk15C = 2; -// this->unk162[0] = 0x14; -// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3861U); -// } -// break; -// case 2: -// if (!(this->unk160 & 1)) { -// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3860U); -// } -// this->unk19C = (this->unk162[0] & 1) << 9; -// this->unk3C8.playSpeed = 4.0f; -// Math_ApproachF(temp_s1, 1.5f, 1.0f, 0.7f); -// this->unk174 = 2; -// if (this->unk162[0] == 0) { -// this->unk15C = 0; -// this->unk162[0] = 0x1E; -// } -// break; -// } -// temp_v0_5 = func_809EECBC(&this->dyna.actor, play); -// var_s4_2 = temp_v0_5; -// if ((temp_v0_5 != 0) || (this->unk168 == 1)) { -// this->dyna.actor.params = 2; -// this->actionFunc = func_809EF9BC; -// this->dyna.actor.flags &= ~1; -// temp_s0_2 = &play->actorCtx; -// func_800BC154(play, temp_s0_2, &this->dyna.actor, 1U); -// if (this->unk168 != 0) { -// var_s4_2 = 0xA; -// } -// if (var_s4_2 >= 0xA) { -// temp_v0_6 = Actor_SpawnAsChild(temp_s0_2, &this->dyna.actor, play, 0x12D, this->dyna.actor.world.pos.x, -// this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, (s16) (s32) this->dyna.actor.shape.rot.x, -// (s16) (s32) this->dyna.actor.shape.rot.y, (s16) (s32) this->dyna.actor.shape.rot.z, 3); if (temp_v0_6 != -// NULL) { -// var_s0_2 = 0; -// temp_v1 = play->actorCtx.actorLists[2].first; -// if (this == temp_v1->unk730) { -// temp_v1->unk730 = temp_v0_6; -// play->actorCtx.targetContext.arrowPointedActor = temp_v0_6; -// play->actorCtx.targetContext.targetedActor = temp_v0_6; -// } -// do { -// temp_t5 = this->unk268.jointTable + var_s0_2; -// temp_t4 = (unaligned s32) temp_t5->unk0; -// temp_t1 = temp_v0_6->unk288 + var_s0_2; -// var_s0_2 += 6; -// temp_t1->unk0 = (unaligned s32) temp_t4; -// temp_t1->unk4 = (u16) temp_t5->unk4; -// } while (var_s0_2 < 0x3C); -// var_s0_3 = 0; -// do { -// temp_t9 = this->unk3C8.jointTable + var_s0_3; -// temp_t7 = temp_v0_6->unk3E8 + var_s0_3; -// temp_t7->unk0 = (unaligned s32) temp_t9->unk0; -// temp_t7->unk4 = (u16) temp_t9->unk4; -// temp_t6 = this->unk3C8.jointTable + var_s0_3; -// temp_t3 = temp_v0_6->unk3E8 + var_s0_3; -// temp_t3->unk6 = (unaligned s32) temp_t6->unk6; -// temp_t3->unkA = (u16) temp_t6->unkA; -// temp_t5_2 = this->unk3C8.jointTable + var_s0_3; -// temp_t2 = temp_v0_6->unk3E8 + var_s0_3; -// temp_t2->unkC = (unaligned s32) temp_t5_2->unkC; -// temp_t2->unk10 = (u16) temp_t5_2->unk10; -// temp_t9_2 = this->unk3C8.jointTable + var_s0_3; -// temp_t2_2 = (unaligned s32) temp_t9_2->unk12; -// temp_t8 = temp_v0_6->unk3E8 + var_s0_3; -// var_s0_3 += 0x18; -// temp_t8->unk12 = (unaligned s32) temp_t2_2; -// temp_t8->unk16 = (u16) temp_t9_2->unk16; -// } while (var_s0_3 != 0x78); -// Actor_PlaySfxAtPos(&this->dyna.actor, 0x381EU); -// if (var_s4_2 >= 0xB) { -// temp_v0_6->unk188 = (s8) (var_s4_2 - 0xA); -// } -// } -// } else { -// var_s3_2 = 0; -// if (var_s4_2 == 2) { -// do { -// temp_v0_7 = Actor_SpawnAsChild(temp_s0_2, &this->dyna.actor, play, 0x12D, this->unk324.x, -// this->unk324.y, this->unk324.z, (s16) (s32) this->unk330.x, (s16) (s32) this->unk330.y, (s16) -// (s32) this->unk330.z, var_s3_2 + 0xA); if (temp_v0_7 != NULL) { -// var_v1 = 0; -// do { -// temp_t2_3 = this->unk3C8.jointTable + var_v1; -// temp_t9_3 = temp_v0_7->unk3E8 + var_v1; -// temp_t9_3->unk0 = (unaligned s32) temp_t2_3->unk0; -// temp_t9_3->unk4 = (u16) temp_t2_3->unk4; -// temp_t8_2 = this->unk3C8.jointTable + var_v1; -// temp_t6_2 = temp_v0_7->unk3E8 + var_v1; -// temp_t6_2->unk6 = (unaligned s32) temp_t8_2->unk6; -// temp_t6_2->unkA = (u16) temp_t8_2->unkA; -// temp_t3_2 = this->unk3C8.jointTable + var_v1; -// temp_t5_3 = temp_v0_7->unk3E8 + var_v1; -// temp_t5_3->unkC = (unaligned s32) temp_t3_2->unkC; -// temp_t5_3->unk10 = (u16) temp_t3_2->unk10; -// temp_t2_4 = this->unk3C8.jointTable + var_v1; -// temp_t5_4 = (unaligned s32) temp_t2_4->unk12; -// temp_t1_2 = temp_v0_7->unk3E8 + var_v1; -// var_v1 += 0x18; -// temp_t1_2->unk12 = (unaligned s32) temp_t5_4; -// temp_t1_2->unk16 = (u16) temp_t2_4->unk16; -// } while (var_v1 != 0x78); -// temp_v0_7->unk162 = (s16) (s32) (Rand_ZeroFloat(20.0f) + 20.0f); -// } -// var_s3_2 += 1; -// } while (var_s3_2 != 2); -// Actor_PlaySfxAtPos(&this->dyna.actor, 0x381FU); -// } -// } -// } -// if (sp103 == 0) { -// temp_s0_3 = &play->colChkCtx; -// CollisionCheck_SetAT(play, temp_s0_3, &this->unk1C8.base); -// CollisionCheck_SetAT(play, temp_s0_3, &this->unk368.base); -// } -// temp_s0_4 = &play->colChkCtx; -// CollisionCheck_SetAC(play, temp_s0_4, &this->unk1C8.base); -// CollisionCheck_SetAC(play, temp_s0_4, &this->unk368.base); -// } - -// void func_809EF9BC(Boss05 *this, PlayState *play) { -// f32 temp_fv0; -// s16 var_a1; -// s32 temp_ft3; - -// temp_fv0 = sqrtf(this->dyna.actor.xyzDistToPlayerSq); -// if ((temp_fv0 < 50.0f) && (play->actorCtx.actorLists[2].first->bgCheckFlags & 1)) { -// temp_ft3 = (s32) (temp_fv0 * 80.0f); -// var_a1 = (s16) temp_ft3; -// if ((s16) temp_ft3 >= 0x7D1) { -// var_a1 = 0x7D0; -// } -// Math_ApproachS(&this->unk178, var_a1, 0x14, 0x7D0); -// Math_ApproachS(&this->unk176, this->dyna.actor.yawTowardsPlayer, 0x14, 0xFA0); -// if (!(this->unk160 & 0xF)) { -// EffectSsGRipple_Spawn(play, &this->dyna.actor.world.pos, 0x1F4, 0x3E8, (s16) 0); -// } -// } else { -// Math_ApproachS(&this->unk178, 0, 0x14, 0x100); -// } -// } - -// void func_809EFAB4(Boss05 *this, PlayState *play) { -// Vec3f sp80; -// f32 sp7C; -// f32 sp78; -// f32 sp74; -// ? temp_t8; -// Actor *temp_v0; -// Actor *temp_v1; -// PosRot *temp_s1; -// s32 var_s1; -// s32 var_v1; -// void *temp_t1; -// void *temp_t3; -// void *temp_t3_2; -// void *temp_t5; -// void *temp_t6; -// void *temp_t7; -// void *temp_t7_2; -// void *temp_t9; - -// Actor_MoveWithGravity(&this->dyna.actor); -// this->dyna.actor.world.pos.y -= 85.0f; -// this->dyna.actor.prevPos.y -= 85.0f; -// Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 20.0f, 50.0f, 40.0f, 0x44U); -// this->dyna.actor.world.pos.y += 85.0f; -// this->dyna.actor.prevPos.y += 85.0f; -// if (this->dyna.actor.bgCheckFlags & 0x20) { -// this->dyna.actor.gravity = -0.3f; -// this->dyna.actor.terminalVelocity = -5.0f; -// } else { -// this->dyna.actor.gravity = -2.0f; -// this->dyna.actor.terminalVelocity = -20.0f; -// } -// temp_s1 = &this->dyna.actor.world; -// if (this->dyna.actor.bgCheckFlags & 0x40) { -// this->dyna.actor.velocity.y = -3.0f; -// this->dyna.actor.gravity = -0.3f; -// this->dyna.actor.terminalVelocity = -5.0f; -// Math_Vec3f_Copy(&sp80, &temp_s1->pos); -// sp80.y += 20.0f; -// EffectSsGSplash_Spawn(play, &temp_s1->pos, NULL, NULL, (s16) 1, (s16) 0x3E8); -// this->unk162[2] = 0x14; -// } -// var_s1 = 0; -// if (this->unk162[2] != 0) { -// do { -// sp74 = randPlusMinusPoint5Scaled(40.0f) + this->dyna.actor.world.pos.x; -// sp78 = randPlusMinusPoint5Scaled(40.0f) + this->dyna.actor.world.pos.y; -// sp7C = randPlusMinusPoint5Scaled(40.0f) + this->dyna.actor.world.pos.z; -// EffectSsBubble_Spawn(play, (Vec3f *) &sp74, 20.0f, 10.0f, 20.0f, 0.13f); -// var_s1 += 1; -// } while (var_s1 != 3); -// } -// if (this->dyna.actor.bgCheckFlags & 1) { -// if ((this->unk189 == 0xA) && (this->unk17A != 0)) { -// this->unk17A = 0; -// } -// Math_ApproachZeroF(&this->unk198, 1.0f, 0.05f); -// if (this->unk198 == 0.0f) { -// temp_v0 = Actor_SpawnAsChild(&play->actorCtx, &this->dyna.actor, play, 0x12D, this->unk324.x, -// this->unk324.y, this->unk324.z, (s16) (s32) this->unk330.x, (s16) (s32) this->unk330.y, (s16) (s32) -// this->unk330.z, 4); if (temp_v0 != NULL) { -// temp_v1 = play->actorCtx.actorLists[2].first; -// if (this == temp_v1->unk730) { -// temp_v1->unk730 = temp_v0; -// play->actorCtx.targetContext.arrowPointedActor = temp_v0; -// play->actorCtx.targetContext.targetedActor = temp_v0; -// } -// var_v1 = 0; -// do { -// temp_t7 = this->unk3C8.jointTable + var_v1; -// temp_t5 = temp_v0->unk3E8 + var_v1; -// temp_t5->unk0 = (unaligned s32) temp_t7->unk0; -// temp_t5->unk4 = (u16) temp_t7->unk4; -// temp_t3 = this->unk3C8.jointTable + var_v1; -// temp_t1 = temp_v0->unk3E8 + var_v1; -// temp_t1->unk6 = (unaligned s32) temp_t3->unk6; -// temp_t1->unkA = (u16) temp_t3->unkA; -// temp_t9 = this->unk3C8.jointTable + var_v1; -// temp_t7_2 = temp_v0->unk3E8 + var_v1; -// temp_t7_2->unkC = (unaligned s32) temp_t9->unkC; -// temp_t7_2->unk10 = (u16) temp_t9->unk10; -// temp_t6 = this->unk3C8.jointTable + var_v1; -// temp_t8 = (unaligned s32) temp_t6->unk12; -// temp_t3_2 = temp_v0->unk3E8 + var_v1; -// var_v1 += 0x18; -// temp_t3_2->unk12 = (unaligned s32) temp_t8; -// temp_t3_2->unk16 = (u16) temp_t6->unk16; -// } while (var_v1 != 0x78); -// Actor_PlaySfxAtPos(temp_v0, 0x3825U); -// } -// Actor_MarkForDeath(&this->dyna.actor); -// } -// } -// } - -// void func_809EFE50(Actor *thisx, PlayState *play2) { -// u8 sp27; -// u8 temp_a0; -// u8 temp_v0; -// u8 var_a2; -// void *temp_v1; - -// if ((thisx->unk16A == 0) && (temp_v1 = thisx->unk384, temp_a0 = temp_v1->unk16, ((temp_a0 & 2) != 0))) { -// temp_v1->unk16 = (u8) (temp_a0 & 0xFFFD); -// if (*thisx->unk384->unk24 & 0x300000) { -// thisx->unk16A = 6; -// thisx->unk338 = -12.0f; -// thisx->unk348 = (s16) thisx->yawTowardsPlayer; -// return; -// } -// thisx->unk16A = 0xA; -// thisx->speedXZ = 0.0f; -// thisx->unk338 = -20.0f; -// thisx->unk348 = (s16) thisx->yawTowardsPlayer; -// sp27 = 0; -// Actor_PlaySfxAtPos(thisx, 0x3807U); -// temp_v0 = thisx->colChkInfo.damageEffect; -// switch (temp_v0) { /* irregular */ -// case 1: -// sp27 = 0; -// func_809F0A0C((Boss05 *) thisx, play2); -// var_a2 = 0; -// break; -// case 2: -// thisx->unk188 = 1; -// default: -// block_13: -// var_a2 = 1; -// break; -// case 3: -// sp27 = 0; -// func_809F0A64((Boss05 *) thisx, play2); -// var_a2 = 0; -// thisx->unk188 = 0xA; -// break; -// case 4: -// thisx->unk188 = 0x14; -// goto block_13; -// } -// if (var_a2 != 0) { -// if ((func_809F0ABC == thisx->unk170) && (thisx->unk189 == 0xA) && (thisx->unk17A != 0)) { -// func_809EE4E0((Boss05 *) thisx, play2); -// thisx->unk188 = 0; -// } -// thisx->colChkInfo.health -= thisx->colChkInfo.damage; -// if ((s8) thisx->colChkInfo.health <= 0) { -// Enemy_StartFinishingBlow(play2, thisx); -// } -// func_809F0708((Boss05 *) thisx, play2); -// thisx->unk16C = 0xF; -// } -// } -// } - -// s32 func_809F0014(Boss05 *this, PlayState *play) { -// s16 temp_v0; -// s16 var_v1; - -// temp_v0 = this->dyna.actor.yawTowardsPlayer - this->dyna.actor.shape.rot.y; -// var_v1 = temp_v0; -// if (temp_v0 < 0) { -// var_v1 = -temp_v0; -// } -// if (var_v1 < 0x3000) { -// return 1; -// } -// return 0; -// } - -// void func_809F0058(Boss05 *this, PlayState *play) { -// if ((func_809F0014(this, play) != 0) && (this->dyna.actor.xyzDistToPlayerSq <= 40000.0f) && -// (fabsf(this->dyna.actor.playerHeightRel) < 70.0f)) { -// func_809F0474(this, play); -// } -// } - -// void func_809F00CC(Boss05 *this, PlayState *play) { -// this->actionFunc = func_809F010C; -// Animation_MorphToPlayOnce(&this->unk3C8, &D_06006E50, -5.0f); -// } - -// void func_809F010C(Boss05 *this, PlayState *play) { -// SkelAnime_Update(&this->unk3C8); -// Math_ApproachS(&this->dyna.actor.shape.rot.x, 0, 2, 0x400); -// Math_ApproachS(&this->dyna.actor.shape.rot.z, 0, 2, 0x400); -// Math_ApproachF(&this->unk360, 1.0f, 1.0f, 0.5f); -// Math_ApproachF(&this->unk364, 1.0f, 1.0f, 0.14f); -// if (this->unk364 == 1.0f) { -// func_809F01CC(this, play); -// } -// } - -// void func_809F01CC(Boss05 *this, PlayState *play) { -// this->actionFunc = func_809F0244; -// Animation_MorphToLoop(&this->unk3C8, &D_06007488, -10.0f); -// this->unk162[0] = (s16) (s32) (Rand_ZeroFloat(25.0f) + 25.0f); -// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3860U); -// } - -// void func_809F0244(Boss05 *this, PlayState *play) { -// SkelAnime_Update(&this->unk3C8); -// Math_ApproachZeroF(&this->dyna.actor.speedXZ, 1.0f, 2.5f); -// Math_ApproachS(&this->dyna.actor.shape.rot.x, 0, 2, 0x400); -// Math_ApproachS(&this->dyna.actor.shape.rot.z, 0, 2, 0x400); -// if (this->unk162[0] == 0) { -// func_809F02D0(this, play); -// } -// func_809F0058(this, play); -// } - -// void func_809F02D0(Boss05 *this, PlayState *play) { -// f32 temp_ft0; - -// this->actionFunc = func_809F0374; -// Animation_MorphToLoop(&this->unk3C8, &D_06007908, 0.0f); -// this->unk162[0] = (s16) (s32) (Rand_ZeroFloat(80.0f) + 60.0f); -// this->unk34C = randPlusMinusPoint5Scaled(400.0f) + this->dyna.actor.world.pos.x; -// temp_ft0 = randPlusMinusPoint5Scaled(400.0f) + this->dyna.actor.world.pos.z; -// this->unk358 = 0.0f; -// this->unk354 = temp_ft0; -// } - -// void func_809F0374(Boss05 *this, PlayState *play) { -// f32 sp24; -// f32 sp20; -// f32 temp_fa0; -// f32 temp_fa1; - -// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3027U); -// SkelAnime_Update(&this->unk3C8); -// Math_ApproachF(&this->dyna.actor.speedXZ, 5.0f, 1.0f, 2.0f); -// temp_fa0 = this->unk34C - this->dyna.actor.world.pos.x; -// temp_fa1 = this->unk354 - this->dyna.actor.world.pos.z; -// sp24 = temp_fa0; -// sp20 = temp_fa1; -// Math_ApproachS(&this->dyna.actor.world.rot.y, Math_Atan2S(temp_fa0, temp_fa1), 5, (s16) (s32) this->unk358); -// Math_ApproachF(&this->unk358, 2000.0f, 1.0f, 100.0f); -// if ((this->unk162[0] == 0) || (((sp24 * sp24) + (sp20 * sp20)) < 2500.0f)) { -// func_809F01CC(this, play); -// } -// func_809F0058(this, play); -// } - -// void func_809F0474(Boss05 *this, PlayState *play) { -// this->actionFunc = func_809F04C0; -// Animation_MorphToPlayOnce(&this->unk3C8, &D_06003448, 0.0f); -// this->unk162[0] = 0x14; -// } - -// void func_809F04C0(Boss05 *this, PlayState *play) { -// SkelAnime_Update(&this->unk3C8); -// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3006U); -// Math_ApproachZeroF(&this->dyna.actor.speedXZ, 1.0f, 2.5f); -// Math_ApproachS(&this->dyna.actor.world.rot.y, this->dyna.actor.yawTowardsPlayer, 5, 0x1000); -// if (this->unk162[0] == 0) { -// func_809F0538(this, play); -// } -// } - -// void func_809F0538(Boss05 *this, PlayState *arg1) { -// this->actionFunc = func_809F0590; -// Animation_MorphToLoop(&this->unk3C8, &D_06000A5C, 0.0f); -// this->unk162[0] = 0x3C; -// this->unk358 = 0.0f; -// } - -// void func_809F0590(Boss05 *this, PlayState *play) { -// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3006U); -// SkelAnime_Update(&this->unk3C8); -// Math_ApproachF(&this->dyna.actor.speedXZ, 8.0f, 1.0f, 4.0f); -// Math_ApproachS(&this->dyna.actor.world.rot.y, this->dyna.actor.yawTowardsPlayer, 5, (s16) (s32) this->unk358); -// Math_ApproachF(&this->unk358, 4000.0f, 1.0f, 400.0f); -// if ((this->unk162[0] == 0) || (this->dyna.actor.xyzDistToPlayerSq <= 22500.0f)) { -// func_809F0650(this, play); -// } -// } - -// void func_809F0650(Boss05 *this, PlayState *arg1) { -// this->actionFunc = func_809F06B8; -// Animation_MorphToPlayOnce(&this->unk3C8, &D_060006A4, 0.0f); -// this->unk4FC = (f32) Animation_GetLastFrame(&D_060006A4); -// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3837U); -// } - -// void func_809F06B8(Boss05 *this, PlayState *play) { -// SkelAnime *sp1C; -// SkelAnime *temp_a0; - -// temp_a0 = &this->unk3C8; -// sp1C = temp_a0; -// SkelAnime_Update(temp_a0); -// if (Animation_OnFrame(temp_a0, this->unk4FC) != 0) { -// func_809F01CC(this, play); -// } -// } - -// void func_809F0708(Boss05 *this, PlayState *play) { -// this->actionFunc = func_809F0780; -// Animation_MorphToPlayOnce(&this->unk3C8, &D_06002F0C, 0.0f); -// this->unk4FC = (f32) Animation_GetLastFrame(&D_060006A4); -// Actor_SetColorFilter(&this->dyna.actor, 0x4000U, 0x78U, 0U, (u16) 0x1E); -// } - -// void func_809F0780(Boss05 *this, PlayState *play) { -// f32 sp84; -// f32 sp80; -// f32 sp7C; -// ? temp_t5; -// Actor *temp_v0; -// PosRot *temp_s1_2; -// SkelAnime *temp_s1; -// s32 var_s2; -// s32 var_s2_2; -// s32 var_v1; -// void *temp_t0; -// void *temp_t0_2; -// void *temp_t2; -// void *temp_t3; -// void *temp_t4; -// void *temp_t4_2; -// void *temp_t6; -// void *temp_t8; - -// temp_s1 = &this->unk3C8; -// SkelAnime_Update(temp_s1); -// if ((s8) this->dyna.actor.colChkInfo.health <= 0) { -// var_s2 = 0; -// if (Animation_OnFrame(temp_s1, 22.0f) != 0) { -// do { -// temp_v0 = Actor_SpawnAsChild(&play->actorCtx, &this->dyna.actor, play, 0x12D, -// this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, (s16) (s32) -// this->dyna.actor.shape.rot.x, (s16) (s32) this->dyna.actor.shape.rot.y, (s16) (s32) -// this->dyna.actor.shape.rot.z, var_s2 + 0xA); var_s2 += 1; if (temp_v0 != NULL) { -// var_v1 = 0; -// do { -// temp_t4 = this->unk3C8.jointTable + var_v1; -// temp_t2 = temp_v0->unk3E8 + var_v1; -// temp_t2->unk0 = (unaligned s32) temp_t4->unk0; -// temp_t2->unk4 = (u16) temp_t4->unk4; -// temp_t0 = this->unk3C8.jointTable + var_v1; -// temp_t8 = temp_v0->unk3E8 + var_v1; -// temp_t8->unk6 = (unaligned s32) temp_t0->unk6; -// temp_t8->unkA = (u16) temp_t0->unkA; -// temp_t6 = this->unk3C8.jointTable + var_v1; -// temp_t4_2 = temp_v0->unk3E8 + var_v1; -// temp_t4_2->unkC = (unaligned s32) temp_t6->unkC; -// temp_t4_2->unk10 = (u16) temp_t6->unk10; -// temp_t3 = this->unk3C8.jointTable + var_v1; -// temp_t5 = (unaligned s32) temp_t3->unk12; -// temp_t0_2 = temp_v0->unk3E8 + var_v1; -// var_v1 += 0x18; -// temp_t0_2->unk12 = (unaligned s32) temp_t5; -// temp_t0_2->unk16 = (u16) temp_t3->unk16; -// } while (var_v1 != 0x78); -// } -// } while (var_s2 < 0xE); -// var_s2_2 = 0; -// do { -// sp7C = randPlusMinusPoint5Scaled(40.0f) + this->dyna.actor.world.pos.x; -// sp80 = randPlusMinusPoint5Scaled(40.0f) + this->dyna.actor.world.pos.y; -// sp84 = randPlusMinusPoint5Scaled(40.0f) + this->dyna.actor.world.pos.z; -// EffectSsBubble_Spawn(play, (Vec3f *) &sp7C, 20.0f, 10.0f, 20.0f, 0.13f); -// var_s2_2 += 1; -// } while (var_s2_2 != 0x14); -// temp_s1_2 = &this->dyna.actor.world; -// SoundSource_PlaySfxAtFixedWorldPos(play, &temp_s1_2->pos, 0x28U, 0x381FU); -// Actor_MarkForDeath(&this->dyna.actor); -// Item_DropCollectibleRandom(play, NULL, &temp_s1_2->pos, 0xE0); -// } -// } else if (Animation_OnFrame(temp_s1, this->unk4FC) != 0) { -// func_809F0474(this, play); -// } -// } - -// void func_809F0A0C(Boss05 *this, PlayState *play) { -// this->actionFunc = func_809F0ABC; -// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3807U); -// this->unk162[0] = 0x28; -// Actor_SetColorFilter(&this->dyna.actor, 0U, 0x78U, 0U, (u16) 0x28); -// } - -// void func_809F0A64(Boss05 *this, PlayState *play) { -// this->actionFunc = func_809F0ABC; -// Actor_PlaySfxAtPos(&this->dyna.actor, 0x3807U); -// this->unk162[0] = 0x50; -// Actor_SetColorFilter(&this->dyna.actor, 0U, 0x78U, 0U, (u16) 0x50); -// } - -// void func_809F0ABC(Boss05 *this, PlayState *play) { -// Math_ApproachZeroF(&this->dyna.actor.speedXZ, 1.0f, 2.5f); -// if (this->unk162[0] == 0) { -// func_809F01CC(this, play); -// } -// } - -// void func_809F0B0C(Boss05 *this, PlayState *play) { -// s32 temp_t9; -// u8 var_v0; - -// Actor_MoveWithGravity(&this->dyna.actor); -// var_v0 = this->unk15C; -// if (var_v0 == 0) { -// Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 20.0f, 50.0f, 40.0f, 0x44U); -// var_v0 = 2U & 0xFF; -// if (this->dyna.actor.bgCheckFlags & 0x20) { -// this->unk15C = 1; -// var_v0 = 1U & 0xFF; -// } else { -// this->unk15C = 2; -// } -// } -// if (var_v0 == 1) { -// Math_ApproachF(&this->dyna.actor.velocity.y, 1.0f, 1.0f, 0.1f); -// Math_ApproachZeroF(&this->dyna.actor.speedXZ, 0.5f, 0.5f); -// this->dyna.actor.shape.rot.x += this->unk500; -// this->dyna.actor.shape.rot.y += this->unk502; -// if (this->unk162[0] == 0) { -// Actor_MarkForDeath(&this->dyna.actor); -// } -// } else { -// switch (var_v0) { /* irregular */ -// case 2: -// this->dyna.actor.velocity.y = Rand_ZeroFloat(3.0f) + 3.0f; -// this->dyna.actor.speedXZ = randPlusMinusPoint5Scaled(5.0f) + 5.0f; -// temp_t9 = (s32) Rand_ZeroFloat(65536.0f); -// this->unk15C = 3; -// this->dyna.actor.gravity = -1.0f; -// this->dyna.actor.world.rot.y = (s16) temp_t9; -// return; -// case 3: -// Actor_MoveWithGravity(&this->dyna.actor); -// if (this->unk324.y < (this->dyna.actor.floorHeight - 30.0f)) { -// Actor_MarkForDeath(&this->dyna.actor); -// } -// return; -// } -// } -// } - -// void Boss05_Update(Actor *thisx, PlayState *play) { -// CollisionCheckContext *sp30; -// ColliderJntSph *sp2C; -// ColliderJntSph *temp_a2; -// CollisionCheckContext *temp_a1; -// s16 temp_a0; -// s16 temp_v0; -// s16 temp_v0_2; -// s16 temp_v0_3; -// s16 temp_v0_4; -// s16 var_v0; -// u8 temp_v0_5; -// void *temp_v1; -// Boss05 *this = (Boss05 *) thisx; - -// var_v0 = 0; -// this->unk160 += 1; -// do { -// temp_v1 = this + (var_v0 * 2); -// temp_a0 = this->unk162[var_v0]; -// var_v0 += 1; -// if (temp_a0 != 0) { -// temp_v1->unk162 = (s16) (temp_a0 - 1); -// } -// } while (var_v0 < 3); -// temp_v0 = this->unk16A; -// if (temp_v0 != 0) { -// this->unk16A = temp_v0 - 1; -// } -// temp_v0_2 = this->unk16C; -// if (temp_v0_2 != 0) { -// this->unk16C = temp_v0_2 - 1; -// } -// temp_v0_3 = this->unk168; -// if (temp_v0_3 != 0) { -// this->unk168 = temp_v0_3 - 1; -// } -// temp_v0_4 = this->unk17A; -// if (temp_v0_4 != 0) { -// this->unk17A = temp_v0_4 - 1; -// } -// this->actionFunc(this, play); -// if (this->dyna.actor.params == 4) { -// Actor_MoveWithGravity(&this->dyna.actor); -// Matrix_RotateYS(this->unk348, MTXMODE_NEW); -// Matrix_MultVecZ(this->unk338, &this->unk33C); -// this->dyna.actor.world.pos.x += this->unk33C.x; -// this->dyna.actor.world.pos.z += this->unk33C.z; -// Math_ApproachZeroF(&this->unk338, 1.0f, 1.0f); -// Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 20.0f, 50.0f, 40.0f, 0x45U); -// func_809EFE50(&this->dyna.actor, play); -// temp_a2 = &this->unk368; -// temp_a1 = &play->colChkCtx; -// sp30 = temp_a1; -// sp2C = temp_a2; -// CollisionCheck_SetAT(play, temp_a1, &temp_a2->base); -// CollisionCheck_SetAC(play, temp_a1, &temp_a2->base); -// CollisionCheck_SetOC(play, temp_a1, &temp_a2->base); -// this->dyna.actor.shape.rot.y = this->dyna.actor.world.rot.y; -// } -// temp_v0_5 = this->unk188; -// switch (temp_v0_5) { -// case 0: -// this->unk189 = 0; -// this->unk17A = 0; -// this->unk184 = 0.0f; -// return; -// case 1: -// this->unk189 = 0; -// this->unk17A = 0x50; -// this->unk184 = 1.0f; -// this->unk188 = temp_v0_5 + 1; -// this->unk17C = 0.0f; -// /* fallthrough */ -// case 2: -// if (this->unk17A == 0) { -// Math_ApproachZeroF(&this->unk184, 1.0f, 0.02f); -// if (this->unk184 == 0.0f) { -// this->unk188 = 0; -// return; -// } -// default: -// return; -// } -// Math_ApproachF(&this->unk17C, 1.0f, 0.1f, 0.5f); -// return; -// case 10: -// this->unk189 = 0xA; -// this->unk17A = 0x50; -// this->unk184 = 1.0f; -// this->unk188 = temp_v0_5 + 1; -// this->unk17C = 0.0f; -// this->unk180 = 2.0f; -// /* fallthrough */ -// case 11: -// if (this->unk17A == 0) { -// func_809EE4E0(this, play); -// this->unk188 = 0; -// return; -// } -// Math_ApproachF(&this->unk17C, 1.0f, 1.0f, 0.25f); -// Math_ApproachF(&this->unk180, 1.0f, 0.1f, 0.1f); -// return; -// case 20: -// this->unk189 = 0x14; -// this->unk17A = 0x50; -// this->unk184 = 1.0f; -// this->unk188 = temp_v0_5 + 1; -// this->unk17C = 0.0f; -// return; -// case 21: -// if (this->unk17A == 0) { -// Math_ApproachZeroF(&this->unk17C, 1.0f, 0.03f); -// if (this->unk17C == 0.0f) { -// this->unk188 = 0; -// this->unk184 = 0.0f; -// return; -// } -// } else { -// Math_ApproachF(&this->unk17C, 1.0f, 0.5f, 0.5f); -// } -// break; -// } -// } - -// s32 func_809F1050(PlayState *play, s32 limbIndex, Gfx **dList, Vec3f *pos, Vec3s *rot, Actor *thisx) { -// s8 temp_v1; -// void *temp_a1; - -// if (limbIndex == gGameInfo->data[0x500]) { -// if (!(thisx->unk160 & 3)) { -// *dList = NULL; -// } -// rot->x += gGameInfo->data[0x501] << 8; -// rot->y += gGameInfo->data[0x502] << 8; -// rot->z += gGameInfo->data[0x503] << 8; -// } -// if ((thisx->params == 1) && (limbIndex == 9)) { -// *dList = NULL; -// } -// if (limbIndex == 2) { -// rot->x += thisx->unk19C; -// } -// temp_v1 = *(&D_809F1CB8 + limbIndex); -// if (temp_v1 >= 0) { -// temp_a1 = thisx + (temp_v1 * 6); -// rot->x += temp_a1->unk19E; -// rot->y += temp_a1->unk1A0; -// rot->z += temp_a1->unk1A2; -// } -// return 0; -// } - -// void func_809F1170(PlayState *play, s32 limbIndex, Gfx **dList, Vec3s *rot, Actor *thisx) { -// MtxF sp3C; -// Vec3f sp30; -// Vec3f sp24; -// void *sp20; - -// if (limbIndex == 4) { -// Matrix_MultVec3f(&D_809F1CC4, thisx + 0x324); -// if (func_809EFAB4 == thisx->unk170) { -// Matrix_MultVec3f(&D_809F1CC4, &thisx->focus.pos); -// } -// Matrix_Get(&sp3C); -// Matrix_MtxFToYXZRot(&sp3C, thisx + 0x330, 0); -// thisx->unk330 = (s16) (thisx->unk330 + 0xF00); -// } -// if (limbIndex == 2) { -// Matrix_MultZero(&sp30); -// func_809EE668(0, thisx + 0x1C8, &sp30); -// } -// if (limbIndex == 3) { -// sp20 = thisx + 0x1C8; -// Matrix_MultVecY(-500.0f, &sp24); -// func_809EE668(1, sp20, &sp24); -// if (func_809EEDE8 == thisx->unk170) { -// Matrix_MultVecY(1500.0f, &thisx->focus.pos); -// } -// } -// } - -// s32 func_809F1284(PlayState *play, s32 limbIndex, Gfx **dList, Vec3f *pos, Vec3s *rot, Actor *thisx) { -// return 0; -// } - -// void func_809F12A0(PlayState *play, s32 limbIndex, Gfx **dList, Vec3s *rot, Actor *thisx) { -// if (limbIndex == 1) { -// Matrix_MultVec3f(&D_809F1CD0, &D_809F2110); -// func_809EE668(0, thisx + 0x368, &D_809F2110); -// if (thisx->params == 4) { -// Matrix_MultVec3f(D_809F1CDC, &thisx->focus.pos); -// } -// if (thisx->unk188 != 0) { -// Matrix_MultVec3f(D_809F1CDC, thisx + 0x18C); -// if (thisx->unk189 == 0) { -// thisx->unk190 = (f32) (thisx->unk190 - 15.0f); -// } -// } -// } -// } - -// void func_809F135C(PlayState *play, s32 limbIndex, Actor *thisx) { -// f32 temp_fa0; -// f32 temp_fa0_2; -// f32 temp_fa0_3; - -// if ((limbIndex == 2) || (limbIndex == 3)) { -// temp_fa0 = thisx->unk35C; -// Matrix_Scale(temp_fa0, 1.0f, temp_fa0, MTXMODE_APPLY); -// } -// if (limbIndex == 1) { -// temp_fa0_2 = thisx->unk360; -// Matrix_Scale(temp_fa0_2, temp_fa0_2, temp_fa0_2, MTXMODE_APPLY); -// } -// if ((limbIndex >= 4) && (limbIndex < 0x14)) { -// temp_fa0_3 = thisx->unk364; -// Matrix_Scale(temp_fa0_3, temp_fa0_3, temp_fa0_3, MTXMODE_APPLY); -// } -// } - -// s32 func_809F1404(PlayState *play, s32 limbIndex, Gfx **dList, Vec3f *pos, Vec3s *rot, Actor *thisx) { -// if ((limbIndex >= 3) && (limbIndex < 9)) { -// *dList = NULL; -// } -// return 0; -// } - -// s32 func_809F1430(PlayState *play, s32 limbIndex, Gfx **dList, Vec3f *pos, Vec3s *rot, Actor *thisx) { -// if ((limbIndex == 1) || (limbIndex == 2) || (limbIndex == 9)) { -// *dList = NULL; -// } -// return 0; -// } - -// void func_809F1464(PlayState *play, s32 limbIndex, Actor *thisx) { -// f32 temp_fa0; - -// if ((limbIndex >= 3) && (limbIndex < 9)) { -// temp_fa0 = thisx->unk198; -// Matrix_Scale(temp_fa0, temp_fa0, temp_fa0, MTXMODE_APPLY); -// } -// } - -// s32 func_809F14AC(PlayState *play, s32 limbIndex, Gfx **dList, Vec3f *pos, Vec3s *rot, Actor *thisx) { -// if (limbIndex != D_809F1CC0[thisx->params]) { -// *dList = NULL; -// } else if ((s32) thisx->unk15C >= 2) { -// rot->x += thisx->unk160 * 0x3000; -// rot->y += thisx->unk160 * 0x1A00; -// rot->z += thisx->unk160 << 0xD; -// } -// return 0; -// } - -// void func_809F1550(PlayState *play, s32 limbIndex, Gfx **dList, Vec3s *rot, Actor *thisx) { -// if (limbIndex != D_809F1CC0[thisx->params]) { -// Matrix_MultZero(thisx + 0x324); -// } -// } - -// void Boss05_Draw(Actor *thisx, PlayState *play) { -// GraphicsContext *sp34; -// GraphicsContext *temp_a0; -// s16 temp_v0; -// Boss05 *this = (Boss05 *) thisx; - -// temp_a0 = play->state.gfxCtx; -// sp34 = temp_a0; -// func_8012C28C(temp_a0); -// if (func_809EEDE8 == this->actionFunc) { -// SkelAnime_DrawFlexOpa(play, this->unk268.skeleton, this->unk268.jointTable, (s32) this->unk268.dListCount, -// func_809F1050, func_809F1170, &this->dyna.actor); if (this->unk16C & 1) { -// sp34->polyOpa.p = Gfx_SetFog(sp34->polyOpa.p, 0xFF, 0, 0, 0xFF, 0x384, 0x44B); -// } -// Matrix_Translate(this->unk324.x, this->unk324.y, this->unk324.z, MTXMODE_NEW); -// Matrix_RotateYS(this->unk330.y, MTXMODE_APPLY); -// Matrix_RotateXS(this->unk330.x, MTXMODE_APPLY); -// Matrix_RotateZS(this->unk330.z, MTXMODE_APPLY); -// Matrix_Scale(this->dyna.actor.scale.x, this->dyna.actor.scale.y, this->dyna.actor.scale.z, MTXMODE_APPLY); -// AnimatedMat_Draw(play, Lib_SegmentedToVirtual(D_06006240)); -// SkelAnime_DrawTransformFlexOpa(play, this->unk3C8.skeleton, this->unk3C8.jointTable, (s32) -// this->unk3C8.dListCount, func_809F1284, func_809F12A0, func_809F135C, &this->dyna.actor); -// } else { -// temp_v0 = this->dyna.actor.params; -// if (temp_v0 == 2) { -// Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, -// this->dyna.actor.world.pos.z, MTXMODE_NEW); Matrix_RotateYS(this->unk176, MTXMODE_APPLY); -// Matrix_RotateXS(this->unk178, MTXMODE_APPLY); -// Matrix_RotateYS((s16) (this->unk176 * -1), MTXMODE_APPLY); -// Matrix_RotateYS(this->dyna.actor.shape.rot.y, MTXMODE_APPLY); -// Matrix_RotateXS(this->dyna.actor.shape.rot.x, MTXMODE_APPLY); -// Matrix_RotateZS(this->dyna.actor.shape.rot.z, MTXMODE_APPLY); -// Matrix_Scale(this->dyna.actor.scale.x, this->dyna.actor.scale.y, this->dyna.actor.scale.z, -// MTXMODE_APPLY); SkelAnime_DrawFlexOpa(play, this->unk268.skeleton, this->unk268.jointTable, (s32) -// this->unk268.dListCount, func_809F1404, NULL, &this->dyna.actor); -// } else if (temp_v0 == 3) { -// SkelAnime_DrawTransformFlexOpa(play, this->unk268.skeleton, this->unk268.jointTable, (s32) -// this->unk268.dListCount, func_809F1430, func_809F1170, func_809F1464, &this->dyna.actor); -// Matrix_Translate(this->unk324.x, this->unk324.y, this->unk324.z, MTXMODE_NEW); -// Matrix_RotateYS(this->unk330.y, MTXMODE_APPLY); -// Matrix_RotateXS(this->unk330.x, MTXMODE_APPLY); -// Matrix_RotateZS(this->unk330.z, MTXMODE_APPLY); -// Matrix_Scale(this->dyna.actor.scale.x, this->dyna.actor.scale.y, this->dyna.actor.scale.z, -// MTXMODE_APPLY); AnimatedMat_Draw(play, Lib_SegmentedToVirtual(D_06006240)); -// SkelAnime_DrawTransformFlexOpa(play, this->unk3C8.skeleton, this->unk3C8.jointTable, (s32) -// this->unk3C8.dListCount, func_809F1284, func_809F12A0, func_809F135C, &this->dyna.actor); -// Actor_DrawDamageEffects(play, &this->dyna.actor, &this->unk18C, 1, this->unk17C, this->unk180, -// this->unk184, (u8) (s32) this->unk189); -// } else if (temp_v0 == 4) { -// AnimatedMat_Draw(play, Lib_SegmentedToVirtual(D_06006240)); -// if (this->unk16C & 1) { -// sp34->polyOpa.p = Gfx_SetFog(sp34->polyOpa.p, 0xFF, 0, 0, 0xFF, 0x384, 0x44B); -// } -// SkelAnime_DrawTransformFlexOpa(play, this->unk3C8.skeleton, this->unk3C8.jointTable, (s32) -// this->unk3C8.dListCount, func_809F1284, func_809F12A0, func_809F135C, &this->dyna.actor); -// Actor_DrawDamageEffects(play, &this->dyna.actor, &this->unk18C, 1, this->unk17C, this->unk180, -// this->unk184, (u8) (s32) this->unk189); -// } else if (temp_v0 >= 0xA) { -// AnimatedMat_Draw(play, Lib_SegmentedToVirtual(D_06006240)); -// SkelAnime_DrawFlexOpa(play, this->unk3C8.skeleton, this->unk3C8.jointTable, (s32) -// this->unk3C8.dListCount, func_809F14AC, func_809F1550, &this->dyna.actor); -// } -// } -// sp34->polyOpa.p = func_801660B8(play, sp34->polyOpa.p); -// } diff --git a/src/overlays/actors/ovl_Boss_05/z_boss_05.h b/src/overlays/actors/ovl_Boss_05/z_boss_05.h index 36cfd9a7b..4881b702d 100644 --- a/src/overlays/actors/ovl_Boss_05/z_boss_05.h +++ b/src/overlays/actors/ovl_Boss_05/z_boss_05.h @@ -17,7 +17,8 @@ typedef void (*Boss05ActionFunc)(struct Boss05*, PlayState*); typedef struct Boss05 { /* 0x000 */ DynaPolyActor dyna; /* 0x15C */ u8 unk15C; /* inferred */ - /* 0x15D */ char pad15D[3]; /* maybe part of unk15C[4]? */ + /* 0x15D */ char pad15D[1]; + /* 0x15E */ s16 unk15E; /* inferred */ /* 0x160 */ s16 unk160; /* inferred */ /* 0x162 */ s16 unk162[3]; /* 0x168 */ s16 unk168; /* inferred */ @@ -25,7 +26,9 @@ typedef struct Boss05 { /* 0x16C */ s16 unk16C; /* inferred */ /* 0x16E */ char pad16E[2]; /* 0x170 */ Boss05ActionFunc actionFunc; - /* 0x174 */ char pad174[2]; // possibly this is a Vec3s + /* 0x174 */ u8 unk174; /* inferred */ + /* 0x175 */ char pad175[1]; + // /* 0x174 */ char pad174[2]; // possibly this is a Vec3s /* 0x176 */ s16 unk176; /* 0x178 */ s16 unk178; /* 0x17A */ s16 unk17A; /* inferred */