Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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) {
Expand All @@ -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;
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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);
Expand Down