From e78acb9b34e6be2f33b3299cae959c9afa17e73a Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Sun, 7 Dec 2025 09:11:47 -0500 Subject: [PATCH 01/24] `en_Po_Sisters`: begin doc'ing ID'd field determining which sister, and some associated values --- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 156 +++++++++--------- .../ovl_En_Po_Sisters/z_en_po_sisters.h | 10 +- 2 files changed, 90 insertions(+), 76 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 299b0df33a..c54e62608a 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -114,40 +114,44 @@ static ColliderCylinderInit sCylinderInit = { }; static CollisionCheckInfoInit sColChkInfoInit = { 10, 25, 60, 40 }; - +typedef enum PoeSisDamageReaction{ + POESIS_DMG_REACT_OTHER, + POESIS_DMG_REACT_SWORD=14, + POESIS_DMG_REACT_NUT, +}; static DamageTable sDamageTable = { - /* Deku nut */ DMG_ENTRY(0, 0xF), - /* Deku stick */ DMG_ENTRY(2, 0x0), - /* Slingshot */ DMG_ENTRY(1, 0x0), - /* Explosive */ DMG_ENTRY(2, 0x0), - /* Boomerang */ DMG_ENTRY(0, 0x0), - /* Normal arrow */ DMG_ENTRY(2, 0x0), - /* Hammer swing */ DMG_ENTRY(2, 0x0), - /* Hookshot */ DMG_ENTRY(2, 0x0), - /* Kokiri sword */ DMG_ENTRY(1, 0xE), - /* Master sword */ DMG_ENTRY(2, 0xE), - /* Giant's Knife */ DMG_ENTRY(4, 0xE), - /* Fire arrow */ DMG_ENTRY(2, 0x0), - /* Ice arrow */ DMG_ENTRY(2, 0x0), - /* Light arrow */ DMG_ENTRY(2, 0x0), - /* Unk arrow 1 */ DMG_ENTRY(2, 0x0), - /* Unk arrow 2 */ DMG_ENTRY(2, 0x0), - /* Unk arrow 3 */ DMG_ENTRY(2, 0x0), - /* Fire magic */ DMG_ENTRY(0, 0x0), - /* Ice magic */ DMG_ENTRY(0, 0x0), - /* Light magic */ DMG_ENTRY(0, 0x0), - /* Shield */ DMG_ENTRY(0, 0x0), - /* Mirror Ray */ DMG_ENTRY(0, 0x0), - /* Kokiri spin */ DMG_ENTRY(1, 0xE), - /* Giant spin */ DMG_ENTRY(4, 0xE), - /* Master spin */ DMG_ENTRY(2, 0xE), - /* Kokiri jump */ DMG_ENTRY(2, 0xE), - /* Giant jump */ DMG_ENTRY(8, 0xE), - /* Master jump */ DMG_ENTRY(4, 0xE), - /* Unknown 1 */ DMG_ENTRY(0, 0x0), - /* Unblockable */ DMG_ENTRY(0, 0x0), - /* Hammer jump */ DMG_ENTRY(4, 0x0), - /* Unknown 2 */ DMG_ENTRY(0, 0x0), + /* Deku nut */ DMG_ENTRY(0, POESIS_DMG_REACT_NUT), + /* Deku stick */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), + /* Slingshot */ DMG_ENTRY(1, POESIS_DMG_REACT_OTHER), + /* Explosive */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), + /* Boomerang */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), + /* Normal arrow */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), + /* Hammer swing */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), + /* Hookshot */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), + /* Kokiri sword */ DMG_ENTRY(1, POESIS_DMG_REACT_SWORD), + /* Master sword */ DMG_ENTRY(2, POESIS_DMG_REACT_SWORD), + /* Giant's Knife */ DMG_ENTRY(4, POESIS_DMG_REACT_SWORD), + /* Fire arrow */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), + /* Ice arrow */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), + /* Light arrow */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), + /* Unk arrow 1 */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), + /* Unk arrow 2 */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), + /* Unk arrow 3 */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), + /* Fire magic */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), + /* Ice magic */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), + /* Light magic */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), + /* Shield */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), + /* Mirror Ray */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), + /* Kokiri spin */ DMG_ENTRY(1, POESIS_DMG_REACT_SWORD), + /* Giant spin */ DMG_ENTRY(4, POESIS_DMG_REACT_SWORD), + /* Master spin */ DMG_ENTRY(2, POESIS_DMG_REACT_SWORD), + /* Kokiri jump */ DMG_ENTRY(2, POESIS_DMG_REACT_SWORD), + /* Giant jump */ DMG_ENTRY(8, POESIS_DMG_REACT_SWORD), + /* Master jump */ DMG_ENTRY(4, POESIS_DMG_REACT_SWORD), + /* Unknown 1 */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), + /* Unblockable */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), + /* Hammer jump */ DMG_ENTRY(4, POESIS_DMG_REACT_OTHER), + /* Unknown 2 */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), }; static s32 D_80ADD784 = 0; @@ -170,14 +174,14 @@ static Vec3s D_80ADD7A4[4] = { static Vec3f D_80ADD7BC = { 120.0f, 250.0f, -1420.0f }; -static Gfx* D_80ADD7C8[4] = { +static Gfx* sSisterBodies[4] = { gPoeSistersMegBodyDL, gPoeSistersJoelleBodyDL, gPoeSistersBethBodyDL, gPoeSistersAmyBodyDL, }; -static Gfx* D_80ADD7D8[4] = { +static Gfx* sSisterFaces[4] = { gPoeSistersMegFaceDL, gPoeSistersJoelleFaceDL, gPoeSistersBethFaceDL, @@ -211,8 +215,8 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); - this->unk_194 = PARAMS_GET_U(thisx->params, 8, 2); - this->actor.naviEnemyId = this->unk_194 + NAVI_ENEMY_POE_SISTER_MEG; + this->sisterID = PARAMS_GET_U(thisx->params, 8, 2); + this->actor.naviEnemyId = this->sisterID + NAVI_ENEMY_POE_SISTER_MEG; if (1) {} this->unk_195 = PARAMS_GET_U(thisx->params, 10, 2); this->unk_196 = 32; @@ -223,7 +227,7 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; if (PARAMS_GET_NOSHIFT(this->actor.params, 12, 1)) { func_80ADA094(this, play); - } else if (this->unk_194 == 0) { + } else if (this->sisterID == EN_PO_SIS_MEG) { if (this->unk_195 == 0) { this->collider.base.ocFlags1 = OC1_ON | OC1_TYPE_PLAYER; func_80AD9AA8(this, play); @@ -244,7 +248,7 @@ void EnPoSisters_Destroy(Actor* thisx, PlayState* play) { EnPoSisters* this = (EnPoSisters*)thisx; LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); - if (this->unk_194 == 0 && this->unk_195 == 0) { + if (this->sisterID == EN_PO_SIS_MEG && this->unk_195 == 0) { func_800F5B58(); } Collider_DestroyCylinder(play, &this->collider); @@ -297,7 +301,7 @@ void func_80AD944C(EnPoSisters* this) { void func_80AD94E0(EnPoSisters* this) { this->actor.speed = 5.0f; - if (this->unk_194 == 0) { + if (this->sisterID == EN_PO_SIS_MEG) { this->collider.base.colMaterial = COL_MATERIAL_METAL; this->collider.base.acFlags |= AC_HARD; Animation_MorphToLoop(&this->skelAnime, &gPoeSistersAttackAnim, -5.0f); @@ -311,7 +315,7 @@ void func_80AD94E0(EnPoSisters* this) { void func_80AD9568(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); this->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000; - if (this->unk_194 != 0) { + if (this->sisterID != EN_PO_SIS_MEG) { this->collider.base.colMaterial = COL_MATERIAL_HIT3; this->collider.base.acFlags &= ~AC_HARD; } @@ -325,7 +329,7 @@ void func_80AD95D8(EnPoSisters* this) { ? this->collider.base.ac->world.rot.y : Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000; } - if (this->unk_194 != 0) { + if (this->sisterID != EN_PO_SIS_MEG) { this->actor.speed = 10.0f; } this->unk_199 &= ~0xB; @@ -376,7 +380,7 @@ void func_80AD97C8(EnPoSisters* this, PlayState* play) { void func_80AD98F4(EnPoSisters* this, PlayState* play) { Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 1.5f, 0.0f, Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE, -3.0f); - if (this->unk_194 == 0) { + if (this->sisterID == EN_PO_SIS_MEG) { this->unk_294 = 110.0f; func_80AD97C8(this, play); this->unk_22E.a = 0; @@ -463,7 +467,7 @@ void func_80AD9C24(EnPoSisters* this, PlayState* play) { } void func_80AD9D44(EnPoSisters* this) { - if (this->unk_194 == 3) { + if (this->sisterID == EN_PO_SIS_AMY) { Animation_PlayOnce(&this->skelAnime, &gPoeSistersAppearDisappearAnim); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_APPEAR); } else { @@ -510,7 +514,7 @@ void func_80AD9F1C(EnPoSisters* this) { } void func_80AD9F90(EnPoSisters* this) { - if (this->unk_194 == 1) { + if (this->sisterID == EN_PO_SIS_JOELLE) { this->actor.home.pos.x = -632.0f; this->actor.home.pos.z = -3440.0f; } else { @@ -555,7 +559,7 @@ void func_80ADA10C(EnPoSisters* this) { void func_80ADA1B8(EnPoSisters* this) { Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 0.833f, 0.0f, Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE_INTERP, 0.0f); - if (this->unk_194 == 0 || this->unk_194 == 1) { + if (this->sisterID == EN_PO_SIS_MEG || this->sisterID == EN_PO_SIS_JOELLE) { this->unk_19A = 40; } else { this->unk_19A = 76; @@ -579,9 +583,9 @@ void func_80ADA2BC(EnPoSisters* this, PlayState* play) { this->unk_199 = 40; this->unk_19A = 90; this->unk_196 = 32; - this->actor.world.rot.y = D_80ADD79C[this->unk_194]; + this->actor.world.rot.y = D_80ADD79C[this->sisterID]; this->actor.home.pos.y = this->actor.world.pos.y; - if (this->unk_194 == 0) { + if (this->sisterID == EN_PO_SIS_MEG) { Flags_SetSwitch(play, 0x1B); } Actor_PlaySfx(&this->actor, NA_SE_EV_FLAME_IGNITION); @@ -594,7 +598,7 @@ void func_80ADA35C(EnPoSisters* this, PlayState* play) { if (this->actionFunc == func_80ADBF58) { targetY = this->actor.home.pos.y; - } else if (this->unk_194 == 0 || this->unk_194 == 3) { + } else if (this->sisterID == EN_PO_SIS_MEG || this->sisterID == EN_PO_SIS_AMY) { targetY = player->actor.world.pos.y + 5.0f; } else { targetY = 832.0f; @@ -690,7 +694,7 @@ void func_80ADA8C0(EnPoSisters* this, PlayState* play) { } this->actor.shape.rot.y += (384.0f * this->skelAnime.endFrame) * 3.0f; if (this->unk_19A == 0 && ABS((s16)(this->actor.shape.rot.y - this->actor.world.rot.y)) < 0x1000) { - if (this->unk_194 != 0) { + if (this->sisterID != EN_PO_SIS_MEG) { this->collider.base.colMaterial = COL_MATERIAL_HIT3; this->collider.base.acFlags &= ~AC_HARD; func_80AD93C4(this); @@ -709,7 +713,7 @@ void func_80ADA9E8(EnPoSisters* this, PlayState* play) { this->actor.shape.rot.y -= (this->actor.speed * 10.0f) * 128.0f; if (Math_StepToF(&this->actor.speed, 0.0f, 0.1f) != 0) { this->actor.world.rot.y = this->actor.shape.rot.y; - if (this->unk_194 != 0) { + if (this->sisterID != EN_PO_SIS_MEG) { func_80AD93C4(this); } else { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); @@ -721,7 +725,7 @@ void func_80ADA9E8(EnPoSisters* this, PlayState* play) { void func_80ADAAA4(EnPoSisters* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime) && !(this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW)) { if (this->actor.colChkInfo.health != 0) { - if (this->unk_194 != 0) { + if (this->sisterID != EN_PO_SIS_MEG) { func_80AD96A4(this); } else if (this->unk_195 != 0) { func_80AD9C24(this, NULL); @@ -738,7 +742,7 @@ void func_80ADAAA4(EnPoSisters* this, PlayState* play) { this->unk_22E.a = ((this->skelAnime.endFrame - this->skelAnime.curFrame) * 255.0f) / this->skelAnime.endFrame; this->actor.world.pos.y = this->actor.parent->world.pos.y; func_80AD97C8(this, play); - } else if (this->unk_194 != 0) { + } else if (this->sisterID != EN_PO_SIS_MEG) { Math_StepToF(&this->actor.speed, 0.0f, 0.5f); } } @@ -775,7 +779,7 @@ void func_80ADAD54(EnPoSisters* this, PlayState* play) { void func_80ADAE6C(EnPoSisters* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { this->unk_22E.a = 255; - if (this->unk_194 != 0) { + if (this->sisterID != EN_PO_SIS_MEG) { this->unk_199 |= 1; this->collider.elem.acDmgInfo.dmgFlags = (DMG_SWORD | DMG_ARROW | DMG_HAMMER | DMG_MAGIC_ICE | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_EXPLOSIVE | DMG_DEKU_STICK); @@ -791,7 +795,7 @@ void func_80ADAE6C(EnPoSisters* this, PlayState* play) { } } else { this->unk_22E.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; - if (this->unk_194 == 0) { + if (this->sisterID == EN_PO_SIS_MEG) { func_80AD97C8(this, play); } } @@ -833,7 +837,7 @@ void func_80ADB17C(EnPoSisters* this, PlayState* play) { if (this->unk_19A == 64) { Flags_SetSwitch(play, this->actor.params); SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 30, NA_SE_EV_FLAME_IGNITION); - if (this->unk_194 == 0) { + if (this->sisterID == EN_PO_SIS_MEG) { Flags_UnsetSwitch(play, 0x1B); } play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE; @@ -845,9 +849,9 @@ void func_80ADB17C(EnPoSisters* this, PlayState* play) { func_80AD9240(this, 64 - this->unk_19A, &this->actor.world.pos); } if (this->unk_19A == 32) { - this->actor.world.pos.x = D_80ADD7A4[this->unk_194].x; - this->actor.world.pos.y = D_80ADD7A4[this->unk_194].y; - this->actor.world.pos.z = D_80ADD7A4[this->unk_194].z; + this->actor.world.pos.x = D_80ADD7A4[this->sisterID].x; + this->actor.world.pos.y = D_80ADD7A4[this->sisterID].y; + this->actor.world.pos.z = D_80ADD7A4[this->sisterID].z; } } @@ -1016,7 +1020,7 @@ void func_80ADB9F0(EnPoSisters* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { this->unk_22E.a = 255; - if (this->unk_194 == 3) { + if (this->sisterID == EN_PO_SIS_AMY) { this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; this->actor.home.pos.x = 1992.0f; this->actor.home.pos.z = -1440.0f; @@ -1029,7 +1033,7 @@ void func_80ADB9F0(EnPoSisters* this, PlayState* play) { div = this->skelAnime.curFrame / this->skelAnime.endFrame; this->unk_22E.a = 255.0f * div; } - if (this->unk_194 != 3 && Animation_OnFrame(&this->skelAnime, 1.0f)) { + if (this->sisterID != EN_PO_SIS_AMY && Animation_OnFrame(&this->skelAnime, 1.0f)) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_APPEAR); } Actor_SetFocus(&this->actor, 40.0f); @@ -1059,7 +1063,7 @@ void func_80ADBC88(EnPoSisters* this, PlayState* play) { this->unk_19A--; } if (this->unk_19A == 30) { - if (this->unk_194 == 0) { + if (this->sisterID == EN_PO_SIS_MEG) { OnePointCutscene_Init(play, 3140, 999, NULL, CAM_ID_MAIN); } D_80ADD784 = 1; @@ -1088,7 +1092,7 @@ void func_80ADBD8C(EnPoSisters* this, PlayState* play) { if (this->unk_19A <= 0) { if (SkelAnime_Update(&this->skelAnime)) { this->unk_22E.a = 255; - D_80ADD784 |= (1 << this->unk_194); + D_80ADD784 |= (1 << this->sisterID); } else { this->unk_22E.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; } @@ -1113,13 +1117,13 @@ void func_80ADBF58(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); this->unk_19A--; Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.world.rot.y, 0x500); - if (this->unk_19A == 0 && this->unk_194 == 0) { + if (this->unk_19A == 0 && this->sisterID == EN_PO_SIS_MEG) { play->envCtx.lightSettingOverride = 4; } if (this->unk_19A < 0) { Math_StepToF(&this->actor.speed, 5.0f, 0.2f); } - if (this->unk_19A == -70 && this->unk_194 == 1) { + if (this->unk_19A == -70 && this->sisterID == EN_PO_SIS_JOELLE) { SfxSource_PlaySfxAtFixedWorldPos(play, &D_80ADD7BC, 40, NA_SE_EN_PO_LAUGH); } if (this->unk_19A < -120) { @@ -1166,15 +1170,17 @@ void func_80ADC10C(EnPoSisters* this, PlayState* play) { Item_DropCollectible(play, &sp24, ITEM00_ARROWS_SMALL); } } else if (this->collider.base.colMaterial == COL_MATERIAL_METAL || - (this->actor.colChkInfo.damageReaction == 0 && this->actor.colChkInfo.damage == 0)) { - if (this->unk_194 == 0) { + (this->actor.colChkInfo.damageReaction == POESIS_DMG_REACT_OTHER + && this->actor.colChkInfo.damage == 0)) { + if (this->sisterID == EN_PO_SIS_MEG) { this->actor.freezeTimer = 0; } - } else if (this->actor.colChkInfo.damageReaction == 0xF) { + } else if (this->actor.colChkInfo.damageReaction == POESIS_DMG_REACT_NUT) { this->actor.world.rot.y = this->actor.shape.rot.y; this->unk_199 |= 2; func_80AD98F4(this, play); - } else if (this->unk_194 == 0 && this->actor.colChkInfo.damageReaction == 0xE && + } else if (this->sisterID == EN_PO_SIS_MEG && + this->actor.colChkInfo.damageReaction == POESIS_DMG_REACT_SWORD && this->actionFunc == func_80ADB770) { if (this->unk_19C == 0) { this->unk_19C = -45; @@ -1303,13 +1309,13 @@ s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve if (this->unk_22E.a == 0 || limbIndex == 8 || (this->actionFunc == func_80ADAFC0 && this->unk_19A >= 8)) { *dList = NULL; } else if (limbIndex == 9) { - *dList = D_80ADD7C8[this->unk_194]; + *dList = sSisterBodies[this->sisterID]; } else if (limbIndex == 10) { - *dList = D_80ADD7D8[this->unk_194]; + *dList = sSisterFaces[this->sisterID]; gDPPipeSync((*gfxP)++); gDPSetEnvColor((*gfxP)++, this->unk_22E.r, this->unk_22E.g, this->unk_22E.b, this->unk_22E.a); } else if (limbIndex == 11) { - color = &D_80ADD7E8[this->unk_194]; + color = &D_80ADD7E8[this->sisterID]; gDPPipeSync((*gfxP)++); gDPSetEnvColor((*gfxP)++, color->r, color->g, color->b, this->unk_22E.a); } @@ -1335,7 +1341,7 @@ void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s Matrix_MultVec3f(&D_80ADD7F8, &this->actor.home.pos); } if (this->unk_198 > 0) { - Color_RGBA8* color = &D_80ADD6F0[this->unk_194]; + Color_RGBA8* color = &D_80ADD6F0[this->sisterID]; f32 temp_f2 = Rand_ZeroOne() * 0.3f + 0.7f; if (this->actionFunc == func_80ADB17C || this->actionFunc == func_80ADBD38 || @@ -1363,8 +1369,8 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { f32 phi_f20; s32 i; u8 phi_s5; - Color_RGBA8* temp_s1 = &D_80ADD700[this->unk_194]; - Color_RGBA8* temp_s7 = &D_80ADD6F0[this->unk_194]; + Color_RGBA8* temp_s1 = &D_80ADD700[this->sisterID]; + Color_RGBA8* temp_s7 = &D_80ADD6F0[this->sisterID]; s32 pad2; OPEN_DISPS(play->state.gfxCtx, "../z_en_po_sisters.c", 2989); diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h index fdfd734360..7dc0a0ce0a 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h @@ -13,7 +13,7 @@ typedef struct EnPoSisters { /* 0x0000 */ Actor actor; /* 0x014C */ SkelAnime skelAnime; /* 0x0190 */ EnPoSistersActionFunc actionFunc; - /* 0x0194 */ u8 unk_194; + /* 0x0194 */ u8 sisterID; // which Poe sister this is /* 0x0195 */ u8 unk_195; /* 0x0196 */ u8 unk_196; /* 0x0197 */ u8 unk_197; @@ -32,4 +32,12 @@ typedef struct EnPoSisters { /* 0x02F8 */ MtxF unk_2F8; } EnPoSisters; // size = 0x0338 +typedef enum EnPoSisNames{ + EN_PO_SIS_MEG, // purple sister, circles link with decoys + EN_PO_SIS_JOELLE, // red sister, hides in portraits + EN_PO_SIS_BETH, // blue sister, hides in portraits + EN_PO_SIS_AMY, // green sister, hides in block puzzle +}; + + #endif From 0be0cd1b97d6537b4067847fc6825c675b7391b7 Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Sun, 7 Dec 2025 12:29:15 -0500 Subject: [PATCH 02/24] `En_Po_Sisters`: More documenting most fields id'd, several funcs id'd. --- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 967 +++++++++--------- .../ovl_En_Po_Sisters/z_en_po_sisters.h | 43 +- 2 files changed, 519 insertions(+), 491 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index c54e62608a..0bcdc6d658 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -35,46 +35,46 @@ void EnPoSisters_Destroy(Actor* thisx, PlayState* play); void EnPoSisters_Update(Actor* thisx, PlayState* play); void EnPoSisters_Draw(Actor* thisx, PlayState* play); -void func_80ADA094(EnPoSisters* this, PlayState* play); +void EnPoSisters_IntroSetup(EnPoSisters* this, PlayState* play); void func_80ADA4A8(EnPoSisters* this, PlayState* play); -void func_80ADA530(EnPoSisters* this, PlayState* play); +void EnPoSisters_FightState1(EnPoSisters* this, PlayState* play); void func_80ADA6A0(EnPoSisters* this, PlayState* play); void func_80ADA7F0(EnPoSisters* this, PlayState* play); void func_80ADA8C0(EnPoSisters* this, PlayState* play); void func_80ADA9E8(EnPoSisters* this, PlayState* play); void func_80ADAAA4(EnPoSisters* this, PlayState* play); -void func_80ADAC70(EnPoSisters* this, PlayState* play); -void func_80ADAD54(EnPoSisters* this, PlayState* play); -void func_80ADAE6C(EnPoSisters* this, PlayState* play); -void func_80ADAFC0(EnPoSisters* this, PlayState* play); -void func_80ADB17C(EnPoSisters* this, PlayState* play); -void func_80ADB2B8(EnPoSisters* this, PlayState* play); -void func_80ADB338(EnPoSisters* this, PlayState* play); -void func_80ADB9F0(EnPoSisters* this, PlayState* play); -void func_80ADB4B0(EnPoSisters* this, PlayState* play); -void func_80ADB51C(EnPoSisters* this, PlayState* play); +void EnPoSister_Hit(EnPoSisters* this, PlayState* play); +void EnPoSisters_Vanish(EnPoSisters* this, PlayState* play); +void EnPoSisters_Reveal(EnPoSisters* this, PlayState* play); +void EnPoSisters_ReleaseFlame(EnPoSisters* this, PlayState* play); +void EnPoSister_Die(EnPoSisters* this, PlayState* play); +void EnPoSisters_MegMourns(EnPoSisters* this, PlayState* play); +void EnPoSisters_DecoyUpdate(EnPoSisters* this, PlayState* play); +void EnPoSisters_SisterInit(EnPoSisters* this, PlayState* play); +void EnPoSisters_MegIntroStep1(EnPoSisters* this, PlayState* play); +void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play); void func_80ADB770(EnPoSisters* this, PlayState* play); -void func_80ADBB6C(EnPoSisters* this, PlayState* play); -void func_80ADBBF4(EnPoSisters* this, PlayState* play); -void func_80ADBC88(EnPoSisters* this, PlayState* play); -void func_80ADBD38(EnPoSisters* this, PlayState* play); -void func_80ADBD8C(EnPoSisters* this, PlayState* play); -void func_80ADBEE8(EnPoSisters* this, PlayState* play); -void func_80ADBF58(EnPoSisters* this, PlayState* play); +void EnPoSisters_JoelleBethMove(EnPoSisters* this, PlayState* play); +void EnPoSister_JoelleBethWait(EnPoSisters* this, PlayState* play); +void EnPoSisters_IntroStep1(EnPoSisters* this, PlayState* play); +void EnPoSisters_IntroStep2(EnPoSisters* this, PlayState* play); +void EnPoSisters_IntroStep3(EnPoSisters* this, PlayState* play); +void EnPoSisters_IntroStep4(EnPoSisters* this, PlayState* play); +void EnPoSisters_IntroStep5(EnPoSisters* this, PlayState* play); -void func_80AD9AA8(EnPoSisters* this, PlayState* play); -void func_80AD9C24(EnPoSisters* this, PlayState* play); +void EnPoSisters_MegSetup(EnPoSisters* this, PlayState* play); +void EnPoSisters_DecoySetup(EnPoSisters* this, PlayState* play); -void func_80AD9D44(EnPoSisters* this); +void EnPoSisters_SisterSetup(EnPoSisters* this); -static Color_RGBA8 D_80ADD6F0[4] = { +static Color_RGBA8 sTorchLightColors[4] = { { 255, 170, 255, 255 }, { 255, 200, 0, 255 }, { 0, 170, 255, 255 }, { 170, 255, 0, 255 }, }; -static Color_RGBA8 D_80ADD700[4] = { +static Color_RGBA8 sTorchFlameColors[4] = { { 100, 0, 255, 255 }, { 255, 0, 0, 255 }, { 0, 0, 255, 255 }, @@ -114,11 +114,13 @@ static ColliderCylinderInit sCylinderInit = { }; static CollisionCheckInfoInit sColChkInfoInit = { 10, 25, 60, 40 }; + typedef enum PoeSisDamageReaction{ POESIS_DMG_REACT_OTHER, POESIS_DMG_REACT_SWORD=14, POESIS_DMG_REACT_NUT, }; + static DamageTable sDamageTable = { /* Deku nut */ DMG_ENTRY(0, POESIS_DMG_REACT_NUT), /* Deku stick */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), @@ -165,14 +167,16 @@ static Vec3f sZeroVector = { 0.0f, 0.0f, 0.0f }; static s16 D_80ADD79C[4] = { 0xB000, 0xD000, 0x5000, 0x3000 }; -static Vec3s D_80ADD7A4[4] = { +// positions for torches to be lit during death cutscene +static Vec3s sDeathTorchPos[4] = { { -22, 337, -1704 }, { -431, 879, -3410 }, { 549, 879, -3410 }, { 1717, 515, -1340 }, }; -static Vec3f D_80ADD7BC = { 120.0f, 250.0f, -1420.0f }; +// position of laugh at the end of sisters' intro animation +static Vec3f sIntroLaughPos = { 120.0f, 250.0f, -1420.0f }; static Gfx* sSisterBodies[4] = { gPoeSistersMegBodyDL, @@ -205,10 +209,10 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 50.0f); SkelAnime_Init(play, &this->skelAnime, &gPoeSistersSkel, &gPoeSistersSwayAnim, this->jointTable, this->morphTable, 12); - this->unk_22E.r = 255; - this->unk_22E.g = 255; - this->unk_22E.b = 210; - this->unk_22E.a = 255; + this->sisColor.r = 255; + this->sisColor.g = 255; + this->sisColor.b = 210; + this->sisColor.a = 255; this->lightNode = LightContext_InsertLight(play, &play->lightCtx, &this->lightInfo); Lights_PointGlowSetInfo(&this->lightInfo, this->actor.home.pos.x, this->actor.home.pos.y, this->actor.home.pos.z, 0, 0, 0, 0); @@ -218,28 +222,28 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) { this->sisterID = PARAMS_GET_U(thisx->params, 8, 2); this->actor.naviEnemyId = this->sisterID + NAVI_ENEMY_POE_SISTER_MEG; if (1) {} - this->unk_195 = PARAMS_GET_U(thisx->params, 10, 2); - this->unk_196 = 32; - this->unk_197 = 20; - this->unk_198 = 1; - this->unk_199 = 32; - this->unk_294 = 110.0f; + this->decoyID = PARAMS_GET_U(thisx->params, 10, 2); + this->hoverPulse = 32; + this->vanishTimer = 20; + this->torchFlames = 1; + this->sisFlags = EN_POESIS_FLAG20; + this->circleDist = 110.0f; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; if (PARAMS_GET_NOSHIFT(this->actor.params, 12, 1)) { - func_80ADA094(this, play); - } else if (this->sisterID == EN_PO_SIS_MEG) { - if (this->unk_195 == 0) { + EnPoSisters_IntroSetup(this, play); + } else if (this->sisterID == EN_POESIS_MEG) { + if (this->decoyID == 0) { this->collider.base.ocFlags1 = OC1_ON | OC1_TYPE_PLAYER; - func_80AD9AA8(this, play); + EnPoSisters_MegSetup(this, play); } else { this->actor.flags &= ~(ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR | ACTOR_FLAG_CAN_ATTACH_TO_ARROW); this->collider.elem.elemMaterial = ELEM_MATERIAL_UNK4; this->collider.elem.acDmgInfo.dmgFlags |= DMG_DEKU_NUT; this->collider.base.ocFlags1 = OC1_NONE; - func_80AD9C24(this, NULL); + EnPoSisters_DecoySetup(this, NULL); } } else { - func_80AD9D44(this); + EnPoSisters_SisterSetup(this); } this->actor.params &= 0x3F; } @@ -248,39 +252,39 @@ void EnPoSisters_Destroy(Actor* thisx, PlayState* play) { EnPoSisters* this = (EnPoSisters*)thisx; LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); - if (this->sisterID == EN_PO_SIS_MEG && this->unk_195 == 0) { + if (this->sisterID == EN_POESIS_MEG && this->decoyID == 0) { func_800F5B58(); } Collider_DestroyCylinder(play, &this->collider); } -void func_80AD9240(EnPoSisters* this, s32 arg1, Vec3f* arg2) { - f32 temp_f20 = SQ(arg1) * 0.1f; +void EnPoSisters_MoveTorchFlames(EnPoSisters* this, s32 height, Vec3f* pos) { + f32 temp_f20 = SQ(height) * 0.1f; Vec3f* vec; s32 i; - for (i = 0; i < this->unk_198; i++) { - vec = &this->unk_234[i]; - vec->x = arg2->x + Math_SinS((s16)(this->actor.shape.rot.y + (this->unk_19A * 0x800) + i * 0x2000)) * temp_f20; - vec->z = arg2->z + Math_CosS((s16)(this->actor.shape.rot.y + (this->unk_19A * 0x800) + i * 0x2000)) * temp_f20; - vec->y = arg2->y + arg1; + for (i = 0; i < this->torchFlames; i++) { + vec = &this->torchPos[i]; + vec->x = pos->x + Math_SinS((s16)(this->actor.shape.rot.y + (this->sisTimer * 0x800) + i * 0x2000)) * temp_f20; + vec->z = pos->z + Math_CosS((s16)(this->actor.shape.rot.y + (this->sisTimer * 0x800) + i * 0x2000)) * temp_f20; + vec->y = pos->y + height; } } void func_80AD9368(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersSwayAnim, -3.0f); - this->unk_19A = Rand_S16Offset(2, 3); + this->sisTimer = Rand_S16Offset(2, 3); this->actionFunc = func_80ADA4A8; this->actor.speed = 0.0f; } -void func_80AD93C4(EnPoSisters* this) { +void EnPoSisters_FightSetup(EnPoSisters* this) { if (this->actionFunc != func_80ADA6A0) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); } - this->unk_19A = Rand_S16Offset(0xF, 3); - this->unk_199 |= 7; - this->actionFunc = func_80ADA530; + this->sisTimer = Rand_S16Offset(15, 3); + this->sisFlags |= EN_POESIS_FLAG04|EN_POESIS_FLAG02|EN_POESIS_FLAG01; + this->actionFunc = EnPoSisters_FightState1; } void func_80AD943C(EnPoSisters* this) { @@ -288,34 +292,34 @@ void func_80AD943C(EnPoSisters* this) { } void func_80AD944C(EnPoSisters* this) { - if (this->unk_22E.a != 0) { + if (this->sisColor.a != 0) { this->collider.base.colMaterial = COL_MATERIAL_METAL; this->collider.base.acFlags |= AC_HARD; } Animation_MorphToLoop(&this->skelAnime, &gPoeSistersAttackAnim, -5.0f); this->actor.speed = 0.0f; - this->unk_19A = Animation_GetLastFrame(&gPoeSistersAttackAnim) * 3 + 3; - this->unk_199 &= ~2; + this->sisTimer = Animation_GetLastFrame(&gPoeSistersAttackAnim) * 3 + 3; + this->sisFlags &= ~EN_POESIS_FLAG02; this->actionFunc = func_80ADA7F0; } void func_80AD94E0(EnPoSisters* this) { this->actor.speed = 5.0f; - if (this->sisterID == EN_PO_SIS_MEG) { + if (this->sisterID == EN_POESIS_MEG) { this->collider.base.colMaterial = COL_MATERIAL_METAL; this->collider.base.acFlags |= AC_HARD; Animation_MorphToLoop(&this->skelAnime, &gPoeSistersAttackAnim, -5.0f); } - this->unk_19A = 5; + this->sisTimer = 5; this->actor.world.rot.y = this->actor.yawTowardsPlayer; - this->unk_199 |= 8; + this->sisFlags |= EN_POESIS_FLAG08; this->actionFunc = func_80ADA8C0; } void func_80AD9568(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); this->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000; - if (this->sisterID != EN_PO_SIS_MEG) { + if (this->sisterID != EN_POESIS_MEG) { this->collider.base.colMaterial = COL_MATERIAL_HIT3; this->collider.base.acFlags &= ~AC_HARD; } @@ -329,98 +333,102 @@ void func_80AD95D8(EnPoSisters* this) { ? this->collider.base.ac->world.rot.y : Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000; } - if (this->sisterID != EN_PO_SIS_MEG) { + if (this->sisterID != EN_POESIS_MEG) { this->actor.speed = 10.0f; } - this->unk_199 &= ~0xB; + this->sisFlags &= ~EN_POESIS_FLAG08|EN_POESIS_FLAG02; Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 16); this->actionFunc = func_80ADAAA4; } -void func_80AD96A4(EnPoSisters* this) { +void EnPoSisters_HitSetup(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFleeAnim, -3.0f); this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000; - this->unk_19A = 5; - this->unk_199 |= 0xB; + this->sisTimer = 5; + this->sisFlags |= EN_POESIS_FLAG08|EN_POESIS_FLAG02|EN_POESIS_FLAG01; this->actor.speed = 5.0f; - this->actionFunc = func_80ADAC70; + this->actionFunc = EnPoSister_Hit; } -void func_80AD9718(EnPoSisters* this) { +void EnPoSisters_SetupVanish(EnPoSisters* this) { Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 1.5f, 0.0f, Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE, -3.0f); this->actor.speed = 0.0f; - this->unk_19C = 100; + this->sisVar = 100; this->actor.world.rot.y = this->actor.shape.rot.y; - this->unk_199 &= ~5; + this->sisFlags &= ~(EN_POESIS_FLAG04|EN_POESIS_FLAG01); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_DISAPPEAR); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); - this->actionFunc = func_80ADAD54; + this->actionFunc = EnPoSisters_Vanish; } -void func_80AD97C8(EnPoSisters* this, PlayState* play) { +void EnPoSisters_CircleUpdate(EnPoSisters* this, PlayState* play) { Player* player = GET_PLAYER(play); - f32 sp20; + f32 dist; - if (this->unk_195 == 0 || this->actionFunc != func_80ADAAA4) { + if (this->decoyID == 0 || this->actionFunc != func_80ADAAA4) { if ((player->meleeWeaponState == 0 || player->meleeWeaponAnimation >= PLAYER_MWA_SPIN_ATTACK_1H) && player->actor.world.pos.y - player->actor.floorHeight < 1.0f) { - Math_StepToF(&this->unk_294, 110.0f, 3.0f); + Math_StepToF(&this->circleDist, 110.0f, 3.0f); } else { - Math_StepToF(&this->unk_294, 170.0f, 10.0f); + Math_StepToF(&this->circleDist, 170.0f, 10.0f); } - sp20 = this->unk_294; - } else if (this->unk_195 != 0) { - sp20 = this->actor.parent->xzDistToPlayer; + dist = this->circleDist; + } else if (this->decoyID != 0) { + dist = this->actor.parent->xzDistToPlayer; } - this->actor.world.pos.x = (Math_SinS(this->actor.shape.rot.y + 0x8000) * sp20) + player->actor.world.pos.x; - this->actor.world.pos.z = (Math_CosS(this->actor.shape.rot.y + 0x8000) * sp20) + player->actor.world.pos.z; + this->actor.world.pos.x = (Math_SinS(this->actor.shape.rot.y + 0x8000) * dist) + player->actor.world.pos.x; + this->actor.world.pos.z = (Math_CosS(this->actor.shape.rot.y + 0x8000) * dist) + player->actor.world.pos.z; } -void func_80AD98F4(EnPoSisters* this, PlayState* play) { +void EnPoSisters_SetupReveal(EnPoSisters* this, PlayState* play) { Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 1.5f, 0.0f, Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE, -3.0f); - if (this->sisterID == EN_PO_SIS_MEG) { - this->unk_294 = 110.0f; - func_80AD97C8(this, play); - this->unk_22E.a = 0; + if (this->sisterID == EN_POESIS_MEG) { + this->circleDist = 110.0f; + EnPoSisters_CircleUpdate(this, play); + this->sisColor.a = 0; this->actor.draw = EnPoSisters_Draw; } else { this->actor.world.rot.y = this->actor.shape.rot.y; } - this->unk_19A = 15; + this->sisTimer = 15; this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_PO_APPEAR); - this->unk_199 &= ~1; - this->actionFunc = func_80ADAE6C; + this->sisFlags &= ~EN_POESIS_FLAG01; + this->actionFunc = EnPoSisters_Reveal; } -void func_80AD99D4(EnPoSisters* this, PlayState* play) { - this->unk_19A = 0; +void EnPoSisters_SetupDie(EnPoSisters* this, PlayState* play) { + this->sisTimer = 0; this->actor.speed = 0.0f; this->actor.world.pos.y += 42.0f; this->actor.shape.yOffset = -6000.0f; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; - this->unk_199 = 0; - this->actionFunc = func_80ADAFC0; + this->sisFlags = 0; + this->actionFunc = EnPoSisters_ReleaseFlame; OnePointCutscene_Init(play, 3190, 999, &this->actor, CAM_ID_MAIN); } -void func_80AD9A54(EnPoSisters* this, PlayState* play) { - this->unk_19A = 0; - this->actor.world.pos.y = this->unk_234[0].y; +void EnPoSisters_ItemDrop(EnPoSisters* this, PlayState* play) { + this->sisTimer = 0; + this->actor.world.pos.y = this->torchPos[0].y; Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x80); - this->actionFunc = func_80ADB17C; + this->actionFunc = EnPoSister_Die; } -// Meg spawning fakes -void func_80AD9AA8(EnPoSisters* this, PlayState* play) { +/*Meg will spawn 3 decoys and begin weeping. +(or destroy the decoys and herself if one decoy fails.)*/ +void EnPoSisters_MegSetup(EnPoSisters* this, PlayState* play) { Actor* actor1 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0x400); + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, + ((EN_POESIS_DECOY_PARAM)<<0)); Actor* actor2 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0x800); + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, + ((EN_POESIS_DECOY_PARAM)<<1)); Actor* actor3 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0xC00); + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, + ((EN_POESIS_DECOY_PARAM)<<2)); s32 pad; s32 pad1; @@ -440,19 +448,19 @@ void func_80AD9AA8(EnPoSisters* this, PlayState* play) { actor2->parent = &this->actor; actor1->parent = &this->actor; Animation_PlayLoop(&this->skelAnime, &gPoeSistersMegCryAnim); - this->unk_198 = 0; - this->unk_199 = 160; - this->actionFunc = func_80ADB2B8; + this->torchFlames = 0; + this->sisFlags = EN_POESIS_FLAG80|EN_POESIS_FLAG20; + this->actionFunc = EnPoSisters_MegMourns; } } -void func_80AD9C24(EnPoSisters* this, PlayState* play) { +void EnPoSisters_DecoySetup(EnPoSisters* this, PlayState* play) { Vec3f vec; this->actor.draw = NULL; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; - this->unk_19C = 100; - this->unk_199 = 32; + this->sisVar = 100; + this->sisFlags = EN_POESIS_FLAG20; this->collider.base.colMaterial = COL_MATERIAL_HIT3; this->collider.base.acFlags &= ~AC_HARD; if (play != NULL) { @@ -463,156 +471,158 @@ void func_80AD9C24(EnPoSisters* this, PlayState* play) { 0); } Lights_PointSetColorAndRadius(&this->lightInfo, 0, 0, 0, 0); - this->actionFunc = func_80ADB338; + this->actionFunc = EnPoSisters_DecoyUpdate; } -void func_80AD9D44(EnPoSisters* this) { - if (this->sisterID == EN_PO_SIS_AMY) { +void EnPoSisters_SisterSetup(EnPoSisters* this) { + if (this->sisterID == EN_POESIS_AMY) { Animation_PlayOnce(&this->skelAnime, &gPoeSistersAppearDisappearAnim); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_APPEAR); } else { Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 0.5f, 0.0f, Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE_INTERP, 0.0f); } - this->unk_22E.a = 0; - this->unk_199 = 32; - this->actionFunc = func_80ADB9F0; + this->sisColor.a = 0; + this->sisFlags = EN_POESIS_FLAG20; + this->actionFunc = EnPoSisters_SisterInit; } -void func_80AD9DF0(EnPoSisters* this, PlayState* play) { +void EnPoSisters_MegIntroSetup(EnPoSisters* this, PlayState* play) { Animation_MorphToPlayOnce(&this->skelAnime, &gPoeSistersAppearDisappearAnim, -5.0f); - this->unk_198 = 1; - this->unk_199 &= ~0x80; - this->actionFunc = func_80ADB4B0; + this->torchFlames = 1; + this->sisFlags &= ~EN_POESIS_FLAG80; + this->actionFunc = EnPoSisters_MegIntroStep1; OnePointCutscene_Init(play, 3180, 156, &this->actor, CAM_ID_MAIN); } -void func_80AD9E60(EnPoSisters* this) { +void EnPoSisters_MegDecoySetup(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); - this->unk_19A = Animation_GetLastFrame(&gPoeSistersFloatAnim) * 7 + 7; + this->sisTimer = Animation_GetLastFrame(&gPoeSistersFloatAnim) * 7 + 7; if (this->actor.parent != NULL) { this->actor.world.pos = this->actor.parent->world.pos; this->actor.shape.rot.y = this->actor.parent->shape.rot.y; } else { this->actor.shape.rot.y = this->actor.yawTowardsPlayer; - this->unk_19A++; + this->sisTimer++; } - if (this->unk_195 == 0) { + if (this->decoyID == 0) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); } - this->actionFunc = func_80ADB51C; + this->actionFunc = EnPoSisters_MegIntroStep2; } void func_80AD9F1C(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); - this->unk_22E.a = 255; - this->unk_19A = 300; - this->unk_19C = 3; - this->unk_199 |= 9; + this->sisColor.a = 255; + this->sisTimer = 300; + this->sisVar = 3; + this->sisFlags |= EN_POESIS_FLAG08|EN_POESIS_FLAG01; this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; this->actionFunc = func_80ADB770; } -void func_80AD9F90(EnPoSisters* this) { - if (this->sisterID == EN_PO_SIS_JOELLE) { +void EnPoSisters_JoelleBethInit(EnPoSisters* this) { + if (this->sisterID == EN_POESIS_JOELLE) { + // Joelle's target pos when revealed this->actor.home.pos.x = -632.0f; this->actor.home.pos.z = -3440.0f; - } else { + } else { // Beth's target pos when revealed this->actor.home.pos.x = 752.0f; this->actor.home.pos.z = -3440.0f; } Animation_PlayLoop(&this->skelAnime, &gPoeSistersFloatAnim); - this->unk_199 |= 0xA; - this->actionFunc = func_80ADBB6C; + this->sisFlags |= EN_POESIS_FLAG08|EN_POESIS_FLAG02; + this->actionFunc = EnPoSisters_JoelleBethMove; this->actor.speed = 5.0f; } -void func_80ADA028(EnPoSisters* this) { +void EnPoSister_JoelleBethSetupWait(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersSwayAnim, -3.0f); - this->unk_22E.a = 255; - this->unk_199 |= 0x15; + this->sisColor.a = 255; + this->sisFlags |= EN_POESIS_FLAG10|EN_POESIS_FLAG04|EN_POESIS_FLAG01; this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; - this->actionFunc = func_80ADBBF4; + this->actionFunc = EnPoSister_JoelleBethWait; this->actor.speed = 0.0f; } -void func_80ADA094(EnPoSisters* this, PlayState* play) { +void EnPoSisters_IntroSetup(EnPoSisters* this, PlayState* play) { D_80ADD784 = 0; - this->unk_22E.a = 0; - this->unk_199 = 128; - this->unk_19A = 50; - this->unk_234[0] = this->actor.home.pos; + this->sisColor.a = 0; + this->sisFlags = EN_POESIS_FLAG80; + this->sisTimer = 50; + this->torchPos[0] = this->actor.home.pos; Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); - this->actionFunc = func_80ADBC88; + this->actionFunc = EnPoSisters_IntroStep1; } -void func_80ADA10C(EnPoSisters* this) { +void EnPoSisters_IntroSetup2(EnPoSisters* this) { s32 i; - this->unk_198 = ARRAY_COUNT(this->unk_234); - for (i = 0; i < ARRAY_COUNT(this->unk_234); i++) { - this->unk_234[i] = this->unk_234[0]; + this->torchFlames = ARRAY_COUNT(this->torchPos); + for (i = 0; i < ARRAY_COUNT(this->torchPos); i++) { + this->torchPos[i] = this->torchPos[0]; } - this->actionFunc = func_80ADBD38; + this->actionFunc = EnPoSisters_IntroStep2; } -void func_80ADA1B8(EnPoSisters* this) { + +void EnPoSisters_SetupIntro3(EnPoSisters* this) { Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 0.833f, 0.0f, Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE_INTERP, 0.0f); - if (this->sisterID == EN_PO_SIS_MEG || this->sisterID == EN_PO_SIS_JOELLE) { - this->unk_19A = 40; + if (this->sisterID == EN_POESIS_MEG || this->sisterID == EN_POESIS_JOELLE) { + this->sisTimer = 40; // Meg and Joelle appear first } else { - this->unk_19A = 76; + this->sisTimer = 76; } - this->unk_198 = 0; + this->torchFlames = 0; D_80ADD784 = 0; - this->actionFunc = func_80ADBD8C; + this->actionFunc = EnPoSisters_IntroStep3; } -void func_80ADA25C(EnPoSisters* this) { +void EnPoSisters_SetupIntro4(EnPoSisters* this) { Animation_PlayLoop(&this->skelAnime, &gPoeSistersSwayAnim); - this->unk_198 = 8; - this->unk_19A = 32; - func_80AD9240(this, this->unk_19A, &this->actor.home.pos); - this->actionFunc = func_80ADBEE8; + this->torchFlames = 8; + this->sisTimer = 32; + EnPoSisters_MoveTorchFlames(this, this->sisTimer, &this->actor.home.pos); + this->actionFunc = EnPoSisters_IntroStep4; } -void func_80ADA2BC(EnPoSisters* this, PlayState* play) { +void EnPoSisters_SetupIntro5(EnPoSisters* this, PlayState* play) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); - this->unk_198 = 0; - this->unk_199 = 40; - this->unk_19A = 90; - this->unk_196 = 32; + this->torchFlames = 0; + this->sisFlags = EN_POESIS_FLAG08|EN_POESIS_FLAG20; + this->sisTimer = 90; + this->hoverPulse = 32; this->actor.world.rot.y = D_80ADD79C[this->sisterID]; this->actor.home.pos.y = this->actor.world.pos.y; - if (this->sisterID == EN_PO_SIS_MEG) { + if (this->sisterID == EN_POESIS_MEG) { Flags_SetSwitch(play, 0x1B); } Actor_PlaySfx(&this->actor, NA_SE_EV_FLAME_IGNITION); - this->actionFunc = func_80ADBF58; + this->actionFunc = EnPoSisters_IntroStep5; } void func_80ADA35C(EnPoSisters* this, PlayState* play) { f32 targetY; Player* player = GET_PLAYER(play); - if (this->actionFunc == func_80ADBF58) { + if (this->actionFunc == EnPoSisters_IntroStep5) { targetY = this->actor.home.pos.y; - } else if (this->sisterID == EN_PO_SIS_MEG || this->sisterID == EN_PO_SIS_AMY) { + } else if (this->sisterID == EN_POESIS_MEG || this->sisterID == EN_POESIS_AMY) { targetY = player->actor.world.pos.y + 5.0f; } else { targetY = 832.0f; } Math_ApproachF(&this->actor.world.pos.y, targetY, 0.5f, 3.0f); - if (!this->unk_196) { - this->unk_196 = 32; + if (!this->hoverPulse) { + this->hoverPulse = 32; } - if (this->unk_196 != 0) { - this->unk_196--; + if (this->hoverPulse != 0) { + this->hoverPulse--; } - this->actor.world.pos.y += (2.0f + 0.5f * Rand_ZeroOne()) * Math_SinS(this->unk_196 * 0x800); - if (this->unk_22E.a == 255 && this->actionFunc != func_80ADA8C0 && this->actionFunc != func_80ADA7F0) { - if (this->actionFunc == func_80ADAC70) { + this->actor.world.pos.y += (2.0f + 0.5f * Rand_ZeroOne()) * Math_SinS(this->hoverPulse * 0x800); + if (this->sisColor.a == 255 && this->actionFunc != func_80ADA8C0 && this->actionFunc != func_80ADA7F0) { + if (this->actionFunc == EnPoSister_Hit) { Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); } else { Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); @@ -622,23 +632,23 @@ void func_80ADA35C(EnPoSisters* this, PlayState* play) { void func_80ADA4A8(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->unk_19A != 0) { - this->unk_19A--; + if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisTimer != 0) { + this->sisTimer--; } - if (this->unk_19A == 0 || this->actor.xzDistToPlayer < 200.0f) { - func_80AD93C4(this); + if (this->sisTimer == 0 || this->actor.xzDistToPlayer < 200.0f) { + EnPoSisters_FightSetup(this); } } -void func_80ADA530(EnPoSisters* this, PlayState* play) { +void EnPoSisters_FightState1(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_StepToF(&this->actor.speed, 1.0f, 0.2f); - if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->unk_19A != 0) { - this->unk_19A--; + if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisTimer != 0) { + this->sisTimer--; } if (this->actor.xzDistToPlayer < 200.0f && fabsf(this->actor.yDistToPlayer + 5.0f) < 30.0f) { func_80AD943C(this); - } else if (this->unk_19A == 0 && Math_StepToF(&this->actor.speed, 0.0f, 0.2f) != 0) { + } else if (this->sisTimer == 0 && Math_StepToF(&this->actor.speed, 0.0f, 0.2f) != 0) { func_80AD9368(this); } if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) { @@ -667,20 +677,20 @@ void func_80ADA6A0(EnPoSisters* this, PlayState* play) { if (this->actor.xzDistToPlayer < 160.0f && fabsf(this->actor.yDistToPlayer + 5.0f) < 30.0f) { func_80AD944C(this); } else if (this->actor.xzDistToPlayer > 240.0f) { - func_80AD93C4(this); + EnPoSisters_FightSetup(this); } } void func_80ADA7F0(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (this->unk_19A != 0) { - this->unk_19A--; + if (this->sisTimer != 0) { + this->sisTimer--; } - this->actor.shape.rot.y += 384.0f * ((this->skelAnime.endFrame + 1.0f) * 3.0f - this->unk_19A); - if (this->unk_19A == 18 || this->unk_19A == 7) { + this->actor.shape.rot.y += 384.0f * ((this->skelAnime.endFrame + 1.0f) * 3.0f - this->sisTimer); + if (this->sisTimer == 18 || this->sisTimer == 7) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_ROLL); } - if (this->unk_19A == 0) { + if (this->sisTimer == 0) { func_80AD94E0(this); } } @@ -689,18 +699,18 @@ void func_80ADA8C0(EnPoSisters* this, PlayState* play) { s32 pad; SkelAnime_Update(&this->skelAnime); - if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->unk_19A != 0) { - this->unk_19A--; + if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisTimer != 0) { + this->sisTimer--; } this->actor.shape.rot.y += (384.0f * this->skelAnime.endFrame) * 3.0f; - if (this->unk_19A == 0 && ABS((s16)(this->actor.shape.rot.y - this->actor.world.rot.y)) < 0x1000) { - if (this->sisterID != EN_PO_SIS_MEG) { + if (this->sisTimer == 0 && ABS((s16)(this->actor.shape.rot.y - this->actor.world.rot.y)) < 0x1000) { + if (this->sisterID != EN_POESIS_MEG) { this->collider.base.colMaterial = COL_MATERIAL_HIT3; this->collider.base.acFlags &= ~AC_HARD; - func_80AD93C4(this); + EnPoSisters_FightSetup(this); } else { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); - func_80AD9C24(this, play); + EnPoSisters_DecoySetup(this, play); } } if (Animation_OnFrame(&this->skelAnime, 1.0f)) { @@ -713,11 +723,11 @@ void func_80ADA9E8(EnPoSisters* this, PlayState* play) { this->actor.shape.rot.y -= (this->actor.speed * 10.0f) * 128.0f; if (Math_StepToF(&this->actor.speed, 0.0f, 0.1f) != 0) { this->actor.world.rot.y = this->actor.shape.rot.y; - if (this->sisterID != EN_PO_SIS_MEG) { - func_80AD93C4(this); + if (this->sisterID != EN_POESIS_MEG) { + EnPoSisters_FightSetup(this); } else { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); - func_80AD9C24(this, play); + EnPoSisters_DecoySetup(this, play); } } } @@ -725,140 +735,142 @@ void func_80ADA9E8(EnPoSisters* this, PlayState* play) { void func_80ADAAA4(EnPoSisters* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime) && !(this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW)) { if (this->actor.colChkInfo.health != 0) { - if (this->sisterID != EN_PO_SIS_MEG) { - func_80AD96A4(this); - } else if (this->unk_195 != 0) { - func_80AD9C24(this, NULL); + if (this->sisterID != EN_POESIS_MEG) { + EnPoSisters_HitSetup(this); + } else if (this->decoyID != 0) { + EnPoSisters_DecoySetup(this, NULL); } else { - func_80AD9C24(this, play); + EnPoSisters_DecoySetup(this, play); } } else { - func_80AD99D4(this, play); + EnPoSisters_SetupDie(this, play); } } - if (this->unk_195 != 0) { + if (this->decoyID != 0) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.parent->shape.rot.y, - (this->unk_195 == 2) ? 0x800 : 0x400); - this->unk_22E.a = ((this->skelAnime.endFrame - this->skelAnime.curFrame) * 255.0f) / this->skelAnime.endFrame; + (this->decoyID == 2) ? 0x800 : 0x400); + this->sisColor.a = ((this->skelAnime.endFrame - this->skelAnime.curFrame) * 255.0f) / this->skelAnime.endFrame; this->actor.world.pos.y = this->actor.parent->world.pos.y; - func_80AD97C8(this, play); - } else if (this->sisterID != EN_PO_SIS_MEG) { + EnPoSisters_CircleUpdate(this, play); + } else if (this->sisterID != EN_POESIS_MEG) { Math_StepToF(&this->actor.speed, 0.0f, 0.5f); } } -void func_80ADAC70(EnPoSisters* this, PlayState* play) { +void EnPoSister_Hit(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer + 0x8000, 1820); - if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->unk_19A != 0) { - this->unk_19A--; + if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisTimer != 0) { + this->sisTimer--; } if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) { this->actor.world.rot.y = this->actor.shape.rot.y; - this->unk_199 |= 2; - func_80AD9718(this); - } else if (this->unk_19A == 0 && 240.0f < this->actor.xzDistToPlayer) { + this->sisFlags |= EN_POESIS_FLAG02; + EnPoSisters_SetupVanish(this); + } else if (this->sisTimer == 0 && 240.0f < this->actor.xzDistToPlayer) { this->actor.world.rot.y = this->actor.shape.rot.y; - func_80AD93C4(this); + EnPoSisters_FightSetup(this); } } -void func_80ADAD54(EnPoSisters* this, PlayState* play) { +void EnPoSisters_Vanish(EnPoSisters* this, PlayState* play) { s32 endFrame; if (SkelAnime_Update(&this->skelAnime)) { - this->unk_22E.a = 0; + this->sisColor.a = 0; this->collider.elem.acDmgInfo.dmgFlags = DMG_MAGIC_ICE | DMG_MAGIC_FIRE | DMG_DEKU_NUT; - func_80AD93C4(this); + EnPoSisters_FightSetup(this); } else { endFrame = this->skelAnime.endFrame; - this->unk_22E.a = ((endFrame - this->skelAnime.curFrame) * 255.0f) / endFrame; + this->sisColor.a = ((endFrame - this->skelAnime.curFrame) * 255.0f) / endFrame; } } -void func_80ADAE6C(EnPoSisters* this, PlayState* play) { +void EnPoSisters_Reveal(EnPoSisters* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { - this->unk_22E.a = 255; - if (this->sisterID != EN_PO_SIS_MEG) { - this->unk_199 |= 1; + this->sisColor.a = 255; + if (this->sisterID != EN_POESIS_MEG) { + this->sisFlags |= EN_POESIS_FLAG01; this->collider.elem.acDmgInfo.dmgFlags = (DMG_SWORD | DMG_ARROW | DMG_HAMMER | DMG_MAGIC_ICE | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_EXPLOSIVE | DMG_DEKU_STICK); - if (this->unk_19A != 0) { - this->unk_19A--; + if (this->sisTimer != 0) { + this->sisTimer--; } - if (this->unk_19A == 0) { - this->unk_197 = 20; - func_80AD93C4(this); + if (this->sisTimer == 0) { + this->vanishTimer = 20; + EnPoSisters_FightSetup(this); } } else { func_80AD9F1C(this); } } else { - this->unk_22E.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; - if (this->sisterID == EN_PO_SIS_MEG) { - func_80AD97C8(this, play); + this->sisColor.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; + if (this->sisterID == EN_POESIS_MEG) { + EnPoSisters_CircleUpdate(this, play); } } } -void func_80ADAFC0(EnPoSisters* this, PlayState* play) { +/*animate the torch flame after dealing the killing blow*/ +void EnPoSisters_ReleaseFlame(EnPoSisters* this, PlayState* play) { s32 i; - this->unk_19A++; - this->unk_198 = CLAMP_MAX(this->unk_198 + 1, 8); - for (i = this->unk_198 - 1; i > 0; i--) { - this->unk_234[i] = this->unk_234[i - 1]; + this->sisTimer++; + this->torchFlames = CLAMP_MAX(this->torchFlames + 1, 8); + for (i = this->torchFlames - 1; i > 0; i--) { + this->torchPos[i] = this->torchPos[i - 1]; } - this->unk_234[0].x = - (Math_SinS((this->actor.shape.rot.y + this->unk_19A * 0x3000) - 0x4000) * (3000.0f * this->actor.scale.x)) + + this->torchPos[0].x = + (Math_SinS((this->actor.shape.rot.y + this->sisTimer * 0x3000) - 0x4000) * (3000.0f * this->actor.scale.x)) + this->actor.world.pos.x; - this->unk_234[0].z = - (Math_CosS((this->actor.shape.rot.y + this->unk_19A * 0x3000) - 0x4000) * (3000.0f * this->actor.scale.x)) + + this->torchPos[0].z = + (Math_CosS((this->actor.shape.rot.y + this->sisTimer * 0x3000) - 0x4000) * (3000.0f * this->actor.scale.x)) + this->actor.world.pos.z; - if (this->unk_19A < 8) { - this->unk_234[0].y = this->unk_234[1].y - 9.0f; + if (this->sisTimer < 8) { + this->torchPos[0].y = this->torchPos[1].y - 9.0f; } else { - this->unk_234[0].y = this->unk_234[1].y + 2.0f; - if (this->unk_19A >= 16) { + this->torchPos[0].y = this->torchPos[1].y + 2.0f; + if (this->sisTimer >= 16) { if (Math_StepToF(&this->actor.scale.x, 0.0f, 0.001f) != 0) { - func_80AD9A54(this, play); + EnPoSisters_ItemDrop(this, play); } this->actor.scale.z = this->actor.scale.x; this->actor.scale.y = this->actor.scale.x; } } - if (this->unk_19A == 16) { + if (this->sisTimer == 16) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_DEAD2); } } -void func_80ADB17C(EnPoSisters* this, PlayState* play) { - this->unk_19A++; - if (this->unk_19A == 64) { +void EnPoSister_Die(EnPoSisters* this, PlayState* play) { + this->sisTimer++; + if (this->sisTimer == 64) { Flags_SetSwitch(play, this->actor.params); SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 30, NA_SE_EV_FLAME_IGNITION); - if (this->sisterID == EN_PO_SIS_MEG) { + if (this->sisterID == EN_POESIS_MEG) { Flags_UnsetSwitch(play, 0x1B); } play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE; Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME); Actor_Kill(&this->actor); - } else if (this->unk_19A < 32) { - func_80AD9240(this, this->unk_19A, &this->actor.world.pos); + } else if (this->sisTimer < 32) { + EnPoSisters_MoveTorchFlames(this, this->sisTimer, &this->actor.world.pos); } else { - func_80AD9240(this, 64 - this->unk_19A, &this->actor.world.pos); + EnPoSisters_MoveTorchFlames(this, 64 - this->sisTimer, &this->actor.world.pos); } - if (this->unk_19A == 32) { - this->actor.world.pos.x = D_80ADD7A4[this->sisterID].x; - this->actor.world.pos.y = D_80ADD7A4[this->sisterID].y; - this->actor.world.pos.z = D_80ADD7A4[this->sisterID].z; + if (this->sisTimer == 32) { + this->actor.world.pos.x = sDeathTorchPos[this->sisterID].x; + this->actor.world.pos.y = sDeathTorchPos[this->sisterID].y; + this->actor.world.pos.z = sDeathTorchPos[this->sisterID].z; } } -void func_80ADB2B8(EnPoSisters* this, PlayState* play) { +/*Meg weeps as she is the last remaining sister until Link aproaches*/ +void EnPoSisters_MegMourns(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (this->actor.xzDistToPlayer < 130.0f) { - func_80AD9DF0(this, play); + EnPoSisters_MegIntroSetup(this, play); } if (Animation_OnFrame(&this->skelAnime, 0.0f)) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_CRY); @@ -866,94 +878,95 @@ void func_80ADB2B8(EnPoSisters* this, PlayState* play) { this->actor.shape.rot.y = this->actor.yawTowardsPlayer; } -void func_80ADB338(EnPoSisters* this, PlayState* play) { +void EnPoSisters_DecoyUpdate(EnPoSisters* this, PlayState* play) { Player* player = GET_PLAYER(play); EnPoSisters* realMeg = (EnPoSisters*)this->actor.parent; - if (this->unk_195 == 0) { + if (this->decoyID == 0) { if (Actor_WorldDistXZToPoint(&player->actor, &this->actor.home.pos) < 600.0f) { - if (this->unk_19C != 0) { - this->unk_19C--; + if (this->sisVar != 0) { + this->sisVar--; } } else { - this->unk_19C = 100; + this->sisVar = 100; } - if (this->unk_19C == 0) { + if (this->sisVar == 0) { this->actor.shape.rot.y = (s32)(4.0f * Rand_ZeroOne()) * 0x4000 + this->actor.yawTowardsPlayer; this->actor.world.pos.y = player->actor.world.pos.y + 5.0f; - func_80AD98F4(this, play); + EnPoSisters_SetupReveal(this, play); } } else { - if (realMeg->actionFunc == func_80ADB51C) { + if (realMeg->actionFunc == EnPoSisters_MegIntroStep2) { this->actor.draw = EnPoSisters_Draw; - func_80AD9E60(this); - } else if (realMeg->actionFunc == func_80ADAE6C) { - this->actor.shape.rot.y = this->actor.parent->shape.rot.y + this->unk_195 * 0x4000; + EnPoSisters_MegDecoySetup(this); + } else if (realMeg->actionFunc == EnPoSisters_Reveal) { + this->actor.shape.rot.y = this->actor.parent->shape.rot.y + this->decoyID * 0x4000; this->actor.world.pos.y = player->actor.world.pos.y + 5.0f; - func_80AD98F4(this, play); - } else if (realMeg->actionFunc == func_80ADAFC0) { + EnPoSisters_SetupReveal(this, play); + } else if (realMeg->actionFunc == EnPoSisters_ReleaseFlame) { Actor_Kill(&this->actor); } } } -void func_80ADB4B0(EnPoSisters* this, PlayState* play) { +void EnPoSisters_MegIntroStep1(EnPoSisters* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { - func_80AD9E60(this); + EnPoSisters_MegDecoySetup(this); } - func_80AD97C8(this, play); + EnPoSisters_CircleUpdate(this, play); this->actor.world.pos.y += 1.0f; Actor_SetFocus(&this->actor, 40.0f); } -void func_80ADB51C(EnPoSisters* this, PlayState* play) { +/*Meg reveals and moves decoys back and forth*/ +void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play) { f32 temp_f2; - s16 phi_v0; - s16 phi_a2; + s16 sign; + s16 step; u8 temp; SkelAnime_Update(&this->skelAnime); temp_f2 = this->skelAnime.endFrame * 0.5f; - this->unk_22E.a = (fabsf(temp_f2 - this->skelAnime.curFrame) * 255.0f) / temp_f2; - if (this->unk_19A != 0) { - this->unk_19A -= 1; + this->sisColor.a = (fabsf(temp_f2 - this->skelAnime.curFrame) * 255.0f) / temp_f2; + if (this->sisTimer != 0) { + this->sisTimer -= 1; } - if (this->unk_19A == 0) { + if (this->sisTimer == 0) { this->actor.world.rot.y = this->actor.shape.rot.y += 0x4000 * (s32)(Rand_ZeroOne() * 4.0f); - if (this->unk_195 == 0) { + if (this->decoyID == 0) { func_800F5ACC(NA_BGM_MINI_BOSS); } func_80AD9F1C(this); } else { this->actor.world.pos.y += 0.1f; - temp = this->unk_195; + temp = this->decoyID; if (temp != 0) { - if (this->unk_19A > 90) { - phi_v0 = 1; - phi_a2 = 64; - } else if (this->unk_19A > 70) { - phi_v0 = 0; - phi_a2 = 64; - } else if (this->unk_19A > 55) { - phi_v0 = 1; - phi_a2 = 96; - } else if (this->unk_19A > 40) { - phi_v0 = 0; - phi_a2 = 96; + if (this->sisTimer > 90) { + sign = 1; + step = 64; + } else if (this->sisTimer > 70) { + sign = 0; + step = 64; + } else if (this->sisTimer > 55) { + sign = 1; + step = 96; + } else if (this->sisTimer > 40) { + sign = 0; + step = 96; } else { - phi_v0 = 1; - phi_a2 = 256; + sign = 1; + step = 256; } - if (this->unk_195 == 2) { - phi_a2 *= 2; + if (this->decoyID == 2) { + step *= 2; } Math_ScaledStepToS(&this->actor.shape.rot.y, - this->actor.parent->shape.rot.y + (this->unk_195 * 0x4000) * phi_v0, phi_a2); - } else if (this->unk_19A == 70 || this->unk_19A == 40) { + this->actor.parent->shape.rot.y + (this->decoyID * 0x4000) * sign, step); + } else if (this->sisTimer == 70 || this->sisTimer == 40) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); } } - func_80AD97C8(this, play); + EnPoSisters_CircleUpdate(this, play); Actor_SetFocus(&this->actor, 40.0f); } @@ -961,208 +974,210 @@ void func_80ADB770(EnPoSisters* this, PlayState* play) { s32 temp_v0; s32 phi_a0; - if (this->unk_19A != 0) { - this->unk_19A--; + if (this->sisTimer != 0) { + this->sisTimer--; } - if (this->unk_19C > 0) { - if (this->unk_19A >= 16) { + if (this->sisVar > 0) { + if (this->sisTimer >= 16) { SkelAnime_Update(&this->skelAnime); - if (this->unk_195 == 0) { - if (ABS((s16)(16 - this->unk_196)) < 14) { + if (this->decoyID == 0) { + if (ABS((s16)(16 - this->hoverPulse)) < 14) { this->actor.shape.rot.y += - (0x580 - (this->unk_19C * 0x180)) * fabsf(Math_SinS(this->unk_196 * 0x800)); + (0x580 - (this->sisVar * 0x180)) * fabsf(Math_SinS(this->hoverPulse * 0x800)); } - if (this->unk_19A >= 284 || this->unk_19A < 31) { - this->unk_199 |= 0x40; + if (this->sisTimer >= 284 || this->sisTimer < 31) { + this->sisFlags |= EN_POESIS_FLAG40; } else { - this->unk_199 &= ~0x40; + this->sisFlags &= ~EN_POESIS_FLAG40; } } else { - this->actor.shape.rot.y = (s16)(this->actor.parent->shape.rot.y + (this->unk_195 * 0x4000)); + this->actor.shape.rot.y = (s16)(this->actor.parent->shape.rot.y + (this->decoyID * 0x4000)); } } } - if (this->unk_195 == 0) { - if (this->unk_19A >= 284 || (this->unk_19A < 31 && this->unk_19A >= 16)) { - this->unk_199 |= 0x40; + if (this->decoyID == 0) { + if (this->sisTimer >= 284 || (this->sisTimer < 31 && this->sisTimer >= 16)) { + this->sisFlags |= EN_POESIS_FLAG40; } else { - this->unk_199 &= ~0x40; + this->sisFlags &= ~EN_POESIS_FLAG40; } } if (Actor_WorldDistXZToPoint(&GET_PLAYER(play)->actor, &this->actor.home.pos) > 600.0f) { - this->unk_199 &= ~0x40; - func_80AD9C24(this, play); - } else if (this->unk_19A == 0) { - if (this->unk_195 == 0) { + this->sisFlags &= ~EN_POESIS_FLAG40; + EnPoSisters_DecoySetup(this, play); + } else if (this->sisTimer == 0) { + if (this->decoyID == 0) { func_80AD94E0(this); } else { - func_80AD9C24(this, play); + EnPoSisters_DecoySetup(this, play); } - } else if (this->unk_195 != 0) { + } else if (this->decoyID != 0) { EnPoSisters* realMeg = (EnPoSisters*)this->actor.parent; if (realMeg->actionFunc == func_80ADAAA4) { func_80AD95D8(this); } - } else if (this->unk_19C == 0) { - this->unk_19C = -15; - } else if (this->unk_19C < 0) { - this->unk_19C++; - if (this->unk_19C == 0) { + } else if (this->sisVar == 0) { + this->sisVar = -15; + } else if (this->sisVar < 0) { + this->sisVar++; + if (this->sisVar == 0) { func_80AD94E0(this); } } - func_80AD97C8(this, play); + EnPoSisters_CircleUpdate(this, play); } -void func_80ADB9F0(EnPoSisters* this, PlayState* play) { +void EnPoSisters_SisterInit(EnPoSisters* this, PlayState* play) { f32 div; if (SkelAnime_Update(&this->skelAnime)) { - this->unk_22E.a = 255; - if (this->sisterID == EN_PO_SIS_AMY) { + this->sisColor.a = 255; + if (this->sisterID == ) { this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; this->actor.home.pos.x = 1992.0f; this->actor.home.pos.z = -1440.0f; - this->unk_199 |= 0x18; - func_80AD93C4(this); + this->sisFlags |= EN_POESIS_FLAG08|EN_POESIS_FLAG10; + EnPoSisters_FightSetup(this); } else { - func_80AD9F90(this); + EnPoSisters_JoelleBethInit(this); } } else { div = this->skelAnime.curFrame / this->skelAnime.endFrame; - this->unk_22E.a = 255.0f * div; + this->sisColor.a = 255.0f * div; } - if (this->sisterID != EN_PO_SIS_AMY && Animation_OnFrame(&this->skelAnime, 1.0f)) { + if (this->sisterID != EN_POESIS_AMY && Animation_OnFrame(&this->skelAnime, 1.0f)) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_APPEAR); } Actor_SetFocus(&this->actor, 40.0f); } -void func_80ADBB6C(EnPoSisters* this, PlayState* play) { +/*Joelle and Beth move to thier respective worldspace marks once revealed*/ +void EnPoSisters_JoelleBethMove(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (Actor_WorldDistXZToPoint(&this->actor, &this->actor.home.pos) < 10.0f) { - func_80ADA028(this); + EnPoSister_JoelleBethSetupWait(this); } else { Math_ScaledStepToS(&this->actor.world.rot.y, Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos), 1820); } } -void func_80ADBBF4(EnPoSisters* this, PlayState* play) { +/*Joelle and Beth wait at the bottom of the stairs for Link.*/ +void EnPoSister_JoelleBethWait(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1820); if (this->actor.xzDistToPlayer < 240.0f && fabsf(this->actor.yDistToPlayer + 5.0f) < 30.0f) { - func_80AD93C4(this); + EnPoSisters_FightSetup(this); } } -void func_80ADBC88(EnPoSisters* this, PlayState* play) { +void EnPoSisters_IntroStep1(EnPoSisters* this, PlayState* play) { if (D_80ADD784 != 0 || !Player_InCsMode(play)) { - if (this->unk_19A != 0) { - this->unk_19A--; + if (this->sisTimer != 0) { + this->sisTimer--; } - if (this->unk_19A == 30) { - if (this->sisterID == EN_PO_SIS_MEG) { + if (this->sisTimer == 30) { + if (this->sisterID == EN_POESIS_MEG) { OnePointCutscene_Init(play, 3140, 999, NULL, CAM_ID_MAIN); } D_80ADD784 = 1; } - if (this->unk_19A == 0) { - func_80ADA10C(this); + if (this->sisTimer == 0) { + EnPoSisters_IntroSetup2(this); } } Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_TORCH - SFX_FLAG); } -void func_80ADBD38(EnPoSisters* this, PlayState* play) { - this->unk_19A++; - func_80AD9240(this, this->unk_19A, &this->actor.home.pos); - if (this->unk_19A == 32) { - func_80ADA1B8(this); +void EnPoSisters_IntroStep2(EnPoSisters* this, PlayState* play) { + this->sisTimer++; + EnPoSisters_MoveTorchFlames(this, this->sisTimer, &this->actor.home.pos); + if (this->sisTimer == 32) { + EnPoSisters_SetupIntro3(this); } } -void func_80ADBD8C(EnPoSisters* this, PlayState* play) { - this->unk_19A--; - if (this->unk_19A == 0) { +void EnPoSisters_IntroStep3(EnPoSisters* this, PlayState* play) { + this->sisTimer--; + if (this->sisTimer == 0) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_APPEAR); - this->unk_199 &= ~0x80; + this->sisFlags &= ~EN_POESIS_FLAG80; } - if (this->unk_19A <= 0) { + if (this->sisTimer <= 0) { if (SkelAnime_Update(&this->skelAnime)) { - this->unk_22E.a = 255; + this->sisColor.a = 255; D_80ADD784 |= (1 << this->sisterID); } else { - this->unk_22E.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; + this->sisColor.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; } } if (D_80ADD784 == 15) { - func_80ADA25C(this); + EnPoSisters_SetupIntro4(this); } } -void func_80ADBEE8(EnPoSisters* this, PlayState* play) { +void EnPoSisters_IntroStep4(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (this->unk_19A != 0) { - this->unk_19A--; + if (this->sisTimer != 0) { + this->sisTimer--; } - func_80AD9240(this, this->unk_19A, &this->actor.home.pos); - if (this->unk_19A == 0) { - func_80ADA2BC(this, play); + EnPoSisters_MoveTorchFlames(this, this->sisTimer, &this->actor.home.pos); + if (this->sisTimer == 0) { + EnPoSisters_SetupIntro5(this, play); } } -void func_80ADBF58(EnPoSisters* this, PlayState* play) { +void EnPoSisters_IntroStep5(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - this->unk_19A--; + this->sisTimer--; Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.world.rot.y, 0x500); - if (this->unk_19A == 0 && this->sisterID == EN_PO_SIS_MEG) { + if (this->sisTimer == 0 && this->sisterID == EN_POESIS_MEG) { play->envCtx.lightSettingOverride = 4; } - if (this->unk_19A < 0) { + if (this->sisTimer < 0) { Math_StepToF(&this->actor.speed, 5.0f, 0.2f); } - if (this->unk_19A == -70 && this->sisterID == EN_PO_SIS_JOELLE) { - SfxSource_PlaySfxAtFixedWorldPos(play, &D_80ADD7BC, 40, NA_SE_EN_PO_LAUGH); + if (this->sisTimer == -70 && this->sisterID == EN_POESIS_JOELLE) { + SfxSource_PlaySfxAtFixedWorldPos(play, &sIntroLaughPos, 40, NA_SE_EN_PO_LAUGH); } - if (this->unk_19A < -120) { + if (this->sisTimer < -120) { Actor_Kill(&this->actor); } } void func_80ADC034(EnPoSisters* this, PlayState* play) { - if (this->actor.isLockedOn && this->unk_22E.a == 255) { - if (this->unk_197 != 0) { - this->unk_197--; + if (this->actor.isLockedOn && this->sisColor.a == 255) { + if (this->vanishTimer != 0) { + this->vanishTimer--; } } else { - this->unk_197 = 20; + this->vanishTimer = 20; } - if (this->unk_22E.a == 0) { - if (this->unk_19C != 0) { - this->unk_19C--; + if (this->sisColor.a == 0) { + if (this->sisVar != 0) { + this->sisVar--; } } if (this->actionFunc != func_80ADA7F0 && this->actionFunc != func_80ADA8C0 && this->actionFunc != func_80ADAAA4) { - if (this->unk_197 == 0) { - func_80AD9718(this); - } else if (this->unk_19C == 0 && this->unk_22E.a == 0) { - func_80AD98F4(this, play); + if (this->vanishTimer == 0) { + EnPoSisters_SetupVanish(this); + } else if (this->sisVar == 0 && this->sisColor.a == 0) { + EnPoSisters_SetupReveal(this, play); } } } -void func_80ADC10C(EnPoSisters* this, PlayState* play) { +void EnPoSisters_CheckDamage(EnPoSisters* this, PlayState* play) { Vec3f sp24; if (this->collider.base.acFlags & AC_HIT) { this->collider.base.acFlags &= ~AC_HIT; Actor_SetDropFlag(&this->actor, &this->collider.elem, true); - if (this->unk_195 != 0) { - ((EnPoSisters*)this->actor.parent)->unk_19C--; + if (this->decoyID != 0) { + ((EnPoSisters*)this->actor.parent)->sisVar--; Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); - func_80AD9C24(this, play); + EnPoSisters_DecoySetup(this, play); if (Rand_ZeroOne() < 0.2f) { sp24.x = this->actor.world.pos.x; sp24.y = this->actor.world.pos.y; @@ -1172,18 +1187,18 @@ void func_80ADC10C(EnPoSisters* this, PlayState* play) { } else if (this->collider.base.colMaterial == COL_MATERIAL_METAL || (this->actor.colChkInfo.damageReaction == POESIS_DMG_REACT_OTHER && this->actor.colChkInfo.damage == 0)) { - if (this->sisterID == EN_PO_SIS_MEG) { + if (this->sisterID == EN_POESIS_MEG) { this->actor.freezeTimer = 0; } } else if (this->actor.colChkInfo.damageReaction == POESIS_DMG_REACT_NUT) { this->actor.world.rot.y = this->actor.shape.rot.y; - this->unk_199 |= 2; - func_80AD98F4(this, play); - } else if (this->sisterID == EN_PO_SIS_MEG && + this->sisFlags |= EN_POESIS_FLAG02; + EnPoSisters_SetupReveal(this, play); + } else if (this->sisterID == EN_POESIS_MEG && this->actor.colChkInfo.damageReaction == POESIS_DMG_REACT_SWORD && this->actionFunc == func_80ADB770) { - if (this->unk_19C == 0) { - this->unk_19C = -45; + if (this->sisVar == 0) { + this->sisVar = -45; } } else { if (Actor_ApplyDamage(&this->actor) != 0) { @@ -1206,18 +1221,18 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) { this->collider.base.atFlags &= ~AT_HIT; func_80AD9568(this); } - func_80ADC10C(this, play); - if (this->unk_199 & 4) { + EnPoSisters_CheckDamage(this, play); + if (this->sisFlags & EN_POESIS_FLAG04) { func_80ADC034(this, play); } this->actionFunc(this, play); - if (this->unk_199 & 0x1F) { - if (this->unk_199 & 8) { + if (this->sisFlags & 0x1F) { + if (this->sisFlags & EN_POESIS_FLAG08) { func_80ADA35C(this, play); } Actor_MoveXZGravity(&this->actor); - if (this->unk_199 & 0x10) { + if (this->sisFlags & EN_POESIS_FLAG10) { Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 0.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2); } else { @@ -1233,26 +1248,26 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) { Collider_UpdateCylinder(&this->actor, &this->collider); if (this->actionFunc == func_80ADA8C0 || this->actionFunc == func_80ADA7F0) { - this->unk_198++; - this->unk_198 = CLAMP_MAX(this->unk_198, 8); - } else if (this->actionFunc != func_80ADAFC0) { - temp = this->unk_198 - 1; - this->unk_198 = CLAMP_MIN(temp, 1); + this->torchFlames++; + this->torchFlames = CLAMP_MAX(this->torchFlames, 8); + } else if (this->actionFunc != EnPoSisters_ReleaseFlame) { + temp = this->torchFlames - 1; + this->torchFlames = CLAMP_MIN(temp, 1); } if (this->actionFunc == func_80ADA8C0) { this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT; CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); } - if (this->unk_199 & 1) { + if (this->sisFlags & EN_POESIS_FLAG01) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); } - if (this->actionFunc != func_80ADB338) { + if (this->actionFunc != EnPoSisters_DecoyUpdate) { CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); } Actor_SetFocus(&this->actor, 40.0f); - if (this->actionFunc == func_80ADAC70) { + if (this->actionFunc == EnPoSister_Hit) { this->actor.shape.rot.y = this->actor.world.rot.y + 0x8000; - } else if (this->unk_199 & 2) { + } else if (this->sisFlags & EN_POESIS_FLAG02) { this->actor.shape.rot.y = this->actor.world.rot.y; } } @@ -1262,34 +1277,34 @@ void func_80ADC55C(EnPoSisters* this) { s16 temp_var; if (this->skelAnime.animation == &gPoeSistersAttackAnim) { - this->unk_22E.r = CLAMP_MAX((s16)(this->unk_22E.r + 5), 255); - this->unk_22E.g = CLAMP_MIN((s16)(this->unk_22E.g - 5), 50); - temp_var = this->unk_22E.b - 5; - this->unk_22E.b = CLAMP_MIN(temp_var, 0); + this->sisColor.r = CLAMP_MAX((s16)(this->sisColor.r + 5), 255); + this->sisColor.g = CLAMP_MIN((s16)(this->sisColor.g - 5), 50); + temp_var = this->sisColor.b - 5; + this->sisColor.b = CLAMP_MIN(temp_var, 0); } else if (this->skelAnime.animation == &gPoeSistersFleeAnim) { - this->unk_22E.r = CLAMP_MAX((s16)(this->unk_22E.r + 5), 80); - this->unk_22E.g = CLAMP_MAX((s16)(this->unk_22E.g + 5), 255); - temp_var = this->unk_22E.b + 5; - this->unk_22E.b = CLAMP_MAX(temp_var, 225); + this->sisColor.r = CLAMP_MAX((s16)(this->sisColor.r + 5), 80); + this->sisColor.g = CLAMP_MAX((s16)(this->sisColor.g + 5), 255); + temp_var = this->sisColor.b + 5; + this->sisColor.b = CLAMP_MAX(temp_var, 225); } else if (this->skelAnime.animation == &gPoeSistersDamagedAnim) { if (this->actor.colorFilterTimer & 2) { - this->unk_22E.r = 0; - this->unk_22E.g = 0; - this->unk_22E.b = 0; + this->sisColor.r = 0; + this->sisColor.g = 0; + this->sisColor.b = 0; } else { - this->unk_22E.r = 80; - this->unk_22E.g = 255; - this->unk_22E.b = 225; + this->sisColor.r = 80; + this->sisColor.g = 255; + this->sisColor.b = 225; } } else { - this->unk_22E.r = CLAMP_MAX((s16)(this->unk_22E.r + 5), 255); - this->unk_22E.g = CLAMP_MAX((s16)(this->unk_22E.g + 5), 255); - if (this->unk_22E.b > 210) { - temp_var = this->unk_22E.b - 5; - this->unk_22E.b = CLAMP_MIN(temp_var, 210); + this->sisColor.r = CLAMP_MAX((s16)(this->sisColor.r + 5), 255); + this->sisColor.g = CLAMP_MAX((s16)(this->sisColor.g + 5), 255); + if (this->sisColor.b > 210) { + temp_var = this->sisColor.b - 5; + this->sisColor.b = CLAMP_MIN(temp_var, 210); } else { - temp_var = this->unk_22E.b + 5; - this->unk_22E.b = CLAMP_MAX(temp_var, 210); + temp_var = this->sisColor.b + 5; + this->sisColor.b = CLAMP_MAX(temp_var, 210); } } } @@ -1299,25 +1314,25 @@ s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve EnPoSisters* this = (EnPoSisters*)thisx; Color_RGBA8* color; - if (limbIndex == 1 && (this->unk_199 & 0x40)) { - if (this->unk_19A >= 284) { - rot->x += (this->unk_19A * 0x1000) - 0x11C000; + if (limbIndex == 1 && (this->sisFlags & EN_POESIS_FLAG40)) { + if (this->sisTimer >= 284) { + rot->x += (this->sisTimer * 0x1000) - 0x11C000; } else { - rot->x += (this->unk_19A * 0x1000) - 0xF000; + rot->x += (this->sisTimer * 0x1000) - 0xF000; } } - if (this->unk_22E.a == 0 || limbIndex == 8 || (this->actionFunc == func_80ADAFC0 && this->unk_19A >= 8)) { + if (this->sisColor.a == 0 || limbIndex == 8 || (this->actionFunc == EnPoSisters_ReleaseFlame && this->sisTimer >= 8)) { *dList = NULL; } else if (limbIndex == 9) { *dList = sSisterBodies[this->sisterID]; } else if (limbIndex == 10) { *dList = sSisterFaces[this->sisterID]; gDPPipeSync((*gfxP)++); - gDPSetEnvColor((*gfxP)++, this->unk_22E.r, this->unk_22E.g, this->unk_22E.b, this->unk_22E.a); + gDPSetEnvColor((*gfxP)++, this->sisColor.r, this->sisColor.g, this->sisColor.b, this->sisColor.a); } else if (limbIndex == 11) { color = &D_80ADD7E8[this->sisterID]; gDPPipeSync((*gfxP)++); - gDPSetEnvColor((*gfxP)++, color->r, color->g, color->b, this->unk_22E.a); + gDPSetEnvColor((*gfxP)++, color->r, color->g, color->b, this->sisColor.a); } return false; } @@ -1327,37 +1342,37 @@ void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s s32 i; s32 pad; - if (this->actionFunc == func_80ADAFC0 && this->unk_19A >= 8 && limbIndex == 9) { + if (this->actionFunc == EnPoSisters_ReleaseFlame && this->sisTimer >= 8 && limbIndex == 9) { MATRIX_FINALIZE_AND_LOAD((*gfxP)++, play->state.gfxCtx, "../z_en_po_sisters.c", 2876); gSPDisplayList((*gfxP)++, gPoSistersBurnDL); } - if (limbIndex == 8 && this->actionFunc != func_80ADB2B8) { - if (this->unk_199 & 0x20) { - for (i = this->unk_198 - 1; i > 0; i--) { - this->unk_234[i] = this->unk_234[i - 1]; + if (limbIndex == 8 && this->actionFunc != EnPoSisters_MegMourns) { + if (this->sisFlags & EN_POESIS_FLAG20) { + for (i = this->torchFlames - 1; i > 0; i--) { + this->torchPos[i] = this->torchPos[i - 1]; } - Matrix_MultVec3f(&D_80ADD7F8, &this->unk_234[0]); - } else if (this->actionFunc == func_80ADBD8C) { + Matrix_MultVec3f(&D_80ADD7F8, &this->torchPos[0]); + } else if (this->actionFunc == EnPoSisters_IntroStep3) { Matrix_MultVec3f(&D_80ADD7F8, &this->actor.home.pos); } - if (this->unk_198 > 0) { - Color_RGBA8* color = &D_80ADD6F0[this->sisterID]; + if (this->torchFlames > 0) { + Color_RGBA8* color = &sTorchLightColors[this->sisterID]; f32 temp_f2 = Rand_ZeroOne() * 0.3f + 0.7f; - if (this->actionFunc == func_80ADB17C || this->actionFunc == func_80ADBD38 || - this->actionFunc == func_80ADBEE8) { - Lights_PointNoGlowSetInfo(&this->lightInfo, this->unk_234[0].x, this->unk_234[0].y + 15.0f, - this->unk_234[0].z, color->r * temp_f2, color->g * temp_f2, + if (this->actionFunc == EnPoSister_Die || this->actionFunc == EnPoSisters_IntroStep2 || + this->actionFunc == EnPoSisters_IntroStep4) { + Lights_PointNoGlowSetInfo(&this->lightInfo, this->torchPos[0].x, this->torchPos[0].y + 15.0f, + this->torchPos[0].z, color->r * temp_f2, color->g * temp_f2, color->b * temp_f2, 200); } else { - Lights_PointGlowSetInfo(&this->lightInfo, this->unk_234[0].x, this->unk_234[0].y + 15.0f, - this->unk_234[0].z, color->r * temp_f2, color->g * temp_f2, color->b * temp_f2, + Lights_PointGlowSetInfo(&this->lightInfo, this->torchPos[0].x, this->torchPos[0].y + 15.0f, + this->torchPos[0].z, color->r * temp_f2, color->g * temp_f2, color->b * temp_f2, 200); } } else { Lights_PointSetColorAndRadius(&this->lightInfo, 0, 0, 0, 0); } - if (!(this->unk_199 & 0x80)) { + if (!(this->sisFlags & EN_POESIS_FLAG80)) { Matrix_Get(&this->unk_2F8); } } @@ -1369,28 +1384,28 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { f32 phi_f20; s32 i; u8 phi_s5; - Color_RGBA8* temp_s1 = &D_80ADD700[this->sisterID]; - Color_RGBA8* temp_s7 = &D_80ADD6F0[this->sisterID]; + Color_RGBA8* temp_s1 = &sTorchFlameColors[this->sisterID]; + Color_RGBA8* temp_s7 = &sTorchLightColors[this->sisterID]; s32 pad2; OPEN_DISPS(play->state.gfxCtx, "../z_en_po_sisters.c", 2989); func_80ADC55C(this); Gfx_SetupDL_25Opa(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx); - if (this->unk_22E.a == 255 || this->unk_22E.a == 0) { - gDPSetEnvColor(POLY_OPA_DISP++, this->unk_22E.r, this->unk_22E.g, this->unk_22E.b, this->unk_22E.a); + if (this->sisColor.a == 255 || this->sisColor.a == 0) { + gDPSetEnvColor(POLY_OPA_DISP++, this->sisColor.r, this->sisColor.g, this->sisColor.b, this->sisColor.a); gSPSegment(POLY_OPA_DISP++, 0x09, D_80116280 + 2); POLY_OPA_DISP = SkelAnime_Draw(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnPoSisters_OverrideLimbDraw, EnPoSisters_PostLimbDraw, &this->actor, POLY_OPA_DISP); } else { - gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, this->unk_22E.a); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, this->sisColor.a); gSPSegment(POLY_XLU_DISP++, 0x09, D_80116280); POLY_XLU_DISP = SkelAnime_Draw(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnPoSisters_OverrideLimbDraw, EnPoSisters_PostLimbDraw, &this->actor, POLY_XLU_DISP); } - if (!(this->unk_199 & 0x80)) { + if (!(this->sisFlags & EN_POESIS_FLAG80)) { Matrix_Put(&this->unk_2F8); MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_en_po_sisters.c", 3034); gSPDisplayList(POLY_OPA_DISP++, gPoSistersTorchDL); @@ -1399,38 +1414,38 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, (play->gameplayFrames * -20) % 512, 0x20, 0x80)); gDPSetEnvColor(POLY_XLU_DISP++, temp_s1->r, temp_s1->g, temp_s1->b, temp_s1->a); - if (this->actionFunc == func_80ADB17C) { - if (this->unk_19A < 32) { - phi_s5 = ((32 - this->unk_19A) * 255) / 32; + if (this->actionFunc == EnPoSister_Die) { + if (this->sisTimer < 32) { + phi_s5 = ((32 - this->sisTimer) * 255) / 32; phi_f20 = 0.0056000003f; } else { - phi_s5 = (this->unk_19A * 255 - 8160) / 32; + phi_s5 = (this->sisTimer * 255 - 8160) / 32; phi_f20 = 0.0027f; } - } else if (this->actionFunc == func_80ADBD38) { - phi_s5 = ((32 - this->unk_19A) * 255) / 32; + } else if (this->actionFunc == EnPoSisters_IntroStep2) { + phi_s5 = ((32 - this->sisTimer) * 255) / 32; phi_f20 = 0.0027f; - } else if (this->actionFunc == func_80ADBEE8) { - phi_s5 = ((32 - this->unk_19A) * 255) / 32; + } else if (this->actionFunc == EnPoSisters_IntroStep4) { + phi_s5 = ((32 - this->sisTimer) * 255) / 32; phi_f20 = 0.0035f; - } else if (this->actionFunc == func_80ADBC88) { + } else if (this->actionFunc == EnPoSisters_IntroStep1) { // phi_s5 initialized in loop below phi_f20 = 0.0027f; } else { // phi_s5 initialized in loop below phi_f20 = this->actor.scale.x * 0.5f; } - for (i = 0; i < this->unk_198; i++) { - if (this->actionFunc != func_80ADB17C && this->actionFunc != func_80ADBD38 && - this->actionFunc != func_80ADBEE8) { + for (i = 0; i < this->torchFlames; i++) { + if (this->actionFunc != EnPoSister_Die && this->actionFunc != EnPoSisters_IntroStep2 && + this->actionFunc != EnPoSisters_IntroStep4) { phi_s5 = -i * 31 + 248; } gDPPipeSync(POLY_XLU_DISP++); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, temp_s7->r, temp_s7->g, temp_s7->b, phi_s5); - Matrix_Translate(this->unk_234[i].x, this->unk_234[i].y, this->unk_234[i].z, MTXMODE_NEW); + Matrix_Translate(this->torchPos[i].x, this->torchPos[i].y, this->torchPos[i].z, MTXMODE_NEW); Matrix_RotateZYX(0, (s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x8000), 0, MTXMODE_APPLY); - if (this->actionFunc == func_80ADAFC0) { - phi_f20 = (this->unk_19A - i) * 0.025f + 0.5f; + if (this->actionFunc == EnPoSisters_ReleaseFlame) { + phi_f20 = (this->sisTimer - i) * 0.025f + 0.5f; phi_f20 = CLAMP(phi_f20, 0.5f, 0.8f) * 0.007f; } Matrix_Scale(phi_f20, phi_f20, phi_f20, MTXMODE_APPLY); diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h index 7dc0a0ce0a..05012f79c8 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h @@ -14,18 +14,18 @@ typedef struct EnPoSisters { /* 0x014C */ SkelAnime skelAnime; /* 0x0190 */ EnPoSistersActionFunc actionFunc; /* 0x0194 */ u8 sisterID; // which Poe sister this is - /* 0x0195 */ u8 unk_195; - /* 0x0196 */ u8 unk_196; - /* 0x0197 */ u8 unk_197; - /* 0x0198 */ u8 unk_198; - /* 0x0199 */ u8 unk_199; - /* 0x019A */ s16 unk_19A; - /* 0x019A */ s16 unk_19C; + /* 0x0195 */ u8 decoyID; // if non-zero, index of Meg's decoy + /* 0x0196 */ u8 hoverPulse; + /* 0x0197 */ u8 vanishTimer; + /* 0x0198 */ u8 torchFlames; // number of torch flames to draw + /* 0x0199 */ u8 sisFlags; // uses EnPoSisFlags + /* 0x019A */ s16 sisTimer; // timer used for various situations + /* 0x019C */ s16 sisVar; // used in different ways, Meg counts her decoys with this /* 0x019E */ Vec3s jointTable[12]; /* 0x01E6 */ Vec3s morphTable[12]; - /* 0x022E */ Color_RGBA8 unk_22E; - /* 0x0234 */ Vec3f unk_234[8]; - /* 0x0294 */ f32 unk_294; + /* 0x022E */ Color_RGBA8 sisColor; // (rgb) for eyes, (a) for rest of body + /* 0x0234 */ Vec3f torchPos[8]; // positions of the torch flame and smaller circling flames + /* 0x0294 */ f32 circleDist; // distance of Meg when circling Link. /* 0x0298 */ LightNode* lightNode; /* 0x029C */ LightInfo lightInfo; /* 0x02AC */ ColliderCylinder collider; @@ -33,11 +33,24 @@ typedef struct EnPoSisters { } EnPoSisters; // size = 0x0338 typedef enum EnPoSisNames{ - EN_PO_SIS_MEG, // purple sister, circles link with decoys - EN_PO_SIS_JOELLE, // red sister, hides in portraits - EN_PO_SIS_BETH, // blue sister, hides in portraits - EN_PO_SIS_AMY, // green sister, hides in block puzzle -}; + EN_POESIS_MEG, // purple sister, circles Link with decoys + EN_POESIS_JOELLE, // red sister, hides in portraits + EN_POESIS_BETH, // blue sister, hides in portraits + EN_POESIS_AMY, // green sister, hides in block puzzle +} EnPoSisNames; +typedef enum EnPoSisFlags{ + EN_POESIS_FLAG01=1<<0, + EN_POESIS_FLAG02=1<<1, + EN_POESIS_FLAG04=1<<2, + EN_POESIS_FLAG08=1<<3, + EN_POESIS_FLAG10=1<<4, + EN_POESIS_FLAG20=1<<5, + EN_POESIS_FLAG40=1<<6, + EN_POESIS_FLAG80=1<<7, +} EnPoSisFlags; + +#define EN_POESIS_DECOY_PARAM 1<<10 // param for Meg's decoys +#define EN_POESIS_INTRO_PARAM 1<<12 // param for Poe Sisters when entering foyer #endif From 4da327188aec06edabe0683fa1ebaf5222bd4a1d Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Sun, 7 Dec 2025 14:33:17 -0500 Subject: [PATCH 03/24] `En_Po_Sisters`: rename some funcs, rename and describe flags --- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 212 +++++++++--------- .../ovl_En_Po_Sisters/z_en_po_sisters.h | 16 +- 2 files changed, 116 insertions(+), 112 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 0bcdc6d658..806432e0a6 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -40,22 +40,22 @@ void func_80ADA4A8(EnPoSisters* this, PlayState* play); void EnPoSisters_FightState1(EnPoSisters* this, PlayState* play); void func_80ADA6A0(EnPoSisters* this, PlayState* play); void func_80ADA7F0(EnPoSisters* this, PlayState* play); -void func_80ADA8C0(EnPoSisters* this, PlayState* play); -void func_80ADA9E8(EnPoSisters* this, PlayState* play); -void func_80ADAAA4(EnPoSisters* this, PlayState* play); -void EnPoSister_Hit(EnPoSisters* this, PlayState* play); +void EnPoSisters_MegFightStep2(EnPoSisters* this, PlayState* play); +void EnPoSisters_OnATHit(EnPoSisters* this, PlayState* play); +void EnPoSisters_Hit(EnPoSisters* this, PlayState* play); +void EnPoSisters_Hit2(EnPoSisters* this, PlayState* play); void EnPoSisters_Vanish(EnPoSisters* this, PlayState* play); void EnPoSisters_Reveal(EnPoSisters* this, PlayState* play); void EnPoSisters_ReleaseFlame(EnPoSisters* this, PlayState* play); -void EnPoSister_Die(EnPoSisters* this, PlayState* play); +void EnPoSisters_Die(EnPoSisters* this, PlayState* play); void EnPoSisters_MegMourns(EnPoSisters* this, PlayState* play); void EnPoSisters_DecoyUpdate(EnPoSisters* this, PlayState* play); void EnPoSisters_SisterInit(EnPoSisters* this, PlayState* play); void EnPoSisters_MegIntroStep1(EnPoSisters* this, PlayState* play); void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play); -void func_80ADB770(EnPoSisters* this, PlayState* play); +void EnPoSisters_MegFightStep1(EnPoSisters* this, PlayState* play); void EnPoSisters_JoelleBethMove(EnPoSisters* this, PlayState* play); -void EnPoSister_JoelleBethWait(EnPoSisters* this, PlayState* play); +void EnPoSisters_JoelleBethWait(EnPoSisters* this, PlayState* play); void EnPoSisters_IntroStep1(EnPoSisters* this, PlayState* play); void EnPoSisters_IntroStep2(EnPoSisters* this, PlayState* play); void EnPoSisters_IntroStep3(EnPoSisters* this, PlayState* play); @@ -156,7 +156,7 @@ static DamageTable sDamageTable = { /* Unknown 2 */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), }; -static s32 D_80ADD784 = 0; +static s32 sIntroVar = 0; static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 7, ICHAIN_CONTINUE), @@ -165,7 +165,8 @@ static InitChainEntry sInitChain[] = { static Vec3f sZeroVector = { 0.0f, 0.0f, 0.0f }; -static s16 D_80ADD79C[4] = { 0xB000, 0xD000, 0x5000, 0x3000 }; +// y-rotations when leaving foyer at end of intro scene +static s16 sIntroExitFacings[4] = { 0xB000, 0xD000, 0x5000, 0x3000 }; // positions for torches to be lit during death cutscene static Vec3s sDeathTorchPos[4] = { @@ -226,7 +227,7 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) { this->hoverPulse = 32; this->vanishTimer = 20; this->torchFlames = 1; - this->sisFlags = EN_POESIS_FLAG20; + this->sisFlags = EN_POESIS_FLAG_TORCH; this->circleDist = 110.0f; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; if (PARAMS_GET_NOSHIFT(this->actor.params, 12, 1)) { @@ -259,14 +260,14 @@ void EnPoSisters_Destroy(Actor* thisx, PlayState* play) { } void EnPoSisters_MoveTorchFlames(EnPoSisters* this, s32 height, Vec3f* pos) { - f32 temp_f20 = SQ(height) * 0.1f; + f32 spread = SQ(height) * 0.1f; Vec3f* vec; s32 i; for (i = 0; i < this->torchFlames; i++) { vec = &this->torchPos[i]; - vec->x = pos->x + Math_SinS((s16)(this->actor.shape.rot.y + (this->sisTimer * 0x800) + i * 0x2000)) * temp_f20; - vec->z = pos->z + Math_CosS((s16)(this->actor.shape.rot.y + (this->sisTimer * 0x800) + i * 0x2000)) * temp_f20; + vec->x = pos->x + Math_SinS((s16)(this->actor.shape.rot.y + (this->sisTimer * 0x800) + i * 0x2000)) * spread; + vec->z = pos->z + Math_CosS((s16)(this->actor.shape.rot.y + (this->sisTimer * 0x800) + i * 0x2000)) * spread; vec->y = pos->y + height; } } @@ -283,7 +284,7 @@ void EnPoSisters_FightSetup(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); } this->sisTimer = Rand_S16Offset(15, 3); - this->sisFlags |= EN_POESIS_FLAG04|EN_POESIS_FLAG02|EN_POESIS_FLAG01; + this->sisFlags |= EN_POESIS_FLAG_VANISH|EN_POESIS_FLAG_ROTATE|EN_POESIS_FLAG_ACCOL; this->actionFunc = EnPoSisters_FightState1; } @@ -299,11 +300,11 @@ void func_80AD944C(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersAttackAnim, -5.0f); this->actor.speed = 0.0f; this->sisTimer = Animation_GetLastFrame(&gPoeSistersAttackAnim) * 3 + 3; - this->sisFlags &= ~EN_POESIS_FLAG02; + this->sisFlags &= ~EN_POESIS_FLAG_ROTATE; this->actionFunc = func_80ADA7F0; } -void func_80AD94E0(EnPoSisters* this) { +void EnPoSisters_MegFightSetup2(EnPoSisters* this) { this->actor.speed = 5.0f; if (this->sisterID == EN_POESIS_MEG) { this->collider.base.colMaterial = COL_MATERIAL_METAL; @@ -312,21 +313,21 @@ void func_80AD94E0(EnPoSisters* this) { } this->sisTimer = 5; this->actor.world.rot.y = this->actor.yawTowardsPlayer; - this->sisFlags |= EN_POESIS_FLAG08; - this->actionFunc = func_80ADA8C0; + this->sisFlags |= EN_POESIS_FLAG_HOVER; + this->actionFunc = EnPoSisters_MegFightStep2; } -void func_80AD9568(EnPoSisters* this) { +void EnPoSisters_OnATHitSetup(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); this->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000; if (this->sisterID != EN_POESIS_MEG) { this->collider.base.colMaterial = COL_MATERIAL_HIT3; this->collider.base.acFlags &= ~AC_HARD; } - this->actionFunc = func_80ADA9E8; + this->actionFunc = EnPoSisters_OnATHit; } -void func_80AD95D8(EnPoSisters* this) { +void EnPoSisters_HitSetup(EnPoSisters* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gPoeSistersDamagedAnim, -3.0f); if (this->collider.base.ac != NULL) { this->actor.world.rot.y = (this->collider.elem.acHitElem->atDmgInfo.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) @@ -336,18 +337,18 @@ void func_80AD95D8(EnPoSisters* this) { if (this->sisterID != EN_POESIS_MEG) { this->actor.speed = 10.0f; } - this->sisFlags &= ~EN_POESIS_FLAG08|EN_POESIS_FLAG02; + this->sisFlags &= ~EN_POESIS_FLAG_HOVER|EN_POESIS_FLAG_ROTATE; Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 16); - this->actionFunc = func_80ADAAA4; + this->actionFunc = EnPoSisters_Hit; } -void EnPoSisters_HitSetup(EnPoSisters* this) { +void EnPoSisters_HitSetup2(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFleeAnim, -3.0f); this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000; this->sisTimer = 5; - this->sisFlags |= EN_POESIS_FLAG08|EN_POESIS_FLAG02|EN_POESIS_FLAG01; + this->sisFlags |= EN_POESIS_FLAG_HOVER|EN_POESIS_FLAG_ROTATE|EN_POESIS_FLAG_ACCOL; this->actor.speed = 5.0f; - this->actionFunc = EnPoSister_Hit; + this->actionFunc = EnPoSisters_Hit2; } void EnPoSisters_SetupVanish(EnPoSisters* this) { @@ -356,7 +357,7 @@ void EnPoSisters_SetupVanish(EnPoSisters* this) { this->actor.speed = 0.0f; this->sisVar = 100; this->actor.world.rot.y = this->actor.shape.rot.y; - this->sisFlags &= ~(EN_POESIS_FLAG04|EN_POESIS_FLAG01); + this->sisFlags &= ~(EN_POESIS_FLAG_VANISH|EN_POESIS_FLAG_ACCOL); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_DISAPPEAR); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); this->actionFunc = EnPoSisters_Vanish; @@ -366,7 +367,7 @@ void EnPoSisters_CircleUpdate(EnPoSisters* this, PlayState* play) { Player* player = GET_PLAYER(play); f32 dist; - if (this->decoyID == 0 || this->actionFunc != func_80ADAAA4) { + if (this->decoyID == 0 || this->actionFunc != EnPoSisters_Hit) { if ((player->meleeWeaponState == 0 || player->meleeWeaponAnimation >= PLAYER_MWA_SPIN_ATTACK_1H) && player->actor.world.pos.y - player->actor.floorHeight < 1.0f) { Math_StepToF(&this->circleDist, 110.0f, 3.0f); @@ -377,6 +378,7 @@ void EnPoSisters_CircleUpdate(EnPoSisters* this, PlayState* play) { } else if (this->decoyID != 0) { dist = this->actor.parent->xzDistToPlayer; } + // possible bug: "dist" is unitallized if above conditions unmet. this->actor.world.pos.x = (Math_SinS(this->actor.shape.rot.y + 0x8000) * dist) + player->actor.world.pos.x; this->actor.world.pos.z = (Math_CosS(this->actor.shape.rot.y + 0x8000) * dist) + player->actor.world.pos.z; } @@ -395,7 +397,7 @@ void EnPoSisters_SetupReveal(EnPoSisters* this, PlayState* play) { this->sisTimer = 15; this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_PO_APPEAR); - this->sisFlags &= ~EN_POESIS_FLAG01; + this->sisFlags &= ~EN_POESIS_FLAG_ACCOL; this->actionFunc = EnPoSisters_Reveal; } @@ -414,7 +416,7 @@ void EnPoSisters_ItemDrop(EnPoSisters* this, PlayState* play) { this->sisTimer = 0; this->actor.world.pos.y = this->torchPos[0].y; Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x80); - this->actionFunc = EnPoSister_Die; + this->actionFunc = EnPoSisters_Die; } /*Meg will spawn 3 decoys and begin weeping. @@ -449,7 +451,7 @@ void EnPoSisters_MegSetup(EnPoSisters* this, PlayState* play) { actor1->parent = &this->actor; Animation_PlayLoop(&this->skelAnime, &gPoeSistersMegCryAnim); this->torchFlames = 0; - this->sisFlags = EN_POESIS_FLAG80|EN_POESIS_FLAG20; + this->sisFlags = EN_POESIS_FLAG_NOMTXF|EN_POESIS_FLAG_TORCH; this->actionFunc = EnPoSisters_MegMourns; } } @@ -460,7 +462,7 @@ void EnPoSisters_DecoySetup(EnPoSisters* this, PlayState* play) { this->actor.draw = NULL; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; this->sisVar = 100; - this->sisFlags = EN_POESIS_FLAG20; + this->sisFlags = EN_POESIS_FLAG_TORCH; this->collider.base.colMaterial = COL_MATERIAL_HIT3; this->collider.base.acFlags &= ~AC_HARD; if (play != NULL) { @@ -483,14 +485,14 @@ void EnPoSisters_SisterSetup(EnPoSisters* this) { Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE_INTERP, 0.0f); } this->sisColor.a = 0; - this->sisFlags = EN_POESIS_FLAG20; + this->sisFlags = EN_POESIS_FLAG_TORCH; this->actionFunc = EnPoSisters_SisterInit; } void EnPoSisters_MegIntroSetup(EnPoSisters* this, PlayState* play) { Animation_MorphToPlayOnce(&this->skelAnime, &gPoeSistersAppearDisappearAnim, -5.0f); this->torchFlames = 1; - this->sisFlags &= ~EN_POESIS_FLAG80; + this->sisFlags &= ~EN_POESIS_FLAG_NOMTXF; this->actionFunc = EnPoSisters_MegIntroStep1; OnePointCutscene_Init(play, 3180, 156, &this->actor, CAM_ID_MAIN); } @@ -511,14 +513,14 @@ void EnPoSisters_MegDecoySetup(EnPoSisters* this) { this->actionFunc = EnPoSisters_MegIntroStep2; } -void func_80AD9F1C(EnPoSisters* this) { +void EnPoSisters_MegFightInit(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); this->sisColor.a = 255; this->sisTimer = 300; this->sisVar = 3; - this->sisFlags |= EN_POESIS_FLAG08|EN_POESIS_FLAG01; + this->sisFlags |= EN_POESIS_FLAG_HOVER|EN_POESIS_FLAG_ACCOL; this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; - this->actionFunc = func_80ADB770; + this->actionFunc = EnPoSisters_MegFightStep1; } void EnPoSisters_JoelleBethInit(EnPoSisters* this) { @@ -531,7 +533,7 @@ void EnPoSisters_JoelleBethInit(EnPoSisters* this) { this->actor.home.pos.z = -3440.0f; } Animation_PlayLoop(&this->skelAnime, &gPoeSistersFloatAnim); - this->sisFlags |= EN_POESIS_FLAG08|EN_POESIS_FLAG02; + this->sisFlags |= EN_POESIS_FLAG_HOVER|EN_POESIS_FLAG_ROTATE; this->actionFunc = EnPoSisters_JoelleBethMove; this->actor.speed = 5.0f; } @@ -539,16 +541,16 @@ void EnPoSisters_JoelleBethInit(EnPoSisters* this) { void EnPoSister_JoelleBethSetupWait(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersSwayAnim, -3.0f); this->sisColor.a = 255; - this->sisFlags |= EN_POESIS_FLAG10|EN_POESIS_FLAG04|EN_POESIS_FLAG01; + this->sisFlags |= EN_POESIS_FLAG_BGCHECK|EN_POESIS_FLAG_VANISH|EN_POESIS_FLAG_ACCOL; this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; - this->actionFunc = EnPoSister_JoelleBethWait; + this->actionFunc = EnPoSisters_JoelleBethWait; this->actor.speed = 0.0f; } void EnPoSisters_IntroSetup(EnPoSisters* this, PlayState* play) { - D_80ADD784 = 0; + sIntroVar = 0; this->sisColor.a = 0; - this->sisFlags = EN_POESIS_FLAG80; + this->sisFlags = EN_POESIS_FLAG_NOMTXF; this->sisTimer = 50; this->torchPos[0] = this->actor.home.pos; Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); @@ -575,7 +577,7 @@ void EnPoSisters_SetupIntro3(EnPoSisters* this) { this->sisTimer = 76; } this->torchFlames = 0; - D_80ADD784 = 0; + sIntroVar = 0; this->actionFunc = EnPoSisters_IntroStep3; } @@ -590,10 +592,10 @@ void EnPoSisters_SetupIntro4(EnPoSisters* this) { void EnPoSisters_SetupIntro5(EnPoSisters* this, PlayState* play) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); this->torchFlames = 0; - this->sisFlags = EN_POESIS_FLAG08|EN_POESIS_FLAG20; + this->sisFlags = EN_POESIS_FLAG_HOVER|EN_POESIS_FLAG_TORCH; this->sisTimer = 90; this->hoverPulse = 32; - this->actor.world.rot.y = D_80ADD79C[this->sisterID]; + this->actor.world.rot.y = sIntroExitFacings[this->sisterID]; this->actor.home.pos.y = this->actor.world.pos.y; if (this->sisterID == EN_POESIS_MEG) { Flags_SetSwitch(play, 0x1B); @@ -602,7 +604,7 @@ void EnPoSisters_SetupIntro5(EnPoSisters* this, PlayState* play) { this->actionFunc = EnPoSisters_IntroStep5; } -void func_80ADA35C(EnPoSisters* this, PlayState* play) { +void EnPoSisters_Hover(EnPoSisters* this, PlayState* play) { f32 targetY; Player* player = GET_PLAYER(play); @@ -621,8 +623,9 @@ void func_80ADA35C(EnPoSisters* this, PlayState* play) { this->hoverPulse--; } this->actor.world.pos.y += (2.0f + 0.5f * Rand_ZeroOne()) * Math_SinS(this->hoverPulse * 0x800); - if (this->sisColor.a == 255 && this->actionFunc != func_80ADA8C0 && this->actionFunc != func_80ADA7F0) { - if (this->actionFunc == EnPoSister_Hit) { + if (this->sisColor.a == 255 && this->actionFunc != EnPoSisters_MegFightStep2 && + this->actionFunc != func_80ADA7F0) { + if (this->actionFunc == EnPoSisters_Hit2) { Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); } else { Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); @@ -653,10 +656,10 @@ void EnPoSisters_FightState1(EnPoSisters* this, PlayState* play) { } if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) { Math_ScaledStepToS(&this->actor.world.rot.y, Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos), - 0x71C); + 1820); } else if (Actor_WorldDistXZToPoint(&this->actor, &this->actor.home.pos) > 300.0f) { Math_ScaledStepToS(&this->actor.world.rot.y, Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos), - 0x71C); + 1820); } } @@ -668,11 +671,11 @@ void func_80ADA6A0(EnPoSisters* this, PlayState* play) { temp_v0 = this->actor.yawTowardsPlayer - player->actor.shape.rot.y; Math_StepToF(&this->actor.speed, 2.0f, 0.2f); if (temp_v0 > 0x3000) { - Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer + 0x3000, 0x71C); + Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer + 0x3000, 1820); } else if (temp_v0 < -0x3000) { - Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer - 0x3000, 0x71C); + Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer - 0x3000, 1820); } else { - Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 0x71C); + Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1820); } if (this->actor.xzDistToPlayer < 160.0f && fabsf(this->actor.yDistToPlayer + 5.0f) < 30.0f) { func_80AD944C(this); @@ -691,11 +694,11 @@ void func_80ADA7F0(EnPoSisters* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_ROLL); } if (this->sisTimer == 0) { - func_80AD94E0(this); + EnPoSisters_MegFightSetup2(this); } } -void func_80ADA8C0(EnPoSisters* this, PlayState* play) { +void EnPoSisters_MegFightStep2(EnPoSisters* this, PlayState* play) { s32 pad; SkelAnime_Update(&this->skelAnime); @@ -718,7 +721,7 @@ void func_80ADA8C0(EnPoSisters* this, PlayState* play) { } } -void func_80ADA9E8(EnPoSisters* this, PlayState* play) { +void EnPoSisters_OnATHit(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); this->actor.shape.rot.y -= (this->actor.speed * 10.0f) * 128.0f; if (Math_StepToF(&this->actor.speed, 0.0f, 0.1f) != 0) { @@ -732,11 +735,11 @@ void func_80ADA9E8(EnPoSisters* this, PlayState* play) { } } -void func_80ADAAA4(EnPoSisters* this, PlayState* play) { +void EnPoSisters_Hit(EnPoSisters* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime) && !(this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW)) { if (this->actor.colChkInfo.health != 0) { if (this->sisterID != EN_POESIS_MEG) { - EnPoSisters_HitSetup(this); + EnPoSisters_HitSetup2(this); } else if (this->decoyID != 0) { EnPoSisters_DecoySetup(this, NULL); } else { @@ -757,7 +760,7 @@ void func_80ADAAA4(EnPoSisters* this, PlayState* play) { } } -void EnPoSister_Hit(EnPoSisters* this, PlayState* play) { +void EnPoSisters_Hit2(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer + 0x8000, 1820); if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisTimer != 0) { @@ -765,7 +768,7 @@ void EnPoSister_Hit(EnPoSisters* this, PlayState* play) { } if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) { this->actor.world.rot.y = this->actor.shape.rot.y; - this->sisFlags |= EN_POESIS_FLAG02; + this->sisFlags |= EN_POESIS_FLAG_ROTATE; EnPoSisters_SetupVanish(this); } else if (this->sisTimer == 0 && 240.0f < this->actor.xzDistToPlayer) { this->actor.world.rot.y = this->actor.shape.rot.y; @@ -790,7 +793,7 @@ void EnPoSisters_Reveal(EnPoSisters* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { this->sisColor.a = 255; if (this->sisterID != EN_POESIS_MEG) { - this->sisFlags |= EN_POESIS_FLAG01; + this->sisFlags |= EN_POESIS_FLAG_ACCOL; this->collider.elem.acDmgInfo.dmgFlags = (DMG_SWORD | DMG_ARROW | DMG_HAMMER | DMG_MAGIC_ICE | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_EXPLOSIVE | DMG_DEKU_STICK); if (this->sisTimer != 0) { @@ -801,7 +804,7 @@ void EnPoSisters_Reveal(EnPoSisters* this, PlayState* play) { EnPoSisters_FightSetup(this); } } else { - func_80AD9F1C(this); + EnPoSisters_MegFightInit(this); } } else { this->sisColor.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; @@ -843,7 +846,7 @@ void EnPoSisters_ReleaseFlame(EnPoSisters* this, PlayState* play) { } } -void EnPoSister_Die(EnPoSisters* this, PlayState* play) { +void EnPoSisters_Die(EnPoSisters* this, PlayState* play) { this->sisTimer++; if (this->sisTimer == 64) { Flags_SetSwitch(play, this->actor.params); @@ -936,7 +939,7 @@ void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play) { if (this->decoyID == 0) { func_800F5ACC(NA_BGM_MINI_BOSS); } - func_80AD9F1C(this); + EnPoSisters_MegFightInit(this); } else { this->actor.world.pos.y += 0.1f; temp = this->decoyID; @@ -970,7 +973,7 @@ void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play) { Actor_SetFocus(&this->actor, 40.0f); } -void func_80ADB770(EnPoSisters* this, PlayState* play) { +void EnPoSisters_MegFightStep1(EnPoSisters* this, PlayState* play) { s32 temp_v0; s32 phi_a0; @@ -986,9 +989,9 @@ void func_80ADB770(EnPoSisters* this, PlayState* play) { (0x580 - (this->sisVar * 0x180)) * fabsf(Math_SinS(this->hoverPulse * 0x800)); } if (this->sisTimer >= 284 || this->sisTimer < 31) { - this->sisFlags |= EN_POESIS_FLAG40; + this->sisFlags |= EN_POESIS_FLAG_SPIN; } else { - this->sisFlags &= ~EN_POESIS_FLAG40; + this->sisFlags &= ~EN_POESIS_FLAG_SPIN; } } else { this->actor.shape.rot.y = (s16)(this->actor.parent->shape.rot.y + (this->decoyID * 0x4000)); @@ -997,32 +1000,32 @@ void func_80ADB770(EnPoSisters* this, PlayState* play) { } if (this->decoyID == 0) { if (this->sisTimer >= 284 || (this->sisTimer < 31 && this->sisTimer >= 16)) { - this->sisFlags |= EN_POESIS_FLAG40; + this->sisFlags |= EN_POESIS_FLAG_SPIN; } else { - this->sisFlags &= ~EN_POESIS_FLAG40; + this->sisFlags &= ~EN_POESIS_FLAG_SPIN; } } if (Actor_WorldDistXZToPoint(&GET_PLAYER(play)->actor, &this->actor.home.pos) > 600.0f) { - this->sisFlags &= ~EN_POESIS_FLAG40; + this->sisFlags &= ~EN_POESIS_FLAG_SPIN; EnPoSisters_DecoySetup(this, play); } else if (this->sisTimer == 0) { if (this->decoyID == 0) { - func_80AD94E0(this); + EnPoSisters_MegFightSetup2(this); } else { EnPoSisters_DecoySetup(this, play); } } else if (this->decoyID != 0) { EnPoSisters* realMeg = (EnPoSisters*)this->actor.parent; - if (realMeg->actionFunc == func_80ADAAA4) { - func_80AD95D8(this); + if (realMeg->actionFunc == EnPoSisters_Hit) { + EnPoSisters_HitSetup(this); } } else if (this->sisVar == 0) { this->sisVar = -15; } else if (this->sisVar < 0) { this->sisVar++; if (this->sisVar == 0) { - func_80AD94E0(this); + EnPoSisters_MegFightSetup2(this); } } EnPoSisters_CircleUpdate(this, play); @@ -1037,7 +1040,7 @@ void EnPoSisters_SisterInit(EnPoSisters* this, PlayState* play) { this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; this->actor.home.pos.x = 1992.0f; this->actor.home.pos.z = -1440.0f; - this->sisFlags |= EN_POESIS_FLAG08|EN_POESIS_FLAG10; + this->sisFlags |= EN_POESIS_FLAG_HOVER|EN_POESIS_FLAG_BGCHECK; EnPoSisters_FightSetup(this); } else { EnPoSisters_JoelleBethInit(this); @@ -1064,7 +1067,7 @@ void EnPoSisters_JoelleBethMove(EnPoSisters* this, PlayState* play) { } /*Joelle and Beth wait at the bottom of the stairs for Link.*/ -void EnPoSister_JoelleBethWait(EnPoSisters* this, PlayState* play) { +void EnPoSisters_JoelleBethWait(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1820); if (this->actor.xzDistToPlayer < 240.0f && fabsf(this->actor.yDistToPlayer + 5.0f) < 30.0f) { @@ -1073,7 +1076,7 @@ void EnPoSister_JoelleBethWait(EnPoSisters* this, PlayState* play) { } void EnPoSisters_IntroStep1(EnPoSisters* this, PlayState* play) { - if (D_80ADD784 != 0 || !Player_InCsMode(play)) { + if (sIntroVar != 0 || !Player_InCsMode(play)) { if (this->sisTimer != 0) { this->sisTimer--; } @@ -1081,7 +1084,7 @@ void EnPoSisters_IntroStep1(EnPoSisters* this, PlayState* play) { if (this->sisterID == EN_POESIS_MEG) { OnePointCutscene_Init(play, 3140, 999, NULL, CAM_ID_MAIN); } - D_80ADD784 = 1; + sIntroVar = 1; } if (this->sisTimer == 0) { EnPoSisters_IntroSetup2(this); @@ -1102,17 +1105,17 @@ void EnPoSisters_IntroStep3(EnPoSisters* this, PlayState* play) { this->sisTimer--; if (this->sisTimer == 0) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_APPEAR); - this->sisFlags &= ~EN_POESIS_FLAG80; + this->sisFlags &= ~EN_POESIS_FLAG_NOMTXF; } if (this->sisTimer <= 0) { if (SkelAnime_Update(&this->skelAnime)) { this->sisColor.a = 255; - D_80ADD784 |= (1 << this->sisterID); + sIntroVar |= (1 << this->sisterID); } else { this->sisColor.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; } } - if (D_80ADD784 == 15) { + if (sIntroVar == 15) { EnPoSisters_SetupIntro4(this); } } @@ -1146,7 +1149,7 @@ void EnPoSisters_IntroStep5(EnPoSisters* this, PlayState* play) { } } -void func_80ADC034(EnPoSisters* this, PlayState* play) { +void EnPoSisters_TickVanish(EnPoSisters* this, PlayState* play) { if (this->actor.isLockedOn && this->sisColor.a == 255) { if (this->vanishTimer != 0) { this->vanishTimer--; @@ -1159,7 +1162,7 @@ void func_80ADC034(EnPoSisters* this, PlayState* play) { this->sisVar--; } } - if (this->actionFunc != func_80ADA7F0 && this->actionFunc != func_80ADA8C0 && this->actionFunc != func_80ADAAA4) { + if (this->actionFunc != func_80ADA7F0 && this->actionFunc != EnPoSisters_MegFightStep2 && this->actionFunc != EnPoSisters_Hit) { if (this->vanishTimer == 0) { EnPoSisters_SetupVanish(this); } else if (this->sisVar == 0 && this->sisColor.a == 0) { @@ -1192,11 +1195,11 @@ void EnPoSisters_CheckDamage(EnPoSisters* this, PlayState* play) { } } else if (this->actor.colChkInfo.damageReaction == POESIS_DMG_REACT_NUT) { this->actor.world.rot.y = this->actor.shape.rot.y; - this->sisFlags |= EN_POESIS_FLAG02; + this->sisFlags |= EN_POESIS_FLAG_ROTATE; EnPoSisters_SetupReveal(this, play); } else if (this->sisterID == EN_POESIS_MEG && this->actor.colChkInfo.damageReaction == POESIS_DMG_REACT_SWORD && - this->actionFunc == func_80ADB770) { + this->actionFunc == EnPoSisters_MegFightStep1) { if (this->sisVar == 0) { this->sisVar = -45; } @@ -1207,7 +1210,7 @@ void EnPoSisters_CheckDamage(EnPoSisters* this, PlayState* play) { Enemy_StartFinishingBlow(play, &this->actor); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_SISTER_DEAD); } - func_80AD95D8(this); + EnPoSisters_HitSetup(this); } } } @@ -1219,20 +1222,20 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) { if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; - func_80AD9568(this); + EnPoSisters_OnATHitSetup(this); } EnPoSisters_CheckDamage(this, play); - if (this->sisFlags & EN_POESIS_FLAG04) { - func_80ADC034(this, play); + if (this->sisFlags & EN_POESIS_FLAG_VANISH) { + EnPoSisters_TickVanish(this, play); } this->actionFunc(this, play); if (this->sisFlags & 0x1F) { - if (this->sisFlags & EN_POESIS_FLAG08) { - func_80ADA35C(this, play); + if (this->sisFlags & EN_POESIS_FLAG_HOVER) { + EnPoSisters_Hover(this, play); } Actor_MoveXZGravity(&this->actor); - if (this->sisFlags & EN_POESIS_FLAG10) { + if (this->sisFlags & EN_POESIS_FLAG_BGCHECK) { Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 0.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2); } else { @@ -1247,27 +1250,28 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) { } Collider_UpdateCylinder(&this->actor, &this->collider); - if (this->actionFunc == func_80ADA8C0 || this->actionFunc == func_80ADA7F0) { + if (this->actionFunc == EnPoSisters_MegFightStep2 || + this->actionFunc == func_80ADA7F0) { this->torchFlames++; this->torchFlames = CLAMP_MAX(this->torchFlames, 8); } else if (this->actionFunc != EnPoSisters_ReleaseFlame) { temp = this->torchFlames - 1; this->torchFlames = CLAMP_MIN(temp, 1); } - if (this->actionFunc == func_80ADA8C0) { + if (this->actionFunc == EnPoSisters_MegFightStep2) { this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT; CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); } - if (this->sisFlags & EN_POESIS_FLAG01) { + if (this->sisFlags & EN_POESIS_FLAG_ACCOL) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); } if (this->actionFunc != EnPoSisters_DecoyUpdate) { CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); } Actor_SetFocus(&this->actor, 40.0f); - if (this->actionFunc == EnPoSister_Hit) { + if (this->actionFunc == EnPoSisters_Hit2) { this->actor.shape.rot.y = this->actor.world.rot.y + 0x8000; - } else if (this->sisFlags & EN_POESIS_FLAG02) { + } else if (this->sisFlags & EN_POESIS_FLAG_ROTATE) { this->actor.shape.rot.y = this->actor.world.rot.y; } } @@ -1314,7 +1318,7 @@ s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve EnPoSisters* this = (EnPoSisters*)thisx; Color_RGBA8* color; - if (limbIndex == 1 && (this->sisFlags & EN_POESIS_FLAG40)) { + if (limbIndex == 1 && (this->sisFlags & EN_POESIS_FLAG_SPIN)) { if (this->sisTimer >= 284) { rot->x += (this->sisTimer * 0x1000) - 0x11C000; } else { @@ -1347,7 +1351,7 @@ void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s gSPDisplayList((*gfxP)++, gPoSistersBurnDL); } if (limbIndex == 8 && this->actionFunc != EnPoSisters_MegMourns) { - if (this->sisFlags & EN_POESIS_FLAG20) { + if (this->sisFlags & EN_POESIS_FLAG_TORCH) { for (i = this->torchFlames - 1; i > 0; i--) { this->torchPos[i] = this->torchPos[i - 1]; } @@ -1359,7 +1363,7 @@ void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s Color_RGBA8* color = &sTorchLightColors[this->sisterID]; f32 temp_f2 = Rand_ZeroOne() * 0.3f + 0.7f; - if (this->actionFunc == EnPoSister_Die || this->actionFunc == EnPoSisters_IntroStep2 || + if (this->actionFunc == EnPoSisters_Die || this->actionFunc == EnPoSisters_IntroStep2 || this->actionFunc == EnPoSisters_IntroStep4) { Lights_PointNoGlowSetInfo(&this->lightInfo, this->torchPos[0].x, this->torchPos[0].y + 15.0f, this->torchPos[0].z, color->r * temp_f2, color->g * temp_f2, @@ -1372,7 +1376,7 @@ void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s } else { Lights_PointSetColorAndRadius(&this->lightInfo, 0, 0, 0, 0); } - if (!(this->sisFlags & EN_POESIS_FLAG80)) { + if (!(this->sisFlags & EN_POESIS_FLAG_NOMTXF)) { Matrix_Get(&this->unk_2F8); } } @@ -1405,7 +1409,7 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { SkelAnime_Draw(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnPoSisters_OverrideLimbDraw, EnPoSisters_PostLimbDraw, &this->actor, POLY_XLU_DISP); } - if (!(this->sisFlags & EN_POESIS_FLAG80)) { + if (!(this->sisFlags & EN_POESIS_FLAG_NOMTXF)) { Matrix_Put(&this->unk_2F8); MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_en_po_sisters.c", 3034); gSPDisplayList(POLY_OPA_DISP++, gPoSistersTorchDL); @@ -1414,7 +1418,7 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, (play->gameplayFrames * -20) % 512, 0x20, 0x80)); gDPSetEnvColor(POLY_XLU_DISP++, temp_s1->r, temp_s1->g, temp_s1->b, temp_s1->a); - if (this->actionFunc == EnPoSister_Die) { + if (this->actionFunc == EnPoSisters_Die) { if (this->sisTimer < 32) { phi_s5 = ((32 - this->sisTimer) * 255) / 32; phi_f20 = 0.0056000003f; @@ -1436,7 +1440,7 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { phi_f20 = this->actor.scale.x * 0.5f; } for (i = 0; i < this->torchFlames; i++) { - if (this->actionFunc != EnPoSister_Die && this->actionFunc != EnPoSisters_IntroStep2 && + if (this->actionFunc != EnPoSisters_Die && this->actionFunc != EnPoSisters_IntroStep2 && this->actionFunc != EnPoSisters_IntroStep4) { phi_s5 = -i * 31 + 248; } diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h index 05012f79c8..7701a844a8 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h @@ -40,14 +40,14 @@ typedef enum EnPoSisNames{ } EnPoSisNames; typedef enum EnPoSisFlags{ - EN_POESIS_FLAG01=1<<0, - EN_POESIS_FLAG02=1<<1, - EN_POESIS_FLAG04=1<<2, - EN_POESIS_FLAG08=1<<3, - EN_POESIS_FLAG10=1<<4, - EN_POESIS_FLAG20=1<<5, - EN_POESIS_FLAG40=1<<6, - EN_POESIS_FLAG80=1<<7, + EN_POESIS_FLAG_ACCOL=1<<0, // set AC collision + EN_POESIS_FLAG_ROTATE=1<<1, // set shape.rot.y to world.rot.y + EN_POESIS_FLAG_VANISH=1<<2, // tick vanishTimer, then disappear if 0. + EN_POESIS_FLAG_HOVER=1<<3, // hover up and down a few inches + EN_POESIS_FLAG_BGCHECK=1<<4,// BGCheck floors and walls + EN_POESIS_FLAG_TORCH=1<<5, // manipulate torch flames + EN_POESIS_FLAG_SPIN=1<<6, // the real Meg spins as a tell + EN_POESIS_FLAG_NOMTXF=1<<7, //don't read or write unk_2F8 } EnPoSisFlags; #define EN_POESIS_DECOY_PARAM 1<<10 // param for Meg's decoys From b7296f966db9f5f0993a84624759e645f59a3112 Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Sun, 7 Dec 2025 18:43:58 -0500 Subject: [PATCH 04/24] `En_po_Sisters`: nearly all funcs and vars labeled --- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 185 +++++++++--------- .../ovl_En_Po_Sisters/z_en_po_sisters.h | 10 +- 2 files changed, 101 insertions(+), 94 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 806432e0a6..d51329a3fb 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -36,10 +36,10 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play); void EnPoSisters_Draw(Actor* thisx, PlayState* play); void EnPoSisters_IntroSetup(EnPoSisters* this, PlayState* play); -void func_80ADA4A8(EnPoSisters* this, PlayState* play); +void EnPoSisters_FightState3(EnPoSisters* this, PlayState* play); void EnPoSisters_FightState1(EnPoSisters* this, PlayState* play); -void func_80ADA6A0(EnPoSisters* this, PlayState* play); -void func_80ADA7F0(EnPoSisters* this, PlayState* play); +void EnPoSisters_FightState2(EnPoSisters* this, PlayState* play); +void EnPoSisters_FightState4(EnPoSisters* this, PlayState* play); void EnPoSisters_MegFightStep2(EnPoSisters* this, PlayState* play); void EnPoSisters_OnATHit(EnPoSisters* this, PlayState* play); void EnPoSisters_Hit(EnPoSisters* this, PlayState* play); @@ -49,7 +49,7 @@ void EnPoSisters_Reveal(EnPoSisters* this, PlayState* play); void EnPoSisters_ReleaseFlame(EnPoSisters* this, PlayState* play); void EnPoSisters_Die(EnPoSisters* this, PlayState* play); void EnPoSisters_MegMourns(EnPoSisters* this, PlayState* play); -void EnPoSisters_DecoyUpdate(EnPoSisters* this, PlayState* play); +void EnPoSisters_MegUpdate(EnPoSisters* this, PlayState* play); void EnPoSisters_SisterInit(EnPoSisters* this, PlayState* play); void EnPoSisters_MegIntroStep1(EnPoSisters* this, PlayState* play); void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play); @@ -200,7 +200,7 @@ static Color_RGBA8 D_80ADD7E8[4] = { { 70, 70, 0, 0 }, }; -static Vec3f D_80ADD7F8 = { 1000.0f, -1700.0f, 0.0f }; +static Vec3f sTorchVec = { 1000.0f, -1700.0f, 0.0f }; void EnPoSisters_Init(Actor* thisx, PlayState* play) { EnPoSisters* this = (EnPoSisters*)thisx; @@ -272,15 +272,15 @@ void EnPoSisters_MoveTorchFlames(EnPoSisters* this, s32 height, Vec3f* pos) { } } -void func_80AD9368(EnPoSisters* this) { +void EnPoSisters_FightSetup3(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersSwayAnim, -3.0f); this->sisTimer = Rand_S16Offset(2, 3); - this->actionFunc = func_80ADA4A8; + this->actionFunc = EnPoSisters_FightState3; this->actor.speed = 0.0f; } void EnPoSisters_FightSetup(EnPoSisters* this) { - if (this->actionFunc != func_80ADA6A0) { + if (this->actionFunc != EnPoSisters_FightState2) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); } this->sisTimer = Rand_S16Offset(15, 3); @@ -288,11 +288,11 @@ void EnPoSisters_FightSetup(EnPoSisters* this) { this->actionFunc = EnPoSisters_FightState1; } -void func_80AD943C(EnPoSisters* this) { - this->actionFunc = func_80ADA6A0; +void EnPoSisters_FightSetup2(EnPoSisters* this) { + this->actionFunc = EnPoSisters_FightState2; } -void func_80AD944C(EnPoSisters* this) { +void EnPoSisters_FightSetup4(EnPoSisters* this) { if (this->sisColor.a != 0) { this->collider.base.colMaterial = COL_MATERIAL_METAL; this->collider.base.acFlags |= AC_HARD; @@ -301,7 +301,7 @@ void func_80AD944C(EnPoSisters* this) { this->actor.speed = 0.0f; this->sisTimer = Animation_GetLastFrame(&gPoeSistersAttackAnim) * 3 + 3; this->sisFlags &= ~EN_POESIS_FLAG_ROTATE; - this->actionFunc = func_80ADA7F0; + this->actionFunc = EnPoSisters_FightState4; } void EnPoSisters_MegFightSetup2(EnPoSisters* this) { @@ -355,7 +355,7 @@ void EnPoSisters_SetupVanish(EnPoSisters* this) { Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 1.5f, 0.0f, Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE, -3.0f); this->actor.speed = 0.0f; - this->sisVar = 100; + this->megVar = 100; this->actor.world.rot.y = this->actor.shape.rot.y; this->sisFlags &= ~(EN_POESIS_FLAG_VANISH|EN_POESIS_FLAG_ACCOL); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_DISAPPEAR); @@ -461,7 +461,7 @@ void EnPoSisters_DecoySetup(EnPoSisters* this, PlayState* play) { this->actor.draw = NULL; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; - this->sisVar = 100; + this->megVar = 100; this->sisFlags = EN_POESIS_FLAG_TORCH; this->collider.base.colMaterial = COL_MATERIAL_HIT3; this->collider.base.acFlags &= ~AC_HARD; @@ -473,7 +473,7 @@ void EnPoSisters_DecoySetup(EnPoSisters* this, PlayState* play) { 0); } Lights_PointSetColorAndRadius(&this->lightInfo, 0, 0, 0, 0); - this->actionFunc = EnPoSisters_DecoyUpdate; + this->actionFunc = EnPoSisters_MegUpdate; } void EnPoSisters_SisterSetup(EnPoSisters* this) { @@ -517,7 +517,7 @@ void EnPoSisters_MegFightInit(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); this->sisColor.a = 255; this->sisTimer = 300; - this->sisVar = 3; + this->megVar = 3; this->sisFlags |= EN_POESIS_FLAG_HOVER|EN_POESIS_FLAG_ACCOL; this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; this->actionFunc = EnPoSisters_MegFightStep1; @@ -624,7 +624,7 @@ void EnPoSisters_Hover(EnPoSisters* this, PlayState* play) { } this->actor.world.pos.y += (2.0f + 0.5f * Rand_ZeroOne()) * Math_SinS(this->hoverPulse * 0x800); if (this->sisColor.a == 255 && this->actionFunc != EnPoSisters_MegFightStep2 && - this->actionFunc != func_80ADA7F0) { + this->actionFunc != EnPoSisters_FightState4) { if (this->actionFunc == EnPoSisters_Hit2) { Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); } else { @@ -633,7 +633,7 @@ void EnPoSisters_Hover(EnPoSisters* this, PlayState* play) { } } -void func_80ADA4A8(EnPoSisters* this, PlayState* play) { +void EnPoSisters_FightState3(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisTimer != 0) { this->sisTimer--; @@ -650,9 +650,9 @@ void EnPoSisters_FightState1(EnPoSisters* this, PlayState* play) { this->sisTimer--; } if (this->actor.xzDistToPlayer < 200.0f && fabsf(this->actor.yDistToPlayer + 5.0f) < 30.0f) { - func_80AD943C(this); + EnPoSisters_FightSetup2(this); } else if (this->sisTimer == 0 && Math_StepToF(&this->actor.speed, 0.0f, 0.2f) != 0) { - func_80AD9368(this); + EnPoSisters_FightSetup3(this); } if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) { Math_ScaledStepToS(&this->actor.world.rot.y, Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos), @@ -663,7 +663,7 @@ void EnPoSisters_FightState1(EnPoSisters* this, PlayState* play) { } } -void func_80ADA6A0(EnPoSisters* this, PlayState* play) { +void EnPoSisters_FightState2(EnPoSisters* this, PlayState* play) { Player* player = GET_PLAYER(play); s16 temp_v0; @@ -678,13 +678,13 @@ void func_80ADA6A0(EnPoSisters* this, PlayState* play) { Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1820); } if (this->actor.xzDistToPlayer < 160.0f && fabsf(this->actor.yDistToPlayer + 5.0f) < 30.0f) { - func_80AD944C(this); + EnPoSisters_FightSetup4(this); } else if (this->actor.xzDistToPlayer > 240.0f) { EnPoSisters_FightSetup(this); } } -void func_80ADA7F0(EnPoSisters* this, PlayState* play) { +void EnPoSisters_FightState4(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (this->sisTimer != 0) { this->sisTimer--; @@ -814,7 +814,7 @@ void EnPoSisters_Reveal(EnPoSisters* this, PlayState* play) { } } -/*animate the torch flame after dealing the killing blow*/ +/* animate the torch flame after dealing the killing blow */ void EnPoSisters_ReleaseFlame(EnPoSisters* this, PlayState* play) { s32 i; @@ -846,6 +846,7 @@ void EnPoSisters_ReleaseFlame(EnPoSisters* this, PlayState* play) { } } +/* Show the flame moving back to the proper torch */ void EnPoSisters_Die(EnPoSisters* this, PlayState* play) { this->sisTimer++; if (this->sisTimer == 64) { @@ -869,7 +870,7 @@ void EnPoSisters_Die(EnPoSisters* this, PlayState* play) { } } -/*Meg weeps as she is the last remaining sister until Link aproaches*/ +/* Meg weeps as she is the last remaining sister until Link aproaches */ void EnPoSisters_MegMourns(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (this->actor.xzDistToPlayer < 130.0f) { @@ -881,19 +882,20 @@ void EnPoSisters_MegMourns(EnPoSisters* this, PlayState* play) { this->actor.shape.rot.y = this->actor.yawTowardsPlayer; } -void EnPoSisters_DecoyUpdate(EnPoSisters* this, PlayState* play) { +/* Upate func for Meg and her decoys */ +void EnPoSisters_MegUpdate(EnPoSisters* this, PlayState* play) { Player* player = GET_PLAYER(play); EnPoSisters* realMeg = (EnPoSisters*)this->actor.parent; if (this->decoyID == 0) { if (Actor_WorldDistXZToPoint(&player->actor, &this->actor.home.pos) < 600.0f) { - if (this->sisVar != 0) { - this->sisVar--; + if (this->megVar != 0) { + this->megVar--; } } else { - this->sisVar = 100; + this->megVar = 100; } - if (this->sisVar == 0) { + if (this->megVar == 0) { this->actor.shape.rot.y = (s32)(4.0f * Rand_ZeroOne()) * 0x4000 + this->actor.yawTowardsPlayer; this->actor.world.pos.y = player->actor.world.pos.y + 5.0f; EnPoSisters_SetupReveal(this, play); @@ -907,7 +909,7 @@ void EnPoSisters_DecoyUpdate(EnPoSisters* this, PlayState* play) { this->actor.world.pos.y = player->actor.world.pos.y + 5.0f; EnPoSisters_SetupReveal(this, play); } else if (realMeg->actionFunc == EnPoSisters_ReleaseFlame) { - Actor_Kill(&this->actor); + Actor_Kill(&this->actor); // destroy the decoys once Meg's defeated } } } @@ -926,7 +928,7 @@ void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play) { f32 temp_f2; s16 sign; s16 step; - u8 temp; + u8 ID; SkelAnime_Update(&this->skelAnime); temp_f2 = this->skelAnime.endFrame * 0.5f; @@ -942,8 +944,8 @@ void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play) { EnPoSisters_MegFightInit(this); } else { this->actor.world.pos.y += 0.1f; - temp = this->decoyID; - if (temp != 0) { + ID = this->decoyID; + if (ID != 0) { if (this->sisTimer > 90) { sign = 1; step = 64; @@ -961,7 +963,7 @@ void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play) { step = 256; } if (this->decoyID == 2) { - step *= 2; + step *= 2; // second decoy shows up further to her right, first on Link's left } Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.parent->shape.rot.y + (this->decoyID * 0x4000) * sign, step); @@ -980,13 +982,13 @@ void EnPoSisters_MegFightStep1(EnPoSisters* this, PlayState* play) { if (this->sisTimer != 0) { this->sisTimer--; } - if (this->sisVar > 0) { + if (this->megVar > 0) { if (this->sisTimer >= 16) { SkelAnime_Update(&this->skelAnime); if (this->decoyID == 0) { if (ABS((s16)(16 - this->hoverPulse)) < 14) { this->actor.shape.rot.y += - (0x580 - (this->sisVar * 0x180)) * fabsf(Math_SinS(this->hoverPulse * 0x800)); + (0x580 - (this->megVar * 0x180)) * fabsf(Math_SinS(this->hoverPulse * 0x800)); } if (this->sisTimer >= 284 || this->sisTimer < 31) { this->sisFlags |= EN_POESIS_FLAG_SPIN; @@ -1020,11 +1022,11 @@ void EnPoSisters_MegFightStep1(EnPoSisters* this, PlayState* play) { if (realMeg->actionFunc == EnPoSisters_Hit) { EnPoSisters_HitSetup(this); } - } else if (this->sisVar == 0) { - this->sisVar = -15; - } else if (this->sisVar < 0) { - this->sisVar++; - if (this->sisVar == 0) { + } else if (this->megVar == 0) { + this->megVar = -15; + } else if (this->megVar < 0) { + this->megVar++; + if (this->megVar == 0) { EnPoSisters_MegFightSetup2(this); } } @@ -1036,7 +1038,7 @@ void EnPoSisters_SisterInit(EnPoSisters* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { this->sisColor.a = 255; - if (this->sisterID == ) { + if (this->sisterID == EN_POESIS_AMY) { this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; this->actor.home.pos.x = 1992.0f; this->actor.home.pos.z = -1440.0f; @@ -1055,7 +1057,7 @@ void EnPoSisters_SisterInit(EnPoSisters* this, PlayState* play) { Actor_SetFocus(&this->actor, 40.0f); } -/*Joelle and Beth move to thier respective worldspace marks once revealed*/ +/* Joelle and Beth move to thier respective worldspace marks once revealed */ void EnPoSisters_JoelleBethMove(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (Actor_WorldDistXZToPoint(&this->actor, &this->actor.home.pos) < 10.0f) { @@ -1066,7 +1068,7 @@ void EnPoSisters_JoelleBethMove(EnPoSisters* this, PlayState* play) { } } -/*Joelle and Beth wait at the bottom of the stairs for Link.*/ +/* Joelle and Beth wait at the bottom of the stairs for Link. */ void EnPoSisters_JoelleBethWait(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1820); @@ -1158,14 +1160,16 @@ void EnPoSisters_TickVanish(EnPoSisters* this, PlayState* play) { this->vanishTimer = 20; } if (this->sisColor.a == 0) { - if (this->sisVar != 0) { - this->sisVar--; + if (this->megVar != 0) { + this->megVar--; } } - if (this->actionFunc != func_80ADA7F0 && this->actionFunc != EnPoSisters_MegFightStep2 && this->actionFunc != EnPoSisters_Hit) { + if (this->actionFunc != EnPoSisters_FightState4 && + this->actionFunc != EnPoSisters_MegFightStep2 && + this->actionFunc != EnPoSisters_Hit) { if (this->vanishTimer == 0) { EnPoSisters_SetupVanish(this); - } else if (this->sisVar == 0 && this->sisColor.a == 0) { + } else if (this->megVar == 0 && this->sisColor.a == 0) { EnPoSisters_SetupReveal(this, play); } } @@ -1178,7 +1182,7 @@ void EnPoSisters_CheckDamage(EnPoSisters* this, PlayState* play) { this->collider.base.acFlags &= ~AC_HIT; Actor_SetDropFlag(&this->actor, &this->collider.elem, true); if (this->decoyID != 0) { - ((EnPoSisters*)this->actor.parent)->sisVar--; + ((EnPoSisters*)this->actor.parent)->megVar--; Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); EnPoSisters_DecoySetup(this, play); if (Rand_ZeroOne() < 0.2f) { @@ -1200,8 +1204,8 @@ void EnPoSisters_CheckDamage(EnPoSisters* this, PlayState* play) { } else if (this->sisterID == EN_POESIS_MEG && this->actor.colChkInfo.damageReaction == POESIS_DMG_REACT_SWORD && this->actionFunc == EnPoSisters_MegFightStep1) { - if (this->sisVar == 0) { - this->sisVar = -45; + if (this->megVar == 0) { + this->megVar = -45; } } else { if (Actor_ApplyDamage(&this->actor) != 0) { @@ -1229,7 +1233,7 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) { EnPoSisters_TickVanish(this, play); } this->actionFunc(this, play); - if (this->sisFlags & 0x1F) { + if (this->sisFlags & EN_POESIS_FLAG_UPDATEMASK) { if (this->sisFlags & EN_POESIS_FLAG_HOVER) { EnPoSisters_Hover(this, play); } @@ -1251,7 +1255,7 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) { Collider_UpdateCylinder(&this->actor, &this->collider); if (this->actionFunc == EnPoSisters_MegFightStep2 || - this->actionFunc == func_80ADA7F0) { + this->actionFunc == EnPoSisters_FightState4) { this->torchFlames++; this->torchFlames = CLAMP_MAX(this->torchFlames, 8); } else if (this->actionFunc != EnPoSisters_ReleaseFlame) { @@ -1265,7 +1269,7 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) { if (this->sisFlags & EN_POESIS_FLAG_ACCOL) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); } - if (this->actionFunc != EnPoSisters_DecoyUpdate) { + if (this->actionFunc != EnPoSisters_MegUpdate) { CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); } Actor_SetFocus(&this->actor, 40.0f); @@ -1277,19 +1281,19 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) { } } -void func_80ADC55C(EnPoSisters* this) { - s16 temp_var; +void EnPoSisters_TintEyes(EnPoSisters* this) { + s16 temp_b; if (this->skelAnime.animation == &gPoeSistersAttackAnim) { this->sisColor.r = CLAMP_MAX((s16)(this->sisColor.r + 5), 255); this->sisColor.g = CLAMP_MIN((s16)(this->sisColor.g - 5), 50); - temp_var = this->sisColor.b - 5; - this->sisColor.b = CLAMP_MIN(temp_var, 0); + temp_b = this->sisColor.b - 5; + this->sisColor.b = CLAMP_MIN(temp_b, 0); } else if (this->skelAnime.animation == &gPoeSistersFleeAnim) { this->sisColor.r = CLAMP_MAX((s16)(this->sisColor.r + 5), 80); this->sisColor.g = CLAMP_MAX((s16)(this->sisColor.g + 5), 255); - temp_var = this->sisColor.b + 5; - this->sisColor.b = CLAMP_MAX(temp_var, 225); + temp_b = this->sisColor.b + 5; + this->sisColor.b = CLAMP_MAX(temp_b, 225); } else if (this->skelAnime.animation == &gPoeSistersDamagedAnim) { if (this->actor.colorFilterTimer & 2) { this->sisColor.r = 0; @@ -1304,11 +1308,11 @@ void func_80ADC55C(EnPoSisters* this) { this->sisColor.r = CLAMP_MAX((s16)(this->sisColor.r + 5), 255); this->sisColor.g = CLAMP_MAX((s16)(this->sisColor.g + 5), 255); if (this->sisColor.b > 210) { - temp_var = this->sisColor.b - 5; - this->sisColor.b = CLAMP_MIN(temp_var, 210); + temp_b = this->sisColor.b - 5; + this->sisColor.b = CLAMP_MIN(temp_b, 210); } else { - temp_var = this->sisColor.b + 5; - this->sisColor.b = CLAMP_MAX(temp_var, 210); + temp_b = this->sisColor.b + 5; + this->sisColor.b = CLAMP_MAX(temp_b, 210); } } } @@ -1325,7 +1329,8 @@ s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve rot->x += (this->sisTimer * 0x1000) - 0xF000; } } - if (this->sisColor.a == 0 || limbIndex == 8 || (this->actionFunc == EnPoSisters_ReleaseFlame && this->sisTimer >= 8)) { + if (this->sisColor.a == 0 || limbIndex == 8 || + (this->actionFunc == EnPoSisters_ReleaseFlame && this->sisTimer >= 8)) { *dList = NULL; } else if (limbIndex == 9) { *dList = sSisterBodies[this->sisterID]; @@ -1355,9 +1360,9 @@ void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s for (i = this->torchFlames - 1; i > 0; i--) { this->torchPos[i] = this->torchPos[i - 1]; } - Matrix_MultVec3f(&D_80ADD7F8, &this->torchPos[0]); + Matrix_MultVec3f(&sTorchVec, &this->torchPos[0]); } else if (this->actionFunc == EnPoSisters_IntroStep3) { - Matrix_MultVec3f(&D_80ADD7F8, &this->actor.home.pos); + Matrix_MultVec3f(&sTorchVec, &this->actor.home.pos); } if (this->torchFlames > 0) { Color_RGBA8* color = &sTorchLightColors[this->sisterID]; @@ -1377,7 +1382,7 @@ void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s Lights_PointSetColorAndRadius(&this->lightInfo, 0, 0, 0, 0); } if (!(this->sisFlags & EN_POESIS_FLAG_NOMTXF)) { - Matrix_Get(&this->unk_2F8); + Matrix_Get(&this->torchMtx); } } } @@ -1385,15 +1390,15 @@ void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s void EnPoSisters_Draw(Actor* thisx, PlayState* play) { EnPoSisters* this = (EnPoSisters*)thisx; s32 pad1; - f32 phi_f20; + f32 scale; s32 i; - u8 phi_s5; + u8 alpha; Color_RGBA8* temp_s1 = &sTorchFlameColors[this->sisterID]; Color_RGBA8* temp_s7 = &sTorchLightColors[this->sisterID]; s32 pad2; OPEN_DISPS(play->state.gfxCtx, "../z_en_po_sisters.c", 2989); - func_80ADC55C(this); + EnPoSisters_TintEyes(this); Gfx_SetupDL_25Opa(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx); if (this->sisColor.a == 255 || this->sisColor.a == 0) { @@ -1410,7 +1415,7 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { EnPoSisters_PostLimbDraw, &this->actor, POLY_XLU_DISP); } if (!(this->sisFlags & EN_POESIS_FLAG_NOMTXF)) { - Matrix_Put(&this->unk_2F8); + Matrix_Put(&this->torchMtx); MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_en_po_sisters.c", 3034); gSPDisplayList(POLY_OPA_DISP++, gPoSistersTorchDL); } @@ -1420,39 +1425,39 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { gDPSetEnvColor(POLY_XLU_DISP++, temp_s1->r, temp_s1->g, temp_s1->b, temp_s1->a); if (this->actionFunc == EnPoSisters_Die) { if (this->sisTimer < 32) { - phi_s5 = ((32 - this->sisTimer) * 255) / 32; - phi_f20 = 0.0056000003f; + alpha = ((32 - this->sisTimer) * 255) / 32; + scale = 0.0056000003f; } else { - phi_s5 = (this->sisTimer * 255 - 8160) / 32; - phi_f20 = 0.0027f; + alpha = (this->sisTimer * 255 - 8160) / 32; + scale = 0.0027f; } } else if (this->actionFunc == EnPoSisters_IntroStep2) { - phi_s5 = ((32 - this->sisTimer) * 255) / 32; - phi_f20 = 0.0027f; + alpha = ((32 - this->sisTimer) * 255) / 32; + scale = 0.0027f; } else if (this->actionFunc == EnPoSisters_IntroStep4) { - phi_s5 = ((32 - this->sisTimer) * 255) / 32; - phi_f20 = 0.0035f; + alpha = ((32 - this->sisTimer) * 255) / 32; + scale = 0.0035f; } else if (this->actionFunc == EnPoSisters_IntroStep1) { - // phi_s5 initialized in loop below - phi_f20 = 0.0027f; + // alpha initialized in loop below + scale = 0.0027f; } else { - // phi_s5 initialized in loop below - phi_f20 = this->actor.scale.x * 0.5f; + // alpha initialized in loop below + scale = this->actor.scale.x * 0.5f; } for (i = 0; i < this->torchFlames; i++) { if (this->actionFunc != EnPoSisters_Die && this->actionFunc != EnPoSisters_IntroStep2 && this->actionFunc != EnPoSisters_IntroStep4) { - phi_s5 = -i * 31 + 248; + alpha = -i * 31 + 248; } gDPPipeSync(POLY_XLU_DISP++); - gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, temp_s7->r, temp_s7->g, temp_s7->b, phi_s5); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, temp_s7->r, temp_s7->g, temp_s7->b, alpha); Matrix_Translate(this->torchPos[i].x, this->torchPos[i].y, this->torchPos[i].z, MTXMODE_NEW); Matrix_RotateZYX(0, (s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x8000), 0, MTXMODE_APPLY); if (this->actionFunc == EnPoSisters_ReleaseFlame) { - phi_f20 = (this->sisTimer - i) * 0.025f + 0.5f; - phi_f20 = CLAMP(phi_f20, 0.5f, 0.8f) * 0.007f; + scale = (this->sisTimer - i) * 0.025f + 0.5f; + scale = CLAMP(scale, 0.5f, 0.8f) * 0.007f; } - Matrix_Scale(phi_f20, phi_f20, phi_f20, MTXMODE_APPLY); + Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_en_po_sisters.c", 3132); gSPDisplayList(POLY_XLU_DISP++, gEffFire1DL); } diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h index 7701a844a8..a56ba9daa3 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h @@ -20,7 +20,7 @@ typedef struct EnPoSisters { /* 0x0198 */ u8 torchFlames; // number of torch flames to draw /* 0x0199 */ u8 sisFlags; // uses EnPoSisFlags /* 0x019A */ s16 sisTimer; // timer used for various situations - /* 0x019C */ s16 sisVar; // used in different ways, Meg counts her decoys with this + /* 0x019C */ s16 megVar; // Meg and her decoys use it as a behaviour timer /* 0x019E */ Vec3s jointTable[12]; /* 0x01E6 */ Vec3s morphTable[12]; /* 0x022E */ Color_RGBA8 sisColor; // (rgb) for eyes, (a) for rest of body @@ -29,7 +29,7 @@ typedef struct EnPoSisters { /* 0x0298 */ LightNode* lightNode; /* 0x029C */ LightInfo lightInfo; /* 0x02AC */ ColliderCylinder collider; - /* 0x02F8 */ MtxF unk_2F8; + /* 0x02F8 */ MtxF torchMtx; } EnPoSisters; // size = 0x0338 typedef enum EnPoSisNames{ @@ -45,12 +45,14 @@ typedef enum EnPoSisFlags{ EN_POESIS_FLAG_VANISH=1<<2, // tick vanishTimer, then disappear if 0. EN_POESIS_FLAG_HOVER=1<<3, // hover up and down a few inches EN_POESIS_FLAG_BGCHECK=1<<4,// BGCheck floors and walls + EN_POESIS_FLAG_UPDATEMASK=(EN_POESIS_FLAG_ACCOL|EN_POESIS_FLAG_ROTATE| + EN_POESIS_FLAG_VANISH|EN_POESIS_FLAG_HOVER|EN_POESIS_FLAG_BGCHECK), EN_POESIS_FLAG_TORCH=1<<5, // manipulate torch flames EN_POESIS_FLAG_SPIN=1<<6, // the real Meg spins as a tell - EN_POESIS_FLAG_NOMTXF=1<<7, //don't read or write unk_2F8 + EN_POESIS_FLAG_NOMTXF=1<<7, //don't read or write torchMtx } EnPoSisFlags; #define EN_POESIS_DECOY_PARAM 1<<10 // param for Meg's decoys -#define EN_POESIS_INTRO_PARAM 1<<12 // param for Poe Sisters when entering foyer +#define EN_POESIS_INTRO_PARAM 1<<12 // param for Poe Sisters when first entering foyer #endif From 5a522a366279ceeb236e04815143fc077d2a1d41 Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Sun, 7 Dec 2025 18:47:55 -0500 Subject: [PATCH 05/24] Update z_en_po_sisters.c a few more renames --- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index d51329a3fb..77143dcbd3 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -193,7 +193,7 @@ static Gfx* sSisterFaces[4] = { gPoSistersAmyFaceDL, }; -static Color_RGBA8 D_80ADD7E8[4] = { +static Color_RGBA8 sLimb11Colors[4] = { { 80, 0, 100, 0 }, { 80, 15, 0, 0 }, { 0, 70, 50, 0 }, @@ -665,14 +665,14 @@ void EnPoSisters_FightState1(EnPoSisters* this, PlayState* play) { void EnPoSisters_FightState2(EnPoSisters* this, PlayState* play) { Player* player = GET_PLAYER(play); - s16 temp_v0; + s16 yawDiff; SkelAnime_Update(&this->skelAnime); - temp_v0 = this->actor.yawTowardsPlayer - player->actor.shape.rot.y; + yawDiff = this->actor.yawTowardsPlayer - player->actor.shape.rot.y; Math_StepToF(&this->actor.speed, 2.0f, 0.2f); - if (temp_v0 > 0x3000) { + if (yawDiff > 0x3000) { Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer + 0x3000, 1820); - } else if (temp_v0 < -0x3000) { + } else if (yawDiff < -0x3000) { Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer - 0x3000, 1820); } else { Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1820); @@ -1176,7 +1176,7 @@ void EnPoSisters_TickVanish(EnPoSisters* this, PlayState* play) { } void EnPoSisters_CheckDamage(EnPoSisters* this, PlayState* play) { - Vec3f sp24; + Vec3f itemPos; if (this->collider.base.acFlags & AC_HIT) { this->collider.base.acFlags &= ~AC_HIT; @@ -1186,10 +1186,10 @@ void EnPoSisters_CheckDamage(EnPoSisters* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); EnPoSisters_DecoySetup(this, play); if (Rand_ZeroOne() < 0.2f) { - sp24.x = this->actor.world.pos.x; - sp24.y = this->actor.world.pos.y; - sp24.z = this->actor.world.pos.z; - Item_DropCollectible(play, &sp24, ITEM00_ARROWS_SMALL); + itemPos.x = this->actor.world.pos.x; + itemPos.y = this->actor.world.pos.y; + itemPos.z = this->actor.world.pos.z; + Item_DropCollectible(play, &itemPos, ITEM00_ARROWS_SMALL); } } else if (this->collider.base.colMaterial == COL_MATERIAL_METAL || (this->actor.colChkInfo.damageReaction == POESIS_DMG_REACT_OTHER @@ -1339,7 +1339,7 @@ s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve gDPPipeSync((*gfxP)++); gDPSetEnvColor((*gfxP)++, this->sisColor.r, this->sisColor.g, this->sisColor.b, this->sisColor.a); } else if (limbIndex == 11) { - color = &D_80ADD7E8[this->sisterID]; + color = &sLimb11Colors[this->sisterID]; gDPPipeSync((*gfxP)++); gDPSetEnvColor((*gfxP)++, color->r, color->g, color->b, this->sisColor.a); } @@ -1393,8 +1393,8 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { f32 scale; s32 i; u8 alpha; - Color_RGBA8* temp_s1 = &sTorchFlameColors[this->sisterID]; - Color_RGBA8* temp_s7 = &sTorchLightColors[this->sisterID]; + Color_RGBA8* fireColor = &sTorchFlameColors[this->sisterID]; + Color_RGBA8* lightColor = &sTorchLightColors[this->sisterID]; s32 pad2; OPEN_DISPS(play->state.gfxCtx, "../z_en_po_sisters.c", 2989); @@ -1422,7 +1422,7 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, (play->gameplayFrames * -20) % 512, 0x20, 0x80)); - gDPSetEnvColor(POLY_XLU_DISP++, temp_s1->r, temp_s1->g, temp_s1->b, temp_s1->a); + gDPSetEnvColor(POLY_XLU_DISP++, fireColor->r, fireColor->g, fireColor->b, fireColor->a); if (this->actionFunc == EnPoSisters_Die) { if (this->sisTimer < 32) { alpha = ((32 - this->sisTimer) * 255) / 32; @@ -1450,7 +1450,7 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { alpha = -i * 31 + 248; } gDPPipeSync(POLY_XLU_DISP++); - gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, temp_s7->r, temp_s7->g, temp_s7->b, alpha); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, lightColor->r, lightColor->g, lightColor->b, alpha); Matrix_Translate(this->torchPos[i].x, this->torchPos[i].y, this->torchPos[i].z, MTXMODE_NEW); Matrix_RotateZYX(0, (s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x8000), 0, MTXMODE_APPLY); if (this->actionFunc == EnPoSisters_ReleaseFlame) { From 466893d631a32ab708a15c3ef1d9d5c144b3cd09 Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Sun, 7 Dec 2025 19:37:38 -0500 Subject: [PATCH 06/24] `En_Po_Sisters`: formatting --- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 51 +++++++++---------- .../ovl_En_Po_Sisters/z_en_po_sisters.h | 4 +- 2 files changed, 25 insertions(+), 30 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 77143dcbd3..ff0106474f 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -115,7 +115,7 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit sColChkInfoInit = { 10, 25, 60, 40 }; -typedef enum PoeSisDamageReaction{ +typedef enum PoeSisDamageReaction { POESIS_DMG_REACT_OTHER, POESIS_DMG_REACT_SWORD=14, POESIS_DMG_REACT_NUT, @@ -284,7 +284,7 @@ void EnPoSisters_FightSetup(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); } this->sisTimer = Rand_S16Offset(15, 3); - this->sisFlags |= EN_POESIS_FLAG_VANISH|EN_POESIS_FLAG_ROTATE|EN_POESIS_FLAG_ACCOL; + this->sisFlags |= EN_POESIS_FLAG_VANISH | EN_POESIS_FLAG_ROTATE | EN_POESIS_FLAG_ACCOL; this->actionFunc = EnPoSisters_FightState1; } @@ -337,7 +337,7 @@ void EnPoSisters_HitSetup(EnPoSisters* this) { if (this->sisterID != EN_POESIS_MEG) { this->actor.speed = 10.0f; } - this->sisFlags &= ~EN_POESIS_FLAG_HOVER|EN_POESIS_FLAG_ROTATE; + this->sisFlags &= ~(EN_POESIS_FLAG_HOVER | EN_POESIS_FLAG_ROTATE); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 16); this->actionFunc = EnPoSisters_Hit; } @@ -346,7 +346,7 @@ void EnPoSisters_HitSetup2(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFleeAnim, -3.0f); this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000; this->sisTimer = 5; - this->sisFlags |= EN_POESIS_FLAG_HOVER|EN_POESIS_FLAG_ROTATE|EN_POESIS_FLAG_ACCOL; + this->sisFlags |= (EN_POESIS_FLAG_HOVER | EN_POESIS_FLAG_ROTATE | EN_POESIS_FLAG_ACCOL); this->actor.speed = 5.0f; this->actionFunc = EnPoSisters_Hit2; } @@ -357,7 +357,7 @@ void EnPoSisters_SetupVanish(EnPoSisters* this) { this->actor.speed = 0.0f; this->megVar = 100; this->actor.world.rot.y = this->actor.shape.rot.y; - this->sisFlags &= ~(EN_POESIS_FLAG_VANISH|EN_POESIS_FLAG_ACCOL); + this->sisFlags &= ~(EN_POESIS_FLAG_VANISH | EN_POESIS_FLAG_ACCOL); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_DISAPPEAR); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); this->actionFunc = EnPoSisters_Vanish; @@ -378,7 +378,7 @@ void EnPoSisters_CircleUpdate(EnPoSisters* this, PlayState* play) { } else if (this->decoyID != 0) { dist = this->actor.parent->xzDistToPlayer; } - // possible bug: "dist" is unitallized if above conditions unmet. + // possible bug: "dist" is unitallized if above conditions unmet. this->actor.world.pos.x = (Math_SinS(this->actor.shape.rot.y + 0x8000) * dist) + player->actor.world.pos.x; this->actor.world.pos.z = (Math_CosS(this->actor.shape.rot.y + 0x8000) * dist) + player->actor.world.pos.z; } @@ -422,15 +422,12 @@ void EnPoSisters_ItemDrop(EnPoSisters* this, PlayState* play) { /*Meg will spawn 3 decoys and begin weeping. (or destroy the decoys and herself if one decoy fails.)*/ void EnPoSisters_MegSetup(EnPoSisters* this, PlayState* play) { - Actor* actor1 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, - ((EN_POESIS_DECOY_PARAM)<<0)); - Actor* actor2 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, - ((EN_POESIS_DECOY_PARAM)<<1)); - Actor* actor3 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x, - this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, - ((EN_POESIS_DECOY_PARAM)<<2)); + Actor* actor1 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, + this->actor.world.pos.z, 0, 0, 0, ((EN_POESIS_DECOY_PARAM) << 0)); + Actor* actor2 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, + this->actor.world.pos.z, 0, 0, 0, ((EN_POESIS_DECOY_PARAM) << 1)); + Actor* actor3 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, + this->actor.world.pos.z, 0, 0, 0,((EN_POESIS_DECOY_PARAM) << 2)); s32 pad; s32 pad1; @@ -451,7 +448,7 @@ void EnPoSisters_MegSetup(EnPoSisters* this, PlayState* play) { actor1->parent = &this->actor; Animation_PlayLoop(&this->skelAnime, &gPoeSistersMegCryAnim); this->torchFlames = 0; - this->sisFlags = EN_POESIS_FLAG_NOMTXF|EN_POESIS_FLAG_TORCH; + this->sisFlags = EN_POESIS_FLAG_NOMTXF | EN_POESIS_FLAG_TORCH; this->actionFunc = EnPoSisters_MegMourns; } } @@ -533,7 +530,7 @@ void EnPoSisters_JoelleBethInit(EnPoSisters* this) { this->actor.home.pos.z = -3440.0f; } Animation_PlayLoop(&this->skelAnime, &gPoeSistersFloatAnim); - this->sisFlags |= EN_POESIS_FLAG_HOVER|EN_POESIS_FLAG_ROTATE; + this->sisFlags |= EN_POESIS_FLAG_HOVER | EN_POESIS_FLAG_ROTATE; this->actionFunc = EnPoSisters_JoelleBethMove; this->actor.speed = 5.0f; } @@ -541,7 +538,7 @@ void EnPoSisters_JoelleBethInit(EnPoSisters* this) { void EnPoSister_JoelleBethSetupWait(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersSwayAnim, -3.0f); this->sisColor.a = 255; - this->sisFlags |= EN_POESIS_FLAG_BGCHECK|EN_POESIS_FLAG_VANISH|EN_POESIS_FLAG_ACCOL; + this->sisFlags |= (EN_POESIS_FLAG_BGCHECK | EN_POESIS_FLAG_VANISH | EN_POESIS_FLAG_ACCOL); this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; this->actionFunc = EnPoSisters_JoelleBethWait; this->actor.speed = 0.0f; @@ -592,7 +589,7 @@ void EnPoSisters_SetupIntro4(EnPoSisters* this) { void EnPoSisters_SetupIntro5(EnPoSisters* this, PlayState* play) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); this->torchFlames = 0; - this->sisFlags = EN_POESIS_FLAG_HOVER|EN_POESIS_FLAG_TORCH; + this->sisFlags = EN_POESIS_FLAG_HOVER | EN_POESIS_FLAG_TORCH; this->sisTimer = 90; this->hoverPulse = 32; this->actor.world.rot.y = sIntroExitFacings[this->sisterID]; @@ -624,7 +621,7 @@ void EnPoSisters_Hover(EnPoSisters* this, PlayState* play) { } this->actor.world.pos.y += (2.0f + 0.5f * Rand_ZeroOne()) * Math_SinS(this->hoverPulse * 0x800); if (this->sisColor.a == 255 && this->actionFunc != EnPoSisters_MegFightStep2 && - this->actionFunc != EnPoSisters_FightState4) { + this->actionFunc != EnPoSisters_FightState4) { if (this->actionFunc == EnPoSisters_Hit2) { Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); } else { @@ -1042,7 +1039,7 @@ void EnPoSisters_SisterInit(EnPoSisters* this, PlayState* play) { this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; this->actor.home.pos.x = 1992.0f; this->actor.home.pos.z = -1440.0f; - this->sisFlags |= EN_POESIS_FLAG_HOVER|EN_POESIS_FLAG_BGCHECK; + this->sisFlags |= (EN_POESIS_FLAG_HOVER | EN_POESIS_FLAG_BGCHECK); EnPoSisters_FightSetup(this); } else { EnPoSisters_JoelleBethInit(this); @@ -1164,8 +1161,7 @@ void EnPoSisters_TickVanish(EnPoSisters* this, PlayState* play) { this->megVar--; } } - if (this->actionFunc != EnPoSisters_FightState4 && - this->actionFunc != EnPoSisters_MegFightStep2 && + if (this->actionFunc != EnPoSisters_FightState4 && this->actionFunc != EnPoSisters_MegFightStep2 && this->actionFunc != EnPoSisters_Hit) { if (this->vanishTimer == 0) { EnPoSisters_SetupVanish(this); @@ -1192,8 +1188,8 @@ void EnPoSisters_CheckDamage(EnPoSisters* this, PlayState* play) { Item_DropCollectible(play, &itemPos, ITEM00_ARROWS_SMALL); } } else if (this->collider.base.colMaterial == COL_MATERIAL_METAL || - (this->actor.colChkInfo.damageReaction == POESIS_DMG_REACT_OTHER - && this->actor.colChkInfo.damage == 0)) { + (this->actor.colChkInfo.damageReaction == POESIS_DMG_REACT_OTHER && + this->actor.colChkInfo.damage == 0)) { if (this->sisterID == EN_POESIS_MEG) { this->actor.freezeTimer = 0; } @@ -1254,8 +1250,7 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) { } Collider_UpdateCylinder(&this->actor, &this->collider); - if (this->actionFunc == EnPoSisters_MegFightStep2 || - this->actionFunc == EnPoSisters_FightState4) { + if (this->actionFunc == EnPoSisters_MegFightStep2 || this->actionFunc == EnPoSisters_FightState4) { this->torchFlames++; this->torchFlames = CLAMP_MAX(this->torchFlames, 8); } else if (this->actionFunc != EnPoSisters_ReleaseFlame) { @@ -1329,7 +1324,7 @@ s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve rot->x += (this->sisTimer * 0x1000) - 0xF000; } } - if (this->sisColor.a == 0 || limbIndex == 8 || + if (this->sisColor.a == 0 || limbIndex == 8 || (this->actionFunc == EnPoSisters_ReleaseFlame && this->sisTimer >= 8)) { *dList = NULL; } else if (limbIndex == 9) { diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h index a56ba9daa3..4824f34c75 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h @@ -32,14 +32,14 @@ typedef struct EnPoSisters { /* 0x02F8 */ MtxF torchMtx; } EnPoSisters; // size = 0x0338 -typedef enum EnPoSisNames{ +typedef enum EnPoSisNames { EN_POESIS_MEG, // purple sister, circles Link with decoys EN_POESIS_JOELLE, // red sister, hides in portraits EN_POESIS_BETH, // blue sister, hides in portraits EN_POESIS_AMY, // green sister, hides in block puzzle } EnPoSisNames; -typedef enum EnPoSisFlags{ +typedef enum EnPoSisFlags { EN_POESIS_FLAG_ACCOL=1<<0, // set AC collision EN_POESIS_FLAG_ROTATE=1<<1, // set shape.rot.y to world.rot.y EN_POESIS_FLAG_VANISH=1<<2, // tick vanishTimer, then disappear if 0. From a65b55b9f4bbfc3a10c3f6691ea68a0230a486ae Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Sun, 7 Dec 2025 20:32:23 -0500 Subject: [PATCH 07/24] Update z_en_po_sisters.c found mismatch with setting decoy params --- .../actors/ovl_En_Po_Sisters/z_en_po_sisters.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index ff0106474f..f75c45a575 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -284,7 +284,7 @@ void EnPoSisters_FightSetup(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); } this->sisTimer = Rand_S16Offset(15, 3); - this->sisFlags |= EN_POESIS_FLAG_VANISH | EN_POESIS_FLAG_ROTATE | EN_POESIS_FLAG_ACCOL; + this->sisFlags |= (EN_POESIS_FLAG_VANISH | EN_POESIS_FLAG_ROTATE | EN_POESIS_FLAG_ACCOL); this->actionFunc = EnPoSisters_FightState1; } @@ -423,11 +423,11 @@ void EnPoSisters_ItemDrop(EnPoSisters* this, PlayState* play) { (or destroy the decoys and herself if one decoy fails.)*/ void EnPoSisters_MegSetup(EnPoSisters* this, PlayState* play) { Actor* actor1 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, ((EN_POESIS_DECOY_PARAM) << 0)); + this->actor.world.pos.z, 0, 0, 0, ((EN_POESIS_DECOY_PARAM) * 1)); Actor* actor2 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, ((EN_POESIS_DECOY_PARAM) << 1)); + this->actor.world.pos.z, 0, 0, 0, ((EN_POESIS_DECOY_PARAM) * 2)); Actor* actor3 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0,((EN_POESIS_DECOY_PARAM) << 2)); + this->actor.world.pos.z, 0, 0, 0, ((EN_POESIS_DECOY_PARAM) * 3)); s32 pad; s32 pad1; @@ -515,7 +515,7 @@ void EnPoSisters_MegFightInit(EnPoSisters* this) { this->sisColor.a = 255; this->sisTimer = 300; this->megVar = 3; - this->sisFlags |= EN_POESIS_FLAG_HOVER|EN_POESIS_FLAG_ACCOL; + this->sisFlags |= (EN_POESIS_FLAG_HOVER | EN_POESIS_FLAG_ACCOL); this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; this->actionFunc = EnPoSisters_MegFightStep1; } @@ -530,7 +530,7 @@ void EnPoSisters_JoelleBethInit(EnPoSisters* this) { this->actor.home.pos.z = -3440.0f; } Animation_PlayLoop(&this->skelAnime, &gPoeSistersFloatAnim); - this->sisFlags |= EN_POESIS_FLAG_HOVER | EN_POESIS_FLAG_ROTATE; + this->sisFlags |= (EN_POESIS_FLAG_HOVER | EN_POESIS_FLAG_ROTATE); this->actionFunc = EnPoSisters_JoelleBethMove; this->actor.speed = 5.0f; } From 8db70d33bd43ae69d6abfc3b509b0dcd1be90a3a Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Mon, 8 Dec 2025 10:18:47 -0500 Subject: [PATCH 08/24] `En_Po_Sisters`: most suggeted changes Changed formatting based on review. Will attempt moving suggested static vars when toolchain issue and mismatch are resolved. --- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 511 +++++++++--------- .../ovl_En_Po_Sisters/z_en_po_sisters.h | 34 +- 2 files changed, 274 insertions(+), 271 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index f75c45a575..84e77b983f 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -116,44 +116,58 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit sColChkInfoInit = { 10, 25, 60, 40 }; typedef enum PoeSisDamageReaction { - POESIS_DMG_REACT_OTHER, - POESIS_DMG_REACT_SWORD=14, - POESIS_DMG_REACT_NUT, + EN_PO_SISTERS_DMG_REACT_OTHER, + EN_PO_SISTERS_DMG_REACT_SWORD=14, + EN_PO_SISTERS_DMG_REACT_NUT, }; +typedef enum EnPoSisterFlags { + EN_PO_SISTERS_FLAG_ACCOL=1<<0, // set AC collision + EN_PO_SISTERS_FLAG_ROTATE=1<<1, // set shape.rot.y to world.rot.y + EN_PO_SISTERS_FLAG_VANISH=1<<2, // tick vanishTimer, then disappear if 0. + EN_PO_SISTERS_FLAG_HOVER=1<<3, // hover up and down a few inches + EN_PO_SISTERS_FLAG_BGCHECK=1<<4,// BGCheck floors and walls + EN_PO_SISTERS_FLAG_UPDATEMASK=(EN_PO_SISTERS_FLAG_ACCOL|EN_PO_SISTERS_FLAG_ROTATE| + EN_PO_SISTERS_FLAG_VANISH|EN_PO_SISTERS_FLAG_HOVER|EN_PO_SISTERS_FLAG_BGCHECK), + EN_PO_SISTERS_FLAG_TORCH=1<<5, // manipulate torch flames + EN_PO_SISTERS_FLAG_SPIN=1<<6, // the real Meg spins as a tell + EN_PO_SISTERS_FLAG_NOMTXF=1<<7, //don't read or write torchMtx +} EnPoSisterFlags; + + static DamageTable sDamageTable = { - /* Deku nut */ DMG_ENTRY(0, POESIS_DMG_REACT_NUT), - /* Deku stick */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), - /* Slingshot */ DMG_ENTRY(1, POESIS_DMG_REACT_OTHER), - /* Explosive */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), - /* Boomerang */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), - /* Normal arrow */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), - /* Hammer swing */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), - /* Hookshot */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), - /* Kokiri sword */ DMG_ENTRY(1, POESIS_DMG_REACT_SWORD), - /* Master sword */ DMG_ENTRY(2, POESIS_DMG_REACT_SWORD), - /* Giant's Knife */ DMG_ENTRY(4, POESIS_DMG_REACT_SWORD), - /* Fire arrow */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), - /* Ice arrow */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), - /* Light arrow */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), - /* Unk arrow 1 */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), - /* Unk arrow 2 */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), - /* Unk arrow 3 */ DMG_ENTRY(2, POESIS_DMG_REACT_OTHER), - /* Fire magic */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), - /* Ice magic */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), - /* Light magic */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), - /* Shield */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), - /* Mirror Ray */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), - /* Kokiri spin */ DMG_ENTRY(1, POESIS_DMG_REACT_SWORD), - /* Giant spin */ DMG_ENTRY(4, POESIS_DMG_REACT_SWORD), - /* Master spin */ DMG_ENTRY(2, POESIS_DMG_REACT_SWORD), - /* Kokiri jump */ DMG_ENTRY(2, POESIS_DMG_REACT_SWORD), - /* Giant jump */ DMG_ENTRY(8, POESIS_DMG_REACT_SWORD), - /* Master jump */ DMG_ENTRY(4, POESIS_DMG_REACT_SWORD), - /* Unknown 1 */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), - /* Unblockable */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), - /* Hammer jump */ DMG_ENTRY(4, POESIS_DMG_REACT_OTHER), - /* Unknown 2 */ DMG_ENTRY(0, POESIS_DMG_REACT_OTHER), + /* Deku nut */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_NUT), + /* Deku stick */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Slingshot */ DMG_ENTRY(1, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Explosive */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Boomerang */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Normal arrow */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Hammer swing */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Hookshot */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Kokiri sword */ DMG_ENTRY(1, EN_PO_SISTERS_DMG_REACT_SWORD), + /* Master sword */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_SWORD), + /* Giant's Knife */ DMG_ENTRY(4, EN_PO_SISTERS_DMG_REACT_SWORD), + /* Fire arrow */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Ice arrow */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Light arrow */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Unk arrow 1 */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Unk arrow 2 */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Unk arrow 3 */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Fire magic */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Ice magic */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Light magic */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Shield */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Mirror Ray */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Kokiri spin */ DMG_ENTRY(1, EN_PO_SISTERS_DMG_REACT_SWORD), + /* Giant spin */ DMG_ENTRY(4, EN_PO_SISTERS_DMG_REACT_SWORD), + /* Master spin */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_SWORD), + /* Kokiri jump */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_SWORD), + /* Giant jump */ DMG_ENTRY(8, EN_PO_SISTERS_DMG_REACT_SWORD), + /* Master jump */ DMG_ENTRY(4, EN_PO_SISTERS_DMG_REACT_SWORD), + /* Unknown 1 */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Unblockable */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Hammer jump */ DMG_ENTRY(4, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Unknown 2 */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), }; static s32 sIntroVar = 0; @@ -210,10 +224,10 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 50.0f); SkelAnime_Init(play, &this->skelAnime, &gPoeSistersSkel, &gPoeSistersSwayAnim, this->jointTable, this->morphTable, 12); - this->sisColor.r = 255; - this->sisColor.g = 255; - this->sisColor.b = 210; - this->sisColor.a = 255; + this->sisterColor.r = 255; + this->sisterColor.g = 255; + this->sisterColor.b = 210; + this->sisterColor.a = 255; this->lightNode = LightContext_InsertLight(play, &play->lightCtx, &this->lightInfo); Lights_PointGlowSetInfo(&this->lightInfo, this->actor.home.pos.x, this->actor.home.pos.y, this->actor.home.pos.z, 0, 0, 0, 0); @@ -227,12 +241,12 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) { this->hoverPulse = 32; this->vanishTimer = 20; this->torchFlames = 1; - this->sisFlags = EN_POESIS_FLAG_TORCH; + this->sisterFlags = EN_PO_SISTERS_FLAG_TORCH; this->circleDist = 110.0f; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; if (PARAMS_GET_NOSHIFT(this->actor.params, 12, 1)) { EnPoSisters_IntroSetup(this, play); - } else if (this->sisterID == EN_POESIS_MEG) { + } else if (this->sisterID == EN_PO_SISTERS_MEG) { if (this->decoyID == 0) { this->collider.base.ocFlags1 = OC1_ON | OC1_TYPE_PLAYER; EnPoSisters_MegSetup(this, play); @@ -253,7 +267,7 @@ void EnPoSisters_Destroy(Actor* thisx, PlayState* play) { EnPoSisters* this = (EnPoSisters*)thisx; LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); - if (this->sisterID == EN_POESIS_MEG && this->decoyID == 0) { + if (this->sisterID == EN_PO_SISTERS_MEG && this->decoyID == 0) { func_800F5B58(); } Collider_DestroyCylinder(play, &this->collider); @@ -266,15 +280,15 @@ void EnPoSisters_MoveTorchFlames(EnPoSisters* this, s32 height, Vec3f* pos) { for (i = 0; i < this->torchFlames; i++) { vec = &this->torchPos[i]; - vec->x = pos->x + Math_SinS((s16)(this->actor.shape.rot.y + (this->sisTimer * 0x800) + i * 0x2000)) * spread; - vec->z = pos->z + Math_CosS((s16)(this->actor.shape.rot.y + (this->sisTimer * 0x800) + i * 0x2000)) * spread; + vec->x = pos->x + Math_SinS((s16)(this->actor.shape.rot.y + (this->sisterTimer * 0x800) + i * 0x2000)) * spread; + vec->z = pos->z + Math_CosS((s16)(this->actor.shape.rot.y + (this->sisterTimer * 0x800) + i * 0x2000)) * spread; vec->y = pos->y + height; } } void EnPoSisters_FightSetup3(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersSwayAnim, -3.0f); - this->sisTimer = Rand_S16Offset(2, 3); + this->sisterTimer = Rand_S16Offset(2, 3); this->actionFunc = EnPoSisters_FightState3; this->actor.speed = 0.0f; } @@ -283,8 +297,8 @@ void EnPoSisters_FightSetup(EnPoSisters* this) { if (this->actionFunc != EnPoSisters_FightState2) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); } - this->sisTimer = Rand_S16Offset(15, 3); - this->sisFlags |= (EN_POESIS_FLAG_VANISH | EN_POESIS_FLAG_ROTATE | EN_POESIS_FLAG_ACCOL); + this->sisterTimer = Rand_S16Offset(15, 3); + this->sisterFlags |= (EN_PO_SISTERS_FLAG_VANISH | EN_PO_SISTERS_FLAG_ROTATE | EN_PO_SISTERS_FLAG_ACCOL); this->actionFunc = EnPoSisters_FightState1; } @@ -293,34 +307,34 @@ void EnPoSisters_FightSetup2(EnPoSisters* this) { } void EnPoSisters_FightSetup4(EnPoSisters* this) { - if (this->sisColor.a != 0) { + if (this->sisterColor.a != 0) { this->collider.base.colMaterial = COL_MATERIAL_METAL; this->collider.base.acFlags |= AC_HARD; } Animation_MorphToLoop(&this->skelAnime, &gPoeSistersAttackAnim, -5.0f); this->actor.speed = 0.0f; - this->sisTimer = Animation_GetLastFrame(&gPoeSistersAttackAnim) * 3 + 3; - this->sisFlags &= ~EN_POESIS_FLAG_ROTATE; + this->sisterTimer = Animation_GetLastFrame(&gPoeSistersAttackAnim) * 3 + 3; + this->sisterFlags &= ~EN_PO_SISTERS_FLAG_ROTATE; this->actionFunc = EnPoSisters_FightState4; } void EnPoSisters_MegFightSetup2(EnPoSisters* this) { this->actor.speed = 5.0f; - if (this->sisterID == EN_POESIS_MEG) { + if (this->sisterID == EN_PO_SISTERS_MEG) { this->collider.base.colMaterial = COL_MATERIAL_METAL; this->collider.base.acFlags |= AC_HARD; Animation_MorphToLoop(&this->skelAnime, &gPoeSistersAttackAnim, -5.0f); } - this->sisTimer = 5; + this->sisterTimer = 5; this->actor.world.rot.y = this->actor.yawTowardsPlayer; - this->sisFlags |= EN_POESIS_FLAG_HOVER; + this->sisterFlags |= EN_PO_SISTERS_FLAG_HOVER; this->actionFunc = EnPoSisters_MegFightStep2; } void EnPoSisters_OnATHitSetup(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); this->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000; - if (this->sisterID != EN_POESIS_MEG) { + if (this->sisterID != EN_PO_SISTERS_MEG) { this->collider.base.colMaterial = COL_MATERIAL_HIT3; this->collider.base.acFlags &= ~AC_HARD; } @@ -334,10 +348,10 @@ void EnPoSisters_HitSetup(EnPoSisters* this) { ? this->collider.base.ac->world.rot.y : Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000; } - if (this->sisterID != EN_POESIS_MEG) { + if (this->sisterID != EN_PO_SISTERS_MEG) { this->actor.speed = 10.0f; } - this->sisFlags &= ~(EN_POESIS_FLAG_HOVER | EN_POESIS_FLAG_ROTATE); + this->sisterFlags &= ~(EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_ROTATE); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 16); this->actionFunc = EnPoSisters_Hit; } @@ -345,8 +359,8 @@ void EnPoSisters_HitSetup(EnPoSisters* this) { void EnPoSisters_HitSetup2(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFleeAnim, -3.0f); this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000; - this->sisTimer = 5; - this->sisFlags |= (EN_POESIS_FLAG_HOVER | EN_POESIS_FLAG_ROTATE | EN_POESIS_FLAG_ACCOL); + this->sisterTimer = 5; + this->sisterFlags |= (EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_ROTATE | EN_PO_SISTERS_FLAG_ACCOL); this->actor.speed = 5.0f; this->actionFunc = EnPoSisters_Hit2; } @@ -357,7 +371,7 @@ void EnPoSisters_SetupVanish(EnPoSisters* this) { this->actor.speed = 0.0f; this->megVar = 100; this->actor.world.rot.y = this->actor.shape.rot.y; - this->sisFlags &= ~(EN_POESIS_FLAG_VANISH | EN_POESIS_FLAG_ACCOL); + this->sisterFlags &= ~(EN_PO_SISTERS_FLAG_VANISH | EN_PO_SISTERS_FLAG_ACCOL); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_DISAPPEAR); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); this->actionFunc = EnPoSisters_Vanish; @@ -386,34 +400,34 @@ void EnPoSisters_CircleUpdate(EnPoSisters* this, PlayState* play) { void EnPoSisters_SetupReveal(EnPoSisters* this, PlayState* play) { Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 1.5f, 0.0f, Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE, -3.0f); - if (this->sisterID == EN_POESIS_MEG) { + if (this->sisterID == EN_PO_SISTERS_MEG) { this->circleDist = 110.0f; EnPoSisters_CircleUpdate(this, play); - this->sisColor.a = 0; + this->sisterColor.a = 0; this->actor.draw = EnPoSisters_Draw; } else { this->actor.world.rot.y = this->actor.shape.rot.y; } - this->sisTimer = 15; + this->sisterTimer = 15; this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_PO_APPEAR); - this->sisFlags &= ~EN_POESIS_FLAG_ACCOL; + this->sisterFlags &= ~EN_PO_SISTERS_FLAG_ACCOL; this->actionFunc = EnPoSisters_Reveal; } void EnPoSisters_SetupDie(EnPoSisters* this, PlayState* play) { - this->sisTimer = 0; + this->sisterTimer = 0; this->actor.speed = 0.0f; this->actor.world.pos.y += 42.0f; this->actor.shape.yOffset = -6000.0f; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; - this->sisFlags = 0; + this->sisterFlags = 0; this->actionFunc = EnPoSisters_ReleaseFlame; OnePointCutscene_Init(play, 3190, 999, &this->actor, CAM_ID_MAIN); } void EnPoSisters_ItemDrop(EnPoSisters* this, PlayState* play) { - this->sisTimer = 0; + this->sisterTimer = 0; this->actor.world.pos.y = this->torchPos[0].y; Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x80); this->actionFunc = EnPoSisters_Die; @@ -423,11 +437,11 @@ void EnPoSisters_ItemDrop(EnPoSisters* this, PlayState* play) { (or destroy the decoys and herself if one decoy fails.)*/ void EnPoSisters_MegSetup(EnPoSisters* this, PlayState* play) { Actor* actor1 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, ((EN_POESIS_DECOY_PARAM) * 1)); + this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM) * 1)); Actor* actor2 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, ((EN_POESIS_DECOY_PARAM) * 2)); + this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM) * 2)); Actor* actor3 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, ((EN_POESIS_DECOY_PARAM) * 3)); + this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM) * 3)); s32 pad; s32 pad1; @@ -448,7 +462,7 @@ void EnPoSisters_MegSetup(EnPoSisters* this, PlayState* play) { actor1->parent = &this->actor; Animation_PlayLoop(&this->skelAnime, &gPoeSistersMegCryAnim); this->torchFlames = 0; - this->sisFlags = EN_POESIS_FLAG_NOMTXF | EN_POESIS_FLAG_TORCH; + this->sisterFlags = EN_PO_SISTERS_FLAG_NOMTXF | EN_PO_SISTERS_FLAG_TORCH; this->actionFunc = EnPoSisters_MegMourns; } } @@ -459,7 +473,7 @@ void EnPoSisters_DecoySetup(EnPoSisters* this, PlayState* play) { this->actor.draw = NULL; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; this->megVar = 100; - this->sisFlags = EN_POESIS_FLAG_TORCH; + this->sisterFlags = EN_PO_SISTERS_FLAG_TORCH; this->collider.base.colMaterial = COL_MATERIAL_HIT3; this->collider.base.acFlags &= ~AC_HARD; if (play != NULL) { @@ -474,35 +488,35 @@ void EnPoSisters_DecoySetup(EnPoSisters* this, PlayState* play) { } void EnPoSisters_SisterSetup(EnPoSisters* this) { - if (this->sisterID == EN_POESIS_AMY) { + if (this->sisterID == EN_PO_SISTERS_AMY) { Animation_PlayOnce(&this->skelAnime, &gPoeSistersAppearDisappearAnim); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_APPEAR); } else { Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 0.5f, 0.0f, Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE_INTERP, 0.0f); } - this->sisColor.a = 0; - this->sisFlags = EN_POESIS_FLAG_TORCH; + this->sisterColor.a = 0; + this->sisterFlags = EN_PO_SISTERS_FLAG_TORCH; this->actionFunc = EnPoSisters_SisterInit; } void EnPoSisters_MegIntroSetup(EnPoSisters* this, PlayState* play) { Animation_MorphToPlayOnce(&this->skelAnime, &gPoeSistersAppearDisappearAnim, -5.0f); this->torchFlames = 1; - this->sisFlags &= ~EN_POESIS_FLAG_NOMTXF; + this->sisterFlags &= ~EN_PO_SISTERS_FLAG_NOMTXF; this->actionFunc = EnPoSisters_MegIntroStep1; OnePointCutscene_Init(play, 3180, 156, &this->actor, CAM_ID_MAIN); } void EnPoSisters_MegDecoySetup(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); - this->sisTimer = Animation_GetLastFrame(&gPoeSistersFloatAnim) * 7 + 7; + this->sisterTimer = Animation_GetLastFrame(&gPoeSistersFloatAnim) * 7 + 7; if (this->actor.parent != NULL) { this->actor.world.pos = this->actor.parent->world.pos; this->actor.shape.rot.y = this->actor.parent->shape.rot.y; } else { this->actor.shape.rot.y = this->actor.yawTowardsPlayer; - this->sisTimer++; + this->sisterTimer++; } if (this->decoyID == 0) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); @@ -512,16 +526,16 @@ void EnPoSisters_MegDecoySetup(EnPoSisters* this) { void EnPoSisters_MegFightInit(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); - this->sisColor.a = 255; - this->sisTimer = 300; + this->sisterColor.a = 255; + this->sisterTimer = 300; this->megVar = 3; - this->sisFlags |= (EN_POESIS_FLAG_HOVER | EN_POESIS_FLAG_ACCOL); + this->sisterFlags |= (EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_ACCOL); this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; this->actionFunc = EnPoSisters_MegFightStep1; } void EnPoSisters_JoelleBethInit(EnPoSisters* this) { - if (this->sisterID == EN_POESIS_JOELLE) { + if (this->sisterID == EN_PO_SISTERS_JOELLE) { // Joelle's target pos when revealed this->actor.home.pos.x = -632.0f; this->actor.home.pos.z = -3440.0f; @@ -530,15 +544,15 @@ void EnPoSisters_JoelleBethInit(EnPoSisters* this) { this->actor.home.pos.z = -3440.0f; } Animation_PlayLoop(&this->skelAnime, &gPoeSistersFloatAnim); - this->sisFlags |= (EN_POESIS_FLAG_HOVER | EN_POESIS_FLAG_ROTATE); + this->sisterFlags |= (EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_ROTATE); this->actionFunc = EnPoSisters_JoelleBethMove; this->actor.speed = 5.0f; } void EnPoSister_JoelleBethSetupWait(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersSwayAnim, -3.0f); - this->sisColor.a = 255; - this->sisFlags |= (EN_POESIS_FLAG_BGCHECK | EN_POESIS_FLAG_VANISH | EN_POESIS_FLAG_ACCOL); + this->sisterColor.a = 255; + this->sisterFlags |= (EN_PO_SISTERS_FLAG_BGCHECK | EN_PO_SISTERS_FLAG_VANISH | EN_PO_SISTERS_FLAG_ACCOL); this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; this->actionFunc = EnPoSisters_JoelleBethWait; this->actor.speed = 0.0f; @@ -546,9 +560,9 @@ void EnPoSister_JoelleBethSetupWait(EnPoSisters* this) { void EnPoSisters_IntroSetup(EnPoSisters* this, PlayState* play) { sIntroVar = 0; - this->sisColor.a = 0; - this->sisFlags = EN_POESIS_FLAG_NOMTXF; - this->sisTimer = 50; + this->sisterColor.a = 0; + this->sisterFlags = EN_PO_SISTERS_FLAG_NOMTXF; + this->sisterTimer = 50; this->torchPos[0] = this->actor.home.pos; Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); this->actionFunc = EnPoSisters_IntroStep1; @@ -568,10 +582,10 @@ void EnPoSisters_IntroSetup2(EnPoSisters* this) { void EnPoSisters_SetupIntro3(EnPoSisters* this) { Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 0.833f, 0.0f, Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE_INTERP, 0.0f); - if (this->sisterID == EN_POESIS_MEG || this->sisterID == EN_POESIS_JOELLE) { - this->sisTimer = 40; // Meg and Joelle appear first + if (this->sisterID == EN_PO_SISTERS_MEG || this->sisterID == EN_PO_SISTERS_JOELLE) { + this->sisterTimer = 40; // Meg and Joelle appear first } else { - this->sisTimer = 76; + this->sisterTimer = 76; // followed by Beth and Amy } this->torchFlames = 0; sIntroVar = 0; @@ -581,20 +595,20 @@ void EnPoSisters_SetupIntro3(EnPoSisters* this) { void EnPoSisters_SetupIntro4(EnPoSisters* this) { Animation_PlayLoop(&this->skelAnime, &gPoeSistersSwayAnim); this->torchFlames = 8; - this->sisTimer = 32; - EnPoSisters_MoveTorchFlames(this, this->sisTimer, &this->actor.home.pos); + this->sisterTimer = 32; + EnPoSisters_MoveTorchFlames(this, this->sisterTimer, &this->actor.home.pos); this->actionFunc = EnPoSisters_IntroStep4; } void EnPoSisters_SetupIntro5(EnPoSisters* this, PlayState* play) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); this->torchFlames = 0; - this->sisFlags = EN_POESIS_FLAG_HOVER | EN_POESIS_FLAG_TORCH; - this->sisTimer = 90; + this->sisterFlags = EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_TORCH; + this->sisterTimer = 90; this->hoverPulse = 32; this->actor.world.rot.y = sIntroExitFacings[this->sisterID]; this->actor.home.pos.y = this->actor.world.pos.y; - if (this->sisterID == EN_POESIS_MEG) { + if (this->sisterID == EN_PO_SISTERS_MEG) { Flags_SetSwitch(play, 0x1B); } Actor_PlaySfx(&this->actor, NA_SE_EV_FLAME_IGNITION); @@ -607,7 +621,7 @@ void EnPoSisters_Hover(EnPoSisters* this, PlayState* play) { if (this->actionFunc == EnPoSisters_IntroStep5) { targetY = this->actor.home.pos.y; - } else if (this->sisterID == EN_POESIS_MEG || this->sisterID == EN_POESIS_AMY) { + } else if (this->sisterID == EN_PO_SISTERS_MEG || this->sisterID == EN_PO_SISTERS_AMY) { targetY = player->actor.world.pos.y + 5.0f; } else { targetY = 832.0f; @@ -620,7 +634,7 @@ void EnPoSisters_Hover(EnPoSisters* this, PlayState* play) { this->hoverPulse--; } this->actor.world.pos.y += (2.0f + 0.5f * Rand_ZeroOne()) * Math_SinS(this->hoverPulse * 0x800); - if (this->sisColor.a == 255 && this->actionFunc != EnPoSisters_MegFightStep2 && + if (this->sisterColor.a == 255 && this->actionFunc != EnPoSisters_MegFightStep2 && this->actionFunc != EnPoSisters_FightState4) { if (this->actionFunc == EnPoSisters_Hit2) { Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); @@ -632,10 +646,10 @@ void EnPoSisters_Hover(EnPoSisters* this, PlayState* play) { void EnPoSisters_FightState3(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisTimer != 0) { - this->sisTimer--; + if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisterTimer != 0) { + this->sisterTimer--; } - if (this->sisTimer == 0 || this->actor.xzDistToPlayer < 200.0f) { + if (this->sisterTimer == 0 || this->actor.xzDistToPlayer < 200.0f) { EnPoSisters_FightSetup(this); } } @@ -643,12 +657,12 @@ void EnPoSisters_FightState3(EnPoSisters* this, PlayState* play) { void EnPoSisters_FightState1(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_StepToF(&this->actor.speed, 1.0f, 0.2f); - if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisTimer != 0) { - this->sisTimer--; + if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisterTimer != 0) { + this->sisterTimer--; } if (this->actor.xzDistToPlayer < 200.0f && fabsf(this->actor.yDistToPlayer + 5.0f) < 30.0f) { EnPoSisters_FightSetup2(this); - } else if (this->sisTimer == 0 && Math_StepToF(&this->actor.speed, 0.0f, 0.2f) != 0) { + } else if (this->sisterTimer == 0 && Math_StepToF(&this->actor.speed, 0.0f, 0.2f) != 0) { EnPoSisters_FightSetup3(this); } if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) { @@ -683,14 +697,14 @@ void EnPoSisters_FightState2(EnPoSisters* this, PlayState* play) { void EnPoSisters_FightState4(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (this->sisTimer != 0) { - this->sisTimer--; + if (this->sisterTimer != 0) { + this->sisterTimer--; } - this->actor.shape.rot.y += 384.0f * ((this->skelAnime.endFrame + 1.0f) * 3.0f - this->sisTimer); - if (this->sisTimer == 18 || this->sisTimer == 7) { + this->actor.shape.rot.y += 384.0f * ((this->skelAnime.endFrame + 1.0f) * 3.0f - this->sisterTimer); + if (this->sisterTimer == 18 || this->sisterTimer == 7) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_ROLL); } - if (this->sisTimer == 0) { + if (this->sisterTimer == 0) { EnPoSisters_MegFightSetup2(this); } } @@ -699,12 +713,12 @@ void EnPoSisters_MegFightStep2(EnPoSisters* this, PlayState* play) { s32 pad; SkelAnime_Update(&this->skelAnime); - if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisTimer != 0) { - this->sisTimer--; + if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisterTimer != 0) { + this->sisterTimer--; } this->actor.shape.rot.y += (384.0f * this->skelAnime.endFrame) * 3.0f; - if (this->sisTimer == 0 && ABS((s16)(this->actor.shape.rot.y - this->actor.world.rot.y)) < 0x1000) { - if (this->sisterID != EN_POESIS_MEG) { + if (this->sisterTimer == 0 && ABS((s16)(this->actor.shape.rot.y - this->actor.world.rot.y)) < 0x1000) { + if (this->sisterID != EN_PO_SISTERS_MEG) { this->collider.base.colMaterial = COL_MATERIAL_HIT3; this->collider.base.acFlags &= ~AC_HARD; EnPoSisters_FightSetup(this); @@ -723,7 +737,7 @@ void EnPoSisters_OnATHit(EnPoSisters* this, PlayState* play) { this->actor.shape.rot.y -= (this->actor.speed * 10.0f) * 128.0f; if (Math_StepToF(&this->actor.speed, 0.0f, 0.1f) != 0) { this->actor.world.rot.y = this->actor.shape.rot.y; - if (this->sisterID != EN_POESIS_MEG) { + if (this->sisterID != EN_PO_SISTERS_MEG) { EnPoSisters_FightSetup(this); } else { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); @@ -735,7 +749,7 @@ void EnPoSisters_OnATHit(EnPoSisters* this, PlayState* play) { void EnPoSisters_Hit(EnPoSisters* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime) && !(this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW)) { if (this->actor.colChkInfo.health != 0) { - if (this->sisterID != EN_POESIS_MEG) { + if (this->sisterID != EN_PO_SISTERS_MEG) { EnPoSisters_HitSetup2(this); } else if (this->decoyID != 0) { EnPoSisters_DecoySetup(this, NULL); @@ -749,10 +763,10 @@ void EnPoSisters_Hit(EnPoSisters* this, PlayState* play) { if (this->decoyID != 0) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.parent->shape.rot.y, (this->decoyID == 2) ? 0x800 : 0x400); - this->sisColor.a = ((this->skelAnime.endFrame - this->skelAnime.curFrame) * 255.0f) / this->skelAnime.endFrame; + this->sisterColor.a = ((this->skelAnime.endFrame - this->skelAnime.curFrame) * 255.0f) / this->skelAnime.endFrame; this->actor.world.pos.y = this->actor.parent->world.pos.y; EnPoSisters_CircleUpdate(this, play); - } else if (this->sisterID != EN_POESIS_MEG) { + } else if (this->sisterID != EN_PO_SISTERS_MEG) { Math_StepToF(&this->actor.speed, 0.0f, 0.5f); } } @@ -760,14 +774,14 @@ void EnPoSisters_Hit(EnPoSisters* this, PlayState* play) { void EnPoSisters_Hit2(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer + 0x8000, 1820); - if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisTimer != 0) { - this->sisTimer--; + if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisterTimer != 0) { + this->sisterTimer--; } if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) { this->actor.world.rot.y = this->actor.shape.rot.y; - this->sisFlags |= EN_POESIS_FLAG_ROTATE; + this->sisterFlags |= EN_PO_SISTERS_FLAG_ROTATE; EnPoSisters_SetupVanish(this); - } else if (this->sisTimer == 0 && 240.0f < this->actor.xzDistToPlayer) { + } else if (this->sisterTimer == 0 && 240.0f < this->actor.xzDistToPlayer) { this->actor.world.rot.y = this->actor.shape.rot.y; EnPoSisters_FightSetup(this); } @@ -777,26 +791,26 @@ void EnPoSisters_Vanish(EnPoSisters* this, PlayState* play) { s32 endFrame; if (SkelAnime_Update(&this->skelAnime)) { - this->sisColor.a = 0; + this->sisterColor.a = 0; this->collider.elem.acDmgInfo.dmgFlags = DMG_MAGIC_ICE | DMG_MAGIC_FIRE | DMG_DEKU_NUT; EnPoSisters_FightSetup(this); } else { endFrame = this->skelAnime.endFrame; - this->sisColor.a = ((endFrame - this->skelAnime.curFrame) * 255.0f) / endFrame; + this->sisterColor.a = ((endFrame - this->skelAnime.curFrame) * 255.0f) / endFrame; } } void EnPoSisters_Reveal(EnPoSisters* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { - this->sisColor.a = 255; - if (this->sisterID != EN_POESIS_MEG) { - this->sisFlags |= EN_POESIS_FLAG_ACCOL; + this->sisterColor.a = 255; + if (this->sisterID != EN_PO_SISTERS_MEG) { + this->sisterFlags |= EN_PO_SISTERS_FLAG_ACCOL; this->collider.elem.acDmgInfo.dmgFlags = (DMG_SWORD | DMG_ARROW | DMG_HAMMER | DMG_MAGIC_ICE | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_EXPLOSIVE | DMG_DEKU_STICK); - if (this->sisTimer != 0) { - this->sisTimer--; + if (this->sisterTimer != 0) { + this->sisterTimer--; } - if (this->sisTimer == 0) { + if (this->sisterTimer == 0) { this->vanishTimer = 20; EnPoSisters_FightSetup(this); } @@ -804,8 +818,8 @@ void EnPoSisters_Reveal(EnPoSisters* this, PlayState* play) { EnPoSisters_MegFightInit(this); } } else { - this->sisColor.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; - if (this->sisterID == EN_POESIS_MEG) { + this->sisterColor.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; + if (this->sisterID == EN_PO_SISTERS_MEG) { EnPoSisters_CircleUpdate(this, play); } } @@ -815,22 +829,22 @@ void EnPoSisters_Reveal(EnPoSisters* this, PlayState* play) { void EnPoSisters_ReleaseFlame(EnPoSisters* this, PlayState* play) { s32 i; - this->sisTimer++; + this->sisterTimer++; this->torchFlames = CLAMP_MAX(this->torchFlames + 1, 8); for (i = this->torchFlames - 1; i > 0; i--) { this->torchPos[i] = this->torchPos[i - 1]; } this->torchPos[0].x = - (Math_SinS((this->actor.shape.rot.y + this->sisTimer * 0x3000) - 0x4000) * (3000.0f * this->actor.scale.x)) + + (Math_SinS((this->actor.shape.rot.y + this->sisterTimer * 0x3000) - 0x4000) * (3000.0f * this->actor.scale.x)) + this->actor.world.pos.x; this->torchPos[0].z = - (Math_CosS((this->actor.shape.rot.y + this->sisTimer * 0x3000) - 0x4000) * (3000.0f * this->actor.scale.x)) + + (Math_CosS((this->actor.shape.rot.y + this->sisterTimer * 0x3000) - 0x4000) * (3000.0f * this->actor.scale.x)) + this->actor.world.pos.z; - if (this->sisTimer < 8) { + if (this->sisterTimer < 8) { this->torchPos[0].y = this->torchPos[1].y - 9.0f; } else { this->torchPos[0].y = this->torchPos[1].y + 2.0f; - if (this->sisTimer >= 16) { + if (this->sisterTimer >= 16) { if (Math_StepToF(&this->actor.scale.x, 0.0f, 0.001f) != 0) { EnPoSisters_ItemDrop(this, play); } @@ -838,29 +852,29 @@ void EnPoSisters_ReleaseFlame(EnPoSisters* this, PlayState* play) { this->actor.scale.y = this->actor.scale.x; } } - if (this->sisTimer == 16) { + if (this->sisterTimer == 16) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_DEAD2); } } /* Show the flame moving back to the proper torch */ void EnPoSisters_Die(EnPoSisters* this, PlayState* play) { - this->sisTimer++; - if (this->sisTimer == 64) { + this->sisterTimer++; + if (this->sisterTimer == 64) { Flags_SetSwitch(play, this->actor.params); SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 30, NA_SE_EV_FLAME_IGNITION); - if (this->sisterID == EN_POESIS_MEG) { + if (this->sisterID == EN_PO_SISTERS_MEG) { Flags_UnsetSwitch(play, 0x1B); } play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE; Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME); Actor_Kill(&this->actor); - } else if (this->sisTimer < 32) { - EnPoSisters_MoveTorchFlames(this, this->sisTimer, &this->actor.world.pos); + } else if (this->sisterTimer < 32) { + EnPoSisters_MoveTorchFlames(this, this->sisterTimer, &this->actor.world.pos); } else { - EnPoSisters_MoveTorchFlames(this, 64 - this->sisTimer, &this->actor.world.pos); + EnPoSisters_MoveTorchFlames(this, 64 - this->sisterTimer, &this->actor.world.pos); } - if (this->sisTimer == 32) { + if (this->sisterTimer == 32) { this->actor.world.pos.x = sDeathTorchPos[this->sisterID].x; this->actor.world.pos.y = sDeathTorchPos[this->sisterID].y; this->actor.world.pos.z = sDeathTorchPos[this->sisterID].z; @@ -929,11 +943,11 @@ void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); temp_f2 = this->skelAnime.endFrame * 0.5f; - this->sisColor.a = (fabsf(temp_f2 - this->skelAnime.curFrame) * 255.0f) / temp_f2; - if (this->sisTimer != 0) { - this->sisTimer -= 1; + this->sisterColor.a = (fabsf(temp_f2 - this->skelAnime.curFrame) * 255.0f) / temp_f2; + if (this->sisterTimer != 0) { + this->sisterTimer -= 1; } - if (this->sisTimer == 0) { + if (this->sisterTimer == 0) { this->actor.world.rot.y = this->actor.shape.rot.y += 0x4000 * (s32)(Rand_ZeroOne() * 4.0f); if (this->decoyID == 0) { func_800F5ACC(NA_BGM_MINI_BOSS); @@ -943,16 +957,16 @@ void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play) { this->actor.world.pos.y += 0.1f; ID = this->decoyID; if (ID != 0) { - if (this->sisTimer > 90) { + if (this->sisterTimer > 90) { sign = 1; step = 64; - } else if (this->sisTimer > 70) { + } else if (this->sisterTimer > 70) { sign = 0; step = 64; - } else if (this->sisTimer > 55) { + } else if (this->sisterTimer > 55) { sign = 1; step = 96; - } else if (this->sisTimer > 40) { + } else if (this->sisterTimer > 40) { sign = 0; step = 96; } else { @@ -964,7 +978,7 @@ void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play) { } Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.parent->shape.rot.y + (this->decoyID * 0x4000) * sign, step); - } else if (this->sisTimer == 70 || this->sisTimer == 40) { + } else if (this->sisterTimer == 70 || this->sisterTimer == 40) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); } } @@ -976,21 +990,21 @@ void EnPoSisters_MegFightStep1(EnPoSisters* this, PlayState* play) { s32 temp_v0; s32 phi_a0; - if (this->sisTimer != 0) { - this->sisTimer--; + if (this->sisterTimer != 0) { + this->sisterTimer--; } if (this->megVar > 0) { - if (this->sisTimer >= 16) { + if (this->sisterTimer >= 16) { SkelAnime_Update(&this->skelAnime); if (this->decoyID == 0) { if (ABS((s16)(16 - this->hoverPulse)) < 14) { this->actor.shape.rot.y += (0x580 - (this->megVar * 0x180)) * fabsf(Math_SinS(this->hoverPulse * 0x800)); } - if (this->sisTimer >= 284 || this->sisTimer < 31) { - this->sisFlags |= EN_POESIS_FLAG_SPIN; + if (this->sisterTimer >= 284 || this->sisterTimer < 31) { + this->sisterFlags |= EN_PO_SISTERS_FLAG_SPIN; } else { - this->sisFlags &= ~EN_POESIS_FLAG_SPIN; + this->sisterFlags &= ~EN_PO_SISTERS_FLAG_SPIN; } } else { this->actor.shape.rot.y = (s16)(this->actor.parent->shape.rot.y + (this->decoyID * 0x4000)); @@ -998,16 +1012,16 @@ void EnPoSisters_MegFightStep1(EnPoSisters* this, PlayState* play) { } } if (this->decoyID == 0) { - if (this->sisTimer >= 284 || (this->sisTimer < 31 && this->sisTimer >= 16)) { - this->sisFlags |= EN_POESIS_FLAG_SPIN; + if (this->sisterTimer >= 284 || (this->sisterTimer < 31 && this->sisterTimer >= 16)) { + this->sisterFlags |= EN_PO_SISTERS_FLAG_SPIN; } else { - this->sisFlags &= ~EN_POESIS_FLAG_SPIN; + this->sisterFlags &= ~EN_PO_SISTERS_FLAG_SPIN; } } if (Actor_WorldDistXZToPoint(&GET_PLAYER(play)->actor, &this->actor.home.pos) > 600.0f) { - this->sisFlags &= ~EN_POESIS_FLAG_SPIN; + this->sisterFlags &= ~EN_PO_SISTERS_FLAG_SPIN; EnPoSisters_DecoySetup(this, play); - } else if (this->sisTimer == 0) { + } else if (this->sisterTimer == 0) { if (this->decoyID == 0) { EnPoSisters_MegFightSetup2(this); } else { @@ -1034,21 +1048,21 @@ void EnPoSisters_SisterInit(EnPoSisters* this, PlayState* play) { f32 div; if (SkelAnime_Update(&this->skelAnime)) { - this->sisColor.a = 255; - if (this->sisterID == EN_POESIS_AMY) { + this->sisterColor.a = 255; + if (this->sisterID == EN_PO_SISTERS_AMY) { this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; this->actor.home.pos.x = 1992.0f; this->actor.home.pos.z = -1440.0f; - this->sisFlags |= (EN_POESIS_FLAG_HOVER | EN_POESIS_FLAG_BGCHECK); + this->sisterFlags |= (EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_BGCHECK); EnPoSisters_FightSetup(this); } else { EnPoSisters_JoelleBethInit(this); } } else { div = this->skelAnime.curFrame / this->skelAnime.endFrame; - this->sisColor.a = 255.0f * div; + this->sisterColor.a = 255.0f * div; } - if (this->sisterID != EN_POESIS_AMY && Animation_OnFrame(&this->skelAnime, 1.0f)) { + if (this->sisterID != EN_PO_SISTERS_AMY && Animation_OnFrame(&this->skelAnime, 1.0f)) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_APPEAR); } Actor_SetFocus(&this->actor, 40.0f); @@ -1076,16 +1090,16 @@ void EnPoSisters_JoelleBethWait(EnPoSisters* this, PlayState* play) { void EnPoSisters_IntroStep1(EnPoSisters* this, PlayState* play) { if (sIntroVar != 0 || !Player_InCsMode(play)) { - if (this->sisTimer != 0) { - this->sisTimer--; + if (this->sisterTimer != 0) { + this->sisterTimer--; } - if (this->sisTimer == 30) { - if (this->sisterID == EN_POESIS_MEG) { + if (this->sisterTimer == 30) { + if (this->sisterID == EN_PO_SISTERS_MEG) { OnePointCutscene_Init(play, 3140, 999, NULL, CAM_ID_MAIN); } sIntroVar = 1; } - if (this->sisTimer == 0) { + if (this->sisterTimer == 0) { EnPoSisters_IntroSetup2(this); } } @@ -1093,25 +1107,25 @@ void EnPoSisters_IntroStep1(EnPoSisters* this, PlayState* play) { } void EnPoSisters_IntroStep2(EnPoSisters* this, PlayState* play) { - this->sisTimer++; - EnPoSisters_MoveTorchFlames(this, this->sisTimer, &this->actor.home.pos); - if (this->sisTimer == 32) { + this->sisterTimer++; + EnPoSisters_MoveTorchFlames(this, this->sisterTimer, &this->actor.home.pos); + if (this->sisterTimer == 32) { EnPoSisters_SetupIntro3(this); } } void EnPoSisters_IntroStep3(EnPoSisters* this, PlayState* play) { - this->sisTimer--; - if (this->sisTimer == 0) { + this->sisterTimer--; + if (this->sisterTimer == 0) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_APPEAR); - this->sisFlags &= ~EN_POESIS_FLAG_NOMTXF; + this->sisterFlags &= ~EN_PO_SISTERS_FLAG_NOMTXF; } - if (this->sisTimer <= 0) { + if (this->sisterTimer <= 0) { if (SkelAnime_Update(&this->skelAnime)) { - this->sisColor.a = 255; + this->sisterColor.a = 255; sIntroVar |= (1 << this->sisterID); } else { - this->sisColor.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; + this->sisterColor.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; } } if (sIntroVar == 15) { @@ -1121,42 +1135,42 @@ void EnPoSisters_IntroStep3(EnPoSisters* this, PlayState* play) { void EnPoSisters_IntroStep4(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (this->sisTimer != 0) { - this->sisTimer--; + if (this->sisterTimer != 0) { + this->sisterTimer--; } - EnPoSisters_MoveTorchFlames(this, this->sisTimer, &this->actor.home.pos); - if (this->sisTimer == 0) { + EnPoSisters_MoveTorchFlames(this, this->sisterTimer, &this->actor.home.pos); + if (this->sisterTimer == 0) { EnPoSisters_SetupIntro5(this, play); } } void EnPoSisters_IntroStep5(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - this->sisTimer--; + this->sisterTimer--; Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.world.rot.y, 0x500); - if (this->sisTimer == 0 && this->sisterID == EN_POESIS_MEG) { + if (this->sisterTimer == 0 && this->sisterID == EN_PO_SISTERS_MEG) { play->envCtx.lightSettingOverride = 4; } - if (this->sisTimer < 0) { + if (this->sisterTimer < 0) { Math_StepToF(&this->actor.speed, 5.0f, 0.2f); } - if (this->sisTimer == -70 && this->sisterID == EN_POESIS_JOELLE) { + if (this->sisterTimer == -70 && this->sisterID == EN_PO_SISTERS_JOELLE) { SfxSource_PlaySfxAtFixedWorldPos(play, &sIntroLaughPos, 40, NA_SE_EN_PO_LAUGH); } - if (this->sisTimer < -120) { + if (this->sisterTimer < -120) { Actor_Kill(&this->actor); } } void EnPoSisters_TickVanish(EnPoSisters* this, PlayState* play) { - if (this->actor.isLockedOn && this->sisColor.a == 255) { + if (this->actor.isLockedOn && this->sisterColor.a == 255) { if (this->vanishTimer != 0) { this->vanishTimer--; } } else { this->vanishTimer = 20; } - if (this->sisColor.a == 0) { + if (this->sisterColor.a == 0) { if (this->megVar != 0) { this->megVar--; } @@ -1165,7 +1179,7 @@ void EnPoSisters_TickVanish(EnPoSisters* this, PlayState* play) { this->actionFunc != EnPoSisters_Hit) { if (this->vanishTimer == 0) { EnPoSisters_SetupVanish(this); - } else if (this->megVar == 0 && this->sisColor.a == 0) { + } else if (this->megVar == 0 && this->sisterColor.a == 0) { EnPoSisters_SetupReveal(this, play); } } @@ -1188,17 +1202,17 @@ void EnPoSisters_CheckDamage(EnPoSisters* this, PlayState* play) { Item_DropCollectible(play, &itemPos, ITEM00_ARROWS_SMALL); } } else if (this->collider.base.colMaterial == COL_MATERIAL_METAL || - (this->actor.colChkInfo.damageReaction == POESIS_DMG_REACT_OTHER && + (this->actor.colChkInfo.damageReaction == EN_PO_SISTERS_DMG_REACT_OTHER && this->actor.colChkInfo.damage == 0)) { - if (this->sisterID == EN_POESIS_MEG) { + if (this->sisterID == EN_PO_SISTERS_MEG) { this->actor.freezeTimer = 0; } - } else if (this->actor.colChkInfo.damageReaction == POESIS_DMG_REACT_NUT) { + } else if (this->actor.colChkInfo.damageReaction == EN_PO_SISTERS_DMG_REACT_NUT) { this->actor.world.rot.y = this->actor.shape.rot.y; - this->sisFlags |= EN_POESIS_FLAG_ROTATE; + this->sisterFlags |= EN_PO_SISTERS_FLAG_ROTATE; EnPoSisters_SetupReveal(this, play); - } else if (this->sisterID == EN_POESIS_MEG && - this->actor.colChkInfo.damageReaction == POESIS_DMG_REACT_SWORD && + } else if (this->sisterID == EN_PO_SISTERS_MEG && + this->actor.colChkInfo.damageReaction == EN_PO_SISTERS_DMG_REACT_SWORD && this->actionFunc == EnPoSisters_MegFightStep1) { if (this->megVar == 0) { this->megVar = -45; @@ -1225,17 +1239,17 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) { EnPoSisters_OnATHitSetup(this); } EnPoSisters_CheckDamage(this, play); - if (this->sisFlags & EN_POESIS_FLAG_VANISH) { + if (this->sisterFlags & EN_PO_SISTERS_FLAG_VANISH) { EnPoSisters_TickVanish(this, play); } this->actionFunc(this, play); - if (this->sisFlags & EN_POESIS_FLAG_UPDATEMASK) { - if (this->sisFlags & EN_POESIS_FLAG_HOVER) { + if (this->sisterFlags & EN_PO_SISTERS_FLAG_UPDATEMASK) { + if (this->sisterFlags & EN_PO_SISTERS_FLAG_HOVER) { EnPoSisters_Hover(this, play); } Actor_MoveXZGravity(&this->actor); - if (this->sisFlags & EN_POESIS_FLAG_BGCHECK) { + if (this->sisterFlags & EN_PO_SISTERS_FLAG_BGCHECK) { Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 0.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2); } else { @@ -1261,7 +1275,7 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) { this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT; CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); } - if (this->sisFlags & EN_POESIS_FLAG_ACCOL) { + if (this->sisterFlags & EN_PO_SISTERS_FLAG_ACCOL) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); } if (this->actionFunc != EnPoSisters_MegUpdate) { @@ -1270,44 +1284,45 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) { Actor_SetFocus(&this->actor, 40.0f); if (this->actionFunc == EnPoSisters_Hit2) { this->actor.shape.rot.y = this->actor.world.rot.y + 0x8000; - } else if (this->sisFlags & EN_POESIS_FLAG_ROTATE) { + } else if (this->sisterFlags & EN_PO_SISTERS_FLAG_ROTATE) { this->actor.shape.rot.y = this->actor.world.rot.y; } } } +/* set eye color based on sister's animation. */ void EnPoSisters_TintEyes(EnPoSisters* this) { s16 temp_b; if (this->skelAnime.animation == &gPoeSistersAttackAnim) { - this->sisColor.r = CLAMP_MAX((s16)(this->sisColor.r + 5), 255); - this->sisColor.g = CLAMP_MIN((s16)(this->sisColor.g - 5), 50); - temp_b = this->sisColor.b - 5; - this->sisColor.b = CLAMP_MIN(temp_b, 0); + this->sisterColor.r = CLAMP_MAX((s16)(this->sisterColor.r + 5), 255); + this->sisterColor.g = CLAMP_MIN((s16)(this->sisterColor.g - 5), 50); + temp_b = this->sisterColor.b - 5; + this->sisterColor.b = CLAMP_MIN(temp_b, 0); } else if (this->skelAnime.animation == &gPoeSistersFleeAnim) { - this->sisColor.r = CLAMP_MAX((s16)(this->sisColor.r + 5), 80); - this->sisColor.g = CLAMP_MAX((s16)(this->sisColor.g + 5), 255); - temp_b = this->sisColor.b + 5; - this->sisColor.b = CLAMP_MAX(temp_b, 225); + this->sisterColor.r = CLAMP_MAX((s16)(this->sisterColor.r + 5), 80); + this->sisterColor.g = CLAMP_MAX((s16)(this->sisterColor.g + 5), 255); + temp_b = this->sisterColor.b + 5; + this->sisterColor.b = CLAMP_MAX(temp_b, 225); } else if (this->skelAnime.animation == &gPoeSistersDamagedAnim) { if (this->actor.colorFilterTimer & 2) { - this->sisColor.r = 0; - this->sisColor.g = 0; - this->sisColor.b = 0; + this->sisterColor.r = 0; + this->sisterColor.g = 0; + this->sisterColor.b = 0; } else { - this->sisColor.r = 80; - this->sisColor.g = 255; - this->sisColor.b = 225; + this->sisterColor.r = 80; + this->sisterColor.g = 255; + this->sisterColor.b = 225; } } else { - this->sisColor.r = CLAMP_MAX((s16)(this->sisColor.r + 5), 255); - this->sisColor.g = CLAMP_MAX((s16)(this->sisColor.g + 5), 255); - if (this->sisColor.b > 210) { - temp_b = this->sisColor.b - 5; - this->sisColor.b = CLAMP_MIN(temp_b, 210); + this->sisterColor.r = CLAMP_MAX((s16)(this->sisterColor.r + 5), 255); + this->sisterColor.g = CLAMP_MAX((s16)(this->sisterColor.g + 5), 255); + if (this->sisterColor.b > 210) { + temp_b = this->sisterColor.b - 5; + this->sisterColor.b = CLAMP_MIN(temp_b, 210); } else { - temp_b = this->sisColor.b + 5; - this->sisColor.b = CLAMP_MAX(temp_b, 210); + temp_b = this->sisterColor.b + 5; + this->sisterColor.b = CLAMP_MAX(temp_b, 210); } } } @@ -1317,26 +1332,26 @@ s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve EnPoSisters* this = (EnPoSisters*)thisx; Color_RGBA8* color; - if (limbIndex == 1 && (this->sisFlags & EN_POESIS_FLAG_SPIN)) { - if (this->sisTimer >= 284) { - rot->x += (this->sisTimer * 0x1000) - 0x11C000; + if (limbIndex == 1 && (this->sisterFlags & EN_PO_SISTERS_FLAG_SPIN)) { + if (this->sisterTimer >= 284) { + rot->x += (this->sisterTimer * 0x1000) - 0x11C000; } else { - rot->x += (this->sisTimer * 0x1000) - 0xF000; + rot->x += (this->sisterTimer * 0x1000) - 0xF000; } } - if (this->sisColor.a == 0 || limbIndex == 8 || - (this->actionFunc == EnPoSisters_ReleaseFlame && this->sisTimer >= 8)) { + if (this->sisterColor.a == 0 || limbIndex == 8 || + (this->actionFunc == EnPoSisters_ReleaseFlame && this->sisterTimer >= 8)) { *dList = NULL; } else if (limbIndex == 9) { *dList = sSisterBodies[this->sisterID]; } else if (limbIndex == 10) { *dList = sSisterFaces[this->sisterID]; gDPPipeSync((*gfxP)++); - gDPSetEnvColor((*gfxP)++, this->sisColor.r, this->sisColor.g, this->sisColor.b, this->sisColor.a); + gDPSetEnvColor((*gfxP)++, this->sisterColor.r, this->sisterColor.g, this->sisterColor.b, this->sisterColor.a); } else if (limbIndex == 11) { color = &sLimb11Colors[this->sisterID]; gDPPipeSync((*gfxP)++); - gDPSetEnvColor((*gfxP)++, color->r, color->g, color->b, this->sisColor.a); + gDPSetEnvColor((*gfxP)++, color->r, color->g, color->b, this->sisterColor.a); } return false; } @@ -1346,12 +1361,12 @@ void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s s32 i; s32 pad; - if (this->actionFunc == EnPoSisters_ReleaseFlame && this->sisTimer >= 8 && limbIndex == 9) { + if (this->actionFunc == EnPoSisters_ReleaseFlame && this->sisterTimer >= 8 && limbIndex == 9) { MATRIX_FINALIZE_AND_LOAD((*gfxP)++, play->state.gfxCtx, "../z_en_po_sisters.c", 2876); gSPDisplayList((*gfxP)++, gPoSistersBurnDL); } if (limbIndex == 8 && this->actionFunc != EnPoSisters_MegMourns) { - if (this->sisFlags & EN_POESIS_FLAG_TORCH) { + if (this->sisterFlags & EN_PO_SISTERS_FLAG_TORCH) { for (i = this->torchFlames - 1; i > 0; i--) { this->torchPos[i] = this->torchPos[i - 1]; } @@ -1376,7 +1391,7 @@ void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s } else { Lights_PointSetColorAndRadius(&this->lightInfo, 0, 0, 0, 0); } - if (!(this->sisFlags & EN_POESIS_FLAG_NOMTXF)) { + if (!(this->sisterFlags & EN_PO_SISTERS_FLAG_NOMTXF)) { Matrix_Get(&this->torchMtx); } } @@ -1396,20 +1411,20 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { EnPoSisters_TintEyes(this); Gfx_SetupDL_25Opa(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx); - if (this->sisColor.a == 255 || this->sisColor.a == 0) { - gDPSetEnvColor(POLY_OPA_DISP++, this->sisColor.r, this->sisColor.g, this->sisColor.b, this->sisColor.a); + if (this->sisterColor.a == 255 || this->sisterColor.a == 0) { + gDPSetEnvColor(POLY_OPA_DISP++, this->sisterColor.r, this->sisterColor.g, this->sisterColor.b, this->sisterColor.a); gSPSegment(POLY_OPA_DISP++, 0x09, D_80116280 + 2); POLY_OPA_DISP = SkelAnime_Draw(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnPoSisters_OverrideLimbDraw, EnPoSisters_PostLimbDraw, &this->actor, POLY_OPA_DISP); } else { - gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, this->sisColor.a); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, this->sisterColor.a); gSPSegment(POLY_XLU_DISP++, 0x09, D_80116280); POLY_XLU_DISP = SkelAnime_Draw(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnPoSisters_OverrideLimbDraw, EnPoSisters_PostLimbDraw, &this->actor, POLY_XLU_DISP); } - if (!(this->sisFlags & EN_POESIS_FLAG_NOMTXF)) { + if (!(this->sisterFlags & EN_PO_SISTERS_FLAG_NOMTXF)) { Matrix_Put(&this->torchMtx); MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_en_po_sisters.c", 3034); gSPDisplayList(POLY_OPA_DISP++, gPoSistersTorchDL); @@ -1419,18 +1434,18 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { (play->gameplayFrames * -20) % 512, 0x20, 0x80)); gDPSetEnvColor(POLY_XLU_DISP++, fireColor->r, fireColor->g, fireColor->b, fireColor->a); if (this->actionFunc == EnPoSisters_Die) { - if (this->sisTimer < 32) { - alpha = ((32 - this->sisTimer) * 255) / 32; + if (this->sisterTimer < 32) { + alpha = ((32 - this->sisterTimer) * 255) / 32; scale = 0.0056000003f; } else { - alpha = (this->sisTimer * 255 - 8160) / 32; + alpha = (this->sisterTimer * 255 - 8160) / 32; scale = 0.0027f; } } else if (this->actionFunc == EnPoSisters_IntroStep2) { - alpha = ((32 - this->sisTimer) * 255) / 32; + alpha = ((32 - this->sisterTimer) * 255) / 32; scale = 0.0027f; } else if (this->actionFunc == EnPoSisters_IntroStep4) { - alpha = ((32 - this->sisTimer) * 255) / 32; + alpha = ((32 - this->sisterTimer) * 255) / 32; scale = 0.0035f; } else if (this->actionFunc == EnPoSisters_IntroStep1) { // alpha initialized in loop below @@ -1449,7 +1464,7 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { Matrix_Translate(this->torchPos[i].x, this->torchPos[i].y, this->torchPos[i].z, MTXMODE_NEW); Matrix_RotateZYX(0, (s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x8000), 0, MTXMODE_APPLY); if (this->actionFunc == EnPoSisters_ReleaseFlame) { - scale = (this->sisTimer - i) * 0.025f + 0.5f; + scale = (this->sisterTimer - i) * 0.025f + 0.5f; scale = CLAMP(scale, 0.5f, 0.8f) * 0.007f; } Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h index 4824f34c75..ac525bbb9c 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h @@ -18,12 +18,12 @@ typedef struct EnPoSisters { /* 0x0196 */ u8 hoverPulse; /* 0x0197 */ u8 vanishTimer; /* 0x0198 */ u8 torchFlames; // number of torch flames to draw - /* 0x0199 */ u8 sisFlags; // uses EnPoSisFlags - /* 0x019A */ s16 sisTimer; // timer used for various situations + /* 0x0199 */ u8 sisterFlags; // uses EnPoSisFlags + /* 0x019A */ s16 sisterTimer; // timer used for various situations /* 0x019C */ s16 megVar; // Meg and her decoys use it as a behaviour timer /* 0x019E */ Vec3s jointTable[12]; /* 0x01E6 */ Vec3s morphTable[12]; - /* 0x022E */ Color_RGBA8 sisColor; // (rgb) for eyes, (a) for rest of body + /* 0x022E */ Color_RGBA8 sisterColor; // (rgb) for eyes, (a) for rest of body /* 0x0234 */ Vec3f torchPos[8]; // positions of the torch flame and smaller circling flames /* 0x0294 */ f32 circleDist; // distance of Meg when circling Link. /* 0x0298 */ LightNode* lightNode; @@ -32,27 +32,15 @@ typedef struct EnPoSisters { /* 0x02F8 */ MtxF torchMtx; } EnPoSisters; // size = 0x0338 -typedef enum EnPoSisNames { - EN_POESIS_MEG, // purple sister, circles Link with decoys - EN_POESIS_JOELLE, // red sister, hides in portraits - EN_POESIS_BETH, // blue sister, hides in portraits - EN_POESIS_AMY, // green sister, hides in block puzzle -} EnPoSisNames; +typedef enum EnPoSisterNames { + EN_PO_SISTERS_MEG, // purple sister, circles Link with decoys + EN_PO_SISTERS_JOELLE, // red sister, hides in portraits + EN_PO_SISTERS_BETH, // blue sister, hides in portraits + EN_PO_SISTERS_AMY, // green sister, hides in block puzzle +} EnPoSisterNames; -typedef enum EnPoSisFlags { - EN_POESIS_FLAG_ACCOL=1<<0, // set AC collision - EN_POESIS_FLAG_ROTATE=1<<1, // set shape.rot.y to world.rot.y - EN_POESIS_FLAG_VANISH=1<<2, // tick vanishTimer, then disappear if 0. - EN_POESIS_FLAG_HOVER=1<<3, // hover up and down a few inches - EN_POESIS_FLAG_BGCHECK=1<<4,// BGCheck floors and walls - EN_POESIS_FLAG_UPDATEMASK=(EN_POESIS_FLAG_ACCOL|EN_POESIS_FLAG_ROTATE| - EN_POESIS_FLAG_VANISH|EN_POESIS_FLAG_HOVER|EN_POESIS_FLAG_BGCHECK), - EN_POESIS_FLAG_TORCH=1<<5, // manipulate torch flames - EN_POESIS_FLAG_SPIN=1<<6, // the real Meg spins as a tell - EN_POESIS_FLAG_NOMTXF=1<<7, //don't read or write torchMtx -} EnPoSisFlags; -#define EN_POESIS_DECOY_PARAM 1<<10 // param for Meg's decoys -#define EN_POESIS_INTRO_PARAM 1<<12 // param for Poe Sisters when first entering foyer +#define EN_PO_SISTERS_DECOY_PARAM (1 << 10) // param for Meg's decoys +#define EN_PO_SISTERS_INTRO_PARAM (1 << 12) // param for Poe Sisters when first entering foyer #endif From 106a877535e9e996fb3a9cb908b99f334c3b49d3 Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Mon, 8 Dec 2025 17:09:52 -0500 Subject: [PATCH 09/24] `En_Po_Sisters`: fixed mismatch, more comments, moved enum, new macro --- .../actors/ovl_En_Po_Sisters/z_en_po_sisters.c | 18 ++++++++++-------- .../actors/ovl_En_Po_Sisters/z_en_po_sisters.h | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 84e77b983f..43e37e43b3 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -115,17 +115,11 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit sColChkInfoInit = { 10, 25, 60, 40 }; -typedef enum PoeSisDamageReaction { - EN_PO_SISTERS_DMG_REACT_OTHER, - EN_PO_SISTERS_DMG_REACT_SWORD=14, - EN_PO_SISTERS_DMG_REACT_NUT, -}; - typedef enum EnPoSisterFlags { EN_PO_SISTERS_FLAG_ACCOL=1<<0, // set AC collision EN_PO_SISTERS_FLAG_ROTATE=1<<1, // set shape.rot.y to world.rot.y EN_PO_SISTERS_FLAG_VANISH=1<<2, // tick vanishTimer, then disappear if 0. - EN_PO_SISTERS_FLAG_HOVER=1<<3, // hover up and down a few inches + EN_PO_SISTERS_FLAG_HOVER=1<<3, // hover up and down a few units towards y-target EN_PO_SISTERS_FLAG_BGCHECK=1<<4,// BGCheck floors and walls EN_PO_SISTERS_FLAG_UPDATEMASK=(EN_PO_SISTERS_FLAG_ACCOL|EN_PO_SISTERS_FLAG_ROTATE| EN_PO_SISTERS_FLAG_VANISH|EN_PO_SISTERS_FLAG_HOVER|EN_PO_SISTERS_FLAG_BGCHECK), @@ -134,6 +128,12 @@ typedef enum EnPoSisterFlags { EN_PO_SISTERS_FLAG_NOMTXF=1<<7, //don't read or write torchMtx } EnPoSisterFlags; +typedef enum PoeSisDamageReaction { + EN_PO_SISTERS_DMG_REACT_OTHER, + EN_PO_SISTERS_DMG_REACT_SWORD=14, + EN_PO_SISTERS_DMG_REACT_NUT, +}; + static DamageTable sDamageTable = { /* Deku nut */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_NUT), @@ -351,7 +351,7 @@ void EnPoSisters_HitSetup(EnPoSisters* this) { if (this->sisterID != EN_PO_SISTERS_MEG) { this->actor.speed = 10.0f; } - this->sisterFlags &= ~(EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_ROTATE); + this->sisterFlags &= ~(EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_ROTATE | EN_PO_SISTERS_FLAG_ACCOL); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 16); this->actionFunc = EnPoSisters_Hit; } @@ -624,6 +624,8 @@ void EnPoSisters_Hover(EnPoSisters* this, PlayState* play) { } else if (this->sisterID == EN_PO_SISTERS_MEG || this->sisterID == EN_PO_SISTERS_AMY) { targetY = player->actor.world.pos.y + 5.0f; } else { + // Beth and Joelle are hard-coded to the worldspace-y + // at the botttom of their rooms' staircase targetY = 832.0f; } Math_ApproachF(&this->actor.world.pos.y, targetY, 0.5f, 3.0f); diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h index ac525bbb9c..da42eb32a2 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h @@ -18,7 +18,7 @@ typedef struct EnPoSisters { /* 0x0196 */ u8 hoverPulse; /* 0x0197 */ u8 vanishTimer; /* 0x0198 */ u8 torchFlames; // number of torch flames to draw - /* 0x0199 */ u8 sisterFlags; // uses EnPoSisFlags + /* 0x0199 */ u8 sisterFlags; // uses EnPoSisterFlags /* 0x019A */ s16 sisterTimer; // timer used for various situations /* 0x019C */ s16 megVar; // Meg and her decoys use it as a behaviour timer /* 0x019E */ Vec3s jointTable[12]; @@ -39,7 +39,7 @@ typedef enum EnPoSisterNames { EN_PO_SISTERS_AMY, // green sister, hides in block puzzle } EnPoSisterNames; - +#define EN_PO_SISTERS_PARAM(name) (EN_PO_SISTERS_#name << 8) // param for which sister #define EN_PO_SISTERS_DECOY_PARAM (1 << 10) // param for Meg's decoys #define EN_PO_SISTERS_INTRO_PARAM (1 << 12) // param for Poe Sisters when first entering foyer From 299ef8c9b984871b43d460a3be11539ba3def427 Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Mon, 8 Dec 2025 17:19:25 -0500 Subject: [PATCH 10/24] `En_Po_Sisters`: move static vars to appropriate functions --- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 80 ++++++++++--------- 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 43e37e43b3..9eddf7d7c8 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -177,45 +177,6 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(lockOnArrowOffset, 6000, ICHAIN_STOP), }; -static Vec3f sZeroVector = { 0.0f, 0.0f, 0.0f }; - -// y-rotations when leaving foyer at end of intro scene -static s16 sIntroExitFacings[4] = { 0xB000, 0xD000, 0x5000, 0x3000 }; - -// positions for torches to be lit during death cutscene -static Vec3s sDeathTorchPos[4] = { - { -22, 337, -1704 }, - { -431, 879, -3410 }, - { 549, 879, -3410 }, - { 1717, 515, -1340 }, -}; - -// position of laugh at the end of sisters' intro animation -static Vec3f sIntroLaughPos = { 120.0f, 250.0f, -1420.0f }; - -static Gfx* sSisterBodies[4] = { - gPoeSistersMegBodyDL, - gPoeSistersJoelleBodyDL, - gPoeSistersBethBodyDL, - gPoeSistersAmyBodyDL, -}; - -static Gfx* sSisterFaces[4] = { - gPoeSistersMegFaceDL, - gPoeSistersJoelleFaceDL, - gPoeSistersBethFaceDL, - gPoSistersAmyFaceDL, -}; - -static Color_RGBA8 sLimb11Colors[4] = { - { 80, 0, 100, 0 }, - { 80, 15, 0, 0 }, - { 0, 70, 50, 0 }, - { 70, 70, 0, 0 }, -}; - -static Vec3f sTorchVec = { 1000.0f, -1700.0f, 0.0f }; - void EnPoSisters_Init(Actor* thisx, PlayState* play) { EnPoSisters* this = (EnPoSisters*)thisx; s32 pad; @@ -468,6 +429,7 @@ void EnPoSisters_MegSetup(EnPoSisters* this, PlayState* play) { } void EnPoSisters_DecoySetup(EnPoSisters* this, PlayState* play) { + static Vec3f sZeroVector = { 0.0f, 0.0f, 0.0f }; Vec3f vec; this->actor.draw = NULL; @@ -601,6 +563,9 @@ void EnPoSisters_SetupIntro4(EnPoSisters* this) { } void EnPoSisters_SetupIntro5(EnPoSisters* this, PlayState* play) { + // y-rotations when leaving foyer at end of intro scene + static s16 sIntroExitFacings[4] = { 0xB000, 0xD000, 0x5000, 0x3000 }; + Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); this->torchFlames = 0; this->sisterFlags = EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_TORCH; @@ -861,6 +826,15 @@ void EnPoSisters_ReleaseFlame(EnPoSisters* this, PlayState* play) { /* Show the flame moving back to the proper torch */ void EnPoSisters_Die(EnPoSisters* this, PlayState* play) { + + // positions for torches to be lit during death cutscene + static Vec3s sDeathTorchPos[4] = { + { -22, 337, -1704 }, + { -431, 879, -3410 }, + { 549, 879, -3410 }, + { 1717, 515, -1340 }, + }; + this->sisterTimer++; if (this->sisterTimer == 64) { Flags_SetSwitch(play, this->actor.params); @@ -1147,6 +1121,10 @@ void EnPoSisters_IntroStep4(EnPoSisters* this, PlayState* play) { } void EnPoSisters_IntroStep5(EnPoSisters* this, PlayState* play) { + + // position of laugh at the end of sisters' intro animation + static Vec3f sIntroLaughPos = { 120.0f, 250.0f, -1420.0f }; + SkelAnime_Update(&this->skelAnime); this->sisterTimer--; Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.world.rot.y, 0x500); @@ -1334,6 +1312,27 @@ s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve EnPoSisters* this = (EnPoSisters*)thisx; Color_RGBA8* color; + static Gfx* sSisterBodies[4] = { + gPoeSistersMegBodyDL, + gPoeSistersJoelleBodyDL, + gPoeSistersBethBodyDL, + gPoeSistersAmyBodyDL, + }; + + static Gfx* sSisterFaces[4] = { + gPoeSistersMegFaceDL, + gPoeSistersJoelleFaceDL, + gPoeSistersBethFaceDL, + gPoSistersAmyFaceDL, + }; + + static Color_RGBA8 sLimb11Colors[4] = { + { 80, 0, 100, 0 }, + { 80, 15, 0, 0 }, + { 0, 70, 50, 0 }, + { 70, 70, 0, 0 }, + }; + if (limbIndex == 1 && (this->sisterFlags & EN_PO_SISTERS_FLAG_SPIN)) { if (this->sisterTimer >= 284) { rot->x += (this->sisterTimer * 0x1000) - 0x11C000; @@ -1359,6 +1358,9 @@ s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve } void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfxP) { + + static Vec3f sTorchVec = { 1000.0f, -1700.0f, 0.0f }; + EnPoSisters* this = (EnPoSisters*)thisx; s32 i; s32 pad; From 6b3c090239924f170ea2beec4c5b0b49edd4dadd Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Mon, 8 Dec 2025 17:42:13 -0500 Subject: [PATCH 11/24] `En_Po_Sisters`: add and implement param macros at Actor_Spawns --- src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c | 7 +++++-- src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c | 5 ++++- src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index bbfecc301f..f39d846597 100644 --- a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -6,6 +6,8 @@ #include "z_bg_po_event.h" +#include "overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h" + #include "libc64/qrand.h" #include "array_count.h" #include "gfx.h" @@ -353,7 +355,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, PlayState* play) { if ((this->type == 0) && (this->index == 0)) { amy = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->dyna.actor.world.pos.x + 30.0f, this->dyna.actor.world.pos.y - 30.0f, this->dyna.actor.world.pos.z + 30.0f, 0, - this->dyna.actor.shape.rot.y, 0, this->dyna.actor.params + 0x300); + this->dyna.actor.shape.rot.y, 0, this->dyna.actor.params + (EN_PO_SISTERS_PARAM(AMY))); if (amy != NULL) { OnePointCutscene_Init(play, 3170, 30, amy, CAM_ID_MAIN); } @@ -549,7 +551,8 @@ void BgPoEvent_PaintingPresent(BgPoEvent* this, PlayState* play) { } else if (this->collider.base.acFlags & AC_HIT) { if (!BgPoEvent_NextPainting(this)) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, thisx->world.pos.x, thisx->world.pos.y - 40.0f, - thisx->world.pos.z, 0, thisx->shape.rot.y, 0, thisx->params + ((this->type - 1) << 8)); + thisx->world.pos.z, 0, thisx->shape.rot.y, 0, + thisx->params + EN_PO_SISTERS_PARAM_N((this->type - 1))); OnePointCutscene_Init(play, 3160, 80, thisx, CAM_ID_MAIN); Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME); diff --git a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c index 0c1ce9924d..c844555779 100644 --- a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c +++ b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c @@ -6,6 +6,8 @@ #include "z_bg_po_syokudai.h" +#include "overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h" + #include "libc64/qrand.h" #include "gfx.h" #include "gfx_setupdl.h" @@ -116,7 +118,8 @@ void BgPoSyokudai_Init(Actor* thisx, PlayState* play) { } else if (!Flags_GetSwitch(play, POE_TORCH_FLAG + POE_FLAME_PURPLE) && !Flags_GetSwitch(play, 0x1B)) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, thisx->world.pos.x, thisx->world.pos.y + 52.0f, - thisx->world.pos.z, 0, 0, 0, (this->flameColor << 8) + thisx->params + 0x1000); + thisx->world.pos.z, 0, 0, 0, + EN_PO_SISTERS_PARAM_N(this->flameColor) + thisx->params + EN_PO_SISTERS_INTRO_PARAM); } else if (!Flags_GetSwitch(play, thisx->params)) { if (play->envCtx.lightSettingOverride == LIGHT_SETTING_OVERRIDE_NONE) { diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h index da42eb32a2..350ca72ba6 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h @@ -39,7 +39,8 @@ typedef enum EnPoSisterNames { EN_PO_SISTERS_AMY, // green sister, hides in block puzzle } EnPoSisterNames; -#define EN_PO_SISTERS_PARAM(name) (EN_PO_SISTERS_#name << 8) // param for which sister +#define EN_PO_SISTERS_PARAM_N(n) (n << 8) // param for which sister by number +#define EN_PO_SISTERS_PARAM(name) (EN_PO_SISTERS_##name << 8) // param for which sister by name #define EN_PO_SISTERS_DECOY_PARAM (1 << 10) // param for Meg's decoys #define EN_PO_SISTERS_INTRO_PARAM (1 << 12) // param for Poe Sisters when first entering foyer From 54a76ae7f06c52ceaf79b7c55437bd457c8a4fdd Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Mon, 8 Dec 2025 19:01:36 -0500 Subject: [PATCH 12/24] `En_Po_Sisters`: formatting --- .../actors/ovl_Bg_Po_Event/z_bg_po_event.c | 2 +- .../ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c | 2 +- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 68 ++++++++++--------- 3 files changed, 38 insertions(+), 34 deletions(-) diff --git a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index f39d846597..8e8d11d56f 100644 --- a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -551,7 +551,7 @@ void BgPoEvent_PaintingPresent(BgPoEvent* this, PlayState* play) { } else if (this->collider.base.acFlags & AC_HIT) { if (!BgPoEvent_NextPainting(this)) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, thisx->world.pos.x, thisx->world.pos.y - 40.0f, - thisx->world.pos.z, 0, thisx->shape.rot.y, 0, + thisx->world.pos.z, 0, thisx->shape.rot.y, 0, thisx->params + EN_PO_SISTERS_PARAM_N((this->type - 1))); OnePointCutscene_Init(play, 3160, 80, thisx, CAM_ID_MAIN); Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME); diff --git a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c index c844555779..c88e575dc4 100644 --- a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c +++ b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c @@ -118,7 +118,7 @@ void BgPoSyokudai_Init(Actor* thisx, PlayState* play) { } else if (!Flags_GetSwitch(play, POE_TORCH_FLAG + POE_FLAME_PURPLE) && !Flags_GetSwitch(play, 0x1B)) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, thisx->world.pos.x, thisx->world.pos.y + 52.0f, - thisx->world.pos.z, 0, 0, 0, + thisx->world.pos.z, 0, 0, 0, EN_PO_SISTERS_PARAM_N(this->flameColor) + thisx->params + EN_PO_SISTERS_INTRO_PARAM); } else if (!Flags_GetSwitch(play, thisx->params)) { diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 9eddf7d7c8..86d9b39e16 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -116,21 +116,21 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit sColChkInfoInit = { 10, 25, 60, 40 }; typedef enum EnPoSisterFlags { - EN_PO_SISTERS_FLAG_ACCOL=1<<0, // set AC collision - EN_PO_SISTERS_FLAG_ROTATE=1<<1, // set shape.rot.y to world.rot.y - EN_PO_SISTERS_FLAG_VANISH=1<<2, // tick vanishTimer, then disappear if 0. - EN_PO_SISTERS_FLAG_HOVER=1<<3, // hover up and down a few units towards y-target - EN_PO_SISTERS_FLAG_BGCHECK=1<<4,// BGCheck floors and walls - EN_PO_SISTERS_FLAG_UPDATEMASK=(EN_PO_SISTERS_FLAG_ACCOL|EN_PO_SISTERS_FLAG_ROTATE| - EN_PO_SISTERS_FLAG_VANISH|EN_PO_SISTERS_FLAG_HOVER|EN_PO_SISTERS_FLAG_BGCHECK), - EN_PO_SISTERS_FLAG_TORCH=1<<5, // manipulate torch flames - EN_PO_SISTERS_FLAG_SPIN=1<<6, // the real Meg spins as a tell - EN_PO_SISTERS_FLAG_NOMTXF=1<<7, //don't read or write torchMtx + EN_PO_SISTERS_FLAG_ACCOL= 1 << 0, // set AC collision + EN_PO_SISTERS_FLAG_ROTATE = 1 << 1, // set shape.rot.y to world.rot.y + EN_PO_SISTERS_FLAG_VANISH = 1 << 2, // tick vanishTimer, then disappear if 0. + EN_PO_SISTERS_FLAG_HOVER = 1 << 3, // hover up and down a few units towards y-target + EN_PO_SISTERS_FLAG_BGCHECK = 1 << 4, // BGCheck floors and walls + EN_PO_SISTERS_FLAG_UPDATEMASK=(EN_PO_SISTERS_FLAG_ACCOL | EN_PO_SISTERS_FLAG_ROTATE | + EN_PO_SISTERS_FLAG_VANISH | EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_BGCHECK), + EN_PO_SISTERS_FLAG_TORCH = 1 << 5, // manipulate torch flames + EN_PO_SISTERS_FLAG_SPIN = 1 << 6, // the real Meg spins as a tell + EN_PO_SISTERS_FLAG_NOMTXF = 1 << 7, //don't read or write torchMtx } EnPoSisterFlags; typedef enum PoeSisDamageReaction { EN_PO_SISTERS_DMG_REACT_OTHER, - EN_PO_SISTERS_DMG_REACT_SWORD=14, + EN_PO_SISTERS_DMG_REACT_SWORD = 14, EN_PO_SISTERS_DMG_REACT_NUT, }; @@ -397,11 +397,14 @@ void EnPoSisters_ItemDrop(EnPoSisters* this, PlayState* play) { /*Meg will spawn 3 decoys and begin weeping. (or destroy the decoys and herself if one decoy fails.)*/ void EnPoSisters_MegSetup(EnPoSisters* this, PlayState* play) { - Actor* actor1 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, + Actor* actor1 = + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM) * 1)); - Actor* actor2 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, + Actor* actor2 = + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM) * 2)); - Actor* actor3 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, + Actor* actor3 = + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM) * 3)); s32 pad; s32 pad1; @@ -540,7 +543,7 @@ void EnPoSisters_IntroSetup2(EnPoSisters* this) { this->actionFunc = EnPoSisters_IntroStep2; } - +/* Setup reveal of Pos Sisters in intro scene */ void EnPoSisters_SetupIntro3(EnPoSisters* this) { Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 0.833f, 0.0f, Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE_INTERP, 0.0f); @@ -826,7 +829,7 @@ void EnPoSisters_ReleaseFlame(EnPoSisters* this, PlayState* play) { /* Show the flame moving back to the proper torch */ void EnPoSisters_Die(EnPoSisters* this, PlayState* play) { - + // positions for torches to be lit during death cutscene static Vec3s sDeathTorchPos[4] = { { -22, 337, -1704 }, @@ -1192,7 +1195,7 @@ void EnPoSisters_CheckDamage(EnPoSisters* this, PlayState* play) { this->sisterFlags |= EN_PO_SISTERS_FLAG_ROTATE; EnPoSisters_SetupReveal(this, play); } else if (this->sisterID == EN_PO_SISTERS_MEG && - this->actor.colChkInfo.damageReaction == EN_PO_SISTERS_DMG_REACT_SWORD && + this->actor.colChkInfo.damageReaction == EN_PO_SISTERS_DMG_REACT_SWORD && this->actionFunc == EnPoSisters_MegFightStep1) { if (this->megVar == 0) { this->megVar = -45; @@ -1313,24 +1316,24 @@ s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve Color_RGBA8* color; static Gfx* sSisterBodies[4] = { - gPoeSistersMegBodyDL, - gPoeSistersJoelleBodyDL, - gPoeSistersBethBodyDL, - gPoeSistersAmyBodyDL, + gPoeSistersMegBodyDL, + gPoeSistersJoelleBodyDL, + gPoeSistersBethBodyDL, + gPoeSistersAmyBodyDL, }; static Gfx* sSisterFaces[4] = { - gPoeSistersMegFaceDL, - gPoeSistersJoelleFaceDL, - gPoeSistersBethFaceDL, - gPoSistersAmyFaceDL, + gPoeSistersMegFaceDL, + gPoeSistersJoelleFaceDL, + gPoeSistersBethFaceDL, + gPoSistersAmyFaceDL, }; static Color_RGBA8 sLimb11Colors[4] = { - { 80, 0, 100, 0 }, - { 80, 15, 0, 0 }, - { 0, 70, 50, 0 }, - { 70, 70, 0, 0 }, + { 80, 0, 100, 0 }, + { 80, 15, 0, 0 }, + { 0, 70, 50, 0 }, + { 70, 70, 0, 0 }, }; if (limbIndex == 1 && (this->sisterFlags & EN_PO_SISTERS_FLAG_SPIN)) { @@ -1358,9 +1361,9 @@ s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve } void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfxP) { - + static Vec3f sTorchVec = { 1000.0f, -1700.0f, 0.0f }; - + EnPoSisters* this = (EnPoSisters*)thisx; s32 i; s32 pad; @@ -1416,7 +1419,8 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Opa(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx); if (this->sisterColor.a == 255 || this->sisterColor.a == 0) { - gDPSetEnvColor(POLY_OPA_DISP++, this->sisterColor.r, this->sisterColor.g, this->sisterColor.b, this->sisterColor.a); + gDPSetEnvColor(POLY_OPA_DISP++, this->sisterColor.r, this->sisterColor.g, this->sisterColor.b, + this->sisterColor.a); gSPSegment(POLY_OPA_DISP++, 0x09, D_80116280 + 2); POLY_OPA_DISP = SkelAnime_Draw(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnPoSisters_OverrideLimbDraw, From 1321ba2c5a22dbdbbf1b1154932dbbc6d00ae2ce Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Mon, 8 Dec 2025 19:41:26 -0500 Subject: [PATCH 13/24] Update z_en_po_sisters.c more formatting --- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 86d9b39e16..24330987fc 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -121,11 +121,11 @@ typedef enum EnPoSisterFlags { EN_PO_SISTERS_FLAG_VANISH = 1 << 2, // tick vanishTimer, then disappear if 0. EN_PO_SISTERS_FLAG_HOVER = 1 << 3, // hover up and down a few units towards y-target EN_PO_SISTERS_FLAG_BGCHECK = 1 << 4, // BGCheck floors and walls - EN_PO_SISTERS_FLAG_UPDATEMASK=(EN_PO_SISTERS_FLAG_ACCOL | EN_PO_SISTERS_FLAG_ROTATE | - EN_PO_SISTERS_FLAG_VANISH | EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_BGCHECK), - EN_PO_SISTERS_FLAG_TORCH = 1 << 5, // manipulate torch flames - EN_PO_SISTERS_FLAG_SPIN = 1 << 6, // the real Meg spins as a tell - EN_PO_SISTERS_FLAG_NOMTXF = 1 << 7, //don't read or write torchMtx + EN_PO_SISTERS_FLAG_UPDATEMASK=(EN_PO_SISTERS_FLAG_ACCOL | EN_PO_SISTERS_FLAG_ROTATE | EN_PO_SISTERS_FLAG_VANISH | + EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_BGCHECK), + EN_PO_SISTERS_FLAG_TORCH = 1 << 5, // manipulate torch flames + EN_PO_SISTERS_FLAG_SPIN = 1 << 6, // the real Meg spins as a tell + EN_PO_SISTERS_FLAG_NOMTXF = 1 << 7, // don't read or write torchMtx } EnPoSisterFlags; typedef enum PoeSisDamageReaction { @@ -134,7 +134,6 @@ typedef enum PoeSisDamageReaction { EN_PO_SISTERS_DMG_REACT_NUT, }; - static DamageTable sDamageTable = { /* Deku nut */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_NUT), /* Deku stick */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), @@ -399,13 +398,13 @@ void EnPoSisters_ItemDrop(EnPoSisters* this, PlayState* play) { void EnPoSisters_MegSetup(EnPoSisters* this, PlayState* play) { Actor* actor1 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM) * 1)); + this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM) * 1)); Actor* actor2 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM) * 2)); + this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM) * 2)); Actor* actor3 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM) * 3)); + this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM) * 3)); s32 pad; s32 pad1; @@ -733,7 +732,8 @@ void EnPoSisters_Hit(EnPoSisters* this, PlayState* play) { if (this->decoyID != 0) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.parent->shape.rot.y, (this->decoyID == 2) ? 0x800 : 0x400); - this->sisterColor.a = ((this->skelAnime.endFrame - this->skelAnime.curFrame) * 255.0f) / this->skelAnime.endFrame; + this->sisterColor.a = + ((this->skelAnime.endFrame - this->skelAnime.curFrame) * 255.0f) / this->skelAnime.endFrame; this->actor.world.pos.y = this->actor.parent->world.pos.y; EnPoSisters_CircleUpdate(this, play); } else if (this->sisterID != EN_PO_SISTERS_MEG) { @@ -1124,7 +1124,7 @@ void EnPoSisters_IntroStep4(EnPoSisters* this, PlayState* play) { } void EnPoSisters_IntroStep5(EnPoSisters* this, PlayState* play) { - + // position of laugh at the end of sisters' intro animation static Vec3f sIntroLaughPos = { 120.0f, 250.0f, -1420.0f }; From b230f8941dfc632af5ad0204846dcfd7dff61519 Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Mon, 8 Dec 2025 20:18:03 -0500 Subject: [PATCH 14/24] Update z_en_po_sisters.c little more formatting --- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 24330987fc..c41b1d29b3 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -116,13 +116,13 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit sColChkInfoInit = { 10, 25, 60, 40 }; typedef enum EnPoSisterFlags { - EN_PO_SISTERS_FLAG_ACCOL= 1 << 0, // set AC collision + EN_PO_SISTERS_FLAG_ACCOL = 1 << 0, // set AC collision EN_PO_SISTERS_FLAG_ROTATE = 1 << 1, // set shape.rot.y to world.rot.y EN_PO_SISTERS_FLAG_VANISH = 1 << 2, // tick vanishTimer, then disappear if 0. EN_PO_SISTERS_FLAG_HOVER = 1 << 3, // hover up and down a few units towards y-target EN_PO_SISTERS_FLAG_BGCHECK = 1 << 4, // BGCheck floors and walls - EN_PO_SISTERS_FLAG_UPDATEMASK=(EN_PO_SISTERS_FLAG_ACCOL | EN_PO_SISTERS_FLAG_ROTATE | EN_PO_SISTERS_FLAG_VANISH | - EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_BGCHECK), + EN_PO_SISTERS_FLAG_UPDATEMASK = (EN_PO_SISTERS_FLAG_ACCOL | EN_PO_SISTERS_FLAG_ROTATE | EN_PO_SISTERS_FLAG_VANISH | + EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_BGCHECK), EN_PO_SISTERS_FLAG_TORCH = 1 << 5, // manipulate torch flames EN_PO_SISTERS_FLAG_SPIN = 1 << 6, // the real Meg spins as a tell EN_PO_SISTERS_FLAG_NOMTXF = 1 << 7, // don't read or write torchMtx @@ -398,13 +398,13 @@ void EnPoSisters_ItemDrop(EnPoSisters* this, PlayState* play) { void EnPoSisters_MegSetup(EnPoSisters* this, PlayState* play) { Actor* actor1 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM) * 1)); + this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM)*1)); Actor* actor2 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM) * 2)); + this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM)*2)); Actor* actor3 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM) * 3)); + this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM)*3)); s32 pad; s32 pad1; @@ -732,7 +732,7 @@ void EnPoSisters_Hit(EnPoSisters* this, PlayState* play) { if (this->decoyID != 0) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.parent->shape.rot.y, (this->decoyID == 2) ? 0x800 : 0x400); - this->sisterColor.a = + this->sisterColor.a = ((this->skelAnime.endFrame - this->skelAnime.curFrame) * 255.0f) / this->skelAnime.endFrame; this->actor.world.pos.y = this->actor.parent->world.pos.y; EnPoSisters_CircleUpdate(this, play); @@ -1383,16 +1383,16 @@ void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s } if (this->torchFlames > 0) { Color_RGBA8* color = &sTorchLightColors[this->sisterID]; - f32 temp_f2 = Rand_ZeroOne() * 0.3f + 0.7f; + f32 flicker = Rand_ZeroOne() * 0.3f + 0.7f; if (this->actionFunc == EnPoSisters_Die || this->actionFunc == EnPoSisters_IntroStep2 || this->actionFunc == EnPoSisters_IntroStep4) { Lights_PointNoGlowSetInfo(&this->lightInfo, this->torchPos[0].x, this->torchPos[0].y + 15.0f, - this->torchPos[0].z, color->r * temp_f2, color->g * temp_f2, - color->b * temp_f2, 200); + this->torchPos[0].z, color->r * flicker, color->g * flicker, + color->b * flicker, 200); } else { Lights_PointGlowSetInfo(&this->lightInfo, this->torchPos[0].x, this->torchPos[0].y + 15.0f, - this->torchPos[0].z, color->r * temp_f2, color->g * temp_f2, color->b * temp_f2, + this->torchPos[0].z, color->r * flicker, color->g * flicker, color->b * flicker, 200); } } else { From 6975d63a3029ff16a01adfd6434449d4230f3db8 Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Tue, 9 Dec 2025 01:17:45 -0500 Subject: [PATCH 15/24] Update z_en_po_sisters.c --- src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index c41b1d29b3..a9d8d73164 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -397,13 +397,13 @@ void EnPoSisters_ItemDrop(EnPoSisters* this, PlayState* play) { (or destroy the decoys and herself if one decoy fails.)*/ void EnPoSisters_MegSetup(EnPoSisters* this, PlayState* play) { Actor* actor1 = - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM)*1)); Actor* actor2 = - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM)*2)); Actor* actor3 = - Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x,this->actor.world.pos.y, + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM)*3)); s32 pad; s32 pad1; From 758d8e4dcdfa5f58ee5701af011e2ffccecbba8e Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Wed, 10 Dec 2025 15:35:03 -0500 Subject: [PATCH 16/24] `En_Po_Sisters`: some changes requested by thar0. As there are contradictory instructions on location of actor's flag enums, this will remain unchanged until a consensus is reached. --- .../actors/ovl_Bg_Po_Event/z_bg_po_event.c | 2 +- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 621 +++++++++--------- .../ovl_En_Po_Sisters/z_en_po_sisters.h | 16 +- 3 files changed, 321 insertions(+), 318 deletions(-) diff --git a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index 8e8d11d56f..bb1ea7aeec 100644 --- a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -355,7 +355,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, PlayState* play) { if ((this->type == 0) && (this->index == 0)) { amy = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->dyna.actor.world.pos.x + 30.0f, this->dyna.actor.world.pos.y - 30.0f, this->dyna.actor.world.pos.z + 30.0f, 0, - this->dyna.actor.shape.rot.y, 0, this->dyna.actor.params + (EN_PO_SISTERS_PARAM(AMY))); + this->dyna.actor.shape.rot.y, 0, this->dyna.actor.params + EN_PO_SISTERS_PARAM(AMY)); if (amy != NULL) { OnePointCutscene_Init(play, 3170, 30, amy, CAM_ID_MAIN); } diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index a9d8d73164..60f7df7ad2 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -35,7 +35,7 @@ void EnPoSisters_Destroy(Actor* thisx, PlayState* play); void EnPoSisters_Update(Actor* thisx, PlayState* play); void EnPoSisters_Draw(Actor* thisx, PlayState* play); -void EnPoSisters_IntroSetup(EnPoSisters* this, PlayState* play); +void EnPoSisters_SetupIntro(EnPoSisters* this, PlayState* play); void EnPoSisters_FightState3(EnPoSisters* this, PlayState* play); void EnPoSisters_FightState1(EnPoSisters* this, PlayState* play); void EnPoSisters_FightState2(EnPoSisters* this, PlayState* play); @@ -50,7 +50,7 @@ void EnPoSisters_ReleaseFlame(EnPoSisters* this, PlayState* play); void EnPoSisters_Die(EnPoSisters* this, PlayState* play); void EnPoSisters_MegMourns(EnPoSisters* this, PlayState* play); void EnPoSisters_MegUpdate(EnPoSisters* this, PlayState* play); -void EnPoSisters_SisterInit(EnPoSisters* this, PlayState* play); +void EnPoSisters_SisterAppear(EnPoSisters* this, PlayState* play); void EnPoSisters_MegIntroStep1(EnPoSisters* this, PlayState* play); void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play); void EnPoSisters_MegFightStep1(EnPoSisters* this, PlayState* play); @@ -62,10 +62,10 @@ void EnPoSisters_IntroStep3(EnPoSisters* this, PlayState* play); void EnPoSisters_IntroStep4(EnPoSisters* this, PlayState* play); void EnPoSisters_IntroStep5(EnPoSisters* this, PlayState* play); -void EnPoSisters_MegSetup(EnPoSisters* this, PlayState* play); -void EnPoSisters_DecoySetup(EnPoSisters* this, PlayState* play); +void EnPoSisters_SetupMeg(EnPoSisters* this, PlayState* play); +void EnPoSisters_SetupDecoy(EnPoSisters* this, PlayState* play); -void EnPoSisters_SisterSetup(EnPoSisters* this); +void EnPoSisters_SetupSister(EnPoSisters* this); static Color_RGBA8 sTorchLightColors[4] = { { 255, 170, 255, 255 }, @@ -125,48 +125,48 @@ typedef enum EnPoSisterFlags { EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_BGCHECK), EN_PO_SISTERS_FLAG_TORCH = 1 << 5, // manipulate torch flames EN_PO_SISTERS_FLAG_SPIN = 1 << 6, // the real Meg spins as a tell - EN_PO_SISTERS_FLAG_NOMTXF = 1 << 7, // don't read or write torchMtx + EN_PO_SISTERS_FLAG_NOMTXF = 1 << 7, // don't read or write torchMtxF } EnPoSisterFlags; -typedef enum PoeSisDamageReaction { - EN_PO_SISTERS_DMG_REACT_OTHER, - EN_PO_SISTERS_DMG_REACT_SWORD = 14, - EN_PO_SISTERS_DMG_REACT_NUT, -}; +typedef enum PoeSisDamageEffect { + EN_PO_SISTERS_DMG_EFF_OTHER, + EN_PO_SISTERS_DMG_EFF_SWORD = 14, + EN_PO_SISTERS_DMG_EFF_NUT, +} PoeSisDamageEffect; static DamageTable sDamageTable = { - /* Deku nut */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_NUT), - /* Deku stick */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Slingshot */ DMG_ENTRY(1, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Explosive */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Boomerang */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Normal arrow */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Hammer swing */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Hookshot */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Kokiri sword */ DMG_ENTRY(1, EN_PO_SISTERS_DMG_REACT_SWORD), - /* Master sword */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_SWORD), - /* Giant's Knife */ DMG_ENTRY(4, EN_PO_SISTERS_DMG_REACT_SWORD), - /* Fire arrow */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Ice arrow */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Light arrow */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Unk arrow 1 */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Unk arrow 2 */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Unk arrow 3 */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Fire magic */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Ice magic */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Light magic */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Shield */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Mirror Ray */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Kokiri spin */ DMG_ENTRY(1, EN_PO_SISTERS_DMG_REACT_SWORD), - /* Giant spin */ DMG_ENTRY(4, EN_PO_SISTERS_DMG_REACT_SWORD), - /* Master spin */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_SWORD), - /* Kokiri jump */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_REACT_SWORD), - /* Giant jump */ DMG_ENTRY(8, EN_PO_SISTERS_DMG_REACT_SWORD), - /* Master jump */ DMG_ENTRY(4, EN_PO_SISTERS_DMG_REACT_SWORD), - /* Unknown 1 */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Unblockable */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Hammer jump */ DMG_ENTRY(4, EN_PO_SISTERS_DMG_REACT_OTHER), - /* Unknown 2 */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_REACT_OTHER), + /* Deku nut */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_EFF_NUT), + /* Deku stick */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Slingshot */ DMG_ENTRY(1, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Explosive */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Boomerang */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Normal arrow */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Hammer swing */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Hookshot */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Kokiri sword */ DMG_ENTRY(1, EN_PO_SISTERS_DMG_EFF_SWORD), + /* Master sword */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_EFF_SWORD), + /* Giant's Knife */ DMG_ENTRY(4, EN_PO_SISTERS_DMG_EFF_SWORD), + /* Fire arrow */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Ice arrow */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Light arrow */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Unk arrow 1 */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Unk arrow 2 */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Unk arrow 3 */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Fire magic */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Ice magic */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Light magic */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Shield */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Mirror Ray */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Kokiri spin */ DMG_ENTRY(1, EN_PO_SISTERS_DMG_EFF_SWORD), + /* Giant spin */ DMG_ENTRY(4, EN_PO_SISTERS_DMG_EFF_SWORD), + /* Master spin */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_EFF_SWORD), + /* Kokiri jump */ DMG_ENTRY(2, EN_PO_SISTERS_DMG_EFF_SWORD), + /* Giant jump */ DMG_ENTRY(8, EN_PO_SISTERS_DMG_EFF_SWORD), + /* Master jump */ DMG_ENTRY(4, EN_PO_SISTERS_DMG_EFF_SWORD), + /* Unknown 1 */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Unblockable */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Hammer jump */ DMG_ENTRY(4, EN_PO_SISTERS_DMG_EFF_OTHER), + /* Unknown 2 */ DMG_ENTRY(0, EN_PO_SISTERS_DMG_EFF_OTHER), }; static s32 sIntroVar = 0; @@ -184,41 +184,41 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 50.0f); SkelAnime_Init(play, &this->skelAnime, &gPoeSistersSkel, &gPoeSistersSwayAnim, this->jointTable, this->morphTable, 12); - this->sisterColor.r = 255; - this->sisterColor.g = 255; - this->sisterColor.b = 210; - this->sisterColor.a = 255; + this->color.r = 255; + this->color.g = 255; + this->color.b = 210; + this->color.a = 255; this->lightNode = LightContext_InsertLight(play, &play->lightCtx, &this->lightInfo); Lights_PointGlowSetInfo(&this->lightInfo, this->actor.home.pos.x, this->actor.home.pos.y, this->actor.home.pos.z, 0, 0, 0, 0); Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); - this->sisterID = PARAMS_GET_U(thisx->params, 8, 2); + this->sisterID = POE_SISTER_GET_ID(thisx->params); this->actor.naviEnemyId = this->sisterID + NAVI_ENEMY_POE_SISTER_MEG; if (1) {} - this->decoyID = PARAMS_GET_U(thisx->params, 10, 2); + this->decoyID = POE_SISTER_GET_DECOY(thisx->params); this->hoverPulse = 32; this->vanishTimer = 20; this->torchFlames = 1; - this->sisterFlags = EN_PO_SISTERS_FLAG_TORCH; + this->flags = EN_PO_SISTERS_FLAG_TORCH; this->circleDist = 110.0f; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; - if (PARAMS_GET_NOSHIFT(this->actor.params, 12, 1)) { - EnPoSisters_IntroSetup(this, play); + if (POE_SISTER_GET_INTRO(this->actor.params)) { + EnPoSisters_SetupIntro(this, play); } else if (this->sisterID == EN_PO_SISTERS_MEG) { if (this->decoyID == 0) { this->collider.base.ocFlags1 = OC1_ON | OC1_TYPE_PLAYER; - EnPoSisters_MegSetup(this, play); + EnPoSisters_SetupMeg(this, play); } else { this->actor.flags &= ~(ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR | ACTOR_FLAG_CAN_ATTACH_TO_ARROW); this->collider.elem.elemMaterial = ELEM_MATERIAL_UNK4; this->collider.elem.acDmgInfo.dmgFlags |= DMG_DEKU_NUT; this->collider.base.ocFlags1 = OC1_NONE; - EnPoSisters_DecoySetup(this, NULL); + EnPoSisters_SetupDecoy(this, NULL); } } else { - EnPoSisters_SisterSetup(this); + EnPoSisters_SetupSister(this); } this->actor.params &= 0x3F; } @@ -240,41 +240,41 @@ void EnPoSisters_MoveTorchFlames(EnPoSisters* this, s32 height, Vec3f* pos) { for (i = 0; i < this->torchFlames; i++) { vec = &this->torchPos[i]; - vec->x = pos->x + Math_SinS((s16)(this->actor.shape.rot.y + (this->sisterTimer * 0x800) + i * 0x2000)) * spread; - vec->z = pos->z + Math_CosS((s16)(this->actor.shape.rot.y + (this->sisterTimer * 0x800) + i * 0x2000)) * spread; + vec->x = pos->x + Math_SinS((s16)(this->actor.shape.rot.y + (this->timer * 0x800) + i * 0x2000)) * spread; + vec->z = pos->z + Math_CosS((s16)(this->actor.shape.rot.y + (this->timer * 0x800) + i * 0x2000)) * spread; vec->y = pos->y + height; } } void EnPoSisters_FightSetup3(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersSwayAnim, -3.0f); - this->sisterTimer = Rand_S16Offset(2, 3); + this->timer = Rand_S16Offset(2, 3); this->actionFunc = EnPoSisters_FightState3; this->actor.speed = 0.0f; } -void EnPoSisters_FightSetup(EnPoSisters* this) { +void EnPoSisters_SetupFight(EnPoSisters* this) { if (this->actionFunc != EnPoSisters_FightState2) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); } - this->sisterTimer = Rand_S16Offset(15, 3); - this->sisterFlags |= (EN_PO_SISTERS_FLAG_VANISH | EN_PO_SISTERS_FLAG_ROTATE | EN_PO_SISTERS_FLAG_ACCOL); + this->timer = Rand_S16Offset(15, 3); + this->flags |= EN_PO_SISTERS_FLAG_VANISH | EN_PO_SISTERS_FLAG_ROTATE | EN_PO_SISTERS_FLAG_ACCOL; this->actionFunc = EnPoSisters_FightState1; } -void EnPoSisters_FightSetup2(EnPoSisters* this) { +void EnPoSisters_SetupFight2(EnPoSisters* this) { this->actionFunc = EnPoSisters_FightState2; } -void EnPoSisters_FightSetup4(EnPoSisters* this) { - if (this->sisterColor.a != 0) { +void EnPoSisters_SetupFight4(EnPoSisters* this) { + if (this->color.a != 0) { this->collider.base.colMaterial = COL_MATERIAL_METAL; this->collider.base.acFlags |= AC_HARD; } Animation_MorphToLoop(&this->skelAnime, &gPoeSistersAttackAnim, -5.0f); this->actor.speed = 0.0f; - this->sisterTimer = Animation_GetLastFrame(&gPoeSistersAttackAnim) * 3 + 3; - this->sisterFlags &= ~EN_PO_SISTERS_FLAG_ROTATE; + this->timer = Animation_GetLastFrame(&gPoeSistersAttackAnim) * 3 + 3; + this->flags &= ~EN_PO_SISTERS_FLAG_ROTATE; this->actionFunc = EnPoSisters_FightState4; } @@ -285,13 +285,13 @@ void EnPoSisters_MegFightSetup2(EnPoSisters* this) { this->collider.base.acFlags |= AC_HARD; Animation_MorphToLoop(&this->skelAnime, &gPoeSistersAttackAnim, -5.0f); } - this->sisterTimer = 5; + this->timer = 5; this->actor.world.rot.y = this->actor.yawTowardsPlayer; - this->sisterFlags |= EN_PO_SISTERS_FLAG_HOVER; + this->flags |= EN_PO_SISTERS_FLAG_HOVER; this->actionFunc = EnPoSisters_MegFightStep2; } -void EnPoSisters_OnATHitSetup(EnPoSisters* this) { +void EnPoSisters_SetupOnATHit(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); this->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000; if (this->sisterID != EN_PO_SISTERS_MEG) { @@ -301,7 +301,7 @@ void EnPoSisters_OnATHitSetup(EnPoSisters* this) { this->actionFunc = EnPoSisters_OnATHit; } -void EnPoSisters_HitSetup(EnPoSisters* this) { +void EnPoSisters_SetupHit(EnPoSisters* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gPoeSistersDamagedAnim, -3.0f); if (this->collider.base.ac != NULL) { this->actor.world.rot.y = (this->collider.elem.acHitElem->atDmgInfo.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) @@ -311,16 +311,16 @@ void EnPoSisters_HitSetup(EnPoSisters* this) { if (this->sisterID != EN_PO_SISTERS_MEG) { this->actor.speed = 10.0f; } - this->sisterFlags &= ~(EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_ROTATE | EN_PO_SISTERS_FLAG_ACCOL); + this->flags &= ~(EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_ROTATE | EN_PO_SISTERS_FLAG_ACCOL); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 16); this->actionFunc = EnPoSisters_Hit; } -void EnPoSisters_HitSetup2(EnPoSisters* this) { +void EnPoSisters_SetupHit2(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFleeAnim, -3.0f); this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000; - this->sisterTimer = 5; - this->sisterFlags |= (EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_ROTATE | EN_PO_SISTERS_FLAG_ACCOL); + this->timer = 5; + this->flags |= EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_ROTATE | EN_PO_SISTERS_FLAG_ACCOL; this->actor.speed = 5.0f; this->actionFunc = EnPoSisters_Hit2; } @@ -329,9 +329,9 @@ void EnPoSisters_SetupVanish(EnPoSisters* this) { Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 1.5f, 0.0f, Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE, -3.0f); this->actor.speed = 0.0f; - this->megVar = 100; + this->sisterVar = 100; this->actor.world.rot.y = this->actor.shape.rot.y; - this->sisterFlags &= ~(EN_PO_SISTERS_FLAG_VANISH | EN_PO_SISTERS_FLAG_ACCOL); + this->flags &= ~(EN_PO_SISTERS_FLAG_VANISH | EN_PO_SISTERS_FLAG_ACCOL); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_DISAPPEAR); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); this->actionFunc = EnPoSisters_Vanish; @@ -352,7 +352,6 @@ void EnPoSisters_CircleUpdate(EnPoSisters* this, PlayState* play) { } else if (this->decoyID != 0) { dist = this->actor.parent->xzDistToPlayer; } - // possible bug: "dist" is unitallized if above conditions unmet. this->actor.world.pos.x = (Math_SinS(this->actor.shape.rot.y + 0x8000) * dist) + player->actor.world.pos.x; this->actor.world.pos.z = (Math_CosS(this->actor.shape.rot.y + 0x8000) * dist) + player->actor.world.pos.z; } @@ -363,48 +362,48 @@ void EnPoSisters_SetupReveal(EnPoSisters* this, PlayState* play) { if (this->sisterID == EN_PO_SISTERS_MEG) { this->circleDist = 110.0f; EnPoSisters_CircleUpdate(this, play); - this->sisterColor.a = 0; + this->color.a = 0; this->actor.draw = EnPoSisters_Draw; } else { this->actor.world.rot.y = this->actor.shape.rot.y; } - this->sisterTimer = 15; + this->timer = 15; this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_PO_APPEAR); - this->sisterFlags &= ~EN_PO_SISTERS_FLAG_ACCOL; + this->flags &= ~EN_PO_SISTERS_FLAG_ACCOL; this->actionFunc = EnPoSisters_Reveal; } void EnPoSisters_SetupDie(EnPoSisters* this, PlayState* play) { - this->sisterTimer = 0; + this->timer = 0; this->actor.speed = 0.0f; this->actor.world.pos.y += 42.0f; this->actor.shape.yOffset = -6000.0f; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; - this->sisterFlags = 0; + this->flags = 0; this->actionFunc = EnPoSisters_ReleaseFlame; OnePointCutscene_Init(play, 3190, 999, &this->actor, CAM_ID_MAIN); } void EnPoSisters_ItemDrop(EnPoSisters* this, PlayState* play) { - this->sisterTimer = 0; + this->timer = 0; this->actor.world.pos.y = this->torchPos[0].y; Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x80); this->actionFunc = EnPoSisters_Die; } -/*Meg will spawn 3 decoys and begin weeping. -(or destroy the decoys and herself if one decoy fails.)*/ -void EnPoSisters_MegSetup(EnPoSisters* this, PlayState* play) { +/* Meg will spawn 3 decoys and begin weeping. + (or destroy the decoys and herself if one decoy fails.) */ +void EnPoSisters_SetupMeg(EnPoSisters* this, PlayState* play) { Actor* actor1 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM)*1)); + this->actor.world.pos.z, 0, 0, 0, EN_PO_SISTERS_DECOY_PARAM(1)); Actor* actor2 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM)*2)); + this->actor.world.pos.z, 0, 0, 0, EN_PO_SISTERS_DECOY_PARAM(2)); Actor* actor3 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, ((EN_PO_SISTERS_DECOY_PARAM)*3)); + this->actor.world.pos.z, 0, 0, 0, EN_PO_SISTERS_DECOY_PARAM(3)); s32 pad; s32 pad1; @@ -425,19 +424,19 @@ void EnPoSisters_MegSetup(EnPoSisters* this, PlayState* play) { actor1->parent = &this->actor; Animation_PlayLoop(&this->skelAnime, &gPoeSistersMegCryAnim); this->torchFlames = 0; - this->sisterFlags = EN_PO_SISTERS_FLAG_NOMTXF | EN_PO_SISTERS_FLAG_TORCH; + this->flags = EN_PO_SISTERS_FLAG_NOMTXF | EN_PO_SISTERS_FLAG_TORCH; this->actionFunc = EnPoSisters_MegMourns; } } -void EnPoSisters_DecoySetup(EnPoSisters* this, PlayState* play) { +void EnPoSisters_SetupDecoy(EnPoSisters* this, PlayState* play) { static Vec3f sZeroVector = { 0.0f, 0.0f, 0.0f }; Vec3f vec; this->actor.draw = NULL; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; - this->megVar = 100; - this->sisterFlags = EN_PO_SISTERS_FLAG_TORCH; + this->sisterVar = 100; + this->flags = EN_PO_SISTERS_FLAG_TORCH; this->collider.base.colMaterial = COL_MATERIAL_HIT3; this->collider.base.acFlags &= ~AC_HARD; if (play != NULL) { @@ -451,7 +450,7 @@ void EnPoSisters_DecoySetup(EnPoSisters* this, PlayState* play) { this->actionFunc = EnPoSisters_MegUpdate; } -void EnPoSisters_SisterSetup(EnPoSisters* this) { +void EnPoSisters_SetupSister(EnPoSisters* this) { if (this->sisterID == EN_PO_SISTERS_AMY) { Animation_PlayOnce(&this->skelAnime, &gPoeSistersAppearDisappearAnim); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_APPEAR); @@ -459,28 +458,28 @@ void EnPoSisters_SisterSetup(EnPoSisters* this) { Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 0.5f, 0.0f, Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE_INTERP, 0.0f); } - this->sisterColor.a = 0; - this->sisterFlags = EN_PO_SISTERS_FLAG_TORCH; - this->actionFunc = EnPoSisters_SisterInit; + this->color.a = 0; + this->flags = EN_PO_SISTERS_FLAG_TORCH; + this->actionFunc = EnPoSisters_SisterAppear; } -void EnPoSisters_MegIntroSetup(EnPoSisters* this, PlayState* play) { +void EnPoSisters_MegSetupIntro(EnPoSisters* this, PlayState* play) { Animation_MorphToPlayOnce(&this->skelAnime, &gPoeSistersAppearDisappearAnim, -5.0f); this->torchFlames = 1; - this->sisterFlags &= ~EN_PO_SISTERS_FLAG_NOMTXF; + this->flags &= ~EN_PO_SISTERS_FLAG_NOMTXF; this->actionFunc = EnPoSisters_MegIntroStep1; OnePointCutscene_Init(play, 3180, 156, &this->actor, CAM_ID_MAIN); } -void EnPoSisters_MegDecoySetup(EnPoSisters* this) { +void EnPoSisters_SetupMegDecoy(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); - this->sisterTimer = Animation_GetLastFrame(&gPoeSistersFloatAnim) * 7 + 7; + this->timer = Animation_GetLastFrame(&gPoeSistersFloatAnim) * 7 + 7; if (this->actor.parent != NULL) { this->actor.world.pos = this->actor.parent->world.pos; this->actor.shape.rot.y = this->actor.parent->shape.rot.y; } else { this->actor.shape.rot.y = this->actor.yawTowardsPlayer; - this->sisterTimer++; + this->timer++; } if (this->decoyID == 0) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); @@ -490,10 +489,10 @@ void EnPoSisters_MegDecoySetup(EnPoSisters* this) { void EnPoSisters_MegFightInit(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); - this->sisterColor.a = 255; - this->sisterTimer = 300; - this->megVar = 3; - this->sisterFlags |= (EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_ACCOL); + this->color.a = 255; + this->timer = 300; + this->sisterVar = 3; + this->flags |= EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_ACCOL; this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; this->actionFunc = EnPoSisters_MegFightStep1; } @@ -508,25 +507,25 @@ void EnPoSisters_JoelleBethInit(EnPoSisters* this) { this->actor.home.pos.z = -3440.0f; } Animation_PlayLoop(&this->skelAnime, &gPoeSistersFloatAnim); - this->sisterFlags |= (EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_ROTATE); + this->flags |= EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_ROTATE; this->actionFunc = EnPoSisters_JoelleBethMove; this->actor.speed = 5.0f; } void EnPoSister_JoelleBethSetupWait(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersSwayAnim, -3.0f); - this->sisterColor.a = 255; - this->sisterFlags |= (EN_PO_SISTERS_FLAG_BGCHECK | EN_PO_SISTERS_FLAG_VANISH | EN_PO_SISTERS_FLAG_ACCOL); + this->color.a = 255; + this->flags |= EN_PO_SISTERS_FLAG_BGCHECK | EN_PO_SISTERS_FLAG_VANISH | EN_PO_SISTERS_FLAG_ACCOL; this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; this->actionFunc = EnPoSisters_JoelleBethWait; this->actor.speed = 0.0f; } -void EnPoSisters_IntroSetup(EnPoSisters* this, PlayState* play) { +void EnPoSisters_SetupIntro(EnPoSisters* this, PlayState* play) { sIntroVar = 0; - this->sisterColor.a = 0; - this->sisterFlags = EN_PO_SISTERS_FLAG_NOMTXF; - this->sisterTimer = 50; + this->color.a = 0; + this->flags = EN_PO_SISTERS_FLAG_NOMTXF; + this->timer = 50; this->torchPos[0] = this->actor.home.pos; Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); this->actionFunc = EnPoSisters_IntroStep1; @@ -547,9 +546,9 @@ void EnPoSisters_SetupIntro3(EnPoSisters* this) { Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 0.833f, 0.0f, Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE_INTERP, 0.0f); if (this->sisterID == EN_PO_SISTERS_MEG || this->sisterID == EN_PO_SISTERS_JOELLE) { - this->sisterTimer = 40; // Meg and Joelle appear first + this->timer = 40; // Meg and Joelle appear first } else { - this->sisterTimer = 76; // followed by Beth and Amy + this->timer = 76; // followed by Beth and Amy } this->torchFlames = 0; sIntroVar = 0; @@ -559,8 +558,8 @@ void EnPoSisters_SetupIntro3(EnPoSisters* this) { void EnPoSisters_SetupIntro4(EnPoSisters* this) { Animation_PlayLoop(&this->skelAnime, &gPoeSistersSwayAnim); this->torchFlames = 8; - this->sisterTimer = 32; - EnPoSisters_MoveTorchFlames(this, this->sisterTimer, &this->actor.home.pos); + this->timer = 32; + EnPoSisters_MoveTorchFlames(this, this->timer, &this->actor.home.pos); this->actionFunc = EnPoSisters_IntroStep4; } @@ -570,8 +569,8 @@ void EnPoSisters_SetupIntro5(EnPoSisters* this, PlayState* play) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); this->torchFlames = 0; - this->sisterFlags = EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_TORCH; - this->sisterTimer = 90; + this->flags = EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_TORCH; + this->timer = 90; this->hoverPulse = 32; this->actor.world.rot.y = sIntroExitFacings[this->sisterID]; this->actor.home.pos.y = this->actor.world.pos.y; @@ -603,7 +602,7 @@ void EnPoSisters_Hover(EnPoSisters* this, PlayState* play) { this->hoverPulse--; } this->actor.world.pos.y += (2.0f + 0.5f * Rand_ZeroOne()) * Math_SinS(this->hoverPulse * 0x800); - if (this->sisterColor.a == 255 && this->actionFunc != EnPoSisters_MegFightStep2 && + if (this->color.a == 255 && this->actionFunc != EnPoSisters_MegFightStep2 && this->actionFunc != EnPoSisters_FightState4) { if (this->actionFunc == EnPoSisters_Hit2) { Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); @@ -615,23 +614,23 @@ void EnPoSisters_Hover(EnPoSisters* this, PlayState* play) { void EnPoSisters_FightState3(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisterTimer != 0) { - this->sisterTimer--; + if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->timer != 0) { + this->timer--; } - if (this->sisterTimer == 0 || this->actor.xzDistToPlayer < 200.0f) { - EnPoSisters_FightSetup(this); + if (this->timer == 0 || this->actor.xzDistToPlayer < 200.0f) { + EnPoSisters_SetupFight(this); } } void EnPoSisters_FightState1(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_StepToF(&this->actor.speed, 1.0f, 0.2f); - if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisterTimer != 0) { - this->sisterTimer--; + if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->timer != 0) { + this->timer--; } if (this->actor.xzDistToPlayer < 200.0f && fabsf(this->actor.yDistToPlayer + 5.0f) < 30.0f) { - EnPoSisters_FightSetup2(this); - } else if (this->sisterTimer == 0 && Math_StepToF(&this->actor.speed, 0.0f, 0.2f) != 0) { + EnPoSisters_SetupFight2(this); + } else if (this->timer == 0 && Math_StepToF(&this->actor.speed, 0.0f, 0.2f) != 0) { EnPoSisters_FightSetup3(this); } if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) { @@ -658,22 +657,22 @@ void EnPoSisters_FightState2(EnPoSisters* this, PlayState* play) { Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1820); } if (this->actor.xzDistToPlayer < 160.0f && fabsf(this->actor.yDistToPlayer + 5.0f) < 30.0f) { - EnPoSisters_FightSetup4(this); + EnPoSisters_SetupFight4(this); } else if (this->actor.xzDistToPlayer > 240.0f) { - EnPoSisters_FightSetup(this); + EnPoSisters_SetupFight(this); } } void EnPoSisters_FightState4(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (this->sisterTimer != 0) { - this->sisterTimer--; + if (this->timer != 0) { + this->timer--; } - this->actor.shape.rot.y += 384.0f * ((this->skelAnime.endFrame + 1.0f) * 3.0f - this->sisterTimer); - if (this->sisterTimer == 18 || this->sisterTimer == 7) { + this->actor.shape.rot.y += 384.0f * ((this->skelAnime.endFrame + 1.0f) * 3.0f - this->timer); + if (this->timer == 18 || this->timer == 7) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_ROLL); } - if (this->sisterTimer == 0) { + if (this->timer == 0) { EnPoSisters_MegFightSetup2(this); } } @@ -682,18 +681,18 @@ void EnPoSisters_MegFightStep2(EnPoSisters* this, PlayState* play) { s32 pad; SkelAnime_Update(&this->skelAnime); - if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisterTimer != 0) { - this->sisterTimer--; + if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->timer != 0) { + this->timer--; } this->actor.shape.rot.y += (384.0f * this->skelAnime.endFrame) * 3.0f; - if (this->sisterTimer == 0 && ABS((s16)(this->actor.shape.rot.y - this->actor.world.rot.y)) < 0x1000) { + if (this->timer == 0 && ABS((s16)(this->actor.shape.rot.y - this->actor.world.rot.y)) < 0x1000) { if (this->sisterID != EN_PO_SISTERS_MEG) { this->collider.base.colMaterial = COL_MATERIAL_HIT3; this->collider.base.acFlags &= ~AC_HARD; - EnPoSisters_FightSetup(this); + EnPoSisters_SetupFight(this); } else { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); - EnPoSisters_DecoySetup(this, play); + EnPoSisters_SetupDecoy(this, play); } } if (Animation_OnFrame(&this->skelAnime, 1.0f)) { @@ -707,10 +706,10 @@ void EnPoSisters_OnATHit(EnPoSisters* this, PlayState* play) { if (Math_StepToF(&this->actor.speed, 0.0f, 0.1f) != 0) { this->actor.world.rot.y = this->actor.shape.rot.y; if (this->sisterID != EN_PO_SISTERS_MEG) { - EnPoSisters_FightSetup(this); + EnPoSisters_SetupFight(this); } else { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); - EnPoSisters_DecoySetup(this, play); + EnPoSisters_SetupDecoy(this, play); } } } @@ -719,11 +718,11 @@ void EnPoSisters_Hit(EnPoSisters* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime) && !(this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW)) { if (this->actor.colChkInfo.health != 0) { if (this->sisterID != EN_PO_SISTERS_MEG) { - EnPoSisters_HitSetup2(this); + EnPoSisters_SetupHit2(this); } else if (this->decoyID != 0) { - EnPoSisters_DecoySetup(this, NULL); + EnPoSisters_SetupDecoy(this, NULL); } else { - EnPoSisters_DecoySetup(this, play); + EnPoSisters_SetupDecoy(this, play); } } else { EnPoSisters_SetupDie(this, play); @@ -732,7 +731,7 @@ void EnPoSisters_Hit(EnPoSisters* this, PlayState* play) { if (this->decoyID != 0) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.parent->shape.rot.y, (this->decoyID == 2) ? 0x800 : 0x400); - this->sisterColor.a = + this->color.a = ((this->skelAnime.endFrame - this->skelAnime.curFrame) * 255.0f) / this->skelAnime.endFrame; this->actor.world.pos.y = this->actor.parent->world.pos.y; EnPoSisters_CircleUpdate(this, play); @@ -744,16 +743,16 @@ void EnPoSisters_Hit(EnPoSisters* this, PlayState* play) { void EnPoSisters_Hit2(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer + 0x8000, 1820); - if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->sisterTimer != 0) { - this->sisterTimer--; + if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->timer != 0) { + this->timer--; } if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) { this->actor.world.rot.y = this->actor.shape.rot.y; - this->sisterFlags |= EN_PO_SISTERS_FLAG_ROTATE; + this->flags |= EN_PO_SISTERS_FLAG_ROTATE; EnPoSisters_SetupVanish(this); - } else if (this->sisterTimer == 0 && 240.0f < this->actor.xzDistToPlayer) { + } else if (this->timer == 0 && 240.0f < this->actor.xzDistToPlayer) { this->actor.world.rot.y = this->actor.shape.rot.y; - EnPoSisters_FightSetup(this); + EnPoSisters_SetupFight(this); } } @@ -761,34 +760,34 @@ void EnPoSisters_Vanish(EnPoSisters* this, PlayState* play) { s32 endFrame; if (SkelAnime_Update(&this->skelAnime)) { - this->sisterColor.a = 0; + this->color.a = 0; this->collider.elem.acDmgInfo.dmgFlags = DMG_MAGIC_ICE | DMG_MAGIC_FIRE | DMG_DEKU_NUT; - EnPoSisters_FightSetup(this); + EnPoSisters_SetupFight(this); } else { endFrame = this->skelAnime.endFrame; - this->sisterColor.a = ((endFrame - this->skelAnime.curFrame) * 255.0f) / endFrame; + this->color.a = ((endFrame - this->skelAnime.curFrame) * 255.0f) / endFrame; } } void EnPoSisters_Reveal(EnPoSisters* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { - this->sisterColor.a = 255; + this->color.a = 255; if (this->sisterID != EN_PO_SISTERS_MEG) { - this->sisterFlags |= EN_PO_SISTERS_FLAG_ACCOL; + this->flags |= EN_PO_SISTERS_FLAG_ACCOL; this->collider.elem.acDmgInfo.dmgFlags = (DMG_SWORD | DMG_ARROW | DMG_HAMMER | DMG_MAGIC_ICE | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_EXPLOSIVE | DMG_DEKU_STICK); - if (this->sisterTimer != 0) { - this->sisterTimer--; + if (this->timer != 0) { + this->timer--; } - if (this->sisterTimer == 0) { + if (this->timer == 0) { this->vanishTimer = 20; - EnPoSisters_FightSetup(this); + EnPoSisters_SetupFight(this); } } else { EnPoSisters_MegFightInit(this); } } else { - this->sisterColor.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; + this->color.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; if (this->sisterID == EN_PO_SISTERS_MEG) { EnPoSisters_CircleUpdate(this, play); } @@ -799,22 +798,22 @@ void EnPoSisters_Reveal(EnPoSisters* this, PlayState* play) { void EnPoSisters_ReleaseFlame(EnPoSisters* this, PlayState* play) { s32 i; - this->sisterTimer++; + this->timer++; this->torchFlames = CLAMP_MAX(this->torchFlames + 1, 8); for (i = this->torchFlames - 1; i > 0; i--) { this->torchPos[i] = this->torchPos[i - 1]; } this->torchPos[0].x = - (Math_SinS((this->actor.shape.rot.y + this->sisterTimer * 0x3000) - 0x4000) * (3000.0f * this->actor.scale.x)) + + (Math_SinS((this->actor.shape.rot.y + this->timer * 0x3000) - 0x4000) * (3000.0f * this->actor.scale.x)) + this->actor.world.pos.x; this->torchPos[0].z = - (Math_CosS((this->actor.shape.rot.y + this->sisterTimer * 0x3000) - 0x4000) * (3000.0f * this->actor.scale.x)) + + (Math_CosS((this->actor.shape.rot.y + this->timer * 0x3000) - 0x4000) * (3000.0f * this->actor.scale.x)) + this->actor.world.pos.z; - if (this->sisterTimer < 8) { + if (this->timer < 8) { this->torchPos[0].y = this->torchPos[1].y - 9.0f; } else { this->torchPos[0].y = this->torchPos[1].y + 2.0f; - if (this->sisterTimer >= 16) { + if (this->timer >= 16) { if (Math_StepToF(&this->actor.scale.x, 0.0f, 0.001f) != 0) { EnPoSisters_ItemDrop(this, play); } @@ -822,14 +821,13 @@ void EnPoSisters_ReleaseFlame(EnPoSisters* this, PlayState* play) { this->actor.scale.y = this->actor.scale.x; } } - if (this->sisterTimer == 16) { + if (this->timer == 16) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_DEAD2); } } /* Show the flame moving back to the proper torch */ void EnPoSisters_Die(EnPoSisters* this, PlayState* play) { - // positions for torches to be lit during death cutscene static Vec3s sDeathTorchPos[4] = { { -22, 337, -1704 }, @@ -838,8 +836,8 @@ void EnPoSisters_Die(EnPoSisters* this, PlayState* play) { { 1717, 515, -1340 }, }; - this->sisterTimer++; - if (this->sisterTimer == 64) { + this->timer++; + if (this->timer == 64) { Flags_SetSwitch(play, this->actor.params); SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 30, NA_SE_EV_FLAME_IGNITION); if (this->sisterID == EN_PO_SISTERS_MEG) { @@ -848,12 +846,12 @@ void EnPoSisters_Die(EnPoSisters* this, PlayState* play) { play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE; Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME); Actor_Kill(&this->actor); - } else if (this->sisterTimer < 32) { - EnPoSisters_MoveTorchFlames(this, this->sisterTimer, &this->actor.world.pos); + } else if (this->timer < 32) { + EnPoSisters_MoveTorchFlames(this, this->timer, &this->actor.world.pos); } else { - EnPoSisters_MoveTorchFlames(this, 64 - this->sisterTimer, &this->actor.world.pos); + EnPoSisters_MoveTorchFlames(this, 64 - this->timer, &this->actor.world.pos); } - if (this->sisterTimer == 32) { + if (this->timer == 32) { this->actor.world.pos.x = sDeathTorchPos[this->sisterID].x; this->actor.world.pos.y = sDeathTorchPos[this->sisterID].y; this->actor.world.pos.z = sDeathTorchPos[this->sisterID].z; @@ -864,7 +862,7 @@ void EnPoSisters_Die(EnPoSisters* this, PlayState* play) { void EnPoSisters_MegMourns(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (this->actor.xzDistToPlayer < 130.0f) { - EnPoSisters_MegIntroSetup(this, play); + EnPoSisters_MegSetupIntro(this, play); } if (Animation_OnFrame(&this->skelAnime, 0.0f)) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_CRY); @@ -879,13 +877,13 @@ void EnPoSisters_MegUpdate(EnPoSisters* this, PlayState* play) { if (this->decoyID == 0) { if (Actor_WorldDistXZToPoint(&player->actor, &this->actor.home.pos) < 600.0f) { - if (this->megVar != 0) { - this->megVar--; + if (this->sisterVar != 0) { + this->sisterVar--; } } else { - this->megVar = 100; + this->sisterVar = 100; } - if (this->megVar == 0) { + if (this->sisterVar == 0) { this->actor.shape.rot.y = (s32)(4.0f * Rand_ZeroOne()) * 0x4000 + this->actor.yawTowardsPlayer; this->actor.world.pos.y = player->actor.world.pos.y + 5.0f; EnPoSisters_SetupReveal(this, play); @@ -893,7 +891,7 @@ void EnPoSisters_MegUpdate(EnPoSisters* this, PlayState* play) { } else { if (realMeg->actionFunc == EnPoSisters_MegIntroStep2) { this->actor.draw = EnPoSisters_Draw; - EnPoSisters_MegDecoySetup(this); + EnPoSisters_SetupMegDecoy(this); } else if (realMeg->actionFunc == EnPoSisters_Reveal) { this->actor.shape.rot.y = this->actor.parent->shape.rot.y + this->decoyID * 0x4000; this->actor.world.pos.y = player->actor.world.pos.y + 5.0f; @@ -906,14 +904,14 @@ void EnPoSisters_MegUpdate(EnPoSisters* this, PlayState* play) { void EnPoSisters_MegIntroStep1(EnPoSisters* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { - EnPoSisters_MegDecoySetup(this); + EnPoSisters_SetupMegDecoy(this); } EnPoSisters_CircleUpdate(this, play); this->actor.world.pos.y += 1.0f; Actor_SetFocus(&this->actor, 40.0f); } -/*Meg reveals and moves decoys back and forth*/ +/* Meg reveals and moves decoys back and forth */ void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play) { f32 temp_f2; s16 sign; @@ -922,11 +920,11 @@ void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); temp_f2 = this->skelAnime.endFrame * 0.5f; - this->sisterColor.a = (fabsf(temp_f2 - this->skelAnime.curFrame) * 255.0f) / temp_f2; - if (this->sisterTimer != 0) { - this->sisterTimer -= 1; + this->color.a = (fabsf(temp_f2 - this->skelAnime.curFrame) * 255.0f) / temp_f2; + if (this->timer != 0) { + this->timer -= 1; } - if (this->sisterTimer == 0) { + if (this->timer == 0) { this->actor.world.rot.y = this->actor.shape.rot.y += 0x4000 * (s32)(Rand_ZeroOne() * 4.0f); if (this->decoyID == 0) { func_800F5ACC(NA_BGM_MINI_BOSS); @@ -936,16 +934,16 @@ void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play) { this->actor.world.pos.y += 0.1f; ID = this->decoyID; if (ID != 0) { - if (this->sisterTimer > 90) { + if (this->timer > 90) { sign = 1; step = 64; - } else if (this->sisterTimer > 70) { + } else if (this->timer > 70) { sign = 0; step = 64; - } else if (this->sisterTimer > 55) { + } else if (this->timer > 55) { sign = 1; step = 96; - } else if (this->sisterTimer > 40) { + } else if (this->timer > 40) { sign = 0; step = 96; } else { @@ -957,7 +955,7 @@ void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play) { } Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.parent->shape.rot.y + (this->decoyID * 0x4000) * sign, step); - } else if (this->sisterTimer == 70 || this->sisterTimer == 40) { + } else if (this->timer == 70 || this->timer == 40) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); } } @@ -969,21 +967,21 @@ void EnPoSisters_MegFightStep1(EnPoSisters* this, PlayState* play) { s32 temp_v0; s32 phi_a0; - if (this->sisterTimer != 0) { - this->sisterTimer--; + if (this->timer != 0) { + this->timer--; } - if (this->megVar > 0) { - if (this->sisterTimer >= 16) { + if (this->sisterVar > 0) { + if (this->timer >= 16) { SkelAnime_Update(&this->skelAnime); if (this->decoyID == 0) { if (ABS((s16)(16 - this->hoverPulse)) < 14) { this->actor.shape.rot.y += - (0x580 - (this->megVar * 0x180)) * fabsf(Math_SinS(this->hoverPulse * 0x800)); + (0x580 - (this->sisterVar * 0x180)) * fabsf(Math_SinS(this->hoverPulse * 0x800)); } - if (this->sisterTimer >= 284 || this->sisterTimer < 31) { - this->sisterFlags |= EN_PO_SISTERS_FLAG_SPIN; + if (this->timer >= 284 || this->timer < 31) { + this->flags |= EN_PO_SISTERS_FLAG_SPIN; } else { - this->sisterFlags &= ~EN_PO_SISTERS_FLAG_SPIN; + this->flags &= ~EN_PO_SISTERS_FLAG_SPIN; } } else { this->actor.shape.rot.y = (s16)(this->actor.parent->shape.rot.y + (this->decoyID * 0x4000)); @@ -991,55 +989,57 @@ void EnPoSisters_MegFightStep1(EnPoSisters* this, PlayState* play) { } } if (this->decoyID == 0) { - if (this->sisterTimer >= 284 || (this->sisterTimer < 31 && this->sisterTimer >= 16)) { - this->sisterFlags |= EN_PO_SISTERS_FLAG_SPIN; + if (this->timer >= 284 || (this->timer < 31 && this->timer >= 16)) { + this->flags |= EN_PO_SISTERS_FLAG_SPIN; } else { - this->sisterFlags &= ~EN_PO_SISTERS_FLAG_SPIN; + this->flags &= ~EN_PO_SISTERS_FLAG_SPIN; } } if (Actor_WorldDistXZToPoint(&GET_PLAYER(play)->actor, &this->actor.home.pos) > 600.0f) { - this->sisterFlags &= ~EN_PO_SISTERS_FLAG_SPIN; - EnPoSisters_DecoySetup(this, play); - } else if (this->sisterTimer == 0) { + this->flags &= ~EN_PO_SISTERS_FLAG_SPIN; + EnPoSisters_SetupDecoy(this, play); + } else if (this->timer == 0) { if (this->decoyID == 0) { EnPoSisters_MegFightSetup2(this); } else { - EnPoSisters_DecoySetup(this, play); + EnPoSisters_SetupDecoy(this, play); } } else if (this->decoyID != 0) { EnPoSisters* realMeg = (EnPoSisters*)this->actor.parent; if (realMeg->actionFunc == EnPoSisters_Hit) { - EnPoSisters_HitSetup(this); + EnPoSisters_SetupHit(this); } - } else if (this->megVar == 0) { - this->megVar = -15; - } else if (this->megVar < 0) { - this->megVar++; - if (this->megVar == 0) { + } else if (this->sisterVar == 0) { + this->sisterVar = -15; + } else if (this->sisterVar < 0) { + this->sisterVar++; + if (this->sisterVar == 0) { EnPoSisters_MegFightSetup2(this); } } EnPoSisters_CircleUpdate(this, play); } -void EnPoSisters_SisterInit(EnPoSisters* this, PlayState* play) { +/* Setup Beth, Joelle and Amy revealing themselves from their hiding spots. + also establishes origins for them to move towards and prepare to fight. */ +void EnPoSisters_SisterAppear(EnPoSisters* this, PlayState* play) { f32 div; if (SkelAnime_Update(&this->skelAnime)) { - this->sisterColor.a = 255; + this->color.a = 255; if (this->sisterID == EN_PO_SISTERS_AMY) { this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; this->actor.home.pos.x = 1992.0f; this->actor.home.pos.z = -1440.0f; - this->sisterFlags |= (EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_BGCHECK); - EnPoSisters_FightSetup(this); + this->flags |= EN_PO_SISTERS_FLAG_HOVER | EN_PO_SISTERS_FLAG_BGCHECK; + EnPoSisters_SetupFight(this); } else { EnPoSisters_JoelleBethInit(this); } } else { div = this->skelAnime.curFrame / this->skelAnime.endFrame; - this->sisterColor.a = 255.0f * div; + this->color.a = 255.0f * div; } if (this->sisterID != EN_PO_SISTERS_AMY && Animation_OnFrame(&this->skelAnime, 1.0f)) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_APPEAR); @@ -1063,22 +1063,22 @@ void EnPoSisters_JoelleBethWait(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1820); if (this->actor.xzDistToPlayer < 240.0f && fabsf(this->actor.yDistToPlayer + 5.0f) < 30.0f) { - EnPoSisters_FightSetup(this); + EnPoSisters_SetupFight(this); } } void EnPoSisters_IntroStep1(EnPoSisters* this, PlayState* play) { if (sIntroVar != 0 || !Player_InCsMode(play)) { - if (this->sisterTimer != 0) { - this->sisterTimer--; + if (this->timer != 0) { + this->timer--; } - if (this->sisterTimer == 30) { + if (this->timer == 30) { if (this->sisterID == EN_PO_SISTERS_MEG) { OnePointCutscene_Init(play, 3140, 999, NULL, CAM_ID_MAIN); } sIntroVar = 1; } - if (this->sisterTimer == 0) { + if (this->timer == 0) { EnPoSisters_IntroSetup2(this); } } @@ -1086,25 +1086,25 @@ void EnPoSisters_IntroStep1(EnPoSisters* this, PlayState* play) { } void EnPoSisters_IntroStep2(EnPoSisters* this, PlayState* play) { - this->sisterTimer++; - EnPoSisters_MoveTorchFlames(this, this->sisterTimer, &this->actor.home.pos); - if (this->sisterTimer == 32) { + this->timer++; + EnPoSisters_MoveTorchFlames(this, this->timer, &this->actor.home.pos); + if (this->timer == 32) { EnPoSisters_SetupIntro3(this); } } void EnPoSisters_IntroStep3(EnPoSisters* this, PlayState* play) { - this->sisterTimer--; - if (this->sisterTimer == 0) { + this->timer--; + if (this->timer == 0) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_APPEAR); - this->sisterFlags &= ~EN_PO_SISTERS_FLAG_NOMTXF; + this->flags &= ~EN_PO_SISTERS_FLAG_NOMTXF; } - if (this->sisterTimer <= 0) { + if (this->timer <= 0) { if (SkelAnime_Update(&this->skelAnime)) { - this->sisterColor.a = 255; + this->color.a = 255; sIntroVar |= (1 << this->sisterID); } else { - this->sisterColor.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; + this->color.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; } } if (sIntroVar == 15) { @@ -1114,55 +1114,54 @@ void EnPoSisters_IntroStep3(EnPoSisters* this, PlayState* play) { void EnPoSisters_IntroStep4(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (this->sisterTimer != 0) { - this->sisterTimer--; + if (this->timer != 0) { + this->timer--; } - EnPoSisters_MoveTorchFlames(this, this->sisterTimer, &this->actor.home.pos); - if (this->sisterTimer == 0) { + EnPoSisters_MoveTorchFlames(this, this->timer, &this->actor.home.pos); + if (this->timer == 0) { EnPoSisters_SetupIntro5(this, play); } } void EnPoSisters_IntroStep5(EnPoSisters* this, PlayState* play) { - // position of laugh at the end of sisters' intro animation static Vec3f sIntroLaughPos = { 120.0f, 250.0f, -1420.0f }; SkelAnime_Update(&this->skelAnime); - this->sisterTimer--; + this->timer--; Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.world.rot.y, 0x500); - if (this->sisterTimer == 0 && this->sisterID == EN_PO_SISTERS_MEG) { + if (this->timer == 0 && this->sisterID == EN_PO_SISTERS_MEG) { play->envCtx.lightSettingOverride = 4; } - if (this->sisterTimer < 0) { + if (this->timer < 0) { Math_StepToF(&this->actor.speed, 5.0f, 0.2f); } - if (this->sisterTimer == -70 && this->sisterID == EN_PO_SISTERS_JOELLE) { + if (this->timer == -70 && this->sisterID == EN_PO_SISTERS_JOELLE) { SfxSource_PlaySfxAtFixedWorldPos(play, &sIntroLaughPos, 40, NA_SE_EN_PO_LAUGH); } - if (this->sisterTimer < -120) { + if (this->timer < -120) { Actor_Kill(&this->actor); } } void EnPoSisters_TickVanish(EnPoSisters* this, PlayState* play) { - if (this->actor.isLockedOn && this->sisterColor.a == 255) { + if (this->actor.isLockedOn && this->color.a == 255) { if (this->vanishTimer != 0) { this->vanishTimer--; } } else { this->vanishTimer = 20; } - if (this->sisterColor.a == 0) { - if (this->megVar != 0) { - this->megVar--; + if (this->color.a == 0) { + if (this->sisterVar != 0) { + this->sisterVar--; } } if (this->actionFunc != EnPoSisters_FightState4 && this->actionFunc != EnPoSisters_MegFightStep2 && this->actionFunc != EnPoSisters_Hit) { if (this->vanishTimer == 0) { EnPoSisters_SetupVanish(this); - } else if (this->megVar == 0 && this->sisterColor.a == 0) { + } else if (this->sisterVar == 0 && this->color.a == 0) { EnPoSisters_SetupReveal(this, play); } } @@ -1175,9 +1174,9 @@ void EnPoSisters_CheckDamage(EnPoSisters* this, PlayState* play) { this->collider.base.acFlags &= ~AC_HIT; Actor_SetDropFlag(&this->actor, &this->collider.elem, true); if (this->decoyID != 0) { - ((EnPoSisters*)this->actor.parent)->megVar--; + ((EnPoSisters*)this->actor.parent)->sisterVar--; Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH2); - EnPoSisters_DecoySetup(this, play); + EnPoSisters_SetupDecoy(this, play); if (Rand_ZeroOne() < 0.2f) { itemPos.x = this->actor.world.pos.x; itemPos.y = this->actor.world.pos.y; @@ -1185,20 +1184,20 @@ void EnPoSisters_CheckDamage(EnPoSisters* this, PlayState* play) { Item_DropCollectible(play, &itemPos, ITEM00_ARROWS_SMALL); } } else if (this->collider.base.colMaterial == COL_MATERIAL_METAL || - (this->actor.colChkInfo.damageReaction == EN_PO_SISTERS_DMG_REACT_OTHER && + (this->actor.colChkInfo.damageReaction == EN_PO_SISTERS_DMG_EFF_OTHER && this->actor.colChkInfo.damage == 0)) { if (this->sisterID == EN_PO_SISTERS_MEG) { this->actor.freezeTimer = 0; } - } else if (this->actor.colChkInfo.damageReaction == EN_PO_SISTERS_DMG_REACT_NUT) { + } else if (this->actor.colChkInfo.damageReaction == EN_PO_SISTERS_DMG_EFF_NUT) { this->actor.world.rot.y = this->actor.shape.rot.y; - this->sisterFlags |= EN_PO_SISTERS_FLAG_ROTATE; + this->flags |= EN_PO_SISTERS_FLAG_ROTATE; EnPoSisters_SetupReveal(this, play); } else if (this->sisterID == EN_PO_SISTERS_MEG && - this->actor.colChkInfo.damageReaction == EN_PO_SISTERS_DMG_REACT_SWORD && + this->actor.colChkInfo.damageReaction == EN_PO_SISTERS_DMG_EFF_SWORD && this->actionFunc == EnPoSisters_MegFightStep1) { - if (this->megVar == 0) { - this->megVar = -45; + if (this->sisterVar == 0) { + this->sisterVar = -45; } } else { if (Actor_ApplyDamage(&this->actor) != 0) { @@ -1207,7 +1206,7 @@ void EnPoSisters_CheckDamage(EnPoSisters* this, PlayState* play) { Enemy_StartFinishingBlow(play, &this->actor); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_SISTER_DEAD); } - EnPoSisters_HitSetup(this); + EnPoSisters_SetupHit(this); } } } @@ -1219,20 +1218,20 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) { if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; - EnPoSisters_OnATHitSetup(this); + EnPoSisters_SetupOnATHit(this); } EnPoSisters_CheckDamage(this, play); - if (this->sisterFlags & EN_PO_SISTERS_FLAG_VANISH) { + if (this->flags & EN_PO_SISTERS_FLAG_VANISH) { EnPoSisters_TickVanish(this, play); } this->actionFunc(this, play); - if (this->sisterFlags & EN_PO_SISTERS_FLAG_UPDATEMASK) { - if (this->sisterFlags & EN_PO_SISTERS_FLAG_HOVER) { + if (this->flags & EN_PO_SISTERS_FLAG_UPDATEMASK) { + if (this->flags & EN_PO_SISTERS_FLAG_HOVER) { EnPoSisters_Hover(this, play); } Actor_MoveXZGravity(&this->actor); - if (this->sisterFlags & EN_PO_SISTERS_FLAG_BGCHECK) { + if (this->flags & EN_PO_SISTERS_FLAG_BGCHECK) { Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 0.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2); } else { @@ -1258,7 +1257,7 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) { this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT; CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); } - if (this->sisterFlags & EN_PO_SISTERS_FLAG_ACCOL) { + if (this->flags & EN_PO_SISTERS_FLAG_ACCOL) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); } if (this->actionFunc != EnPoSisters_MegUpdate) { @@ -1267,7 +1266,7 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) { Actor_SetFocus(&this->actor, 40.0f); if (this->actionFunc == EnPoSisters_Hit2) { this->actor.shape.rot.y = this->actor.world.rot.y + 0x8000; - } else if (this->sisterFlags & EN_PO_SISTERS_FLAG_ROTATE) { + } else if (this->flags & EN_PO_SISTERS_FLAG_ROTATE) { this->actor.shape.rot.y = this->actor.world.rot.y; } } @@ -1278,43 +1277,40 @@ void EnPoSisters_TintEyes(EnPoSisters* this) { s16 temp_b; if (this->skelAnime.animation == &gPoeSistersAttackAnim) { - this->sisterColor.r = CLAMP_MAX((s16)(this->sisterColor.r + 5), 255); - this->sisterColor.g = CLAMP_MIN((s16)(this->sisterColor.g - 5), 50); - temp_b = this->sisterColor.b - 5; - this->sisterColor.b = CLAMP_MIN(temp_b, 0); + this->color.r = CLAMP_MAX((s16)(this->color.r + 5), 255); + this->color.g = CLAMP_MIN((s16)(this->color.g - 5), 50); + temp_b = this->color.b - 5; + this->color.b = CLAMP_MIN(temp_b, 0); } else if (this->skelAnime.animation == &gPoeSistersFleeAnim) { - this->sisterColor.r = CLAMP_MAX((s16)(this->sisterColor.r + 5), 80); - this->sisterColor.g = CLAMP_MAX((s16)(this->sisterColor.g + 5), 255); - temp_b = this->sisterColor.b + 5; - this->sisterColor.b = CLAMP_MAX(temp_b, 225); + this->color.r = CLAMP_MAX((s16)(this->color.r + 5), 80); + this->color.g = CLAMP_MAX((s16)(this->color.g + 5), 255); + temp_b = this->color.b + 5; + this->color.b = CLAMP_MAX(temp_b, 225); } else if (this->skelAnime.animation == &gPoeSistersDamagedAnim) { if (this->actor.colorFilterTimer & 2) { - this->sisterColor.r = 0; - this->sisterColor.g = 0; - this->sisterColor.b = 0; + this->color.r = 0; + this->color.g = 0; + this->color.b = 0; } else { - this->sisterColor.r = 80; - this->sisterColor.g = 255; - this->sisterColor.b = 225; + this->color.r = 80; + this->color.g = 255; + this->color.b = 225; } } else { - this->sisterColor.r = CLAMP_MAX((s16)(this->sisterColor.r + 5), 255); - this->sisterColor.g = CLAMP_MAX((s16)(this->sisterColor.g + 5), 255); - if (this->sisterColor.b > 210) { - temp_b = this->sisterColor.b - 5; - this->sisterColor.b = CLAMP_MIN(temp_b, 210); + this->color.r = CLAMP_MAX((s16)(this->color.r + 5), 255); + this->color.g = CLAMP_MAX((s16)(this->color.g + 5), 255); + if (this->color.b > 210) { + temp_b = this->color.b - 5; + this->color.b = CLAMP_MIN(temp_b, 210); } else { - temp_b = this->sisterColor.b + 5; - this->sisterColor.b = CLAMP_MAX(temp_b, 210); + temp_b = this->color.b + 5; + this->color.b = CLAMP_MAX(temp_b, 210); } } } s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfxP) { - EnPoSisters* this = (EnPoSisters*)thisx; - Color_RGBA8* color; - static Gfx* sSisterBodies[4] = { gPoeSistersMegBodyDL, gPoeSistersJoelleBodyDL, @@ -1336,44 +1332,47 @@ s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve { 70, 70, 0, 0 }, }; - if (limbIndex == 1 && (this->sisterFlags & EN_PO_SISTERS_FLAG_SPIN)) { - if (this->sisterTimer >= 284) { - rot->x += (this->sisterTimer * 0x1000) - 0x11C000; + EnPoSisters* this = (EnPoSisters*)thisx; + Color_RGBA8* color; + + + if (limbIndex == 1 && (this->flags & EN_PO_SISTERS_FLAG_SPIN)) { + if (this->timer >= 284) { + rot->x += (this->timer * 0x1000) - 0x11C000; } else { - rot->x += (this->sisterTimer * 0x1000) - 0xF000; + rot->x += (this->timer * 0x1000) - 0xF000; } } - if (this->sisterColor.a == 0 || limbIndex == 8 || - (this->actionFunc == EnPoSisters_ReleaseFlame && this->sisterTimer >= 8)) { + if (this->color.a == 0 || limbIndex == 8 || + (this->actionFunc == EnPoSisters_ReleaseFlame && this->timer >= 8)) { *dList = NULL; } else if (limbIndex == 9) { *dList = sSisterBodies[this->sisterID]; } else if (limbIndex == 10) { *dList = sSisterFaces[this->sisterID]; gDPPipeSync((*gfxP)++); - gDPSetEnvColor((*gfxP)++, this->sisterColor.r, this->sisterColor.g, this->sisterColor.b, this->sisterColor.a); + gDPSetEnvColor((*gfxP)++, this->color.r, this->color.g, this->color.b, this->color.a); } else if (limbIndex == 11) { color = &sLimb11Colors[this->sisterID]; gDPPipeSync((*gfxP)++); - gDPSetEnvColor((*gfxP)++, color->r, color->g, color->b, this->sisterColor.a); + gDPSetEnvColor((*gfxP)++, color->r, color->g, color->b, this->color.a); } return false; } void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfxP) { - static Vec3f sTorchVec = { 1000.0f, -1700.0f, 0.0f }; EnPoSisters* this = (EnPoSisters*)thisx; s32 i; s32 pad; - if (this->actionFunc == EnPoSisters_ReleaseFlame && this->sisterTimer >= 8 && limbIndex == 9) { + if (this->actionFunc == EnPoSisters_ReleaseFlame && this->timer >= 8 && limbIndex == 9) { MATRIX_FINALIZE_AND_LOAD((*gfxP)++, play->state.gfxCtx, "../z_en_po_sisters.c", 2876); gSPDisplayList((*gfxP)++, gPoSistersBurnDL); } if (limbIndex == 8 && this->actionFunc != EnPoSisters_MegMourns) { - if (this->sisterFlags & EN_PO_SISTERS_FLAG_TORCH) { + if (this->flags & EN_PO_SISTERS_FLAG_TORCH) { for (i = this->torchFlames - 1; i > 0; i--) { this->torchPos[i] = this->torchPos[i - 1]; } @@ -1398,8 +1397,8 @@ void EnPoSisters_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s } else { Lights_PointSetColorAndRadius(&this->lightInfo, 0, 0, 0, 0); } - if (!(this->sisterFlags & EN_PO_SISTERS_FLAG_NOMTXF)) { - Matrix_Get(&this->torchMtx); + if (!(this->flags & EN_PO_SISTERS_FLAG_NOMTXF)) { + Matrix_Get(&this->torchMtxF); } } } @@ -1418,22 +1417,22 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { EnPoSisters_TintEyes(this); Gfx_SetupDL_25Opa(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx); - if (this->sisterColor.a == 255 || this->sisterColor.a == 0) { - gDPSetEnvColor(POLY_OPA_DISP++, this->sisterColor.r, this->sisterColor.g, this->sisterColor.b, - this->sisterColor.a); + if (this->color.a == 255 || this->color.a == 0) { + gDPSetEnvColor(POLY_OPA_DISP++, this->color.r, this->color.g, this->color.b, + this->color.a); gSPSegment(POLY_OPA_DISP++, 0x09, D_80116280 + 2); POLY_OPA_DISP = SkelAnime_Draw(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnPoSisters_OverrideLimbDraw, EnPoSisters_PostLimbDraw, &this->actor, POLY_OPA_DISP); } else { - gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, this->sisterColor.a); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, this->color.a); gSPSegment(POLY_XLU_DISP++, 0x09, D_80116280); POLY_XLU_DISP = SkelAnime_Draw(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnPoSisters_OverrideLimbDraw, EnPoSisters_PostLimbDraw, &this->actor, POLY_XLU_DISP); } - if (!(this->sisterFlags & EN_PO_SISTERS_FLAG_NOMTXF)) { - Matrix_Put(&this->torchMtx); + if (!(this->flags & EN_PO_SISTERS_FLAG_NOMTXF)) { + Matrix_Put(&this->torchMtxF); MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_en_po_sisters.c", 3034); gSPDisplayList(POLY_OPA_DISP++, gPoSistersTorchDL); } @@ -1442,18 +1441,18 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { (play->gameplayFrames * -20) % 512, 0x20, 0x80)); gDPSetEnvColor(POLY_XLU_DISP++, fireColor->r, fireColor->g, fireColor->b, fireColor->a); if (this->actionFunc == EnPoSisters_Die) { - if (this->sisterTimer < 32) { - alpha = ((32 - this->sisterTimer) * 255) / 32; + if (this->timer < 32) { + alpha = ((32 - this->timer) * 255) / 32; scale = 0.0056000003f; } else { - alpha = (this->sisterTimer * 255 - 8160) / 32; + alpha = (this->timer * 255 - 8160) / 32; scale = 0.0027f; } } else if (this->actionFunc == EnPoSisters_IntroStep2) { - alpha = ((32 - this->sisterTimer) * 255) / 32; + alpha = ((32 - this->timer) * 255) / 32; scale = 0.0027f; } else if (this->actionFunc == EnPoSisters_IntroStep4) { - alpha = ((32 - this->sisterTimer) * 255) / 32; + alpha = ((32 - this->timer) * 255) / 32; scale = 0.0035f; } else if (this->actionFunc == EnPoSisters_IntroStep1) { // alpha initialized in loop below @@ -1472,7 +1471,7 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { Matrix_Translate(this->torchPos[i].x, this->torchPos[i].y, this->torchPos[i].z, MTXMODE_NEW); Matrix_RotateZYX(0, (s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x8000), 0, MTXMODE_APPLY); if (this->actionFunc == EnPoSisters_ReleaseFlame) { - scale = (this->sisterTimer - i) * 0.025f + 0.5f; + scale = (this->timer - i) * 0.025f + 0.5f; scale = CLAMP(scale, 0.5f, 0.8f) * 0.007f; } Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h index 350ca72ba6..f1ed0d98aa 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h @@ -18,18 +18,18 @@ typedef struct EnPoSisters { /* 0x0196 */ u8 hoverPulse; /* 0x0197 */ u8 vanishTimer; /* 0x0198 */ u8 torchFlames; // number of torch flames to draw - /* 0x0199 */ u8 sisterFlags; // uses EnPoSisterFlags - /* 0x019A */ s16 sisterTimer; // timer used for various situations - /* 0x019C */ s16 megVar; // Meg and her decoys use it as a behaviour timer + /* 0x0199 */ u8 flags; // uses EnPoSisterFlags + /* 0x019A */ s16 timer; // timer used for various situations + /* 0x019C */ s16 sisterVar; // Used as a decoy counter for Meg, her sisters a reveal timer /* 0x019E */ Vec3s jointTable[12]; /* 0x01E6 */ Vec3s morphTable[12]; - /* 0x022E */ Color_RGBA8 sisterColor; // (rgb) for eyes, (a) for rest of body + /* 0x022E */ Color_RGBA8 color; // (rgb) for eyes, (a) for rest of body /* 0x0234 */ Vec3f torchPos[8]; // positions of the torch flame and smaller circling flames /* 0x0294 */ f32 circleDist; // distance of Meg when circling Link. /* 0x0298 */ LightNode* lightNode; /* 0x029C */ LightInfo lightInfo; /* 0x02AC */ ColliderCylinder collider; - /* 0x02F8 */ MtxF torchMtx; + /* 0x02F8 */ MtxF torchMtxF; } EnPoSisters; // size = 0x0338 typedef enum EnPoSisterNames { @@ -39,9 +39,13 @@ typedef enum EnPoSisterNames { EN_PO_SISTERS_AMY, // green sister, hides in block puzzle } EnPoSisterNames; +#define POE_SISTER_GET_ID(thisx) PARAMS_GET_U(thisx->params, 8, 2) +#define POE_SISTER_GET_DECOY(thisx) PARAMS_GET_U(thisx->params, 10, 2) +#define POE_SISTER_GET_INTRO(thisx) PARAMS_GET_U(thisx->params, 12, 1) + #define EN_PO_SISTERS_PARAM_N(n) (n << 8) // param for which sister by number #define EN_PO_SISTERS_PARAM(name) (EN_PO_SISTERS_##name << 8) // param for which sister by name -#define EN_PO_SISTERS_DECOY_PARAM (1 << 10) // param for Meg's decoys +#define EN_PO_SISTERS_DECOY_PARAM(n) (n << 10) // param for Meg's decoys #define EN_PO_SISTERS_INTRO_PARAM (1 << 12) // param for Poe Sisters when first entering foyer #endif From 8edb0df75a03266bf1834e6b930d80d011204989 Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Wed, 10 Dec 2025 16:24:16 -0500 Subject: [PATCH 17/24] Update z_en_po_sisters.h macro issue --- src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h index f1ed0d98aa..afe56f9809 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h @@ -39,9 +39,9 @@ typedef enum EnPoSisterNames { EN_PO_SISTERS_AMY, // green sister, hides in block puzzle } EnPoSisterNames; -#define POE_SISTER_GET_ID(thisx) PARAMS_GET_U(thisx->params, 8, 2) -#define POE_SISTER_GET_DECOY(thisx) PARAMS_GET_U(thisx->params, 10, 2) -#define POE_SISTER_GET_INTRO(thisx) PARAMS_GET_U(thisx->params, 12, 1) +#define POE_SISTER_GET_ID(x) PARAMS_GET_U(x->params, 8, 2) +#define POE_SISTER_GET_DECOY(x) PARAMS_GET_U(x->params, 10, 2) +#define POE_SISTER_GET_INTRO(x) PARAMS_GET_U(x->params, 12, 1) #define EN_PO_SISTERS_PARAM_N(n) (n << 8) // param for which sister by number #define EN_PO_SISTERS_PARAM(name) (EN_PO_SISTERS_##name << 8) // param for which sister by name From cc35cdac6e40fd40f2f5efc355745a77d755d71f Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Wed, 10 Dec 2025 17:00:17 -0500 Subject: [PATCH 18/24] Update z_en_po_sisters.c macro issue --- src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 60f7df7ad2..1b83ec14b0 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -194,17 +194,17 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); - this->sisterID = POE_SISTER_GET_ID(thisx->params); + this->sisterID = POE_SISTER_GET_ID(thisx); this->actor.naviEnemyId = this->sisterID + NAVI_ENEMY_POE_SISTER_MEG; if (1) {} - this->decoyID = POE_SISTER_GET_DECOY(thisx->params); + this->decoyID = POE_SISTER_GET_DECOY(thisx); this->hoverPulse = 32; this->vanishTimer = 20; this->torchFlames = 1; this->flags = EN_PO_SISTERS_FLAG_TORCH; this->circleDist = 110.0f; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; - if (POE_SISTER_GET_INTRO(this->actor.params)) { + if (POE_SISTER_GET_INTRO(&this->actor)) { EnPoSisters_SetupIntro(this, play); } else if (this->sisterID == EN_PO_SISTERS_MEG) { if (this->decoyID == 0) { From 6d4b3e05ded9f8da4625a0c064680fa30d019340 Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Wed, 10 Dec 2025 17:09:42 -0500 Subject: [PATCH 19/24] Update z_en_po_sisters.c some more of thar0's requests. --- src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 1b83ec14b0..009b5e8b2f 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -487,7 +487,7 @@ void EnPoSisters_SetupMegDecoy(EnPoSisters* this) { this->actionFunc = EnPoSisters_MegIntroStep2; } -void EnPoSisters_MegFightInit(EnPoSisters* this) { +void EnPoSisters_SetupMegFight(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f); this->color.a = 255; this->timer = 300; @@ -784,7 +784,7 @@ void EnPoSisters_Reveal(EnPoSisters* this, PlayState* play) { EnPoSisters_SetupFight(this); } } else { - EnPoSisters_MegFightInit(this); + EnPoSisters_SetupMegFight(this); } } else { this->color.a = (this->skelAnime.curFrame * 255.0f) / this->skelAnime.endFrame; @@ -929,7 +929,7 @@ void EnPoSisters_MegIntroStep2(EnPoSisters* this, PlayState* play) { if (this->decoyID == 0) { func_800F5ACC(NA_BGM_MINI_BOSS); } - EnPoSisters_MegFightInit(this); + EnPoSisters_SetupMegFight(this); } else { this->actor.world.pos.y += 0.1f; ID = this->decoyID; From f7bbfebb77dbe6b02bebfa1da33812485cc83d5c Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Wed, 10 Dec 2025 17:11:33 -0500 Subject: [PATCH 20/24] Update z_en_po_sisters.c --- src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 009b5e8b2f..85eab43c76 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -531,7 +531,7 @@ void EnPoSisters_SetupIntro(EnPoSisters* this, PlayState* play) { this->actionFunc = EnPoSisters_IntroStep1; } -void EnPoSisters_IntroSetup2(EnPoSisters* this) { +void EnPoSisters_SetupIntro2(EnPoSisters* this) { s32 i; this->torchFlames = ARRAY_COUNT(this->torchPos); @@ -1079,7 +1079,7 @@ void EnPoSisters_IntroStep1(EnPoSisters* this, PlayState* play) { sIntroVar = 1; } if (this->timer == 0) { - EnPoSisters_IntroSetup2(this); + EnPoSisters_SetupIntro2(this); } } Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_TORCH - SFX_FLAG); From 661c2e7920348d63438a02c002d0fcc2ca963a6f Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Wed, 10 Dec 2025 17:24:57 -0500 Subject: [PATCH 21/24] `En_Po_Sisters`: macro fix. --- src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c | 2 +- src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 85eab43c76..0e4b6a3c12 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -204,7 +204,7 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) { this->flags = EN_PO_SISTERS_FLAG_TORCH; this->circleDist = 110.0f; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; - if (POE_SISTER_GET_INTRO(&this->actor)) { + if (POE_SISTER_GET_INTRO(this)) { EnPoSisters_SetupIntro(this, play); } else if (this->sisterID == EN_PO_SISTERS_MEG) { if (this->decoyID == 0) { diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h index afe56f9809..33a0e3f09c 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h @@ -41,7 +41,7 @@ typedef enum EnPoSisterNames { #define POE_SISTER_GET_ID(x) PARAMS_GET_U(x->params, 8, 2) #define POE_SISTER_GET_DECOY(x) PARAMS_GET_U(x->params, 10, 2) -#define POE_SISTER_GET_INTRO(x) PARAMS_GET_U(x->params, 12, 1) +#define POE_SISTER_GET_INTRO(x) PARAMS_GET_U(x->actor.params, 12, 1) #define EN_PO_SISTERS_PARAM_N(n) (n << 8) // param for which sister by number #define EN_PO_SISTERS_PARAM(name) (EN_PO_SISTERS_##name << 8) // param for which sister by name From 386fb2ae934810e0b888b9f1d675680ecd31d56e Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Wed, 10 Dec 2025 17:46:42 -0500 Subject: [PATCH 22/24] Update z_en_po_sisters.h --- src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h index 33a0e3f09c..b0e1be7dec 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h @@ -41,7 +41,7 @@ typedef enum EnPoSisterNames { #define POE_SISTER_GET_ID(x) PARAMS_GET_U(x->params, 8, 2) #define POE_SISTER_GET_DECOY(x) PARAMS_GET_U(x->params, 10, 2) -#define POE_SISTER_GET_INTRO(x) PARAMS_GET_U(x->actor.params, 12, 1) +#define POE_SISTER_GET_INTRO(x) PARAMS_GET_NOSHIFT(x->actor.params, 12, 1) #define EN_PO_SISTERS_PARAM_N(n) (n << 8) // param for which sister by number #define EN_PO_SISTERS_PARAM(name) (EN_PO_SISTERS_##name << 8) // param for which sister by name From d9f9e9f362a9b1789231703a3fb9950b6f852cf9 Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Wed, 10 Dec 2025 18:36:54 -0500 Subject: [PATCH 23/24] Update z_en_po_sisters.c formatting --- src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 0e4b6a3c12..f5a845b817 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -731,8 +731,7 @@ void EnPoSisters_Hit(EnPoSisters* this, PlayState* play) { if (this->decoyID != 0) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.parent->shape.rot.y, (this->decoyID == 2) ? 0x800 : 0x400); - this->color.a = - ((this->skelAnime.endFrame - this->skelAnime.curFrame) * 255.0f) / this->skelAnime.endFrame; + this->color.a = ((this->skelAnime.endFrame - this->skelAnime.curFrame) * 255.0f) / this->skelAnime.endFrame; this->actor.world.pos.y = this->actor.parent->world.pos.y; EnPoSisters_CircleUpdate(this, play); } else if (this->sisterID != EN_PO_SISTERS_MEG) { @@ -1343,8 +1342,7 @@ s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve rot->x += (this->timer * 0x1000) - 0xF000; } } - if (this->color.a == 0 || limbIndex == 8 || - (this->actionFunc == EnPoSisters_ReleaseFlame && this->timer >= 8)) { + if (this->color.a == 0 || limbIndex == 8 || (this->actionFunc == EnPoSisters_ReleaseFlame && this->timer >= 8)) { *dList = NULL; } else if (limbIndex == 9) { *dList = sSisterBodies[this->sisterID]; @@ -1418,8 +1416,7 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Opa(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx); if (this->color.a == 255 || this->color.a == 0) { - gDPSetEnvColor(POLY_OPA_DISP++, this->color.r, this->color.g, this->color.b, - this->color.a); + gDPSetEnvColor(POLY_OPA_DISP++, this->color.r, this->color.g, this->color.b, this->color.a); gSPSegment(POLY_OPA_DISP++, 0x09, D_80116280 + 2); POLY_OPA_DISP = SkelAnime_Draw(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnPoSisters_OverrideLimbDraw, From 493108e81011e8693664dd51c007e662233e4bf1 Mon Sep 17 00:00:00 2001 From: blackgamma7 <28585957+blackgamma7@users.noreply.github.com> Date: Wed, 10 Dec 2025 18:37:26 -0500 Subject: [PATCH 24/24] Update z_en_po_sisters.c --- src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index f5a845b817..f20f794b8e 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -1334,7 +1334,6 @@ s32 EnPoSisters_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve EnPoSisters* this = (EnPoSisters*)thisx; Color_RGBA8* color; - if (limbIndex == 1 && (this->flags & EN_PO_SISTERS_FLAG_SPIN)) { if (this->timer >= 284) { rot->x += (this->timer * 0x1000) - 0x11C000;