From aaa365eb7f21baaea807de8275f2ad13343b4e2a Mon Sep 17 00:00:00 2001 From: nathan-casabieille Date: Fri, 1 May 2026 10:20:09 +0200 Subject: [PATCH] BgSpot15Saku: name action functions and struct fields --- .../ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c | 30 +++++++++---------- .../ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h | 4 +-- .../actors/ovl_En_Heishi2/z_en_heishi2.c | 4 +-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c index a95f92eba94..6a341ceba42 100644 --- a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c +++ b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c @@ -22,9 +22,9 @@ void BgSpot15Saku_Destroy(Actor* thisx, PlayState* play); void BgSpot15Saku_Update(Actor* thisx, PlayState* play); void BgSpot15Saku_Draw(Actor* thisx, PlayState* play); -void func_808B4930(BgSpot15Saku* this, PlayState* play); -void func_808B4978(BgSpot15Saku* this, PlayState* play); -void func_808B4A04(BgSpot15Saku* this, PlayState* play); +void BgSpot15Saku_WaitOpen(BgSpot15Saku* this, PlayState* play); +void BgSpot15Saku_SlideOpen(BgSpot15Saku* this, PlayState* play); +void BgSpot15Saku_WaitReset(BgSpot15Saku* this, PlayState* play); ActorProfile Bg_Spot15_Saku_Profile = { /**/ ACTOR_BG_SPOT15_SAKU, @@ -50,13 +50,13 @@ void BgSpot15Saku_Init(Actor* thisx, PlayState* play) { this->dyna.actor.scale.x = 0.1f; this->dyna.actor.scale.y = 0.1f; this->dyna.actor.scale.z = 0.1f; - this->unk_170.x = this->dyna.actor.world.pos.x; - this->unk_170.y = this->dyna.actor.world.pos.y; - this->unk_170.z = this->dyna.actor.world.pos.z; + this->initPos.x = this->dyna.actor.world.pos.x; + this->initPos.y = this->dyna.actor.world.pos.y; + this->initPos.z = this->dyna.actor.world.pos.z; if (GET_INFTABLE(INFTABLE_71)) { this->dyna.actor.world.pos.z = 2659.0f; } - this->actionFunc = func_808B4930; + this->actionFunc = BgSpot15Saku_WaitOpen; } void BgSpot15Saku_Destroy(Actor* thisx, PlayState* play) { @@ -65,29 +65,29 @@ void BgSpot15Saku_Destroy(Actor* thisx, PlayState* play) { DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } -void func_808B4930(BgSpot15Saku* this, PlayState* play) { - if (this->unk_168 && !GET_INFTABLE(INFTABLE_71)) { +void BgSpot15Saku_WaitOpen(BgSpot15Saku* this, PlayState* play) { + if (this->openFlag && !GET_INFTABLE(INFTABLE_71)) { this->timer = 2; - this->actionFunc = func_808B4978; + this->actionFunc = BgSpot15Saku_SlideOpen; } } -void func_808B4978(BgSpot15Saku* this, PlayState* play) { +void BgSpot15Saku_SlideOpen(BgSpot15Saku* this, PlayState* play) { if (this->timer == 0) { Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_METALGATE_OPEN - SFX_FLAG); this->dyna.actor.world.pos.z -= 2.0f; if (this->dyna.actor.world.pos.z < 2660.0f) { Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN_STOP); this->timer = 30; - this->actionFunc = func_808B4A04; + this->actionFunc = BgSpot15Saku_WaitReset; } } } -void func_808B4A04(BgSpot15Saku* this, PlayState* play) { +void BgSpot15Saku_WaitReset(BgSpot15Saku* this, PlayState* play) { if (this->timer == 0) { - this->unk_168 = 0; - this->actionFunc = func_808B4930; + this->openFlag = 0; + this->actionFunc = BgSpot15Saku_WaitOpen; } } diff --git a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h index 61118043184..a7a7f6a22bb 100644 --- a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h +++ b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h @@ -11,8 +11,8 @@ typedef void (*BgSpot15SakuActionFunc)(struct BgSpot15Saku*, struct PlayState*); typedef struct BgSpot15Saku { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ BgSpot15SakuActionFunc actionFunc; - /* 0x0168 */ u64 unk_168; - /* 0x0170 */ Vec3f unk_170; + /* 0x0168 */ u64 openFlag; + /* 0x0170 */ Vec3f initPos; /* 0x017C */ s16 timer; } BgSpot15Saku; // size = 0x0180 diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index b193f534c26..bef3f3a2f23 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -307,7 +307,7 @@ void func_80A53638(EnHeishi2* this, PlayState* play) { actor = (BgSpot15Saku*)(actor->dyna.actor.next); } else { this->gate = &actor->dyna.actor; - actor->unk_168 = 1; + actor->openFlag = 1; break; } } @@ -344,7 +344,7 @@ void func_80A53850(EnHeishi2* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Play_SetCameraAtEye(play, this->subCamId, &this->subCamEye, &this->subCamAt); gate = (BgSpot15Saku*)this->gate; - if ((this->unk_2F2[0] == 0) || (gate->unk_168 == 0)) { + if ((this->unk_2F2[0] == 0) || (gate->openFlag == 0)) { Play_ClearCamera(play, this->subCamId); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); Message_CloseTextbox(play);