From 06b512faa95f4b71ec57089c57331d7d796288dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= <159546+serprex@users.noreply.github.com> Date: Fri, 10 Apr 2026 17:25:27 +0000 Subject: [PATCH] port over unk renaming from upstream (#6470) --- .../Enhancements/RemoveSpinAttackDarkness.cpp | 4 +- .../Restorations/WideShutterDoorRanges.cpp | 5 +- .../Enhancements/randomizer/hook_handlers.cpp | 2 +- .../Enhancements/timesaver_hook_handlers.cpp | 2 +- soh/soh/Network/Anchor/HookHandlers.cpp | 2 +- .../ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.h | 6 +- .../ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c | 44 +- .../ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.h | 4 +- .../actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c | 13 +- .../actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.h | 4 +- .../ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c | 8 +- .../ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.h | 2 +- .../ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c | 114 ++-- .../ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h | 20 +- .../actors/ovl_Boss_Dodongo/z_boss_dodongo.h | 2 +- .../actors/ovl_Boss_Ganon2/z_boss_ganon2.c | 532 +++++++++--------- .../actors/ovl_Boss_Ganon2/z_boss_ganon2.h | 8 +- .../overlays/actors/ovl_Demo_Im/z_demo_im.c | 16 +- .../overlays/actors/ovl_Demo_Im/z_demo_im.h | 2 +- .../overlays/actors/ovl_Demo_Sa/z_demo_sa.c | 10 +- .../overlays/actors/ovl_Demo_Sa/z_demo_sa.h | 2 +- .../actors/ovl_Door_Shutter/z_door_shutter.c | 96 ++-- .../actors/ovl_Door_Shutter/z_door_shutter.h | 14 +- soh/src/overlays/actors/ovl_En_Am/z_en_am.h | 2 +- .../ovl_En_Attack_Niw/z_en_attack_niw.h | 2 +- .../overlays/actors/ovl_En_Bird/z_en_bird.c | 52 +- .../overlays/actors/ovl_En_Bird/z_en_bird.h | 20 +- .../ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c | 2 +- .../ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c | 65 ++- .../ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h | 20 +- soh/src/overlays/actors/ovl_En_Box/z_en_box.c | 4 +- soh/src/overlays/actors/ovl_En_Box/z_en_box.h | 2 +- .../overlays/actors/ovl_En_Brob/z_en_brob.c | 26 +- .../overlays/actors/ovl_En_Brob/z_en_brob.h | 2 +- soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c | 54 +- soh/src/overlays/actors/ovl_En_Cow/z_en_cow.h | 6 +- .../ovl_En_Diving_Game/z_en_diving_game.c | 68 ++- .../ovl_En_Diving_Game/z_en_diving_game.h | 14 +- .../actors/ovl_En_Dodojr/z_en_dodojr.c | 26 +- .../actors/ovl_En_Dodojr/z_en_dodojr.h | 2 +- .../actors/ovl_En_Encount1/z_en_encount1.c | 2 +- .../actors/ovl_En_Ex_Item/z_en_ex_item.h | 2 +- soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c | 16 +- soh/src/overlays/actors/ovl_En_Go2/z_en_go2.h | 8 +- .../overlays/actors/ovl_En_Guest/z_en_guest.c | 6 +- .../overlays/actors/ovl_En_Guest/z_en_guest.h | 4 +- .../actors/ovl_En_Heishi2/z_en_heishi2.c | 44 +- .../actors/ovl_En_Heishi2/z_en_heishi2.h | 8 +- .../actors/ovl_En_Heishi4/z_en_heishi4.c | 12 +- .../actors/ovl_En_Heishi4/z_en_heishi4.h | 4 +- .../overlays/actors/ovl_En_Holl/z_en_holl.c | 26 +- .../overlays/actors/ovl_En_Holl/z_en_holl.h | 2 +- .../z_en_horse_game_check.c | 4 +- .../z_en_horse_game_check.h | 4 +- .../ovl_En_Horse_Zelda/z_en_horse_zelda.c | 14 +- .../ovl_En_Horse_Zelda/z_en_horse_zelda.h | 4 +- soh/src/overlays/actors/ovl_En_Hy/z_en_hy.c | 21 +- soh/src/overlays/actors/ovl_En_Hy/z_en_hy.h | 8 +- soh/src/overlays/actors/ovl_En_Ik/z_en_ik.c | 61 +- soh/src/overlays/actors/ovl_En_Ik/z_en_ik.h | 12 +- soh/src/overlays/actors/ovl_En_In/z_en_in.c | 16 +- soh/src/overlays/actors/ovl_En_In/z_en_in.h | 4 +- .../actors/ovl_En_Insect/z_en_insect.c | 159 +++--- .../actors/ovl_En_Insect/z_en_insect.h | 8 +- soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c | 18 +- soh/src/overlays/actors/ovl_En_Ko/z_en_ko.h | 4 +- soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c | 8 +- soh/src/overlays/actors/ovl_En_Kz/z_en_kz.h | 4 +- .../actors/ovl_En_M_Thunder/z_en_m_thunder.c | 134 ++--- .../actors/ovl_En_M_Thunder/z_en_m_thunder.h | 22 +- soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c | 8 +- soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h | 2 +- soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c | 16 +- soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h | 6 +- soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c | 8 +- soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h | 2 +- soh/src/overlays/actors/ovl_En_Md/z_en_md.c | 12 +- soh/src/overlays/actors/ovl_En_Md/z_en_md.h | 4 +- soh/src/overlays/actors/ovl_En_Mu/z_en_mu.c | 6 +- soh/src/overlays/actors/ovl_En_Mu/z_en_mu.h | 4 +- .../actors/ovl_En_Niw_Girl/z_en_niw_girl.c | 16 +- .../actors/ovl_En_Niw_Girl/z_en_niw_girl.h | 4 +- .../actors/ovl_En_Niw_Lady/z_en_niw_lady.c | 12 +- .../actors/ovl_En_Niw_Lady/z_en_niw_lady.h | 4 +- .../actors/ovl_En_Po_Field/z_en_po_field.h | 2 +- .../actors/ovl_En_Po_Relay/z_en_po_relay.c | 24 +- .../actors/ovl_En_Po_Relay/z_en_po_relay.h | 4 +- soh/src/overlays/actors/ovl_En_Poh/z_en_poh.h | 2 +- .../actors/ovl_En_Pu_box/z_en_pu_box.c | 2 +- .../actors/ovl_En_Pu_box/z_en_pu_box.h | 2 +- soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c | 241 ++++---- soh/src/overlays/actors/ovl_En_Rd/z_en_rd.h | 30 +- .../overlays/actors/ovl_En_Reeba/z_en_reeba.c | 124 ++-- .../overlays/actors/ovl_En_Reeba/z_en_reeba.h | 20 +- soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c | 111 ++-- soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h | 32 +- soh/src/overlays/actors/ovl_En_Skb/z_en_skb.c | 72 +-- soh/src/overlays/actors/ovl_En_Skb/z_en_skb.h | 10 +- .../ovl_En_Syateki_Niw/z_en_syateki_niw.c | 496 ++++++++-------- .../ovl_En_Syateki_Niw/z_en_syateki_niw.h | 91 ++- soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c | 282 +++++----- soh/src/overlays/actors/ovl_En_Ta/z_en_ta.h | 24 +- .../overlays/actors/ovl_En_Toryo/z_en_toryo.c | 34 +- .../overlays/actors/ovl_En_Toryo/z_en_toryo.h | 4 +- .../actors/ovl_En_Weiyer/z_en_weiyer.c | 124 ++-- .../actors/ovl_En_Weiyer/z_en_weiyer.h | 8 +- .../ovl_En_Wonder_Talk/z_en_wonder_talk.h | 2 +- soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c | 22 +- soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.h | 2 +- soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c | 16 +- soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h | 4 +- soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c | 4 +- soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.h | 2 +- soh/src/overlays/actors/ovl_En_Zo/z_en_zo.c | 8 +- soh/src/overlays/actors/ovl_En_Zo/z_en_zo.h | 4 +- soh/src/overlays/actors/ovl_En_fHG/z_en_fhg.h | 2 +- .../overlays/actors/ovl_Obj_Lift/z_obj_lift.c | 24 +- .../overlays/actors/ovl_Obj_Lift/z_obj_lift.h | 2 +- .../actors/ovl_Obj_Switch/z_obj_switch.c | 16 +- .../actors/ovl_Obj_Switch/z_obj_switch.h | 2 +- .../overlays/actors/ovl_Shot_Sun/z_shot_sun.c | 18 +- .../overlays/actors/ovl_Shot_Sun/z_shot_sun.h | 2 +- .../actors/ovl_player_actor/z_player.c | 2 +- .../ovl_Effect_Ss_Stone1/z_eff_ss_stone1.h | 2 +- 124 files changed, 1958 insertions(+), 1937 deletions(-) diff --git a/soh/soh/Enhancements/RemoveSpinAttackDarkness.cpp b/soh/soh/Enhancements/RemoveSpinAttackDarkness.cpp index 965817030..6349a7818 100644 --- a/soh/soh/Enhancements/RemoveSpinAttackDarkness.cpp +++ b/soh/soh/Enhancements/RemoveSpinAttackDarkness.cpp @@ -18,8 +18,8 @@ void Custom_EnMThunder_Update(Actor* thisx, PlayState* play) { enMThunder->actionFunc(enMThunder, play); // don't call this part, it's what makes the spin attack darkness happen - // func_80A9F314(play, this->unk_1BC); - blueRadius = enMThunder->unk_1AC; + // func_80A9F314(play, this->dimmingIntensity); + blueRadius = enMThunder->spinAttackTimer; redGreen = (u32)(blueRadius * 255.0f) & 0xFF; Lights_PointNoGlowSetInfo(&enMThunder->lightInfo, enMThunder->actor.world.pos.x, enMThunder->actor.world.pos.y, enMThunder->actor.world.pos.z, redGreen, redGreen, (u32)(blueRadius * 100.0f), diff --git a/soh/soh/Enhancements/Restorations/WideShutterDoorRanges.cpp b/soh/soh/Enhancements/Restorations/WideShutterDoorRanges.cpp index 7c56fab24..7b55b3c81 100644 --- a/soh/soh/Enhancements/Restorations/WideShutterDoorRanges.cpp +++ b/soh/soh/Enhancements/Restorations/WideShutterDoorRanges.cpp @@ -19,9 +19,8 @@ void RegisterWideShutterDoorRange() { COND_VB_SHOULD(VB_BE_NEAR_DOOR_SHUTTER, CVAR_WIDE_SHUTTER_DOOR_RANGE_VALUE, { DoorShutter* doorShutter = va_arg(args, DoorShutter*); Vec3f relPlayerPos = *va_arg(args, Vec3f*); - // Jabu-Jabu door, Phantom Ganon bars, Gohma door, or boss door - if (doorShutter->unk_16C == 3 || doorShutter->unk_16C == 4 || doorShutter->unk_16C == 5 || - doorShutter->unk_16C == 7) { + if (doorShutter->gfxType == SHUTTER_BACK_LOCKED || doorShutter->gfxType == SHUTTER_PG_BARS || + doorShutter->gfxType == SHUTTER_BOSS || doorShutter->gfxType == SHUTTER_GOHMA_BLOCK) { *should = (SHUTTER_DOOR_RANGE_X < fabsf(relPlayerPos.x) || SHUTTER_DOOR_RANGE_Y < fabsf(relPlayerPos.y)); } }); diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp index 340aad287..55d198432 100644 --- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp +++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp @@ -2490,7 +2490,7 @@ void RandomizerOnActorUpdateHandler(void* refActor) { } else if (actor->id == ACTOR_DOOR_SHUTTER) { DoorShutter* shutterDoor = reinterpret_cast(actor); if (shutterDoor->doorType == SHUTTER_KEY_LOCKED) { - shutterDoor->unk_16E = 0; + shutterDoor->unlockTimer = 0; } } else if (actor->id == ACTOR_DOOR_GERUDO) { DoorGerudo* gerudoDoor = reinterpret_cast(actor); diff --git a/soh/soh/Enhancements/timesaver_hook_handlers.cpp b/soh/soh/Enhancements/timesaver_hook_handlers.cpp index 39af5da45..fd5ed315b 100644 --- a/soh/soh/Enhancements/timesaver_hook_handlers.cpp +++ b/soh/soh/Enhancements/timesaver_hook_handlers.cpp @@ -57,7 +57,7 @@ void EnMa1_EndTeachSong(EnMa1* enMa1, PlayState* play) { enMa1->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED; play->msgCtx.ocarinaMode = OCARINA_MODE_04; enMa1->actionFunc = func_80AA0D88; - enMa1->unk_1E0 = 1; + enMa1->singingDisabled = 1; enMa1->interactInfo.talkState = NPC_TALK_STATE_IDLE; return; } diff --git a/soh/soh/Network/Anchor/HookHandlers.cpp b/soh/soh/Network/Anchor/HookHandlers.cpp index f6718c4cb..a43f01dc9 100644 --- a/soh/soh/Network/Anchor/HookHandlers.cpp +++ b/soh/soh/Network/Anchor/HookHandlers.cpp @@ -322,7 +322,7 @@ void Anchor::RegisterHooks() { DoorShutter* actor = static_cast(refActor); if (Flags_GetSwitch(gPlayState, actor->dyna.actor.params & 0x3F)) { - DECR(actor->unk_16E); + DECR(actor->unlockTimer); } }); diff --git a/soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.h b/soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.h index 4b78bc6c2..b0588bd69 100644 --- a/soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.h +++ b/soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.h @@ -21,8 +21,8 @@ typedef struct { /* 0x30 */ f32 scale; /* 0x34 */ s16 timer; // lifetime /* 0x36 */ s16 type; // 0 is general radiance, else is directed towards Player - /* 0x36 */ f32 pitch; - /* 0x36 */ f32 yaw; + /* 0x38 */ f32 pitch; + /* 0x3C */ f32 yaw; /* 0x40 */ f32 roll; /* 0x44 */ u32 epoch; } BgDyYoseizoParticle; // size = 0x48 @@ -48,7 +48,7 @@ typedef struct BgDyYoseizo { /* 0x02FA */ s16 unusedTimer; /* 0x02FC */ s16 animationChanged; /* 0x02FE */ s16 finishedSpinGrow; - /* 0x02FE */ s16 itemSpawned; + /* 0x0300 */ s16 itemSpawned; /* 0x0302 */ s16 healingTimer; /* 0x0304 */ s16 warpEffectSpawned; /* 0x0306 */ s16 refillTimer; diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c b/soh/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c index 49b6e5f7c..2fd442310 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c @@ -60,7 +60,7 @@ void BgHakaMeganeBG_Init(Actor* thisx, PlayState* play) { CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); - this->unk_168 = (thisx->params >> 8) & 0xFF; + this->switchFlag = (thisx->params >> 8) & 0xFF; thisx->params &= 0xFF; if (thisx->params == 2) { @@ -74,13 +74,13 @@ void BgHakaMeganeBG_Init(Actor* thisx, PlayState* play) { if (thisx->params == 0) { CollisionHeader_GetVirtual(&object_haka_objects_Col_009168, &colHeader); thisx->flags |= ACTOR_FLAG_REACT_TO_LENS; - this->unk_16A = 20; + this->timer = 20; this->actionFunc = func_8087DFF8; } else if (thisx->params == 3) { CollisionHeader_GetVirtual(&object_haka_objects_Col_000118, &colHeader); thisx->home.pos.y += 100.0f; - if (Flags_GetSwitch(play, this->unk_168)) { + if (Flags_GetSwitch(play, this->switchFlag)) { this->actionFunc = func_8087E34C; thisx->world.pos.y = thisx->home.pos.y; } else { @@ -89,7 +89,7 @@ void BgHakaMeganeBG_Init(Actor* thisx, PlayState* play) { } } else { CollisionHeader_GetVirtual(&object_haka_objects_Col_00A7F4, &colHeader); - this->unk_16A = 80; + this->timer = 80; this->actionFunc = func_8087E10C; thisx->uncullZoneScale = 3000.0f; thisx->uncullZoneDownward = 3000.0f; @@ -106,12 +106,12 @@ void BgHakaMeganeBG_Destroy(Actor* thisx, PlayState* play) { } void func_8087DFF8(BgHakaMeganeBG* this, PlayState* play) { - if (this->unk_16A != 0) { - this->unk_16A--; + if (this->timer != 0) { + this->timer--; } - if (this->unk_16A == 0) { - this->unk_16A = 40; + if (this->timer == 0) { + this->timer = 40; this->dyna.actor.world.rot.y += 0x8000; this->actionFunc = func_8087E040; } @@ -120,11 +120,11 @@ void func_8087DFF8(BgHakaMeganeBG* this, PlayState* play) { void func_8087E040(BgHakaMeganeBG* this, PlayState* play) { f32 xSub; - if (this->unk_16A != 0) { - this->unk_16A--; + if (this->timer != 0) { + this->timer--; } - xSub = (sinf(((this->unk_16A * 0.025f) + 0.5f) * M_PI) + 1.0f) * 160.0f; + xSub = (sinf(((this->timer * 0.025f) + 0.5f) * M_PI) + 1.0f) * 160.0f; if (this->dyna.actor.world.rot.y != this->dyna.actor.shape.rot.y) { xSub = 320.0f - xSub; @@ -132,8 +132,8 @@ void func_8087E040(BgHakaMeganeBG* this, PlayState* play) { this->dyna.actor.world.pos.x = this->dyna.actor.home.pos.x - xSub; - if (this->unk_16A == 0) { - this->unk_16A = 20; + if (this->timer == 0) { + this->timer = 20; this->actionFunc = func_8087DFF8; } } @@ -147,8 +147,8 @@ void func_8087E10C(BgHakaMeganeBG* this, PlayState* play) { this->dyna.actor.velocity.y = this->dyna.actor.velocity.y; } - if (this->unk_16A != 0) { - this->unk_16A--; + if (this->timer != 0) { + this->timer--; } if (!Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y - 640.0f, @@ -156,8 +156,8 @@ void func_8087E10C(BgHakaMeganeBG* this, PlayState* play) { func_8002F974(&this->dyna.actor, NA_SE_EV_CHINETRAP_DOWN - SFX_FLAG); } - if (this->unk_16A == 0) { - this->unk_16A = 120; + if (this->timer == 0) { + this->timer = 120; this->actionFunc = func_8087E1E0; this->dyna.actor.velocity.y = 0.0f; } @@ -167,12 +167,12 @@ void func_8087E1E0(BgHakaMeganeBG* this, PlayState* play) { Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 16.0f / 3.0f); func_8002F974(&this->dyna.actor, NA_SE_EV_BRIDGE_CLOSE - SFX_FLAG); - if (this->unk_16A != 0) { - this->unk_16A--; + if (this->timer != 0) { + this->timer--; } - if (this->unk_16A == 0) { - this->unk_16A = 80; + if (this->timer == 0) { + this->timer = 80; this->actionFunc = func_8087E10C; } } @@ -183,7 +183,7 @@ void func_8087E258(BgHakaMeganeBG* this, PlayState* play) { } void func_8087E288(BgHakaMeganeBG* this, PlayState* play) { - if (Flags_GetSwitch(play, this->unk_168)) { + if (Flags_GetSwitch(play, this->switchFlag)) { OnePointCutscene_Attention(play, &this->dyna.actor); this->actionFunc = func_8087E2D8; } diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.h b/soh/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.h index 999926a08..223eec565 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.h +++ b/soh/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.h @@ -11,8 +11,8 @@ typedef void (*BgHakaMeganeBGActionFunc)(struct BgHakaMeganeBG*, PlayState*); typedef struct BgHakaMeganeBG { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ BgHakaMeganeBGActionFunc actionFunc; - /* 0x0168 */ u8 unk_168; - /* 0x016A */ s16 unk_16A; + /* 0x0168 */ u8 switchFlag; + /* 0x016A */ s16 timer; } BgHakaMeganeBG; // size = 0x016C #endif diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c b/soh/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c index 2563a848a..cb0210e52 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c @@ -200,7 +200,7 @@ void BgHakaTrap_Destroy(Actor* thisx, PlayState* play) { Collider_DestroyCylinder(play, &this->colliderCylinder); } - Audio_StopSfxByPos(&this->unk_16C); + Audio_StopSfxByPos(&this->chainLiftSfxPos); } void func_8087FFC0(BgHakaTrap* this, PlayState* play) { @@ -406,9 +406,10 @@ void func_808808F4(BgHakaTrap* this, PlayState* play) { } if (this->timer > 20) { - this->unk_169 = Math_StepToF(&this->dyna.actor.world.pos.y, this->unk_16A, 15.0f); + this->isSpikedCrusherStationary = Math_StepToF(&this->dyna.actor.world.pos.y, this->unk_16A, 15.0f); } else { - this->unk_169 = Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 20.0f); + this->isSpikedCrusherStationary = + Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 20.0f); } if (this->timer == 0) { @@ -539,13 +540,13 @@ void BgHakaTrap_Draw(Actor* thisx, PlayState* play) { func_80026608(play); } - if ((this->actionFunc == func_808808F4) && !this->unk_169) { + if ((this->actionFunc == func_808808F4) && !this->isSpikedCrusherStationary) { sp2C.x = this->dyna.actor.world.pos.x; sp2C.z = this->dyna.actor.world.pos.z; sp2C.y = this->dyna.actor.world.pos.y + 110.0f; - SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &sp2C, &this->unk_16C); - Sfx_PlaySfxAtPos(&this->unk_16C, NA_SE_EV_BRIDGE_CLOSE - SFX_FLAG); + SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &sp2C, &this->chainLiftSfxPos); + Sfx_PlaySfxAtPos(&this->chainLiftSfxPos, NA_SE_EV_BRIDGE_CLOSE - SFX_FLAG); } } diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.h b/soh/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.h index 97371df4a..24681d78d 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.h +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.h @@ -21,9 +21,9 @@ typedef struct BgHakaTrap { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ BgHakaTrapActionFunc actionFunc; /* 0x0168 */ u8 timer; - /* 0x0169 */ u8 unk_169; + /* 0x0169 */ u8 isSpikedCrusherStationary; /* 0x016A */ s16 unk_16A; // used as boolean for HAKA_TRAP_GUILLOTINE_SLOW/FAST, s16 for HAKA_TRAP_SPIKED_BOX - /* 0x016C */ Vec3f unk_16C; + /* 0x016C */ Vec3f chainLiftSfxPos; /* 0x0178 */ ColliderCylinder colliderCylinder; /* 0x01C4 */ ColliderTris colliderSpikes; /* 0x01E4 */ ColliderTrisElement colliderSpikesItem[2]; diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c index 40e6b5e63..ba65211c3 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c @@ -127,15 +127,15 @@ void BgHidanFslift_Update(Actor* thisx, PlayState* play) { this->actionFunc(this, play); if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { - if (this->unk_16A == 0) { - this->unk_16A = 3; + if (this->cameraSetting == 0) { + this->cameraSetting = 3; } Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_FIRE_PLATFORM); } else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) { - if (this->unk_16A != 0) { + if (this->cameraSetting != 0) { Camera_ChangeSetting(play->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0); } - this->unk_16A = 0; + this->cameraSetting = 0; } } diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.h b/soh/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.h index caaaacf1d..618313dcc 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.h +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.h @@ -12,7 +12,7 @@ typedef struct BgHidanFslift { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ BgHidanFsliftActionFunc actionFunc; /* 0x0168 */ s16 timer; - /* 0x016A */ s16 unk_16A; + /* 0x016A */ s16 cameraSetting; } BgHidanFslift; // size = 0x016C #endif diff --git a/soh/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c b/soh/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c index 72e59a80d..a0134ce33 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c @@ -185,11 +185,11 @@ void func_808B7AFC(BgSpot18Basket* this, PlayState* play) { void func_808B7B58(BgSpot18Basket* this) { this->actionFunc = func_808B7B6C; - this->unk_216 = 0; + this->timer = 0; } void func_808B7B6C(BgSpot18Basket* this, PlayState* play) { - if (this->unk_216 > 20) { + if (this->timer > 20) { func_808B7BB0(this); this->dyna.actor.child->parent = NULL; this->dyna.actor.child = NULL; @@ -198,24 +198,26 @@ void func_808B7B6C(BgSpot18Basket* this, PlayState* play) { void func_808B7BB0(BgSpot18Basket* this) { this->actionFunc = func_808B7BCC; - this->unk_210 = this->unk_20C = 0; + this->spinRate = this->circleRate = 0; } void func_808B7BCC(BgSpot18Basket* this, PlayState* play) { f32 positionDiff; Actor* colliderBaseAc; - Math_StepToS(&this->unk_210, 0x1F4, 0x1E); + Math_StepToS(&this->spinRate, 0x1F4, 0x1E); - this->dyna.actor.shape.rot.y += this->unk_210; + this->dyna.actor.shape.rot.y += this->spinRate; - Math_StepToF(&this->unk_208, 50.0f, 1.5f); - Math_StepToS(&this->unk_20C, 400, 15); + Math_StepToF(&this->circleRadius, 50.0f, 1.5f); + Math_StepToS(&this->circleRate, 400, 15); - this->unk_20E += this->unk_20C; + this->circleMoveAngle += this->circleRate; - this->dyna.actor.world.pos.x = (Math_SinS(this->unk_20E) * this->unk_208) + this->dyna.actor.home.pos.x; - this->dyna.actor.world.pos.z = (Math_CosS(this->unk_20E) * this->unk_208) + this->dyna.actor.home.pos.z; + this->dyna.actor.world.pos.x = + (Math_SinS(this->circleMoveAngle) * this->circleRadius) + this->dyna.actor.home.pos.x; + this->dyna.actor.world.pos.z = + (Math_CosS(this->circleMoveAngle) * this->circleRadius) + this->dyna.actor.home.pos.z; if (this->colliderJntSph.base.acFlags & AC_HIT) { colliderBaseAc = this->colliderJntSph.base.ac; @@ -238,53 +240,55 @@ void func_808B7BCC(BgSpot18Basket* this, PlayState* play) { void func_808B7D38(BgSpot18Basket* this) { this->actionFunc = func_808B7D50; - this->unk_216 = 0; - this->unk_214 = 0; + this->timer = 0; + this->pivotAltitude = 0; } void func_808B7D50(BgSpot18Basket* this, PlayState* play) { f32 tempValue2; f32 tempValue; - if (this->unk_216 > 120) { - Math_StepToS(&this->unk_210, 0x3E8, 0x32); + if (this->timer > 120) { + Math_StepToS(&this->spinRate, 0x3E8, 0x32); } else { - Math_StepToS(&this->unk_210, 0xBB8, 0x64); + Math_StepToS(&this->spinRate, 0xBB8, 0x64); } - this->dyna.actor.shape.rot.y = this->dyna.actor.shape.rot.y + this->unk_210; + this->dyna.actor.shape.rot.y = this->dyna.actor.shape.rot.y + this->spinRate; - if (this->unk_216 < 70) { - Math_StepToF(&this->unk_208, 100.0f, 2.0f); + if (this->timer < 70) { + Math_StepToF(&this->circleRadius, 100.0f, 2.0f); } else { - Math_StepToF(&this->unk_208, 0.0f, 2.0f); + Math_StepToF(&this->circleRadius, 0.0f, 2.0f); } - Math_StepToS(&this->unk_20C, 1000, 20); + Math_StepToS(&this->circleRate, 1000, 20); - this->unk_20E += this->unk_20C; + this->circleMoveAngle += this->circleRate; - this->dyna.actor.world.pos.x = (Math_SinS(this->unk_20E) * this->unk_208) + this->dyna.actor.home.pos.x; - this->dyna.actor.world.pos.z = (Math_CosS(this->unk_20E) * this->unk_208) + this->dyna.actor.home.pos.z; + this->dyna.actor.world.pos.x = + (Math_SinS(this->circleMoveAngle) * this->circleRadius) + this->dyna.actor.home.pos.x; + this->dyna.actor.world.pos.z = + (Math_CosS(this->circleMoveAngle) * this->circleRadius) + this->dyna.actor.home.pos.z; - this->unk_212 += 0xBB8; + this->pivotAzimuth += 0xBB8; - Math_StepToS(&this->unk_214, 0x5DC, 0x1E); + Math_StepToS(&this->pivotAltitude, 0x5DC, 0x1E); - this->dyna.actor.shape.rot.x = Math_CosS(this->unk_212) * this->unk_214; - this->dyna.actor.shape.rot.z = -Math_SinS(this->unk_212) * this->unk_214; + this->dyna.actor.shape.rot.x = Math_CosS(this->pivotAzimuth) * this->pivotAltitude; + this->dyna.actor.shape.rot.z = -Math_SinS(this->pivotAzimuth) * this->pivotAltitude; - if (this->unk_216 > 140) { + if (this->timer > 140) { func_808B7F74(this); } - if (this->unk_216 < 80) { + if (this->timer < 80) { func_808B7770(this, play, 1.0f); } else { func_808B7770(this, play, 0.8f); } - tempValue2 = (this->unk_210 - 500) * 0.0006f; + tempValue2 = (this->spinRate - 500) * 0.0006f; tempValue = CLAMP(tempValue2, 0.0f, 1.5f); @@ -298,14 +302,14 @@ void func_808B7F74(BgSpot18Basket* this) { this->actionFunc = func_808B7FC0; if (GameInteractor_Should(VB_WIN_GORON_POT, (shapeRotY < -0x2E93) || (shapeRotY >= 0x7C19))) { - this->unk_218 = 2; + this->prize = 2; } else if (shapeRotY < 0x26C2) { - this->unk_218 = 1; + this->prize = 1; } else { - this->unk_218 = 0; + this->prize = 0; } - this->unk_216 = 0; + this->timer = 0; } void func_808B7FC0(BgSpot18Basket* this, PlayState* play) { @@ -315,22 +319,22 @@ void func_808B7FC0(BgSpot18Basket* this, PlayState* play) { s16 arrayValue; f32 clampedTempUnk210; - this->unk_212 += 0xBB8; + this->pivotAzimuth += 0xBB8; - if (this->unk_216 >= 13) { - tempUnk214 = Math_StepToS(&this->unk_214, 0, 55); + if (this->timer >= 13) { + tempUnk214 = Math_StepToS(&this->pivotAltitude, 0, 55); } else { tempUnk214 = 0; } - this->dyna.actor.shape.rot.x = Math_CosS(this->unk_212) * this->unk_214; - this->dyna.actor.shape.rot.z = -Math_SinS(this->unk_212) * this->unk_214; + this->dyna.actor.shape.rot.x = Math_CosS(this->pivotAzimuth) * this->pivotAltitude; + this->dyna.actor.shape.rot.z = -Math_SinS(this->pivotAzimuth) * this->pivotAltitude; - Math_StepToS(&this->unk_210, 0x1F4, 0xA); - this->dyna.actor.shape.rot.y += this->unk_210; + Math_StepToS(&this->spinRate, 0x1F4, 0xA); + this->dyna.actor.shape.rot.y += this->spinRate; if (tempUnk214 != 0) { - arrayValue = D_808B85C8[this->unk_218]; + arrayValue = D_808B85C8[this->prize]; if ((s16)(this->dyna.actor.shape.rot.y - arrayValue) >= 0) { this->dyna.actor.shape.rot.y = arrayValue; @@ -340,13 +344,13 @@ void func_808B7FC0(BgSpot18Basket* this, PlayState* play) { } } - if (this->unk_216 < 30) { + if (this->timer < 30) { func_808B7770(this, play, 0.5f); } else { func_808B7770(this, play, 0.3f); } - tempUnk210 = (this->unk_210 - 500) * 0.0006f; + tempUnk210 = (this->spinRate - 500) * 0.0006f; clampedTempUnk210 = CLAMP(tempUnk210, 0.0f, 1.5f); @@ -355,7 +359,7 @@ void func_808B7FC0(BgSpot18Basket* this, PlayState* play) { void func_808B818C(BgSpot18Basket* this) { this->actionFunc = func_808B81A0; - this->unk_216 = 0; + this->timer = 0; } static s16 D_808B85E4[] = { -0x0FA0, 0x0320, 0x0FA0 }; @@ -366,12 +370,12 @@ void func_808B81A0(BgSpot18Basket* this, PlayState* play) { Vec3f tempVector; EnItem00* collectible; - if (this->unk_216 == 1) { + if (this->timer == 1) { tempVector.x = actor->world.pos.x; tempVector.y = actor->world.pos.y + 170.0f; tempVector.z = actor->world.pos.z; - if (this->unk_218 == 0) { + if (this->prize == 0) { for (i = 0; i < ARRAY_COUNT(D_808B85E4); i++) { collectible = Item_DropCollectible(play, &tempVector, ITEM00_BOMBS_A); if (collectible != NULL) { @@ -379,7 +383,7 @@ void func_808B81A0(BgSpot18Basket* this, PlayState* play) { collectible->actor.world.rot.y = D_808B85E4[i]; } } - } else if (this->unk_218 == 1) { + } else if (this->prize == 1) { for (i = 0; i < ARRAY_COUNT(D_808B85E4); i++) { collectible = Item_DropCollectible(play, &tempVector, ITEM00_RUPEE_GREEN); if (collectible != NULL) { @@ -387,8 +391,8 @@ void func_808B81A0(BgSpot18Basket* this, PlayState* play) { collectible->actor.world.rot.y = D_808B85E4[i]; } } - } else if (this->unk_218 == 2) { - if ((this->unk_21A != 0) || Flags_GetCollectible(play, (actor->params & 0x3F))) { + } else if (this->prize == 2) { + if ((this->isHeartPieceGiven != 0) || Flags_GetCollectible(play, (actor->params & 0x3F))) { collectible = Item_DropCollectible(play, &tempVector, ITEM00_RUPEE_PURPLE); if (collectible != NULL) { collectible->actor.velocity.y = 11.0f; @@ -400,7 +404,7 @@ void func_808B81A0(BgSpot18Basket* this, PlayState* play) { if (collectible != NULL) { collectible->actor.velocity.y = 11.0f; collectible->actor.world.rot.y = D_808B85E4[1]; - this->unk_21A = 1; + this->isHeartPieceGiven = 1; } } @@ -416,13 +420,13 @@ void func_808B81A0(BgSpot18Basket* this, PlayState* play) { collectible->actor.world.rot.y = D_808B85E4[2]; } } - } else if (this->unk_216 == 2) { - if (this->unk_218 == 2) { + } else if (this->timer == 2) { + if (this->prize == 2) { Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME); } else { Sfx_PlaySfxCentered(NA_SE_SY_TRE_BOX_APPEAR); } - } else if (this->unk_216 == 200) { + } else if (this->timer == 200) { func_808B7BB0(this); } } @@ -432,7 +436,7 @@ void BgSpot18Basket_Update(Actor* thisx, PlayState* play) { BgSpot18Basket* this = (BgSpot18Basket*)thisx; s32 bgId; - this->unk_216++; + this->timer++; this->actionFunc(this, play); this->dyna.actor.floorHeight = BgCheck_EntityRaycastFloor4(&play->colCtx, &this->dyna.actor.floorPoly, &bgId, &this->dyna.actor, &this->dyna.actor.world.pos); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h b/soh/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h index e218fc7b1..a4943750b 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h +++ b/soh/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h @@ -13,16 +13,16 @@ typedef struct BgSpot18Basket { /* 0x0164 */ ColliderJntSph colliderJntSph; /* 0x0184 */ ColliderJntSphElement ColliderJntSphElements[2]; /* 0x0204 */ BgSpot18BasketActionFunc actionFunc; - /* 0x0208 */ f32 unk_208; - /* 0x020C */ s16 unk_20C; - /* 0x020E */ s16 unk_20E; - /* 0x0210 */ s16 unk_210; - /* 0x0212 */ s16 unk_212; - /* 0x0214 */ s16 unk_214; - /* 0x0216 */ s16 unk_216; - /* 0x0218 */ s16 unk_218; - /* 0x021A */ u8 unk_21A; - /* 0x021B */ u8 unk_21B; + /* 0x0208 */ f32 circleRadius; + /* 0x020C */ s16 circleRate; + /* 0x020E */ s16 circleMoveAngle; + /* 0x0210 */ s16 spinRate; + /* 0x0212 */ s16 pivotAzimuth; + /* 0x0214 */ s16 pivotAltitude; + /* 0x0216 */ s16 timer; + /* 0x0218 */ s16 prize; + /* 0x021A */ u8 isHeartPieceGiven; + /* 0x021B */ u8 pad; } BgSpot18Basket; // size = 0x021C #endif diff --git a/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h b/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h index 2a546540e..92f5da5fc 100644 --- a/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h +++ b/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h @@ -72,7 +72,7 @@ typedef struct BossDodongo { /* 0x020C */ f32 unk_20C; /* 0x0210 */ f32 colorFilterR; /* 0x0214 */ f32 colorFilterG; - /* 0x0214 */ f32 colorFilterB; + /* 0x0218 */ f32 colorFilterB; /* 0x021C */ f32 colorFilterMin; /* 0x0220 */ f32 colorFilterMax; /* 0x0224 */ f32 unk_224; diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index e463f981a..d353927c9 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -233,9 +233,9 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { if (Object_IsLoaded(&play->objectCtx, objectIdx)) { func_80064520(play, &play->csCtx); Player_SetCsActionWithHaltedActors(play, &this->actor, 8); - this->unk_39E = Play_CreateSubCamera(play); + this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT); - Play_ChangeCameraStatus(play, this->unk_39E, CAM_STAT_ACTIVE); + Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); sBossGanon2Zelda = (EnZl3*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_ZL3, 970.0f, 1086.0f, -200.0f, 0, 0, 0, 1); sBossGanon2Zelda->unk_3C8 = 0; @@ -254,12 +254,12 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { sBossGanon2Zelda->unk_3C8 = 4; } - this->unk_3BC.x = 0.0f; - this->unk_3BC.y = 1.0f; - this->unk_3BC.z = 0.0f; - this->unk_3A4.x = 0.0f; - this->unk_3A4.y = 1400.0f; - this->unk_3A4.z = 1600.0f; + this->subCamUp.x = 0.0f; + this->subCamUp.y = 1.0f; + this->subCamUp.z = 0.0f; + this->subCamEye.x = 0.0f; + this->subCamEye.y = 1400.0f; + this->subCamEye.z = 1600.0f; player->actor.world.pos.x = 970.0f; player->actor.world.pos.y = 1086.0f; player->actor.world.pos.z = -186.0f; @@ -268,7 +268,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { play->envCtx.unk_D8 = 0.0f; // fake, tricks the compiler into allocating more stack if (zero) { - this->unk_3A4.x *= 2.0; + this->subCamEye.x *= 2.0; } } else { break; @@ -278,12 +278,12 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { play->envCtx.unk_D8 = 0.0f; } this->unk_339 = 3; - Math_ApproachF(&this->unk_3A4.x, 1500.0f, 0.1f, this->unk_410.x * 1500.0f); - Math_ApproachF(&this->unk_3A4.z, -160.0f, 0.1f, this->unk_410.x * 1760.0f); + Math_ApproachF(&this->subCamEye.x, 1500.0f, 0.1f, this->unk_410.x * 1500.0f); + Math_ApproachF(&this->subCamEye.z, -160.0f, 0.1f, this->unk_410.x * 1760.0f); Math_ApproachF(&this->unk_410.x, 0.0075f, 1.0f, 0.0001f); - this->unk_3B0.x = -200.0f; - this->unk_3B0.y = 1086.0f; - this->unk_3B0.z = -200.0f; + this->subCamAt.x = -200.0f; + this->subCamAt.y = 1086.0f; + this->subCamAt.z = -200.0f; if (this->csTimer == 150) { Message_StartTextbox(play, 0x70D3, NULL); } @@ -316,17 +316,17 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { sBossGanon2Zelda->unk_3C8 = 2; Player_SetCsActionWithHaltedActors(play, &this->actor, 0x4F); } - this->unk_3A4.x = 930.0f; - this->unk_3A4.y = 1129.0f; - this->unk_3A4.z = -181.0f; - this->unk_3B0.x = player->actor.world.pos.x; - this->unk_3B0.z = (player->actor.world.pos.z - 15.0f) + 5.0f; + this->subCamEye.x = 930.0f; + this->subCamEye.y = 1129.0f; + this->subCamEye.z = -181.0f; + this->subCamAt.x = player->actor.world.pos.x; + this->subCamAt.z = (player->actor.world.pos.z - 15.0f) + 5.0f; if (this->csTimer > 104) { - Math_ApproachF(&this->unk_3B0.y, player->actor.world.pos.y + 47.0f + 7.0f + 15.0f, 0.1f, + Math_ApproachF(&this->subCamAt.y, player->actor.world.pos.y + 47.0f + 7.0f + 15.0f, 0.1f, this->unk_410.x); Math_ApproachF(&this->unk_410.x, 2.0f, 1.0f, 0.1f); } else { - this->unk_3B0.y = player->actor.world.pos.y + 47.0f + 7.0f; + this->subCamAt.y = player->actor.world.pos.y + 47.0f + 7.0f; } if ((this->csTimer > 170) && (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) { this->csState = 3; @@ -335,7 +335,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { } break; case 3: - Math_ApproachF(&this->unk_3B0.y, player->actor.world.pos.y + 47.0f + 7.0f, 0.1f, 2.0f); + Math_ApproachF(&this->subCamAt.y, player->actor.world.pos.y + 47.0f + 7.0f, 0.1f, 2.0f); this->unk_339 = 4; if (this->csTimer == 10) { Sfx_PlaySfxAtPos(&D_80906D6C, NA_SE_EV_STONE_BOUND); @@ -355,17 +355,17 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { break; case 4: this->unk_339 = 4; - Math_ApproachF(&this->unk_3A4.x, -360.0f, 0.1f, this->unk_410.x * 1290.0f); - Math_ApproachF(&this->unk_3A4.z, -20.0f, 0.1f, this->unk_410.x * 170.0f); + Math_ApproachF(&this->subCamEye.x, -360.0f, 0.1f, this->unk_410.x * 1290.0f); + Math_ApproachF(&this->subCamEye.z, -20.0f, 0.1f, this->unk_410.x * 170.0f); Math_ApproachF(&this->unk_410.x, 0.04f, 1.0f, 0.0005f); if (this->csTimer == 100) { Camera* camera = Play_GetCamera(play, MAIN_CAM); - camera->eye = this->unk_3A4; - camera->eyeNext = this->unk_3A4; - camera->at = this->unk_3B0; - func_800C08AC(play, this->unk_39E, 0); - this->unk_39E = 0; + camera->eye = this->subCamEye; + camera->eyeNext = this->subCamEye; + camera->at = this->subCamAt; + func_800C08AC(play, this->subCamId, 0); + this->subCamId = 0; func_80064534(play, &play->csCtx); Player_SetCsActionWithHaltedActors(play, &this->actor, 7); this->csState = 5; @@ -379,9 +379,9 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { this->csState = 10; this->csTimer = 0; func_80064520(play, &play->csCtx); - this->unk_39E = Play_CreateSubCamera(play); + this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT); - Play_ChangeCameraStatus(play, this->unk_39E, CAM_STAT_ACTIVE); + Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); } else { break; } @@ -394,12 +394,12 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { sBossGanon2Zelda->actor.world.pos.z = -186.0f; player->actor.shape.rot.y = -0x4000; sBossGanon2Zelda->actor.shape.rot.y = -0x5000; - this->unk_3A4.x = 410.0f; - this->unk_3A4.y = 1096.0f; - this->unk_3A4.z = -110.0f; - this->unk_3B0.x = player->actor.world.pos.x + 10.0f; - this->unk_3B0.y = (player->actor.world.pos.y + 200.0f) - 160.0f; - this->unk_3B0.z = player->actor.world.pos.z; + this->subCamEye.x = 410.0f; + this->subCamEye.y = 1096.0f; + this->subCamEye.z = -110.0f; + this->subCamAt.x = player->actor.world.pos.x + 10.0f; + this->subCamAt.y = (player->actor.world.pos.y + 200.0f) - 160.0f; + this->subCamAt.z = player->actor.world.pos.z; if (this->csTimer >= 20) { Sfx_PlaySfxCentered(NA_SE_EN_GOMA_LAST - SFX_FLAG); Math_ApproachF(&this->unk_324, 255.0f, 1.0f, 10.0f); @@ -431,12 +431,12 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { sBossGanon2Zelda->actor.world.pos.z = -186.0f; player->actor.shape.rot.y = -0x4000; sBossGanon2Zelda->actor.shape.rot.y = -0x5000; - this->unk_3A4.x = 450.0f; - this->unk_3A4.y = 1121.0f; - this->unk_3A4.z = -158.0f; - this->unk_3B0.x = (player->actor.world.pos.x - 20.0f) + 2.0f; - this->unk_3B0.y = ((player->actor.world.pos.y + 200.0f) - 151.0f) - 2.0f; - this->unk_3B0.z = player->actor.world.pos.z + 2.0f; + this->subCamEye.x = 450.0f; + this->subCamEye.y = 1121.0f; + this->subCamEye.z = -158.0f; + this->subCamAt.x = (player->actor.world.pos.x - 20.0f) + 2.0f; + this->subCamAt.y = ((player->actor.world.pos.y + 200.0f) - 151.0f) - 2.0f; + this->subCamAt.z = player->actor.world.pos.z + 2.0f; if (this->csTimer == 10) { Sfx_PlaySfxAtPos(&D_80906D6C, NA_SE_EV_STONE_BOUND); } @@ -455,11 +455,11 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { this->actor.world.pos.y = 1009.0f; this->actor.shape.yOffset = 7000.0f; this->actor.world.rot.y = 0x5000; - this->unk_3A4.x = -60.0f; - this->unk_3A4.y = 1106.0f; - this->unk_3A4.z = -200.0f; - this->unk_3B0.x = this->unk_3B0.z = -200.0f; - this->unk_3B0.y = this->actor.world.pos.y + 70.0f; + this->subCamEye.x = -60.0f; + this->subCamEye.y = 1106.0f; + this->subCamEye.z = -200.0f; + this->subCamAt.x = this->subCamAt.z = -200.0f; + this->subCamAt.y = this->actor.world.pos.y + 70.0f; play->envCtx.unk_D8 = 0.0f; play->envCtx.unk_BE = play->envCtx.unk_BD = 0; this->unk_339 = 0; @@ -479,7 +479,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { } if (this->csTimer >= 30) { Math_ApproachF(&this->actor.world.pos.y, 1289.0f, 0.1f, 10.0f); - this->unk_3B0.y = this->actor.world.pos.y + 70.0f; + this->subCamAt.y = this->actor.world.pos.y + 70.0f; } if (Animation_OnFrame(&this->skelAnime, this->unk_194)) { Animation_MorphToLoop(&this->skelAnime, &gGanondorfFloatingHeavyBreathingAnim, 0.0f); @@ -502,25 +502,25 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { sBossGanon2Zelda->actor.world.pos.x = 724.0f; sBossGanon2Zelda->actor.world.pos.y = 1086.0f; sBossGanon2Zelda->actor.world.pos.z = -186.0f; - this->unk_3A4.x = this->actor.world.pos.x + -10.0f; - this->unk_3A4.y = this->actor.world.pos.y + 80.0f; - this->unk_3A4.z = this->actor.world.pos.z + 50.0f; - this->unk_3B0.x = player->actor.world.pos.x; - this->unk_3B0.y = player->actor.world.pos.y; - this->unk_3B0.z = player->actor.world.pos.z - 200.0f; + this->subCamEye.x = this->actor.world.pos.x + -10.0f; + this->subCamEye.y = this->actor.world.pos.y + 80.0f; + this->subCamEye.z = this->actor.world.pos.z + 50.0f; + this->subCamAt.x = player->actor.world.pos.x; + this->subCamAt.y = player->actor.world.pos.y; + this->subCamAt.z = player->actor.world.pos.z - 200.0f; if (this->csTimer == 20) { Player_SetCsActionWithHaltedActors(play, &this->actor, 0x1E); } if (this->csTimer == 60) { - this->unk_3A4.x = (this->actor.world.pos.x + 200.0f) - 154.0f; - this->unk_3A4.y = this->actor.world.pos.y + 60.0f; - this->unk_3A4.z = this->actor.world.pos.z - 15.0f; + this->subCamEye.x = (this->actor.world.pos.x + 200.0f) - 154.0f; + this->subCamEye.y = this->actor.world.pos.y + 60.0f; + this->subCamEye.z = this->actor.world.pos.z - 15.0f; this->csState = 15; this->csTimer = 0; - this->unk_3B0.y = this->actor.world.pos.y + 77.0f + 100.0f; + this->subCamAt.y = this->actor.world.pos.y + 77.0f + 100.0f; this->unk_314 = 2; - this->unk_3B0.z = this->actor.world.pos.z + 5.0f; - this->unk_3B0.x = this->actor.world.pos.x; + this->subCamAt.z = this->actor.world.pos.z + 5.0f; + this->subCamAt.x = this->actor.world.pos.x; } if ((play->gameplayFrames % 32) == 0) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_GANON_BREATH); @@ -531,7 +531,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_GANON_BREATH); } SkelAnime_Update(&this->skelAnime); - Math_ApproachF(&this->unk_3B0.y, this->actor.world.pos.y + 77.0f, 0.05f, 5.0f); + Math_ApproachF(&this->subCamAt.y, this->actor.world.pos.y + 77.0f, 0.05f, 5.0f); if (this->csTimer >= 50) { if (this->csTimer == 50) { Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfShowTriforceStartAnim, 0.0f); @@ -574,9 +574,9 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfTransformEndAnim, 0.0f); this->unk_194 = 1000.0f; } - Math_ApproachF(&this->unk_3A4.x, (this->actor.world.pos.x + 200.0f) - 90.0f, 0.1f, 6.3999996f); - Math_ApproachF(&this->unk_3A4.y, ((this->actor.world.pos.y + 60.0f) - 60.0f) - 70.0f, 0.1f, 13.0f); - Math_ApproachF(&this->unk_3B0.y, this->actor.world.pos.y + 40.0f, 0.1f, 3.6999998f); + Math_ApproachF(&this->subCamEye.x, (this->actor.world.pos.x + 200.0f) - 90.0f, 0.1f, 6.3999996f); + Math_ApproachF(&this->subCamEye.y, ((this->actor.world.pos.y + 60.0f) - 60.0f) - 70.0f, 0.1f, 13.0f); + Math_ApproachF(&this->subCamAt.y, this->actor.world.pos.y + 40.0f, 0.1f, 3.6999998f); if (this->csTimer == 30) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_GANON_BIGMASIC); Audio_PlayActorSound2(&this->actor, NA_SE_EN_GANON_THROW_BIG); @@ -587,9 +587,9 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { if (this->csTimer >= 60) { Camera* camera = Play_GetCamera(play, MAIN_CAM); - camera->eye = this->unk_3A4; - camera->eyeNext = this->unk_3A4; - camera->at = this->unk_3B0; + camera->eye = this->subCamEye; + camera->eyeNext = this->subCamEye; + camera->at = this->subCamAt; this->csState = 17; this->csTimer = 0; this->unk_337 = 2; @@ -610,29 +610,29 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { } // fake, tricks the compiler into using stack the way we need it to if (zero) { - Math_ApproachF(&this->unk_3B0.y, 0.0f, 0.0f, 0.0f); + Math_ApproachF(&this->subCamAt.y, 0.0f, 0.0f, 0.0f); } break; case 17: this->unk_339 = 6; SkelAnime_Update(&this->skelAnime); - this->unk_3A4.x = player->actor.world.pos.x - 40.0f; - this->unk_3A4.y = player->actor.world.pos.y + 40.0f; - this->unk_3A4.z = player->actor.world.pos.z + 20.0f; - this->unk_3B0.x = player->actor.world.pos.x; - this->unk_3B0.y = (player->actor.world.pos.y + 10.0f + 60.0f) - 30.0f; - this->unk_3B0.z = player->actor.world.pos.z; + this->subCamEye.x = player->actor.world.pos.x - 40.0f; + this->subCamEye.y = player->actor.world.pos.y + 40.0f; + this->subCamEye.z = player->actor.world.pos.z + 20.0f; + this->subCamAt.x = player->actor.world.pos.x; + this->subCamAt.y = (player->actor.world.pos.y + 10.0f + 60.0f) - 30.0f; + this->subCamAt.z = player->actor.world.pos.z; if (this->csTimer == 25) { this->csState = 18; this->csTimer = 0; Animation_MorphToPlayOnce(&this->skelAnime, &gGanonUncurlAndFlailAnim, 0.0f); this->skelAnime.playSpeed = 0.0f; - this->unk_3A4.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) - 50.0f; - this->unk_3A4.y = this->actor.world.pos.y; - this->unk_3A4.z = this->actor.world.pos.z; - this->unk_3B0.x = this->actor.world.pos.x + 50.0f; - this->unk_3B0.y = this->actor.world.pos.y + 60.0f; - this->unk_3B0.z = this->actor.world.pos.z; + this->subCamEye.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) - 50.0f; + this->subCamEye.y = this->actor.world.pos.y; + this->subCamEye.z = this->actor.world.pos.z; + this->subCamAt.x = this->actor.world.pos.x + 50.0f; + this->subCamAt.y = this->actor.world.pos.y + 60.0f; + this->subCamAt.z = this->actor.world.pos.z; this->actor.world.rot.y = 0x4000; } break; @@ -642,8 +642,8 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_GANON_BOSS); } Math_ApproachF(&this->unk_30C, 7.0f, 1.0f, 0.1f); - Math_ApproachF(&this->unk_3A4.x, (this->actor.world.pos.x + 500.0f) - 350.0f, 0.1f, 1.0f); - Math_ApproachF(&this->unk_3B0.x, this->actor.world.pos.x, 0.1f, 1.0f); + Math_ApproachF(&this->subCamEye.x, (this->actor.world.pos.x + 500.0f) - 350.0f, 0.1f, 1.0f); + Math_ApproachF(&this->subCamAt.x, this->actor.world.pos.x, 0.1f, 1.0f); Math_ApproachF(&this->unk_228, 1.0f, 0.1f, 0.02f); if (this->csTimer == 65) { this->csState = 19; @@ -675,13 +675,13 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { player->actor.world.pos.y = 1086.0f; player->actor.world.pos.z = -266.0f; player->actor.shape.rot.y = -0x4000; - this->unk_3A4.x = (player->actor.world.pos.x - 40.0f) - 200.0f; - this->unk_3A4.y = (player->actor.world.pos.y + 40.0f) - 30.0f; - this->unk_3A4.z = (player->actor.world.pos.z - 20.0f) + 100.0f; - this->unk_3B0.x = player->actor.world.pos.x; - this->unk_3B0.y = ((player->actor.world.pos.y + 10.0f + 60.0f) - 20.0f) + 30.0f; - this->unk_3B0.z = player->actor.world.pos.z; - this->unk_3BC.x = 0.8f; + this->subCamEye.x = (player->actor.world.pos.x - 40.0f) - 200.0f; + this->subCamEye.y = (player->actor.world.pos.y + 40.0f) - 30.0f; + this->subCamEye.z = (player->actor.world.pos.z - 20.0f) + 100.0f; + this->subCamAt.x = player->actor.world.pos.x; + this->subCamAt.y = ((player->actor.world.pos.y + 10.0f + 60.0f) - 20.0f) + 30.0f; + this->subCamAt.z = player->actor.world.pos.z; + this->subCamUp.x = 0.8f; if (this->actor.world.pos.y <= 1099.0f) { this->actor.world.pos.y = 1099.0f; this->csState = 21; @@ -708,7 +708,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { if (this->csTimer < 60) { this->unk_339 = 7; } - this->unk_3BC.x = 0.0f; + this->subCamUp.x = 0.0f; this->actor.world.pos.y = 1099.0f; SkelAnime_Update(&this->skelAnime); Math_ApproachZeroF(&this->unk_30C, 1.0f, 0.1f); @@ -724,12 +724,12 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { 180, 128, 40, true); // It has translation but they are all the same. they all say "GANON" only } - this->unk_3A4.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) + 100.0f; - this->unk_3A4.y = this->actor.world.pos.y; - this->unk_3A4.z = this->actor.world.pos.z; - this->unk_3B0.x = this->actor.world.pos.x; - this->unk_3B0.z = this->actor.world.pos.z; - this->unk_3B0.y = (this->unk_1B8.y + 60.0f) - 40.0f; + this->subCamEye.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) + 100.0f; + this->subCamEye.y = this->actor.world.pos.y; + this->subCamEye.z = this->actor.world.pos.z; + this->subCamAt.x = this->actor.world.pos.x; + this->subCamAt.z = this->actor.world.pos.z; + this->subCamAt.y = (this->unk_1B8.y + 60.0f) - 40.0f; if (this->csTimer > 166 && this->csTimer < 173) { this->unk_312 = 2; } @@ -758,12 +758,12 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { Sfx_PlaySfxCentered(NA_SE_EN_MGANON_SWORD); Sfx_PlaySfxCentered(NA_SE_EN_MGANON_ROAR); } - this->unk_3A4.x = (player->actor.world.pos.x - 40.0f) + 6.0f; - this->unk_3A4.y = player->actor.world.pos.y + 40.0f; - this->unk_3A4.z = (player->actor.world.pos.z + 20.0f) - 7.0f; - this->unk_3B0.x = player->actor.world.pos.x; - this->unk_3B0.y = ((player->actor.world.pos.y + 10.0f + 60.0f) - 20.0f) - 2.0f; - this->unk_3B0.z = player->actor.world.pos.z; + this->subCamEye.x = (player->actor.world.pos.x - 40.0f) + 6.0f; + this->subCamEye.y = player->actor.world.pos.y + 40.0f; + this->subCamEye.z = (player->actor.world.pos.z + 20.0f) - 7.0f; + this->subCamAt.x = player->actor.world.pos.x; + this->subCamAt.y = ((player->actor.world.pos.y + 10.0f + 60.0f) - 20.0f) - 2.0f; + this->subCamAt.z = player->actor.world.pos.z; if (this->csTimer == 228) { Sfx_PlaySfxCentered(NA_SE_IT_SHIELD_REFLECT_SW); Player_SetCsActionWithHaltedActors(play, &this->actor, 0x56); @@ -794,10 +794,10 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { if (1) { BossGanon2Effect* effect = play->specialEffects; - this->unk_3B0 = effect->position; - this->unk_3A4.x = effect->position.x + 70.0f; - this->unk_3A4.y = effect->position.y - 30.0f; - this->unk_3A4.z = effect->position.z + 70.0f; + this->subCamAt = effect->position; + this->subCamEye.x = effect->position.x + 70.0f; + this->subCamEye.y = effect->position.y - 30.0f; + this->subCamEye.z = effect->position.z + 70.0f; } if ((this->csTimer & 3) == 0) { Sfx_PlaySfxCentered(NA_SE_IT_SWORD_SWING); @@ -810,12 +810,12 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { break; case 25: SkelAnime_Update(&this->skelAnime); - this->unk_3A4.x = (player->actor.world.pos.x - 40.0f) + 80.0f; - this->unk_3A4.y = player->actor.world.pos.y + 40.0f + 10.0f; - this->unk_3A4.z = player->actor.world.pos.z + 20.0f + 10.0f; - this->unk_3B0.x = player->actor.world.pos.x - 20.0f; - this->unk_3B0.y = ((player->actor.world.pos.y + 10.0f + 60.0f) - 20.0f) - 3.0f; - this->unk_3B0.z = (player->actor.world.pos.z - 40.0f) - 10.0f; + this->subCamEye.x = (player->actor.world.pos.x - 40.0f) + 80.0f; + this->subCamEye.y = player->actor.world.pos.y + 40.0f + 10.0f; + this->subCamEye.z = player->actor.world.pos.z + 20.0f + 10.0f; + this->subCamAt.x = player->actor.world.pos.x - 20.0f; + this->subCamAt.y = ((player->actor.world.pos.y + 10.0f + 60.0f) - 20.0f) - 3.0f; + this->subCamAt.z = (player->actor.world.pos.z - 40.0f) - 10.0f; if (this->csTimer == 10) { BossGanon2Effect* effect = play->specialEffects; @@ -832,13 +832,13 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { break; } case 26: - this->unk_3A4.x = sBossGanon2Zelda->actor.world.pos.x + 100.0f + 30.0f; - this->unk_3A4.y = sBossGanon2Zelda->actor.world.pos.y + 10.0f; - this->unk_3A4.z = sBossGanon2Zelda->actor.world.pos.z + 5.0f; - this->unk_3B0.x = sBossGanon2Zelda->actor.world.pos.x; - this->unk_3B0.y = sBossGanon2Zelda->actor.world.pos.y + 30.0f; - this->unk_3B0.z = sBossGanon2Zelda->actor.world.pos.z - 20.0f; - this->unk_3BC.z = -0.5f; + this->subCamEye.x = sBossGanon2Zelda->actor.world.pos.x + 100.0f + 30.0f; + this->subCamEye.y = sBossGanon2Zelda->actor.world.pos.y + 10.0f; + this->subCamEye.z = sBossGanon2Zelda->actor.world.pos.z + 5.0f; + this->subCamAt.x = sBossGanon2Zelda->actor.world.pos.x; + this->subCamAt.y = sBossGanon2Zelda->actor.world.pos.y + 30.0f; + this->subCamAt.z = sBossGanon2Zelda->actor.world.pos.z - 20.0f; + this->subCamUp.z = -0.5f; if (this->csTimer == 13) { sBossGanon2Zelda->unk_3C8 = 6; } @@ -848,26 +848,26 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { } break; case 27: - this->unk_3BC.z = 0.0f; + this->subCamUp.z = 0.0f; if (this->csTimer == 4) { Player_SetCsActionWithHaltedActors(play, &this->actor, 0x58); } - this->unk_3A4.x = player->actor.world.pos.x - 20.0f; - this->unk_3A4.y = player->actor.world.pos.y + 50.0f; - this->unk_3A4.z = player->actor.world.pos.z; - this->unk_3B0.x = player->actor.world.pos.x; - this->unk_3B0.y = player->actor.world.pos.y + 50.0f; - this->unk_3B0.z = player->actor.world.pos.z; + this->subCamEye.x = player->actor.world.pos.x - 20.0f; + this->subCamEye.y = player->actor.world.pos.y + 50.0f; + this->subCamEye.z = player->actor.world.pos.z; + this->subCamAt.x = player->actor.world.pos.x; + this->subCamAt.y = player->actor.world.pos.y + 50.0f; + this->subCamAt.z = player->actor.world.pos.z; if (this->csTimer == 26) { D_8090EB30 = play->actorCtx.actorLists[ACTORCAT_ITEMACTION].head; while (D_8090EB30 != NULL) { if (D_8090EB30->id == ACTOR_EN_ELF) { - this->unk_3A4.x = D_8090EB30->world.pos.x - 30.0f; - this->unk_3A4.y = D_8090EB30->world.pos.y; - this->unk_3A4.z = D_8090EB30->world.pos.z; - this->unk_3B0.x = D_8090EB30->world.pos.x; - this->unk_3B0.y = D_8090EB30->world.pos.y; - this->unk_3B0.z = D_8090EB30->world.pos.z; + this->subCamEye.x = D_8090EB30->world.pos.x - 30.0f; + this->subCamEye.y = D_8090EB30->world.pos.y; + this->subCamEye.z = D_8090EB30->world.pos.z; + this->subCamAt.x = D_8090EB30->world.pos.x; + this->subCamAt.y = D_8090EB30->world.pos.y; + this->subCamAt.z = D_8090EB30->world.pos.z; break; } D_8090EB30 = D_8090EB30->next; @@ -881,12 +881,12 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { Message_StartTextbox(play, 0x70D6, NULL); } if (D_8090EB30 != NULL) { - this->unk_3A4.x = D_8090EB30->world.pos.x - 20.0f; - this->unk_3A4.y = D_8090EB30->world.pos.y; - this->unk_3A4.z = D_8090EB30->world.pos.z; - Math_ApproachF(&this->unk_3B0.x, D_8090EB30->world.pos.x, 0.2f, 50.0f); - Math_ApproachF(&this->unk_3B0.y, D_8090EB30->world.pos.y, 0.2f, 50.0f); - Math_ApproachF(&this->unk_3B0.z, D_8090EB30->world.pos.z, 0.2f, 50.0f); + this->subCamEye.x = D_8090EB30->world.pos.x - 20.0f; + this->subCamEye.y = D_8090EB30->world.pos.y; + this->subCamEye.z = D_8090EB30->world.pos.z; + Math_ApproachF(&this->subCamAt.x, D_8090EB30->world.pos.x, 0.2f, 50.0f); + Math_ApproachF(&this->subCamAt.y, D_8090EB30->world.pos.y, 0.2f, 50.0f); + Math_ApproachF(&this->subCamAt.z, D_8090EB30->world.pos.z, 0.2f, 50.0f); if ((this->csTimer > 40) && (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) { this->csState = 29; this->csTimer = 0; @@ -902,12 +902,12 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { break; case 29: SkelAnime_Update(&this->skelAnime); - this->unk_3A4.x = (((this->actor.world.pos.x + 500.0f) - 350.0f) + 100.0f) - 60.0f; - this->unk_3B0.x = this->actor.world.pos.x; - this->unk_3B0.z = this->actor.world.pos.z; - this->unk_3A4.y = this->actor.world.pos.y; - this->unk_3A4.z = this->actor.world.pos.z + 10.0f; - this->unk_3B0.y = (this->unk_1B8.y + 60.0f) - 40.0f; + this->subCamEye.x = (((this->actor.world.pos.x + 500.0f) - 350.0f) + 100.0f) - 60.0f; + this->subCamAt.x = this->actor.world.pos.x; + this->subCamAt.z = this->actor.world.pos.z; + this->subCamEye.y = this->actor.world.pos.y; + this->subCamEye.z = this->actor.world.pos.z + 10.0f; + this->subCamAt.y = (this->unk_1B8.y + 60.0f) - 40.0f; player->actor.shape.rot.y = -0x4000; player->actor.world.pos.x = 140.0f; player->actor.world.pos.z = -196.0f; @@ -917,11 +917,11 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { if (Animation_OnFrame(&this->skelAnime, this->unk_194)) { Camera* camera = Play_GetCamera(play, MAIN_CAM); - camera->eye = this->unk_3A4; - camera->eyeNext = this->unk_3A4; - camera->at = this->unk_3B0; - func_800C08AC(play, this->unk_39E, 0); - this->unk_39E = 0; + camera->eye = this->subCamEye; + camera->eyeNext = this->subCamEye; + camera->at = this->subCamAt; + func_800C08AC(play, this->subCamId, 0); + this->subCamId = 0; func_80064534(play, &play->csCtx); Player_SetCsActionWithHaltedActors(play, &this->actor, 7); this->csState = 0; @@ -938,18 +938,18 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_GANON_BODY_SPARK - SFX_FLAG); } - if (this->unk_39E != 0) { + if (this->subCamId != 0) { // fake, tricks the compiler into putting some pointers on the stack if (zero) { osSyncPrintf(NULL, 0, 0); } - this->unk_3B0.y += this->unk_41C; - Play_CameraSetAtEyeUp(play, this->unk_39E, &this->unk_3B0, &this->unk_3A4, &this->unk_3BC); + this->subCamAt.y += this->unk_41C; + Play_CameraSetAtEyeUp(play, this->subCamId, &this->subCamAt, &this->subCamEye, &this->subCamUp); } } void func_808FF898(BossGanon2* this, PlayState* play) { - if ((this->unk_312 != 0) && (this->unk_39E == 0)) { + if ((this->unk_312 != 0) && (this->subCamId == 0)) { Actor* actor = play->actorCtx.actorLists[ACTORCAT_PROP].head; while (actor != NULL) { if (actor->id == ACTOR_DEMO_GJ) { @@ -1341,13 +1341,13 @@ void func_80900890(BossGanon2* this, PlayState* play) { switch (this->csState) { case 0: func_80064520(play, &play->csCtx); - this->unk_39E = Play_CreateSubCamera(play); + this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT); - Play_ChangeCameraStatus(play, this->unk_39E, CAM_STAT_ACTIVE); + Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); Player_SetCsActionWithHaltedActors(play, &this->actor, 8); this->csState = 1; - this->unk_3A4 = sp4C->eye; - this->unk_3B0 = sp4C->at; + this->subCamEye = sp4C->eye; + this->subCamAt = sp4C->at; this->unk_1A2[0] = 300; this->unk_1A2[1] = 100; play->envCtx.unk_D8 = 0.0f; @@ -1360,12 +1360,12 @@ void func_80900890(BossGanon2* this, PlayState* play) { sp5C.y = 0.0f; sp5C.z = 250.0f; Matrix_MultVec3f(&sp5C, &sp50); - Math_ApproachF(&this->unk_3A4.x, this->actor.world.pos.x + sp50.x, 0.2f, 100.0f); - Math_ApproachF(&this->unk_3A4.y, 1136.0f, 0.2f, 100.0f); - Math_ApproachF(&this->unk_3A4.z, this->actor.world.pos.z + sp50.z, 0.2f, 100.0f); - Math_ApproachF(&this->unk_3B0.x, this->unk_1B8.x, 0.2f, 100.0f); - Math_ApproachF(&this->unk_3B0.y, this->unk_1B8.y, 0.2f, 100.0f); - Math_ApproachF(&this->unk_3B0.z, this->unk_1B8.z, 0.2f, 100.0f); + Math_ApproachF(&this->subCamEye.x, this->actor.world.pos.x + sp50.x, 0.2f, 100.0f); + Math_ApproachF(&this->subCamEye.y, 1136.0f, 0.2f, 100.0f); + Math_ApproachF(&this->subCamEye.z, this->actor.world.pos.z + sp50.z, 0.2f, 100.0f); + Math_ApproachF(&this->subCamAt.x, this->unk_1B8.x, 0.2f, 100.0f); + Math_ApproachF(&this->subCamAt.y, this->unk_1B8.y, 0.2f, 100.0f); + Math_ApproachF(&this->subCamAt.z, this->unk_1B8.z, 0.2f, 100.0f); if (this->unk_1A2[1] == 0) { this->csState = 2; this->unk_1A2[1] = 90; @@ -1373,12 +1373,12 @@ void func_80900890(BossGanon2* this, PlayState* play) { break; case 2: this->unk_1A2[0] = 300; - this->unk_3A4.x = sBossGanon2Zelda->actor.world.pos.x - 100.0f; - this->unk_3A4.y = sBossGanon2Zelda->actor.world.pos.y + 30.0f; - this->unk_3A4.z = (sBossGanon2Zelda->actor.world.pos.z + 30.0f) - 60.0f; - this->unk_3B0.x = sBossGanon2Zelda->actor.world.pos.x; - this->unk_3B0.y = sBossGanon2Zelda->actor.world.pos.y + 30.0f; - this->unk_3B0.z = sBossGanon2Zelda->actor.world.pos.z - 10.0f; + this->subCamEye.x = sBossGanon2Zelda->actor.world.pos.x - 100.0f; + this->subCamEye.y = sBossGanon2Zelda->actor.world.pos.y + 30.0f; + this->subCamEye.z = (sBossGanon2Zelda->actor.world.pos.z + 30.0f) - 60.0f; + this->subCamAt.x = sBossGanon2Zelda->actor.world.pos.x; + this->subCamAt.y = sBossGanon2Zelda->actor.world.pos.y + 30.0f; + this->subCamAt.z = sBossGanon2Zelda->actor.world.pos.z - 10.0f; Math_ApproachZeroF(&this->unk_324, 1.0f, 5.0f); Math_ApproachF(&play->envCtx.unk_D8, 1.0f, 1.0f, 1.0f / 51); if (this->unk_1A2[1] == 80) { @@ -1386,11 +1386,11 @@ void func_80900890(BossGanon2* this, PlayState* play) { } if ((this->unk_1A2[1] < 30) && (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) { temp_v0 = Play_GetCamera(play, MAIN_CAM); - temp_v0->eye = this->unk_3A4; - temp_v0->eyeNext = this->unk_3A4; - temp_v0->at = this->unk_3B0; - func_800C08AC(play, this->unk_39E, 0); - this->unk_39E = 0; + temp_v0->eye = this->subCamEye; + temp_v0->eyeNext = this->subCamEye; + temp_v0->at = this->subCamAt; + func_800C08AC(play, this->subCamId, 0); + this->subCamId = 0; func_80064534(play, &play->csCtx); Player_SetCsActionWithHaltedActors(play, &this->actor, 7); this->csState = 3; @@ -1398,9 +1398,9 @@ void func_80900890(BossGanon2* this, PlayState* play) { break; case 10: func_80064520(play, &play->csCtx); - this->unk_39E = Play_CreateSubCamera(play); + this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT); - Play_ChangeCameraStatus(play, this->unk_39E, CAM_STAT_ACTIVE); + Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); this->csState = 11; this->unk_334 = 1; Player_SetCsActionWithHaltedActors(play, &this->actor, 0x60); @@ -1409,28 +1409,28 @@ void func_80900890(BossGanon2* this, PlayState* play) { player->actor.world.pos.x = sBossGanon2Zelda->actor.world.pos.x + 50.0f + 10.0f; player->actor.world.pos.z = sBossGanon2Zelda->actor.world.pos.z - 25.0f; player->actor.shape.rot.y = -0x8000; - this->unk_3A4.x = (player->actor.world.pos.x + 100.0f) - 80.0f; - this->unk_3A4.y = (player->actor.world.pos.y + 60.0f) - 40.0f; - this->unk_3A4.z = player->actor.world.pos.z - 110.0f; - this->unk_3B0.x = player->actor.world.pos.x; - this->unk_3B0.y = (player->actor.world.pos.y + 60.0f) - 25.0f; - this->unk_3B0.z = player->actor.world.pos.z; + this->subCamEye.x = (player->actor.world.pos.x + 100.0f) - 80.0f; + this->subCamEye.y = (player->actor.world.pos.y + 60.0f) - 40.0f; + this->subCamEye.z = player->actor.world.pos.z - 110.0f; + this->subCamAt.x = player->actor.world.pos.x; + this->subCamAt.y = (player->actor.world.pos.y + 60.0f) - 25.0f; + this->subCamAt.z = player->actor.world.pos.z; if (this->csTimer == 80) { temp_v0_2 = Play_GetCamera(play, MAIN_CAM); - temp_v0_2->eye = this->unk_3A4; - temp_v0_2->eyeNext = this->unk_3A4; - temp_v0_2->at = this->unk_3B0; + temp_v0_2->eye = this->subCamEye; + temp_v0_2->eyeNext = this->subCamEye; + temp_v0_2->at = this->subCamAt; this->csState = 3; - func_800C08AC(play, this->unk_39E, 0); - this->unk_39E = 0; + func_800C08AC(play, this->subCamId, 0); + this->subCamId = 0; func_80064534(play, &play->csCtx); Player_SetCsActionWithHaltedActors(play, &this->actor, 7); } break; } - if (this->unk_39E != 0) { - Play_CameraSetAtEye(play, this->unk_39E, &this->unk_3B0, &this->unk_3A4); + if (this->subCamId != 0) { + Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); } switch (this->unk_1AC) { @@ -1529,16 +1529,16 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->csTimer++; SkelAnime_Update(&this->skelAnime); - this->unk_3BC.x = 0.0f; - this->unk_3BC.y = 1.0f; - this->unk_3BC.z = 0.0f; + this->subCamUp.x = 0.0f; + this->subCamUp.y = 1.0f; + this->subCamUp.z = 0.0f; switch (this->csState) { case 0: func_80064520(play, &play->csCtx); - this->unk_39E = Play_CreateSubCamera(play); + this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT); - Play_ChangeCameraStatus(play, this->unk_39E, CAM_STAT_ACTIVE); + Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); Player_SetCsActionWithHaltedActors(play, &this->actor, 8); this->csState = 1; this->csTimer = 0; @@ -1585,12 +1585,12 @@ void func_8090120C(BossGanon2* this, PlayState* play) { sBossGanon2Zelda->actor.world.pos.x = 340.0f; sBossGanon2Zelda->actor.world.pos.z = -250.0f; sBossGanon2Zelda->actor.world.rot.y = sBossGanon2Zelda->actor.shape.rot.y = -0x2000; - this->unk_3A4.x = 250; - this->unk_3A4.y = 1150.0f; - this->unk_3A4.z = 0.0f; - this->unk_3B0.x = this->unk_1B8.x; - this->unk_3B0.y = this->unk_1B8.y; - this->unk_3B0.z = this->unk_1B8.z; + this->subCamEye.x = 250; + this->subCamEye.y = 1150.0f; + this->subCamEye.z = 0.0f; + this->subCamAt.x = this->unk_1B8.x; + this->subCamAt.y = this->unk_1B8.y; + this->subCamAt.z = this->unk_1B8.z; if (this->csTimer > 135) { this->csState = 2; this->csTimer = 0; @@ -1600,12 +1600,12 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->unk_339 = 22; Math_ApproachF(&play->envCtx.unk_D8, 1.0f, 1.0f, 0.1f); Sfx_PlaySfxCentered(NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG); - this->unk_3A4.x = 250; - this->unk_3A4.y = 1150.0f; - this->unk_3A4.z = 0.0f; - Math_ApproachF(&this->unk_3B0.x, sBossGanon2Zelda->actor.world.pos.x, 0.2f, 20.0f); - Math_ApproachF(&this->unk_3B0.y, sBossGanon2Zelda->actor.world.pos.y + 50.0f, 0.2f, 10.0f); - Math_ApproachF(&this->unk_3B0.z, sBossGanon2Zelda->actor.world.pos.z, 0.2f, 20.0f); + this->subCamEye.x = 250; + this->subCamEye.y = 1150.0f; + this->subCamEye.z = 0.0f; + Math_ApproachF(&this->subCamAt.x, sBossGanon2Zelda->actor.world.pos.x, 0.2f, 20.0f); + Math_ApproachF(&this->subCamAt.y, sBossGanon2Zelda->actor.world.pos.y + 50.0f, 0.2f, 10.0f); + Math_ApproachF(&this->subCamAt.z, sBossGanon2Zelda->actor.world.pos.z, 0.2f, 20.0f); if (this->csTimer == 50) { this->csState = 3; this->csTimer = 0; @@ -1614,12 +1614,12 @@ void func_8090120C(BossGanon2* this, PlayState* play) { case 3: this->unk_339 = 22; Sfx_PlaySfxCentered(NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG); - this->unk_3A4.x = 330.0f; - this->unk_3A4.y = 1120.0f; - this->unk_3A4.z = -150.0f; - this->unk_3B0.x = sBossGanon2Zelda->actor.world.pos.x; - this->unk_3B0.y = sBossGanon2Zelda->actor.world.pos.y + 40.0f; - this->unk_3B0.z = sBossGanon2Zelda->actor.world.pos.z; + this->subCamEye.x = 330.0f; + this->subCamEye.y = 1120.0f; + this->subCamEye.z = -150.0f; + this->subCamAt.x = sBossGanon2Zelda->actor.world.pos.x; + this->subCamAt.y = sBossGanon2Zelda->actor.world.pos.y + 40.0f; + this->subCamAt.z = sBossGanon2Zelda->actor.world.pos.z; if (this->csTimer == 10) { Message_StartTextbox(play, 0x70D8, NULL); } @@ -1665,19 +1665,19 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->unk_30C = 10.0f; player->actor.world.pos.x = 250.0f; player->actor.world.pos.z = 30.0f; - this->unk_3A4.x = player->actor.world.pos.x - 50.0f; - this->unk_3A4.y = player->actor.world.pos.y + 50.0f; - this->unk_3A4.z = player->actor.world.pos.z + 40.0f; - this->unk_3B0.x = player->actor.world.pos.x; - this->unk_3B0.y = player->actor.world.pos.y + 40.0f; - this->unk_3B0.z = player->actor.world.pos.z; + this->subCamEye.x = player->actor.world.pos.x - 50.0f; + this->subCamEye.y = player->actor.world.pos.y + 50.0f; + this->subCamEye.z = player->actor.world.pos.z + 40.0f; + this->subCamAt.x = player->actor.world.pos.x; + this->subCamAt.y = player->actor.world.pos.y + 40.0f; + this->subCamAt.z = player->actor.world.pos.z; if (this->csTimer == 166) { temp_v0_2 = Play_GetCamera(play, MAIN_CAM); - temp_v0_2->eye = this->unk_3A4; - temp_v0_2->eyeNext = this->unk_3A4; - temp_v0_2->at = this->unk_3B0; - func_800C08AC(play, this->unk_39E, 0); - this->unk_39E = 0; + temp_v0_2->eye = this->subCamEye; + temp_v0_2->eyeNext = this->subCamEye; + temp_v0_2->at = this->subCamAt; + func_800C08AC(play, this->subCamId, 0); + this->subCamId = 0; func_80064534(play, &play->csCtx); Player_SetCsActionWithHaltedActors(play, &this->actor, 7); this->csState = 6; @@ -1692,9 +1692,9 @@ void func_8090120C(BossGanon2* this, PlayState* play) { (player->meleeWeaponState != 0) && (player->heldItemAction == PLAYER_IA_SWORD_MASTER)) { func_80064520(play, &play->csCtx); GameInteractor_ExecuteOnBossDefeat(&this->actor); - this->unk_39E = Play_CreateSubCamera(play); + this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT); - Play_ChangeCameraStatus(play, this->unk_39E, CAM_STAT_ACTIVE); + Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); this->csState = 7; this->csTimer = 0; Animation_MorphToPlayOnce(&this->skelAnime, &gGanonFinalBlowAnim, 0.0f); @@ -1722,42 +1722,42 @@ void func_8090120C(BossGanon2* this, PlayState* play) { func_8090109C(this, play); } if ((this->csTimer >= 34) && (this->csTimer < 40)) { - this->unk_3A4.x = 269.0f; - this->unk_3A4.y = 1112.0f; - this->unk_3A4.z = -28.0f; - this->unk_3B0.x = 234.0f; - this->unk_3B0.y = 1117.0f; - this->unk_3B0.z = -11.0f; + this->subCamEye.x = 269.0f; + this->subCamEye.y = 1112.0f; + this->subCamEye.z = -28.0f; + this->subCamAt.x = 234.0f; + this->subCamAt.y = 1117.0f; + this->subCamAt.z = -11.0f; } else { if (this->csTimer < 30) { phi_a1 = 0; } else if (this->csTimer < 43) { phi_a1 = 1; } else { - this->unk_3BC.z = -0.8f; + this->subCamUp.z = -0.8f; player->actor.world.pos.x = 200.0f; player->actor.world.pos.z = 10.0f; phi_a1 = 2; } - this->unk_3A4.x = D_8090702C[phi_a1].x + (player->actor.world.pos.x - 50.0f); - this->unk_3A4.y = D_8090702C[phi_a1].y + (player->actor.world.pos.y + 50.0f); - this->unk_3A4.z = D_8090702C[phi_a1].z + (player->actor.world.pos.z + 40.0f); - this->unk_3B0.x = D_80907050[phi_a1].x + player->actor.world.pos.x; - this->unk_3B0.y = D_80907050[phi_a1].y + (player->actor.world.pos.y + 40.0f); - this->unk_3B0.z = D_80907050[phi_a1].z + player->actor.world.pos.z; + this->subCamEye.x = D_8090702C[phi_a1].x + (player->actor.world.pos.x - 50.0f); + this->subCamEye.y = D_8090702C[phi_a1].y + (player->actor.world.pos.y + 50.0f); + this->subCamEye.z = D_8090702C[phi_a1].z + (player->actor.world.pos.z + 40.0f); + this->subCamAt.x = D_80907050[phi_a1].x + player->actor.world.pos.x; + this->subCamAt.y = D_80907050[phi_a1].y + (player->actor.world.pos.y + 40.0f); + this->subCamAt.z = D_80907050[phi_a1].z + player->actor.world.pos.z; } if (this->csTimer > 80) { Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF); this->csState = 75; this->csTimer = 0; - this->unk_3A4.x = 112.0f; - this->unk_3A4.y = 1146.0f; - this->unk_3A4.z = 202.0f; - this->unk_3B0.x = 110.0f; - this->unk_3B0.y = 1144.0f; - this->unk_3B0.z = 177.0f; + this->subCamEye.x = 112.0f; + this->subCamEye.y = 1146.0f; + this->subCamEye.z = 202.0f; + this->subCamAt.x = 110.0f; + this->subCamAt.y = 1144.0f; + this->subCamAt.z = 177.0f; player->actor.world.pos.x = 200.0f; - this->unk_3BC.z = 0.0f; + this->subCamUp.z = 0.0f; } break; case 75: @@ -1792,12 +1792,12 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->csTimer = 0; this->unk_194 = 1000.0f; } - this->unk_3A4.x = 250; - this->unk_3A4.y = 1150.0f; - this->unk_3A4.z = 0.0f; - this->unk_3B0.x = this->unk_1B8.x; - this->unk_3B0.y = this->unk_1B8.y; - this->unk_3B0.z = this->unk_1B8.z; + this->subCamEye.x = 250; + this->subCamEye.y = 1150.0f; + this->subCamEye.z = 0.0f; + this->subCamAt.x = this->unk_1B8.x; + this->subCamAt.y = this->unk_1B8.y; + this->subCamAt.z = this->unk_1B8.z; if ((this->csTimer < 1000) && ((this->csTimer % 16) == 0)) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_MGANON_SWORD); } @@ -1812,12 +1812,12 @@ void func_8090120C(BossGanon2* this, PlayState* play) { break; case 9: this->unk_339 = 24; - this->unk_3A4.x = 330.0f; - this->unk_3A4.y = 1120.0f; - this->unk_3A4.z = -150.0f; - this->unk_3B0.x = sBossGanon2Zelda->actor.world.pos.x; - this->unk_3B0.y = sBossGanon2Zelda->actor.world.pos.y + 40.0f; - this->unk_3B0.z = sBossGanon2Zelda->actor.world.pos.z; + this->subCamEye.x = 330.0f; + this->subCamEye.y = 1120.0f; + this->subCamEye.z = -150.0f; + this->subCamAt.x = sBossGanon2Zelda->actor.world.pos.x; + this->subCamAt.y = sBossGanon2Zelda->actor.world.pos.y + 40.0f; + this->subCamAt.z = sBossGanon2Zelda->actor.world.pos.z; if (this->csTimer > 60) { this->csState = 10; this->csTimer = 0; @@ -1826,9 +1826,9 @@ void func_8090120C(BossGanon2* this, PlayState* play) { break; case 10: this->unk_339 = 24; - Math_ApproachF(&this->unk_3A4.x, 290.0f, 0.05f, this->unk_410.x); - Math_ApproachF(&this->unk_3A4.y, 1130.0f, 0.05f, this->unk_410.x * 0.25f); - Math_ApproachF(&this->unk_3A4.z, -260.0f, 0.05f, this->unk_410.x * 1.25f); + Math_ApproachF(&this->subCamEye.x, 290.0f, 0.05f, this->unk_410.x); + Math_ApproachF(&this->subCamEye.y, 1130.0f, 0.05f, this->unk_410.x * 0.25f); + Math_ApproachF(&this->subCamEye.z, -260.0f, 0.05f, this->unk_410.x * 1.25f); if ((this->csTimer >= 40) && (this->csTimer <= 110)) { Math_ApproachF(&play->envCtx.unk_D8, 1.0f, 1.0f, 0.02f); Math_ApproachF(&this->unk_384, 10.0f, 0.1f, 0.2f); @@ -1837,10 +1837,10 @@ void func_8090120C(BossGanon2* this, PlayState* play) { Math_ApproachZeroF(&this->unk_384, 1.0f, 0.2f); } if (this->csTimer > 130) { - Math_ApproachF(&this->unk_3B0.y, (sBossGanon2Zelda->actor.world.pos.y + 40.0f + 10.0f) - 20.0f, 0.1f, + Math_ApproachF(&this->subCamAt.y, (sBossGanon2Zelda->actor.world.pos.y + 40.0f + 10.0f) - 20.0f, 0.1f, this->unk_410.x); } else { - Math_ApproachF(&this->unk_3B0.y, sBossGanon2Zelda->actor.world.pos.y + 40.0f + 10.0f, 0.05f, + Math_ApproachF(&this->subCamAt.y, sBossGanon2Zelda->actor.world.pos.y + 40.0f + 10.0f, 0.05f, this->unk_410.x * 0.25f); } Math_ApproachF(&this->unk_410.x, 1.0f, 1.0f, 0.01f); @@ -1865,8 +1865,8 @@ void func_8090120C(BossGanon2* this, PlayState* play) { break; } - if (this->unk_39E != 0) { - Play_CameraSetAtEyeUp(play, this->unk_39E, &this->unk_3B0, &this->unk_3A4, &this->unk_3BC); + if (this->subCamId != 0) { + Play_CameraSetAtEyeUp(play, this->subCamId, &this->subCamAt, &this->subCamEye, &this->subCamUp); } switch (this->unk_1AC) { @@ -2121,7 +2121,7 @@ void BossGanon2_Update(Actor* thisx, PlayState* play) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->unk_424.base); CollisionCheck_SetOC(play, &play->colChkCtx, &this->unk_444.base); CollisionCheck_SetAC(play, &play->colChkCtx, &this->unk_444.base); - if (this->unk_39E == 0) { + if (this->subCamId == 0) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->unk_444.base); } } diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.h b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.h index 43539c1e8..b7e2c12a0 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.h +++ b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.h @@ -93,11 +93,11 @@ typedef struct BossGanon2 { /* 0x0394 */ f32 unk_394; /* 0x0398 */ u32 csTimer; /* 0x039C */ s16 csState; - /* 0x039E */ s16 unk_39E; + /* 0x039E */ s16 subCamId; /* 0x03A0 */ char unk_3A0[0x4]; - /* 0x03A4 */ Vec3f unk_3A4; - /* 0x03B0 */ Vec3f unk_3B0; - /* 0x03BC */ Vec3f unk_3BC; + /* 0x03A4 */ Vec3f subCamEye; + /* 0x03B0 */ Vec3f subCamAt; + /* 0x03BC */ Vec3f subCamUp; /* 0x03C8 */ char unk_3C8[0x48]; /* 0x0410 */ Vec3f unk_410; /* 0x041C */ f32 unk_41C; diff --git a/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.c index 7b332bb9f..bbcebd592 100644 --- a/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -618,7 +618,7 @@ void func_809861C4(DemoIm* this, PlayState* play) { if (npcAction != NULL) { u32 action = npcAction->action; - u32 unk_274 = this->unk_274; + u32 unk_274 = this->cueId; if (action != unk_274) { switch (action) { @@ -633,7 +633,7 @@ void func_809861C4(DemoIm* this, PlayState* play) { default: osSyncPrintf("Demo_Im_Ocarina_Check_DemoMode:そんな動作は無い!!!!!!!!\n"); } - this->unk_274 = action; + this->cueId = action; } } } @@ -651,7 +651,7 @@ void func_809862E0(DemoIm* this, PlayState* play) { if (npcAction != NULL) { u32 action = npcAction->action; - u32 unk_274 = this->unk_274; + u32 unk_274 = this->cueId; if (action != unk_274) { switch (action) { @@ -673,7 +673,7 @@ void func_809862E0(DemoIm* this, PlayState* play) { default: osSyncPrintf("Demo_Im_Ocarina_Check_DemoMode:そんな動作は無い!!!!!!!!\n"); } - this->unk_274 = action; + this->cueId = action; } } } @@ -782,7 +782,7 @@ void func_8098680C(DemoIm* this, PlayState* play) { if (npcAction != NULL) { u32 action = npcAction->action; - u32 unk_274 = this->unk_274; + u32 unk_274 = this->cueId; if (action != unk_274) { switch (action) { @@ -801,7 +801,7 @@ void func_8098680C(DemoIm* this, PlayState* play) { default: osSyncPrintf("Demo_Im_Spot00_Check_DemoMode:そんな動作は無い!!!!!!!!\n"); } - this->unk_274 = action; + this->cueId = action; } } } @@ -1061,7 +1061,7 @@ void func_809871E8(DemoIm* this, PlayState* play) { if (npcAction != NULL) { u32 action = npcAction->action; - u32 unk_274 = this->unk_274; + u32 unk_274 = this->cueId; if (action != unk_274) { switch (action) { @@ -1074,7 +1074,7 @@ void func_809871E8(DemoIm* this, PlayState* play) { default: osSyncPrintf("Demo_Im_inEnding_Check_DemoMode:そんな動作は無い!!!!!!!!\n"); } - this->unk_274 = action; + this->cueId = action; } } } diff --git a/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.h b/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.h index 06d6e5d7e..e25aee903 100644 --- a/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.h +++ b/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.h @@ -42,7 +42,7 @@ typedef struct DemoIm { /* 0x0268 */ f32 unk_268; /* 0x026C */ s32 alpha; /* 0x0270 */ s32 unk_270; - /* 0x0274 */ s32 unk_274; + /* 0x0274 */ s32 cueId; /* 0x0278 */ f32 unk_278; /* 0x027C */ s32 unk_27C; /* 0x0280 */ s32 unk_280; diff --git a/soh/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c b/soh/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c index 1bc15698e..70e12441c 100644 --- a/soh/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c +++ b/soh/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c @@ -554,7 +554,7 @@ void func_8098F654(DemoSa* this, PlayState* play) { if (npcAction != NULL) { action = npcAction->action; - unk_1AC = this->unk_1AC; + unk_1AC = this->cueId; if (action != unk_1AC) { switch (action) { case 7: @@ -569,7 +569,7 @@ void func_8098F654(DemoSa* this, PlayState* play) { default: osSyncPrintf("Demo_Sa_inEnding_Check_DemoMode:そんな動作は無い!!!!!!!!\n"); } - this->unk_1AC = action; + this->cueId = action; } } } @@ -644,7 +644,7 @@ void func_8098F984(DemoSa* this) { } void func_8098F998(DemoSa* this, PlayState* play) { - if (this->unk_1AC == 4) { + if (this->cueId == 4) { func_8098E6EC(this, play, 1); this->action = 17; this->drawConfig = 2; @@ -699,7 +699,7 @@ void func_8098FB68(DemoSa* this, PlayState* play) { if (npcAction != NULL) { action = npcAction->action; - unk_1AC = this->unk_1AC; + unk_1AC = this->cueId; if (action != unk_1AC) { switch (action) { case 4: @@ -717,7 +717,7 @@ void func_8098FB68(DemoSa* this, PlayState* play) { default: osSyncPrintf("Demo_Sa_inPresent_Check_DemoMode:そんな動作は無い!!!!!!!!\n"); } - this->unk_1AC = action; + this->cueId = action; } } } diff --git a/soh/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h b/soh/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h index 538cacbbb..42e5caa7e 100644 --- a/soh/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h +++ b/soh/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h @@ -20,7 +20,7 @@ typedef struct DemoSa { /* 0x01A0 */ f32 unk_1A0; /* 0x01A4 */ s32 alpha; /* 0x01A8 */ s32 unk_1A8; - /* 0x01AC */ s32 unk_1AC; + /* 0x01AC */ s32 cueId; /* 0x01B0 */ s32 unk_1B0; } DemoSa; // size = 0x01B4 diff --git a/soh/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/soh/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c index 307aee785..a5c3882e3 100644 --- a/soh/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/soh/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -184,14 +184,14 @@ static void* D_809982D4[] = { void DoorShutter_SetupAction(DoorShutter* this, DoorShutterActionFunc actionFunc) { this->actionFunc = actionFunc; - this->unk_16F = 0; + this->actionTimer = 0; } s32 DoorShutter_SetupDoor(DoorShutter* this, PlayState* play) { TransitionActorEntry* transitionEntry = &play->transiActorCtx.list[(u16)this->dyna.actor.params >> 0xA]; s8 frontRoom = transitionEntry->sides[0].room; s32 doorType = this->doorType; - ShutterObjectInfo* temp_t0 = &sObjectInfo[this->unk_16B]; + ShutterObjectInfo* temp_t0 = &sObjectInfo[this->styleType]; if (doorType != SHUTTER_KEY_LOCKED) { if (frontRoom == transitionEntry->sides[1].room) { @@ -207,18 +207,18 @@ s32 DoorShutter_SetupDoor(DoorShutter* this, PlayState* play) { } } } - this->unk_16C = (doorType == SHUTTER) ? temp_t0->index1 : temp_t0->index2; + this->gfxType = (doorType == SHUTTER) ? temp_t0->index1 : temp_t0->index2; if (doorType == SHUTTER_FRONT_CLEAR) { if (!Flags_GetClear(play, this->dyna.actor.room)) { DoorShutter_SetupAction(this, func_80996A54); - this->unk_170 = 1.0f; + this->barsClosedAmount = 1.0f; return true; } } else if (doorType == SHUTTER_FRONT_SWITCH || doorType == SHUTTER_FRONT_SWITCH_BACK_CLEAR) { if (!Flags_GetSwitch(play, this->dyna.actor.params & 0x3F)) { DoorShutter_SetupAction(this, func_80996EE8); - this->unk_170 = 1.0f; + this->barsClosedAmount = 1.0f; return true; } DoorShutter_SetupAction(this, func_80996F98); @@ -261,7 +261,7 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) { break; } } - this->unk_168 = phi_v1_2->index; + this->bossDoorTexIndex = phi_v1_2->index; } else { this->dyna.actor.room = -1; } @@ -271,15 +271,15 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) { return; } DoorShutter_SetupAction(this, DoorShutter_SetupType); - this->unk_16B = phi_a3; + this->styleType = phi_a3; if (this->doorType == SHUTTER_KEY_LOCKED || this->doorType == SHUTTER_BOSS) { if (GameInteractor_Should(VB_LOCK_BOSS_DOOR, !Flags_GetSwitch(play, this->dyna.actor.params & 0x3F), this)) { - this->unk_16E = 10; + this->unlockTimer = 10; } Actor_SetFocus(&this->dyna.actor, 60.0f); } else if (phi_a3 == 4) { Actor_SetScale(&this->dyna.actor, 0.1f); - this->unk_166 = 100; + this->jabuDoorClosedAmount = 100; this->dyna.actor.uncullZoneScale = 200.0f; Actor_SetFocus(&this->dyna.actor, 0.0f); } else { @@ -306,7 +306,7 @@ void DoorShutter_SetupType(DoorShutter* this, PlayState* play) { CollisionHeader* colHeader = NULL; Actor_SetObjectDependency(play, &this->dyna.actor); - this->unk_16C = sObjectInfo[this->unk_16B].index1; + this->gfxType = sObjectInfo[this->styleType].index1; CollisionHeader_GetVirtual((this->doorType == SHUTTER_GOHMA_BLOCK) ? &gGohmaDoorCol : &gPhantomGanonBarsCol, &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); @@ -346,8 +346,8 @@ s32 func_809968D4(DoorShutter* this, PlayState* play) { Player* player = GET_PLAYER(play); if (!Player_InCsMode(play)) { - ShutterInfo* temp_v1 = &sShutterInfo[this->unk_16C]; - f32 temp_f2 = func_80996840(play, this, (this->unk_16C != 3) ? 0.0f : 80.0f, temp_v1->e, temp_v1->f); + ShutterInfo* temp_v1 = &sShutterInfo[this->gfxType]; + f32 temp_f2 = func_80996840(play, this, (this->gfxType != 3) ? 0.0f : 80.0f, temp_v1->e, temp_v1->f); if (fabsf(temp_f2) < 50.0f) { s16 phi_v0 = player->actor.shape.rot.y - this->dyna.actor.shape.rot.y; @@ -370,7 +370,7 @@ void func_80996A54(DoorShutter* this, PlayState* play) { if (GameInteractor_Should(VB_PLAY_ONEPOINT_ACTOR_CS, true, this)) { OnePointCutscene_Attention(play, &this->dyna.actor); OnePointCutscene_Attention(play, &GET_PLAYER(play)->actor); - this->unk_16F = -100; + this->actionTimer = -100; } } else if (func_809968D4(this, play) != 0) { Player* player = GET_PLAYER(play); @@ -386,7 +386,7 @@ void func_80996B0C(DoorShutter* this, PlayState* play) { if (this->unk_164 != 0) { DoorShutter_SetupAction(this, func_80997004); this->dyna.actor.velocity.y = 0.0f; - if (this->unk_16E != 0) { + if (this->unlockTimer != 0) { Flags_SetSwitch(play, this->dyna.actor.params & 0x3F); if (this->doorType != SHUTTER_BOSS) { gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex]--; @@ -402,7 +402,7 @@ void func_80996B0C(DoorShutter* this, PlayState* play) { if (doorDirection != 0) { Player* player = GET_PLAYER(play); - if (this->unk_16E != 0) { + if (this->unlockTimer != 0) { if (this->doorType == SHUTTER_BOSS) { if (!CHECK_DUNGEON_ITEM(DUNGEON_KEY_BOSS, gSaveContext.mapIndex)) { player->naviTextId = -0x204; @@ -424,22 +424,22 @@ void func_80996B0C(DoorShutter* this, PlayState* play) { void func_80996C60(DoorShutter* this, PlayState* play) { if (this->dyna.actor.category == ACTORCAT_DOOR) { Player* player = GET_PLAYER(play); - s32 sp38 = this->unk_16C; + s32 sp38 = this->gfxType; s32 sp34 = 0xF; if (DoorShutter_SetupDoor(this, play)) { sp34 = 0x20; } DoorShutter_SetupAction(this, func_80997004); - this->unk_16C = sp38; - this->unk_170 = 0.0f; + this->gfxType = sp38; + this->barsClosedAmount = 0.0f; Camera_ChangeDoorCam(play->cameraPtrs[MAIN_CAM], &this->dyna.actor, player->cv.slidingDoorBgCamIndex, 0.0f, 12, sp34, 10); } } s32 func_80996D14(DoorShutter* this, PlayState* play) { - if (this->unk_16C != 3) { + if (this->gfxType != 3) { if (this->dyna.actor.velocity.y == 0.0f) { Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_SLIDE_DOOR_OPEN); func_80996C60(this, play); @@ -450,11 +450,11 @@ s32 func_80996D14(DoorShutter* this, PlayState* play) { return true; } } else { - if (this->unk_166 == 100) { + if (this->jabuDoorClosedAmount == 100) { Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYODOOR_OPEN); func_80996C60(this, play); } - if (Math_StepToS(&this->unk_166, 0, 10)) { + if (Math_StepToS(&this->jabuDoorClosedAmount, 0, 10)) { return true; } } @@ -462,8 +462,8 @@ s32 func_80996D14(DoorShutter* this, PlayState* play) { } s32 func_80996E08(DoorShutter* this, PlayState* play, f32 arg2) { - if (this->unk_170 == 1.0f - arg2) { - if (this->unk_16C != 3) { + if (this->barsClosedAmount == 1.0f - arg2) { + if (this->gfxType != 3) { if (arg2 == 1.0f) { Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_CLOSE); } else { @@ -477,7 +477,7 @@ s32 func_80996E08(DoorShutter* this, PlayState* play, f32 arg2) { } } } - if (Math_StepToF(&this->unk_170, arg2, 0.2f)) { + if (Math_StepToF(&this->barsClosedAmount, arg2, 0.2f)) { return true; } return false; @@ -489,7 +489,7 @@ void func_80996EE8(DoorShutter* this, PlayState* play) { DoorShutter_SetupAction(this, func_80997150); if (GameInteractor_Should(VB_PLAY_ONEPOINT_ACTOR_CS, true, this)) { OnePointCutscene_Attention(play, &this->dyna.actor); - this->unk_16F = -100; + this->actionTimer = -100; } } else if (func_809968D4(this, play)) { Player* player = GET_PLAYER(play); @@ -508,12 +508,12 @@ void func_80996F98(DoorShutter* this, PlayState* play) { } void func_80997004(DoorShutter* this, PlayState* play) { - if (DECR(this->unk_16E) == 0 && play->roomCtx.status == 0 && func_80996D14(this, play) != 0) { + if (DECR(this->unlockTimer) == 0 && play->roomCtx.status == 0 && func_80996D14(this, play) != 0) { if (((this->doorType == SHUTTER_BOSS) ? 20.0f : 50.0f) < this->dyna.actor.xzDistToPlayer) { if (DoorShutter_SetupDoor(this, play)) { this->dyna.actor.velocity.y = 30.0f; } - if (this->unk_16C != 3) { + if (this->gfxType != 3) { Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_SLIDE_DOOR_CLOSE); DoorShutter_SetupAction(this, func_809973E8); } else { @@ -529,16 +529,16 @@ void func_80997004(DoorShutter* this, PlayState* play) { } void func_80997150(DoorShutter* this, PlayState* play) { - if (this->unk_16F != 0) { - if (this->unk_16F < 0) { + if (this->actionTimer != 0) { + if (this->actionTimer < 0) { if (play->state.frames % 2 != 0) { - this->unk_16F++; + this->actionTimer++; } - if (this->dyna.actor.category == func_8005B198() || this->unk_16F == 0) { - this->unk_16F = 5; + if (this->dyna.actor.category == func_8005B198() || this->actionTimer == 0) { + this->actionTimer = 5; } } else { - this->unk_16F--; + this->actionTimer--; } } else if (func_80996E08(this, play, 0.0f)) { if (!(this->doorType == SHUTTER || this->doorType == SHUTTER_FRONT_CLEAR)) { @@ -601,13 +601,13 @@ void func_809973E8(DoorShutter* this, PlayState* play) { } void func_80997528(DoorShutter* this, PlayState* play) { - if (Math_StepToS(&this->unk_166, 0x64, 0xA)) { + if (Math_StepToS(&this->jabuDoorClosedAmount, 0x64, 0xA)) { func_80997220(this, play); } } void func_80997568(DoorShutter* this, PlayState* play) { - if (this->unk_16F++ > 30) { + if (this->actionTimer++ > 30) { Player_SetCsActionWithHaltedActors(play, NULL, 7); DoorShutter_SetupDoor(this, play); } @@ -666,7 +666,7 @@ void DoorShutter_Update(Actor* thisx, PlayState* play) { Gfx* func_80997838(PlayState* play, DoorShutter* this, Gfx* p) { MtxF mtx; f32 angle = 0.0f; - f32 yScale = this->unk_166 * 0.01f; + f32 yScale = this->jabuDoorClosedAmount * 0.01f; s32 i; Matrix_Get(&mtx); @@ -679,7 +679,7 @@ Gfx* func_80997838(PlayState* play, DoorShutter* this, Gfx* p) { } else { Matrix_Translate(0.0f, 989.94f, 0.0f, MTXMODE_APPLY); } - if (this->unk_166 != 100) { + if (this->jabuDoorClosedAmount != 100) { Matrix_Scale(1.0f, yScale, 1.0f, MTXMODE_APPLY); } gSPMatrix(p++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -723,18 +723,18 @@ void DoorShutter_Draw(Actor* thisx, PlayState* play) { //! the init vars for the actor, and only set draw after initialization is complete. if (this->dyna.actor.objBankIndex == this->requiredObjBankIndex && - (this->unk_16B == 0 || func_80997A34(this, play) != 0)) { + (this->styleType == 0 || func_80997A34(this, play) != 0)) { s32 pad[2]; - ShutterInfo* sp70 = &sShutterInfo[this->unk_16C]; + ShutterInfo* sp70 = &sShutterInfo[this->gfxType]; OPEN_DISPS(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx); - if (this->unk_16C == 3) { + if (this->gfxType == 3) { POLY_OPA_DISP = func_80997838(play, this, POLY_OPA_DISP); - if (this->unk_170 != 0.0f) { - f32 sp58 = (this->unk_166 * 0.01f) * this->unk_170; + if (this->barsClosedAmount != 0.0f) { + f32 sp58 = (this->jabuDoorClosedAmount * 0.01f) * this->barsClosedAmount; Gfx_SetupDL_25Opa(play->state.gfxCtx); gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255.0f * sp58); @@ -759,24 +759,24 @@ void DoorShutter_Draw(Actor* thisx, PlayState* play) { Matrix_RotateY(M_PI, MTXMODE_APPLY); } } else if (this->doorType == SHUTTER_BOSS) { - gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_809982D4[this->unk_168])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_809982D4[this->bossDoorTexIndex])); } gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, sp70->a); - if (this->unk_170 != 0.0f && sp70->b != NULL) { - Matrix_Translate(0, sp70->c * (1.0f - this->unk_170), sp70->translateZ, MTXMODE_APPLY); + if (this->barsClosedAmount != 0.0f && sp70->b != NULL) { + Matrix_Translate(0, sp70->c * (1.0f - this->barsClosedAmount), sp70->translateZ, MTXMODE_APPLY); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, sp70->b); } } - if (this->unk_16E != 0) { + if (this->unlockTimer != 0) { Matrix_Scale(0.01f, 0.01f, 0.025f, MTXMODE_APPLY); - Actor_DrawDoorLock(play, this->unk_16E, + Actor_DrawDoorLock(play, this->unlockTimer, (this->doorType == SHUTTER_BOSS) ? DOORLOCK_BOSS - : ((this->unk_16C == 6) ? DOORLOCK_NORMAL_SPIRIT : DOORLOCK_NORMAL)); + : ((this->gfxType == 6) ? DOORLOCK_NORMAL_SPIRIT : DOORLOCK_NORMAL)); } CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.h b/soh/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.h index 6916f8832..b30706c78 100644 --- a/soh/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.h +++ b/soh/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.h @@ -46,15 +46,15 @@ typedef void (*DoorShutterActionFunc)(struct DoorShutter*, PlayState*); typedef struct DoorShutter { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ s16 unk_164; - /* 0x0166 */ s16 unk_166; - /* 0x0168 */ s16 unk_168; + /* 0x0166 */ s16 jabuDoorClosedAmount; + /* 0x0168 */ s16 bossDoorTexIndex; /* 0x016A */ u8 doorType; - /* 0x016B */ u8 unk_16B; - /* 0x016C */ u8 unk_16C; + /* 0x016B */ u8 styleType; + /* 0x016C */ u8 gfxType; /* 0x016D */ s8 requiredObjBankIndex; - /* 0x016E */ s8 unk_16E; - /* 0x016F */ s8 unk_16F; - /* 0x0170 */ f32 unk_170; + /* 0x016E */ s8 unlockTimer; + /* 0x016F */ s8 actionTimer; + /* 0x0170 */ f32 barsClosedAmount; /* 0x0174 */ DoorShutterActionFunc actionFunc; } DoorShutter; // size = 0x0178 diff --git a/soh/src/overlays/actors/ovl_En_Am/z_en_am.h b/soh/src/overlays/actors/ovl_En_Am/z_en_am.h index 22c40f36c..20b20806d 100644 --- a/soh/src/overlays/actors/ovl_En_Am/z_en_am.h +++ b/soh/src/overlays/actors/ovl_En_Am/z_en_am.h @@ -24,7 +24,7 @@ typedef struct EnAm { /* 0x0264 */ s16 unk_264; /* 0x0266 */ u8 textureBlend; // 0 = statue textures; 255 = enemy textures /* 0x0267 */ u8 damageEffect; - /* 0x0267 */ Vec3f shakeOrigin; // center point to shake around when waking up + /* 0x0268 */ Vec3f shakeOrigin; // center point to shake around when waking up /* 0x0274 */ ColliderCylinder hurtCollider; /* 0x02C0 */ ColliderCylinder blockCollider; /* 0x030C */ ColliderQuad hitCollider; diff --git a/soh/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.h b/soh/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.h index 8b18f6b47..9c2c87915 100644 --- a/soh/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.h +++ b/soh/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.h @@ -30,7 +30,7 @@ typedef struct EnAttackNiw { /* 0x027C */ f32 unk_27C; /* 0x0280 */ f32 unk_280; /* 0x0284 */ f32 unk_284; - /* 0x0284 */ f32 unk_288; + /* 0x0288 */ f32 unk_288; /* 0x028C */ s16 unk_28C; /* 0x028E */ s16 unk_28E; /* 0x0290 */ char unk_290[0x2]; diff --git a/soh/src/overlays/actors/ovl_En_Bird/z_en_bird.c b/soh/src/overlays/actors/ovl_En_Bird/z_en_bird.c index 6b6c1f847..094db9aa1 100644 --- a/soh/src/overlays/actors/ovl_En_Bird/z_en_bird.c +++ b/soh/src/overlays/actors/ovl_En_Bird/z_en_bird.c @@ -48,15 +48,15 @@ void EnBird_Init(Actor* thisx, PlayState* play) { SkelAnime_Init(play, &this->skelAnime, &gBirdSkel, &gBirdFlyAnim, NULL, NULL, 0); ActorShape_Init(&this->actor.shape, 5500, ActorShadow_DrawCircle, 4); this->unk_194 = 0; - this->unk_198 = 0; - this->unk_1C0 = 0x9C4; + this->timer = 0; + this->rotYStep = 0x9C4; this->actor.colChkInfo.mass = 0; - this->unk_1A8 = 1.5f; - this->unk_1AC = 0.5f; - this->unk_1A0 = 0.0f; - this->unk_1A4 = 0.0f; - this->unk_1B8 = 0.0f; - this->unk_1B0 = 40.0f; + this->speedTarget = 1.5f; + this->speedStep = 0.5f; + this->posYMag = 0.0f; + this->rotYMag = 0.0f; + this->posYPhaseStep = 0.0f; + this->flightDistance = 40.0f; this->unk_1BC = 70.0f; func_809C1CAC(this, this->actor.params); } @@ -69,55 +69,55 @@ void EnBird_Destroy(Actor* thisx, PlayState* play) { void func_809C1CAC(EnBird* this, s16 params) { f32 frameCount = Animation_GetLastFrame(&gBirdFlyAnim); - f32 playbackSpeed = this->unk_19C ? 0.0f : 1.0f; + f32 playbackSpeed = this->scaleAnimSpeed ? 0.0f : 1.0f; AnimationHeader* anim = &gBirdFlyAnim; - this->unk_198 = Rand_S16Offset(5, 0x23); + this->timer = Rand_S16Offset(5, 0x23); Animation_Change(&this->skelAnime, anim, playbackSpeed, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f); EnBird_SetupAction(this, func_809C1D60); } void func_809C1D60(EnBird* this, PlayState* play) { - f32 fVar2 = sinf(this->unk_1B4); + f32 fVar2 = sinf(this->posYPhase); - this->actor.shape.yOffset = this->actor.shape.yOffset + fVar2 * this->unk_1A0; + this->actor.shape.yOffset = this->actor.shape.yOffset + fVar2 * this->posYMag; Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.1f, 0.5f, 0.0f); - if (this->unk_19C != 0) { + if (this->scaleAnimSpeed != 0) { this->skelAnime.playSpeed = this->actor.speedXZ + this->actor.speedXZ; } SkelAnime_Update(&this->skelAnime); - this->unk_198 -= 1; + this->timer -= 1; - if (this->unk_198 <= 0) { + if (this->timer <= 0) { func_809C1E00(this, this->actor.params); } } void func_809C1E00(EnBird* this, s16 params) { - this->unk_198 = Rand_S16Offset(0x14, 0x2D); + this->timer = Rand_S16Offset(0x14, 0x2D); EnBird_SetupAction(this, func_809C1E40); } void func_809C1E40(EnBird* this, PlayState* play) { - f32 fVar4 = sinf(this->unk_1B4); + f32 fVar4 = sinf(this->posYPhase); - this->actor.shape.yOffset += fVar4 * this->unk_1A0; - Math_SmoothStepToF(&this->actor.speedXZ, this->unk_1A8, 0.1f, this->unk_1AC, 0.0f); + this->actor.shape.yOffset += fVar4 * this->posYMag; + Math_SmoothStepToF(&this->actor.speedXZ, this->speedTarget, 0.1f, this->speedStep, 0.0f); - if (this->unk_1B0 < Math_Vec3f_DistXZ(&this->actor.world.pos, &this->actor.home.pos) || this->unk_198 < 4) { + if (this->flightDistance < Math_Vec3f_DistXZ(&this->actor.world.pos, &this->actor.home.pos) || this->timer < 4) { Math_StepToAngleS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos), - this->unk_1C0); + this->rotYStep); } else { - fVar4 = sinf(this->unk_1B4); - this->actor.world.rot.y += (s16)(fVar4 * this->unk_1A4); + fVar4 = sinf(this->posYPhase); + this->actor.world.rot.y += (s16)(fVar4 * this->rotYMag); } this->actor.shape.rot.y = this->actor.world.rot.y; SkelAnime_Update(&this->skelAnime); - this->unk_198 -= 1; - if (this->unk_198 < 0) { + this->timer -= 1; + if (this->timer < 0) { func_809C1CAC(this, this->actor.params); } } @@ -125,7 +125,7 @@ void func_809C1E40(EnBird* this, PlayState* play) { void EnBird_Update(Actor* thisx, PlayState* play) { EnBird* this = (EnBird*)thisx; - this->unk_1B4 += this->unk_1B8; + this->posYPhase += this->posYPhaseStep; this->actionFunc(this, play); } diff --git a/soh/src/overlays/actors/ovl_En_Bird/z_en_bird.h b/soh/src/overlays/actors/ovl_En_Bird/z_en_bird.h index a3966986b..bb904883e 100644 --- a/soh/src/overlays/actors/ovl_En_Bird/z_en_bird.h +++ b/soh/src/overlays/actors/ovl_En_Bird/z_en_bird.h @@ -13,18 +13,18 @@ typedef struct EnBird { /* 0x014C */ SkelAnime skelAnime; /* 0x0190 */ EnBirdActionFunc actionFunc; /* 0x0194 */ u32 unk_194; - /* 0x0198 */ s32 unk_198; - /* 0x019C */ s16 unk_19C; + /* 0x0198 */ s32 timer; + /* 0x019C */ s16 scaleAnimSpeed; /* 0x019E */ char unk_19E[0x2]; - /* 0x01A0 */ f32 unk_1A0; - /* 0x01A4 */ f32 unk_1A4; - /* 0x01A8 */ f32 unk_1A8; - /* 0x01AC */ f32 unk_1AC; - /* 0x01B0 */ f32 unk_1B0; - /* 0x01B4 */ f32 unk_1B4; - /* 0x01B8 */ f32 unk_1B8; + /* 0x01A0 */ f32 posYMag; + /* 0x01A4 */ f32 rotYMag; + /* 0x01A8 */ f32 speedTarget; + /* 0x01AC */ f32 speedStep; + /* 0x01B0 */ f32 flightDistance; + /* 0x01B4 */ f32 posYPhase; + /* 0x01B8 */ f32 posYPhaseStep; /* 0x01BC */ f32 unk_1BC; - /* 0x01C0 */ s16 unk_1C0; + /* 0x01C0 */ s16 rotYStep; /* 0x01C2 */ char unk_1C2[0x1A]; } EnBird; // size = 0x01DC diff --git a/soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c index 3bdf701d4..5597f8a1f 100644 --- a/soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c +++ b/soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c @@ -86,7 +86,7 @@ void EnBomBowlMan_Init(Actor* thisx, PlayState* play2) { cuccoSpawnPos[i].y, cuccoSpawnPos[i].z, 0, 0, 0, 1); if (cucco != NULL) { - cucco->unk_2F4 = cuccoScales[i]; + cucco->scale = cuccoScales[i]; cucco->collider.dim.radius = (s16)cuccoColliderDims[i][0]; cucco->collider.dim.height = (s16)cuccoColliderDims[i][1]; } diff --git a/soh/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c b/soh/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c index 8351d2e79..428158c0f 100644 --- a/soh/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c +++ b/soh/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c @@ -76,34 +76,34 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, PlayState* play) { Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->camId, CAM_STAT_ACTIVE); - this->unk_1C8.x = this->unk_1C8.y = this->unk_1C8.z = 0.1f; - this->unk_1A4.x = this->unk_1A4.y = this->unk_1A4.z = 0.1f; + this->subCamAtMaxVelFrac.x = this->subCamAtMaxVelFrac.y = this->subCamAtMaxVelFrac.z = 0.1f; + this->subCamEyeMaxVelFrac.x = this->subCamEyeMaxVelFrac.y = this->subCamEyeMaxVelFrac.z = 0.1f; - this->unk_180.x = this->unk_168.x = play->view.lookAt.x; - this->unk_180.y = this->unk_168.y = play->view.lookAt.y; - this->unk_180.z = this->unk_168.z = play->view.lookAt.z; + this->subCamAt.x = this->viewAt.x = play->view.lookAt.x; + this->subCamAt.y = this->viewAt.y = play->view.lookAt.y; + this->subCamAt.z = this->viewAt.z = play->view.lookAt.z; - this->unk_18C.x = this->unk_174.x = play->view.eye.x; - this->unk_18C.y = this->unk_174.y = play->view.eye.y; - this->unk_18C.z = this->unk_174.z = play->view.eye.z; + this->subCamEye.x = this->viewEye.x = play->view.eye.x; + this->subCamEye.y = this->viewEye.y = play->view.eye.y; + this->subCamEye.z = this->viewEye.z = play->view.eye.z; - this->unk_1BC.x = 20.0f; - this->unk_1BC.y = 100.0f; - this->unk_1BC.z = -800.0f; + this->subCamAtNext.x = 20.0f; + this->subCamAtNext.y = 100.0f; + this->subCamAtNext.z = -800.0f; - this->unk_198.x = 20.0f; - this->unk_198.y = 50.0f; - this->unk_198.z = -485.0f; + this->subCamEyeNext.x = 20.0f; + this->subCamEyeNext.y = 50.0f; + this->subCamEyeNext.z = -485.0f; - this->unk_1B0.x = fabsf(this->unk_18C.x - this->unk_198.x) * 0.02f; - this->unk_1B0.y = fabsf(this->unk_18C.y - this->unk_198.y) * 0.02f; - this->unk_1B0.z = fabsf(this->unk_18C.z - this->unk_198.z) * 0.02f; + this->subCamEyeVel.x = fabsf(this->subCamEye.x - this->subCamEyeNext.x) * 0.02f; + this->subCamEyeVel.y = fabsf(this->subCamEye.y - this->subCamEyeNext.y) * 0.02f; + this->subCamEyeVel.z = fabsf(this->subCamEye.z - this->subCamEyeNext.z) * 0.02f; - this->unk_1D4.x = fabsf(this->unk_180.x - this->unk_1BC.x) * 0.02f; - this->unk_1D4.y = fabsf(this->unk_180.y - this->unk_1BC.y) * 0.02f; - this->unk_1D4.z = fabsf(this->unk_180.z - this->unk_1BC.z) * 0.02f; + this->subCamAtVel.x = fabsf(this->subCamAt.x - this->subCamAtNext.x) * 0.02f; + this->subCamAtVel.y = fabsf(this->subCamAt.y - this->subCamAtNext.y) * 0.02f; + this->subCamAtVel.z = fabsf(this->subCamAt.z - this->subCamAtNext.z) * 0.02f; - Play_CameraSetAtEye(play, this->camId, &this->unk_180, &this->unk_18C); + Play_CameraSetAtEye(play, this->camId, &this->subCamAt, &this->subCamEye); this->actor.textId = 0xF; Message_StartTextbox(play, this->actor.textId, NULL); this->unk_154 = TEXT_STATE_EVENT; @@ -121,23 +121,26 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, PlayState* play) { void EnBomBowlPit_CameraDollyIn(EnBomBowlPit* this, PlayState* play) { if (this->camId != SUBCAM_FREE) { - Math_ApproachF(&this->unk_180.x, this->unk_1BC.x, this->unk_1C8.x, this->unk_1D4.x); - Math_ApproachF(&this->unk_180.y, this->unk_1BC.y, this->unk_1C8.y, this->unk_1D4.y); - Math_ApproachF(&this->unk_180.z, this->unk_1BC.z, this->unk_1C8.z, this->unk_1D4.z); - Math_ApproachF(&this->unk_18C.x, this->unk_198.x, this->unk_1A4.x, this->unk_1B0.x); - Math_ApproachF(&this->unk_18C.y, this->unk_198.y, this->unk_1A4.y, this->unk_1B0.y); - Math_ApproachF(&this->unk_18C.z, this->unk_198.z, this->unk_1A4.z, this->unk_1B0.z); + Math_ApproachF(&this->subCamAt.x, this->subCamAtNext.x, this->subCamAtMaxVelFrac.x, this->subCamAtVel.x); + Math_ApproachF(&this->subCamAt.y, this->subCamAtNext.y, this->subCamAtMaxVelFrac.y, this->subCamAtVel.y); + Math_ApproachF(&this->subCamAt.z, this->subCamAtNext.z, this->subCamAtMaxVelFrac.z, this->subCamAtVel.z); + Math_ApproachF(&this->subCamEye.x, this->subCamEyeNext.x, this->subCamEyeMaxVelFrac.x, this->subCamEyeVel.x); + Math_ApproachF(&this->subCamEye.y, this->subCamEyeNext.y, this->subCamEyeMaxVelFrac.y, this->subCamEyeVel.y); + Math_ApproachF(&this->subCamEye.z, this->subCamEyeNext.z, this->subCamEyeMaxVelFrac.z, this->subCamEyeVel.z); } - Play_CameraSetAtEye(play, this->camId, &this->unk_180, &this->unk_18C); + Play_CameraSetAtEye(play, this->camId, &this->subCamAt, &this->subCamEye); if ((this->unk_154 == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) { Message_CloseTextbox(play); } - if ((fabsf(this->unk_18C.x - this->unk_198.x) < 5.0f) && (fabsf(this->unk_18C.y - this->unk_198.y) < 5.0f) && - (fabsf(this->unk_18C.z - this->unk_198.z) < 5.0f) && (fabsf(this->unk_180.x - this->unk_1BC.x) < 5.0f) && - (fabsf(this->unk_180.y - this->unk_1BC.y) < 5.0f) && (fabsf(this->unk_180.z - this->unk_1BC.z) < 5.0f)) { + if ((fabsf(this->subCamEye.x - this->subCamEyeNext.x) < 5.0f) && + (fabsf(this->subCamEye.y - this->subCamEyeNext.y) < 5.0f) && + (fabsf(this->subCamEye.z - this->subCamEyeNext.z) < 5.0f) && + (fabsf(this->subCamAt.x - this->subCamAtNext.x) < 5.0f) && + (fabsf(this->subCamAt.y - this->subCamAtNext.y) < 5.0f) && + (fabsf(this->subCamAt.z - this->subCamAtNext.z) < 5.0f)) { Message_CloseTextbox(play); this->timer = 30; this->actionFunc = EnBomBowlPit_SpawnPrize; diff --git a/soh/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h b/soh/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h index 48cfbd5c2..a921c5bb7 100644 --- a/soh/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h +++ b/soh/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h @@ -21,16 +21,16 @@ typedef struct EnBomBowlPit { /* 0x015C */ s16 start; /* 0x0160 */ s32 getItemId; /* 0x0164 */ u8 status; - /* 0x0168 */ Vec3f unk_168; // set and not used? - /* 0x0174 */ Vec3f unk_174; // set and not used? - /* 0x0180 */ Vec3f unk_180; // camera at (start) - /* 0x018C */ Vec3f unk_18C; // camera eye (start) - /* 0x0198 */ Vec3f unk_198; // camera eye (end) - /* 0x01A4 */ Vec3f unk_1A4; // camera eye (scales) - /* 0x01B0 */ Vec3f unk_1B0; // camera eye (maxsteps) - /* 0x01BC */ Vec3f unk_1BC; // camera at (end) - /* 0x01C8 */ Vec3f unk_1C8; // camera at (scales) - /* 0x01D4 */ Vec3f unk_1D4; // camera eye (maxsteps) + /* 0x0168 */ Vec3f viewAt; // set and not used? + /* 0x0174 */ Vec3f viewEye; // set and not used? + /* 0x0180 */ Vec3f subCamAt; // camera at (start) + /* 0x018C */ Vec3f subCamEye; // camera eye (start) + /* 0x0198 */ Vec3f subCamEyeNext; // camera eye (end) + /* 0x01A4 */ Vec3f subCamEyeMaxVelFrac; // camera eye (scales) + /* 0x01B0 */ Vec3f subCamEyeVel; // camera eye (maxsteps) + /* 0x01BC */ Vec3f subCamAtNext; // camera at (end) + /* 0x01C8 */ Vec3f subCamAtMaxVelFrac; // camera at (scales) + /* 0x01D4 */ Vec3f subCamAtVel; // camera eye (maxsteps) /* 0x01E0 */ EnExItem* exItem; /* 0x01E4 */ char unk_1E4[0x3520]; } EnBomBowlPit; // size = 0x3704 diff --git a/soh/src/overlays/actors/ovl_En_Box/z_en_box.c b/soh/src/overlays/actors/ovl_En_Box/z_en_box.c index fb4f09d2b..c178dab75 100644 --- a/soh/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/soh/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -271,7 +271,7 @@ void EnBox_Fall(EnBox* this, PlayState* play) { this->dyna.actor.world.pos.y = this->dyna.actor.floorHeight; EnBox_SetupAction(this, EnBox_WaitOpen); if (GameInteractor_Should(VB_PLAY_ONEPOINT_ACTOR_CS, true, this)) { - OnePointCutscene_EndCutscene(play, this->unk_1AC); + OnePointCutscene_EndCutscene(play, this->subCamId); } } Audio_PlaySoundGeneral(NA_SE_EV_COFFIN_CAP_BOUND, &this->dyna.actor.projectedPos, 4, @@ -295,7 +295,7 @@ void EnBox_FallOnSwitchFlag(EnBox* this, PlayState* play) { if (this->unk_1A8 >= 0) { EnBox_SetupAction(this, EnBox_Fall); - this->unk_1AC = OnePointCutscene_Init(play, 4500, 9999, &this->dyna.actor, MAIN_CAM); + this->subCamId = OnePointCutscene_Init(play, 4500, 9999, &this->dyna.actor, MAIN_CAM); func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); } else if (this->unk_1A8 >= -11) { this->unk_1A8++; diff --git a/soh/src/overlays/actors/ovl_En_Box/z_en_box.h b/soh/src/overlays/actors/ovl_En_Box/z_en_box.h index 0168fc1a8..fdfec21bc 100644 --- a/soh/src/overlays/actors/ovl_En_Box/z_en_box.h +++ b/soh/src/overlays/actors/ovl_En_Box/z_en_box.h @@ -34,7 +34,7 @@ typedef struct EnBox { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ SkelAnime skelanime; /* 0x01A8 */ s32 unk_1A8; // related to animation delays for types 3 and 8 - /* 0x01AC */ s32 unk_1AC; + /* 0x01AC */ s32 subCamId; /* 0x01B0 */ f32 unk_1B0; // 0-1, rotation-related, apparently unused (in z_en_box.c at least) /* 0x01B4 */ EnBoxActionFunc actionFunc; /* 0x01B8 */ Vec3s jointTable[5]; diff --git a/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.c b/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.c index 281402e9e..c97cc74a5 100644 --- a/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.c +++ b/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.c @@ -110,27 +110,27 @@ void EnBrob_Destroy(Actor* thisx, PlayState* play) { void func_809CADDC(EnBrob* this, PlayState* play) { func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId); this->timer = this->actionFunc == func_809CB2B8 ? 200 : 0; - this->unk_1AE = 0; + this->modelOffsetY = 0; this->actionFunc = func_809CB054; } void func_809CAE44(EnBrob* this, PlayState* play) { Animation_PlayOnce(&this->skelAnime, &object_brob_Anim_001750); func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId); - this->unk_1AE = 1000; + this->modelOffsetY = 1000; this->actionFunc = func_809CB114; } void func_809CAEA0(EnBrob* this) { Animation_MorphToLoop(&this->skelAnime, &object_brob_Anim_001958, -5.0f); - this->unk_1AE = 8000; + this->modelOffsetY = 8000; this->timer = 1200; this->actionFunc = func_809CB218; } void func_809CAEF4(EnBrob* this) { Animation_MorphToPlayOnce(&this->skelAnime, &object_brob_Anim_000290, -5.0f); - this->unk_1AE -= 125.0f; + this->modelOffsetY -= 125.0f; Actor_SetColorFilter(&this->dyna.actor, 0, 0xFF, 0, 0x50); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EN_GOMA_JR_FREEZE); this->actionFunc = func_809CB2B8; @@ -139,7 +139,7 @@ void func_809CAEF4(EnBrob* this) { void func_809CAF88(EnBrob* this) { Animation_Change(&this->skelAnime, &object_brob_Anim_001750, -1.0f, Animation_GetLastFrame(&object_brob_Anim_001750), 0.0f, ANIMMODE_ONCE, -5.0f); - this->unk_1AE = 8250; + this->modelOffsetY = 8250; this->actionFunc = func_809CB354; } @@ -173,11 +173,11 @@ void func_809CB114(EnBrob* this, PlayState* play) { } else { curFrame = this->skelAnime.curFrame; if (curFrame < 8.0f) { - this->unk_1AE += 1000.0f; + this->modelOffsetY += 1000.0f; } else if (curFrame < 12.0f) { - this->unk_1AE += 250.0f; + this->modelOffsetY += 250.0f; } else { - this->unk_1AE -= 250.0f; + this->modelOffsetY -= 250.0f; } } } @@ -199,7 +199,7 @@ void func_809CB2B8(EnBrob* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { func_809CADDC(this, play); } else if (this->skelAnime.curFrame < 8.0f) { - this->unk_1AE -= 1250.0f; + this->modelOffsetY -= 1250.0f; } this->dyna.actor.colorFilterTimer = 0x50; } @@ -212,11 +212,11 @@ void func_809CB354(EnBrob* this, PlayState* play) { } else { curFrame = this->skelAnime.curFrame; if (curFrame < 8.0f) { - this->unk_1AE -= 1000.0f; + this->modelOffsetY -= 1000.0f; } else if (curFrame < 12.0f) { - this->unk_1AE -= 250.0f; + this->modelOffsetY -= 250.0f; } else { - this->unk_1AE += 250.0f; + this->modelOffsetY += 250.0f; } } } @@ -326,6 +326,6 @@ void EnBrob_Draw(Actor* thisx, PlayState* play) { EnBrob* this = (EnBrob*)thisx; Gfx_SetupDL_25Opa(play->state.gfxCtx); - Matrix_Translate(0.0f, this->unk_1AE, 0.0f, MTXMODE_APPLY); + Matrix_Translate(0.0f, this->modelOffsetY, 0.0f, MTXMODE_APPLY); SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnBrob_PostLimbDraw, this); } diff --git a/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.h b/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.h index c4e256576..5fca10407 100644 --- a/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.h +++ b/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.h @@ -13,7 +13,7 @@ typedef struct EnBrob { /* 0x0164 */ SkelAnime skelAnime; /* 0x01A8 */ EnBrobActionFunc actionFunc; /* 0x01AC */ s16 timer; - /* 0x01AE */ s16 unk_1AE; + /* 0x01AE */ s16 modelOffsetY; /* 0x01B0 */ Vec3s jointTable[10]; /* 0x01EC */ Vec3s morphTable[10]; /* 0x0228 */ ColliderCylinder colliders[2]; diff --git a/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c b/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c index 0009c25dd..5bbf618f5 100644 --- a/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c +++ b/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c @@ -129,8 +129,8 @@ void EnCow_Init(Actor* thisx, PlayState* play) { Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_COW, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, this->actor.shape.rot.y, 0, 1); - this->unk_278 = Rand_ZeroFloat(1000.0f) + 40.0f; - this->unk_27A = 0; + this->animationTimer = Rand_ZeroFloat(1000.0f) + 40.0f; + this->breathTimer = 0; this->actor.targetMode = 6; DREG(53) = 0; break; @@ -142,12 +142,12 @@ void EnCow_Init(Actor* thisx, PlayState* play) { this->actionFunc = func_809DFA84; func_809DEF94(this); this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; - this->unk_278 = ((u32)(Rand_ZeroFloat(1000.0f)) & 0xFFFF) + 40.0f; + this->animationTimer = ((u32)(Rand_ZeroFloat(1000.0f)) & 0xFFFF) + 40.0f; break; } this->actor.colChkInfo.mass = MASS_IMMOVABLE; Actor_SetScale(&this->actor, 0.01f); - this->unk_276 = 0; + this->cowFlags = 0; } void EnCow_Destroy(Actor* thisx, PlayState* play) { @@ -162,35 +162,35 @@ void EnCow_Destroy(Actor* thisx, PlayState* play) { } void func_809DF494(EnCow* this, PlayState* play) { - if (this->unk_278 > 0) { - this->unk_278 -= 1; + if (this->animationTimer > 0) { + this->animationTimer -= 1; } else { - this->unk_278 = Rand_ZeroFloat(500.0f) + 40.0f; + this->animationTimer = Rand_ZeroFloat(500.0f) + 40.0f; Animation_Change(&this->skelAnime, &gCowBodyChewAnim, 1.0f, this->skelAnime.curFrame, Animation_GetLastFrame(&gCowBodyChewAnim), ANIMMODE_ONCE, 1.0f); } - if ((this->actor.xzDistToPlayer < 150.0f) && (!(this->unk_276 & 2))) { - this->unk_276 |= 2; + if ((this->actor.xzDistToPlayer < 150.0f) && (!(this->cowFlags & 2))) { + this->cowFlags |= 2; if (this->skelAnime.animation == &gCowBodyChewAnim) { - this->unk_278 = 0; + this->animationTimer = 0; } } - this->unk_27A += 1; - if (this->unk_27A >= 0x31) { - this->unk_27A = 0; + this->breathTimer += 1; + if (this->breathTimer >= 0x31) { + this->breathTimer = 0; } // (1.0f / 100.0f) instead of 0.01f below is necessary so 0.01f doesn't get reused mistakenly - if (this->unk_27A < 0x20) { - this->actor.scale.x = ((Math_SinS(this->unk_27A << 0xA) * (1.0f / 100.0f)) + 1.0f) * 0.01f; + if (this->breathTimer < 0x20) { + this->actor.scale.x = ((Math_SinS(this->breathTimer << 0xA) * (1.0f / 100.0f)) + 1.0f) * 0.01f; } else { this->actor.scale.x = 0.01f; } - if (this->unk_27A >= 0x11) { - this->actor.scale.y = ((Math_SinS((this->unk_27A << 0xA) - 0x4000) * (1.0f / 100.0f)) + 1.0f) * 0.01f; + if (this->breathTimer >= 0x11) { + this->actor.scale.y = ((Math_SinS((this->breathTimer << 0xA) - 0x4000) * (1.0f / 100.0f)) + 1.0f) * 0.01f; } else { this->actor.scale.y = 0.01f; } @@ -255,8 +255,8 @@ void func_809DF8FC(EnCow* this, PlayState* play) { void func_809DF96C(EnCow* this, PlayState* play) { if ((play->msgCtx.ocarinaMode == OCARINA_MODE_00) || (play->msgCtx.ocarinaMode == OCARINA_MODE_04)) { if (DREG(53) != 0) { - if (this->unk_276 & 4) { - this->unk_276 &= ~0x4; + if (this->cowFlags & 4) { + this->cowFlags &= ~0x4; DREG(53) = 0; } else { if ((this->actor.xzDistToPlayer < 150.0f) && @@ -271,30 +271,30 @@ void func_809DF96C(EnCow* this, PlayState* play) { return; } } else { - this->unk_276 |= 4; + this->cowFlags |= 4; } } } else { - this->unk_276 &= ~0x4; + this->cowFlags &= ~0x4; } } func_809DF494(this, play); } void func_809DFA84(EnCow* this, PlayState* play) { - if (this->unk_278 > 0) { - this->unk_278--; + if (this->animationTimer > 0) { + this->animationTimer--; } else { - this->unk_278 = Rand_ZeroFloat(200.0f) + 40.0f; + this->animationTimer = Rand_ZeroFloat(200.0f) + 40.0f; Animation_Change(&this->skelAnime, &gCowTailIdleAnim, 1.0f, this->skelAnime.curFrame, Animation_GetLastFrame(&gCowTailIdleAnim), ANIMMODE_ONCE, 1.0f); } if ((this->actor.xzDistToPlayer < 150.0f) && - (ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) >= 0x61A9) && (!(this->unk_276 & 2))) { - this->unk_276 |= 2; + (ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) >= 0x61A9) && (!(this->cowFlags & 2))) { + this->cowFlags |= 2; if (this->skelAnime.animation == &gCowTailIdleAnim) { - this->unk_278 = 0; + this->animationTimer = 0; } } } diff --git a/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.h b/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.h index 3cd244388..6207699dd 100644 --- a/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.h +++ b/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.h @@ -15,9 +15,9 @@ typedef struct EnCow { /* 0x0228 */ Vec3s jointTable[6]; /* 0x024C */ Vec3s morphTable[6]; /* 0x0270 */ Vec3s someRot; - /* 0x0276 */ u16 unk_276; - /* 0x0278 */ u16 unk_278; - /* 0x027A */ u16 unk_27A; + /* 0x0276 */ u16 cowFlags; + /* 0x0278 */ u16 animationTimer; + /* 0x027A */ u16 breathTimer; /* 0x027C */ EnCowActionFunc actionFunc; } EnCow; // size = 0x0280 diff --git a/soh/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/soh/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c index 6c4066f37..194e09fd3 100644 --- a/soh/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c +++ b/soh/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c @@ -308,35 +308,36 @@ void EnDivingGame_SetupRupeeThrow(EnDivingGame* this, PlayState* play) { Play_ChangeCameraStatus(play, 0, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); this->spawnRuppyTimer = 10; - this->unk_2F4.x = -210.0f; - this->unk_2F4.y = -80.0f; - this->unk_2F4.z = -1020.0f; - this->unk_2D0.x = -280.0f; - this->unk_2D0.y = -20.0f; - this->unk_2D0.z = -240.0f; + this->subCamAtNext.x = -210.0f; + this->subCamAtNext.y = -80.0f; + this->subCamAtNext.z = -1020.0f; + this->subCamEyeNext.x = -280.0f; + this->subCamEyeNext.y = -20.0f; + this->subCamEyeNext.z = -240.0f; if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_SILVER_SCALE)) { this->rupeesLeftToThrow = 5; } else { this->rupeesLeftToThrow = 10; } - this->unk_2DC.x = this->unk_2DC.y = this->unk_2DC.z = this->unk_300.x = this->unk_300.y = this->unk_300.z = 0.1f; + this->subCamEyeMaxVelFrac.x = this->subCamEyeMaxVelFrac.y = this->subCamEyeMaxVelFrac.z = + this->subCamAtMaxVelFrac.x = this->subCamAtMaxVelFrac.y = this->subCamAtMaxVelFrac.z = 0.1f; this->camLookAt.x = play->view.lookAt.x; this->camLookAt.y = play->view.lookAt.y; this->camLookAt.z = play->view.lookAt.z; this->camEye.x = play->view.eye.x; this->camEye.y = play->view.eye.y + 80.0f; this->camEye.z = play->view.eye.z + 250.0f; - this->unk_2E8.x = fabsf(this->camEye.x - this->unk_2D0.x) * 0.04f; - this->unk_2E8.y = fabsf(this->camEye.y - this->unk_2D0.y) * 0.04f; - this->unk_2E8.z = fabsf(this->camEye.z - this->unk_2D0.z) * 0.04f; - this->unk_30C.x = fabsf(this->camLookAt.x - this->unk_2F4.x) * 0.04f; - this->unk_30C.y = fabsf(this->camLookAt.y - this->unk_2F4.y) * 0.04f; - this->unk_30C.z = fabsf(this->camLookAt.z - this->unk_2F4.z) * 0.04f; + this->subCamEyeVel.x = fabsf(this->camEye.x - this->subCamEyeNext.x) * 0.04f; + this->subCamEyeVel.y = fabsf(this->camEye.y - this->subCamEyeNext.y) * 0.04f; + this->subCamEyeVel.z = fabsf(this->camEye.z - this->subCamEyeNext.z) * 0.04f; + this->subCamAtVel.x = fabsf(this->camLookAt.x - this->subCamAtNext.x) * 0.04f; + this->subCamAtVel.y = fabsf(this->camLookAt.y - this->subCamAtNext.y) * 0.04f; + this->subCamAtVel.z = fabsf(this->camLookAt.z - this->subCamAtNext.z) * 0.04f; Play_CameraSetAtEye(play, this->subCamId, &this->camLookAt, &this->camEye); Play_CameraSetFov(play, this->subCamId, play->mainCamera.fov); this->csCameraTimer = 60; this->actionFunc = EnDivingGame_RupeeThrow; - this->unk_318 = 0.0f; + this->subCamVelFactor = 0.0f; } // Throws rupee when this->spawnRuppyTimer == 0 @@ -346,12 +347,17 @@ void EnDivingGame_RupeeThrow(EnDivingGame* this, PlayState* play) { Audio_SetExtraFilter(0); } if (this->subCamId != 0) { - Math_ApproachF(&this->camEye.x, this->unk_2D0.x, this->unk_2DC.x, this->unk_2E8.x * this->unk_318); - Math_ApproachF(&this->camEye.z, this->unk_2D0.z, this->unk_2DC.z, this->unk_2E8.z * this->unk_318); - Math_ApproachF(&this->camLookAt.x, this->unk_2F4.x, this->unk_300.x, this->unk_30C.x * this->unk_318); - Math_ApproachF(&this->camLookAt.y, this->unk_2F4.y, this->unk_300.y, this->unk_30C.y * this->unk_318); - Math_ApproachF(&this->camLookAt.z, this->unk_2F4.z, this->unk_300.z, this->unk_30C.z * this->unk_318); - Math_ApproachF(&this->unk_318, 1.0f, 1.0f, 0.02f); + Math_ApproachF(&this->camEye.x, this->subCamEyeNext.x, this->subCamEyeMaxVelFrac.x, + this->subCamEyeVel.x * this->subCamVelFactor); + Math_ApproachF(&this->camEye.z, this->subCamEyeNext.z, this->subCamEyeMaxVelFrac.z, + this->subCamEyeVel.z * this->subCamVelFactor); + Math_ApproachF(&this->camLookAt.x, this->subCamAtNext.x, this->subCamAtMaxVelFrac.x, + this->subCamAtVel.x * this->subCamVelFactor); + Math_ApproachF(&this->camLookAt.y, this->subCamAtNext.y, this->subCamAtMaxVelFrac.y, + this->subCamAtVel.y * this->subCamVelFactor); + Math_ApproachF(&this->camLookAt.z, this->subCamAtNext.z, this->subCamAtMaxVelFrac.z, + this->subCamAtVel.z * this->subCamVelFactor); + Math_ApproachF(&this->subCamVelFactor, 1.0f, 1.0f, 0.02f); } Play_CameraSetAtEye(play, this->subCamId, &this->camLookAt, &this->camEye); if (!this->allRupeesThrown && this->spawnRuppyTimer == 0) { @@ -368,10 +374,12 @@ void EnDivingGame_RupeeThrow(EnDivingGame* this, PlayState* play) { this->allRupeesThrown = true; } } - if (this->csCameraTimer == 0 || - ((fabsf(this->camEye.x - this->unk_2D0.x) < 2.0f) && (fabsf(this->camEye.y - this->unk_2D0.y) < 2.0f) && - (fabsf(this->camEye.z - this->unk_2D0.z) < 2.0f) && (fabsf(this->camLookAt.x - this->unk_2F4.x) < 2.0f) && - (fabsf(this->camLookAt.y - this->unk_2F4.y) < 2.0f) && (fabsf(this->camLookAt.z - this->unk_2F4.z) < 2.0f))) { + if (this->csCameraTimer == 0 || ((fabsf(this->camEye.x - this->subCamEyeNext.x) < 2.0f) && + (fabsf(this->camEye.y - this->subCamEyeNext.y) < 2.0f) && + (fabsf(this->camEye.z - this->subCamEyeNext.z) < 2.0f) && + (fabsf(this->camLookAt.x - this->subCamAtNext.x) < 2.0f) && + (fabsf(this->camLookAt.y - this->subCamAtNext.y) < 2.0f) && + (fabsf(this->camLookAt.z - this->subCamAtNext.z) < 2.0f))) { if (this->unk_2A2 != 0) { this->csCameraTimer = 70; this->unk_2A2 = 2; @@ -389,12 +397,12 @@ void EnDivingGame_SetupUnderwaterViewCs(EnDivingGame* this, PlayState* play) { this->unk_2A2 = 1; this->csCameraTimer = 100; this->actionFunc = EnDivingGame_RupeeThrow; - this->camLookAt.x = this->unk_2F4.x = -210.0f; - this->camLookAt.y = this->unk_2F4.y = -80.0f; - this->camLookAt.z = this->unk_2F4.z = -1020.0f; - this->camEye.x = this->unk_2D0.x = -280.0f; - this->camEye.y = this->unk_2D0.y = -20.0f; - this->camEye.z = this->unk_2D0.z = -240.0f; + this->camLookAt.x = this->subCamAtNext.x = -210.0f; + this->camLookAt.y = this->subCamAtNext.y = -80.0f; + this->camLookAt.z = this->subCamAtNext.z = -1020.0f; + this->camEye.x = this->subCamEyeNext.x = -280.0f; + this->camEye.y = this->subCamEyeNext.y = -20.0f; + this->camEye.z = this->subCamEyeNext.z = -240.0f; } } diff --git a/soh/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.h b/soh/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.h index 57acaafb4..744255589 100644 --- a/soh/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.h +++ b/soh/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.h @@ -33,13 +33,13 @@ typedef struct EnDivingGame { /* 0x02AC */ char unk_2AC[0xC]; // probably another Vec3f, but unused. /* 0x02B8 */ Vec3f camLookAt; /* 0x02C4 */ Vec3f camEye; - /* 0x02D0 */ Vec3f unk_2D0; - /* 0x02DC */ Vec3f unk_2DC; - /* 0x02E8 */ Vec3f unk_2E8; - /* 0x02F4 */ Vec3f unk_2F4; - /* 0x0300 */ Vec3f unk_300; - /* 0x030C */ Vec3f unk_30C; - /* 0x0318 */ f32 unk_318; + /* 0x02D0 */ Vec3f subCamEyeNext; + /* 0x02DC */ Vec3f subCamEyeMaxVelFrac; + /* 0x02E8 */ Vec3f subCamEyeVel; + /* 0x02F4 */ Vec3f subCamAtNext; + /* 0x0300 */ Vec3f subCamAtMaxVelFrac; + /* 0x030C */ Vec3f subCamAtVel; + /* 0x0318 */ f32 subCamVelFactor; /* 0x031C */ char unk_31C; // unused /* 0x031D */ u8 notPlayingMinigame; // flag /* 0x031E */ u8 allRupeesThrown; // flag diff --git a/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c b/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c index 6235d8710..67fd67768 100644 --- a/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c +++ b/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c @@ -145,7 +145,7 @@ s32 func_809F68B0(EnDodojr* this, PlayState* play) { return 0; } - if (this->unk_1FC == 0) { + if (this->counter == 0) { return 0; } @@ -153,10 +153,10 @@ s32 func_809F68B0(EnDodojr* this, PlayState* play) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND); this->dustPos = this->actor.world.pos; func_809F6510(this, play, 10); - this->actor.velocity.y = 10.0f / (4 - this->unk_1FC); - this->unk_1FC--; + this->actor.velocity.y = 10.0f / (4 - this->counter); + this->counter--; - if (this->unk_1FC == 0) { + if (this->counter == 0) { this->actor.velocity.y = 0.0f; return 1; } @@ -183,8 +183,8 @@ void func_809F6A20(EnDodojr* this) { this->actor.velocity.z = 0.0f; this->actor.gravity = -0.8f; - if (this->unk_1FC == 0) { - this->unk_1FC = 3; + if (this->counter == 0) { + this->counter = 3; this->actor.velocity.y = 10.0f; } GameInteractor_ExecuteOnEnemyDefeat(&this->actor); @@ -203,7 +203,7 @@ void func_809F6B38(EnDodojr* this) { Animation_Change(&this->skelAnime, &object_dodojr_Anim_000724, 1.0f, 0.0f, lastFrame, ANIMMODE_LOOP, -10.0f); this->actor.gravity = -0.8f; - this->unk_1FC = 3; + this->counter = 3; this->actor.velocity.y = 10.0f; } @@ -474,7 +474,7 @@ void func_809F768C(EnDodojr* this, PlayState* play) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_K_DRINK); Actor_Kill(this->bomb); this->timer3 = 24; - this->unk_1FC = 0; + this->counter = 0; this->actionFunc = func_809F773C; } } @@ -496,7 +496,7 @@ void func_809F77AC(EnDodojr* this, PlayState* play) { if (func_809F68B0(this, play) != 0) { this->timer3 = 60; func_809F6AC4(this); - this->unk_1FC = 7; + this->counter = 7; this->actionFunc = func_809F784C; } } @@ -570,7 +570,7 @@ void func_809F7AB8(EnDodojr* this, PlayState* play) { if (func_809F68B0(this, play) != 0) { this->timer3 = 60; func_809F6AC4(this); - this->unk_1FC = 7; + this->counter = 7; this->actionFunc = func_809F7B3C; } } @@ -578,10 +578,10 @@ void func_809F7AB8(EnDodojr* this, PlayState* play) { void func_809F7B3C(EnDodojr* this, PlayState* play) { EnBom* bomb; - if (this->unk_1FC != 0) { + if (this->counter != 0) { if (this->actor.colorFilterTimer == 0) { - Actor_SetColorFilter(&this->actor, 0x4000, 200, 0, this->unk_1FC); - this->unk_1FC--; + Actor_SetColorFilter(&this->actor, 0x4000, 200, 0, this->counter); + this->counter--; } } else { bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, diff --git a/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.h b/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.h index 098001772..1f6da6a3f 100644 --- a/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.h +++ b/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.h @@ -16,7 +16,7 @@ typedef struct EnDodojr { /* 0x01E0 */ Actor* bomb; /* 0x01E4 */ Vec3f headPos; /* 0x01F0 */ Vec3f dustPos; - /* 0x01FC */ s16 unk_1FC; + /* 0x01FC */ s16 counter; /* 0x01FE */ s16 timer1; /* 0x0200 */ s16 timer2; /* 0x0202 */ s16 timer3; diff --git a/soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c b/soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c index ac3631564..577d70d99 100644 --- a/soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c +++ b/soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c @@ -144,7 +144,7 @@ void EnEncount1_SpawnLeevers(EnEncount1* this, PlayState* play) { if (leever != NULL) { this->curNumSpawn++; - leever->unk_280 = this->leeverIndex++; + leever->aimType = this->leeverIndex++; if (this->leeverIndex >= 5) { this->leeverIndex = 0; } diff --git a/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h b/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h index 090d7028c..55acc87d7 100644 --- a/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h +++ b/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h @@ -14,7 +14,7 @@ typedef struct EnExItem { /* 0x014C */ EnExItemActionFunc actionFunc; /* 0x0150 */ s16 getItemObjId; /* 0x0152 */ s16 type; - /* 0x0152 */ s16 unusedParam; + /* 0x0154 */ s16 unusedParam; /* 0x0156 */ s16 giDrawId; /* 0x0158 */ s16 stopRotate; /* 0x015A */ s16 timer; diff --git a/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c index ed409b115..6ef04cfe7 100644 --- a/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -823,8 +823,8 @@ s16 EnGo2_UpdateTalkState(PlayState* play, Actor* thisx) { s32 func_80A44790(EnGo2* this, PlayState* play) { if ((this->actor.params & 0x1F) != GORON_DMT_BIGGORON && (this->actor.params & 0x1F) != GORON_CITY_ROLLING_BIG) { - return Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->unk_218, EnGo2_GetTextId, - EnGo2_UpdateTalkState); + return Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->interactRange, + EnGo2_GetTextId, EnGo2_UpdateTalkState); } else if (((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) && ((this->collider.base.ocFlags2 & 1) == 0)) { return false; } else { @@ -834,7 +834,7 @@ s32 func_80A44790(EnGo2* this, PlayState* play) { } else if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) { this->interactInfo.talkState = EnGo2_UpdateTalkState(play, &this->actor); return false; - } else if (func_8002F2CC(&this->actor, play, this->unk_218)) { + } else if (func_8002F2CC(&this->actor, play, this->interactRange)) { this->actor.textId = EnGo2_GetTextId(play, &this->actor); } return false; @@ -854,8 +854,8 @@ void EnGo2_SetShape(EnGo2* this) { this->actor.shape.shadowScale = D_80A481F8[index].shape_unk_10; Actor_SetScale(&this->actor, D_80A481F8[index].scale); this->actor.targetMode = D_80A481F8[index].actor_unk_1F; - this->unk_218 = D_80A481F8[index].unk_218; - this->unk_218 += this->collider.dim.radius; + this->interactRange = D_80A481F8[index].interactRange; + this->interactRange += this->collider.dim.radius; } void EnGo2_CheckCollision(EnGo2* this, PlayState* play) { @@ -2017,7 +2017,7 @@ void EnGo2_Update(Actor* thisx, PlayState* play) { } this->actionFunc(this, play); if (this->unk_211 == true) { - func_80034F54(play, this->unk_226, this->unk_24A, 18); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 18); } func_80A45288(this, play); EnGo2_EyeMouthTexState(this); @@ -2075,9 +2075,9 @@ s32 EnGo2_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, V Matrix_RotateX(float1, MTXMODE_APPLY); } if ((limb == 10) || (limb == 11) || (limb == 14)) { - float1 = Math_SinS(this->unk_226[limb]); + float1 = Math_SinS(this->fidgetTableY[limb]); rot->y += float1 * 200.0f; - float1 = Math_CosS(this->unk_24A[limb]); + float1 = Math_CosS(this->fidgetTableZ[limb]); rot->z += float1 * 200.0f; } return 0; diff --git a/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.h b/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.h index 185a036f4..81c53f882 100644 --- a/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.h +++ b/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.h @@ -53,7 +53,7 @@ typedef struct { f32 shape_unk_10; f32 scale; s8 actor_unk_1F; - f32 unk_218; + f32 interactRange; } EnGo2DataStruct2; // size = 0x10 typedef struct { @@ -86,12 +86,12 @@ typedef struct EnGo2 { /* 0x0214 */ u8 eyeTexIndex; /* 0x0215 */ u8 mouthTexIndex; /* 0x0216 */ u8 unk_216; // Set to z rotation, checked by waypoint - /* 0x0218 */ f32 unk_218; + /* 0x0218 */ f32 interactRange; /* 0x021C */ char unk_21C[0x04]; /* 0x0220 */ f32 alpha; // Set to 0, used by func_80A45360, smoothed to this->actor.shape.unk_14 from either 0 or 255.0f /* 0x0224 */ s16 blinkTimer; - /* 0x0226 */ s16 unk_226[18]; // Remains unknown - /* 0x024A */ s16 unk_24A[18]; // Remains unknown + /* 0x0226 */ s16 fidgetTableY[18]; // Remains unknown + /* 0x024A */ s16 fidgetTableZ[18]; // Remains unknown /* 0x026E */ u16 trackingMode; /* 0x0270 */ EnGoEffect dustEffects[10]; /* 0x04A0 */ Vec3f eye; diff --git a/soh/src/overlays/actors/ovl_En_Guest/z_en_guest.c b/soh/src/overlays/actors/ovl_En_Guest/z_en_guest.c index f8372067c..bc73c062e 100644 --- a/soh/src/overlays/actors/ovl_En_Guest/z_en_guest.c +++ b/soh/src/overlays/actors/ovl_En_Guest/z_en_guest.c @@ -163,7 +163,7 @@ void func_80A505CC(Actor* thisx, PlayState* play) { } Npc_TrackPoint(&this->actor, &this->interactInfo, 6, NPC_TRACKING_HEAD_AND_TORSO); - func_80034F54(play, this->unk_2CC, this->unk_2EC, 16); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 16); gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[this->osAnimeBankIndex].segment); @@ -206,8 +206,8 @@ s32 EnGuest_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* } if (limbIndex == 8 || limbIndex == 9 || limbIndex == 12) { - rot->y += Math_SinS(this->unk_2CC[limbIndex]) * 200.0f; - rot->z += Math_CosS(this->unk_2EC[limbIndex]) * 200.0f; + rot->y += Math_SinS(this->fidgetTableY[limbIndex]) * 200.0f; + rot->z += Math_CosS(this->fidgetTableZ[limbIndex]) * 200.0f; } CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_En_Guest/z_en_guest.h b/soh/src/overlays/actors/ovl_En_Guest/z_en_guest.h index 4cf72a26c..77d178f4f 100644 --- a/soh/src/overlays/actors/ovl_En_Guest/z_en_guest.h +++ b/soh/src/overlays/actors/ovl_En_Guest/z_en_guest.h @@ -18,8 +18,8 @@ typedef struct EnGuest { /* 0x02A0 */ NpcInteractInfo interactInfo; /* 0x02C8 */ s16 unk_2C8; /* 0x02CA */ s16 unk_2CA; - /* 0x02CC */ s16 unk_2CC[16]; - /* 0x02EC */ s16 unk_2EC[16]; + /* 0x02CC */ s16 fidgetTableY[16]; + /* 0x02EC */ s16 fidgetTableZ[16]; /* 0x030C */ s8 osAnimeBankIndex; /* 0x030D */ u8 unk_30D; /* 0x030E */ u8 unk_30E; diff --git a/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index e1662198a..598c27291 100644 --- a/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -321,15 +321,15 @@ void func_80A5372C(EnHeishi2* this, PlayState* play) { this->cameraId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->cameraId, CAM_STAT_ACTIVE); - this->unk_280.x = 947.0f; - this->unk_280.y = 1195.0f; - this->unk_280.z = 2682.0f; + this->subCamEye.x = 947.0f; + this->subCamEye.y = 1195.0f; + this->subCamEye.z = 2682.0f; - this->unk_28C.x = 1164.0f; - this->unk_28C.y = 1145.0f; - this->unk_28C.z = 3014.0f; + this->subCamAt.x = 1164.0f; + this->subCamAt.y = 1145.0f; + this->subCamAt.z = 3014.0f; - Play_CameraSetAtEye(play, this->cameraId, &this->unk_280, &this->unk_28C); + Play_CameraSetAtEye(play, this->cameraId, &this->subCamEye, &this->subCamAt); } this->actionFunc = func_80A53850; } @@ -339,7 +339,7 @@ void func_80A53850(EnHeishi2* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (GameInteractor_Should(VB_PLAY_GATE_OPENING_OR_CLOSING_CS, true, this, false)) { - Play_CameraSetAtEye(play, this->cameraId, &this->unk_280, &this->unk_28C); + Play_CameraSetAtEye(play, this->cameraId, &this->subCamEye, &this->subCamAt); } gate = (BgSpot15Saku*)this->gate; if ((this->unk_2F2[0] == 0) || (gate->unk_168 == 0)) { @@ -492,19 +492,19 @@ void func_80A53DF8(EnHeishi2* this, PlayState* play) { this->cameraId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->cameraId, CAM_STAT_ACTIVE); - this->unk_2BC.x = -71.0f; - this->unk_280.x = -71.0f; - this->unk_2BC.y = 571.0f; - this->unk_280.y = 571.0f; - this->unk_2BC.z = -1487.0f; - this->unk_280.z = -1487.0f; - this->unk_298.x = 181.0f; - this->unk_28C.x = 181.0f; - this->unk_298.y = 417.0f; - this->unk_28C.y = 417.0f; - this->unk_298.z = -1079.0f; - this->unk_28C.z = -1079.0f; - Play_CameraSetAtEye(play, this->cameraId, &this->unk_280, &this->unk_28C); + this->subCamEyeInit.x = -71.0f; + this->subCamEye.x = -71.0f; + this->subCamEyeInit.y = 571.0f; + this->subCamEye.y = 571.0f; + this->subCamEyeInit.z = -1487.0f; + this->subCamEye.z = -1487.0f; + this->subCamAtInit.x = 181.0f; + this->subCamAt.x = 181.0f; + this->subCamAtInit.y = 417.0f; + this->subCamAt.y = 417.0f; + this->subCamAtInit.z = -1079.0f; + this->subCamAt.z = -1079.0f; + Play_CameraSetAtEye(play, this->cameraId, &this->subCamEye, &this->subCamAt); } this->actionFunc = func_80A53F30; } @@ -514,7 +514,7 @@ void func_80A53F30(EnHeishi2* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (GameInteractor_Should(VB_PLAY_GATE_OPENING_OR_CLOSING_CS, true, this, false)) { - Play_CameraSetAtEye(play, this->cameraId, &this->unk_280, &this->unk_28C); + Play_CameraSetAtEye(play, this->cameraId, &this->subCamEye, &this->subCamAt); } gate = (BgGateShutter*)this->gate; if ((this->unk_2F2[0] == 0) || (gate->openingState == 0)) { diff --git a/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h b/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h index f88c67314..410cb61a0 100644 --- a/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h +++ b/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h @@ -19,11 +19,11 @@ typedef struct EnHeishi2 { /* 0x0266 */ char unk_266[0x06]; /* 0x026C */ Vec3s unk_26C; // padding inbetween these /* 0x0274 */ Vec3f unk_274; - /* 0x0280 */ Vec3f unk_280; // camera related - /* 0x028C */ Vec3f unk_28C; // camera related - /* 0x0298 */ Vec3f unk_298; // camera related + /* 0x0280 */ Vec3f subCamEye; // camera related + /* 0x028C */ Vec3f subCamAt; // camera related + /* 0x0298 */ Vec3f subCamAtInit; // camera related /* 0x02A4 */ char unk_2A4[0x18]; - /* 0x02BC */ Vec3f unk_2BC; // camera related + /* 0x02BC */ Vec3f subCamEyeInit; // camera related /* 0x02C8 */ char unk_2C8[0x18]; /* 0x02E0 */ f32 unk_2E0; /* 0x02E4 */ f32 unk_2E4; diff --git a/soh/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c b/soh/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c index 0bc173059..2180f71cd 100644 --- a/soh/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c +++ b/soh/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c @@ -268,7 +268,7 @@ void func_80A56900(EnHeishi4* this, PlayState* play) { void func_80A56994(EnHeishi4* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - func_80038290(play, &this->actor, &this->unk_260, &this->unk_266, this->actor.focus.pos); + func_80038290(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos); if ((this->unk_282 == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) { Message_CloseTextbox(play); Flags_SetInfTable(INFTABLE_6C); @@ -393,8 +393,8 @@ void EnHeishi4_Update(Actor* thisx, PlayState* play) { this->interactInfo.trackPos.y = player->actor.world.pos.y - 10.0f; } Npc_TrackPoint(thisx, &this->interactInfo, 2, NPC_TRACKING_FULL_BODY); - this->unk_260 = this->interactInfo.headRot; - this->unk_266 = this->interactInfo.torsoRot; + this->headRot = this->interactInfo.headRot; + this->torsoRot = this->interactInfo.torsoRot; } this->unk_27E += 1; this->actionFunc(this, play); @@ -408,11 +408,11 @@ s32 EnHeishi_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f EnHeishi4* this = (EnHeishi4*)thisx; if (limbIndex == 9) { - rot->x += this->unk_266.y; + rot->x += this->torsoRot.y; } if (limbIndex == 16) { - rot->x += this->unk_260.y; - rot->z += this->unk_260.z; + rot->x += this->headRot.y; + rot->z += this->headRot.z; } return false; } diff --git a/soh/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h b/soh/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h index d7c57d78d..1cc941ab2 100644 --- a/soh/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h +++ b/soh/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h @@ -21,8 +21,8 @@ typedef struct EnHeishi4 { /* 0x0190 */ Vec3s jointTable[17]; /* 0x01F6 */ Vec3s morphTable[17]; /* 0x025C */ EnHeishi4ActionFunc actionFunc; - /* 0x0260 */ Vec3s unk_260; - /* 0x0266 */ Vec3s unk_266; + /* 0x0260 */ Vec3s headRot; + /* 0x0266 */ Vec3s torsoRot; /* 0x026C */ Vec3f pos; /* 0x0278 */ f32 height; /* 0x027C */ s16 unk_27C; diff --git a/soh/src/overlays/actors/ovl_En_Holl/z_en_holl.c b/soh/src/overlays/actors/ovl_En_Holl/z_en_holl.c index 86030a52a..40e0dfbad 100644 --- a/soh/src/overlays/actors/ovl_En_Holl/z_en_holl.c +++ b/soh/src/overlays/actors/ovl_En_Holl/z_en_holl.c @@ -97,7 +97,7 @@ void EnHoll_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->actor, sInitChain); EnHoll_ChooseAction(this); - this->unk_14F = 0; + this->resetBgCoverAlpha = 0; } void EnHoll_Destroy(Actor* thisx, PlayState* play) { @@ -206,13 +206,13 @@ void func_80A591C0(EnHoll* this, PlayState* play) { if (this->actor.room != play->roomCtx.curRoom.num && func_8009728C(play, &play->roomCtx, this->actor.room) != 0) { EnHoll_SetupAction(this, EnHoll_NextAction); - this->unk_14F = 1; + this->resetBgCoverAlpha = 1; player->actor.speedXZ = 0.0f; } } - } else if (this->unk_14F != 0) { + } else if (this->resetBgCoverAlpha != 0) { play->unk_11E18 = 0; - this->unk_14F = 0; + this->resetBgCoverAlpha = 0; } } @@ -235,11 +235,11 @@ void func_80A593A4(EnHoll* this, PlayState* play) { if (this->actor.room != play->roomCtx.curRoom.num && func_8009728C(play, &play->roomCtx, this->actor.room) != 0) { EnHoll_SetupAction(this, EnHoll_NextAction); - this->unk_14F = 1; + this->resetBgCoverAlpha = 1; } } - } else if (this->unk_14F != 0) { - this->unk_14F = 0; + } else if (this->resetBgCoverAlpha != 0) { + this->resetBgCoverAlpha = 0; play->unk_11E18 = 0; } } @@ -273,15 +273,15 @@ void func_80A59618(EnHoll* this, PlayState* play) { s32 transitionActorIdx; if (!Flags_GetSwitch(play, this->actor.params & 0x3F)) { - if (this->unk_14F != 0) { + if (this->resetBgCoverAlpha != 0) { play->unk_11E18 = 0; - this->unk_14F = 0; + this->resetBgCoverAlpha = 0; } } else { Actor_WorldToActorCoords(&this->actor, &vec, &player->actor.world.pos); absZ = fabsf(vec.z); if (PLANE_Y_MIN < vec.y && vec.y < PLANE_Y_MAX && fabsf(vec.x) < PLANE_HALFWIDTH_2 && absZ < 100.0f) { - this->unk_14F = 1; + this->resetBgCoverAlpha = 1; transitionActorIdx = (u16)this->actor.params >> 0xA; play->unk_11E18 = 0xFF - (s32)((absZ - 50.0f) * 5.9f); if (play->unk_11E18 >= 0x100) { @@ -297,9 +297,9 @@ void func_80A59618(EnHoll* this, PlayState* play) { EnHoll_SetupAction(this, EnHoll_NextAction); } } - } else if (this->unk_14F != 0) { + } else if (this->resetBgCoverAlpha != 0) { play->unk_11E18 = 0; - this->unk_14F = 0; + this->resetBgCoverAlpha = 0; } } } @@ -308,7 +308,7 @@ void EnHoll_NextAction(EnHoll* this, PlayState* play) { if (!EnHoll_IsKokiriSetup8() && play->roomCtx.status == 0) { func_80097534(play, &play->roomCtx); if (play->unk_11E18 == 0) { - this->unk_14F = 0; + this->resetBgCoverAlpha = 0; } EnHoll_ChooseAction(this); } diff --git a/soh/src/overlays/actors/ovl_En_Holl/z_en_holl.h b/soh/src/overlays/actors/ovl_En_Holl/z_en_holl.h index 950f7d094..935c39800 100644 --- a/soh/src/overlays/actors/ovl_En_Holl/z_en_holl.h +++ b/soh/src/overlays/actors/ovl_En_Holl/z_en_holl.h @@ -12,7 +12,7 @@ typedef struct EnHoll { /* 0x0000 */ Actor actor; /* 0x014C */ s16 planeAlpha; /* 0x014E */ u8 side; - /* 0x014F */ u8 unk_14F; + /* 0x014F */ u8 resetBgCoverAlpha; /* 0x0150 */ EnHollActionFunc actionFunc; } EnHoll; // size = 0x0154 diff --git a/soh/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c b/soh/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c index fe3ec787a..03aebe1c7 100644 --- a/soh/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c +++ b/soh/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c @@ -231,7 +231,7 @@ s32 EnHorseGameCheck_InitGerudoArchery(EnHorseGameCheckBase* base, PlayState* pl EnHorseGameCheckGerudoArchery* this = (EnHorseGameCheckGerudoArchery*)base; this->base.type = HORSEGAME_GERUDO_ARCHERY; - this->unk_150 = 0; + this->startFlags = 0; this->startTimer = 0; return true; } @@ -261,7 +261,7 @@ s32 EnHorseGameCheck_InitType3(EnHorseGameCheckBase* base, PlayState* play) { EnHorseGameCheck3* this = (EnHorseGameCheck3*)base; this->base.type = HORSEGAME_TYPE3; - this->unk_150 = 0; + this->startFlags = 0; return true; } diff --git a/soh/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.h b/soh/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.h index 3c39cf1ed..9655d2f72 100644 --- a/soh/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.h +++ b/soh/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.h @@ -28,13 +28,13 @@ typedef struct EnHorseGameCheckIngoRace { typedef struct EnHorseGameCheckGerudoArchery { /* 0x0000 */ EnHorseGameCheckBase base; - /* 0x0150 */ s32 unk_150; + /* 0x0150 */ s32 startFlags; /* 0x0154 */ u32 startTimer; } EnHorseGameCheckGerudoArchery; // size = 0x0158 typedef struct EnHorseGameCheck3 { /* 0x0000 */ EnHorseGameCheckBase base; - /* 0x0150 */ s32 unk_150; + /* 0x0150 */ s32 startFlags; } EnHorseGameCheck3; // size = 0x0154 typedef struct EnHorseGameCheckMalonRace { diff --git a/soh/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c b/soh/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c index cddc0a8ee..c002a1fe6 100644 --- a/soh/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c +++ b/soh/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c @@ -116,11 +116,11 @@ void func_80A6D918(EnHorseZelda* this, PlayState* play) { Vec3f sp28; s16 yawDiff; - func_80A6D8D0(D_80A6E240, this->unk_1EC, &sp28); + func_80A6D8D0(D_80A6E240, this->fieldPosIndex, &sp28); if (Math3D_Vec3f_DistXYZ(&sp28, &this->actor.world.pos) <= 400.0f) { - this->unk_1EC++; - if (this->unk_1EC >= 14) { - this->unk_1EC = 0; + this->fieldPosIndex++; + if (this->fieldPosIndex >= 14) { + this->fieldPosIndex = 0; func_80A6D8D0(D_80A6E240, 0, &sp28); } } @@ -140,7 +140,7 @@ void func_80A6D918(EnHorseZelda* this, PlayState* play) { } else { this->actor.speedXZ -= 1.0f; } - } else if (this->actor.speedXZ < D_80A6E240[this->unk_1EC].unk_6) { + } else if (this->actor.speedXZ < D_80A6E240[this->fieldPosIndex].unk_6) { this->actor.speedXZ += 0.5f; } else { this->actor.speedXZ -= 0.5f; @@ -224,8 +224,8 @@ void func_80A6DE38(EnHorseZelda* this, PlayState* play) { pos.x = (Math_SinS(this->actor.shape.rot.y) * 30.0f) + this->actor.world.pos.x; pos.y = this->actor.world.pos.y + 60.0f; pos.z = (Math_CosS(this->actor.shape.rot.y) * 30.0f) + this->actor.world.pos.z; - this->unk_1F4 = BgCheck_EntityRaycastFloor3(&play->colCtx, &poly, &bgId, &pos); - this->actor.shape.rot.x = Math_FAtan2F(this->actor.world.pos.y - this->unk_1F4, 30.0f) * (0x8000 / M_PI); + this->floorYForwards = BgCheck_EntityRaycastFloor3(&play->colCtx, &poly, &bgId, &pos); + this->actor.shape.rot.x = Math_FAtan2F(this->actor.world.pos.y - this->floorYForwards, 30.0f) * (0x8000 / M_PI); } void EnHorseZelda_Update(Actor* thisx, PlayState* play) { diff --git a/soh/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h b/soh/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h index 1db5a54e5..9efb0f95c 100644 --- a/soh/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h +++ b/soh/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h @@ -14,9 +14,9 @@ typedef struct EnHorseZelda { /* 0x0150 */ s32 animationIndex; /* 0x0154 */ Skin skin; /* 0x01E4 */ char unk_1E4[0x8]; - /* 0x01EC */ s32 unk_1EC; + /* 0x01EC */ s32 fieldPosIndex; /* 0x01F0 */ char unk_1F0[0x4]; - /* 0x01F4 */ f32 unk_1F4; + /* 0x01F4 */ f32 floorYForwards; /* 0x01F8 */ char unk_1F8[0x4]; /* 0x01FC */ ColliderCylinder colliderCylinder; /* 0x0248 */ ColliderJntSph colliderSphere; diff --git a/soh/src/overlays/actors/ovl_En_Hy/z_en_hy.c b/soh/src/overlays/actors/ovl_En_Hy/z_en_hy.c index 3d03a129c..85b0dcba9 100644 --- a/soh/src/overlays/actors/ovl_En_Hy/z_en_hy.c +++ b/soh/src/overlays/actors/ovl_En_Hy/z_en_hy.c @@ -432,14 +432,14 @@ u16 func_80A6F810(PlayState* play, Actor* thisx) { switch (this->actor.params & 0x7F) { case ENHY_TYPE_AOB: if (play->sceneNum == SCENE_KAKARIKO_CENTER_GUEST_HOUSE) { - return (this->unk_330 & 0x800) ? 0x508D : ((Flags_GetInfTable(INFTABLE_CB)) ? 0x508C : 0x508B); + return (this->talonEventChkInf & 0x800) ? 0x508D : ((Flags_GetInfTable(INFTABLE_CB)) ? 0x508C : 0x508B); } else if (play->sceneNum == SCENE_MARKET_DAY) { return (gSaveContext.eventInf[3] & 1) ? 0x709B : 0x709C; } else if (gSaveContext.dogIsLost) { s16 followingDog = (gSaveContext.dogParams & 0xF00) >> 8; if (followingDog != 0) { - this->unk_215 = false; + this->playedSfx = false; return ((followingDog == 1) || (CVarGetInteger(CVAR_ENHANCEMENT("AllDogsRichard"), 0))) ? 0x709F : 0x709E; } else { @@ -557,7 +557,8 @@ u16 func_80A6F810(PlayState* play, Actor* thisx) { ? 0x505F : ((Flags_GetInfTable(INFTABLE_163)) ? 0x505E : 0x505D); } else { - return (this->unk_330 & 0x800) ? 0x5062 : ((Flags_GetInfTable(INFTABLE_164)) ? 0x5061 : 0x5060); + return (this->talonEventChkInf & 0x800) ? 0x5062 + : ((Flags_GetInfTable(INFTABLE_164)) ? 0x5061 : 0x5060); } case ENHY_TYPE_BJI_19: return 0x7120; @@ -586,11 +587,11 @@ s16 func_80A70058(PlayState* play, Actor* thisx) { switch (this->actor.textId) { case 0x709E: case 0x709F: - if (!this->unk_215) { + if (!this->playedSfx) { Audio_PlaySoundGeneral(this->actor.textId == 0x709F ? NA_SE_SY_CORRECT_CHIME : NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - this->unk_215 = true; + this->playedSfx = true; } break; case 0x70F0: @@ -941,7 +942,7 @@ void EnHy_InitImpl(EnHy* this, PlayState* play) { } if (play->sceneNum == SCENE_KAKARIKO_CENTER_GUEST_HOUSE) { - this->unk_330 = gSaveContext.eventChkInf[6]; + this->talonEventChkInf = gSaveContext.eventChkInf[6]; } EnHy_InitSetProperties(this); @@ -1024,7 +1025,7 @@ void func_80A711B4(EnHy* this, PlayState* play) { } void func_80A7127C(EnHy* this, PlayState* play) { - func_80034F54(play, this->unk_21C, this->unk_23C, 16); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 16); } void EnHy_DoNothing(EnHy* this, PlayState* play) { @@ -1037,7 +1038,7 @@ void func_80A712C0(EnHy* this, PlayState* play) { this->actionFunc = func_80A7134C; } - func_80034F54(play, this->unk_21C, this->unk_23C, 16); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 16); } void func_80A7134C(EnHy* this, PlayState* play) { @@ -1160,8 +1161,8 @@ s32 EnHy_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } if ((limbIndex == 8) || (limbIndex == 9) || (limbIndex == 12)) { - rot->y += Math_SinS(this->unk_21C[limbIndex]) * 200.0f; - rot->z += Math_CosS(this->unk_23C[limbIndex]) * 200.0f; + rot->y += Math_SinS(this->fidgetTableY[limbIndex]) * 200.0f; + rot->z += Math_CosS(this->fidgetTableZ[limbIndex]) * 200.0f; } CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_En_Hy/z_en_hy.h b/soh/src/overlays/actors/ovl_En_Hy/z_en_hy.h index 7d94a5ca6..cc5d37288 100644 --- a/soh/src/overlays/actors/ovl_En_Hy/z_en_hy.h +++ b/soh/src/overlays/actors/ovl_En_Hy/z_en_hy.h @@ -47,18 +47,18 @@ typedef struct EnHy { /* 0x01E8 */ NpcInteractInfo interactInfo; /* 0x0210 */ Path* path; /* 0x0214 */ s8 waypoint; - /* 0x0215 */ s8 unk_215; + /* 0x0215 */ s8 playedSfx; /* 0x0216 */ char unk_216[2]; // unused /* 0x0218 */ s16 curEyeIndex; /* 0x021A */ s16 nextEyeIndexTimer; - /* 0x021C */ s16 unk_21C[16]; // bodyWiggleY ? - /* 0x023C */ s16 unk_23C[16]; // bodyWiggleZ ? + /* 0x021C */ s16 fidgetTableY[16]; // bodyWiggleY ? + /* 0x023C */ s16 fidgetTableZ[16]; // bodyWiggleZ ? /* 0x025C */ f32 unkRange; /* 0x0260 */ s32 unkGetItemId; /* 0x0264 */ Vec3f modelOffset; /* 0x0270 */ Vec3s jointTable[16]; /* 0x02D0 */ Vec3s morphTable[16]; - /* 0x0330 */ u16 unk_330; + /* 0x0330 */ u16 talonEventChkInf; /* */ GetItemEntry getItemEntry; } EnHy; // size = 0x0334 diff --git a/soh/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/soh/src/overlays/actors/ovl_En_Ik/z_en_ik.c index c4dbe3f3a..425a80a36 100644 --- a/soh/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/soh/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -203,7 +203,7 @@ void func_80A74398(Actor* thisx, PlayState* play) { thisx->colChkInfo.damageTable = &sDamageTable; thisx->colChkInfo.mass = MASS_HEAVY; - this->unk_2FC = 0; + this->isBreakingProp = 0; thisx->colChkInfo.health = 30; thisx->gravity = -1.0f; this->switchFlags = (thisx->params >> 8) & 0xFF; @@ -252,7 +252,7 @@ void func_80A74398(Actor* thisx, PlayState* play) { } s32 func_80A745E4(EnIk* this, PlayState* play) { - if (((this->unk_2FB != 0) || (this->actor.params == 0)) && + if (((this->armorStatusFlag != 0) || (this->actor.params == 0)) && (func_800354B4(play, &this->actor, 100.0f, 0x2710, 0x4000, this->actor.shape.rot.y) != 0) && (play->gameplayFrames & 1)) { func_80A755F0(this); @@ -330,7 +330,7 @@ void func_80A7489C(EnIk* this) { } void func_80A7492C(EnIk* this, PlayState* play) { - s32 phi_a0 = (this->unk_2FB == 0) ? 0xAAA : 0x3FFC; + s32 phi_a0 = (this->armorStatusFlag == 0) ? 0xAAA : 0x3FFC; s16 yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; if ((ABS(yawDiff) <= phi_a0) && (this->actor.xzDistToPlayer < 100.0f) && @@ -351,7 +351,7 @@ void func_80A7492C(EnIk* this, PlayState* play) { void func_80A74AAC(EnIk* this) { this->unk_2F8 = 5; - if (this->unk_2FB == 0) { + if (this->armorStatusFlag == 0) { Animation_Change(&this->skelAnime, &gIronKnuckleWalkAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gIronKnuckleWalkAnim), ANIMMODE_LOOP, -4.0f); this->actor.speedXZ = 0.9f; @@ -373,7 +373,7 @@ void func_80A74BA4(EnIk* this, PlayState* play) { s16 sp2E; s16 phi_a3; - if (this->unk_2FB == 0) { + if (this->armorStatusFlag == 0) { temp_t0 = 0xAAA; phi_a3 = 0x320; sp30 = 0; @@ -404,7 +404,7 @@ void func_80A74BA4(EnIk* this, PlayState* play) { } if (func_80A74674(play, &this->actor) != NULL) { func_80A751C8(this); - this->unk_2FC = 1; + this->isBreakingProp = 1; } else { temp_t0 = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; if (ABS(temp_t0) > 0x4000) { @@ -451,7 +451,7 @@ void func_80A74EBC(EnIk* this, PlayState* play) { if ((this->skelAnime.curFrame > 17.0f) && (this->skelAnime.curFrame < 23.0f)) { this->unk_2FE = 1; } else { - if ((this->unk_2FB != 0) && (this->skelAnime.curFrame < 10.0f)) { + if ((this->armorStatusFlag != 0) && (this->skelAnime.curFrame < 10.0f)) { Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0x5DC, 0); this->actor.shape.rot.y = this->actor.world.rot.y; } @@ -467,7 +467,7 @@ void func_80A7506C(EnIk* this) { f32 frames = Animation_GetLastFrame(&gIronKnuckleAxeStuckAnim); this->unk_2FE = 0; - this->unk_2F9 = (s8)frames; + this->animationTimer = (s8)frames; this->unk_2F8 = 7; this->unk_2FF = this->unk_2FE; Animation_Change(&this->skelAnime, &gIronKnuckleAxeStuckAnim, 1.0f, 0.0f, frames, ANIMMODE_LOOP, -4.0f); @@ -478,7 +478,7 @@ void func_80A7506C(EnIk* this) { void func_80A7510C(EnIk* this, PlayState* play) { f32 frames; - if (SkelAnime_Update(&this->skelAnime) || (--this->unk_2F9 == 0)) { + if (SkelAnime_Update(&this->skelAnime) || (--this->animationTimer == 0)) { if (this->unk_2F8 == 8) { func_80A7489C(this); } else { @@ -499,7 +499,7 @@ void func_80A751C8(EnIk* this) { this->actor.speedXZ = 0.0f; Animation_Change(&this->skelAnime, &gIronKnuckleHorizontalAttackAnim, 0.0f, 0.0f, frames, ANIMMODE_ONCE_INTERP, -6.0f); - this->unk_2FC = 0; + this->isBreakingProp = 0; EnIk_SetupAction(this, func_80A75260); } @@ -515,7 +515,7 @@ void func_80A75260(EnIk* this, PlayState* play) { } if (((this->skelAnime.curFrame > 1.0f) && (this->skelAnime.curFrame < 9.0f)) || ((this->skelAnime.curFrame > 13.0f) && (this->skelAnime.curFrame < 18.0f))) { - if ((this->unk_2FC == 0) && (this->unk_2FB != 0) && (this->skelAnime.curFrame < 10.0f)) { + if ((this->isBreakingProp == 0) && (this->armorStatusFlag != 0) && (this->skelAnime.curFrame < 10.0f)) { Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0x5DC, 0); this->actor.shape.rot.y = this->actor.world.rot.y; } @@ -644,7 +644,7 @@ void func_80A7598C(EnIk* this) { this->unk_2F8 = 2; this->actor.speedXZ = 0.0f; Animation_Change(&this->skelAnime, &gIronKnuckleDeathAnim, 1.0f, 0.0f, frames, ANIMMODE_ONCE, -4.0f); - this->unk_2F9 = 0x18; + this->animationTimer = 0x18; Audio_PlayActorSound2(&this->actor, NA_SE_EN_IRONNACK_DEAD); Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_CUTBODY); EnIk_SetupAction(this, func_80A75A38); @@ -653,20 +653,20 @@ void func_80A7598C(EnIk* this) { void func_80A75A38(EnIk* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { - if ((this->actor.colChkInfo.health == 0) && (this->unk_2F9 != 0)) { + if ((this->actor.colChkInfo.health == 0) && (this->animationTimer != 0)) { s32 i; Vec3f pos; Vec3f sp7C = { 0.0f, 0.5f, 0.0f }; - this->unk_2F9--; + this->animationTimer--; - for (i = 0xC - (this->unk_2F9 >> 1); i >= 0; i--) { + for (i = 0xC - (this->animationTimer >> 1); i >= 0; i--) { pos.x = this->actor.world.pos.x + Rand_CenteredFloat(120.0f); pos.z = this->actor.world.pos.z + Rand_CenteredFloat(120.0f); pos.y = this->actor.world.pos.y + 20.0f + Rand_CenteredFloat(50.0f); EffectSsDeadDb_Spawn(play, &pos, &sp7C, &sp7C, 100, 0, 255, 255, 255, 255, 0, 0, 255, 1, 9, true); } - if (this->unk_2F9 == 0) { + if (this->animationTimer == 0) { Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xB0); // Don't set flag when Enemy Rando or CrowdControl are on. // Instead Iron Knuckles rely on the "clear room" flag. @@ -709,11 +709,12 @@ void func_80A75C38(EnIk* this, PlayState* play) { sp38.y += 50.0f; Actor_SetDropFlag(&this->actor, &this->bodyCollider.info, 1); temp_v0_3 = this->actor.colChkInfo.damageEffect; - this->unk_2FD = temp_v0_3 & 0xFF; + this->damageReaction = temp_v0_3 & 0xFF; this->bodyCollider.base.acFlags &= ~AC_HIT; - if ((this->unk_2FD == 0) || (this->unk_2FD == 0xD) || ((this->unk_2FB == 0) && (this->unk_2FD == 0xE))) { - if (this->unk_2FD != 0) { + if ((this->damageReaction == 0) || (this->damageReaction == 0xD) || + ((this->armorStatusFlag == 0) && (this->damageReaction == 0xE))) { + if (this->damageReaction != 0) { CollisionCheck_SpawnShieldParticlesMetal(play, &sp38); } return; @@ -723,7 +724,7 @@ void func_80A75C38(EnIk* this, PlayState* play) { Actor_ApplyDamage(&this->actor); if (this->actor.params != 0) { if ((prevHealth > 10) && (this->actor.colChkInfo.health <= 10)) { - this->unk_2FB = 1; + this->armorStatusFlag = 1; BodyBreak_Alloc(&this->bodyBreak, 3, play); } } else if (this->actor.colChkInfo.health <= 10) { @@ -748,7 +749,7 @@ void func_80A75C38(EnIk* this, PlayState* play) { func_80A754A0(this); } } - if ((this->actor.params != 0) && (this->unk_2FB != 0)) { + if ((this->actor.params != 0) && (this->armorStatusFlag != 0)) { if ((prevHealth > 10) && (this->actor.colChkInfo.health <= 10)) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_IRONNACK_ARMOR_OFF_DEMO); } else { @@ -769,7 +770,7 @@ void func_80A75FA0(Actor* thisx, PlayState* play) { Player* player = GET_PLAYER(play); u8 prevInvincibilityTimer; - this->unk_2FA = this->unk_2FB; + this->drawArmorFlag = this->armorStatusFlag; func_80A75C38(this, play); if ((this->actor.params == 0) && (this->actor.colChkInfo.health <= 10)) { func_80A781CC(&this->actor, play); @@ -842,11 +843,11 @@ s32 EnIk_OverrideLimbDraw3(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p *dList = gIronKnuckleGerudoHeadDL; } } else if ((limbIndex == 26) || (limbIndex == 27)) { - if ((this->unk_2FA & 1)) { + if ((this->drawArmorFlag & 1)) { *dList = NULL; } } else if ((limbIndex == 28) || (limbIndex == 29)) { - if (!(this->unk_2FA & 1)) { + if (!(this->drawArmorFlag & 1)) { *dList = NULL; } } @@ -882,7 +883,7 @@ void EnIk_PostLimbDraw3(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, OPEN_DISPS(play->state.gfxCtx); - if (this->unk_2FB & 1) { + if (this->armorStatusFlag & 1) { BodyBreak_SetInfo(&this->bodyBreak, limbIndex, 26, 27, 28, dList, BODYBREAK_OBJECT_DEFAULT); } if (limbIndex == 12) { @@ -932,14 +933,14 @@ void EnIk_PostLimbDraw3(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, gSPDisplayList(POLY_XLU_DISP++, object_ik_DL_016EE8); break; case 26: - if (!(this->unk_2FA & 1)) { + if (!(this->drawArmorFlag & 1)) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gIronKnuckleArmorRivetAndSymbolDL); } break; case 27: - if (!(this->unk_2FA & 1)) { + if (!(this->drawArmorFlag & 1)) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, object_ik_DL_016CD8); @@ -1022,7 +1023,7 @@ void func_80A76E2C(EnIk* this, PlayState* play, Vec3f* pos) { { 900.0, -800.0, 2700.0 }, { 720.0f, 900.0f, 2500.0f }, }; - if (this->unk_4D4 == 0) { + if (this->isAxeSummoned == 0) { s32 pad; Vec3f effectVelocity = { 0.0f, 0.0f, 0.0f }; Vec3f effectAccel = { 0.0f, 0.3f, 0.0f }; @@ -1046,7 +1047,7 @@ void func_80A76E2C(EnIk* this, PlayState* play, Vec3f* pos) { (Rand_ZeroOne() * 60.0f) + 300.0f, 0); } - this->unk_4D4 = 1; + this->isAxeSummoned = 1; func_80A76DDC(this, play, pos); } } @@ -1104,7 +1105,7 @@ void func_80A771E4(EnIk* this) { Animation_GetLastFrame(&gIronKnuckleNabooruSummonAxeAnim), ANIMMODE_ONCE, 0.0f); this->action = 2; this->drawMode = 1; - this->unk_4D4 = 0; + this->isAxeSummoned = 0; this->actor.shape.shadowAlpha = 0xFF; } diff --git a/soh/src/overlays/actors/ovl_En_Ik/z_en_ik.h b/soh/src/overlays/actors/ovl_En_Ik/z_en_ik.h index a77db20b0..9ae5437b3 100644 --- a/soh/src/overlays/actors/ovl_En_Ik/z_en_ik.h +++ b/soh/src/overlays/actors/ovl_En_Ik/z_en_ik.h @@ -14,11 +14,11 @@ typedef struct EnIk { /* 0x0190 */ Vec3s jointTable[30]; /* 0x0244 */ Vec3s morphTable[30]; /* 0x02F8 */ u8 unk_2F8; - /* 0x02F9 */ u8 unk_2F9; - /* 0x02FA */ u8 unk_2FA; - /* 0x02FB */ u8 unk_2FB; - /* 0x02FC */ u8 unk_2FC; - /* 0x02FD */ u8 unk_2FD; + /* 0x02F9 */ u8 animationTimer; + /* 0x02FA */ u8 drawArmorFlag; + /* 0x02FB */ u8 armorStatusFlag; + /* 0x02FC */ u8 isBreakingProp; + /* 0x02FD */ u8 damageReaction; /* 0x02FE */ s8 unk_2FE; /* 0x02FF */ s8 unk_2FF; /* 0x0300 */ s16 unk_300; @@ -33,7 +33,7 @@ typedef struct EnIk { /* 0x04C8 */ s32 action; /* 0x04CC */ s32 drawMode; /* 0x04D0 */ u32 npcAction; - /* 0x04D4 */ s32 unk_4D4; + /* 0x04D4 */ s32 isAxeSummoned; /* 0x04D8 */ char unk_4D8[0x04]; } EnIk; // size = 0x04DC diff --git a/soh/src/overlays/actors/ovl_En_In/z_en_in.c b/soh/src/overlays/actors/ovl_En_In/z_en_in.c index 977752596..236cec2f9 100644 --- a/soh/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/soh/src/overlays/actors/ovl_En_In/z_en_in.c @@ -771,21 +771,21 @@ void func_80A7AA40(EnIn* this, PlayState* play) { Play_ChangeCameraStatus(play, this->activeCamId, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->camId, CAM_STAT_ACTIVE); - this->unk_2F0 = 0.0f; + this->subCamAtOffset = 0.0f; this->unk_2F4 = 50.0f; this->unk_2F8 = 0.0f; - this->unk_2FC = 0.0f; + this->subCamEyeOffset = 0.0f; this->unk_300 = 50.0f; this->unk_304 = 50.0f; sp30 = this->actor.world.pos; sp24 = this->actor.world.pos; - sp30.x += this->unk_2F0; + sp30.x += this->subCamAtOffset; sp30.y += this->unk_2F4; sp30.z += this->unk_2F8; - sp24.x += this->unk_2FC; + sp24.x += this->subCamEyeOffset; sp24.y += this->unk_300; sp24.z += this->unk_304; @@ -837,20 +837,20 @@ void func_80A7ABD4(EnIn* this, PlayState* play) { if (play->csCtx.frames == 44) { Audio_PlayActorSound2(&this->actor, NA_SE_EV_RONRON_DOOR_CLOSE); } - Math_SmoothStepToF(&this->unk_2F0, 0.0f, 0.06f, 10000.0f, 0.0f); + Math_SmoothStepToF(&this->subCamAtOffset, 0.0f, 0.06f, 10000.0f, 0.0f); Math_SmoothStepToF(&this->unk_2F4, 50.0f, 0.06f, 10000.0f, 0.0f); Math_SmoothStepToF(&this->unk_2F8, 0.0f, 0.06f, 10000.0f, 0.0f); - Math_SmoothStepToF(&this->unk_2FC, 0.0f, 0.06f, 10000.0f, 0.0f); + Math_SmoothStepToF(&this->subCamEyeOffset, 0.0f, 0.06f, 10000.0f, 0.0f); Math_SmoothStepToF(&this->unk_300, 150.0f, 0.06f, 10000.0f, 0.0f); Math_SmoothStepToF(&this->unk_304, 300.0f, 0.06f, 10000.0f, 0.0f); sp48 = this->actor.world.pos; sp3C = this->actor.world.pos; - sp48.x += this->unk_2F0; + sp48.x += this->subCamAtOffset; sp48.y += this->unk_2F4; sp48.z += this->unk_2F8; - sp3C.x += this->unk_2FC; + sp3C.x += this->subCamEyeOffset; sp3C.y += this->unk_300; sp3C.z += this->unk_304; Play_CameraSetAtEye(play, this->camId, &sp48, &sp3C); diff --git a/soh/src/overlays/actors/ovl_En_In/z_en_in.h b/soh/src/overlays/actors/ovl_En_In/z_en_in.h index e926a00ee..36f1310d6 100644 --- a/soh/src/overlays/actors/ovl_En_In/z_en_in.h +++ b/soh/src/overlays/actors/ovl_En_In/z_en_in.h @@ -52,10 +52,10 @@ typedef struct EnIn { /* 0x01FC */ s16 unk_1FC; /* 0x01FE */ Vec3s jointTable[INGO_LIMB_MAX]; /* 0x0276 */ Vec3s morphTable[INGO_LIMB_MAX]; - /* 0x02F0 */ f32 unk_2F0; + /* 0x02F0 */ f32 subCamAtOffset; /* 0x02F4 */ f32 unk_2F4; /* 0x02F8 */ f32 unk_2F8; - /* 0x02FC */ f32 unk_2FC; + /* 0x02FC */ f32 subCamEyeOffset; /* 0x0300 */ f32 unk_300; /* 0x0304 */ f32 unk_304; /* 0x0308 */ NpcInteractInfo interactInfo; diff --git a/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c index 820ce13c5..46199e841 100644 --- a/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -87,7 +87,7 @@ static InitChainEntry sInitChain[] = { }; void func_80A7BE20(EnInsect* this) { - this->unk_314 = D_80A7DF10[this->actor.params & 3]; + this->insectFlags = D_80A7DF10[this->actor.params & 3]; } f32 EnInsect_XZDistanceSquared(Vec3f* v1, Vec3f* v2) { @@ -152,16 +152,16 @@ s32 EnInsect_FoundNearbySoil(EnInsect* this, PlayState* play) { } void func_80A7C058(EnInsect* this) { - if (this->unk_31E > 0) { - this->unk_31E--; + if (this->crawlSoundDelay > 0) { + this->crawlSoundDelay--; return; } Audio_PlayActorSound2(&this->actor, NA_SE_EN_MUSI_WALK); - this->unk_31E = 3.0f / CLAMP_MIN(this->skelAnime.playSpeed, 0.1f); - if (this->unk_31E < 2) { - this->unk_31E = 2; + this->crawlSoundDelay = 3.0f / CLAMP_MIN(this->skelAnime.playSpeed, 0.1f); + if (this->crawlSoundDelay < 2) { + this->crawlSoundDelay = 2; } } @@ -183,19 +183,19 @@ void EnInsect_Init(Actor* thisx, PlayState* play2) { this->actor.colChkInfo.mass = 30; - if (this->unk_314 & 1) { + if (this->insectFlags & 1) { this->actor.gravity = -0.2f; this->actor.minVelocityY = -2.0f; } - if (this->unk_314 & 4) { - this->unk_31C = Rand_S16Offset(200, 40); + if (this->insectFlags & 4) { + this->lifeTimer = Rand_S16Offset(200, 40); this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED; } if (temp_s2 == 2 || temp_s2 == 3) { if (EnInsect_FoundNearbySoil(this, play)) { - this->unk_314 |= 0x10; + this->insectFlags |= 0x10; D_80A7DEB0 = 0.0f; } @@ -215,7 +215,7 @@ void EnInsect_Init(Actor* thisx, PlayState* play2) { // For bugs that aren't linked to a soil patch, we remove the "short lived" flag to prevent them from despawning // And exit early to not increment the "bugs dropped count" if (CVarGetInteger(CVAR_CHEAT("NoBugsDespawn"), 0) && this->soilActor == NULL) { - this->unk_314 &= ~4; + this->insectFlags &= ~4; return; } @@ -247,10 +247,10 @@ void EnInsect_Destroy(Actor* thisx, PlayState* play) { } void func_80A7C3A0(EnInsect* this) { - this->unk_31A = Rand_S16Offset(5, 35); + this->actionTimer = Rand_S16Offset(5, 35); func_80A7BF58(this); this->actionFunc = func_80A7C3F4; - this->unk_314 |= 0x100; + this->insectFlags |= 0x100; } void func_80A7C3F4(EnInsect* this, PlayState* play) { @@ -267,14 +267,14 @@ void func_80A7C3F4(EnInsect* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); this->actor.shape.rot.y = this->actor.world.rot.y; - if (this->unk_31A <= 0) { + if (this->actionTimer <= 0) { func_80A7C598(this); } - if (((this->unk_314 & 4) && this->unk_31C <= 0) || - ((sp2E == 2 || sp2E == 3) && (this->unk_314 & 1) && (this->actor.bgCheckFlags & 1) && D_80A7DEB8 >= 4)) { + if (((this->insectFlags & 4) && this->lifeTimer <= 0) || + ((sp2E == 2 || sp2E == 3) && (this->insectFlags & 1) && (this->actor.bgCheckFlags & 1) && D_80A7DEB8 >= 4)) { func_80A7CBC8(this); - } else if ((this->unk_314 & 1) && (this->actor.bgCheckFlags & 0x40)) { + } else if ((this->insectFlags & 1) && (this->actor.bgCheckFlags & 0x40)) { func_80A7CE60(this); } else if (this->actor.xzDistToPlayer < 40.0f) { func_80A7C818(this); @@ -282,10 +282,10 @@ void func_80A7C3F4(EnInsect* this, PlayState* play) { } void func_80A7C598(EnInsect* this) { - this->unk_31A = Rand_S16Offset(10, 45); + this->actionTimer = Rand_S16Offset(10, 45); func_80A7BF58(this); this->actionFunc = func_80A7C5EC; - this->unk_314 |= 0x100; + this->insectFlags |= 0x100; } void func_80A7C5EC(EnInsect* this, PlayState* play) { @@ -296,7 +296,8 @@ void func_80A7C5EC(EnInsect* this, PlayState* play) { Math_SmoothStepToF(&this->actor.speedXZ, 1.5f, 0.1f, 0.5f, 0.0f); - if (EnInsect_XZDistanceSquared(&this->actor.world.pos, &this->actor.home.pos) > 1600.0f || (this->unk_31A < 4)) { + if (EnInsect_XZDistanceSquared(&this->actor.world.pos, &this->actor.home.pos) > 1600.0f || + (this->actionTimer < 4)) { yaw = Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos); Math_ScaledStepToS(&this->actor.world.rot.y, yaw, 2000); } else if (this->actor.child != NULL && &this->actor != this->actor.child) { @@ -309,14 +310,14 @@ void func_80A7C5EC(EnInsect* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (this->unk_31A <= 0) { + if (this->actionTimer <= 0) { func_80A7C3A0(this); } - if (((this->unk_314 & 4) && this->unk_31C <= 0) || - ((sp34 == 2 || sp34 == 3) && (this->unk_314 & 1) && (this->actor.bgCheckFlags & 1) && D_80A7DEB8 >= 4)) { + if (((this->insectFlags & 4) && this->lifeTimer <= 0) || + ((sp34 == 2 || sp34 == 3) && (this->insectFlags & 1) && (this->actor.bgCheckFlags & 1) && D_80A7DEB8 >= 4)) { func_80A7CBC8(this); - } else if ((this->unk_314 & 1) && (this->actor.bgCheckFlags & 0x40)) { + } else if ((this->insectFlags & 1) && (this->actor.bgCheckFlags & 0x40)) { func_80A7CE60(this); } else if (this->actor.xzDistToPlayer < 40.0f) { func_80A7C818(this); @@ -324,10 +325,10 @@ void func_80A7C5EC(EnInsect* this, PlayState* play) { } void func_80A7C818(EnInsect* this) { - this->unk_31A = Rand_S16Offset(10, 40); + this->actionTimer = Rand_S16Offset(10, 40); func_80A7BF58(this); this->actionFunc = func_80A7C86C; - this->unk_314 |= 0x100; + this->insectFlags |= 0x100; } void func_80A7C86C(EnInsect* this, PlayState* play) { @@ -340,7 +341,7 @@ void func_80A7C86C(EnInsect* this, PlayState* play) { Math_SmoothStepToF(&this->actor.speedXZ, 1.8f, 0.1f, 0.5f, 0.0f); - if (EnInsect_XZDistanceSquared(&this->actor.world.pos, &this->actor.home.pos) > 25600.0f || this->unk_31A < 4) { + if (EnInsect_XZDistanceSquared(&this->actor.world.pos, &this->actor.home.pos) > 25600.0f || this->actionTimer < 4) { yaw = Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos); Math_ScaledStepToS(&this->actor.world.rot.y, yaw, 2000); } else if (sp38 != 0) { @@ -363,15 +364,15 @@ void func_80A7C86C(EnInsect* this, PlayState* play) { this->skelAnime.playSpeed = CLAMP(this->actor.speedXZ * 1.6f, 0.8f, 1.9f); SkelAnime_Update(&this->skelAnime); - if (this->unk_31A <= 0 || !sp38) { + if (this->actionTimer <= 0 || !sp38) { func_80A7C3A0(this); - } else if ((this->unk_314 & 1) && (this->actor.bgCheckFlags & 0x40)) { + } else if ((this->insectFlags & 1) && (this->actor.bgCheckFlags & 0x40)) { func_80A7CE60(this); } } void func_80A7CA64(EnInsect* this) { - this->unk_31A = 200; + this->actionTimer = 200; Actor_SetScale(&this->actor, 0.001f); @@ -382,34 +383,34 @@ void func_80A7CA64(EnInsect* this) { this->skelAnime.playSpeed = 0.3f; this->actionFunc = func_80A7CAD0; - this->unk_314 &= ~0x100; + this->insectFlags &= ~0x100; } void func_80A7CAD0(EnInsect* this, PlayState* play) { - if (this->unk_31A == 20 && !(this->unk_314 & 4)) { + if (this->actionTimer == 20 && !(this->insectFlags & 4)) { this->actor.draw = EnInsect_Draw; - } else if (this->unk_31A == 0) { - if (this->unk_314 & 4) { + } else if (this->actionTimer == 0) { + if (this->insectFlags & 4) { Actor_Kill(&this->actor); } else { Actor_SetScale(&this->actor, 0.01f); func_80A7C3A0(this); } - } else if (this->unk_31A < 20) { + } else if (this->actionTimer < 20) { Actor_SetScale(&this->actor, CLAMP_MAX(this->actor.scale.x + 0.001f, 0.01f)); SkelAnime_Update(&this->skelAnime); } } void func_80A7CBC8(EnInsect* this) { - this->unk_31A = 60; + this->actionTimer = 60; func_80A7BF58(this); this->skelAnime.playSpeed = 1.9f; Audio_PlayActorSound2(&this->actor, NA_SE_EN_MUSI_SINK); Math_Vec3f_Copy(&this->actor.home.pos, &this->actor.world.pos); this->actionFunc = func_80A7CC3C; - this->unk_314 &= ~0x100; - this->unk_314 |= 0x8; + this->insectFlags &= ~0x100; + this->insectFlags |= 0x8; } void func_80A7CC3C(EnInsect* this, PlayState* play) { @@ -429,7 +430,7 @@ void func_80A7CC3C(EnInsect* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (this->unk_31A > 20 && Rand_ZeroOne() < 0.1f) { + if (this->actionTimer > 20 && Rand_ZeroOne() < 0.1f) { velocity.x = Math_SinS(this->actor.shape.rot.y) * -0.6f; velocity.y = Math_SinS(this->actor.shape.rot.x) * 0.6f; velocity.z = Math_CosS(this->actor.shape.rot.y) * -0.6f; @@ -437,8 +438,8 @@ void func_80A7CC3C(EnInsect* this, PlayState* play) { Rand_ZeroOne() * 5.0f + 8.0f); } - if (this->unk_31A <= 0) { - if ((this->unk_314 & 0x10) && this->soilActor != NULL && + if (this->actionTimer <= 0) { + if ((this->insectFlags & 0x10) && this->soilActor != NULL && Math3D_Vec3fDistSq(&this->soilActor->actor.world.pos, &this->actor.world.pos) < 64.0f) { this->soilActor->unk_152 = 1; } @@ -447,11 +448,11 @@ void func_80A7CC3C(EnInsect* this, PlayState* play) { } void func_80A7CE60(EnInsect* this) { - this->unk_31A = Rand_S16Offset(120, 50); + this->actionTimer = Rand_S16Offset(120, 50); func_80A7BF58(this); this->unk_316 = this->unk_318 = 0; this->actionFunc = func_80A7CEC0; - this->unk_314 &= ~0x100; + this->insectFlags &= ~0x100; } void func_80A7CEC0(EnInsect* this, PlayState* play) { @@ -465,18 +466,18 @@ void func_80A7CEC0(EnInsect* this, PlayState* play) { sp4E = this->actor.params & 3; - if (this->unk_31A >= 81) { + if (this->actionTimer >= 81) { Math_StepToF(&this->actor.speedXZ, 0.6f, 0.08f); } else { Math_StepToF(&this->actor.speedXZ, 0.0f, 0.02f); } this->actor.velocity.y = 0.0f; this->actor.world.pos.y += this->actor.yDistToWater; - this->skelAnime.playSpeed = CLAMP(this->unk_31A * 0.018f, 0.1f, 1.9f); + this->skelAnime.playSpeed = CLAMP(this->actionTimer * 0.018f, 0.1f, 1.9f); SkelAnime_Update(&this->skelAnime); - if (this->unk_31A >= 81) { + if (this->actionTimer >= 81) { this->unk_316 += Rand_S16Offset(-50, 100); this->unk_318 += Rand_S16Offset(-300, 600); } @@ -519,11 +520,11 @@ void func_80A7CEC0(EnInsect* this, PlayState* play) { EffectSsGRipple_Spawn(play, &sp40, 40, 200, 8); } - if (this->unk_31A <= 0 || ((this->unk_314 & 4) && this->unk_31C <= 0) || - ((sp4E == 2 || sp4E == 3) && (this->unk_314 & 1) && D_80A7DEB8 >= 4)) { + if (this->actionTimer <= 0 || ((this->insectFlags & 4) && this->lifeTimer <= 0) || + ((sp4E == 2 || sp4E == 3) && (this->insectFlags & 1) && D_80A7DEB8 >= 4)) { func_80A7D1F4(this); } else if (!(this->actor.bgCheckFlags & 0x40)) { - if (this->unk_314 & 0x10) { + if (this->insectFlags & 0x10) { func_80A7D39C(this); } else { func_80A7C3A0(this); @@ -532,16 +533,16 @@ void func_80A7CEC0(EnInsect* this, PlayState* play) { } void func_80A7D1F4(EnInsect* this) { - this->unk_31A = 100; + this->actionTimer = 100; func_80A7BF58(this); this->actor.velocity.y = 0.0f; this->actor.speedXZ = 0.0f; this->actor.minVelocityY = -0.8f; this->actor.gravity = -0.04f; - this->unk_314 &= ~0x3; + this->insectFlags &= ~0x3; this->actionFunc = func_80A7D26C; - this->unk_314 &= ~0x100; - this->unk_314 |= 8; + this->insectFlags &= ~0x100; + this->insectFlags |= 8; } void func_80A7D26C(EnInsect* this, PlayState* play) { @@ -553,21 +554,21 @@ void func_80A7D26C(EnInsect* this, PlayState* play) { EffectSsBubble_Spawn(play, &this->actor.world.pos, -5.0f, 5.0f, 5.0f, (Rand_ZeroOne() * 0.04f) + 0.02f); } - if (this->unk_31A <= 0) { + if (this->actionTimer <= 0) { Actor_Kill(&this->actor); } } void func_80A7D39C(EnInsect* this) { func_80A7BF58(this); - this->unk_31A = 100; + this->actionTimer = 100; this->unk_324 = 1.5f; this->unk_328 = Rand_ZeroOne() * (0xFFFF + 0.5f); this->unk_316 = (Rand_ZeroOne() - 0.5f) * 1500.0f; this->actor.world.rot.y = Rand_ZeroOne() * (0xFFFF + 0.5f); Actor_SetScale(&this->actor, 0.003f); this->actionFunc = func_80A7D460; - this->unk_314 |= 0x100; + this->insectFlags |= 0x100; } void func_80A7D460(EnInsect* this, PlayState* play) { @@ -588,7 +589,7 @@ void func_80A7D460(EnInsect* this, PlayState* play) { if (this->soilActor != NULL) { sp40 = Math3D_Vec3fDistSq(&this->actor.world.pos, &this->soilActor->actor.world.pos); } else { - if (this->unk_314 & 0x10) { + if (this->insectFlags & 0x10) { osSyncPrintf(VT_COL(YELLOW, BLACK)); // "warning: target Actor is NULL" osSyncPrintf("warning:目標 Actor が NULL (%s %d)\n", __FILE__, __LINE__); @@ -674,12 +675,12 @@ void func_80A7D460(EnInsect* this, PlayState* play) { } SkelAnime_Update(&this->skelAnime); - if (!(this->unk_314 & 0x40) && (this->unk_314 & 1) && (this->actor.bgCheckFlags & 1)) { + if (!(this->insectFlags & 0x40) && (this->insectFlags & 1) && (this->actor.bgCheckFlags & 1)) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_MUSI_LAND); - this->unk_314 |= 0x40; + this->insectFlags |= 0x40; } - if (sp3A == 2 && (this->unk_314 & 0x10) && !(this->unk_314 & 0x80)) { + if (sp3A == 2 && (this->insectFlags & 0x10) && !(this->insectFlags & 0x80)) { if (this->unk_32A >= 15) { if (this->soilActor != NULL) { if (!(GET_GS_FLAGS(((this->soilActor->actor.params >> 8) & 0x1F) - 1) & @@ -687,32 +688,32 @@ void func_80A7D460(EnInsect* this, PlayState* play) { Sfx_PlaySfxCentered(NA_SE_SY_TRE_BOX_APPEAR); } } - this->unk_314 |= 0x80; + this->insectFlags |= 0x80; } else { this->unk_32A++; } } - if ((this->unk_314 & 1) && (this->actor.bgCheckFlags & 0x40)) { + if ((this->insectFlags & 1) && (this->actor.bgCheckFlags & 0x40)) { func_80A7CE60(this); - } else if (this->unk_314 & 0x10) { + } else if (this->insectFlags & 0x10) { if (sp40 < 9.0f) { func_80A7CBC8(this); - } else if (this->unk_31A <= 0 || this->unk_31C <= 0 || - ((this->unk_314 & 1) && (this->actor.bgCheckFlags & 1) && D_80A7DEB8 >= 4 && + } else if (this->actionTimer <= 0 || this->lifeTimer <= 0 || + ((this->insectFlags & 1) && (this->actor.bgCheckFlags & 1) && D_80A7DEB8 >= 4 && (sp3A == 2 || sp3A == 3))) { func_80A7CBC8(this); } else { if (sp40 < 900.0f) { - this->unk_31C++; - this->unk_314 |= 0x20; + this->lifeTimer++; + this->insectFlags |= 0x20; } else { - this->unk_31A = 100; + this->actionTimer = 100; } } } else if (sp50 != 0) { func_80A7C3A0(this); - } else if ((sp3A == 2 || sp3A == 3) && (this->unk_314 & 1) && this->unk_31C <= 0 && this->unk_31A <= 0 && + } else if ((sp3A == 2 || sp3A == 3) && (this->insectFlags & 1) && this->lifeTimer <= 0 && this->actionTimer <= 0 && this->actor.floorHeight < BGCHECK_Y_MIN + 10.0f) { osSyncPrintf(VT_COL(YELLOW, BLACK)); // "BG missing? To do Actor_delete" @@ -734,20 +735,20 @@ void EnInsect_Update(Actor* thisx, PlayState* play) { } } - if (this->unk_31A > 0) { - this->unk_31A--; + if (this->actionTimer > 0) { + this->actionTimer--; } - if (this->unk_31C > 0) { - this->unk_31C--; + if (this->lifeTimer > 0) { + this->lifeTimer--; } this->actionFunc(this, play); if (this->actor.update != NULL) { Actor_MoveXZGravity(&this->actor); - if (this->unk_314 & 0x100) { - if (this->unk_314 & 1) { + if (this->insectFlags & 0x100) { + if (this->insectFlags & 1) { if (this->actor.bgCheckFlags & 1) { func_80A7C058(this); } @@ -758,11 +759,11 @@ void EnInsect_Update(Actor* thisx, PlayState* play) { phi_v0 = 0; - if (this->unk_314 & 1) { + if (this->insectFlags & 1) { phi_v0 = 4; } - if (this->unk_314 & 2) { + if (this->insectFlags & 2) { phi_v0 |= 1; } @@ -781,11 +782,11 @@ void EnInsect_Update(Actor* thisx, PlayState* play) { func_80A7CA64(this); } } else if (this->actor.xzDistToPlayer < 50.0f && this->actionFunc != func_80A7CAD0) { - if (!(this->unk_314 & 0x20) && this->unk_31C < 180) { + if (!(this->insectFlags & 0x20) && this->lifeTimer < 180) { CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); } - if (!(this->unk_314 & 8) && D_80A7DEB4 < 4 && EnInsect_InBottleRange(this, play) && + if (!(this->insectFlags & 8) && D_80A7DEB4 < 4 && EnInsect_InBottleRange(this, play) && // GI_MAX in this case allows the player to catch the actor in a bottle Actor_OfferGetItem(&this->actor, play, GI_MAX, 60.0f, 30.0f)) { D_80A7DEB4++; diff --git a/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.h b/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.h index c18b5aa26..c82cad97e 100644 --- a/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.h +++ b/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.h @@ -17,12 +17,12 @@ typedef struct EnInsect { /* 0x01F0 */ Vec3s jointTable[24]; /* 0x0280 */ Vec3s morphTable[24]; /* 0x0310 */ EnInsectActionFunc actionFunc; - /* 0x0314 */ u16 unk_314; + /* 0x0314 */ u16 insectFlags; /* 0x0316 */ s16 unk_316; /* 0x0318 */ s16 unk_318; - /* 0x031A */ s16 unk_31A; - /* 0x031C */ s16 unk_31C; - /* 0x031E */ s16 unk_31E; + /* 0x031A */ s16 actionTimer; + /* 0x031C */ s16 lifeTimer; + /* 0x031E */ s16 crawlSoundDelay; /* 0x0320 */ ObjMakekinsuta* soilActor; /* 0x0324 */ f32 unk_324; /* 0x0328 */ s16 unk_328; diff --git a/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c b/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c index 4b2280d7e..68b776509 100644 --- a/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c +++ b/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c @@ -707,7 +707,7 @@ s32 func_80A97D68(EnKo* this, PlayState* play) { s32 func_80A97E18(EnKo* this, PlayState* play) { s16 trackingMode; - func_80034F54(play, this->unk_2E4, this->unk_304, 16); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 16); if (EnKo_IsWithinTalkAngle(this) == true) { trackingMode = NPC_TRACKING_HEAD_AND_TORSO; } else { @@ -726,7 +726,7 @@ s32 func_80A97EB0(EnKo* this, PlayState* play) { s16 trackingMode; s32 result; - func_80034F54(play, this->unk_2E4, this->unk_304, 16); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 16); result = EnKo_IsWithinTalkAngle(this); trackingMode = (result == true) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE; Npc_TrackPoint(&this->actor, &this->interactInfo, 2, trackingMode); @@ -734,7 +734,7 @@ s32 func_80A97EB0(EnKo* this, PlayState* play) { } s32 func_80A97F20(EnKo* this, PlayState* play) { - func_80034F54(play, this->unk_2E4, this->unk_304, 16); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 16); Npc_TrackPoint(&this->actor, &this->interactInfo, 2, NPC_TRACKING_FULL_BODY); return 1; } @@ -746,7 +746,7 @@ s32 func_80A97F70(EnKo* this, PlayState* play) { if ((this->skelAnime.animation == &gKokiriBlockingAnim) == false) { Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_BLOCKING_STATIC); } - func_80034F54(play, this->unk_2E4, this->unk_304, 16); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 16); trackingMode = NPC_TRACKING_HEAD_AND_TORSO; } else { if ((this->skelAnime.animation == &gKokiriCuttingGrassAnim) == false) { @@ -766,7 +766,7 @@ s32 func_80A98034(EnKo* this, PlayState* play) { if ((this->skelAnime.animation == &gKokiriBlockingAnim) == false) { Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_BLOCKING_STATIC); } - func_80034F54(play, this->unk_2E4, this->unk_304, 16); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 16); result = EnKo_IsWithinTalkAngle(this); trackingMode = (result == true) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE; } else { @@ -782,7 +782,7 @@ s32 func_80A98034(EnKo* this, PlayState* play) { // Same as func_80A97F20 s32 func_80A98124(EnKo* this, PlayState* play) { - func_80034F54(play, this->unk_2E4, this->unk_304, 16); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 16); Npc_TrackPoint(&this->actor, &this->interactInfo, 2, NPC_TRACKING_FULL_BODY); return 1; } @@ -796,7 +796,7 @@ s32 func_80A98174(EnKo* this, PlayState* play) { this->skelAnime.playSpeed = 1.0f; } if (this->skelAnime.playSpeed == 0.0f) { - func_80034F54(play, this->unk_2E4, this->unk_304, 16); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 16); } Npc_TrackPoint(&this->actor, &this->interactInfo, 2, (this->skelAnime.playSpeed == 0.0f) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE); @@ -1338,8 +1338,8 @@ s32 EnKo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po Matrix_Translate(-1200.0f, 0.0f, 0.0f, MTXMODE_APPLY); } if (limbIndex == 8 || limbIndex == 9 || limbIndex == 12) { - rot->y += Math_SinS(this->unk_2E4[limbIndex]) * 200.0f; - rot->z += Math_CosS(this->unk_304[limbIndex]) * 200.0f; + rot->y += Math_SinS(this->fidgetTableY[limbIndex]) * 200.0f; + rot->z += Math_CosS(this->fidgetTableZ[limbIndex]) * 200.0f; } return false; } diff --git a/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.h b/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.h index 80ecd0664..32d76764b 100644 --- a/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.h +++ b/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.h @@ -30,8 +30,8 @@ typedef struct EnKo { /* 0x0220 */ f32 modelAlpha; /* 0x0224 */ Vec3s jointTable[16]; /* 0x0284 */ Vec3s morphTable[16]; - /* 0x02E4 */ s16 unk_2E4[16]; - /* 0x0304 */ s16 unk_304[16]; + /* 0x02E4 */ s16 fidgetTableY[16]; + /* 0x0304 */ s16 fidgetTableZ[16]; } EnKo; // size = 0x0324 typedef enum { diff --git a/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c index 110f66333..fa4db4d59 100644 --- a/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -416,7 +416,7 @@ void EnKz_PreMweepWait(EnKz* this, PlayState* play) { this->interactInfo.talkState = NPC_TALK_STATE_IDLE; this->actionFunc = EnKz_SetupMweep; } else { - func_80034F54(play, this->unk_2A6, this->unk_2BE, 12); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 12); } } @@ -489,7 +489,7 @@ void EnKz_Wait(EnKz* this, PlayState* play) { this->actionFunc = EnKz_SetupGetItem; EnKz_SetupGetItem(this, play); } else { - func_80034F54(play, this->unk_2A6, this->unk_2BE, 12); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 12); } } @@ -548,8 +548,8 @@ s32 EnKz_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po EnKz* this = (EnKz*)thisx; if (limbIndex == 8 || limbIndex == 9 || limbIndex == 10) { - rot->y += Math_SinS(this->unk_2A6[limbIndex]) * 200.0f; - rot->z += Math_CosS(this->unk_2BE[limbIndex]) * 200.0f; + rot->y += Math_SinS(this->fidgetTableY[limbIndex]) * 200.0f; + rot->z += Math_CosS(this->fidgetTableZ[limbIndex]) * 200.0f; } if (limbIndex) {} return false; diff --git a/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.h b/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.h index 0b48ff202..b66a35ba8 100644 --- a/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.h +++ b/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.h @@ -24,8 +24,8 @@ typedef struct EnKz { /* 0x0214 */ s16 gameplayCamera; /* 0x0216 */ Vec3s jointTable[12]; /* 0x025E */ Vec3s morphTable[12]; - /* 0x02A6 */ s16 unk_2A6[12]; - /* 0x02BE */ s16 unk_2BE[12]; + /* 0x02A6 */ s16 fidgetTableY[12]; + /* 0x02BE */ s16 fidgetTableZ[12]; } EnKz; // size = 0x02D8 diff --git a/soh/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c b/soh/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c index 4f838f5bb..5798a540a 100644 --- a/soh/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c +++ b/soh/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c @@ -67,22 +67,22 @@ void EnMThunder_Init(Actor* thisx, PlayState* play2) { Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &D_80AA0420); - this->unk_1C7 = (this->actor.params & 0xFF) - 1; + this->swordType = (this->actor.params & 0xFF) - 1; Lights_PointNoGlowSetInfo(&this->lightInfo, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 255, 255, 255, 0); this->lightNode = LightContext_InsertLight(play, &play->lightCtx, &this->lightInfo); this->collider.dim.radius = 0; this->collider.dim.height = 40; this->collider.dim.yShift = -20; - this->unk_1C4 = 8; - this->unk_1B4 = 0.0f; + this->followPlayerTimer = 8; + this->spinTrailTexScroll = 0.0f; this->actor.world.pos = player->bodyPartsPos[0]; - this->unk_1AC = 0.0f; - this->unk_1BC = 0.0f; + this->spinAttackTimer = 0.0f; + this->dimmingIntensity = 0.0f; this->actor.shape.rot.y = player->actor.shape.rot.y + 0x8000; this->actor.room = -1; Actor_SetScale(&this->actor, 0.1f); - this->unk_1CA = 0; + this->isUsingMagic = 0; if (player->stateFlags2 & PLAYER_STATE2_SPIN_ATTACKING) { if (!gSaveContext.isMagicAcquired || (gSaveContext.magicState != MAGIC_STATE_IDLE) || @@ -97,15 +97,15 @@ void EnMThunder_Init(Actor* thisx, PlayState* play2) { } player->stateFlags2 &= ~PLAYER_STATE2_SPIN_ATTACKING; - this->unk_1CA = 1; - this->collider.info.toucher.dmgFlags = D_80AA044C[this->unk_1C7]; - this->unk_1C6 = 1; - this->unk_1C9 = ((this->unk_1C7 == 1) ? 2 : 4); + this->isUsingMagic = 1; + this->collider.info.toucher.dmgFlags = D_80AA044C[this->swordType]; + this->attackStrength = 1; + this->targetScale = ((this->swordType == 1) ? 2 : 4); func_80A9EFE0(this, func_80A9F9B4); - this->unk_1C4 = 8; + this->followPlayerTimer = 8; Audio_PlaySoundGeneral(NA_SE_IT_ROLLING_CUT_LV1, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - this->unk_1AC = 1.0f; + this->spinAttackTimer = 1.0f; } else { func_80A9EFE0(this, func_80A9F408); } @@ -115,7 +115,7 @@ void EnMThunder_Init(Actor* thisx, PlayState* play2) { void EnMThunder_Destroy(Actor* thisx, PlayState* play) { EnMThunder* this = (EnMThunder*)thisx; - if (this->unk_1CA != 0) { + if (this->isUsingMagic != 0) { Magic_Reset(play); } @@ -152,24 +152,24 @@ void func_80A9F408(EnMThunder* this, PlayState* play) { Player* player = GET_PLAYER(play); Actor* child = this->actor.child; - this->unk_1B8 = player->unk_858; + this->spinChargePercent = player->unk_858; this->actor.world.pos = player->bodyPartsPos[0]; this->actor.shape.rot.y = player->actor.shape.rot.y + 0x8000; - if (this->unk_1CA == 0) { + if (this->isUsingMagic == 0) { if (player->unk_858 >= 0.1f) { if ((gSaveContext.magicState != MAGIC_STATE_IDLE) || (((this->actor.params & 0xFF00) >> 8) && !(Magic_RequestChange(play, (this->actor.params & 0xFF00) >> 8, MAGIC_CONSUME_WAIT_PREVIEW)))) { func_80A9F350(this, play); func_80A9EFE0(this, func_80A9F350); - this->unk_1C8 = 0; - this->unk_1BC = 0.0; - this->unk_1AC = 0.0f; + this->chargeAlpha = 0; + this->dimmingIntensity = 0.0; + this->spinAttackTimer = 0.0f; return; } - this->unk_1CA = 1; + this->isUsingMagic = 1; } } @@ -197,20 +197,20 @@ void func_80A9F408(EnMThunder* this, PlayState* play) { gSaveContext.magicState = MAGIC_STATE_CONSUME_SETUP; } if (player->unk_858 < 0.85f) { - this->collider.info.toucher.dmgFlags = D_80AA044C[this->unk_1C7]; - this->unk_1C6 = 1; - this->unk_1C9 = ((this->unk_1C7 == 1) ? 2 : 4); + this->collider.info.toucher.dmgFlags = D_80AA044C[this->swordType]; + this->attackStrength = 1; + this->targetScale = ((this->swordType == 1) ? 2 : 4); } else { - this->collider.info.toucher.dmgFlags = D_80AA0458[this->unk_1C7]; - this->unk_1C6 = 0; - this->unk_1C9 = ((this->unk_1C7 == 1) ? 4 : 8); + this->collider.info.toucher.dmgFlags = D_80AA0458[this->swordType]; + this->attackStrength = 0; + this->targetScale = ((this->swordType == 1) ? 4 : 8); } func_80A9EFE0(this, func_80A9F9B4); - this->unk_1C4 = 8; - Audio_PlaySoundGeneral(sSfxIds[this->unk_1C6], &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, - &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - this->unk_1AC = 1.0f; + this->followPlayerTimer = 8; + Audio_PlaySoundGeneral(sSfxIds[this->attackStrength], &player->actor.projectedPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); + this->spinAttackTimer = 1.0f; return; } } @@ -224,19 +224,19 @@ void func_80A9F408(EnMThunder* this, PlayState* play) { } if (player->unk_858 > 0.15f) { - this->unk_1C8 = 255; + this->chargeAlpha = 255; if (this->actor.child == NULL) { Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EFF_DUST, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, this->actor.shape.rot.y, 0, - this->unk_1C7 + 2); + this->swordType + 2); } - this->unk_1BC += ((((player->unk_858 - 0.15f) * 1.5f) - this->unk_1BC) * 0.5f); + this->dimmingIntensity += ((((player->unk_858 - 0.15f) * 1.5f) - this->dimmingIntensity) * 0.5f); } else if (player->unk_858 > .1f) { - this->unk_1C8 = (s32)((player->unk_858 - .1f) * 255.0f * 20.0f); - this->unk_1AC = (player->unk_858 - .1f) * 10.0f; + this->chargeAlpha = (s32)((player->unk_858 - .1f) * 255.0f * 20.0f); + this->spinAttackTimer = (player->unk_858 - .1f) * 10.0f; } else { - this->unk_1C8 = 0; + this->chargeAlpha = 0; } if (player->unk_858 > 0.85f) { @@ -253,46 +253,46 @@ void func_80A9F408(EnMThunder* this, PlayState* play) { } void func_80A9F938(EnMThunder* this, PlayState* play) { - if (this->unk_1C4 < 2) { - if (this->unk_1C8 < 40) { - this->unk_1C8 = 0; + if (this->followPlayerTimer < 2) { + if (this->chargeAlpha < 40) { + this->chargeAlpha = 0; } else { - this->unk_1C8 -= 40; + this->chargeAlpha -= 40; } } - this->unk_1B4 += 2.0f * this->unk_1B0; + this->spinTrailTexScroll += 2.0f * this->spinAttackAlpha; - if (this->unk_1BC < this->unk_1AC) { - this->unk_1BC += ((this->unk_1AC - this->unk_1BC) * 0.1f); + if (this->dimmingIntensity < this->spinAttackTimer) { + this->dimmingIntensity += ((this->spinAttackTimer - this->dimmingIntensity) * 0.1f); } else { - this->unk_1BC = this->unk_1AC; + this->dimmingIntensity = this->spinAttackTimer; } } void func_80A9F9B4(EnMThunder* this, PlayState* play) { Player* player = GET_PLAYER(play); - if (Math_StepToF(&this->unk_1AC, 0.0f, 1 / 16.0f)) { + if (Math_StepToF(&this->spinAttackTimer, 0.0f, 1 / 16.0f)) { Actor_Kill(&this->actor); } else { - Math_SmoothStepToF(&this->actor.scale.x, (s32)this->unk_1C9, 0.6f, 0.8f, 0.0f); + Math_SmoothStepToF(&this->actor.scale.x, (s32)this->targetScale, 0.6f, 0.8f, 0.0f); Actor_SetScale(&this->actor, this->actor.scale.x); this->collider.dim.radius = (this->actor.scale.x * 25.0f); Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); } - if (this->unk_1C4 > 0) { + if (this->followPlayerTimer > 0) { this->actor.world.pos.x = player->bodyPartsPos[0].x; this->actor.world.pos.z = player->bodyPartsPos[0].z; - this->unk_1C4--; + this->followPlayerTimer--; } - if (this->unk_1AC > 0.6f) { - this->unk_1B0 = 1.0f; + if (this->spinAttackTimer > 0.6f) { + this->spinAttackAlpha = 1.0f; } else { - this->unk_1B0 = this->unk_1AC * (5.0f / 3.0f); + this->spinAttackAlpha = this->spinAttackTimer * (5.0f / 3.0f); } func_80A9F938(this, play); @@ -308,8 +308,8 @@ void EnMThunder_Update(Actor* thisx, PlayState* play) { s32 redGreen; this->actionFunc(this, play); - func_80A9F314(play, this->unk_1BC); - blueRadius = this->unk_1AC; + func_80A9F314(play, this->dimmingIntensity); + blueRadius = this->spinAttackTimer; redGreen = (u32)(blueRadius * 255.0f) & 0xFF; Lights_PointNoGlowSetInfo(&this->lightInfo, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, redGreen, redGreen, (u32)(blueRadius * 100.0f), @@ -329,24 +329,24 @@ void EnMThunder_Draw(Actor* thisx, PlayState* play2) { Matrix_Scale(0.02f, 0.02f, 0.02f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - switch (this->unk_1C6) { + switch (this->attackStrength) { case 0: case 1: gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0xFF - ((u8)(s32)(this->unk_1B4 * 30) & 0xFF), 0, 0x40, - 0x20, 1, 0xFF - ((u8)(s32)(this->unk_1B4 * 20) & 0xFF), 0, 8, 8, -30, 0, -20, - 0)); + Gfx_TwoTexScrollEx( + play->state.gfxCtx, 0, 0xFF - ((u8)(s32)(this->spinTrailTexScroll * 30) & 0xFF), 0, 0x40, + 0x20, 1, 0xFF - ((u8)(s32)(this->spinTrailTexScroll * 20) & 0xFF), 0, 8, 8, -30, 0, -20, 0)); break; } - switch (this->unk_1C6) { + switch (this->attackStrength) { case 0: if (CVarGetInteger(CVAR_COSMETIC("SpinAttack.Level2Primary.Changed"), 0)) { Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("SpinAttack.Level2Primary.Value"), (Color_RGB8){ 255, 255, 170 }); - gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, color.r, color.g, color.b, (u8)(this->unk_1B0 * 255)); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, color.r, color.g, color.b, (u8)(this->spinAttackAlpha * 255)); } else { - gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 170, (u8)(this->unk_1B0 * 255)); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 170, (u8)(this->spinAttackAlpha * 255)); } gSPDisplayList(POLY_XLU_DISP++, gSpinAttack3DL); gSPDisplayList(POLY_XLU_DISP++, gSpinAttack4DL); @@ -355,9 +355,9 @@ void EnMThunder_Draw(Actor* thisx, PlayState* play2) { if (CVarGetInteger(CVAR_COSMETIC("SpinAttack.Level1Primary.Changed"), 0)) { Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("SpinAttack.Level1Primary.Value"), (Color_RGB8){ 170, 255, 255 }); - gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, color.r, color.g, color.b, (u8)(this->unk_1B0 * 255)); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, color.r, color.g, color.b, (u8)(this->spinAttackAlpha * 255)); } else { - gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 170, 255, 255, (u8)(this->unk_1B0 * 255)); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 170, 255, 255, (u8)(this->spinAttackAlpha * 255)); } gSPDisplayList(POLY_XLU_DISP++, gSpinAttack1DL); gSPDisplayList(POLY_XLU_DISP++, gSpinAttack2DL); @@ -366,7 +366,7 @@ void EnMThunder_Draw(Actor* thisx, PlayState* play2) { Matrix_Mult(&player->mf_9E0, MTXMODE_NEW); - switch (this->unk_1C7) { + switch (this->swordType) { case 1: Matrix_Translate(0.0f, 220.0f, 0.0f, MTXMODE_APPLY); Matrix_Scale(-0.7f, -0.6f, -0.4f, MTXMODE_APPLY); @@ -384,14 +384,14 @@ void EnMThunder_Draw(Actor* thisx, PlayState* play2) { break; } - if (this->unk_1B8 >= 0.85f) { + if (this->spinChargePercent >= 0.85f) { phi_f14 = (D_80AA046C[(play->gameplayFrames & 7)] * 6.0f) + 1.0f; if (CVarGetInteger(CVAR_COSMETIC("SpinAttack.Level2Primary.Changed"), 0)) { Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("SpinAttack.Level2Primary.Value"), (Color_RGB8){ 255, 255, 170 }); - gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, color.r, color.g, color.b, this->unk_1C8); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, color.r, color.g, color.b, this->chargeAlpha); } else { - gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 170, this->unk_1C8); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 170, this->chargeAlpha); } if (CVarGetInteger(CVAR_COSMETIC("SpinAttack.Level2Secondary.Changed"), 0)) { Color_RGB8 color = @@ -406,9 +406,9 @@ void EnMThunder_Draw(Actor* thisx, PlayState* play2) { if (CVarGetInteger(CVAR_COSMETIC("SpinAttack.Level1Primary.Changed"), 0)) { Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("SpinAttack.Level1Primary.Value"), (Color_RGB8){ 170, 255, 255 }); - gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, color.r, color.g, color.b, this->unk_1C8); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, color.r, color.g, color.b, this->chargeAlpha); } else { - gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 170, 255, 255, this->unk_1C8); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 170, 255, 255, this->chargeAlpha); } if (CVarGetInteger(CVAR_COSMETIC("SpinAttack.Level1Secondary.Changed"), 0)) { Color_RGB8 color = diff --git a/soh/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.h b/soh/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.h index 5b1caa993..d83f88418 100644 --- a/soh/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.h +++ b/soh/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.h @@ -13,18 +13,18 @@ typedef struct EnMThunder { /* 0x014C */ ColliderCylinder collider; /* 0x0198 */ LightNode* lightNode; /* 0x019C */ LightInfo lightInfo; - /* 0x01AC */ f32 unk_1AC; - /* 0x01B0 */ f32 unk_1B0; - /* 0x01B0 */ f32 unk_1B4; - /* 0x01B0 */ f32 unk_1B8; - /* 0x01BC */ f32 unk_1BC; + /* 0x01AC */ f32 spinAttackTimer; + /* 0x01B0 */ f32 spinAttackAlpha; + /* 0x01B4 */ f32 spinTrailTexScroll; + /* 0x01B8 */ f32 spinChargePercent; + /* 0x01BC */ f32 dimmingIntensity; /* 0x01C0 */ EnMThunderActionFunc actionFunc; - /* 0x01C4 */ u16 unk_1C4; - /* 0x01C6 */ u8 unk_1C6; - /* 0x01C7 */ u8 unk_1C7; - /* 0x01C8 */ u8 unk_1C8; - /* 0x01C9 */ u8 unk_1C9; - /* 0x01CA */ u8 unk_1CA; + /* 0x01C4 */ u16 followPlayerTimer; + /* 0x01C6 */ u8 attackStrength; + /* 0x01C7 */ u8 swordType; + /* 0x01C8 */ u8 chargeAlpha; + /* 0x01C9 */ u8 targetScale; + /* 0x01CA */ u8 isUsingMagic; } EnMThunder; // size = 0x01CC #endif diff --git a/soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c b/soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c index 91f3c6ab7..e28718137 100644 --- a/soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c +++ b/soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c @@ -259,13 +259,13 @@ void func_80AA0AF4(EnMa1* this, PlayState* play) { void func_80AA0B74(EnMa1* this) { if (this->skelAnime.animation == &gMalonChildSingAnim) { if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) { - if (this->unk_1E0 != 0) { - this->unk_1E0 = 0; + if (this->singingDisabled != 0) { + this->singingDisabled = 0; func_800F6584(0); } } else { - if (this->unk_1E0 == 0) { - this->unk_1E0 = 1; + if (this->singingDisabled == 0) { + this->singingDisabled = 1; func_800F6584(1); } } diff --git a/soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h b/soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h index f06f220c9..81ff91967 100644 --- a/soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h +++ b/soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h @@ -13,7 +13,7 @@ typedef struct EnMa1 { /* 0x014C */ SkelAnime skelAnime; /* 0x0190 */ EnMa1ActionFunc actionFunc; /* 0x0194 */ ColliderCylinder collider; - /* 0x01E0 */ s16 unk_1E0; + /* 0x01E0 */ s16 singingDisabled; /* 0x01E2 */ s16 blinkTimer; /* 0x01E4 */ s16 eyeIndex; /* 0x01E6 */ s16 mouthIndex; diff --git a/soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c b/soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c index 23707c6c9..ff0b7052a 100644 --- a/soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c +++ b/soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c @@ -199,14 +199,14 @@ void EnMa2_ChangeAnim(EnMa2* this, s32 index) { void func_80AA1DB4(EnMa2* this, PlayState* play) { if (this->skelAnime.animation == &gMalonAdultSingAnim) { if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) { - if (this->unk_20A != 0) { + if (this->singingDisabled != 0) { func_800F6584(0); - this->unk_20A = 0; + this->singingDisabled = 0; } } else { - if (this->unk_20A == 0) { + if (this->singingDisabled == 0) { func_800F6584(1); - this->unk_20A = 1; + this->singingDisabled = 1; } } } @@ -286,7 +286,7 @@ void func_80AA20E4(EnMa2* this, PlayState* play) { } else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) { Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - this->unk_208 = 0x1E; + this->timer = 0x1E; Flags_SetInfTable(INFTABLE_8E); this->actionFunc = func_80AA21C8; play->msgCtx.ocarinaMode = OCARINA_MODE_04; @@ -298,7 +298,7 @@ void func_80AA20E4(EnMa2* this, PlayState* play) { void func_80AA21C8(EnMa2* this, PlayState* play) { Player* player = GET_PLAYER(play); - if (DECR(this->unk_208)) { + if (DECR(this->timer)) { player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR; } else { if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) { @@ -349,8 +349,8 @@ s32 EnMa2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } if ((limbIndex == MALON_ADULT_CHEST_AND_NECK_LIMB) || (limbIndex == MALON_ADULT_LEFT_SHOULDER_LIMB) || (limbIndex == MALON_ADULT_RIGHT_SHOULDER_LIMB)) { - rot->y += Math_SinS(this->unk_212[limbIndex].y) * 200.0f; - rot->z += Math_CosS(this->unk_212[limbIndex].z) * 200.0f; + rot->y += Math_SinS(this->upperBodyRot[limbIndex].y) * 200.0f; + rot->z += Math_CosS(this->upperBodyRot[limbIndex].z) * 200.0f; } return false; } diff --git a/soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h b/soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h index 20f0cd6de..53b77613e 100644 --- a/soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h +++ b/soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h @@ -37,12 +37,12 @@ typedef struct EnMa2 { /* 0x0190 */ EnMa2ActionFunc actionFunc; /* 0x0194 */ ColliderCylinder collider; /* 0x01E0 */ NpcInteractInfo interactInfo; - /* 0x0208 */ s16 unk_208; - /* 0x020A */ s16 unk_20A; + /* 0x0208 */ s16 timer; + /* 0x020A */ s16 singingDisabled; /* 0x020C */ s16 blinkTimer; /* 0x020E */ s16 eyeIndex; /* 0x0210 */ s16 mouthIndex; - /* 0x0212 */ Vec3s unk_212[MALON_ADULT_LIMB_MAX]; + /* 0x0212 */ Vec3s upperBodyRot[MALON_ADULT_LIMB_MAX]; } EnMa2; // size = 0x0284 #endif diff --git a/soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c b/soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c index 9238c42df..36251b708 100644 --- a/soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c +++ b/soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c @@ -297,13 +297,13 @@ void EnMa3_Update(Actor* thisx, PlayState* play) { Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, (f32)this->collider.dim.radius + 150.0f, func_80AA2AA0, func_80AA2BD4); if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) { - if (this->unk_20A != 0) { + if (this->isNotSinging != 0) { func_800F6584(0); - this->unk_20A = 0; + this->isNotSinging = 0; } - } else if (this->unk_20A == 0) { + } else if (this->isNotSinging == 0) { func_800F6584(1); - this->unk_20A = 1; + this->isNotSinging = 1; } } diff --git a/soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h b/soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h index 750037905..1f3ec2ed8 100644 --- a/soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h +++ b/soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h @@ -38,7 +38,7 @@ typedef struct EnMa3 { /* 0x0194 */ ColliderCylinder collider; /* 0x01E0 */ NpcInteractInfo interactInfo; /* 0x0208 */ s16 unk_208; - /* 0x020A */ s16 unk_20A; + /* 0x020A */ s16 isNotSinging; /* 0x020C */ s16 blinkTimer; /* 0x020E */ s16 eyeIndex; /* 0x0210 */ s16 mouthIndex; diff --git a/soh/src/overlays/actors/ovl_En_Md/z_en_md.c b/soh/src/overlays/actors/ovl_En_Md/z_en_md.c index 13b51a16e..68b43078e 100644 --- a/soh/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/soh/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -682,7 +682,7 @@ void EnMd_Destroy(Actor* thisx, PlayState* play) { void EnMd_Idle(EnMd* this, PlayState* play) { if (this->skelAnime.animation == &gMidoHandsOnHipsIdleAnim) { - func_80034F54(play, this->unk_214, this->unk_236, 17); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 17); } else if ((this->interactInfo.talkState == NPC_TALK_STATE_IDLE) && (this->animSequence != 7)) { EnMd_SetAnimSequence(this, 7); } @@ -692,7 +692,7 @@ void EnMd_Idle(EnMd* this, PlayState* play) { void EnMd_Watch(EnMd* this, PlayState* play) { if (this->skelAnime.animation == &gMidoHandsOnHipsIdleAnim) { - func_80034F54(play, this->unk_214, this->unk_236, 17); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 17); } EnMd_UpdateAnimSequence(this); } @@ -748,7 +748,7 @@ void EnMd_BlockPath(EnMd* this, PlayState* play) { } if (this->skelAnime.animation == &gMidoHandsOnHipsIdleAnim) { - func_80034F54(play, this->unk_214, this->unk_236, 17); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 17); } if ((this->interactInfo.talkState == NPC_TALK_STATE_IDLE) && (play->sceneNum == SCENE_LOST_WOODS)) { @@ -786,7 +786,7 @@ void EnMd_ListenToOcarina(EnMd* this, PlayState* play) { } void EnMd_Walk(EnMd* this, PlayState* play) { - func_80034F54(play, this->unk_214, this->unk_236, 17); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 17); EnMd_UpdateAnimSequence(this); if (!(EnMd_FollowPath(this, play)) || (this->waypoint != 0)) { @@ -844,8 +844,8 @@ s32 EnMd_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } if (((limbIndex == 9) || (limbIndex == 10)) || (limbIndex == 13)) { - rot->y += Math_SinS(this->unk_214[limbIndex]) * 200.0f; - rot->z += Math_CosS(this->unk_236[limbIndex]) * 200.0f; + rot->y += Math_SinS(this->fidgetTableY[limbIndex]) * 200.0f; + rot->z += Math_CosS(this->fidgetTableZ[limbIndex]) * 200.0f; } return false; diff --git a/soh/src/overlays/actors/ovl_En_Md/z_en_md.h b/soh/src/overlays/actors/ovl_En_Md/z_en_md.h index 4d4962acc..8412b4a3f 100644 --- a/soh/src/overlays/actors/ovl_En_Md/z_en_md.h +++ b/soh/src/overlays/actors/ovl_En_Md/z_en_md.h @@ -22,8 +22,8 @@ typedef struct EnMd { /* 0x020E */ s16 eyeIdx; /* 0x0210 */ s16 alpha; /* 0x0212 */ s16 waypoint; - /* 0x0214 */ s16 unk_214[17]; - /* 0x0236 */ s16 unk_236[17]; + /* 0x0214 */ s16 fidgetTableY[17]; + /* 0x0236 */ s16 fidgetTableZ[17]; /* 0x0258 */ Vec3s jointTable[17]; /* 0x02BE */ Vec3s morphTable[17]; } EnMd; // size = 0x0324 diff --git a/soh/src/overlays/actors/ovl_En_Mu/z_en_mu.c b/soh/src/overlays/actors/ovl_En_Mu/z_en_mu.c index 614b88a70..86351c7dd 100644 --- a/soh/src/overlays/actors/ovl_En_Mu/z_en_mu.c +++ b/soh/src/overlays/actors/ovl_En_Mu/z_en_mu.c @@ -149,7 +149,7 @@ void EnMu_Destroy(Actor* thisx, PlayState* play) { } void EnMu_Pose(EnMu* this, PlayState* play) { - func_80034F54(play, this->unk_20A, this->unk_22A, 16); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 16); } void EnMu_Update(Actor* thisx, PlayState* play) { @@ -181,8 +181,8 @@ s32 EnMu_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po if ((limbIndex == 5) || (limbIndex == 6) || (limbIndex == 7) || (limbIndex == 11) || (limbIndex == 12) || (limbIndex == 13) || (limbIndex == 14)) { - rot->y += Math_SinS(this->unk_20A[limbIndex]) * 200.0f; - rot->z += Math_CosS(this->unk_22A[limbIndex]) * 200.0f; + rot->y += Math_SinS(this->fidgetTableY[limbIndex]) * 200.0f; + rot->z += Math_CosS(this->fidgetTableZ[limbIndex]) * 200.0f; } return false; } diff --git a/soh/src/overlays/actors/ovl_En_Mu/z_en_mu.h b/soh/src/overlays/actors/ovl_En_Mu/z_en_mu.h index b1d799559..e8a84566a 100644 --- a/soh/src/overlays/actors/ovl_En_Mu/z_en_mu.h +++ b/soh/src/overlays/actors/ovl_En_Mu/z_en_mu.h @@ -15,8 +15,8 @@ typedef struct EnMu { /* 0x0194 */ ColliderCylinder collider; /* 0x01E0 */ NpcInteractInfo npcInfo; /* 0x0208 */ u16 defFaceReaction; - /* 0x020A */ s16 unk_20A[16]; - /* 0x022A */ s16 unk_22A[17]; + /* 0x020A */ s16 fidgetTableY[16]; + /* 0x022A */ s16 fidgetTableZ[17]; } EnMu; // size = 0x024C #endif diff --git a/soh/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c b/soh/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c index 84da935d6..54ec62d96 100644 --- a/soh/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c +++ b/soh/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c @@ -212,12 +212,12 @@ void EnNiwGirl_Update(Actor* thisx, PlayState* play) { this->interactInfo.trackPos.y = player->actor.world.pos.y - 10.0f; } Npc_TrackPoint(&this->actor, &this->interactInfo, 2, NPC_TRACKING_FULL_BODY); - this->unk_260 = this->interactInfo.headRot; - this->unk_266 = this->interactInfo.torsoRot; + this->headRot = this->interactInfo.headRot; + this->torsoRot = this->interactInfo.torsoRot; } else { - Math_SmoothStepToS(&this->unk_266.y, 0, 5, 3000, 0); - Math_SmoothStepToS(&this->unk_260.y, 0, 5, 3000, 0); - Math_SmoothStepToS(&this->unk_260.z, 0, 5, 3000, 0); + Math_SmoothStepToS(&this->torsoRot.y, 0, 5, 3000, 0); + Math_SmoothStepToS(&this->headRot.y, 0, 5, 3000, 0); + Math_SmoothStepToS(&this->headRot.z, 0, 5, 3000, 0); } if (this->blinkTimer != 0) { this->blinkTimer--; @@ -236,11 +236,11 @@ s32 EnNiwGirlOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f EnNiwGirl* this = (EnNiwGirl*)thisx; if (limbIndex == 3) { - rot->x += this->unk_266.y; + rot->x += this->torsoRot.y; } if (limbIndex == 4) { - rot->x += this->unk_260.y; - rot->z += this->unk_260.z; + rot->x += this->headRot.y; + rot->z += this->headRot.z; } return false; } diff --git a/soh/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.h b/soh/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.h index 812f1d88e..1facb4c38 100644 --- a/soh/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.h +++ b/soh/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.h @@ -15,8 +15,8 @@ typedef struct EnNiwGirl { /* 0x0190 */ Vec3s jointTable[17]; /* 0x01F6 */ Vec3s morphTable[17]; /* 0x025C */ EnNiwGirlActionFunc actionFunc; - /* 0x0260 */ Vec3s unk_260; - /* 0x0266 */ Vec3s unk_266; + /* 0x0260 */ Vec3s headRot; + /* 0x0266 */ Vec3s torsoRot; /* 0x026C */ s16 jumpTimer; // Controls how many frames she jumps for and how long until she jumps again /* 0x026E */ s16 unkUpTimer; /* 0x0270 */ s16 unk_270; diff --git a/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c b/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c index 4e204fac5..09ac1e057 100644 --- a/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c +++ b/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c @@ -518,10 +518,10 @@ void EnNiwLady_Update(Actor* thisx, PlayState* play) { this->interactInfo.trackPos.y = player->actor.world.pos.y - 10.0f; } Npc_TrackPoint(thisx, &this->interactInfo, 2, NPC_TRACKING_FULL_BODY); - this->unk_254 = this->interactInfo.headRot; - this->unk_25A = this->interactInfo.torsoRot; + this->headRot = this->interactInfo.headRot; + this->torsoRot = this->interactInfo.torsoRot; if (this->unk_276 == 0) { - Math_SmoothStepToS(&this->unk_254.y, 0, 5, 3000, 0); + Math_SmoothStepToS(&this->headRot.y, 0, 5, 3000, 0); } gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[this->objectOsAnimeIndex].segment); if (this->objectOsAnimeIndex >= 0) { @@ -570,11 +570,11 @@ s32 EnNiwLady_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3 s32 pad; if (limbIndex == 15) { - rot->x += this->unk_254.y; - rot->z += this->unk_254.x; + rot->x += this->headRot.y; + rot->z += this->headRot.x; } if (limbIndex == 8) { - rot->x += this->unk_25A.y; + rot->x += this->torsoRot.y; } if (this->unk_275 != 0) { if ((limbIndex == 8) || (limbIndex == 10) || (limbIndex == 13)) { diff --git a/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.h b/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.h index 010560593..db1f1a371 100644 --- a/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.h +++ b/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.h @@ -14,8 +14,8 @@ typedef struct EnNiwLady { /* 0x0190 */ Vec3s jointTable[16]; /* 0x01F0 */ Vec3s morphTable[16]; /* 0x0250 */ EnNiwLadyActionFunc actionFunc; - /* 0x0254 */ Vec3s unk_254; - /* 0x025A */ Vec3s unk_25A; + /* 0x0254 */ Vec3s headRot; + /* 0x025A */ Vec3s torsoRot; /* 0x0260 */ s16 unusedTimer; /* 0x0262 */ s16 unk_262; // "message_end_code" /* 0x0264 */ s16 unusedTimer2; diff --git a/soh/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h b/soh/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h index 5b608ad06..25613720f 100644 --- a/soh/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h +++ b/soh/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h @@ -33,7 +33,7 @@ typedef struct EnPoField { /* 0x019C */ Vec3s jointTable[10]; /* 0x01D8 */ Vec3s morphTable[10]; /* 0x0214 */ Color_RGBA8 lightColor; - /* 0x0214 */ Color_RGBA8 soulColor; + /* 0x0218 */ Color_RGBA8 soulColor; /* 0x021C */ f32 scaleModifier; /* 0x0220 */ f32 flameScale; /* 0x0224 */ Vec3f flamePosition; diff --git a/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c b/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c index 119f10de6..95332dd7e 100644 --- a/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c +++ b/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c @@ -126,7 +126,7 @@ void EnPoRelay_Destroy(Actor* thisx, PlayState* play) { } void EnPoRelay_SetupIdle(EnPoRelay* this) { - this->unk_195 = 32; + this->bobTimer = 32; this->pathIndex = 0; this->actor.room = -1; this->actor.shape.rot.y = 0; @@ -149,7 +149,7 @@ void EnPoRelay_SetupRace(EnPoRelay* this) { Interface_SetTimer(0); this->hookshotSlotFull = (INV_CONTENT(ITEM_HOOKSHOT) != ITEM_NONE && !IS_RANDO) || (IS_RANDO && Flags_GetTreasure(gPlayState, 0x1E)); - this->unk_19A = Actor_WorldYawTowardPoint(&this->actor, &vec); + this->yawTowardsPathPoint = Actor_WorldYawTowardPoint(&this->actor, &vec); this->actor.flags |= ACTOR_FLAG_LOCK_ON_DISABLED; Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_LAUGH); this->actionFunc = EnPoRelay_Race; @@ -164,7 +164,7 @@ void EnPoRelay_SetupEndRace(EnPoRelay* this) { void EnPoRelay_CorrectY(EnPoRelay* this) { Math_StepToF(&this->actor.home.pos.y, D_80AD8C30[(this->pathIndex >= 28) ? 27 : this->pathIndex].y + 45.0f, 2.0f); - this->actor.world.pos.y = Math_SinS(this->unk_195 * 0x800) * 8.0f + this->actor.home.pos.y; + this->actor.world.pos.y = Math_SinS(this->bobTimer * 0x800) * 8.0f + this->actor.home.pos.y; } void EnPoRelay_Idle(EnPoRelay* this, PlayState* play) { @@ -213,12 +213,12 @@ void EnPoRelay_Race(EnPoRelay* this, PlayState* play) { speed = 30.0f * multiplier; Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HONOTRAP, - Math_CosS(this->unk_19A) * speed + this->actor.world.pos.x, this->actor.world.pos.y, - Math_SinS(this->unk_19A) * speed + this->actor.world.pos.z, 0, - (this->unk_19A + 0x8000) - (0x2000 * multiplier), 0, HONOTRAP_FLAME_DROP); + Math_CosS(this->yawTowardsPathPoint) * speed + this->actor.world.pos.x, this->actor.world.pos.y, + Math_SinS(this->yawTowardsPathPoint) * speed + this->actor.world.pos.z, 0, + (this->yawTowardsPathPoint + 0x8000) - (0x2000 * multiplier), 0, HONOTRAP_FLAME_DROP); } } - Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_19A, 2, 0x1000, 0x100); + Math_SmoothStepToS(&this->actor.world.rot.y, this->yawTowardsPathPoint, 2, 0x1000, 0x100); this->actor.shape.rot.y = this->actor.world.rot.y + (this->actionTimer * 0x800) + 0x8000; if (this->pathIndex < 23) { // If the player travels along a different path to Dampé that converges later @@ -264,7 +264,7 @@ void EnPoRelay_Race(EnPoRelay* this, PlayState* play) { Flags_SetSwitch(play, 0x37); } } - this->unk_19A = Actor_WorldYawTowardPoint(&this->actor, &vec); + this->yawTowardsPathPoint = Actor_WorldYawTowardPoint(&this->actor, &vec); func_8002F974(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); } @@ -394,11 +394,11 @@ void EnPoRelay_Update(Actor* thisx, PlayState* play) { Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); Actor_SetFocus(&this->actor, 50.0f); - if (this->unk_195 != 0) { - this->unk_195 -= 1; + if (this->bobTimer != 0) { + this->bobTimer -= 1; } - if (this->unk_195 == 0) { - this->unk_195 = 32; + if (this->bobTimer == 0) { + this->bobTimer = 32; } this->eyeTextureIdx++; if (this->eyeTextureIdx == 3) { diff --git a/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.h b/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.h index bfc76cef9..d3478e0e7 100644 --- a/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.h +++ b/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.h @@ -13,10 +13,10 @@ typedef struct EnPoRelay { /* 0x014C */ SkelAnime skelAnime; /* 0x0190 */ EnPoRelayActionFunc actionFunc; /* 0x0194 */ u8 hookshotSlotFull; - /* 0x0195 */ u8 unk_195; + /* 0x0195 */ u8 bobTimer; /* 0x0196 */ s16 actionTimer; /* 0x0198 */ s16 pathIndex; - /* 0x019A */ s16 unk_19A; + /* 0x019A */ s16 yawTowardsPathPoint; /* 0x019C */ u16 textId; /* 0x019E */ u16 eyeTextureIdx; /* 0x01A0 */ Vec3s jointTable[18]; diff --git a/soh/src/overlays/actors/ovl_En_Poh/z_en_poh.h b/soh/src/overlays/actors/ovl_En_Poh/z_en_poh.h index e0d2e7a8f..33f96c929 100644 --- a/soh/src/overlays/actors/ovl_En_Poh/z_en_poh.h +++ b/soh/src/overlays/actors/ovl_En_Poh/z_en_poh.h @@ -24,7 +24,7 @@ typedef struct { /* 0x0000 */ Color_RGB8 primColor; /* 0x0003 */ Color_RGB8 lightColor; /* 0x0006 */ u8 unk_6; // limb index - /* 0x0006 */ u8 unk_7; // limb index + /* 0x0007 */ u8 unk_7; // limb index /* 0x0008 */ s8 unk_8; // rate of some kind /* 0x000C */ AnimationHeader* idleAnim; /* 0x0010 */ AnimationHeader* idleAnim2; diff --git a/soh/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c b/soh/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c index a27b3b5b1..da1cb631d 100644 --- a/soh/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c +++ b/soh/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c @@ -46,7 +46,7 @@ void EnPubox_Init(Actor* thisx, PlayState* play) { default: break; } - this->unk_164 = 1; + this->unused_164 = 1; thisx->colChkInfo.cylRadius = 20; thisx->colChkInfo.cylHeight = 50; thisx->uncullZoneDownward = 1200.0f; diff --git a/soh/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.h b/soh/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.h index fe5c86548..f4ede4e85 100644 --- a/soh/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.h +++ b/soh/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.h @@ -8,7 +8,7 @@ struct EnPubox; typedef struct EnPubox { /* 0x0000 */ DynaPolyActor dyna; - /* 0x0164 */ u32 unk_164; + /* 0x0164 */ u32 unused_164; } EnPubox; // size = 0x0168 #endif diff --git a/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c index 062be3268..a64dddbd4 100644 --- a/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -132,13 +132,13 @@ void EnRd_Init(Actor* thisx, PlayState* play) { thisx->targetMode = 0; thisx->colChkInfo.damageTable = &sDamageTable; ActorShape_Init(&thisx->shape, 0.0f, NULL, 0.0f); - this->unk_310 = this->unk_30E = 0; + this->upperBodyYRotation = this->headYRotation = 0; thisx->focus.pos = thisx->world.pos; thisx->focus.pos.y += 50.0f; thisx->colChkInfo.mass = MASS_HEAVY; thisx->colChkInfo.health = 8; - this->unk_314 = this->unk_31D = 0xFF; - this->unk_312 = (thisx->params & 0xFF00) >> 8; + this->alpha = this->unk_31D = 0xFF; + this->rdFlags = (thisx->params & 0xFF00) >> 8; if (thisx->params & 0x80) { thisx->params |= 0xFF00; @@ -208,8 +208,8 @@ void func_80AE269C(EnRd* this) { Animation_PlayLoop(&this->skelAnime, &gGibdoRedeadSobbingAnim); } - this->unk_31B = 0; - this->unk_30C = (Rand_ZeroOne() * 10.0f) + 5.0f; + this->action = 0; + this->timer = (Rand_ZeroOne() * 10.0f) + 5.0f; this->actor.speedXZ = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; EnRd_SetupAction(this, func_80AE2744); @@ -217,8 +217,8 @@ void func_80AE269C(EnRd* this) { void func_80AE2744(EnRd* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - Math_SmoothStepToS(&this->unk_30E, 0, 1, 0x64, 0); - Math_SmoothStepToS(&this->unk_310, 0, 1, 0x64, 0); + Math_SmoothStepToS(&this->headYRotation, 0, 1, 0x64, 0); + Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 0x64, 0); if ((this->actor.params == 2) && (0.0f == this->skelAnime.curFrame)) { if (Rand_ZeroOne() >= 0.5f) { @@ -227,15 +227,15 @@ void func_80AE2744(EnRd* this, PlayState* play) { Animation_PlayLoop(&this->skelAnime, &gGibdoRedeadWipingTearsAnim); } } else { - this->unk_30C--; - if (this->unk_30C == 0) { - this->unk_30C = (Rand_ZeroOne() * 10.0f) + 10.0f; + this->timer--; + if (this->timer == 0) { + this->timer = (Rand_ZeroOne() * 10.0f) + 10.0f; this->skelAnime.curFrame = 0.0f; } } if (this->actor.parent != NULL) { - if (this->unk_305 == 0) { + if (this->isMourning == 0) { if (this->actor.params != 2) { func_80AE31DC(this); } else { @@ -243,7 +243,7 @@ void func_80AE2744(EnRd* this, PlayState* play) { } } } else { - if (this->unk_305 != 0) { + if (this->isMourning != 0) { if (this->actor.params != 2) { func_80AE37BC(this); } else { @@ -251,7 +251,7 @@ void func_80AE2744(EnRd* this, PlayState* play) { } } - this->unk_305 = 0; + this->isMourning = 0; if (this->actor.xzDistToPlayer <= 150.0f && func_8002DDE4(play)) { // Add a height check to redeads/gibdos freeze when Enemy Randomizer is on. @@ -261,7 +261,7 @@ void func_80AE2744(EnRd* this, PlayState* play) { (CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("Enabled"), 0)); if (!enemyRandoCCActive || (enemyRandoCCActive && this->actor.yDistToPlayer <= 100.0f && this->actor.yDistToPlayer >= -100.0f)) { - if ((this->actor.params != 2) && (this->unk_305 == 0)) { + if ((this->actor.params != 2) && (this->isMourning == 0)) { func_80AE37BC(this); } else { func_80AE392C(this); @@ -278,8 +278,8 @@ void func_80AE2744(EnRd* this, PlayState* play) { void func_80AE2970(EnRd* this) { Animation_Change(&this->skelAnime, &gGibdoRedeadIdleAnim, 0, 0, Animation_GetLastFrame(&gGibdoRedeadIdleAnim), ANIMMODE_LOOP, -6.0f); - this->unk_31B = 11; - this->unk_30C = 6; + this->action = 11; + this->timer = 6; this->actor.shape.rot.x = -0x4000; this->actor.gravity = 0.0f; this->actor.shape.yOffset = 0.0f; @@ -300,8 +300,8 @@ void func_80AE2A10(EnRd* this, PlayState* play) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_REDEAD_CRY); } if (Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 50.0f, 0.3f, 2.0f, 0.3f) == 0.0f) { - if (this->unk_30C != 0) { - this->unk_30C--; + if (this->timer != 0) { + this->timer--; Math_SmoothStepToF(&this->actor.speedXZ, 6.0f, 0.3f, 1.0f, 0.3f); } else if (Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.3f, 1.0f, 0.3f) == 0.0f) { Math_SmoothStepToS(&this->actor.shape.rot.x, 0, 1, 0x7D0, 0); @@ -314,7 +314,7 @@ void func_80AE2B90(EnRd* this, PlayState* play) { Animation_Change(&this->skelAnime, &gGibdoRedeadWalkAnim, 1.0f, 4.0f, Animation_GetLastFrame(&gGibdoRedeadWalkAnim), ANIMMODE_LOOP_INTERP, -4.0f); this->actor.speedXZ = 0.4f; - this->unk_31B = 4; + this->action = 4; EnRd_SetupAction(this, func_80AE2C1C); } @@ -324,12 +324,12 @@ void func_80AE2C1C(EnRd* this, PlayState* play) { Color_RGBA8 sp3C = D_80AE4928; Player* player = GET_PLAYER(play); s32 pad; - s16 sp32 = this->actor.yawTowardsPlayer - this->actor.shape.rot.y - this->unk_30E - this->unk_310; + s16 sp32 = this->actor.yawTowardsPlayer - this->actor.shape.rot.y - this->headYRotation - this->upperBodyYRotation; this->skelAnime.playSpeed = this->actor.speedXZ; Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0xFA, 0); - Math_SmoothStepToS(&this->unk_30E, 0, 1, 0x64, 0); - Math_SmoothStepToS(&this->unk_310, 0, 1, 0x64, 0); + Math_SmoothStepToS(&this->headYRotation, 0, 1, 0x64, 0); + Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 0x64, 0); this->actor.world.rot.y = this->actor.shape.rot.y; SkelAnime_Update(&this->skelAnime); @@ -342,15 +342,15 @@ void func_80AE2C1C(EnRd* this, PlayState* play) { (PLAYER_STATE1_DEAD | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_CLIMBING_LADDER)) && !(player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY)) { - if (this->unk_306 == 0) { - if (!(this->unk_312 & PLAYER_STATE2_GRABBED_BY_ENEMY) && + if (this->playerStunWaitTimer == 0) { + if (!(this->rdFlags & PLAYER_STATE2_GRABBED_BY_ENEMY) && GameInteractor_Should(VB_REDEAD_GIBDO_FREEZE_LINK, true, this)) { player->actor.freezeTimer = 40; Player_SetAutoLockOnActor(play, &this->actor); GET_PLAYER(play)->autoLockOnActor = &this->actor; func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96); } - this->unk_306 = 0x3C; + this->playerStunWaitTimer = 0x3C; Audio_PlayActorSound2(&this->actor, NA_SE_EN_REDEAD_AIM); } } else { @@ -358,11 +358,11 @@ void func_80AE2C1C(EnRd* this, PlayState* play) { } } - if (this->unk_307 != 0) { - this->unk_307--; + if (this->grabWaitTimer != 0) { + this->grabWaitTimer--; } - if (!this->unk_307 && (Actor_WorldDistXYZToActor(&this->actor, &player->actor) <= 45.0f) && + if (!this->grabWaitTimer && (Actor_WorldDistXYZToActor(&this->actor, &player->actor) <= 45.0f) && Actor_IsFacingPlayer(&this->actor, 0x38E3)) { player->actor.freezeTimer = 0; if (play->grabPlayer(play, player)) { @@ -373,7 +373,7 @@ void func_80AE2C1C(EnRd* this, PlayState* play) { if (this->actor.parent != NULL) { func_80AE31DC(this); } else { - this->unk_305 = 0; + this->isMourning = 0; } } @@ -387,7 +387,7 @@ void func_80AE2C1C(EnRd* this, PlayState* play) { void func_80AE2F50(EnRd* this, PlayState* play) { Animation_Change(&this->skelAnime, &gGibdoRedeadWalkAnim, 0.5f, 0, Animation_GetLastFrame(&gGibdoRedeadWalkAnim), ANIMMODE_LOOP_INTERP, -4.0f); - this->unk_31B = 2; + this->action = 2; EnRd_SetupAction(this, func_80AE2FD0); } @@ -409,8 +409,8 @@ void func_80AE2FD0(EnRd* this, PlayState* play) { } } - Math_SmoothStepToS(&this->unk_30E, 0, 1, 0x64, 0); - Math_SmoothStepToS(&this->unk_310, 0, 1, 0x64, 0); + Math_SmoothStepToS(&this->headYRotation, 0, 1, 0x64, 0); + Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 0x64, 0); this->actor.world.rot.y = this->actor.shape.rot.y; SkelAnime_Update(&this->skelAnime); @@ -424,7 +424,7 @@ void func_80AE2FD0(EnRd* this, PlayState* play) { if (this->actor.parent != NULL) { func_80AE31DC(this); } else { - this->unk_305 = 0; + this->isMourning = 0; } } @@ -438,8 +438,8 @@ void func_80AE2FD0(EnRd* this, PlayState* play) { void func_80AE31DC(EnRd* this) { Animation_Change(&this->skelAnime, &gGibdoRedeadWalkAnim, 0.5f, 0, Animation_GetLastFrame(&gGibdoRedeadWalkAnim), ANIMMODE_LOOP_INTERP, -4.0f); - this->unk_31B = 3; - this->unk_305 = 1; + this->action = 3; + this->isMourning = 1; EnRd_SetupAction(this, func_80AE3260); } @@ -465,8 +465,8 @@ void func_80AE3260(EnRd* this, PlayState* play) { } } - Math_SmoothStepToS(&this->unk_30E, 0, 1, 0x64, 0); - Math_SmoothStepToS(&this->unk_310, 0, 1, 0x64, 0); + Math_SmoothStepToS(&this->headYRotation, 0, 1, 0x64, 0); + Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 0x64, 0); } else { func_80AE2B90(this, play); } @@ -483,9 +483,9 @@ void func_80AE3260(EnRd* this, PlayState* play) { void func_80AE33F0(EnRd* this) { Animation_PlayOnce(&this->skelAnime, &gGibdoRedeadGrabStartAnim); - this->unk_30C = this->unk_304 = 0; - this->unk_319 = 200; - this->unk_31B = 8; + this->timer = this->grabState = 0; + this->grabDamageTimer = 200; + this->action = 8; this->actor.speedXZ = 0.0f; EnRd_SetupAction(this, func_80AE3454); } @@ -495,25 +495,25 @@ void func_80AE3454(EnRd* this, PlayState* play) { Player* player = GET_PLAYER(play); if (SkelAnime_Update(&this->skelAnime)) { - this->unk_304++; + this->grabState++; } - switch (this->unk_304) { + switch (this->grabState) { case 1: Animation_PlayLoop(&this->skelAnime, &gGibdoRedeadGrabAttackAnim); - this->unk_304++; + this->grabState++; play->damagePlayer(play, -8); func_800AA000(this->actor.xzDistToPlayer, 0xFF, 1, 0xC); - this->unk_319 = 20; + this->grabDamageTimer = 20; case 0: - Math_SmoothStepToS(&this->unk_30E, 0, 1, 0x5DC, 0); - Math_SmoothStepToS(&this->unk_310, 0, 1, 0x5DC, 0); + Math_SmoothStepToS(&this->headYRotation, 0, 1, 0x5DC, 0); + Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 0x5DC, 0); case 2: if (!(player->stateFlags2 & 0x80)) { Animation_Change(&this->skelAnime, &gGibdoRedeadGrabEndAnim, 0.5f, 0.0f, Animation_GetLastFrame(&gGibdoRedeadGrabEndAnim), ANIMMODE_ONCE_INTERP, 0.0f); - this->unk_304++; - this->unk_31B = 4; + this->grabState++; + this->action = 4; return; } @@ -533,12 +533,12 @@ void func_80AE3454(EnRd* this, PlayState* play) { if (this->skelAnime.curFrame == 0.0f) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_REDEAD_ATTACK); } - this->unk_319--; + this->grabDamageTimer--; - if (this->unk_319 == 0) { + if (this->grabDamageTimer == 0) { play->damagePlayer(play, -8); func_800AA000(this->actor.xzDistToPlayer, 0xF0, 1, 0xC); - this->unk_319 = 20; + this->grabDamageTimer = 20; Player_PlaySfx(&player->actor, NA_SE_VO_LI_DAMAGE_S + player->ageProperties->unk_92); } break; @@ -553,8 +553,8 @@ void func_80AE3454(EnRd* this, PlayState* play) { } this->actor.targetMode = 0; this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; - this->unk_306 = 0xA; - this->unk_307 = 0xF; + this->playerStunWaitTimer = 0xA; + this->grabWaitTimer = 0xF; func_80AE2B90(this, play); break; } @@ -563,7 +563,7 @@ void func_80AE3454(EnRd* this, PlayState* play) { void func_80AE37BC(EnRd* this) { Animation_Change(&this->skelAnime, &gGibdoRedeadLookBackAnim, 0.0f, 0.0f, Animation_GetLastFrame(&gGibdoRedeadLookBackAnim), ANIMMODE_ONCE, 0.0f); - this->unk_31B = 7; + this->action = 7; EnRd_SetupAction(this, func_80AE3834); } @@ -572,10 +572,11 @@ void func_80AE3834(EnRd* this, PlayState* play) { Color_RGBA8 sp30 = D_80AE4938; Color_RGBA8 sp2C = D_80AE493C; Player* player = GET_PLAYER(play); - s16 temp_v0 = this->actor.yawTowardsPlayer - this->actor.shape.rot.y - this->unk_30E - this->unk_310; + s16 temp_v0 = + this->actor.yawTowardsPlayer - this->actor.shape.rot.y - this->headYRotation - this->upperBodyYRotation; if (ABS(temp_v0) < 0x2008) { - if (!(this->unk_312 & 0x80) && GameInteractor_Should(VB_REDEAD_GIBDO_FREEZE_LINK, true, this)) { + if (!(this->rdFlags & 0x80) && GameInteractor_Should(VB_REDEAD_GIBDO_FREEZE_LINK, true, this)) { player->actor.freezeTimer = 60; func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96); Player_SetAutoLockOnActor(play, &this->actor); @@ -587,7 +588,7 @@ void func_80AE3834(EnRd* this, PlayState* play) { void func_80AE392C(EnRd* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gGibdoRedeadStandUpAnim, -4.0f); - this->unk_31B = 5; + this->action = 5; EnRd_SetupAction(this, func_80AE3978); } @@ -604,7 +605,7 @@ void func_80AE3978(EnRd* this, PlayState* play) { void func_80AE39D4(EnRd* this) { Animation_Change(&this->skelAnime, &gGibdoRedeadStandUpAnim, -1.0f, Animation_GetLastFrame(&gGibdoRedeadStandUpAnim), 0.0f, ANIMMODE_ONCE, -4.0f); - this->unk_31B = 6; + this->action = 6; EnRd_SetupAction(this, func_80AE3A54); } @@ -623,7 +624,7 @@ void func_80AE3A8C(EnRd* this) { this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; Audio_PlayActorSound2(&this->actor, NA_SE_EN_REDEAD_DAMAGE); - this->unk_31B = 9; + this->action = 9; EnRd_SetupAction(this, func_80AE3B18); } @@ -635,8 +636,8 @@ void func_80AE3B18(EnRd* this, PlayState* play) { } this->actor.world.rot.y = this->actor.yawTowardsPlayer; - Math_SmoothStepToS(&this->unk_30E, 0, 1, 0x12C, 0); - Math_SmoothStepToS(&this->unk_310, 0, 1, 0x12C, 0); + Math_SmoothStepToS(&this->headYRotation, 0, 1, 0x12C, 0); + Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 0x12C, 0); if (SkelAnime_Update(&this->skelAnime)) { this->actor.world.rot.y = this->actor.shape.rot.y; @@ -654,8 +655,8 @@ void func_80AE3B18(EnRd* this, PlayState* play) { void func_80AE3C20(EnRd* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gGibdoRedeadDeathAnim, -1.0f); - this->unk_31B = 10; - this->unk_30C = 300; + this->action = 10; + this->timer = 300; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; this->actor.speedXZ = 0.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EN_REDEAD_DEAD); @@ -668,28 +669,28 @@ void func_80AE3C98(EnRd* this, PlayState* play) { Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); } - Math_SmoothStepToS(&this->unk_30E, 0, 1, 0x7D0, 0); - Math_SmoothStepToS(&this->unk_310, 0, 1, 0x7D0, 0); + Math_SmoothStepToS(&this->headYRotation, 0, 1, 0x7D0, 0); + Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 0x7D0, 0); if (SkelAnime_Update(&this->skelAnime)) { - if (this->unk_30C == 0) { + if (this->timer == 0) { s8 enemyRandoCCActive = CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || (CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("Enabled"), 0)); // Don't set this flag in Enemy Rando as it can overlap with other objects using the same flag. - if (!Flags_GetSwitch(play, this->unk_312 & 0x7F) && !enemyRandoCCActive) { - Flags_SetSwitch(play, this->unk_312 & 0x7F); + if (!Flags_GetSwitch(play, this->rdFlags & 0x7F) && !enemyRandoCCActive) { + Flags_SetSwitch(play, this->rdFlags & 0x7F); } - if (this->unk_314 != 0) { - if (this->unk_314 == 0xB4) { + if (this->alpha != 0) { + if (this->alpha == 0xB4) { func_80AE2630(play, &this->actor, 0); } this->actor.scale.y -= 0.000075f; - this->unk_314 -= 5; + this->alpha -= 5; } else { Actor_Kill(&this->actor); } } else { - this->unk_30C--; + this->timer--; } } else if (((s32)this->skelAnime.curFrame == 33) || ((s32)this->skelAnime.curFrame == 40)) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_DOWN); @@ -697,15 +698,15 @@ void func_80AE3C98(EnRd* this, PlayState* play) { } void func_80AE3DE4(EnRd* this) { - this->unk_31B = 1; + this->action = 1; this->actor.speedXZ = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; if (gSaveContext.sunsSongState != SUNSSONG_INACTIVE) { - this->unk_318 = 1; - this->unk_316 = 0x258; + this->stunnedBySunsSong = 1; + this->sunsSongStunTimer = 0x258; Audio_PlayActorSound2(&this->actor, NA_SE_EN_LIGHT_ARROW_HIT); Actor_SetColorFilter(&this->actor, -0x8000, -0x7F38, 0, 0xFF); - } else if (this->unk_31C == 1) { + } else if (this->damageReaction == 1) { Actor_SetColorFilter(&this->actor, 0, 0xC8, 0, 0x50); } else { Audio_PlayActorSound2(&this->actor, NA_SE_EN_LIGHT_ARROW_HIT); @@ -715,13 +716,13 @@ void func_80AE3DE4(EnRd* this) { } void func_80AE3ECC(EnRd* this, PlayState* play) { - if ((this->unk_318 != 0) && (this->unk_316 != 0)) { - this->unk_316--; - if (this->unk_316 >= 0xFF) { + if ((this->stunnedBySunsSong != 0) && (this->sunsSongStunTimer != 0)) { + this->sunsSongStunTimer--; + if (this->sunsSongStunTimer >= 0xFF) { Actor_SetColorFilter(&this->actor, -0x8000, 0xC8, 0, 0xFF); } - if (this->unk_316 == 0) { - this->unk_318 = 0; + if (this->sunsSongStunTimer == 0) { + this->stunnedBySunsSong = 0; gSaveContext.sunsSongState = SUNSSONG_INACTIVE; } } @@ -742,57 +743,57 @@ void func_80AE3F9C(EnRd* this, PlayState* play) { s16 temp2; s16 temp3; - temp1 = this->actor.yawTowardsPlayer - (s16)(this->actor.shape.rot.y + this->unk_310); + temp1 = this->actor.yawTowardsPlayer - (s16)(this->actor.shape.rot.y + this->upperBodyYRotation); temp2 = CLAMP(temp1, -500, 500); - temp1 -= this->unk_30E; + temp1 -= this->headYRotation; temp3 = CLAMP(temp1, -500, 500); if ((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y) >= 0) { - this->unk_310 += ABS(temp2); - this->unk_30E += ABS(temp3); + this->upperBodyYRotation += ABS(temp2); + this->headYRotation += ABS(temp3); } else { - this->unk_310 -= ABS(temp2); - this->unk_30E -= ABS(temp3); + this->upperBodyYRotation -= ABS(temp2); + this->headYRotation -= ABS(temp3); } - this->unk_310 = CLAMP(this->unk_310, -18783, 18783); - this->unk_30E = CLAMP(this->unk_30E, -9583, 9583); + this->upperBodyYRotation = CLAMP(this->upperBodyYRotation, -18783, 18783); + this->headYRotation = CLAMP(this->headYRotation, -9583, 9583); } void func_80AE4114(EnRd* this, PlayState* play) { s32 pad; Player* player = GET_PLAYER(play); - if ((gSaveContext.sunsSongState != SUNSSONG_INACTIVE) && (this->actor.shape.rot.x == 0) && (this->unk_318 == 0) && - (this->unk_31B != 9) && (this->unk_31B != 10) && (this->unk_31B != 1)) { + if ((gSaveContext.sunsSongState != SUNSSONG_INACTIVE) && (this->actor.shape.rot.x == 0) && + (this->stunnedBySunsSong == 0) && (this->action != 9) && (this->action != 10) && (this->action != 1)) { func_80AE3DE4(this); return; } if (this->collider.base.acFlags & AC_HIT) { this->collider.base.acFlags &= ~AC_HIT; - this->unk_31C = this->actor.colChkInfo.damageEffect; + this->damageReaction = this->actor.colChkInfo.damageEffect; - if (this->unk_31B != 11) { + if (this->action != 11) { Actor_SetDropFlag(&this->actor, &this->collider.info, 1); if (player->unk_844 != 0) { this->unk_31D = player->unk_845; } - if ((this->unk_31C != 0) && (this->unk_31C != 6)) { - if (((this->unk_31C == 1) || (this->unk_31C == 13)) && (this->unk_31B != 1)) { + if ((this->damageReaction != 0) && (this->damageReaction != 6)) { + if (((this->damageReaction == 1) || (this->damageReaction == 13)) && (this->action != 1)) { Actor_ApplyDamage(&this->actor); func_80AE3DE4(this); return; } - this->unk_318 = 0; - this->unk_316 = 0; + this->stunnedBySunsSong = 0; + this->sunsSongStunTimer = 0; - if (this->unk_31C == 0xE) { + if (this->damageReaction == 0xE) { Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0x50); - this->unk_31A = 0x28; + this->fireTimer = 0x28; } else { Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); } @@ -818,25 +819,25 @@ void EnRd_Update(Actor* thisx, PlayState* play) { func_80AE4114(this, play); - if (gSaveContext.sunsSongState != SUNSSONG_INACTIVE && this->unk_318 == 0) { + if (gSaveContext.sunsSongState != SUNSSONG_INACTIVE && this->stunnedBySunsSong == 0) { gSaveContext.sunsSongState = SUNSSONG_INACTIVE; } - if (this->unk_31C != 6 && ((this->unk_31B != 11) || (this->unk_31C != 14))) { - if (this->unk_306 != 0) { - this->unk_306--; + if (this->damageReaction != 6 && ((this->action != 11) || (this->damageReaction != 14))) { + if (this->playerStunWaitTimer != 0) { + this->playerStunWaitTimer--; } this->actionFunc(this, play); - if (this->unk_31B != 8 && this->actor.speedXZ != 0.0f) { + if (this->action != 8 && this->actor.speedXZ != 0.0f) { Actor_MoveXZGravity(&this->actor); } - if ((this->actor.shape.rot.x == 0) && (this->unk_31B != 8) && (this->actor.speedXZ != 0.0f)) { + if ((this->actor.shape.rot.x == 0) && (this->action != 8) && (this->actor.speedXZ != 0.0f)) { Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 20.0f, 35.0f, 0x1D); } - if (this->unk_31B == 7) { + if (this->action == 7) { func_80AE3F9C(this, play); } } @@ -844,10 +845,10 @@ void EnRd_Update(Actor* thisx, PlayState* play) { this->actor.focus.pos = this->actor.world.pos; this->actor.focus.pos.y += 50.0f; - if ((this->actor.colChkInfo.health > 0) && (this->unk_31B != 8)) { + if ((this->actor.colChkInfo.health > 0) && (this->action != 8)) { Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); - if ((this->unk_31B != 9) || ((player->unk_844 != 0) && (player->unk_845 != this->unk_31D))) { + if ((this->action != 9) || ((player->unk_844 != 0) && (player->unk_845 != this->unk_31D))) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); } } @@ -857,9 +858,9 @@ s32 EnRd_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po EnRd* this = (EnRd*)thisx; if (limbIndex == 23) { - rot->y += this->unk_30E; + rot->y += this->headYRotation; } else if (limbIndex == 12) { - rot->y += this->unk_310; + rot->y += this->upperBodyYRotation; } return false; } @@ -870,7 +871,7 @@ void EnRd_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, s32 idx = -1; Vec3f destPos; - if ((this->unk_31A != 0) || ((this->actor.colorFilterTimer != 0) && (this->actor.colorFilterParams & 0x4000))) { + if ((this->fireTimer != 0) || ((this->actor.colorFilterTimer != 0) && (this->actor.colorFilterParams & 0x4000))) { switch (limbIndex - 1) { case 23: idx = 0; @@ -920,31 +921,31 @@ void EnRd_Draw(Actor* thisx, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); - if (this->unk_314 == 0xFF) { + if (this->alpha == 0xFF) { Gfx_SetupDL_25Opa(play->state.gfxCtx); - gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, this->unk_314); + gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, this->alpha); gSPSegment(POLY_OPA_DISP++, 8, &D_80116280[2]); POLY_OPA_DISP = SkelAnime_DrawFlex(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, EnRd_OverrideLimbDraw, EnRd_PostLimbDraw, this, POLY_OPA_DISP); func_80033C30(&thisPos, &D_80AE4958, 255, play); - if (this->unk_31A != 0) { + if (this->fireTimer != 0) { thisx->colorFilterTimer++; - this->unk_31A--; - if (this->unk_31A % 4 == 0) { - EffectSsEnFire_SpawnVec3s(play, thisx, &this->firePos[this->unk_31A >> 2], 0x4B, 0, 0, - (this->unk_31A >> 2)); + this->fireTimer--; + if (this->fireTimer % 4 == 0) { + EffectSsEnFire_SpawnVec3s(play, thisx, &this->firePos[this->fireTimer >> 2], 0x4B, 0, 0, + (this->fireTimer >> 2)); } } } else { Gfx_SetupDL_25Xlu(play->state.gfxCtx); - gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->unk_314); + gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha); gSPSegment(POLY_XLU_DISP++, 8, &D_80116280[0]); POLY_XLU_DISP = SkelAnime_DrawFlex(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, EnRd_OverrideLimbDraw, NULL, this, POLY_XLU_DISP); - func_80033C30(&thisPos, &D_80AE4958, this->unk_314, play); + func_80033C30(&thisPos, &D_80AE4958, this->alpha, play); } CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.h b/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.h index c7518f569..729d150d1 100644 --- a/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.h +++ b/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.h @@ -14,22 +14,22 @@ typedef struct EnRd { /* 0x0188 */ SkelAnime skelAnime; /* 0x01CC */ Vec3s jointTable[26]; /* 0x0268 */ Vec3s morphTable[26]; - /* 0x0304 */ u8 unk_304; - /* 0x0305 */ u8 unk_305; - /* 0x0306 */ u8 unk_306; - /* 0x0307 */ u8 unk_307; + /* 0x0304 */ u8 grabState; + /* 0x0305 */ u8 isMourning; + /* 0x0306 */ u8 playerStunWaitTimer; + /* 0x0307 */ u8 grabWaitTimer; /* 0x0308 */ EnRdActionFunc actionFunc; - /* 0x030C */ s16 unk_30C; - /* 0x030E */ s16 unk_30E; - /* 0x0310 */ s16 unk_310; - /* 0x0312 */ s16 unk_312; - /* 0x0314 */ s16 unk_314; - /* 0x0316 */ s16 unk_316; - /* 0x0318 */ u8 unk_318; - /* 0x0319 */ u8 unk_319; - /* 0x031A */ u8 unk_31A; - /* 0x031B */ u8 unk_31B; - /* 0x031C */ u8 unk_31C; + /* 0x030C */ s16 timer; + /* 0x030E */ s16 headYRotation; + /* 0x0310 */ s16 upperBodyYRotation; + /* 0x0312 */ s16 rdFlags; + /* 0x0314 */ s16 alpha; + /* 0x0316 */ s16 sunsSongStunTimer; + /* 0x0318 */ u8 stunnedBySunsSong; + /* 0x0319 */ u8 grabDamageTimer; + /* 0x031A */ u8 fireTimer; + /* 0x031B */ u8 action; + /* 0x031C */ u8 damageReaction; /* 0x031D */ u8 unk_31D; /* 0x0320 */ ColliderCylinder collider; } EnRd; // size = 0x036C diff --git a/soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c b/soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c index 0a9f228b6..746265b45 100644 --- a/soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c +++ b/soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c @@ -131,7 +131,7 @@ void EnReeba_Init(Actor* thisx, PlayState* play) { Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); } - this->actor.shape.yOffset = this->unk_284 = this->scale * -27500.0f; + this->actor.shape.yOffset = this->yOffsetTarget = this->scale * -27500.0f; ActorShape_Init(&this->actor.shape, this->actor.shape.yOffset, ActorShadow_DrawCircle, 0.0f); this->actor.colChkInfo.damageTable = &sDamageTable; Actor_UpdateBgCheckInfo(play, &this->actor, 35.0f, 60.0f, 60.0f, 0x1D); @@ -177,12 +177,12 @@ void func_80AE4F40(EnReeba* this, PlayState* play) { Animation_Change(&this->skelanime, &object_reeba_Anim_0001E4, 2.0f, 0.0f, frames, ANIMMODE_LOOP, -10.0f); playerSpeed = fabsf(player->linearVelocity); - this->unk_278 = 20 - playerSpeed * 2; - if (this->unk_278 < 0) { - this->unk_278 = 2; + this->waitTimer = 20 - playerSpeed * 2; + if (this->waitTimer < 0) { + this->waitTimer = 2; } - if (this->unk_278 > 20) { - this->unk_278 = 20; + if (this->waitTimer > 20) { + this->waitTimer = 20; } this->actor.flags &= ~ACTOR_FLAG_LOCK_ON_DISABLED; @@ -208,17 +208,17 @@ void func_80AE5054(EnReeba* this, PlayState* play) { 500, 10, true); } - if (this->unk_278 == 0) { + if (this->waitTimer == 0) { Math_ApproachF(&this->actor.shape.shadowScale, 12.0f, 1.0f, 1.0f); if (this->actor.shape.yOffset < 0.0f) { - Math_ApproachZeroF(&this->actor.shape.yOffset, 1.0f, this->unk_288); - Math_ApproachF(&this->unk_288, 300.0f, 1.0f, 5.0f); + Math_ApproachZeroF(&this->actor.shape.yOffset, 1.0f, this->yOffsetStep); + Math_ApproachF(&this->yOffsetStep, 300.0f, 1.0f, 5.0f); } else { - this->unk_288 = 0.0f; + this->yOffsetStep = 0.0f; this->actor.shape.yOffset = 0.0f; playerLinearVel = player->linearVelocity; - switch (this->unk_280) { + switch (this->aimType) { case 0: this->actor.world.rot.y = this->actor.yawTowardsPlayer; break; @@ -239,7 +239,7 @@ void func_80AE5054(EnReeba* this, PlayState* play) { if (this->isBig) { this->actionfunc = func_80AE538C; } else { - this->unk_272 = 130; + this->moveTimer = 130; this->actor.speedXZ = Rand_ZeroFloat(4.0f) + 6.0f; this->actionfunc = func_80AE5270; } @@ -261,12 +261,12 @@ void func_80AE5270(EnReeba* this, PlayState* play) { if ((surfaceType != 4) && (surfaceType != 7)) { this->actor.speedXZ = 0.0f; this->actionfunc = func_80AE5688; - } else if ((this->unk_272 == 0) || (this->actor.xzDistToPlayer < 30.0f) || (this->actor.xzDistToPlayer > 400.0f) || - (this->actor.bgCheckFlags & 8)) { + } else if ((this->moveTimer == 0) || (this->actor.xzDistToPlayer < 30.0f) || + (this->actor.xzDistToPlayer > 400.0f) || (this->actor.bgCheckFlags & 8)) { this->actionfunc = func_80AE5688; - } else if (this->unk_274 == 0) { + } else if (this->sfxTimer == 0) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIVA_MOVE); - this->unk_274 = 10; + this->sfxTimer = 10; } } @@ -293,8 +293,8 @@ void func_80AE53AC(EnReeba* this, PlayState* play) { (this->actor.bgCheckFlags & 8)) { this->actionfunc = func_80AE5688; } else { - if ((this->actor.xzDistToPlayer < 70.0f) && (this->unk_270 == 0)) { - this->unk_270 = 30; + if ((this->actor.xzDistToPlayer < 70.0f) && (this->bigLeeverTimer == 0)) { + this->bigLeeverTimer = 30; } speed = (this->actor.xzDistToPlayer - 20.0f) / ((Rand_ZeroOne() * 50.0f) + 150.0f); @@ -306,14 +306,14 @@ void func_80AE53AC(EnReeba* this, PlayState* play) { this->actor.speedXZ = -3.0f; } - yawDiff = (this->unk_270 == 0) ? this->actor.yawTowardsPlayer : -this->actor.yawTowardsPlayer; + yawDiff = (this->bigLeeverTimer == 0) ? this->actor.yawTowardsPlayer : -this->actor.yawTowardsPlayer; yawDiff -= this->actor.world.rot.y; yaw = (yawDiff > 0) ? ((yawDiff / 31.0f) + 10.0f) : ((yawDiff / 31.0f) - 10.0f); this->actor.world.rot.y += yaw * 2.0f; - if (this->unk_274 == 0) { + if (this->sfxTimer == 0) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIVA_MOVE); - this->unk_274 = 20; + this->sfxTimer = 20; } } } @@ -321,7 +321,7 @@ void func_80AE53AC(EnReeba* this, PlayState* play) { void func_80AE561C(EnReeba* this, PlayState* play) { Math_ApproachZeroF(&this->actor.speedXZ, 1.0f, 0.3f); - if (this->unk_272 == 0) { + if (this->moveTimer == 0) { if (this->isBig) { this->actionfunc = func_80AE538C; } else { @@ -331,7 +331,7 @@ void func_80AE561C(EnReeba* this, PlayState* play) { } void func_80AE5688(EnReeba* this, PlayState* play) { - this->unk_27E = 0; + this->stunType = 0; Audio_PlayActorSound2(&this->actor, NA_SE_EN_AKINDONUTS_HIDE); this->actor.flags |= ACTOR_FLAG_LOCK_ON_DISABLED; this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE); @@ -343,21 +343,21 @@ void func_80AE56E0(EnReeba* this, PlayState* play) { Math_ApproachZeroF(&this->actor.speedXZ, 0.1f, 0.3f); SkelAnime_Update(&this->skelanime); - if ((this->unk_284 + 10.0f) <= this->actor.shape.yOffset) { + if ((this->yOffsetTarget + 10.0f) <= this->actor.shape.yOffset) { if ((play->gameplayFrames % 4) == 0) { Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1, 8.0f, 500, 10, true); } - Math_ApproachF(&this->actor.shape.yOffset, this->unk_284, 1.0f, this->unk_288); - Math_ApproachF(&this->unk_288, 300.0f, 1.0f, 5.0f); + Math_ApproachF(&this->actor.shape.yOffset, this->yOffsetTarget, 1.0f, this->yOffsetStep); + Math_ApproachF(&this->yOffsetStep, 300.0f, 1.0f, 5.0f); } else { Actor_Kill(&this->actor); } } void func_80AE57F0(EnReeba* this, PlayState* play) { - this->unk_276 = 14; + this->damagedTimer = 14; this->actor.speedXZ = -8.0f; this->actor.world.rot.y = this->actor.yawTowardsPlayer; Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); @@ -371,9 +371,9 @@ void func_80AE5854(EnReeba* this, PlayState* play) { this->actor.speedXZ += 1.0f; } - if (this->unk_276 == 0) { + if (this->damagedTimer == 0) { if (this->isBig) { - this->unk_270 = 30; + this->bigLeeverTimer = 30; this->actionfunc = func_80AE538C; } else { this->actionfunc = func_80AE5688; @@ -382,7 +382,7 @@ void func_80AE5854(EnReeba* this, PlayState* play) { } void func_80AE58EC(EnReeba* this, PlayState* play) { - this->unk_278 = 14; + this->waitTimer = 14; this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actor.speedXZ = -8.0f; this->actor.flags |= ACTOR_FLAG_LOCK_ON_DISABLED; @@ -394,15 +394,15 @@ void func_80AE5938(EnReeba* this, PlayState* play) { Vec3f pos; f32 scale; - if (this->unk_278 != 0) { + if (this->waitTimer != 0) { if (this->actor.speedXZ < 0.0f) { this->actor.speedXZ += 1.0f; } } else { this->actor.speedXZ = 0.0f; - if ((this->unk_27E == 4) || (this->actor.colChkInfo.health != 0)) { - if (this->unk_27E == 2) { + if ((this->stunType == 4) || (this->actor.colChkInfo.health != 0)) { + if (this->stunType == 2) { pos.x = this->actor.world.pos.x + Rand_CenteredFloat(20.0f); pos.y = this->actor.world.pos.y + Rand_CenteredFloat(20.0f); pos.z = this->actor.world.pos.z + Rand_CenteredFloat(20.0f); @@ -415,10 +415,10 @@ void func_80AE5938(EnReeba* this, PlayState* play) { EffectSsEnIce_SpawnFlyingVec3f(play, &this->actor, &pos, 150, 150, 150, 250, 235, 245, 255, scale); } - this->unk_278 = 66; + this->waitTimer = 66; this->actionfunc = func_80AE5E48; } else { - this->unk_278 = 30; + this->waitTimer = 30; this->actionfunc = func_80AE5A9C; } } @@ -428,8 +428,8 @@ void func_80AE5A9C(EnReeba* this, PlayState* play) { Vec3f pos; f32 scale; - if (this->unk_278 != 0) { - if ((this->unk_27E == 2) && ((this->unk_278 & 0xF) == 0)) { + if (this->waitTimer != 0) { + if ((this->stunType == 2) && ((this->waitTimer & 0xF) == 0)) { pos.x = this->actor.world.pos.x + Rand_CenteredFloat(20.0f); pos.y = this->actor.world.pos.y + Rand_CenteredFloat(20.0f); pos.z = this->actor.world.pos.z + Rand_CenteredFloat(20.0f); @@ -453,7 +453,7 @@ void func_80AE5BC4(EnReeba* this, PlayState* play) { this->actor.speedXZ = -8.0f; this->actor.world.rot.y = this->actor.yawTowardsPlayer; Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); - this->unk_278 = 14; + this->waitTimer = 14; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; this->actionfunc = func_80AE5C38; } @@ -463,7 +463,7 @@ void func_80AE5C38(EnReeba* this, PlayState* play) { Vec3f accel = { 0.0f, 0.0f, 0.0f }; Vec3f velocity = { 0.0f, 0.0f, 0.0f }; - if (this->unk_278 != 0) { + if (this->waitTimer != 0) { if (this->actor.speedXZ < 0.0f) { this->actor.speedXZ += 1.0f; } @@ -507,11 +507,11 @@ void func_80AE5C38(EnReeba* this, PlayState* play) { } void func_80AE5E48(EnReeba* this, PlayState* play) { - if (this->unk_278 < 37) { + if (this->waitTimer < 37) { this->actor.shape.rot.x = Rand_CenteredFloat(3000.0f); this->actor.shape.rot.z = Rand_CenteredFloat(3000.0f); - if (this->unk_278 == 0) { + if (this->waitTimer == 0) { if (this->isBig) { this->actionfunc = func_80AE538C; } else { @@ -527,28 +527,28 @@ void func_80AE5EDC(EnReeba* this, PlayState* play) { if ((this->actionfunc != func_80AE5C38) && (this->actionfunc != func_80AE5854)) { this->actor.shape.rot.x = this->actor.shape.rot.z = 0; - this->unk_27E = 0; + this->stunType = 0; switch (this->actor.colChkInfo.damageEffect) { case 11: // none case 12: // boomerang - if ((this->actor.colChkInfo.health > 1) && (this->unk_27E != 4)) { - this->unk_27E = 4; + if ((this->actor.colChkInfo.health > 1) && (this->stunType != 4)) { + this->stunType = 4; Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 0x50); this->actionfunc = func_80AE58EC; break; } case 13: // hookshot/longshot - if ((this->actor.colChkInfo.health > 2) && (this->unk_27E != 4)) { - this->unk_27E = 4; + if ((this->actor.colChkInfo.health > 2) && (this->stunType != 4)) { + this->stunType = 4; Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 0x50); Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); this->actionfunc = func_80AE58EC; break; } case 14: - this->unk_27C = 6; + this->unkDamageField = 6; Actor_ApplyDamage(&this->actor); if (this->actor.colChkInfo.health == 0) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIVA_DEAD); @@ -564,14 +564,14 @@ void func_80AE5EDC(EnReeba* this, PlayState* play) { break; case 3: // ice arrows/ice magic Actor_ApplyDamage(&this->actor); - this->unk_27C = 2; - this->unk_27E = 2; + this->unkDamageField = 2; + this->stunType = 2; Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 80); this->actionfunc = func_80AE58EC; break; case 1: // unknown - if (this->unk_27E != 4) { - this->unk_27E = 4; + if (this->stunType != 4) { + this->stunType = 4; Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 80); this->actionfunc = func_80AE58EC; } @@ -590,24 +590,24 @@ void EnReeba_Update(Actor* thisx, PlayState* play2) { this->actionfunc(this, play); Actor_SetScale(&this->actor, this->scale); - if (this->unk_270 != 0) { - this->unk_270--; + if (this->bigLeeverTimer != 0) { + this->bigLeeverTimer--; } - if (this->unk_272 != 0) { - this->unk_272--; + if (this->moveTimer != 0) { + this->moveTimer--; } - if (this->unk_278 != 0) { - this->unk_278--; + if (this->waitTimer != 0) { + this->waitTimer--; } - if (this->unk_274 != 0) { - this->unk_274--; + if (this->sfxTimer != 0) { + this->sfxTimer--; } - if (this->unk_276 != 0) { - this->unk_276--; + if (this->damagedTimer != 0) { + this->damagedTimer--; } Actor_MoveXZGravity(&this->actor); @@ -619,7 +619,7 @@ void EnReeba_Update(Actor* thisx, PlayState* play2) { if ((this->actionfunc == func_80AE5270) || (this->actionfunc == func_80AE53AC)) { this->actor.speedXZ = 8.0f; this->actor.world.rot.y *= -1.0f; - this->unk_272 = 14; + this->moveTimer = 14; this->actionfunc = func_80AE561C; return; } diff --git a/soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.h b/soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.h index 6d31a41dc..54d400384 100644 --- a/soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.h +++ b/soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.h @@ -15,17 +15,17 @@ typedef struct EnReeba { /* 0x01FC */ Vec3s morphTable[18]; /* 0x0268 */ char unk_268[0x4]; /* 0x026C */ EnReebaActionFunc actionfunc; - /* 0x0270 */ s16 unk_270; - /* 0x0272 */ s16 unk_272; - /* 0x0274 */ s16 unk_274; - /* 0x0276 */ s16 unk_276; - /* 0x0278 */ s16 unk_278; + /* 0x0270 */ s16 bigLeeverTimer; + /* 0x0272 */ s16 moveTimer; + /* 0x0274 */ s16 sfxTimer; + /* 0x0276 */ s16 damagedTimer; + /* 0x0278 */ s16 waitTimer; /* 0x027A */ s16 isBig; - /* 0x027C */ s16 unk_27C; - /* 0x027E */ s16 unk_27E; - /* 0x0280 */ s16 unk_280; - /* 0x0284 */ f32 unk_284; - /* 0x0288 */ f32 unk_288; + /* 0x027C */ s16 unkDamageField; + /* 0x027E */ s16 stunType; + /* 0x0280 */ s16 aimType; + /* 0x0284 */ f32 yOffsetTarget; + /* 0x0288 */ f32 yOffsetStep; /* 0x028C */ f32 scale; /* 0x0290 */ ColliderCylinder collider; } EnReeba; // size = 0x02DC diff --git a/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index e03a8ed20..a5dd7441e 100644 --- a/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -157,10 +157,10 @@ void func_80AEAC54(EnRu1* this, PlayState* play) { s32 pad[5]; Collider_UpdateCylinder(&this->actor, &this->collider2); - if (this->unk_34C != 0) { + if (this->isSittingOCActive != 0) { CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider2.base); } else if (this->actor.xzDistToPlayer > 32.0f) { - this->unk_34C = 1; + this->isSittingOCActive = 1; } } @@ -187,7 +187,7 @@ void EnRu1_DestroyColliders(EnRu1* this, PlayState* play) { } void func_80AEADD8(EnRu1* this) { - this->unk_34C = 0; + this->isSittingOCActive = 0; } u8 func_80AEADE0(EnRu1* this) { @@ -437,10 +437,10 @@ void EnRu1_SpawnRipple(EnRu1* this, PlayState* play, s16 radiusMax, s16 life) { } void func_80AEB50C(EnRu1* this, PlayState* play) { - this->unk_270 += 1.0f; - if (this->unk_270 >= kREG(3) + 10.0f) { + this->treadTimer += 1.0f; + if (this->treadTimer >= kREG(3) + 10.0f) { EnRu1_SpawnRipple(this, play, kREG(1) + 500, 0); - this->unk_270 = 0.0f; + this->treadTimer = 0.0f; } } @@ -548,7 +548,7 @@ void func_80AEBA0C(EnRu1* this, PlayState* play) { void func_80AEBA2C(EnRu1* this, PlayState* play) { s32 pad; - Vec3f* unk_364 = &this->unk_364; + Vec3f* unk_364 = &this->treadStartPos; Vec3f* thisPos; f32 temp_ret_2; CsCmdActorCue* csCmdNPCAction = func_80AEB438(play); @@ -670,7 +670,7 @@ void func_80AEBF60(EnRu1* this, PlayState* play) { if (func_80AEB480(play, 6)) { func_80AEB7D0(this); this->action = 5; - this->unk_364 = this->actor.world.pos; + this->treadStartPos = this->actor.world.pos; } else { func_80AEBA0C(this, play); } @@ -791,7 +791,7 @@ void func_80AEC320(EnRu1* this, PlayState* play) { } void func_80AEC40C(EnRu1* this) { - f32 unk_26C = this->unk_26C; + f32 unk_26C = this->walkingFrame; if (unk_26C < 8.0f) { this->actor.speedXZ = (((kREG(3) * 0.01f) + 2.7f) / 8.0f) * unk_26C; @@ -809,9 +809,9 @@ void func_80AEC4CC(EnRu1* this) { void func_80AEC4F4(EnRu1* this) { f32* speedXZ = &this->actor.speedXZ; - f32* unk_26C = &this->unk_26C; + f32* unk_26C = &this->walkingFrame; - if (this->unk_26C < 8.0f) { + if (this->walkingFrame < 8.0f) { *unk_26C += 1.0f; *speedXZ *= (8.0f - *unk_26C) / 8.0f; this->actor.velocity.y = -*unk_26C * (((kREG(4) * 0.01f) + 13.0f) / 8.0f); @@ -836,7 +836,7 @@ s32 func_80AEC5FC(EnRu1* this, PlayState* play) { void func_80AEC650(EnRu1* this) { s32 pad[2]; - if (this->unk_280 == 0) { + if (this->isFalling == 0) { if (Animation_OnFrame(&this->skelAnime, 2.0f) || Animation_OnFrame(&this->skelAnime, 7.0f)) { Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_PL_WALK_DIRT); } @@ -849,10 +849,10 @@ void func_80AEC6B0(EnRu1* this) { } void func_80AEC6E4(EnRu1* this, PlayState* play) { - if ((func_80AEAFA0(play, 4, 3)) && (this->unk_280 == 0)) { + if ((func_80AEAFA0(play, 4, 3)) && (this->isFalling == 0)) { Animation_Change(&this->skelAnime, &gRutoChildBringArmsUpAnim, 1.0f, 0, Animation_GetLastFrame(&gRutoChildBringArmsUpAnim), ANIMMODE_ONCE, -8.0f); - this->unk_280 = 1; + this->isFalling = 1; func_80AEC6B0(this); } } @@ -907,15 +907,15 @@ void func_80AEC93C(EnRu1* this, UNK_TYPE arg1) { ANIMMODE_LOOP, -8.0f); this->actor.world.rot.y += 0x8000; this->action = 0xB; - this->unk_26C = 0.0f; + this->walkingFrame = 0.0f; } } void func_80AEC9C4(EnRu1* this) { - this->unk_26C += 1.0f; - if (this->unk_26C >= 8.0f) { + this->walkingFrame += 1.0f; + if (this->walkingFrame >= 8.0f) { this->action = 12; - this->unk_26C = 0.0f; + this->walkingFrame = 0.0f; this->actor.velocity.y = -1.0f; } } @@ -923,7 +923,7 @@ void func_80AEC9C4(EnRu1* this) { void func_80AECA18(EnRu1* this) { if (!(this->actor.bgCheckFlags & 1)) { this->action = 13; - this->unk_26C = 0.0f; + this->walkingFrame = 0.0f; this->actor.velocity.y = 0.0f; } } @@ -1030,7 +1030,7 @@ void func_80AECE20(EnRu1* this, PlayState* play) { Vec3f* playerPos = &player->actor.world.pos; s16 shapeRotY = player->actor.shape.rot.y; s32 pad; - f32 unk_27C = this->unk_27C; + f32 unk_27C = this->xzDistToPlayerInBlueWarp; Vec3f* pos = &this->actor.world.pos; pos->x = (Math_SinS(shapeRotY) * unk_27C) + playerPos->x; @@ -1058,8 +1058,8 @@ s32 func_80AECF6C(EnRu1* this, PlayState* play) { f32 temp2; s32 pad2[5]; - this->unk_26C += 1.0f; - if ((player->actor.speedXZ == 0.0f) && (this->unk_26C >= 3.0f)) { + this->walkingFrame += 1.0f; + if ((player->actor.speedXZ == 0.0f) && (this->walkingFrame >= 3.0f)) { otherPlayer = GET_PLAYER(play); player->actor.world.pos.x = otherPlayer->unk_450.x; player->actor.world.pos.y = otherPlayer->unk_450.y; @@ -1114,7 +1114,7 @@ void func_80AED110(EnRu1* this) { void func_80AED154(EnRu1* this, PlayState* play) { if (func_80AED084(this, WARP_BLUE_RUTO_STATE_ENTERED)) { this->action = 0x13; - this->unk_26C = 0.0f; + this->walkingFrame = 0.0f; func_80AECEB4(this, play); } } @@ -1139,7 +1139,7 @@ void func_80AED218(EnRu1* this, UNK_TYPE arg1) { Animation_Change(&this->skelAnime, &gRutoChildWaitInBlueWarpAnim, 1.0f, 0, Animation_GetLastFrame(&gRutoChildWaitInBlueWarpAnim), ANIMMODE_ONCE, -8.0f); this->action = 21; - this->unk_27C = this->actor.xzDistToPlayer; + this->xzDistToPlayerInBlueWarp = this->actor.xzDistToPlayer; } } @@ -1294,28 +1294,28 @@ void func_80AED83C(EnRu1* this) { void func_80AED8DC(EnRu1* this) { s32 temp_hi; - s16* unk_2AC = &this->unk_2AC; + s16* unk_2AC = &this->headRotTimer; s16* someY = &this->interactInfo.headRot.y; - s16* unk_29E = &this->unk_29E; + s16* unk_29E = &this->headTurnSpeed; s32 pad[2]; if (DECR(*unk_2AC) == 0) { *unk_2AC = Rand_S16Offset(0xA, 0x19); temp_hi = *unk_2AC % 5; if (temp_hi == 0) { - this->unk_2B0 = 1; + this->headRotDirection = 1; } else if (temp_hi == 1) { - this->unk_2B0 = 2; + this->headRotDirection = 2; } else { - this->unk_2B0 = 0; + this->headRotDirection = 0; } *unk_29E = 0; } - if (this->unk_2B0 == 0) { + if (this->headRotDirection == 0) { Math_SmoothStepToS(unk_29E, 0 - *someY, 1, 0x190, 0x190); Math_SmoothStepToS(someY, 0, 3, ABS(*unk_29E), 0x64); - } else if (this->unk_2B0 == 1) { + } else if (this->headRotDirection == 1) { Math_SmoothStepToS(unk_29E, -0x2AAA - *someY, 1, 0x190, 0x190); Math_SmoothStepToS(someY, -0x2AAA, 3, ABS(*unk_29E), 0x64); } else { @@ -1458,13 +1458,13 @@ void func_80AEE050(EnRu1* this) { f32 temp_f10; EnRu1* thisx = this; // necessary to match - if (this->unk_350 == 0) { + if (this->waterState == 0) { if ((this->actor.minVelocityY == 0.0f) && (this->actor.speedXZ == 0.0f)) { - this->unk_350 = 1; + this->waterState = 1; func_80AEE02C(this); - this->unk_35C = 0; - this->unk_358 = (this->actor.yDistToWater - 10.0f) * 0.5f; - this->unk_354 = this->actor.world.pos.y + thisx->unk_358; // thisx only used here + this->bobPhase = 0; + this->bobDepth = (this->actor.yDistToWater - 10.0f) * 0.5f; + this->sinkingStartPosY = this->actor.world.pos.y + thisx->bobDepth; // thisx only used here } else { this->actor.gravity = 0.0f; this->actor.minVelocityY *= 0.2f; @@ -1482,23 +1482,23 @@ void func_80AEE050(EnRu1* this) { Actor_UpdatePos(&this->actor); } } else { - if (this->unk_350 == 1) { - if (this->unk_358 <= 1.0f) { + if (this->waterState == 1) { + if (this->bobDepth <= 1.0f) { func_80AEE02C(this); - this->unk_350 = 2; - this->unk_360 = 0.0f; + this->waterState = 2; + this->isSinking = 0.0f; } else { - sp28 = this->unk_358; - sp24 = this->unk_354; - temp_f10 = Math_CosS(this->unk_35C) * -sp28; + sp28 = this->bobDepth; + sp24 = this->sinkingStartPosY; + temp_f10 = Math_CosS(this->bobPhase) * -sp28; this->actor.world.pos.y = temp_f10 + sp24; - this->unk_35C += 0x3E8; - this->unk_358 *= 0.95f; + this->bobPhase += 0x3E8; + this->bobDepth *= 0.95f; } } else { - this->unk_360 += 1.0f; - if (this->unk_360 > 0.0f) { - this->unk_350 = 3; + this->isSinking += 1.0f; + if (this->isSinking > 0.0f) { + this->waterState = 3; } } } @@ -1591,7 +1591,7 @@ void func_80AEE568(EnRu1* this, PlayState* play) { func_80AEADD8(this); } else if (this->actor.yDistToWater > 0.0f) { this->action = 29; - this->unk_350 = 0; + this->waterState = 0; } } } @@ -1622,7 +1622,7 @@ s32 func_80AEE6D0(EnRu1* this, PlayState* play) { Animation_GetLastFrame(&gRutoChildSquirmAnim), ANIMMODE_LOOP, -8.0f); func_80AED600(this); this->action = 34; - this->unk_26C = 0.0f; + this->walkingFrame = 0.0f; play->csCtx.segment = &D_80AF1728; gSaveContext.cutsceneTrigger = 1; } @@ -1637,7 +1637,7 @@ void func_80AEE7C4(EnRu1* this, PlayState* play) { f32 frameCount; s32 pad[13]; Player* player; - f32* unk_370 = &this->unk_370; + f32* unk_370 = &this->carryIdleTimer; if (Actor_HasNoParent(&this->actor, play)) { frameCount = Animation_GetLastFrame(&gRutoChildSittingAnim); @@ -1660,7 +1660,7 @@ void func_80AEE7C4(EnRu1* this, PlayState* play) { player = GET_PLAYER(play); if (player->stateFlags2 & PLAYER_STATE2_IDLE_FIDGET) { - this->unk_370 += 1.0f; + this->carryIdleTimer += 1.0f; if (this->action != 32) { if (*unk_370 > 30.0f) { if (Rand_S16Offset(0, 3) == 0) { @@ -1699,7 +1699,7 @@ s32 func_80AEEAC8(EnRu1* this, PlayState* play) { } void func_80AEEB24(EnRu1* this, PlayState* play) { - if ((func_80AEEAC8(this, play) == 0) && (this->unk_350 == 3)) { + if ((func_80AEEAC8(this, play) == 0) && (this->waterState == 3)) { this->action = 30; func_80AEE02C(this); this->actor.gravity = -0.1f; @@ -2295,11 +2295,12 @@ s32 EnRu1_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p Gfx** gfx) { EnRu1* this = (EnRu1*)thisx; - if ((this->unk_290 < 0) || (this->unk_290 > 0) || (*sPreLimbDrawFuncs[this->unk_290] == NULL)) { + if ((this->preLimbDrawIndex < 0) || (this->preLimbDrawIndex > 0) || + (*sPreLimbDrawFuncs[this->preLimbDrawIndex] == NULL)) { // "Neck rotation mode is improper!" osSyncPrintf(VT_FGCOL(RED) "首回しモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); } else { - sPreLimbDrawFuncs[this->unk_290](this, play, limbIndex, rot); + sPreLimbDrawFuncs[this->preLimbDrawIndex](this, play, limbIndex, rot); } return false; } diff --git a/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h b/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h index 59a553bae..f0d0ffe0f 100644 --- a/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h +++ b/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h @@ -23,37 +23,37 @@ typedef struct EnRu1 { /* 0x0260 */ s16 mouthIndex; /* 0x0264 */ s32 action; /* 0x0268 */ s32 drawConfig; - /* 0x026C */ f32 unk_26C; - /* 0x0270 */ f32 unk_270; + /* 0x026C */ f32 walkingFrame; + /* 0x0270 */ f32 treadTimer; /* 0x0274 */ char unk_274[0x4]; /* 0x0278 */ DoorWarp1* blueWarp; - /* 0x027C */ f32 unk_27C; - /* 0x0280 */ s32 unk_280; + /* 0x027C */ f32 xzDistToPlayerInBlueWarp; + /* 0x0280 */ s32 isFalling; /* 0x0284 */ s8 roomNum1; /* 0x0285 */ s8 roomNum2; /* 0x0286 */ s8 roomNum3; /* 0x0288 */ f32 unk_288; /* 0x028C */ BgBdanObjects* unk_28C; - /* 0x0290 */ s32 unk_290; + /* 0x0290 */ s32 preLimbDrawIndex; /* 0x0294 */ char unk_294[0x4]; /* 0x0298 */ s32 unk_298; /* 0x029C */ char unk_29C[0x2]; - /* 0x029E */ s16 unk_29E; + /* 0x029E */ s16 headTurnSpeed; /* 0x02A0 */ char unk_2A0[0x4]; /* 0x02A4 */ f32 unk_2A4; /* 0x02A8 */ s32 alpha; - /* 0x02AC */ s16 unk_2AC; - /* 0x02B0 */ s32 unk_2B0; + /* 0x02AC */ s16 headRotTimer; + /* 0x02B0 */ s32 headRotDirection; /* 0x02B4 */ ColliderCylinder collider; /* 0x0300 */ ColliderCylinder collider2; - /* 0x034C */ s32 unk_34C; - /* 0x0350 */ s32 unk_350; - /* 0x0354 */ f32 unk_354; - /* 0x0358 */ f32 unk_358; - /* 0x035C */ s16 unk_35C; - /* 0x0360 */ f32 unk_360; - /* 0x0364 */ Vec3f unk_364; - /* 0x0370 */ f32 unk_370; + /* 0x034C */ s32 isSittingOCActive; + /* 0x0350 */ s32 waterState; + /* 0x0354 */ f32 sinkingStartPosY; + /* 0x0358 */ f32 bobDepth; + /* 0x035C */ s16 bobPhase; + /* 0x0360 */ f32 isSinking; + /* 0x0364 */ Vec3f treadStartPos; + /* 0x0370 */ f32 carryIdleTimer; /* 0x0374 */ NpcInteractInfo interactInfo; } EnRu1; // size = 0x039C diff --git a/soh/src/overlays/actors/ovl_En_Skb/z_en_skb.c b/soh/src/overlays/actors/ovl_En_Skb/z_en_skb.c index b7612dd91..e8dcebae7 100644 --- a/soh/src/overlays/actors/ovl_En_Skb/z_en_skb.c +++ b/soh/src/overlays/actors/ovl_En_Skb/z_en_skb.c @@ -205,7 +205,7 @@ void func_80AFCD60(EnSkb* this) { void func_80AFCDF8(EnSkb* this) { Animation_PlayOnceSetSpeed(&this->skelAnime, &gStalchildUncurlingAnim, 1.0f); - this->unk_280 = 0; + this->actionState = 0; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIVA_APPEAR); EnSkb_SetupAction(this, func_80AFCE5C); @@ -231,8 +231,8 @@ void func_80AFCE5C(EnSkb* this, PlayState* play) { void func_80AFCF48(EnSkb* this) { Animation_Change(&this->skelAnime, &gStalchildUncurlingAnim, -1.0f, Animation_GetLastFrame(&gStalchildUncurlingAnim), 0.0f, ANIMMODE_ONCE, -4.0f); - this->unk_280 = 0; - this->unk_281 = 0; + this->actionState = 0; + this->setColliderAT = 0; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; this->actor.speedXZ = 0.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EN_AKINDONUTS_HIDE); @@ -253,8 +253,8 @@ void func_80AFCFF0(EnSkb* this, PlayState* play) { void func_80AFD0A4(EnSkb* this) { Animation_Change(&this->skelAnime, &gStalchildWalkingAnim, 0.96000004f, 0.0f, Animation_GetLastFrame(&gStalchildWalkingAnim), ANIMMODE_LOOP, -4.0f); - this->unk_280 = 4; - this->unk_288 = 0; + this->actionState = 4; + this->headlessYawOffset = 0; this->actor.speedXZ = this->actor.scale.y * 160.0f; EnSkb_SetupAction(this, EnSkb_Advance); } @@ -265,10 +265,10 @@ void EnSkb_Advance(EnSkb* this, PlayState* play) { f32 playSpeed; Player* player = GET_PLAYER(play); - if ((this->unk_283 != 0) && ((play->gameplayFrames & 0xF) == 0)) { - this->unk_288 = Rand_CenteredFloat(50000.0f); + if ((this->breakFlags != 0) && ((play->gameplayFrames & 0xF) == 0)) { + this->headlessYawOffset = Rand_CenteredFloat(50000.0f); } - Math_SmoothStepToS(&this->actor.shape.rot.y, (this->actor.yawTowardsPlayer + this->unk_288), 1, 0x2EE, 0); + Math_SmoothStepToS(&this->actor.shape.rot.y, (this->actor.yawTowardsPlayer + this->headlessYawOffset), 1, 0x2EE, 0); this->actor.world.rot.y = this->actor.shape.rot.y; thisKeyFrame = this->skelAnime.curFrame; SkelAnime_Update(&this->skelAnime); @@ -305,7 +305,7 @@ void func_80AFD33C(EnSkb* this) { Animation_Change(&this->skelAnime, &gStalchildAttackingAnim, 0.6f, 0.0f, Animation_GetLastFrame(&gStalchildAttackingAnim), ANIMMODE_ONCE_INTERP, 4.0f); this->collider.base.atFlags &= ~4; - this->unk_280 = 3; + this->actionState = 3; this->actor.speedXZ = 0.0f; EnSkb_SetupAction(this, EnSkb_SetupAttack); } @@ -316,9 +316,9 @@ void EnSkb_SetupAttack(EnSkb* this, PlayState* play) { frameData = this->skelAnime.curFrame; if (frameData == 3) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKID_ATTACK); - this->unk_281 = 1; + this->setColliderAT = 1; } else if (frameData == 6) { - this->unk_281 = 0; + this->setColliderAT = 0; } if (this->collider.base.atFlags & 4) { this->collider.base.atFlags &= ~6; @@ -332,8 +332,8 @@ void func_80AFD47C(EnSkb* this) { Animation_Change(&this->skelAnime, &gStalchildAttackingAnim, -0.4f, this->skelAnime.curFrame - 1.0f, 0.0f, ANIMMODE_ONCE_INTERP, 0.0f); this->collider.base.atFlags &= ~4; - this->unk_280 = 5; - this->unk_281 = 0; + this->actionState = 5; + this->setColliderAT = 0; EnSkb_SetupAction(this, func_80AFD508); } @@ -348,8 +348,8 @@ void EnSkb_SetupStunned(EnSkb* this) { this->actor.speedXZ = 0.0f; } Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); - this->unk_281 = 0; - this->unk_280 = 6; + this->setColliderAT = 0; + this->actionState = 6; EnSkb_SetupAction(this, func_80AFD59C); } @@ -378,7 +378,7 @@ void func_80AFD644(EnSkb* this) { } this->actor.world.rot.y = this->actor.yawTowardsPlayer; Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKID_DAMAGE); - this->unk_280 = 2; + this->actionState = 2; EnSkb_SetupAction(this, func_80AFD6CC); } @@ -386,10 +386,10 @@ void func_80AFD6CC(EnSkb* this, PlayState* play) { // this cast is likely not real, but allows for a match u8* new_var; - new_var = &this->unk_283; - if ((this->unk_283 != 1) || BodyBreak_SpawnParts(&this->actor, &this->bodyBreak, play, 1)) { + new_var = &this->breakFlags; + if ((this->breakFlags != 1) || BodyBreak_SpawnParts(&this->actor, &this->bodyBreak, play, 1)) { if ((*new_var) != 0) { - this->unk_283 = (*new_var) | 2; + this->breakFlags = (*new_var) | 2; } if (this->actor.bgCheckFlags & 2) { this->actor.speedXZ = 0; @@ -414,10 +414,10 @@ void func_80AFD7B4(EnSkb* this, PlayState* play) { if (this->actor.bgCheckFlags & 1) { this->actor.speedXZ = -6.0f; } - this->unk_280 = 1; + this->actionState = 1; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; BodyBreak_Alloc(&this->bodyBreak, 18, play); - this->unk_283 |= 4; + this->breakFlags |= 4; EffectSsDeadSound_SpawnStationary(play, &this->actor.projectedPos, NA_SE_EN_STALKID_DEAD, 1, 1, 0x28); EnSkb_SetupAction(this, func_80AFD880); GameInteractor_ExecuteOnEnemyDefeat(&this->actor); @@ -435,7 +435,7 @@ void func_80AFD880(EnSkb* this, PlayState* play) { Item_DropCollectible(play, &this->actor.world.pos, ITEM00_RUPEE_RED); } - this->unk_283 |= 8; + this->breakFlags |= 8; Actor_Kill(&this->actor); } } @@ -448,19 +448,19 @@ void func_80AFD968(EnSkb* this, PlayState* play) { s16 phi_v1; Player* player; - if ((this->unk_280 != 1) && (this->actor.bgCheckFlags & 0x60) && (this->actor.yDistToWater >= 40.0f)) { + if ((this->actionState != 1) && (this->actor.bgCheckFlags & 0x60) && (this->actor.yDistToWater >= 40.0f)) { this->actor.colChkInfo.health = 0; - this->unk_281 = 0; + this->setColliderAT = 0; func_80AFD7B4(this, play); - } else if (this->unk_280 >= 3) { + } else if (this->actionState >= 3) { if ((this->collider.base.acFlags & 2) != 0) { this->collider.base.acFlags &= ~2; if (this->actor.colChkInfo.damageEffect != 6) { - this->unk_282 = this->actor.colChkInfo.damageEffect; + this->lastDamageReaction = this->actor.colChkInfo.damageEffect; Actor_SetDropFlag(&this->actor, &this->collider.elements[1].info, 1); - this->unk_281 = 0; + this->setColliderAT = 0; if (this->actor.colChkInfo.damageEffect == 1) { - if (this->unk_280 != 6) { + if (this->actionState != 6) { Actor_SetColorFilter(&this->actor, 0, 0x78, 0, 0x50); Actor_ApplyDamage(&this->actor); EnSkb_SetupStunned(this); @@ -484,13 +484,13 @@ void func_80AFD968(EnSkb* this, PlayState* play) { return; } player = GET_PLAYER(play); - if (this->unk_283 == 0) { + if (this->breakFlags == 0) { if ((this->actor.colChkInfo.damageEffect == 0xD) || ((this->actor.colChkInfo.damageEffect == 0xE) && ((player->meleeWeaponAnimation >= 4 && player->meleeWeaponAnimation <= 11) || (player->meleeWeaponAnimation == 20 || player->meleeWeaponAnimation == 21)))) { BodyBreak_Alloc(&this->bodyBreak, 2, play); - this->unk_283 = 1; + this->breakFlags = 1; } } func_80AFD644(this); @@ -510,11 +510,11 @@ void EnSkb_Update(Actor* thisx, PlayState* play) { this->actionFunc(this, play); this->actor.focus.pos = this->actor.world.pos; this->actor.focus.pos.y += (3000.0f * this->actor.scale.y); - if (this->unk_281 != 0) { + if (this->setColliderAT != 0) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); } - if (this->unk_280 >= 3) { + if (this->actionState >= 3) { if ((this->actor.colorFilterTimer == 0) || ((this->actor.colorFilterParams & 0x4000) == 0)) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); @@ -529,7 +529,7 @@ s32 EnSkb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p s16 pad[2]; if (limbIndex == 11) { - if ((this->unk_283 & 2) == 0) { + if ((this->breakFlags & 2) == 0) { OPEN_DISPS(play->state.gfxCtx); color = ABS((s16)(Math_SinS((play->gameplayFrames * 0x1770)) * 95.0f)) + 160; gDPPipeSync(POLY_OPA_DISP++); @@ -538,7 +538,7 @@ s32 EnSkb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p } else { *dList = NULL; } - } else if ((limbIndex == 12) && ((this->unk_283 & 2) != 0)) { + } else if ((limbIndex == 12) && ((this->breakFlags & 2) != 0)) { *dList = NULL; } return 0; @@ -549,9 +549,9 @@ void EnSkb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Collider_UpdateSpheres(limbIndex, &this->collider); - if ((this->unk_283 ^ 1) == 0) { + if ((this->breakFlags ^ 1) == 0) { BodyBreak_SetInfo(&this->bodyBreak, limbIndex, 11, 12, 18, dList, BODYBREAK_OBJECT_DEFAULT); - } else if ((this->unk_283 ^ (this->unk_283 | 4)) == 0) { + } else if ((this->breakFlags ^ (this->breakFlags | 4)) == 0) { BodyBreak_SetInfo(&this->bodyBreak, limbIndex, 0, 18, 18, dList, BODYBREAK_OBJECT_DEFAULT); } } diff --git a/soh/src/overlays/actors/ovl_En_Skb/z_en_skb.h b/soh/src/overlays/actors/ovl_En_Skb/z_en_skb.h index 002ff0a18..d8d21a373 100644 --- a/soh/src/overlays/actors/ovl_En_Skb/z_en_skb.h +++ b/soh/src/overlays/actors/ovl_En_Skb/z_en_skb.h @@ -13,12 +13,12 @@ typedef struct EnSkb { /* 0x014C */ SkelAnime skelAnime; /* 0x0190 */ Vec3s jointTable[20]; /* 0x0208 */ Vec3s morphTable[20]; - /* 0x0280 */ u8 unk_280; - /* 0x0281 */ u8 unk_281; - /* 0x0282 */ u8 unk_282; - /* 0x0283 */ u8 unk_283; + /* 0x0280 */ u8 actionState; + /* 0x0281 */ u8 setColliderAT; + /* 0x0282 */ u8 lastDamageReaction; + /* 0x0283 */ u8 breakFlags; /* 0x0284 */ EnSkbActionFunc actionFunc; - /* 0x0288 */ s16 unk_288; + /* 0x0288 */ s16 headlessYawOffset; /* 0x028C */ BodyBreak bodyBreak; /* 0x02A4 */ ColliderJntSph collider; /* 0x02C4 */ ColliderJntSphElement colliderItem[2]; diff --git a/soh/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c b/soh/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c index 25e25339c..2b3eb3e2b 100644 --- a/soh/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c +++ b/soh/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c @@ -75,14 +75,14 @@ void EnSyatekiNiw_Init(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gCuccoSkel, &gCuccoAnim, this->jointTable, this->morphTable, 16); - this->unk_29E = this->actor.params; - if (this->unk_29E < 0) { - this->unk_29E = 0; + this->minigameType = this->actor.params; + if (this->minigameType < 0) { + this->minigameType = 0; } Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); - if (this->unk_29E == 0) { + if (this->minigameType == 0) { osSyncPrintf("\n\n"); // "Archery range chicken" osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 射的場鶏 ☆☆☆☆☆ \n" VT_RST); @@ -95,8 +95,8 @@ void EnSyatekiNiw_Init(Actor* thisx, PlayState* play) { Actor_SetScale(&this->actor, 0.01f); } - this->unk_2DC = this->actor.world.pos; - this->unk_2E8 = this->actor.world.pos; + this->initPos = this->actor.world.pos; + this->targetPos = this->actor.world.pos; this->actionFunc = func_80B11DEC; } @@ -109,113 +109,113 @@ void EnSyatekiNiw_Destroy(Actor* thisx, PlayState* play) { } void func_80B11A94(EnSyatekiNiw* this, PlayState* play, s16 arg2) { - if (this->unk_254 == 0) { + if (this->peckTimer == 0) { if (arg2 == 0) { - this->unk_264 = 0.0f; + this->headRotXTarget = 0.0f; } else { - this->unk_264 = -10000.0f; + this->headRotXTarget = -10000.0f; } - this->unk_28E += 1; - this->unk_254 = 3; - if (!(this->unk_28E & 1)) { - this->unk_264 = 0.0f; + this->headRotXState += 1; + this->peckTimer = 3; + if (!(this->headRotXState & 1)) { + this->headRotXTarget = 0.0f; if (arg2 == 0) { - this->unk_254 = Rand_ZeroFloat(30.0f); + this->peckTimer = Rand_ZeroFloat(30.0f); } } } - if (this->unk_258 == 0) { - this->unk_292++; - this->unk_292 &= 1; + if (this->flapTimer == 0) { + this->wingsRotState++; + this->wingsRotState &= 1; switch (arg2) { case 0: - this->unk_26C = 0.0f; - this->unk_268 = 0.0f; + this->leftWingRotXTarget = 0.0f; + this->rightWingRotXTarget = 0.0f; break; case 1: - this->unk_258 = 3; - this->unk_26C = 7000.0f; - this->unk_268 = 7000.0f; - if (this->unk_292 == 0) { - this->unk_26C = 0.0f; - this->unk_268 = 0.0f; + this->flapTimer = 3; + this->leftWingRotXTarget = 7000.0f; + this->rightWingRotXTarget = 7000.0f; + if (this->wingsRotState == 0) { + this->leftWingRotXTarget = 0.0f; + this->rightWingRotXTarget = 0.0f; } break; case 2: - this->unk_258 = 2; - this->unk_268 = this->unk_26C = -10000.0f; - this->unk_280 = this->unk_278 = 25000.0f; - this->unk_284 = this->unk_27C = 6000.0f; - if (this->unk_292 == 0) { - this->unk_278 = 8000.0f; - this->unk_280 = 8000.0f; + this->flapTimer = 2; + this->rightWingRotXTarget = this->leftWingRotXTarget = -10000.0f; + this->leftWingRotYTarget = this->rightWingRotYTarget = 25000.0f; + this->leftWingRotZTarget = this->rightWingRotZTarget = 6000.0f; + if (this->wingsRotState == 0) { + this->rightWingRotYTarget = 8000.0f; + this->leftWingRotYTarget = 8000.0f; } break; case 3: - this->unk_258 = 2; - this->unk_278 = 10000.0f; - this->unk_280 = 10000.0f; - if (this->unk_292 == 0) { - this->unk_278 = 3000.0f; - this->unk_280 = 3000.0f; + this->flapTimer = 2; + this->rightWingRotYTarget = 10000.0f; + this->leftWingRotYTarget = 10000.0f; + if (this->wingsRotState == 0) { + this->rightWingRotYTarget = 3000.0f; + this->leftWingRotYTarget = 3000.0f; } break; case 4: - this->unk_254 = this->unk_256 = 5; + this->peckTimer = this->timer1 = 5; break; case 5: - this->unk_258 = 5; - this->unk_278 = 14000.0f; - this->unk_280 = 14000.0f; - if (this->unk_292 == 0) { - this->unk_278 = 10000.0f; - this->unk_280 = 10000.0f; + this->flapTimer = 5; + this->rightWingRotYTarget = 14000.0f; + this->leftWingRotYTarget = 14000.0f; + if (this->wingsRotState == 0) { + this->rightWingRotYTarget = 10000.0f; + this->leftWingRotYTarget = 10000.0f; } break; } } - if (this->unk_264 != this->unk_2BC.x) { - Math_ApproachF(&this->unk_2BC.x, this->unk_264, 0.5f, 4000.0f); + if (this->headRotXTarget != this->headRot.x) { + Math_ApproachF(&this->headRot.x, this->headRotXTarget, 0.5f, 4000.0f); } - if (this->unk_26C != this->unk_2A4.x) { - Math_ApproachF(&this->unk_2A4.x, this->unk_26C, 0.8f, 7000.0f); + if (this->leftWingRotXTarget != this->leftWingRot.x) { + Math_ApproachF(&this->leftWingRot.x, this->leftWingRotXTarget, 0.8f, 7000.0f); } - if (this->unk_280 != this->unk_2A4.y) { - Math_ApproachF(&this->unk_2A4.y, this->unk_280, 0.8f, 7000.0f); + if (this->leftWingRotYTarget != this->leftWingRot.y) { + Math_ApproachF(&this->leftWingRot.y, this->leftWingRotYTarget, 0.8f, 7000.0f); } - if (this->unk_284 != this->unk_2A4.z) { - Math_ApproachF(&this->unk_2A4.z, this->unk_284, 0.8f, 7000.0f); + if (this->leftWingRotZTarget != this->leftWingRot.z) { + Math_ApproachF(&this->leftWingRot.z, this->leftWingRotZTarget, 0.8f, 7000.0f); } - if (this->unk_268 != this->unk_2B0.x) { - Math_ApproachF(&this->unk_2B0.x, this->unk_268, 0.8f, 7000.0f); + if (this->rightWingRotXTarget != this->rightWingRot.x) { + Math_ApproachF(&this->rightWingRot.x, this->rightWingRotXTarget, 0.8f, 7000.0f); } - if (this->unk_278 != this->unk_2B0.y) { - Math_ApproachF(&this->unk_2B0.y, this->unk_278, 0.8f, 7000.0f); + if (this->rightWingRotYTarget != this->rightWingRot.y) { + Math_ApproachF(&this->rightWingRot.y, this->rightWingRotYTarget, 0.8f, 7000.0f); } - if (this->unk_27C != this->unk_2B0.z) { - Math_ApproachF(&this->unk_2B0.z, this->unk_27C, 0.8f, 7000.0f); + if (this->rightWingRotZTarget != this->rightWingRot.z) { + Math_ApproachF(&this->rightWingRot.z, this->rightWingRotZTarget, 0.8f, 7000.0f); } } void func_80B11DEC(EnSyatekiNiw* this, PlayState* play) { Animation_Change(&this->skelAnime, &gCuccoAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gCuccoAnim), ANIMMODE_LOOP, -10.0f); - if (this->unk_29E != 0) { - Actor_SetScale(&this->actor, this->unk_2F4); + if (this->minigameType != 0) { + Actor_SetScale(&this->actor, this->scale); } this->actionFunc = func_80B11E78; @@ -233,20 +233,20 @@ void func_80B11E78(EnSyatekiNiw* this, PlayState* play) { f32 tmpf1; s16 sp4A; - if ((this->unk_29C != 0) && (this->unk_29E == 0) && (this->actor.bgCheckFlags & 1)) { - this->unk_29C = 0; + if ((this->archeryState != 0) && (this->minigameType == 0) && (this->actor.bgCheckFlags & 1)) { + this->archeryState = 0; this->actionFunc = func_80B123A8; return; } sp4A = 0; - if ((this->unk_25E == 0) && (this->unk_25C == 0)) { - this->unk_294++; - if (this->unk_294 >= 8) { - this->unk_25E = Rand_ZeroFloat(30.0f); - this->unk_294 = Rand_ZeroFloat(3.99f); + if ((this->movementTimer == 0) && (this->hopTimer == 0)) { + this->targetPosTimer++; + if (this->targetPosTimer >= 8) { + this->movementTimer = Rand_ZeroFloat(30.0f); + this->targetPosTimer = Rand_ZeroFloat(3.99f); - switch (this->unk_29E) { + switch (this->minigameType) { case 0: sp50 = Rand_CenteredFloat(100.0f); if (sp50 < 0.0f) { @@ -262,23 +262,23 @@ void func_80B11E78(EnSyatekiNiw* this, PlayState* play) { sp4C += 100.0f; } - this->unk_2E8.x = this->unk_2DC.x + sp50; - this->unk_2E8.z = this->unk_2DC.z + sp4C; + this->targetPos.x = this->initPos.x + sp50; + this->targetPos.z = this->initPos.z + sp4C; - if (this->unk_2E8.x < -150.0f) { - this->unk_2E8.x = -150.0f; + if (this->targetPos.x < -150.0f) { + this->targetPos.x = -150.0f; } - if (this->unk_2E8.x > 150.0f) { - this->unk_2E8.x = 150.0f; + if (this->targetPos.x > 150.0f) { + this->targetPos.x = 150.0f; } - if (this->unk_2E8.z < -60.0f) { - this->unk_2E8.z = -60.0f; + if (this->targetPos.z < -60.0f) { + this->targetPos.z = -60.0f; } - if (this->unk_2E8.z > -40.0f) { - this->unk_2E8.z = -40.0f; + if (this->targetPos.z > -40.0f) { + this->targetPos.z = -40.0f; } break; @@ -297,28 +297,28 @@ void func_80B11E78(EnSyatekiNiw* this, PlayState* play) { sp4C += 30.0f; } - this->unk_2E8.x = this->unk_2DC.x + sp50; - this->unk_2E8.z = this->unk_2DC.z + sp4C; + this->targetPos.x = this->initPos.x + sp50; + this->targetPos.z = this->initPos.z + sp4C; break; } } else { - this->unk_25C = 4; + this->hopTimer = 4; if (this->actor.bgCheckFlags & 1) { this->actor.velocity.y = 2.5f; - if ((Rand_ZeroFloat(10.0f) < 1.0f) && (this->unk_29E == 0)) { - this->unk_25C = 0xC; + if ((Rand_ZeroFloat(10.0f) < 1.0f) && (this->minigameType == 0)) { + this->hopTimer = 0xC; this->actor.velocity.y = 10.0f; } } } } - if (this->unk_25C != 0) { + if (this->hopTimer != 0) { sp4A = 1; - Math_ApproachF(&this->actor.world.pos.x, this->unk_2E8.x, 1.0f, this->unk_2C8.y); - Math_ApproachF(&this->actor.world.pos.z, this->unk_2E8.z, 1.0f, this->unk_2C8.y); - Math_ApproachF(&this->unk_2C8.y, 3.0f, 1.0f, 0.3f); - tmpf1 = this->unk_2E8.x - this->actor.world.pos.x; - tmpf2 = this->unk_2E8.z - this->actor.world.pos.z; + Math_ApproachF(&this->actor.world.pos.x, this->targetPos.x, 1.0f, this->posRotStep.y); + Math_ApproachF(&this->actor.world.pos.z, this->targetPos.z, 1.0f, this->posRotStep.y); + Math_ApproachF(&this->posRotStep.y, 3.0f, 1.0f, 0.3f); + tmpf1 = this->targetPos.x - this->actor.world.pos.x; + tmpf2 = this->targetPos.z - this->actor.world.pos.z; if (fabsf(tmpf1) < 10.0f) { tmpf1 = 0; @@ -329,16 +329,16 @@ void func_80B11E78(EnSyatekiNiw* this, PlayState* play) { } if ((tmpf1 == 0.0f) && (tmpf2 == 0.0f)) { - this->unk_25C = 0; - this->unk_294 = 7; + this->hopTimer = 0; + this->targetPosTimer = 7; } - Math_SmoothStepToS(&this->actor.world.rot.y, Math_FAtan2F(tmpf1, tmpf2) * (0x8000 / M_PI), 3, this->unk_2C8.z, - 0); - Math_ApproachF(&this->unk_2C8.z, 10000.0f, 1.0f, 1000.0f); + Math_SmoothStepToS(&this->actor.world.rot.y, Math_FAtan2F(tmpf1, tmpf2) * (0x8000 / M_PI), 3, + this->posRotStep.z, 0); + Math_ApproachF(&this->posRotStep.z, 10000.0f, 1.0f, 1000.0f); } - if (this->unk_260 == 0) { + if (this->sootTimer == 0) { func_80B11A94(this, play, sp4A); return; } @@ -354,18 +354,18 @@ void func_80B11E78(EnSyatekiNiw* this, PlayState* play) { void func_80B123A8(EnSyatekiNiw* this, PlayState* play) { Animation_Change(&this->skelAnime, &gCuccoAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gCuccoAnim), ANIMMODE_LOOP, -10.0f); - this->unk_27C = 6000.0f; - this->unk_288 = -10000.0f; - this->unk_2B0.z = 6000.0f; - this->unk_2B0.y = 10000.0f; + this->rightWingRotZTarget = 6000.0f; + this->unkArcheryFloat = -10000.0f; + this->rightWingRot.z = 6000.0f; + this->rightWingRot.y = 10000.0f; this->actionFunc = func_80B12460; - this->unk_2A4.z = 6000.0f; - this->unk_284 = 6000.0f; - this->unk_2B0.x = -10000.0f; - this->unk_268 = -10000.0f; - this->unk_2A4.y = -10000.0f; - this->unk_2A4.x = -10000.0f; - this->unk_26C = -10000.0f; + this->leftWingRot.z = 6000.0f; + this->leftWingRotZTarget = 6000.0f; + this->rightWingRot.x = -10000.0f; + this->rightWingRotXTarget = -10000.0f; + this->leftWingRot.y = -10000.0f; + this->leftWingRot.x = -10000.0f; + this->leftWingRotXTarget = -10000.0f; } void func_80B12460(EnSyatekiNiw* this, PlayState* play) { @@ -373,32 +373,32 @@ void func_80B12460(EnSyatekiNiw* this, PlayState* play) { f32 phi_f16 = 0.0f; player->actor.freezeTimer = 10; - switch (this->unk_29A) { + switch (this->archeryState) { case 0: - this->unk_296 = 2; - this->unk_2C8.y = 0.0f; - this->unk_29A = 1; + this->archeryAnimationType = 2; + this->posRotStep.y = 0.0f; + this->archeryState = 1; break; case 1: this->actor.speedXZ = 2.0f; - if (this->unk_25C == 0) { - this->unk_25C = 3; + if (this->hopTimer == 0) { + this->hopTimer = 3; this->actor.velocity.y = 3.5f; } - if (this->unk_25A == 0) { - this->unk_298++; - this->unk_298 &= 1; - this->unk_25A = 5; + if (this->archeryTimer == 0) { + this->rotYFlip++; + this->rotYFlip &= 1; + this->archeryTimer = 5; } - phi_f16 = (this->unk_298 == 0) ? 5000.0f : -5000.0f; + phi_f16 = (this->rotYFlip == 0) ? 5000.0f : -5000.0f; if (this->actor.world.pos.z > 100.0f) { this->actor.speedXZ = 2.0f; this->actor.gravity = -0.3f; this->actor.velocity.y = 5.0f; - this->unk_29A = 2; + this->archeryState = 2; } break; @@ -410,70 +410,70 @@ void func_80B12460(EnSyatekiNiw* this, PlayState* play) { if ((this->actor.bgCheckFlags & 1) && (this->actor.world.pos.z > 110.0f)) { this->actor.velocity.y = 0.0f; this->actor.gravity = 0.0f; - this->unk_284 = 0.0f; - this->unk_27C = 0.0f; - this->unk_278 = 0.0f; - this->unk_280 = 0.0f; - this->unk_288 = 0.0f; + this->leftWingRotZTarget = 0.0f; + this->rightWingRotZTarget = 0.0f; + this->rightWingRotYTarget = 0.0f; + this->leftWingRotYTarget = 0.0f; + this->unkArcheryFloat = 0.0f; this->actor.speedXZ = 0.5f; - this->unk_254 = this->unk_256 = 0; - this->unk_28E = this->unk_290 = 0; - this->unk_296 = 1; - this->unk_29A = 3; + this->peckTimer = this->timer1 = 0; + this->headRotXState = this->unk_290 = 0; + this->archeryAnimationType = 1; + this->archeryState = 3; } break; case 3: if ((player->actor.world.pos.z - 50.0f) < this->actor.world.pos.z) { this->actor.speedXZ = 0.0f; - this->unk_262 = 0x3C; - this->unk_25A = 0x14; - this->unk_264 = 10000.0f; - this->unk_29A = 4; + this->cluckTimer = 0x3C; + this->archeryTimer = 0x14; + this->headRotXTarget = 10000.0f; + this->archeryState = 4; } break; case 4: - if (this->unk_25A == 0) { - this->unk_296 = 4; - this->unk_264 = 5000.0f; - this->unk_26C = 0.0f; - this->unk_268 = 0.0f; - this->unk_284 = 0.0f; - this->unk_27C = 0.0f; - this->unk_280 = 14000.0f; - this->unk_278 = 14000.0f; + if (this->archeryTimer == 0) { + this->archeryAnimationType = 4; + this->headRotXTarget = 5000.0f; + this->leftWingRotXTarget = 0.0f; + this->rightWingRotXTarget = 0.0f; + this->leftWingRotZTarget = 0.0f; + this->rightWingRotZTarget = 0.0f; + this->leftWingRotYTarget = 14000.0f; + this->rightWingRotYTarget = 14000.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EV_CHICKEN_CRY_M); - this->unk_254 = this->unk_256 = this->unk_25A = 0x1E; - this->unk_29A = 5; + this->peckTimer = this->timer1 = this->archeryTimer = 0x1E; + this->archeryState = 5; } break; case 5: - if (this->unk_25A == 1) { - this->unk_258 = 0; - this->unk_296 = 5; - this->unk_256 = this->unk_258; - this->unk_254 = this->unk_258; + if (this->archeryTimer == 1) { + this->flapTimer = 0; + this->archeryAnimationType = 5; + this->timer1 = this->flapTimer; + this->peckTimer = this->flapTimer; this->actor.speedXZ = 1.0f; } - if ((this->unk_25A == 0) && ((player->actor.world.pos.z - 30.0f) < this->actor.world.pos.z)) { + if ((this->archeryTimer == 0) && ((player->actor.world.pos.z - 30.0f) < this->actor.world.pos.z)) { Audio_PlaySoundGeneral(NA_SE_VO_LI_DOWN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - this->unk_25E = 0x14; - this->unk_29A = 6; + this->movementTimer = 0x14; + this->archeryState = 6; this->actor.speedXZ = 0.0f; } break; case 6: - if (this->unk_25E == 1) { + if (this->movementTimer == 1) { play->transitionTrigger = TRANS_TRIGGER_START; play->nextEntranceIndex = gSaveContext.entranceIndex; play->shootingGalleryStatus = 0; player->actor.freezeTimer = 20; - this->unk_25E = 0x14; + this->movementTimer = 0x14; this->actionFunc = func_80B128D8; } break; @@ -484,18 +484,18 @@ void func_80B12460(EnSyatekiNiw* this, PlayState* play) { player->actor.world.pos.z - this->actor.world.pos.z) * (0x8000 / M_PI)) + phi_f16, - 5, this->unk_2C8.y, 0); - Math_ApproachF(&this->unk_2C8.y, 3000.0f, 1.0f, 500.0f); - if (this->unk_296 == 2) { - this->unk_256 = 10; - this->unk_254 = this->unk_256; + 5, this->posRotStep.y, 0); + Math_ApproachF(&this->posRotStep.y, 3000.0f, 1.0f, 500.0f); + if (this->archeryAnimationType == 2) { + this->timer1 = 10; + this->peckTimer = this->timer1; } - func_80B11A94(this, play, this->unk_296); + func_80B11A94(this, play, this->archeryAnimationType); } void func_80B128D8(EnSyatekiNiw* this, PlayState* play) { - if (this->unk_25E == 1) { + if (this->movementTimer == 1) { gSaveContext.timerState = TIMER_STATE_OFF; } } @@ -504,15 +504,15 @@ void func_80B128F8(EnSyatekiNiw* this, PlayState* play) { s16 sp26; s16 sp24; - Actor_SetFocus(&this->actor, this->unk_2D4); + Actor_SetFocus(&this->actor, this->focusYOffset); Actor_GetScreenPos(play, &this->actor, &sp26, &sp24); if ((this->actor.projectedPos.z > 200.0f) && (this->actor.projectedPos.z < 800.0f) && (sp26 > 0) && (sp26 < SCREEN_WIDTH) && (sp24 > 0) && (sp24 < SCREEN_HEIGHT)) { this->actor.speedXZ = 5.0f; - this->unk_298 = Rand_ZeroFloat(1.99f); - this->unk_2D8 = Rand_CenteredFloat(8000.0f) + -10000.0f; - this->unk_262 = 0x1E; - this->unk_25E = 0x64; + this->rotYFlip = Rand_ZeroFloat(1.99f); + this->removeStateYaw = Rand_CenteredFloat(8000.0f) + -10000.0f; + this->cluckTimer = 0x1E; + this->movementTimer = 0x64; this->actionFunc = func_80B129EC; } } @@ -524,53 +524,53 @@ void func_80B129EC(EnSyatekiNiw* this, PlayState* play) { s16 sp2C; f32 tmpf2; - Actor_SetFocus(&this->actor, this->unk_2D4); + Actor_SetFocus(&this->actor, this->focusYOffset); Actor_GetScreenPos(play, &this->actor, &sp2E, &sp2C); - if ((this->unk_25E == 0) || (this->actor.projectedPos.z < -70.0f) || (sp2E < 0) || (sp2E > SCREEN_WIDTH) || + if ((this->movementTimer == 0) || (this->actor.projectedPos.z < -70.0f) || (sp2E < 0) || (sp2E > SCREEN_WIDTH) || (sp2C < 0) || (sp2C > SCREEN_HEIGHT)) { Actor_Kill(&this->actor); return; } - this->unk_2A0 = 1; - if (this->unk_25C == 0) { - this->unk_298++; - this->unk_298 &= 1; - this->unk_25C = (s16)Rand_CenteredFloat(4.0f) + 5; + this->spawnFeathers = 1; + if (this->hopTimer == 0) { + this->rotYFlip++; + this->rotYFlip &= 1; + this->hopTimer = (s16)Rand_CenteredFloat(4.0f) + 5; if ((Rand_ZeroFloat(5.0f) < 1.0f) && (this->actor.bgCheckFlags & 1)) { this->actor.velocity.y = 4.0f; } } - phi_f2 = (this->unk_298 == 0) ? 5000.0f : -5000.0f; - tmpf2 = this->unk_2D8 + phi_f2; - Math_SmoothStepToS(&this->actor.world.rot.y, tmpf2, 3, this->unk_2C8.y, 0); - Math_ApproachF(&this->unk_2C8.y, 3000.0f, 1.0f, 500.0f); + phi_f2 = (this->rotYFlip == 0) ? 5000.0f : -5000.0f; + tmpf2 = this->removeStateYaw + phi_f2; + Math_SmoothStepToS(&this->actor.world.rot.y, tmpf2, 3, this->posRotStep.y, 0); + Math_ApproachF(&this->posRotStep.y, 3000.0f, 1.0f, 500.0f); func_80B11A94(this, play, 2); } void func_80B12BA4(EnSyatekiNiw* this, PlayState* play) { if (this->collider.base.acFlags & AC_HIT) { this->collider.base.acFlags &= ~AC_HIT; - switch (this->unk_29E) { + switch (this->minigameType) { case 0: - if (this->unk_29C == 0) { - this->unk_262 = 0x1E; + if (this->archeryState == 0) { + this->cluckTimer = 0x1E; Audio_PlayActorSound2(&this->actor, NA_SE_EV_CHICKEN_CRY_A); - this->unk_29C = 1; - this->unk_2A0 = 1; + this->archeryState = 1; + this->spawnFeathers = 1; this->actionFunc = func_80B123A8; this->actor.gravity = -3.0f; } break; case 1: - this->unk_262 = 0x1E; - this->unk_2F8 = 1; + this->cluckTimer = 0x1E; + this->unkAlleyHitByte = 1; Audio_PlayActorSound2(&this->actor, NA_SE_EV_CHICKEN_CRY_A); - this->unk_260 = 100; - this->unk_2A0 = 1; - this->unk_25E = this->unk_260; + this->sootTimer = 100; + this->spawnFeathers = 1; + this->movementTimer = this->sootTimer; break; } } @@ -587,33 +587,33 @@ void EnSyatekiNiw_Update(Actor* thisx, PlayState* play) { Vec3f sp60; func_80B132A8(this, play); - this->unk_28C++; - if (this->unk_254 != 0) { - this->unk_254--; + this->lifetime++; + if (this->peckTimer != 0) { + this->peckTimer--; } - if (this->unk_258 != 0) { - this->unk_258--; + if (this->flapTimer != 0) { + this->flapTimer--; } - if (this->unk_25A != 0) { - this->unk_25A--; + if (this->archeryTimer != 0) { + this->archeryTimer--; } - if (this->unk_25C != 0) { - this->unk_25C--; + if (this->hopTimer != 0) { + this->hopTimer--; } - if (this->unk_25E != 0) { - this->unk_25E--; + if (this->movementTimer != 0) { + this->movementTimer--; } - if (this->unk_262 != 0) { - this->unk_262--; + if (this->cluckTimer != 0) { + this->cluckTimer--; } - if (this->unk_260 != 0) { - this->unk_260--; + if (this->sootTimer != 0) { + this->sootTimer--; } this->actor.shape.rot = this->actor.world.rot; @@ -623,7 +623,7 @@ void EnSyatekiNiw_Update(Actor* thisx, PlayState* play) { Actor_MoveXZGravity(&this->actor); Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 60.0f, 0x1D); - if (this->unk_2A0 != 0) { + if (this->spawnFeathers != 0) { for (i = 0; i < 20; i++) { sp78.x = Rand_CenteredFloat(10.0f) + this->actor.world.pos.x; sp78.y = Rand_CenteredFloat(10.0f) + (this->actor.world.pos.y + 20.0f); @@ -636,22 +636,22 @@ void EnSyatekiNiw_Update(Actor* thisx, PlayState* play) { func_80B131B8(this, &sp78, &sp6C, &sp60, Rand_ZeroFloat(8.0f) + 8.0f); } - this->unk_2A0 = 0; + this->spawnFeathers = 0; } func_80B12BA4(this, play); - if (this->unk_262 == 0) { + if (this->cluckTimer == 0) { if (this->actionFunc == func_80B11E78) { - this->unk_262 = 0x12C; + this->cluckTimer = 0x12C; Audio_PlayActorSound2(&this->actor, NA_SE_EV_CHICKEN_CRY_N); } else { - this->unk_262 = 0x1E; + this->cluckTimer = 0x1E; Audio_PlayActorSound2(&this->actor, NA_SE_EV_CHICKEN_CRY_A); } } i = 0; - switch (this->unk_29E) { + switch (this->minigameType) { case 0: if (play->shootingGalleryStatus != 0) { i = 1; @@ -675,19 +675,19 @@ s32 SyatekiNiw_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec Vec3f sp0 = { 0.0f, 0.0f, 0.0f }; if (limbIndex == 13) { - rot->y += (s16)this->unk_2BC.x; + rot->y += (s16)this->headRot.x; } if (limbIndex == 11) { - rot->x += (s16)this->unk_2B0.z; - rot->y += (s16)this->unk_2B0.y; - rot->z += (s16)this->unk_2B0.x; + rot->x += (s16)this->rightWingRot.z; + rot->y += (s16)this->rightWingRot.y; + rot->z += (s16)this->rightWingRot.x; } if (limbIndex == 7) { - rot->x += (s16)this->unk_2A4.z; - rot->y += (s16)this->unk_2A4.y; - rot->z += (s16)this->unk_2A4.x; + rot->x += (s16)this->leftWingRot.z; + rot->y += (s16)this->leftWingRot.y; + rot->z += (s16)this->leftWingRot.x; } return false; @@ -699,7 +699,7 @@ void EnSyatekiNiw_Draw(Actor* thisx, PlayState* play) { if (this->actionFunc != func_80B128F8) { Gfx_SetupDL_25Opa(play->state.gfxCtx); - if (this->unk_260 != 0) { + if (this->sootTimer != 0) { func_80026230(play, &sp30, 0, 0x14); } @@ -711,19 +711,19 @@ void EnSyatekiNiw_Draw(Actor* thisx, PlayState* play) { void func_80B131B8(EnSyatekiNiw* this, Vec3f* arg1, Vec3f* arg2, Vec3f* arg3, f32 arg4) { s16 i; - EnSyatekiNiw_1* ptr = &this->unk_348[0]; + EnSyatekiNiw_1* ptr = &this->effects[0]; for (i = 0; i < 5; i++, ptr++) { - if (ptr->unk_00 == 0) { + if (ptr->state == 0) { ptr->epoch++; - ptr->unk_00 = 1; - ptr->unk_04 = *arg1; - ptr->unk_10 = *arg2; - ptr->unk_1C = *arg3; - ptr->unk_34 = 0; - ptr->unk_2C = (arg4 / 1000.0f); - ptr->unk_28 = (s16)Rand_ZeroFloat(20.0f) + 0x28; - ptr->unk_2A = Rand_ZeroFloat(1000.0f); + ptr->state = 1; + ptr->pos = *arg1; + ptr->vel = *arg2; + ptr->accel = *arg3; + ptr->timer = 0; + ptr->scale = (arg4 / 1000.0f); + ptr->lifespan = (s16)Rand_ZeroFloat(20.0f) + 0x28; + ptr->rotPulse = Rand_ZeroFloat(1000.0f); return; } } @@ -731,28 +731,28 @@ void func_80B131B8(EnSyatekiNiw* this, Vec3f* arg1, Vec3f* arg2, Vec3f* arg3, f3 void func_80B132A8(EnSyatekiNiw* this, PlayState* play) { s16 i; - EnSyatekiNiw_1* ptr = &this->unk_348[0]; + EnSyatekiNiw_1* ptr = &this->effects[0]; for (i = 0; i < 5; i++, ptr++) { - if (ptr->unk_00 != 0) { - ptr->unk_04.x += ptr->unk_10.x; - ptr->unk_04.y += ptr->unk_10.y; - ptr->unk_04.z += ptr->unk_10.z; - ptr->unk_34++; - ptr->unk_10.x += ptr->unk_1C.x; - ptr->unk_10.y += ptr->unk_1C.y; - ptr->unk_10.z += ptr->unk_1C.z; - if (ptr->unk_00 == 1) { - ptr->unk_2A++; - Math_ApproachF(&ptr->unk_10.x, 0.0f, 1.0f, 0.05f); - Math_ApproachF(&ptr->unk_10.z, 0.0f, 1.0f, 0.05f); - if (ptr->unk_10.y < -0.5f) { - ptr->unk_10.y = 0.5f; + if (ptr->state != 0) { + ptr->pos.x += ptr->vel.x; + ptr->pos.y += ptr->vel.y; + ptr->pos.z += ptr->vel.z; + ptr->timer++; + ptr->vel.x += ptr->accel.x; + ptr->vel.y += ptr->accel.y; + ptr->vel.z += ptr->accel.z; + if (ptr->state == 1) { + ptr->rotPulse++; + Math_ApproachF(&ptr->vel.x, 0.0f, 1.0f, 0.05f); + Math_ApproachF(&ptr->vel.z, 0.0f, 1.0f, 0.05f); + if (ptr->vel.y < -0.5f) { + ptr->vel.y = 0.5f; } - ptr->unk_30 = (Math_SinS(ptr->unk_2A * 3000) * M_PI) * 0.2f; - if (ptr->unk_28 < ptr->unk_34) { - ptr->unk_00 = 0; + ptr->rot = (Math_SinS(ptr->rotPulse * 3000) * M_PI) * 0.2f; + if (ptr->lifespan < ptr->timer) { + ptr->state = 0; } } } @@ -762,7 +762,7 @@ void func_80B132A8(EnSyatekiNiw* this, PlayState* play) { void func_80B13464(EnSyatekiNiw* this, PlayState* play) { GraphicsContext* gfxCtx = play->state.gfxCtx; s16 i; - EnSyatekiNiw_1* ptr = &this->unk_348[0]; + EnSyatekiNiw_1* ptr = &this->effects[0]; u8 flag = 0; OPEN_DISPS(gfxCtx); @@ -770,17 +770,17 @@ void func_80B13464(EnSyatekiNiw* this, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); for (i = 0; i < 5; i++, ptr++) { - if (ptr->unk_00 == 1) { + if (ptr->state == 1) { if (flag == 0) { gSPDisplayList(POLY_XLU_DISP++, gCuccoEffectFeatherMaterialDL); flag++; } FrameInterpolation_RecordOpenChild(ptr, ptr->epoch); - Matrix_Translate(ptr->unk_04.x, ptr->unk_04.y, ptr->unk_04.z, MTXMODE_NEW); + Matrix_Translate(ptr->pos.x, ptr->pos.y, ptr->pos.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); - Matrix_Scale(ptr->unk_2C, ptr->unk_2C, 1.0f, MTXMODE_APPLY); - Matrix_RotateZ(ptr->unk_30, MTXMODE_APPLY); + Matrix_Scale(ptr->scale, ptr->scale, 1.0f, MTXMODE_APPLY); + Matrix_RotateZ(ptr->rot, MTXMODE_APPLY); Matrix_Translate(0.0f, -1000.0f, 0.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/soh/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h b/soh/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h index 609b89f1c..0f98eef1e 100644 --- a/soh/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h +++ b/soh/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h @@ -9,15 +9,15 @@ struct EnSyatekiNiw; typedef void (*EnSyatekiNiwActionFunc)(struct EnSyatekiNiw*, PlayState*); typedef struct { - /* 0x00 */ u8 unk_00; - /* 0x0C */ Vec3f unk_04; - /* 0x10 */ Vec3f unk_10; - /* 0x1C */ Vec3f unk_1C; - /* 0x28 */ s16 unk_28; - /* 0x2A */ s16 unk_2A; - /* 0x2C */ f32 unk_2C; - /* 0x30 */ f32 unk_30; - /* 0x34 */ u8 unk_34; + /* 0x00 */ u8 state; + /* 0x0C */ Vec3f pos; + /* 0x10 */ Vec3f vel; + /* 0x1C */ Vec3f accel; + /* 0x28 */ s16 lifespan; + /* 0x2A */ s16 rotPulse; + /* 0x2C */ f32 scale; + /* 0x30 */ f32 rot; + /* 0x34 */ u8 timer; u32 epoch; } EnSyatekiNiw_1; // size = 0x38 @@ -27,46 +27,45 @@ typedef struct EnSyatekiNiw { /* 0x0190 */ Vec3s jointTable[16]; /* 0x01F0 */ Vec3s morphTable[16]; /* 0x0250 */ EnSyatekiNiwActionFunc actionFunc; - /* 0x0254 */ s16 unk_254; - /* 0x0256 */ s16 unk_256; - /* 0x0258 */ s16 unk_258; - /* 0x025A */ s16 unk_25A; - /* 0x025C */ s16 unk_25C; - /* 0x025E */ s16 unk_25E; - /* 0x0260 */ s16 unk_260; - /* 0x0262 */ s16 unk_262; - /* 0x0264 */ f32 unk_264; - /* 0x0268 */ f32 unk_268; - /* 0x026C */ f32 unk_26C; + /* 0x0254 */ s16 peckTimer; + /* 0x0256 */ s16 timer1; + /* 0x0258 */ s16 flapTimer; + /* 0x025A */ s16 archeryTimer; + /* 0x025C */ s16 hopTimer; + /* 0x025E */ s16 movementTimer; + /* 0x0260 */ s16 sootTimer; + /* 0x0262 */ s16 cluckTimer; + /* 0x0264 */ f32 headRotXTarget; + /* 0x0268 */ f32 rightWingRotXTarget; + /* 0x026C */ f32 leftWingRotXTarget; /* 0x0270 */ char unk_270[0x8]; - /* 0x0278 */ f32 unk_278; - /* 0x027C */ f32 unk_27C; - /* 0x0284 */ f32 unk_280; - /* 0x0280 */ f32 unk_284; - /* 0x0288 */ f32 unk_288; - /* 0x028C */ s16 unk_28C; - /* 0x028E */ s16 unk_28E; + /* 0x0278 */ f32 rightWingRotYTarget; + /* 0x027C */ f32 rightWingRotZTarget; + /* 0x0284 */ f32 leftWingRotYTarget; + /* 0x0280 */ f32 leftWingRotZTarget; + /* 0x0288 */ f32 unkArcheryFloat; + /* 0x028C */ s16 lifetime; + /* 0x028E */ s16 headRotXState; /* 0x0290 */ s16 unk_290; - /* 0x0292 */ s16 unk_292; - /* 0x0294 */ s16 unk_294; - /* 0x0296 */ s16 unk_296; - /* 0x0298 */ s16 unk_298; - /* 0x029C */ s16 unk_29A; - /* 0x029C */ s16 unk_29C; - /* 0x029E */ s16 unk_29E; - /* 0x02A0 */ s16 unk_2A0; - /* 0x02A4 */ Vec3f unk_2A4; - /* 0x02B0 */ Vec3f unk_2B0; - /* 0x02BC */ Vec3f unk_2BC; - /* 0x02C8 */ Vec3f unk_2C8; - /* 0x02D4 */ f32 unk_2D4; - /* 0x02D8 */ f32 unk_2D8; - /* 0x02DC */ Vec3f unk_2DC; - /* 0x02E8 */ Vec3f unk_2E8; - /* 0x02F4 */ f32 unk_2F4; - /* 0x02F8 */ u8 unk_2F8; + /* 0x0292 */ s16 wingsRotState; + /* 0x0294 */ s16 targetPosTimer; + /* 0x0296 */ s16 archeryAnimationType; + /* 0x0298 */ s16 rotYFlip; + /* 0x029C */ s16 archeryState; + /* 0x029E */ s16 minigameType; + /* 0x02A0 */ s16 spawnFeathers; + /* 0x02A4 */ Vec3f leftWingRot; + /* 0x02B0 */ Vec3f rightWingRot; + /* 0x02BC */ Vec3f headRot; + /* 0x02C8 */ Vec3f posRotStep; + /* 0x02D4 */ f32 focusYOffset; + /* 0x02D8 */ f32 removeStateYaw; + /* 0x02DC */ Vec3f initPos; + /* 0x02E8 */ Vec3f targetPos; + /* 0x02F4 */ f32 scale; + /* 0x02F8 */ u8 unkAlleyHitByte; /* 0x02FC */ ColliderCylinder collider; - /* 0x0348 */ EnSyatekiNiw_1 unk_348[5]; + /* 0x0348 */ EnSyatekiNiw_1 effects[5]; } EnSyatekiNiw; // size = 0x0460 #endif diff --git a/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c index caddf8ad9..ec826a995 100644 --- a/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c +++ b/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c @@ -69,7 +69,7 @@ static ColliderCylinderInit sCylinderInit = { void EnTa_SetupAction(EnTa* this, EnTaActionFunc arg1, EnTaUnkFunc arg2) { this->actionFunc = arg1; - this->unk_260 = arg2; + this->animFunc = arg2; } void func_80B13AAC(EnTa* this, PlayState* play) { @@ -111,11 +111,11 @@ void EnTa_Init(Actor* thisx, PlayState* play2) { Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); this->actor.colChkInfo.mass = MASS_IMMOVABLE; - this->unk_2E0 = 0; - this->unk_2CE = 0; - this->unk_2E2 = 0; + this->stateFlags = 0; + this->rapidBlinks = 0; + this->nodOffTimer = 0; this->blinkTimer = 20; - this->unk_2B0 = EnTa_BlinkWaitUntilNext; + this->blinkFunc = EnTa_BlinkWaitUntilNext; Actor_SetScale(&this->actor, 0.01f); this->actor.targetMode = 6; this->actor.velocity.y = -4.0f; @@ -184,7 +184,7 @@ void EnTa_Init(Actor* thisx, PlayState* play2) { } else { if (IS_DAY) { this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED; - this->unk_2C4[0] = this->unk_2C4[1] = this->unk_2C4[2] = 7; + this->superCuccoTimers[0] = this->superCuccoTimers[1] = this->superCuccoTimers[2] = 7; this->superCuccos[0] = (EnNiw*)Actor_Spawn( &play->actorCtx, play, ACTOR_EN_NIW, this->actor.world.pos.x + 5.0f, this->actor.world.pos.y + 3.0f, this->actor.world.pos.z + 26.0f, 0, 0, 0, 0xD); @@ -242,7 +242,7 @@ void EnTa_Destroy(Actor* thisx, PlayState* play) { gSaveContext.timerState = TIMER_STATE_OFF; } - if (this->unk_2E0 & 0x200) { + if (this->stateFlags & 0x200) { func_800F5B58(); } @@ -258,7 +258,7 @@ s32 func_80B142F4(EnTa* this, PlayState* play, u16 textId) { if ((ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) <= 0x4300) && (this->actor.xzDistToPlayer < 100.0f)) { - this->unk_2E0 |= 1; + this->stateFlags |= 1; func_8002F2CC(&this->actor, play, 100.0f); } return false; @@ -291,14 +291,14 @@ void func_80B1448C(EnTa* this, PlayState* play) { func_80B14410(this); } func_80B14248(this); - this->unk_2E0 |= 0x4; + this->stateFlags |= 0x4; } void func_80B144D8(EnTa* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { func_80B14410(this); this->blinkTimer = 1; - this->unk_2B0 = EnTa_BlinkAdvanceState; + this->blinkFunc = EnTa_BlinkAdvanceState; } if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) { @@ -306,16 +306,16 @@ void func_80B144D8(EnTa* this, PlayState* play) { EnTa_SetupAction(this, func_80B1448C, EnTa_AnimRepeatCurrent); } func_80B14248(this); - this->unk_2E0 |= 4; + this->stateFlags |= 4; } void func_80B14570(EnTa* this, PlayState* play) { - this->unk_2E0 |= 4; + this->stateFlags |= 4; - if (this->unk_2CC == 0) { + if (this->timer == 0) { EnTa_SetupAction(this, func_80B144D8, EnTa_AnimRepeatCurrent); - this->unk_2CE = 3; - this->unk_2CC = 60; + this->rapidBlinks = 3; + this->timer = 60; Animation_PlayOnce(&this->skelAnime, &gTalonWakeUpAnim); this->currentAnimation = &gTalonStandAnim; Audio_PlayActorSound2(&this->actor, NA_SE_VO_TA_SURPRISE); @@ -338,7 +338,7 @@ void EnTa_IdleAsleepInCastle(EnTa* this, PlayState* play) { case EXCH_ITEM_CHICKEN: player->actor.textId = 0x702B; EnTa_SetupAction(this, func_80B14570, EnTa_AnimRepeatCurrent); - this->unk_2CC = 40; + this->timer = 40; break; default: if (exchangeItemId != EXCH_ITEM_NONE) { @@ -371,7 +371,7 @@ void EnTa_IdleAsleepInKakariko(EnTa* this, PlayState* play) { case EXCH_ITEM_POCKET_CUCCO: player->actor.textId = 0x702B; EnTa_SetupAction(this, func_80B14570, EnTa_AnimRepeatCurrent); - this->unk_2CC = 40; + this->timer = 40; break; default: if (exchangeItemId != EXCH_ITEM_NONE) { @@ -402,7 +402,7 @@ void func_80B14898(EnTa* this, PlayState* play) { func_80033480(play, &this->actor.world.pos, 50.0f, 2, 250, 20, 1); func_80B14818(this, play); - if (this->unk_2CC == 0) { + if (this->timer == 0) { Actor_Kill(&this->actor); } } @@ -411,9 +411,9 @@ void func_80B1490C(EnTa* this, PlayState* play) { this->actor.world.rot.y += 0xC00; this->actor.shape.rot.y += 0xC00; - if (this->unk_2CC == 0) { + if (this->timer == 0) { EnTa_SetupAction(this, func_80B14898, EnTa_AnimRepeatCurrent); - this->unk_2CC = 60; + this->timer = 60; } } @@ -421,9 +421,9 @@ void func_80B1496C(EnTa* this, PlayState* play) { func_80033480(play, &this->actor.world.pos, 50.0f, 2, 250, 20, 1); func_80B14818(this, play); - if (this->unk_2CC == 0) { + if (this->timer == 0) { EnTa_SetupAction(this, func_80B1490C, EnTa_AnimRepeatCurrent); - this->unk_2CC = 5; + this->timer = 5; } } @@ -431,9 +431,9 @@ void func_80B149F4(EnTa* this, PlayState* play) { this->actor.world.rot.y -= 0xD00; this->actor.shape.rot.y -= 0xD00; - if (this->unk_2CC == 0) { + if (this->timer == 0) { EnTa_SetupAction(this, func_80B1496C, EnTa_AnimRepeatCurrent); - this->unk_2CC = 65; + this->timer = 65; } } @@ -441,11 +441,11 @@ void func_80B14A54(EnTa* this, PlayState* play) { func_80033480(play, &this->actor.world.pos, 50.0f, 2, 250, 20, 1); func_80B14818(this, play); - if (this->unk_2CC == 20) { + if (this->timer == 20) { Message_CloseTextbox(play); } - if (this->unk_2CC == 0) { - this->unk_2CC = 5; + if (this->timer == 0) { + this->timer = 5; EnTa_SetupAction(this, func_80B149F4, EnTa_AnimRepeatCurrent); } } @@ -454,10 +454,10 @@ void func_80B14AF4(EnTa* this, PlayState* play) { this->actor.world.rot.y -= 0xC00; this->actor.shape.rot.y -= 0xC00; - if (this->unk_2CC == 0) { + if (this->timer == 0) { Audio_PlayActorSound2(&this->actor, NA_SE_VO_TA_CRY_1); EnTa_SetupAction(this, func_80B14A54, EnTa_AnimRepeatCurrent); - this->unk_2CC = 65; + this->timer = 65; this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED; } } @@ -466,7 +466,7 @@ void func_80B14B6C(EnTa* this, PlayState* play) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) { s16 csCamIdx = OnePointCutscene_Init(play, 4175, -99, &this->actor, MAIN_CAM); EnTa_SetupAction(this, func_80B14AF4, EnTa_AnimRepeatCurrent); - this->unk_2CC = 5; + this->timer = 5; Flags_SetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE); if (GameInteractor_Should(VB_PLAY_ONEPOINT_ACTOR_CS, true, this)) { OnePointCutscene_EndCutscene(play, csCamIdx); @@ -474,7 +474,7 @@ void func_80B14B6C(EnTa* this, PlayState* play) { Animation_PlayOnce(&this->skelAnime, &gTalonRunTransitionAnim); this->currentAnimation = &gTalonRunAnim; } - this->unk_2E0 |= 1; + this->stateFlags |= 1; } void EnTa_IdleAwakeInCastle(EnTa* this, PlayState* play) { @@ -488,7 +488,7 @@ void func_80B14C60(EnTa* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { EnTa_SetupAction(this, EnTa_IdleAwakeInKakariko, EnTa_AnimRepeatCurrent); } - this->unk_2E0 |= 1; + this->stateFlags |= 1; } void EnTa_IdleAwakeInKakariko(EnTa* this, PlayState* play) { @@ -507,7 +507,7 @@ void func_80B14D4C(EnTa* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { EnTa_SetupAction(this, EnTa_IdleAtRanch, EnTa_AnimRepeatCurrent); } - this->unk_2E0 |= 1; + this->stateFlags |= 1; } void EnTa_IdleAtRanch(EnTa* this, PlayState* play) { @@ -530,10 +530,10 @@ void func_80B14E28(EnTa* this, PlayState* play) { Vec3f b; Vec3f a; - this->unk_2D0 = Play_CreateSubCamera(play); - this->unk_2D2 = play->activeCamera; - Play_ChangeCameraStatus(play, this->unk_2D2, CAM_STAT_WAIT); - Play_ChangeCameraStatus(play, this->unk_2D0, CAM_STAT_ACTIVE); + this->subCamId = Play_CreateSubCamera(play); + this->returnToCamId = play->activeCamera; + Play_ChangeCameraStatus(play, this->returnToCamId, CAM_STAT_WAIT); + Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); b.x = 1053.0f; b.y = 11.0f; @@ -543,12 +543,12 @@ void func_80B14E28(EnTa* this, PlayState* play) { a.y = 45.0f; a.z = -40.0f; - Play_CameraSetAtEye(play, this->unk_2D0, &a, &b); + Play_CameraSetAtEye(play, this->subCamId, &a, &b); } void func_80B14EDC(EnTa* this, PlayState* play) { - Play_ChangeCameraStatus(play, this->unk_2D2, CAM_STAT_ACTIVE); - Play_ClearCamera(play, this->unk_2D0); + Play_ChangeCameraStatus(play, this->returnToCamId, CAM_STAT_ACTIVE); + Play_ClearCamera(play, this->subCamId); } void func_80B14F20(EnTa* this, EnTaActionFunc arg1) { @@ -556,14 +556,14 @@ void func_80B14F20(EnTa* this, EnTaActionFunc arg1) { this->eyeIndex = 2; Animation_Change(&this->skelAnime, &gTalonSitSleepingAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gTalonSitSleepingAnim), ANIMMODE_ONCE, -5.0f); - this->unk_2E2 = 0; + this->nodOffTimer = 0; this->currentAnimation = &gTalonSitSleepingAnim; } void func_80B14FAC(EnTa* this, EnTaActionFunc arg1) { this->eyeIndex = 1; EnTa_SetupAction(this, arg1, EnTa_AnimRunToEnd); - this->unk_2E0 &= ~0x10; + this->stateFlags &= ~0x10; Animation_Change(&this->skelAnime, &gTalonSitWakeUpAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gTalonSitWakeUpAnim), ANIMMODE_ONCE, -5.0f); } @@ -574,7 +574,7 @@ void func_80B15034(EnTa* this, PlayState* play) { func_80B14F20(this, EnTa_IdleSittingInLonLonHouse); func_80B13AAC(this, play); } - this->unk_2E0 |= 1; + this->stateFlags |= 1; } s32 func_80B150AC(EnTa* this, PlayState* play, s32 idx) { @@ -600,9 +600,9 @@ void func_80B15100(EnTa* this, PlayState* play) { Animation_Change(&this->skelAnime, &gTalonSitWakeUpAnim, 1.0f, Animation_GetLastFrame(&gTalonSitWakeUpAnim) - 1.0f, Animation_GetLastFrame(&gTalonSitWakeUpAnim), ANIMMODE_ONCE, 10.0f); - this->unk_2E0 &= ~0x10; + this->stateFlags &= ~0x10; Message_CloseTextbox(play); - unk_2CA = this->unk_2CA; + unk_2CA = this->lastFoundSuperCuccoIdx; this->actionFunc = EnTa_RunCuccoGame; this->superCuccos[unk_2CA]->actor.gravity = 0.1f; this->superCuccos[unk_2CA]->actor.velocity.y = 0.0f; @@ -618,7 +618,7 @@ void func_80B15100(EnTa* this, PlayState* play) { player->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR; this->superCuccos[unk_2CA] = NULL; } - this->unk_2E0 |= 1; + this->stateFlags |= 1; } void func_80B15260(EnTa* this, PlayState* play) { @@ -628,7 +628,7 @@ void func_80B15260(EnTa* this, PlayState* play) { } else { func_8002F2CC(&this->actor, play, 1000.0f); } - this->unk_2E0 |= 1; + this->stateFlags |= 1; } s32 EnTa_GetSuperCuccosCount(EnTa* this, PlayState* play) { @@ -644,24 +644,24 @@ s32 EnTa_GetSuperCuccosCount(EnTa* this, PlayState* play) { } void func_80B15308(EnTa* this) { - if (this->unk_2E0 & 0x10) { - if (this->unk_2E0 & 0x100) { + if (this->stateFlags & 0x10) { + if (this->stateFlags & 0x100) { Animation_Change(&this->skelAnime, &gTalonSitHandsUpAnim, 1.0f, 17.0f, 22.0f, ANIMMODE_ONCE, 0.0f); - this->unk_2E0 &= ~0x100; + this->stateFlags &= ~0x100; } else { Animation_Change(&this->skelAnime, &gTalonSitHandsUpAnim, -1.0f, 21.0f, 16.0f, ANIMMODE_ONCE, 3.0f); - this->unk_2E0 |= 0x100; + this->stateFlags |= 0x100; } - this->unk_2E0 &= ~0x10; + this->stateFlags &= ~0x10; } } void func_80B153D4(EnTa* this, PlayState* play) { func_80B15308(this); - if (this->unk_2CC == 0) { - if (this->unk_2E0 & 0x80) { - this->unk_2E0 &= ~0x80; + if (this->timer == 0) { + if (this->stateFlags & 0x80) { + this->stateFlags &= ~0x80; func_80B14EDC(this, play); } } @@ -684,7 +684,7 @@ void func_80B15424(EnTa* this, PlayState* play) { play->transitionTrigger = TRANS_TRIGGER_START; gSaveContext.eventInf[0] |= 0x400; this->actionFunc = func_80B153D4; - this->unk_2CC = 22; + this->timer = 22; } } @@ -698,12 +698,12 @@ void EnTa_RunCuccoGame(EnTa* this, PlayState* play) { } if (!GameInteractor_Should(VB_PREVENT_STRENGTH, !func_80B150AC(this, play, i))) { - if (this->unk_2C4[i] > 0) { - this->unk_2C4[i]--; + if (this->superCuccoTimers[i] > 0) { + this->superCuccoTimers[i]--; } else { - this->unk_2CA = i; + this->lastFoundSuperCuccoIdx = i; Animation_Change(&this->skelAnime, &gTalonSitHandsUpAnim, 1.0f, 8.0f, 29.0f, ANIMMODE_ONCE, -10.0f); - this->unk_2E0 &= ~0x10; + this->stateFlags &= ~0x10; switch (EnTa_GetSuperCuccosCount(this, play)) { case 1: @@ -714,11 +714,11 @@ void EnTa_RunCuccoGame(EnTa* this, PlayState* play) { this->actionFunc = func_80B15424; Animation_Change(&this->skelAnime, &gTalonSitHandsUpAnim, 1.0f, 8.0f, 29.0f, ANIMMODE_ONCE, -10.0f); - this->unk_2E0 &= ~0x10; - this->unk_2E0 &= ~0x100; + this->stateFlags &= ~0x10; + this->stateFlags &= ~0x100; gSaveContext.eventInf[0] |= 0x100; Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP); - this->unk_2E0 &= ~0x200; + this->stateFlags &= ~0x200; Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET); return; case 2: @@ -736,7 +736,7 @@ void EnTa_RunCuccoGame(EnTa* this, PlayState* play) { return; } } else { - this->unk_2C4[i] = 7; + this->superCuccoTimers[i] = 7; } } } @@ -747,7 +747,7 @@ void EnTa_RunCuccoGame(EnTa* this, PlayState* play) { if (gSaveContext.timerSeconds == 0 && !Play_InCsMode(play)) { Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP); - this->unk_2E0 &= ~0x200; + this->stateFlags &= ~0x200; Sfx_PlaySfxCentered(NA_SE_SY_FOUND); gSaveContext.timerState = TIMER_STATE_OFF; Player_SetCsActionWithHaltedActors(play, &this->actor, 1); @@ -755,28 +755,28 @@ void EnTa_RunCuccoGame(EnTa* this, PlayState* play) { this->actionFunc = func_80B15424; func_80B14E28(this, play); gSaveContext.eventInf[0] &= ~0x100; - this->unk_2E0 |= 0x80; + this->stateFlags |= 0x80; Animation_Change(&this->skelAnime, &gTalonSitHandsUpAnim, 1.0f, 8.0f, 29.0f, ANIMMODE_ONCE, -10.0f); - this->unk_2E0 &= ~0x10; - this->unk_2E0 &= ~0x100; + this->stateFlags &= ~0x10; + this->stateFlags &= ~0x100; } - this->unk_2E0 |= 1; + this->stateFlags |= 1; } void func_80B1585C(EnTa* this, PlayState* play) { s32 i; - if (this->unk_2CC > 35) { + if (this->timer > 35) { for (i = 1; i < ARRAY_COUNT(this->superCuccos); i++) { if (this->superCuccos[i] != NULL) { Math_SmoothStepToS(&this->superCuccos[i]->actor.world.rot.y, i * -10000 - 3000, 2, 0x800, 0x100); this->superCuccos[i]->actor.shape.rot.y = this->superCuccos[i]->actor.world.rot.y; } } - } else if (this->unk_2CC == 35) { + } else if (this->timer == 35) { for (i = 0; i < ARRAY_COUNT(this->superCuccos); i++) { - this->unk_2C4[i] = (s32)(Rand_CenteredFloat(6.0f) + 10.0f); + this->superCuccoTimers[i] = (s32)(Rand_CenteredFloat(6.0f) + 10.0f); if (this->superCuccos[i] != NULL) { EnNiw* niw = this->superCuccos[i]; @@ -787,7 +787,7 @@ void func_80B1585C(EnTa* this, PlayState* play) { } } else { for (i = 0; i < ARRAY_COUNT(this->superCuccos); i++) { - if (this->unk_2CC < 35 - this->unk_2C4[i]) { + if (this->timer < 35 - this->superCuccoTimers[i]) { if (this->superCuccos[i] != NULL) { if (this->superCuccos[i]->actor.gravity > -2.0f) { this->superCuccos[i]->actor.gravity -= 0.03f; @@ -797,9 +797,9 @@ void func_80B1585C(EnTa* this, PlayState* play) { } } - if (this->unk_2CC == 0) { + if (this->timer == 0) { EnTa_SetupAction(this, EnTa_RunCuccoGame, EnTa_AnimRunToEnd); - this->unk_2E0 &= ~0x10; + this->stateFlags &= ~0x10; Animation_Change(&this->skelAnime, &gTalonSitWakeUpAnim, 1.0f, Animation_GetLastFrame(&gTalonSitWakeUpAnim) - 1.0f, Animation_GetLastFrame(&gTalonSitWakeUpAnim), ANIMMODE_ONCE, 10.0f); @@ -808,57 +808,57 @@ void func_80B1585C(EnTa* this, PlayState* play) { } void func_80B15AD4(EnTa* this, PlayState* play) { - if (this->unk_2CC == 0 && this->unk_2E0 & 0x20) { + if (this->timer == 0 && this->stateFlags & 0x20) { EnTa_SetupAction(this, func_80B1585C, EnTa_AnimRunToEnd); - this->unk_2E0 &= ~0x10; + this->stateFlags &= ~0x10; Animation_Change(&this->skelAnime, &gTalonSitHandsUpAnim, 1.0f, 1.0f, Animation_GetLastFrame(&gTalonSitHandsUpAnim), ANIMMODE_ONCE, 0.0f); - this->unk_2CC = 50; + this->timer = 50; Interface_SetTimer(0x1E); func_800F5ACC(NA_BGM_TIMED_MINI_GAME); - this->unk_2E0 |= 0x200; + this->stateFlags |= 0x200; Message_CloseTextbox(play); Player_SetCsActionWithHaltedActors(play, &this->actor, 1); } if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { - this->unk_2E0 |= 0x20; + this->stateFlags |= 0x20; } - this->unk_2E0 |= 1; + this->stateFlags |= 1; } void func_80B15BF8(EnTa* this, PlayState* play) { - if (this->unk_2E0 & 0x10) { + if (this->stateFlags & 0x10) { EnTa_SetupAction(this, func_80B15AD4, EnTa_AnimRunToEnd); - this->unk_2E0 &= ~0x10; + this->stateFlags &= ~0x10; Animation_Change(&this->skelAnime, &gTalonSitHandsUpAnim, 1.0f, 0.0f, 1.0f, ANIMMODE_ONCE, 0.0f); - this->unk_2CC = 5; + this->timer = 5; } if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { - this->unk_2E0 |= 0x20; + this->stateFlags |= 0x20; } - this->unk_2E0 |= 1; + this->stateFlags |= 1; } void func_80B15CC8(EnTa* this, PlayState* play) { - if (this->unk_2E0 & 0x10) { + if (this->stateFlags & 0x10) { EnTa_SetupAction(this, func_80B15BF8, EnTa_AnimRunToEnd); - this->unk_2E0 &= ~0x10; + this->stateFlags &= ~0x10; Animation_Change(&this->skelAnime, &gTalonSitHandsUpAnim, -1.0f, 29.0f, 0.0f, ANIMMODE_ONCE, 10.0f); } if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { - this->unk_2E0 |= 0x20; + this->stateFlags |= 0x20; } - this->unk_2E0 |= 1; + this->stateFlags |= 1; } void func_80B15D90(EnTa* this, PlayState* play) { EnTa_SetupAction(this, func_80B15CC8, EnTa_AnimRunToEnd); - this->unk_2E0 &= ~0x10; + this->stateFlags &= ~0x10; Animation_Change(&this->skelAnime, &gTalonSitHandsUpAnim, 1.0f, 8.0f, 29.0f, ANIMMODE_ONCE, -10.0f); Message_ContinueTextbox(play, 0x2080); - this->unk_2E0 &= ~0x20; + this->stateFlags &= ~0x20; } void EnTa_TalkGeneralInLonLonHouse(EnTa* this, PlayState* play) { @@ -866,7 +866,7 @@ void EnTa_TalkGeneralInLonLonHouse(EnTa* this, PlayState* play) { func_80B14F20(this, EnTa_IdleSittingInLonLonHouse); func_80B13AAC(this, play); } - this->unk_2E0 |= 1; + this->stateFlags |= 1; } void EnTa_GiveItemInLonLonHouse(EnTa* this, PlayState* play) { @@ -874,24 +874,24 @@ void EnTa_GiveItemInLonLonHouse(EnTa* this, PlayState* play) { !GameInteractor_Should(VB_GIVE_ITEM_FROM_TALONS_CHICKENS, true, &this->actor)) { this->actor.parent = NULL; this->actionFunc = EnTa_TalkGeneralInLonLonHouse; - if (!(this->unk_2E0 & 0x2)) { + if (!(this->stateFlags & 0x2)) { Flags_SetItemGetInf(ITEMGETINF_TALON_BOTTLE); } - this->unk_2E0 &= ~0x2; - } else if (this->unk_2E0 & 2) { + this->stateFlags &= ~0x2; + } else if (this->stateFlags & 2) { Actor_OfferGetItem(&this->actor, play, GI_MILK, 10000.0f, 50.0f); } else { if (GameInteractor_Should(VB_GIVE_ITEM_FROM_TALONS_CHICKENS, true, &this->actor)) { Actor_OfferGetItem(&this->actor, play, GI_MILK_BOTTLE, 10000.0f, 50.0f); } } - this->unk_2E0 |= 1; + this->stateFlags |= 1; } void EnTa_TalkAfterCuccoGameFirstWon(EnTa* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { Message_CloseTextbox(play); - this->unk_2E0 &= ~0x2; + this->stateFlags &= ~0x2; EnTa_SetupAction(this, EnTa_GiveItemInLonLonHouse, EnTa_AnimRunToEnd); if (GameInteractor_Should(VB_GIVE_ITEM_FROM_TALONS_CHICKENS, true, &this->actor)) { Actor_OfferGetItem(&this->actor, play, GI_MILK_BOTTLE, 10000.0f, 50.0f); @@ -913,7 +913,7 @@ void func_80B15FE8(EnTa* this, PlayState* play) { EnTa_SetupAction(this, EnTa_TalkGeneralInLonLonHouse, EnTa_AnimRunToEnd); break; case 2: - this->unk_2E0 |= 2; + this->stateFlags |= 2; EnTa_SetupAction(this, EnTa_GiveItemInLonLonHouse, EnTa_AnimRunToEnd); Rupees_ChangeBy(-30); GetItemEntry itemEntry = ItemTable_Retrieve(GI_MILK); @@ -939,8 +939,8 @@ void func_80B15FE8(EnTa* this, PlayState* play) { } } - if (this->unk_2E0 & 0x10) { - this->unk_2E0 |= 1; + if (this->stateFlags & 0x10) { + this->stateFlags |= 1; } } @@ -971,8 +971,8 @@ void func_80B161C0(EnTa* this, PlayState* play) { } } - if (this->unk_2E0 & 0x10) { - this->unk_2E0 |= 1; + if (this->stateFlags & 0x10) { + this->stateFlags |= 1; } } @@ -982,8 +982,8 @@ void func_80B162E8(EnTa* this, PlayState* play) { EnTa_SetupAction(this, EnTa_TalkAfterCuccoGameFirstWon, EnTa_AnimRunToEnd); } - if (this->unk_2E0 & 0x10) { - this->unk_2E0 |= 1; + if (this->stateFlags & 0x10) { + this->stateFlags |= 1; } } @@ -999,8 +999,8 @@ void func_80B16364(EnTa* this, PlayState* play) { } } - if (this->unk_2E0 & 0x10) { - this->unk_2E0 |= 1; + if (this->stateFlags & 0x10) { + this->stateFlags |= 1; } } @@ -1008,7 +1008,7 @@ void func_80B1642C(EnTa* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { if (Inventory_HasEmptyBottle()) { Message_CloseTextbox(play); - this->unk_2E0 |= 2; + this->stateFlags |= 2; EnTa_SetupAction(this, EnTa_GiveItemInLonLonHouse, EnTa_AnimRunToEnd); Actor_OfferGetItem(&this->actor, play, GI_MILK, 10000.0f, 50.0f); } else { @@ -1045,7 +1045,7 @@ void EnTa_IdleSittingInLonLonHouse(EnTa* this, PlayState* play) { } } } - this->unk_2E0 &= ~1; + this->stateFlags &= ~1; } void EnTa_IdleAfterCuccoGameFinished(EnTa* this, PlayState* play) { @@ -1066,7 +1066,7 @@ void EnTa_IdleAfterCuccoGameFinished(EnTa* this, PlayState* play) { this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED; func_8002F2CC(&this->actor, play, 1000.0f); } - this->unk_2E0 |= 1; + this->stateFlags |= 1; } void EnTa_BlinkWaitUntilNext(EnTa* this) { @@ -1075,7 +1075,7 @@ void EnTa_BlinkWaitUntilNext(EnTa* this) { if (temp_v0 != 0) { this->blinkTimer = temp_v0; } else { - this->unk_2B0 = EnTa_BlinkAdvanceState; + this->blinkFunc = EnTa_BlinkAdvanceState; } } @@ -1090,14 +1090,14 @@ void EnTa_BlinkAdvanceState(EnTa* this) { if (nextEyeIndex >= blinkTimer) { this->eyeIndex = 0; - if (this->unk_2CE > 0) { - this->unk_2CE--; + if (this->rapidBlinks > 0) { + this->rapidBlinks--; blinkTimer = 1; } else { blinkTimer = (s32)(Rand_ZeroOne() * 60.0f) + 20; } this->blinkTimer = blinkTimer; - this->unk_2B0 = EnTa_BlinkWaitUntilNext; + this->blinkFunc = EnTa_BlinkWaitUntilNext; } else { this->eyeIndex = nextEyeIndex; this->blinkTimer = 1; @@ -1116,16 +1116,16 @@ void EnTa_AnimSleeping(EnTa* this) { Animation_PlayOnce(&this->skelAnime, this->currentAnimation); Audio_PlayActorSound2(&this->actor, NA_SE_VO_TA_SLEEP); } - this->unk_2E0 |= 0xC; + this->stateFlags |= 0xC; } void EnTa_AnimSitSleeping(EnTa* this) { - if (this->unk_2E2 > 0) { - this->unk_2E2--; + if (this->nodOffTimer > 0) { + this->nodOffTimer--; } else { if (SkelAnime_Update(&this->skelAnime)) { Animation_PlayOnce(&this->skelAnime, this->currentAnimation); - this->unk_2E2 = Rand_ZeroFloat(100.0f) + 100.0f; + this->nodOffTimer = Rand_ZeroFloat(100.0f) + 100.0f; } if (this->skelAnime.curFrame < 96.0f && this->skelAnime.curFrame >= 53.0f) { @@ -1133,17 +1133,17 @@ void EnTa_AnimSitSleeping(EnTa* this) { } else { this->eyeIndex = 2; } - this->unk_2E0 |= 8; + this->stateFlags |= 8; } - this->unk_2E0 |= 4; + this->stateFlags |= 4; } void EnTa_AnimRunToEnd(EnTa* this) { - if (!(this->unk_2E0 & 0x10)) { + if (!(this->stateFlags & 0x10)) { if (SkelAnime_Update(&this->skelAnime)) { - this->unk_2E0 |= 0x10; + this->stateFlags |= 0x10; } - this->unk_2E0 |= 8; + this->stateFlags |= 8; } } @@ -1155,26 +1155,26 @@ void EnTa_Update(Actor* thisx, PlayState* play) { CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); Actor_MoveXZGravity(&this->actor); Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4); - this->unk_260(this); + this->animFunc(this); this->actionFunc(this, play); - if (!(this->unk_2E0 & 4)) { - this->unk_2B0(this); + if (!(this->stateFlags & 4)) { + this->blinkFunc(this); } - if (this->unk_2E0 & 1) { - func_80038290(play, &this->actor, &this->unk_2D4, &this->unk_2DA, this->actor.focus.pos); + if (this->stateFlags & 1) { + func_80038290(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos); } else { - Math_SmoothStepToS(&this->unk_2D4.x, 0, 6, 6200, 100); - Math_SmoothStepToS(&this->unk_2D4.y, 0, 6, 6200, 100); - Math_SmoothStepToS(&this->unk_2DA.x, 0, 6, 6200, 100); - Math_SmoothStepToS(&this->unk_2DA.y, 0, 6, 6200, 100); + Math_SmoothStepToS(&this->headRot.x, 0, 6, 6200, 100); + Math_SmoothStepToS(&this->headRot.y, 0, 6, 6200, 100); + Math_SmoothStepToS(&this->torsoRot.x, 0, 6, 6200, 100); + Math_SmoothStepToS(&this->torsoRot.y, 0, 6, 6200, 100); } - this->unk_2E0 &= ~0x5; + this->stateFlags &= ~0x5; - if (this->unk_2CC > 0) { - this->unk_2CC--; + if (this->timer > 0) { + this->timer--; } } @@ -1183,17 +1183,17 @@ s32 EnTa_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po switch (limbIndex) { case 8: - rot->x += this->unk_2DA.y; - rot->y -= this->unk_2DA.x; + rot->x += this->torsoRot.y; + rot->y -= this->torsoRot.x; break; case 15: - rot->x += this->unk_2D4.y; - rot->z += this->unk_2D4.x; + rot->x += this->headRot.y; + rot->z += this->headRot.x; break; } - if (this->unk_2E0 & 0x8) { - this->unk_2E0 &= ~0x8; + if (this->stateFlags & 0x8) { + this->stateFlags &= ~0x8; } else if ((limbIndex == 8) || (limbIndex == 10) || (limbIndex == 13)) { s32 limbIdx50 = limbIndex * 50; diff --git a/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.h b/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.h index 1d07dbd96..69b391001 100644 --- a/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.h +++ b/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.h @@ -17,22 +17,22 @@ typedef struct EnTa { /* 0x0190 */ Vec3s jointTable[17]; /* 0x01F6 */ Vec3s morphTable[17]; /* 0x025C */ EnTaActionFunc actionFunc; - /* 0x0260 */ EnTaUnkFunc unk_260; + /* 0x0260 */ EnTaUnkFunc animFunc; /* 0x0264 */ ColliderCylinder collider; - /* 0x02B0 */ EnTaUnkFunc unk_2B0; + /* 0x02B0 */ EnTaUnkFunc blinkFunc; /* 0x02B4 */ s16 eyeIndex; /* 0x02B6 */ s16 blinkTimer; /* 0x02B8 */ EnNiw* superCuccos[3]; - /* 0x02C4 */ s16 unk_2C4[3]; - /* 0x02CA */ u8 unk_2CA; - /* 0x02CC */ s16 unk_2CC; - /* 0x02CE */ s16 unk_2CE; - /* 0x02D0 */ s16 unk_2D0; - /* 0x02D2 */ s16 unk_2D2; - /* 0x02D4 */ Vec3s unk_2D4; - /* 0x02DA */ Vec3s unk_2DA; - /* 0x02E0 */ u16 unk_2E0; - /* 0x02E2 */ s16 unk_2E2; + /* 0x02C4 */ s16 superCuccoTimers[3]; + /* 0x02CA */ u8 lastFoundSuperCuccoIdx; + /* 0x02CC */ s16 timer; + /* 0x02CE */ s16 rapidBlinks; + /* 0x02D0 */ s16 subCamId; + /* 0x02D2 */ s16 returnToCamId; + /* 0x02D4 */ Vec3s headRot; + /* 0x02DA */ Vec3s torsoRot; + /* 0x02E0 */ u16 stateFlags; + /* 0x02E2 */ s16 nodOffTimer; /* 0x02E4 */ AnimationHeader* currentAnimation; } EnTa; // size = 0x02E8 diff --git a/soh/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c b/soh/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c index b7f35742c..efeb3ae3f 100644 --- a/soh/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c +++ b/soh/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c @@ -241,8 +241,8 @@ s32 func_80B205CC(EnToryo* this, PlayState* play) { u32 func_80B20634(EnToryo* this, PlayState* play) { u32 ret; - if (this->unk_1E0 != 0) { - if (this->unk_1E0 == 10) { + if (this->exchangeItemId != 0) { + if (this->exchangeItemId == 10) { Sfx_PlaySfxCentered(NA_SE_SY_TRE_BOX_APPEAR); if (Flags_GetInfTable(INFTABLE_171)) { ret = 0x606E; @@ -291,30 +291,30 @@ void func_80B20768(EnToryo* this, PlayState* play) { s16 sp32; s16 sp30; - if (this->unk_1E4 == 3 && !GameInteractor_Should(VB_FIX_SAW_SOFTLOCK, false)) { + if (this->messageState == 3 && !GameInteractor_Should(VB_FIX_SAW_SOFTLOCK, false)) { Actor_ProcessTalkRequest(&this->actor, play); Message_ContinueTextbox(play, this->actor.textId); - this->unk_1E4 = 1; + this->messageState = 1; } - if (this->unk_1E4 == 1) { - this->unk_1E4 = func_80B203D8(this, play); + if (this->messageState == 1) { + this->messageState = func_80B203D8(this, play); } - if (this->unk_1E4 == 5) { - this->unk_1E4 = func_80B205CC(this, play); + if (this->messageState == 5) { + this->messageState = func_80B205CC(this, play); return; } - if (this->unk_1E4 == 2) { + if (this->messageState == 2) { Message_ContinueTextbox(play, this->actor.textId); - this->unk_1E4 = 1; + this->messageState = 1; } - if (this->unk_1E4 == 4) { + if (this->messageState == 4) { if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(VB_TRADE_SAW, true, this)) { this->actor.parent = NULL; - this->unk_1E4 = 5; + this->messageState = 5; Flags_SetRandomizerInf(RAND_INF_ADULT_TRADES_GV_TRADE_SAW); } else { Actor_OfferGetItem(&this->actor, play, GI_SWORD_BROKEN, 100.0f, 10.0f); @@ -322,14 +322,14 @@ void func_80B20768(EnToryo* this, PlayState* play) { return; } - if (this->unk_1E4 == 0) { + if (this->messageState == 0) { if (Actor_ProcessTalkRequest(&this->actor, play)) { - this->unk_1E0 = func_8002F368(play); - if (this->unk_1E0 != 0) { + this->exchangeItemId = func_8002F368(play); + if (this->exchangeItemId != 0) { player->actor.textId = func_80B20634(this, play); this->actor.textId = player->actor.textId; } - this->unk_1E4 = 1; + this->messageState = 1; return; } @@ -344,7 +344,7 @@ void func_80B20768(EnToryo* this, PlayState* play) { void func_80B20914(EnToryo* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); func_80B20768(this, play); - if (this->unk_1E4 != 0) { + if (this->messageState != 0) { this->stateFlags |= 0x10; } else { this->stateFlags &= ~0x10; diff --git a/soh/src/overlays/actors/ovl_En_Toryo/z_en_toryo.h b/soh/src/overlays/actors/ovl_En_Toryo/z_en_toryo.h index 8e44ed0a9..25d7f0c09 100644 --- a/soh/src/overlays/actors/ovl_En_Toryo/z_en_toryo.h +++ b/soh/src/overlays/actors/ovl_En_Toryo/z_en_toryo.h @@ -13,8 +13,8 @@ typedef struct EnToryo { /* 0x014C */ SkelAnime skelAnime; /* 0x0190 */ EnToryoActionFunc actionFunc; /* 0x0194 */ ColliderCylinder collider; - /* 0x01E0 */ s32 unk_1E0; - /* 0x01E4 */ s32 unk_1E4; + /* 0x01E0 */ s32 exchangeItemId; + /* 0x01E4 */ s32 messageState; /* 0x01E8 */ u16 stateFlags; /* 0x01EA */ s16 unk_1EA; /* 0x01EC */ NpcInteractInfo interactInfo; diff --git a/soh/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c b/soh/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c index fe771b892..bcbeedff1 100644 --- a/soh/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c +++ b/soh/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c @@ -124,42 +124,42 @@ void EnWeiyer_Destroy(Actor* thisx, PlayState* play) { } void func_80B32384(EnWeiyer* this) { - this->unk_196 = this->actor.shape.rot.y; - this->unk_27C = (cosf(-M_PI / 8) * 3.0f) + this->actor.world.pos.y; + this->targetYaw = this->actor.shape.rot.y; + this->swimHeight = (cosf(-M_PI / 8) * 3.0f) + this->actor.world.pos.y; Animation_MorphToLoop(&this->skelAnime, &gStingerHitAnim, -5.0f); - this->unk_194 = 30; + this->timer = 30; this->actor.speedXZ = CLAMP_MAX(this->actor.speedXZ, 2.5f); this->collider.base.atFlags &= ~AT_ON; - this->unk_280 = this->actor.floorHeight; + this->targetSwimHeight = this->actor.floorHeight; this->actionFunc = func_80B328E8; } void func_80B32434(EnWeiyer* this) { Animation_MorphToLoop(&this->skelAnime, &gStingerHitAnim, -5.0f); this->collider.base.atFlags |= AT_ON; - this->unk_194 = 0; + this->timer = 0; this->actor.speedXZ = 5.0f; this->actionFunc = func_80B32C2C; } void func_80B32494(EnWeiyer* this) { Animation_Change(&this->skelAnime, &gStingerPopOutAnim, 2.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f); - this->unk_194 = 40; + this->timer = 40; this->collider.base.atFlags |= AT_ON; this->actionFunc = func_80B32D30; } void func_80B32508(EnWeiyer* this) { - this->unk_194 = 200; + this->timer = 200; this->collider.base.atFlags |= AT_ON; this->skelAnime.playSpeed = 3.0f; this->actionFunc = func_80B32E34; } void func_80B32538(EnWeiyer* this) { - this->unk_194 = 200; - this->unk_196 = this->actor.yawTowardsPlayer + 0x8000; - this->unk_27C = this->actor.world.pos.y; + this->timer = 200; + this->targetYaw = this->actor.yawTowardsPlayer + 0x8000; + this->swimHeight = this->actor.world.pos.y; this->actor.speedXZ = CLAMP_MAX(this->actor.speedXZ, 4.0f); this->collider.base.atFlags &= ~AT_ON; this->skelAnime.playSpeed = 1.0f; @@ -168,7 +168,7 @@ void func_80B32538(EnWeiyer* this) { void func_80B325A0(EnWeiyer* this) { Animation_Change(&this->skelAnime, &gStingerHitAnim, 2.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -3.0f); - this->unk_194 = 40; + this->timer = 40; this->collider.base.atFlags &= ~AT_ON; this->collider.base.acFlags &= ~AC_ON; this->actor.gravity = 0.0f; @@ -181,7 +181,7 @@ void func_80B325A0(EnWeiyer* this) { void func_80B32660(EnWeiyer* this) { Animation_Change(&this->skelAnime, &gStingerPopOutAnim, 2.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f); - this->unk_194 = 80; + this->timer = 80; this->actor.speedXZ = 0.0f; this->actor.velocity.y = 0.0f; this->actor.gravity = -1.0f; @@ -194,7 +194,7 @@ void func_80B32660(EnWeiyer* this) { void func_80B32724(EnWeiyer* this) { Animation_MorphToLoop(&this->skelAnime, &gStingerHitAnim, -5.0f); - this->unk_194 = 20; + this->timer = 20; Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0, 0x28); this->collider.base.atFlags &= ~AT_ON; this->collider.base.acFlags &= ~AC_ON; @@ -211,7 +211,7 @@ void func_80B327B0(EnWeiyer* this) { void func_80B327D8(EnWeiyer* this) { this->actor.shape.rot.x = -0x2000; - this->unk_194 = -1; + this->timer = -1; this->actor.speedXZ = 5.0f; this->actionFunc = func_80B3349C; } @@ -243,8 +243,8 @@ void func_80B328E8(EnWeiyer* this, PlayState* play) { Math_ScaledStepToS(&this->actor.shape.rot.x, 0, 0x800); sp34 = Animation_OnFrame(&this->skelAnime, 0.0f); curFrame = this->skelAnime.curFrame; - Math_StepToF(&this->unk_27C, this->unk_280, 0.5f); - this->actor.world.pos.y = this->unk_27C - cosf((curFrame - 5.0f) * (M_PI / 40)) * 3.0f; + Math_StepToF(&this->swimHeight, this->targetSwimHeight, 0.5f); + this->actor.world.pos.y = this->swimHeight - cosf((curFrame - 5.0f) * (M_PI / 40)) * 3.0f; if (curFrame <= 45.0f) { Math_StepToF(&this->actor.speedXZ, 1.0f, 0.03f); @@ -253,19 +253,19 @@ void func_80B328E8(EnWeiyer* this, PlayState* play) { } if (this->actor.bgCheckFlags & 8) { - this->unk_196 = this->actor.wallYaw; - this->unk_194 = 30; + this->targetYaw = this->actor.wallYaw; + this->timer = 30; } - if (Math_ScaledStepToS(&this->actor.shape.rot.y, this->unk_196, 182)) { - if (this->unk_194 != 0) { - this->unk_194--; + if (Math_ScaledStepToS(&this->actor.shape.rot.y, this->targetYaw, 182)) { + if (this->timer != 0) { + this->timer--; } - if (this->unk_194 == 0) { - this->unk_196 = + if (this->timer == 0) { + this->targetYaw = Rand_S16Offset(0x2000, 0x2000) * ((Rand_ZeroOne() < 0.5f) ? -1 : 1) + this->actor.shape.rot.y; - this->unk_194 = 30; + this->timer = 30; if (Rand_ZeroOne() < 0.3333f) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_EIER_CRY); @@ -278,17 +278,17 @@ void func_80B328E8(EnWeiyer* this, PlayState* play) { func_80B32434(this); } else { this->actor.world.pos.y = this->actor.home.pos.y; - this->unk_280 = + this->targetSwimHeight = Rand_ZeroOne() * ((this->actor.home.pos.y - this->actor.floorHeight) / 2.0f) + this->actor.floorHeight; } } else { Player* player = GET_PLAYER(play); if (this->actor.bgCheckFlags & 1) { - this->unk_280 = + this->targetSwimHeight = this->actor.home.pos.y - Rand_ZeroOne() * ((this->actor.home.pos.y - this->actor.floorHeight) / 2.0f); } else if (sp34 && (Rand_ZeroOne() < 0.1f)) { - this->unk_280 = + this->targetSwimHeight = Rand_ZeroOne() * (this->actor.home.pos.y - this->actor.floorHeight) + this->actor.floorHeight; } @@ -302,11 +302,11 @@ void func_80B328E8(EnWeiyer* this, PlayState* play) { void func_80B32C2C(EnWeiyer* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (this->unk_194 == 0) { + if (this->timer == 0) { if (Math_ScaledStepToS(&this->actor.shape.rot.x, -0x4000, 0x800)) { this->actor.shape.rot.z = 0; this->actor.shape.rot.y += 0x8000; - this->unk_194 = 1; + this->timer = 1; } else { this->actor.shape.rot.z = this->actor.shape.rot.x * 2; } @@ -336,11 +336,11 @@ void func_80B32D30(EnWeiyer* this, PlayState* play) { Math_ScaledStepToS(&this->actor.shape.rot.x, 0, 0x800); Math_StepToF(&this->actor.speedXZ, 0.0f, 1.0f); - if (this->unk_194 != 0) { - this->unk_194--; + if (this->timer != 0) { + this->timer--; } - if (this->unk_194 == 0) { + if (this->timer == 0) { func_80B32434(this); } else if (this->actor.world.pos.y < this->actor.home.pos.y) { func_80B32384(this); @@ -363,11 +363,11 @@ void func_80B32E34(EnWeiyer* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (this->unk_194 != 0) { - this->unk_194--; + if (this->timer != 0) { + this->timer--; } - if ((this->unk_194 == 0) || ((this->actor.home.pos.y + 20.0f) <= player->actor.world.pos.y) || + if ((this->timer == 0) || ((this->actor.home.pos.y + 20.0f) <= player->actor.world.pos.y) || (this->collider.base.atFlags & AT_HIT)) { func_80B32538(this); } else { @@ -405,9 +405,9 @@ void func_80B33018(EnWeiyer* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_ScaledStepToS(&this->actor.shape.rot.x, 0, 0x800); curFrame = this->skelAnime.curFrame; - Math_StepToF(&this->unk_27C, (this->actor.home.pos.y - this->actor.floorHeight) / 4.0f + this->actor.floorHeight, + Math_StepToF(&this->swimHeight, (this->actor.home.pos.y - this->actor.floorHeight) / 4.0f + this->actor.floorHeight, 1.0f); - this->actor.world.pos.y = this->unk_27C - cosf((curFrame - 5.0f) * (M_PI / 40)) * 3.0f; + this->actor.world.pos.y = this->swimHeight - cosf((curFrame - 5.0f) * (M_PI / 40)) * 3.0f; if (curFrame <= 45.0f) { Math_StepToF(&this->actor.speedXZ, 1.0f, 0.03f); @@ -415,16 +415,16 @@ void func_80B33018(EnWeiyer* this, PlayState* play) { Math_StepToF(&this->actor.speedXZ, 1.3f, 0.03f); } - if (this->unk_194 != 0) { - this->unk_194--; + if (this->timer != 0) { + this->timer--; } if (this->actor.bgCheckFlags & 8) { - this->unk_196 = this->actor.wallYaw; + this->targetYaw = this->actor.wallYaw; } - if (Math_SmoothStepToS(&this->actor.shape.rot.y, this->unk_196, 2, 0x200, 0x80) == 0) { - this->unk_196 = this->actor.yawTowardsPlayer + 0x8000; + if (Math_SmoothStepToS(&this->actor.shape.rot.y, this->targetYaw, 2, 0x200, 0x80) == 0) { + this->targetYaw = this->actor.yawTowardsPlayer + 0x8000; } if (this->actor.home.pos.y < this->actor.world.pos.y) { @@ -435,7 +435,7 @@ void func_80B33018(EnWeiyer* this, PlayState* play) { } } - if (this->unk_194 == 0) { + if (this->timer == 0) { func_80B32384(this); } } @@ -443,21 +443,21 @@ void func_80B33018(EnWeiyer* this, PlayState* play) { void func_80B331CC(EnWeiyer* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (this->unk_194 != 0) { - this->unk_194--; + if (this->timer != 0) { + this->timer--; } if (this->actor.bgCheckFlags & 8) { - this->unk_196 = this->actor.wallYaw; + this->targetYaw = this->actor.wallYaw; } else { - this->unk_196 = this->actor.yawTowardsPlayer + 0x8000; + this->targetYaw = this->actor.yawTowardsPlayer + 0x8000; } - Math_ScaledStepToS(&this->actor.world.rot.y, this->unk_196, 0x38E); + Math_ScaledStepToS(&this->actor.world.rot.y, this->targetYaw, 0x38E); Math_ScaledStepToS(&this->actor.shape.rot.x, 0, 0x200); - this->actor.shape.rot.z = sinf(this->unk_194 * (M_PI / 5)) * 5120.0f; + this->actor.shape.rot.z = sinf(this->timer * (M_PI / 5)) * 5120.0f; - if (this->unk_194 == 0) { + if (this->timer == 0) { this->actor.shape.rot.z = 0; this->collider.base.acFlags |= AC_ON; func_80B32384(this); @@ -469,11 +469,11 @@ void func_80B332B4(EnWeiyer* this, PlayState* play) { Math_ScaledStepToS(&this->actor.shape.rot.x, -0x4000, 0x400); this->actor.shape.rot.z += 0x1000; - if (this->unk_194 != 0) { - this->unk_194--; + if (this->timer != 0) { + this->timer--; } - if ((this->unk_194 == 0) || (this->actor.bgCheckFlags & 0x10)) { + if ((this->timer == 0) || (this->actor.bgCheckFlags & 0x10)) { func_80B327B0(this); } } @@ -489,8 +489,8 @@ void func_80B33338(EnWeiyer* this, PlayState* play) { } void func_80B333B8(EnWeiyer* this, PlayState* play) { - if (this->unk_194 != 0) { - this->unk_194--; + if (this->timer != 0) { + this->timer--; } Math_ScaledStepToS(&this->actor.shape.rot.x, 0, 0x200); @@ -507,7 +507,7 @@ void func_80B333B8(EnWeiyer* this, PlayState* play) { } } - if (this->unk_194 == 0) { + if (this->timer == 0) { this->actor.gravity = 0.0f; this->actor.velocity.y = 0.0f; this->collider.dim.height = sCylinderInit.dim.height; @@ -524,22 +524,22 @@ void func_80B3349C(EnWeiyer* this, PlayState* play) { phi_a0 = ((this->actor.home.pos.y + 20.0f) <= player->actor.world.pos.y); - if (this->unk_194 == -1) { + if (this->timer == -1) { if (phi_a0 || (this->collider.base.atFlags & AT_HIT)) { func_80B32538(this); } else if (this->actor.yDistToWater < 0.0f) { - this->unk_194 = 10; + this->timer = 10; EffectSsGSplash_Spawn(play, &this->actor.world.pos, NULL, NULL, 1, 400); Audio_PlayActorSound2(&this->actor, NA_SE_EN_OCTAROCK_JUMP); } } else { if (phi_a0 || (this->collider.base.atFlags & AT_HIT)) { - this->unk_194 = 0; - } else if (this->unk_194 != 0) { - this->unk_194--; + this->timer = 0; + } else if (this->timer != 0) { + this->timer--; } - if (this->unk_194 == 0) { + if (this->timer == 0) { phi_a1 = 0x1800; } else { phi_a1 = func_80B32DEC(this, play); diff --git a/soh/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.h b/soh/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.h index ab61af5bc..22447b069 100644 --- a/soh/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.h +++ b/soh/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.h @@ -12,12 +12,12 @@ typedef struct EnWeiyer { /* 0x0000 */ Actor actor; /* 0x014C */ SkelAnime skelAnime; /* 0x0190 */ EnWeiyerActionFunc actionFunc; - /* 0x0194 */ s16 unk_194; - /* 0x0196 */ s16 unk_196; + /* 0x0194 */ s16 timer; + /* 0x0196 */ s16 targetYaw; /* 0x0198 */ Vec3s jointTable[19]; /* 0x020A */ Vec3s morphTable[19]; - /* 0x027C */ f32 unk_27C; - /* 0x0280 */ f32 unk_280; + /* 0x027C */ f32 swimHeight; + /* 0x0280 */ f32 targetSwimHeight; /* 0x0284 */ ColliderCylinder collider; } EnWeiyer; // size = 0x02D0 diff --git a/soh/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.h b/soh/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.h index 423b5302f..f8d6063c6 100644 --- a/soh/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.h +++ b/soh/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.h @@ -16,7 +16,7 @@ typedef struct EnWonderTalk { /* 0x0154 */ s16 switchFlag; /* 0x0156 */ s16 unk_156; /* 0x0158 */ s16 unk_158; - /* 0x0160 */ s16 unk_15A; + /* 0x015A */ s16 unk_15A; /* 0x015C */ f32 unk_15C; /* 0x0160 */ f32 height; /* 0x0164 */ u8 unk_164; diff --git a/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index c02744959..b7178a89a 100644 --- a/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -173,17 +173,17 @@ void func_80B4B010(EnZl1* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, play)) { Animation_Change(&this->skelAnime, &gChildZelda1Anim_10B38, 1.0f, 0.0f, Animation_GetLastFrame(&gChildZelda1Anim_10B38), ANIMMODE_ONCE_INTERP, -10.0f); - this->unk_1E8 = Play_CreateSubCamera(play); + this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT); - Play_ChangeCameraStatus(play, this->unk_1E8, CAM_STAT_ACTIVE); - func_800C0808(play, this->unk_1E8, player, CAM_SET_FREE0); + Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); + func_800C0808(play, this->subCamId, player, CAM_SET_FREE0); play->envCtx.screenFillColor[0] = 255; play->envCtx.screenFillColor[1] = 255; play->envCtx.screenFillColor[2] = 255; play->envCtx.screenFillColor[3] = 24; play->envCtx.fillScreen = true; - Play_CameraSetAtEye(play, this->unk_1E8, &vec1, &vec2); - Play_CameraSetFov(play, this->unk_1E8, 30.0f); + Play_CameraSetAtEye(play, this->subCamId, &vec1, &vec2); + Play_CameraSetFov(play, this->subCamId, 30.0f); ShrinkWindow_SetVal(0x20); Interface_ChangeAlpha(2); player->actor.world.pos = playerPos; @@ -235,8 +235,8 @@ void func_80B4B240(EnZl1* this, PlayState* play) { case 1: if ((Message_GetState(msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { play->envCtx.fillScreen = false; - Play_CameraSetAtEye(play, this->unk_1E8, &sp74, &sp68); - Play_CameraSetFov(play, this->unk_1E8, 25.0f); + Play_CameraSetAtEye(play, this->subCamId, &sp74, &sp68); + Play_CameraSetFov(play, this->subCamId, 25.0f); player->actor.world.pos = sp58; this->actor.textId = 0x702F; Message_ContinueTextbox(play, this->actor.textId); @@ -414,8 +414,8 @@ void func_80B4B8B4(EnZl1* this, PlayState* play) { this->actor.velocity.z = (sp68.z - sp74.z) / actionLength; } func_80038290(play, &this->actor, &this->unk_200, &this->unk_206, this->actor.focus.pos); - Play_CameraSetAtEye(play, this->unk_1E8, &sp98, &sp8C); - Play_CameraSetFov(play, this->unk_1E8, 70.0f); + Play_CameraSetAtEye(play, this->subCamId, &sp98, &sp8C); + Play_CameraSetFov(play, this->subCamId, 70.0f); } } @@ -523,9 +523,9 @@ void func_80B4BF2C(EnZl1* this, PlayState* play) { } case 2: if (Actor_HasParent(&this->actor, play)) { - Play_CopyCamera(play, MAIN_CAM, this->unk_1E8); + Play_CopyCamera(play, MAIN_CAM, this->subCamId); Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE); - Play_ClearCamera(play, this->unk_1E8); + Play_ClearCamera(play, this->subCamId); this->actor.parent = NULL; this->unk_1E2++; } else { diff --git a/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.h b/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.h index 4b99e10f8..b4435d6b4 100644 --- a/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.h +++ b/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.h @@ -17,7 +17,7 @@ typedef struct EnZl1 { /* 0x01E2 */ s16 unk_1E2; /* 0x01E4 */ s16 unk_1E4; /* 0x01E6 */ s16 unk_1E6; - /* 0x01E8 */ s16 unk_1E8; + /* 0x01E8 */ s16 subCamId; /* 0x01EA */ char unk_1EA[0x2]; /* 0x01EC */ void* unk_1EC; /* 0x01F0 */ char unk_1F0[0x2]; diff --git a/soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c b/soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c index 0879e8b7b..1c8a531fa 100644 --- a/soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c +++ b/soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c @@ -559,7 +559,7 @@ void EnZl2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, } void func_80B4FCCC(EnZl2* this, PlayState* play) { - s32 unk_274 = this->unk_274; + s32 unk_274 = this->zl2Anime1ObjectSlot; gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[unk_274].segment); } @@ -921,7 +921,7 @@ void func_80B50A04(EnZl2* this, PlayState* play) { if (npcAction != NULL) { newAction = npcAction->action; - unk_240 = this->unk_240; + unk_240 = this->cueId; if (newAction != unk_240) { switch (newAction) { case 1: @@ -972,7 +972,7 @@ void func_80B50A04(EnZl2* this, PlayState* play) { default: osSyncPrintf("En_Zl2_inAgain_Check_DemoMode:そんな動作は無い!!!!!!!!\n"); } - this->unk_240 = newAction; + this->cueId = newAction; } } } @@ -1332,7 +1332,7 @@ void func_80B51948(EnZl2* this, PlayState* play) { if (npcAction != NULL) { newAction = npcAction->action; - unk_240 = this->unk_240; + unk_240 = this->cueId; if (newAction != unk_240) { switch (newAction) { case 1: @@ -1362,7 +1362,7 @@ void func_80B51948(EnZl2* this, PlayState* play) { default: osSyncPrintf("En_Zl2_inEnding_Check_DemoMode:そんな動作は無い!!!!!!!!\n"); } - this->unk_240 = newAction; + this->cueId = newAction; } } } @@ -1511,7 +1511,7 @@ void func_80B51FA8(EnZl2* this, PlayState* play) { if (npcAction != NULL) { action = npcAction->action; - unk_240 = this->unk_240; + unk_240 = this->cueId; if (action != unk_240) { switch (action) { case 1: @@ -1527,7 +1527,7 @@ void func_80B51FA8(EnZl2* this, PlayState* play) { osSyncPrintf("En_Zl2_inRunning_Check_DemoMode:そんな動作は無い!!!!!!!!\n"); break; } - this->unk_240 = action; + this->cueId = action; } } } @@ -1579,7 +1579,7 @@ void func_80B521A0(EnZl2* this, PlayState* play) { } if (Object_IsLoaded(objectCtx, bankIndex)) { - this->unk_274 = bankIndex; + this->zl2Anime1ObjectSlot = bankIndex; func_80B4FCCC(this, play); this->unk_278 = Animation_GetLastFrame(&gZelda2Anime1Anim_0022D0); func_80B52114(this, play); diff --git a/soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h b/soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h index ec519365a..74ab71bb1 100644 --- a/soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h +++ b/soh/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h @@ -26,7 +26,7 @@ typedef struct EnZl2 { /* 0x01DC */ s16 unk_1DC[0x18]; // ??? /* 0x020C */ s16 unk_20C[0x18]; // ??? /* 0x023C */ f32 unk_23C; - /* 0x0240 */ s32 unk_240; + /* 0x0240 */ s32 cueId; /* 0x0244 */ s32 unk_244; /* 0x0248 */ s32 unk_248; /* 0x024C */ s32 unk_24C; @@ -35,7 +35,7 @@ typedef struct EnZl2 { /* 0x0258 */ char unk_258[0xC]; /* 0x0264 */ s32 overrideLimbDrawConfig; /* 0x0268 */ char unk_268[0xC]; - /* 0x0274 */ s32 unk_274; + /* 0x0274 */ s32 zl2Anime1ObjectSlot; /* 0x0278 */ f32 unk_278; /* 0x027C */ f32 unk_27C; } EnZl2; // size = 0x0280 diff --git a/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c index eb715658a..a672df266 100644 --- a/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c +++ b/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c @@ -744,7 +744,7 @@ s32 func_80B54DD4(EnZl3* this) { } void func_80B54DE0(EnZl3* this, PlayState* play) { - s32 idx = this->unk_318; + s32 idx = this->zl2Anime2ObjectSlot; gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[idx].segment); } @@ -2634,7 +2634,7 @@ void func_80B59DB8(EnZl3* this, PlayState* play) { } if (Object_IsLoaded(objCtx, objIndex)) { - this->unk_318 = objIndex; + this->zl2Anime2ObjectSlot = objIndex; func_80B54DE0(this, play); func_80B59B6C(this, play); } diff --git a/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.h b/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.h index 085225b07..5077e9f71 100644 --- a/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.h +++ b/soh/src/overlays/actors/ovl_En_Zl3/z_en_zl3.h @@ -36,7 +36,7 @@ typedef struct EnZl3 { /* 0x030C */ Path* unk_30C; /* 0x0310 */ s32 unk_310; /* 0x0314 */ s32 unk_314; - /* 0x0318 */ s32 unk_318; + /* 0x0318 */ s32 zl2Anime2ObjectSlot; /* 0x031C */ Vec3f unk_31C; /* 0x0328 */ s32 unk_328; /* 0x032C */ Vec3f unk_32C; diff --git a/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.c b/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.c index 372a69ffa..e2a2ad310 100644 --- a/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.c +++ b/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.c @@ -622,7 +622,7 @@ void EnZo_Destroy(Actor* thisx, PlayState* play) { void EnZo_Standing(EnZo* this, PlayState* play) { s16 angle; - func_80034F54(play, this->unk_656, this->unk_67E, 20); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 20); EnZo_SetAnimation(this); if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) { this->trackingMode = NPC_TRACKING_FULL_BODY; @@ -664,7 +664,7 @@ void EnZo_Surface(EnZo* this, PlayState* play) { } void EnZo_TreadWater(EnZo* this, PlayState* play) { - func_80034F54(play, this->unk_656, this->unk_67E, 20); + func_80034F54(play, this->fidgetTableY, this->fidgetTableZ, 20); if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { this->canSpeak = true; this->trackingMode = NPC_TRACKING_FULL_BODY; @@ -779,8 +779,8 @@ s32 EnZo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po } if ((limbIndex == 8) || (limbIndex == 9) || (limbIndex == 12)) { - rot->y += (Math_SinS(this->unk_656[limbIndex]) * 200.0f); - rot->z += (Math_CosS(this->unk_67E[limbIndex]) * 200.0f); + rot->y += (Math_SinS(this->fidgetTableY[limbIndex]) * 200.0f); + rot->z += (Math_CosS(this->fidgetTableZ[limbIndex]) * 200.0f); } return 0; diff --git a/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.h b/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.h index c99177fad..85fe4cc6e 100644 --- a/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.h +++ b/soh/src/overlays/actors/ovl_En_Zo/z_en_zo.h @@ -37,8 +37,8 @@ typedef struct EnZo { /* 0x0650 */ s16 timeToDive; /* 0x0652 */ s16 blinkTimer; /* 0x0654 */ s16 eyeTexture; - /* 0x0656 */ s16 unk_656[20]; - /* 0x067E */ s16 unk_67E[20]; + /* 0x0656 */ s16 fidgetTableY[20]; + /* 0x067E */ s16 fidgetTableZ[20]; } EnZo; // size = 0x06A8 #endif diff --git a/soh/src/overlays/actors/ovl_En_fHG/z_en_fhg.h b/soh/src/overlays/actors/ovl_En_fHG/z_en_fhg.h index 524c25c1e..5bea0fb73 100644 --- a/soh/src/overlays/actors/ovl_En_fHG/z_en_fhg.h +++ b/soh/src/overlays/actors/ovl_En_fHG/z_en_fhg.h @@ -34,7 +34,7 @@ typedef struct EnfHG { /* 0x018C */ Vec3f inPaintingPos; /* 0x0198 */ f32 inPaintingVelX; /* 0x019C */ f32 inPaintingVelZ; - /* 0x0198 */ f32 damageSpeedMod; + /* 0x01A0 */ f32 damageSpeedMod; /* 0x01A4 */ f32 approachRate; /* 0x01A8 */ f32 cameraSpeedMod; /* 0x01AC */ f32 cameraPanZ; diff --git a/soh/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c b/soh/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c index 424d669a2..7e2fffe01 100644 --- a/soh/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c +++ b/soh/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c @@ -116,9 +116,9 @@ void ObjLift_Init(Actor* thisx, PlayState* play) { Actor_SetScale(&this->dyna.actor, sScales[(this->dyna.actor.params >> 1) & 1]); Actor_ProcessInitChain(&this->dyna.actor, sInitChain); - this->unk_168.x = Rand_ZeroOne() * 65535.5f; - this->unk_168.y = Rand_ZeroOne() * 65535.5f; - this->unk_168.z = Rand_ZeroOne() * 65535.5f; + this->shakeOrientation.x = Rand_ZeroOne() * 65535.5f; + this->shakeOrientation.y = Rand_ZeroOne() * 65535.5f; + this->shakeOrientation.z = Rand_ZeroOne() * 65535.5f; func_80B9651C(this); osSyncPrintf("(Dungeon Lift)(arg_data 0x%04x)\n", this->dyna.actor.params); } @@ -164,16 +164,18 @@ void func_80B96678(ObjLift* this, PlayState* play) { if (this->timer <= 0) { func_80B967C0(this); } else { - this->unk_168.x += 10000; - this->dyna.actor.world.rot.x = (s16)(Math_SinS(this->unk_168.x) * 300.0f) + this->dyna.actor.home.rot.x; - this->dyna.actor.world.rot.z = (s16)(Math_CosS(this->unk_168.x) * 300.0f) + this->dyna.actor.home.rot.z; + this->shakeOrientation.x += 10000; + this->dyna.actor.world.rot.x = + (s16)(Math_SinS(this->shakeOrientation.x) * 300.0f) + this->dyna.actor.home.rot.x; + this->dyna.actor.world.rot.z = + (s16)(Math_CosS(this->shakeOrientation.x) * 300.0f) + this->dyna.actor.home.rot.z; this->dyna.actor.shape.rot.x = this->dyna.actor.world.rot.x; this->dyna.actor.shape.rot.z = this->dyna.actor.world.rot.z; - this->unk_168.y += 18000; - this->dyna.actor.world.pos.y = Math_SinS(this->unk_168.y) + this->dyna.actor.home.pos.y; - this->unk_168.z += 18000; - this->dyna.actor.world.pos.x = Math_SinS(this->unk_168.z) * 3.0f + this->dyna.actor.home.pos.x; - this->dyna.actor.world.pos.z = Math_CosS(this->unk_168.z) * 3.0f + this->dyna.actor.home.pos.z; + this->shakeOrientation.y += 18000; + this->dyna.actor.world.pos.y = Math_SinS(this->shakeOrientation.y) + this->dyna.actor.home.pos.y; + this->shakeOrientation.z += 18000; + this->dyna.actor.world.pos.x = Math_SinS(this->shakeOrientation.z) * 3.0f + this->dyna.actor.home.pos.x; + this->dyna.actor.world.pos.z = Math_CosS(this->shakeOrientation.z) * 3.0f + this->dyna.actor.home.pos.z; } if ((this->timer & 3) == 3) { diff --git a/soh/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.h b/soh/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.h index 0c364513e..c9e0db670 100644 --- a/soh/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.h +++ b/soh/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.h @@ -11,7 +11,7 @@ typedef void (*ObjLiftActionFunc)(struct ObjLift*, PlayState*); typedef struct ObjLift { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ ObjLiftActionFunc actionFunc; - /* 0x0168 */ Vec3s unk_168; + /* 0x0168 */ Vec3s shakeOrientation; /* 0x016E */ s16 timer; } ObjLift; // size = 0x0170 diff --git a/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index 622ac7bbe..03bca2f37 100644 --- a/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -397,7 +397,7 @@ void ObjSwitch_FloorUp(ObjSwitch* this, PlayState* play) { break; case OBJSWITCH_SUBTYPE_FLOOR_1: if ((this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ON_TOP) && - !(this->unk_17F & DYNA_INTERACT_PLAYER_ON_TOP)) { + !(this->prevColFlags & DYNA_INTERACT_PLAYER_ON_TOP)) { ObjSwitch_FloorPressInit(this); ObjSwitch_SetOn(this, play); } @@ -450,7 +450,7 @@ void ObjSwitch_FloorDown(ObjSwitch* this, PlayState* play) { break; case OBJSWITCH_SUBTYPE_FLOOR_1: if ((this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ON_TOP) && - !(this->unk_17F & DYNA_INTERACT_PLAYER_ON_TOP)) { + !(this->prevColFlags & DYNA_INTERACT_PLAYER_ON_TOP)) { ObjSwitch_FloorReleaseInit(this); ObjSwitch_SetOff(this, play); } @@ -498,7 +498,7 @@ s32 ObjSwitch_EyeIsHit(ObjSwitch* this) { Actor* collidingActor; s16 yawDiff; - if ((this->tris.col.base.acFlags & AC_HIT) && !(this->unk_17F & 2)) { + if ((this->tris.col.base.acFlags & AC_HIT) && !(this->prevColFlags & 2)) { collidingActor = this->tris.col.base.ac; if (collidingActor != NULL) { yawDiff = collidingActor->world.rot.y - this->dyna.actor.shape.rot.y; @@ -615,7 +615,7 @@ void ObjSwitch_CrystalOff(ObjSwitch* this, PlayState* play) { } break; case OBJSWITCH_SUBTYPE_CRYSTAL_1: - if ((this->jntSph.col.base.acFlags & AC_HIT) && !(this->unk_17F & 2) && this->disableAcTimer <= 0) { + if ((this->jntSph.col.base.acFlags & AC_HIT) && !(this->prevColFlags & 2) && this->disableAcTimer <= 0) { this->disableAcTimer = 10; ObjSwitch_SetOn(this, play); ObjSwitch_CrystalTurnOnInit(this); @@ -657,7 +657,7 @@ void ObjSwitch_CrystalOn(ObjSwitch* this, PlayState* play) { } break; case OBJSWITCH_SUBTYPE_CRYSTAL_1: - if ((this->jntSph.col.base.acFlags & AC_HIT) && !(this->unk_17F & 2) && this->disableAcTimer <= 0) { + if ((this->jntSph.col.base.acFlags & AC_HIT) && !(this->prevColFlags & 2) && this->disableAcTimer <= 0) { this->disableAcTimer = 10; play = play; ObjSwitch_CrystalTurnOffInit(this); @@ -697,10 +697,10 @@ void ObjSwitch_Update(Actor* thisx, PlayState* play) { switch ((this->dyna.actor.params & 7)) { case OBJSWITCH_TYPE_FLOOR: case OBJSWITCH_TYPE_FLOOR_RUSTY: - this->unk_17F = this->dyna.interactFlags; + this->prevColFlags = this->dyna.interactFlags; break; case OBJSWITCH_TYPE_EYE: - this->unk_17F = this->tris.col.base.acFlags; + this->prevColFlags = this->tris.col.base.acFlags; this->tris.col.base.acFlags &= ~AC_HIT; CollisionCheck_SetAC(play, &play->colChkCtx, &this->tris.col.base); break; @@ -709,7 +709,7 @@ void ObjSwitch_Update(Actor* thisx, PlayState* play) { if (!Player_InCsMode(play) && this->disableAcTimer > 0) { this->disableAcTimer--; } - this->unk_17F = this->jntSph.col.base.acFlags; + this->prevColFlags = this->jntSph.col.base.acFlags; this->jntSph.col.base.acFlags &= ~AC_HIT; if (this->disableAcTimer <= 0) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->jntSph.col.base); diff --git a/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h b/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h index b2eaa5162..72f963ad5 100644 --- a/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h +++ b/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h @@ -58,7 +58,7 @@ typedef struct ObjSwitch { /* 0x017A */ u8 x2TexScroll; /* 0x017B */ u8 y2TexScroll; /* 0x017C */ Color_RGB8 crystalColor; - /* 0x017F */ u8 unk_17F; // used for different purposes between floor and eye switch + /* 0x017F */ u8 prevColFlags; // used for different purposes between floor and eye switch union { /* 0x0180 */ ObjSwitchJntSph jntSph; /* 0x0180 */ ObjSwitchTris tris; diff --git a/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c b/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c index e5e720666..c6ca93dfe 100644 --- a/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c +++ b/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c @@ -62,7 +62,7 @@ void ShotSun_Init(Actor* thisx, PlayState* play) { osSyncPrintf("%d ---- オカリナの秘密発生!!!!!!!!!!!!!\n", this->actor.params); params = this->actor.params & 0xFF; if (params == 0x40 || params == 0x41) { - this->unk_1A4 = 0; + this->fairySpawnerState = 0; this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED; this->actor.flags |= ACTOR_FLAG_UPDATE_DURING_OCARINA; this->actionFunc = func_80BADF0C; @@ -128,29 +128,29 @@ void func_80BADF0C(ShotSun* this, PlayState* play) { s32 params = this->actor.params & 0xFF; if (Math3D_Vec3fDistSq(&this->actor.world.pos, &player->actor.world.pos) > 22500.0f) { - this->unk_1A4 = 0; + this->fairySpawnerState = 0; } else { - if (this->unk_1A4 == 0) { + if (this->fairySpawnerState == 0) { if (!(player->stateFlags2 & PLAYER_STATE2_ATTEMPT_PLAY_FOR_ACTOR)) { player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR; return; } else { - this->unk_1A4 = 1; + this->fairySpawnerState = 1; } } - if (this->unk_1A4 == 1) { + if (this->fairySpawnerState == 1) { func_8010BD58(play, OCARINA_ACTION_FREE_PLAY); - this->unk_1A4 = 2; - } else if (this->unk_1A4 == 2 && play->msgCtx.ocarinaMode == OCARINA_MODE_04) { + this->fairySpawnerState = 2; + } else if (this->fairySpawnerState == 2 && play->msgCtx.ocarinaMode == OCARINA_MODE_04) { if ((params == 0x40 && play->msgCtx.lastPlayedSong == OCARINA_SONG_SUNS) || (params == 0x41 && play->msgCtx.lastPlayedSong == OCARINA_SONG_STORMS)) { this->actionFunc = ShotSun_TriggerFairy; OnePointCutscene_Attention(play, &this->actor); this->timer = 0; } else { - this->unk_1A4 = 0; + this->fairySpawnerState = 0; } - this->unk_1A4 = 0; + this->fairySpawnerState = 0; } } } diff --git a/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.h b/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.h index c346defd6..389609581 100644 --- a/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.h +++ b/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.h @@ -14,7 +14,7 @@ typedef struct ShotSun { /* 0x0198 */ ShotSunActionFunc actionFunc; /* 0x019C */ Vec3s hitboxPos; /* 0x01A2 */ s16 timer; // Frames until fairy spawns - /* 0x01A4 */ u8 unk_1A4; + /* 0x01A4 */ u8 fairySpawnerState; } ShotSun; // size = 0x01A8 #endif diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 91574e517..5cc309728 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -116,7 +116,7 @@ typedef struct struct_80854190 { typedef struct struct_80854578 { /* 0x00 */ LinkAnimationHeader* anim; /* 0x04 */ f32 unk_04; - /* 0x04 */ f32 unk_08; + /* 0x08 */ f32 unk_08; } struct_80854578; // size = 0x0C typedef struct struct_80854B18 { diff --git a/soh/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.h b/soh/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.h index c3b16ae35..306ad8e91 100644 --- a/soh/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.h +++ b/soh/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.h @@ -6,7 +6,7 @@ typedef struct { /* 0x00 */ Vec3f pos; - /* 0x00 */ s32 unk_C; + /* 0x0C */ s32 unk_C; } EffectSsStone1InitParams; // size = 0x #endif