mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-01 16:30:02 -04:00
Migrate song of storms check
This commit is contained in:
@@ -161,20 +161,12 @@ void GivePlayerRandoRewardSongOfStorms(EnFu* windmillGuy, PlayState* play, Rando
|
||||
}
|
||||
}
|
||||
|
||||
void func_WaitForSongGive(EnFu* this, PlayState* play) {
|
||||
GivePlayerRandoRewardSongOfStorms(this, play, RC_SONG_FROM_WINDMILL);
|
||||
}
|
||||
|
||||
void func_80A1DB60(EnFu* this, PlayState* play) {
|
||||
if (play->csCtx.state == CS_STATE_IDLE) {
|
||||
this->actionFunc = EnFu_WaitAdult;
|
||||
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_SONG_OF_STORMS);
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
}
|
||||
|
||||
if (IS_RANDO) {
|
||||
this->actionFunc = func_WaitForSongGive;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A1DBA0(EnFu* this, PlayState* play) {
|
||||
@@ -186,10 +178,6 @@ void func_80A1DBA0(EnFu* this, PlayState* play) {
|
||||
void func_80A1DBD4(EnFu* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (IS_RANDO && (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING)) {
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_03;
|
||||
}
|
||||
|
||||
if (play->msgCtx.ocarinaMode >= OCARINA_MODE_04) {
|
||||
this->actionFunc = EnFu_WaitAdult;
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
@@ -199,12 +187,6 @@ void func_80A1DBD4(EnFu* this, PlayState* play) {
|
||||
this->actionFunc = func_80A1DB60;
|
||||
this->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
|
||||
|
||||
if (!IS_RANDO) {
|
||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gSongOfStormsCs);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
Item_Give(play, ITEM_SONG_STORMS);
|
||||
}
|
||||
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||
Flags_SetEventChkInf(EVENTCHKINF_PLAYED_SONG_OF_STORMS_IN_WINDMILL);
|
||||
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_02) {
|
||||
@@ -249,7 +231,7 @@ void EnFu_WaitAdult(EnFu* this, PlayState* play) {
|
||||
} else if (player->stateFlags2 & 0x1000000) {
|
||||
this->actor.textId = 0x5035;
|
||||
Message_StartTextbox(play, this->actor.textId, NULL);
|
||||
this->actionFunc = IS_RANDO ? func_80A1DBD4 : EnFu_TeachSong;
|
||||
this->actionFunc = EnFu_TeachSong;
|
||||
this->behaviorFlags |= FU_WAIT;
|
||||
} else if (Actor_ProcessTalkRequest(&this->actor, play)) {
|
||||
this->actionFunc = func_80A1DBA0;
|
||||
|
||||
@@ -41,4 +41,7 @@ typedef struct EnFu {
|
||||
/* 0x02AC */ EnFuActionFunc actionFunc;
|
||||
} EnFu; // size = 0x02B0
|
||||
|
||||
void EnFu_TeachSong(EnFu* enFu, PlayState* play);
|
||||
void EnFu_WaitAdult(EnFu* enFu, PlayState* play);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user