1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-02 22:14:33 +00:00

Document Transition System (#1131)

* transition type enum

* mode enum, start documenting some types

* some more

* use enums for entrance table

* entrance table filled out

* sceneLoadFlag -> transitionTrigger

* sandstorm state/mode/type

* done i think

* fixes

* clean up circle weirdness

* circle use enum + fix texture names

* fix

* how did that even happen lol

* jesus

* review2

* some more review

* most review, still some more to do

* new transition trigger names

* some of review

* next type default
This commit is contained in:
fig02 2022-04-27 16:00:25 -04:00 committed by GitHub
parent fed9ac3e20
commit 16790bc253
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 2477 additions and 1382 deletions

View file

@ -223,8 +223,8 @@ void BgSpot00Hanebasi_Update(Actor* thisx, GlobalContext* globalCtx) {
func_8002DF54(globalCtx, &player->actor, 8);
globalCtx->nextEntranceIndex = 0x00CD;
gSaveContext.nextCutsceneIndex = 0xFFF1;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->fadeTransition = 4;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
} else if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 3000.0f, 0x7530)) {
globalCtx->envCtx.gloomySkyMode = 1;
}

View file

@ -1497,9 +1497,9 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, GlobalContext* globalCtx)
}
if (this->csTimer == 180) {
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
globalCtx->nextEntranceIndex = 0x43F;
globalCtx->fadeTransition = 5;
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE_FAST;
}
break;

View file

@ -1793,8 +1793,8 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
case 20:
globalCtx->nextEntranceIndex = 0x6B;
gSaveContext.nextCutsceneIndex = 0xFFF2;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->fadeTransition = 3;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
break;
}

View file

@ -868,8 +868,8 @@ void func_80986B2C(GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
globalCtx->nextEntranceIndex = 0xCD;
globalCtx->fadeTransition = 38;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST);
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
func_8002DF54(globalCtx, &player->actor, 8);
}
}

View file

@ -128,7 +128,7 @@ void DoorAna_WaitOpen(DoorAna* this, GlobalContext* globalCtx) {
player = GET_PLAYER(globalCtx);
if (Math_StepToF(&this->actor.scale.x, 0.01f, 0.001f)) {
if ((this->actor.targetMode != 0) && (globalCtx->sceneLoadFlag == 0) &&
if ((this->actor.targetMode != 0) && (globalCtx->transitionTrigger == TRANS_TRIGGER_OFF) &&
(player->stateFlags1 & PLAYER_STATE1_31) && (player->unk_84F == 0)) {
destinationIdx = ((this->actor.params >> 0xC) & 7) - 1;
Gameplay_SetupRespawnPoint(globalCtx, RESPAWN_MODE_RETURN, 0x4FF);

View file

@ -494,7 +494,8 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, GlobalContext* globalCtx) {
this->warpTimer++;
if (sWarpTimerTarget < this->warpTimer && gSaveContext.nextCutsceneIndex == 0xFFEF) {
osSyncPrintf("\n\n\nじかんがきたからおーしまい fade_direction=[%d]", globalCtx->sceneLoadFlag, 0x14);
osSyncPrintf("\n\n\nじかんがきたからおーしまい fade_direction=[%d]", globalCtx->transitionTrigger,
TRANS_TRIGGER_START);
if (globalCtx->sceneNum == SCENE_DDAN_BOSS) {
if (!Flags_GetEventChkInf(0x25)) {
@ -522,9 +523,9 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, GlobalContext* globalCtx) {
gSaveContext.nextCutsceneIndex = 0;
}
osSyncPrintf("\n\n\nおわりおわり");
globalCtx->sceneLoadFlag = 0x14;
globalCtx->fadeTransition = 7;
gSaveContext.nextTransition = 3;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE_SLOW;
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
}
Math_StepToF(&this->unk_194, 2.0f, 0.01f);
@ -608,8 +609,8 @@ void DoorWarp1_RutoWarpOut(DoorWarp1* this, GlobalContext* globalCtx) {
Item_Give(globalCtx, ITEM_ZORA_SAPPHIRE);
globalCtx->nextEntranceIndex = 0x10E;
gSaveContext.nextCutsceneIndex = 0xFFF0;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->fadeTransition = 7;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE_SLOW;
}
Math_StepToF(&this->unk_194, 2.0f, 0.01f);
@ -777,9 +778,9 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, GlobalContext* globalCtx) {
gSaveContext.nextCutsceneIndex = 0;
}
}
globalCtx->sceneLoadFlag = 0x14;
globalCtx->fadeTransition = 3;
gSaveContext.nextTransition = 7;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE_SLOW;
}
if (this->warpTimer >= 141) {
f32 screenFillAlpha;

View file

@ -53,7 +53,7 @@ void func_809FFDC8(EnEg* this, GlobalContext* globalCtx) {
Gameplay_TriggerRespawn(globalCtx);
gSaveContext.respawnFlag = -2;
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP);
globalCtx->fadeTransition = 2;
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
EnEg_PlayVoidOutSFX();
voided = true;
}

View file

@ -236,8 +236,8 @@ void EnGe1_KickPlayer(EnGe1* this, GlobalContext* globalCtx) {
globalCtx->nextEntranceIndex = 0x3B4;
}
globalCtx->fadeTransition = 0x26;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST);
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
}
}
@ -582,8 +582,8 @@ void EnGe1_BeginGame_Archery(EnGe1* this, GlobalContext* globalCtx) {
Rupees_ChangeBy(-20);
globalCtx->nextEntranceIndex = 0x129;
gSaveContext.nextCutsceneIndex = 0xFFF0;
globalCtx->fadeTransition = 0x26;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST);
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
gSaveContext.eventInf[0] |= 0x100;
gSaveContext.eventChkInf[6] |= 0x100;

View file

@ -245,8 +245,8 @@ void EnGe2_CaptureClose(EnGe2* this, GlobalContext* globalCtx) {
globalCtx->nextEntranceIndex = 0x3B4;
}
globalCtx->fadeTransition = 0x26;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST);
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
}
}
@ -271,8 +271,8 @@ void EnGe2_CaptureCharge(EnGe2* this, GlobalContext* globalCtx) {
globalCtx->nextEntranceIndex = 0x3B4;
}
globalCtx->fadeTransition = 0x26;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST);
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
}
}

View file

@ -1582,8 +1582,8 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
} else {
globalCtx->nextEntranceIndex = 0x3B4;
}
globalCtx->fadeTransition = 0x26;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST);
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
}
}
}

View file

@ -349,11 +349,11 @@ void EnHeishi1_Kick(EnHeishi1* this, GlobalContext* globalCtx) {
if (!this->loadStarted) {
gSaveContext.eventChkInf[4] |= 0x4000;
globalCtx->nextEntranceIndex = 0x4FA;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
this->loadStarted = true;
sPlayerIsCaught = false;
globalCtx->fadeTransition = 0x2E;
gSaveContext.nextTransition = 0x2E;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
gSaveContext.nextTransitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
}
}
}

View file

@ -204,10 +204,10 @@ void func_80A55D00(EnHeishi3* this, GlobalContext* globalCtx) {
(this->respawnFlag == 0)) {
gSaveContext.eventChkInf[4] |= 0x4000;
globalCtx->nextEntranceIndex = 0x47E; // Hyrule Castle from Guard Capture (outside)
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
this->respawnFlag = 1;
globalCtx->fadeTransition = 0x2E;
gSaveContext.nextTransition = 0x2E;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
gSaveContext.nextTransitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
}
}

View file

@ -2527,8 +2527,8 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, GlobalContext* globalCtx) {
if (sp20 != 1 && gSaveContext.minigameState != 3) {
gSaveContext.cutsceneIndex = 0;
globalCtx->nextEntranceIndex = 0x3B0;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->fadeTransition = 0x20;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_BLACK, TCS_FAST);
}
}

View file

@ -113,22 +113,22 @@ void EnHorseGameCheck_FinishIngoRace(EnHorseGameCheckIngoRace* this, GlobalConte
if (gSaveContext.eventInf[0] & 0x40) {
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 6;
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
globalCtx->fadeTransition = 3;
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
Environment_ForcePlaySequence(NA_BGM_INGO);
} else {
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 4;
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
Environment_ForcePlaySequence(NA_BGM_INGO);
globalCtx->fadeTransition = 0x2E;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
}
} else {
globalCtx->nextEntranceIndex = 0x558;
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 3;
globalCtx->fadeTransition = 0x20;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_BLACK, TCS_FAST);
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
}
DREG(25) = 0;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
gSaveContext.timer1State = 0;
}
@ -296,22 +296,22 @@ void EnHorseGameCheck_FinishMalonRace(EnHorseGameCheckMalonRace* this, GlobalCon
if ((this->result == MALONRACE_SUCCESS) || (this->result == MALONRACE_TIME_UP)) {
gSaveContext.cutsceneIndex = 0;
globalCtx->nextEntranceIndex = 0x4CE;
globalCtx->fadeTransition = 0x2E;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
} else if (this->result == MALONRACE_FAILURE) {
gSaveContext.timer1Value = 240;
gSaveContext.timer1State = 0xF;
gSaveContext.cutsceneIndex = 0;
globalCtx->nextEntranceIndex = 0x4CE;
globalCtx->fadeTransition = 0x2E;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
} else {
// "not supported"
osSyncPrintf("En_HGC_Spot20_Ta_end():対応せず\n");
gSaveContext.cutsceneIndex = 0;
globalCtx->nextEntranceIndex = 0x157;
globalCtx->fadeTransition = 0x2E;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
}
}

View file

@ -316,16 +316,16 @@ s16 func_80A79500(GlobalContext* globalCtx, Actor* thisx) {
void func_80A795C8(EnIn* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
s16 phi_a3;
s16 arg3;
if (this->skelAnime.animation == &object_in_Anim_0003B4 || this->skelAnime.animation == &object_in_Anim_001BE0 ||
this->skelAnime.animation == &object_in_Anim_013D60) {
phi_a3 = 1;
arg3 = 1;
} else {
phi_a3 = 0;
arg3 = 0;
}
if (this->actionFunc == func_80A7A568) {
phi_a3 = 4;
arg3 = 4;
}
if (this->actionFunc == func_80A7B024) {
this->unk_308.unk_18 = globalCtx->view.eye;
@ -334,7 +334,7 @@ void func_80A795C8(EnIn* this, GlobalContext* globalCtx) {
this->unk_308.unk_18 = player->actor.world.pos;
this->unk_308.unk_14 = 16.0f;
}
func_80034A14(&this->actor, &this->unk_308, 1, phi_a3);
func_80034A14(&this->actor, &this->unk_308, 1, arg3);
}
void func_80A79690(SkelAnime* skelAnime, EnIn* this, GlobalContext* globalCtx) {
@ -423,15 +423,15 @@ void func_80A79AB4(EnIn* this, GlobalContext* globalCtx) {
}
}
void func_80A79BAC(EnIn* this, GlobalContext* globalCtx, s32 index, u32 arg3) {
void func_80A79BAC(EnIn* this, GlobalContext* globalCtx, s32 index, u32 transitionType) {
s16 entrances[] = { 0x0558, 0x04CA, 0x0157 };
globalCtx->nextEntranceIndex = entrances[index];
if (index == 2) {
gSaveContext.nextCutsceneIndex = 0xFFF0;
}
globalCtx->fadeTransition = arg3;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionType = transitionType;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
func_8002DF54(globalCtx, &this->actor, 8);
Interface_ChangeAlpha(1);
if (index == 0) {
@ -638,7 +638,7 @@ void func_80A7A4BC(EnIn* this, GlobalContext* globalCtx) {
void func_80A7A4C8(EnIn* this, GlobalContext* globalCtx) {
if (this->unk_308.unk_00 == 2) {
func_80A79BAC(this, globalCtx, 1, 0x20);
func_80A79BAC(this, globalCtx, 1, TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_BLACK, TCS_FAST));
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x000F) | 0x0001;
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
gSaveContext.infTable[10] &= ~4;
@ -652,7 +652,7 @@ void func_80A7A4C8(EnIn* this, GlobalContext* globalCtx) {
void func_80A7A568(EnIn* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
s32 phi_a2;
s32 phi_a3;
s32 transitionType;
if (!(gSaveContext.eventChkInf[1] & 0x800) && (player->stateFlags1 & PLAYER_STATE1_23)) {
gSaveContext.infTable[10] |= 0x800;
@ -675,7 +675,7 @@ void func_80A7A568(EnIn* this, GlobalContext* globalCtx) {
(gSaveContext.eventInf[0] & ~0x10) | (((EnHorse*)GET_PLAYER(globalCtx)->rideActor)->type << 4);
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 2;
phi_a2 = 2;
phi_a3 = 2;
transitionType = TRANS_TYPE_FADE_BLACK;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_FOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@ -687,9 +687,9 @@ void func_80A7A568(EnIn* this, GlobalContext* globalCtx) {
}
gSaveContext.eventInf[0] &= ~0xF;
phi_a2 = 0;
phi_a3 = 0x20;
transitionType = TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_BLACK, TCS_FAST);
}
func_80A79BAC(this, globalCtx, phi_a2, phi_a3);
func_80A79BAC(this, globalCtx, phi_a2, transitionType);
globalCtx->msgCtx.stateTimer = 0;
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
@ -721,7 +721,7 @@ void func_80A7A848(EnIn* this, GlobalContext* globalCtx) {
gSaveContext.eventInf[0] &= ~0xF;
this->actionFunc = func_80A7A4C8;
} else {
func_80A79BAC(this, globalCtx, 2, 0x26);
func_80A79BAC(this, globalCtx, 2, TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST));
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 2;
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
globalCtx->msgCtx.stateTimer = 0;
@ -746,7 +746,7 @@ void func_80A7A940(EnIn* this, GlobalContext* globalCtx) {
}
if (this->unk_308.unk_00 == 2) {
this->actor.flags &= ~ACTOR_FLAG_16;
func_80A79BAC(this, globalCtx, 2, 0x26);
func_80A79BAC(this, globalCtx, 2, TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST));
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x000F) | 0x0002;
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
globalCtx->msgCtx.stateTimer = 0;
@ -870,8 +870,8 @@ void func_80A7AEF0(EnIn* this, GlobalContext* globalCtx) {
yaw = Math_Vec3f_Yaw(&pos, &player->actor.world.pos);
if (ABS(yaw) > 0x4000) {
globalCtx->nextEntranceIndex = 0x0476;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->fadeTransition = 5;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE_FAST;
this->actionFunc = func_80A7B018;
} else if (this->unk_308.unk_00 == 2) {
globalCtx->msgCtx.stateTimer = 4;
@ -896,7 +896,7 @@ void func_80A7B024(EnIn* this, GlobalContext* globalCtx) {
gSaveContext.eventChkInf[1] |= 0x800;
gSaveContext.infTable[10] |= 0x800;
}
func_80A79BAC(this, globalCtx, 0, 0x26);
func_80A79BAC(this, globalCtx, 0, TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST));
gSaveContext.eventInf[0] = gSaveContext.eventInf[0] & ~0xF;
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
globalCtx->msgCtx.stateTimer = 4;

View file

@ -387,8 +387,8 @@ void func_80AA1150(EnMa1* this, GlobalContext* globalCtx) {
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_03) {
globalCtx->nextEntranceIndex = 0x157;
gSaveContext.nextCutsceneIndex = 0xFFF1;
globalCtx->fadeTransition = 42;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_WAVE, TCC_WHITE, TCS_FAST);
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
this->actionFunc = EnMa1_DoNothing;
}
}

View file

@ -116,8 +116,8 @@ s16 func_80AA2BD4(GlobalContext* globalCtx, Actor* thisx) {
if (Message_ShouldAdvance(globalCtx)) {
globalCtx->nextEntranceIndex = 0x157;
gSaveContext.nextCutsceneIndex = 0xFFF0;
globalCtx->fadeTransition = 0x26;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST);
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
gSaveContext.eventInf[0] |= 0x400;
gSaveContext.timer1State = 0xF;
}

View file

@ -86,8 +86,8 @@ void EnMag_Init(Actor* thisx, GlobalContext* globalCtx) {
gSaveContext.unk_13E7 = 0;
this->globalState = MAG_STATE_DISPLAY;
sDelayTimer = 20;
gSaveContext.fadeDuration = 1;
gSaveContext.unk_1419 = 255;
gSaveContext.transFadeDuration = 1;
gSaveContext.transWipeSpeed = 255;
}
Font_LoadOrderedFont(&this->font);
@ -130,8 +130,8 @@ void EnMag_Update(Actor* thisx, GlobalContext* globalCtx) {
this->globalState = MAG_STATE_DISPLAY;
sDelayTimer = 20;
gSaveContext.fadeDuration = 1;
gSaveContext.unk_1419 = 255;
gSaveContext.transFadeDuration = 1;
gSaveContext.transWipeSpeed = 255;
}
} else if (this->globalState >= MAG_STATE_DISPLAY) {
if (sDelayTimer == 0) {
@ -139,15 +139,15 @@ void EnMag_Update(Actor* thisx, GlobalContext* globalCtx) {
CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_A) ||
CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_B)) {
if (globalCtx->sceneLoadFlag != 20) {
if (globalCtx->transitionTrigger != TRANS_TRIGGER_START) {
Audio_SetCutsceneFlag(0);
Audio_PlaySoundGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
gSaveContext.gameMode = 2;
globalCtx->sceneLoadFlag = 20;
globalCtx->fadeTransition = 2;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
}
this->copyrightAlphaStep = 15;

View file

@ -72,7 +72,7 @@ void EnOkarinaEffect_ManageStorm(EnOkarinaEffect* this, GlobalContext* globalCtx
Flags_UnsetEnv(globalCtx, 5); // clear storms env flag
if (((globalCtx->pauseCtx.state == 0) && (globalCtx->gameOverCtx.state == GAMEOVER_INACTIVE) &&
(globalCtx->msgCtx.msgLength == 0) && (!FrameAdvance_IsEnabled(globalCtx)) &&
((globalCtx->transitionMode == 0) || (gSaveContext.gameMode != 0))) ||
((globalCtx->transitionMode == TRANS_MODE_OFF) || (gSaveContext.gameMode != 0))) ||
(this->timer >= 250)) {
if (globalCtx->envCtx.indoors || globalCtx->envCtx.unk_1F != 1) {
this->timer--;

View file

@ -918,8 +918,8 @@ void EnOssan_State_StartConversation(EnOssan* this, GlobalContext* globalCtx, Pl
return;
case OSSAN_HAPPY_STATE_ANGRY:
globalCtx->nextEntranceIndex = 0x1D1;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->fadeTransition = 0x2E;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
return;
}

View file

@ -463,7 +463,7 @@ void func_80B12460(EnSyatekiNiw* this, GlobalContext* globalCtx) {
case 6:
if (this->unk_25E == 1) {
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
globalCtx->nextEntranceIndex = gSaveContext.entranceIndex;
globalCtx->shootingGalleryStatus = 0;
player->actor.freezeTimer = 20;

View file

@ -666,14 +666,14 @@ void func_80B15424(EnTa* this, GlobalContext* globalCtx) {
globalCtx->nextEntranceIndex = 0x5E4;
if (gSaveContext.eventInf[0] & 0x100) {
globalCtx->fadeTransition = 46;
gSaveContext.nextTransition = 3;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
} else {
globalCtx->fadeTransition = 38;
gSaveContext.nextTransition = 2;
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST);
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
}
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
gSaveContext.eventInf[0] |= 0x400;
this->actionFunc = func_80B153D4;
this->unk_2CC = 22;

View file

@ -772,8 +772,8 @@ s32 EnZl4_CsAskName(EnZl4* this, GlobalContext* globalCtx) {
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
globalCtx->nextEntranceIndex = 0xA0;
gSaveContext.nextCutsceneIndex = 0xFFF7;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->fadeTransition = 3;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
}
break;
}

View file

@ -2137,7 +2137,7 @@ void func_80834298(Player* this, GlobalContext* globalCtx) {
((this->heldItemActionParam == this->itemActionParam) || (this->stateFlags1 & PLAYER_STATE1_22)) &&
(gSaveContext.health != 0) && (globalCtx->csCtx.state == CS_STATE_IDLE) && (this->csMode == 0) &&
(globalCtx->shootingGalleryStatus == 0) && (globalCtx->activeCamera == MAIN_CAM) &&
(globalCtx->sceneLoadFlag != 0x14) && (gSaveContext.timer1State != 10)) {
(globalCtx->transitionTrigger != TRANS_TRIGGER_START) && (gSaveContext.timer1State != 10)) {
func_80833DF8(this, globalCtx);
}
@ -3233,7 +3233,8 @@ s32 func_80836FAC(GlobalContext* globalCtx, Player* this, f32* arg2, s16* arg3,
f32 temp_f14;
f32 temp_f12;
if ((this->unk_6AD != 0) || (globalCtx->sceneLoadFlag == 0x14) || (this->stateFlags1 & PLAYER_STATE1_0)) {
if ((this->unk_6AD != 0) || (globalCtx->transitionTrigger == TRANS_TRIGGER_START) ||
(this->stateFlags1 & PLAYER_STATE1_0)) {
*arg2 = 0.0f;
*arg3 = this->actor.shape.rot.y;
} else {
@ -4084,7 +4085,7 @@ void func_80838F5C(GlobalContext* globalCtx, Player* this) {
}
s32 func_80838FB8(GlobalContext* globalCtx, Player* this) {
if ((globalCtx->sceneLoadFlag == 0) && (this->stateFlags1 & PLAYER_STATE1_31)) {
if ((globalCtx->transitionTrigger == TRANS_TRIGGER_OFF) && (this->stateFlags1 & PLAYER_STATE1_31)) {
func_80838F5C(globalCtx, this);
func_80832284(globalCtx, this, &gPlayerAnim_003040);
func_80832698(this, NA_SE_VO_LI_FALL_S);
@ -4124,8 +4125,8 @@ s32 func_80839034(GlobalContext* globalCtx, Player* this, CollisionPoly* poly, u
if (this->actor.category == ACTORCAT_PLAYER) {
sp3C = 0;
if (!(this->stateFlags1 & PLAYER_STATE1_7) && (globalCtx->sceneLoadFlag == 0) && (this->csMode == 0) &&
!(this->stateFlags1 & PLAYER_STATE1_0) &&
if (!(this->stateFlags1 & PLAYER_STATE1_7) && (globalCtx->transitionTrigger == TRANS_TRIGGER_OFF) &&
(this->csMode == 0) && !(this->stateFlags1 & PLAYER_STATE1_0) &&
(((poly != NULL) && (sp3C = SurfaceType_GetSceneExitIndex(&globalCtx->colCtx, poly, bgId), sp3C != 0)) ||
(func_8083816C(D_808535E4) && (this->unk_A7A == 12)))) {
@ -4144,8 +4145,8 @@ s32 func_80839034(GlobalContext* globalCtx, Player* this, CollisionPoly* poly, u
if (globalCtx->nextEntranceIndex == 0x7FFF) {
gSaveContext.respawnFlag = 2;
globalCtx->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_RETURN].entranceIndex;
globalCtx->fadeTransition = 3;
gSaveContext.nextTransition = 3;
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
} else if (globalCtx->nextEntranceIndex >= 0x7FF9) {
globalCtx->nextEntranceIndex =
D_808544F8[D_80854514[globalCtx->nextEntranceIndex - 0x7FF9] + globalCtx->curSpawn];
@ -4159,7 +4160,7 @@ s32 func_80839034(GlobalContext* globalCtx, Player* this, CollisionPoly* poly, u
gSaveContext.unk_13C3 = 1;
func_800994A0(globalCtx);
}
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
}
if (!(this->stateFlags1 & (PLAYER_STATE1_23 | PLAYER_STATE1_29)) &&
@ -4205,7 +4206,7 @@ s32 func_80839034(GlobalContext* globalCtx, Player* this, CollisionPoly* poly, u
return 1;
} else {
if (globalCtx->sceneLoadFlag == 0) {
if (globalCtx->transitionTrigger == TRANS_TRIGGER_OFF) {
if ((this->actor.world.pos.y < -4000.0f) ||
(((this->unk_A7A == 5) || (this->unk_A7A == 12)) &&
@ -4219,7 +4220,7 @@ s32 func_80839034(GlobalContext* globalCtx, Player* this, CollisionPoly* poly, u
} else {
Gameplay_TriggerVoidOut(globalCtx);
}
globalCtx->fadeTransition = 4;
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
func_80078884(NA_SE_OC_ABYSS);
} else {
func_80838F5C(globalCtx, this);
@ -10338,8 +10339,8 @@ void Player_UpdateCommon(Player* this, GlobalContext* globalCtx, Input* input) {
: &gPlayerAnim_002878);
}
} else {
if ((this->actor.parent == NULL) &&
((globalCtx->sceneLoadFlag == 0x14) || (this->unk_A87 != 0) || !func_808382DC(this, globalCtx))) {
if ((this->actor.parent == NULL) && ((globalCtx->transitionTrigger == TRANS_TRIGGER_START) ||
(this->unk_A87 != 0) || !func_808382DC(this, globalCtx))) {
func_8083AA10(this, globalCtx);
} else {
this->fallStartHeight = this->actor.world.pos.y;
@ -11495,7 +11496,7 @@ s32 func_8084C9BC(Player* this, GlobalContext* globalCtx) {
}
}
if ((globalCtx->csCtx.state == CS_STATE_IDLE) && (globalCtx->transitionMode == 0) &&
if ((globalCtx->csCtx.state == CS_STATE_IDLE) && (globalCtx->transitionMode == TRANS_MODE_OFF) &&
(EN_HORSE_CHECK_1(rideActor) || EN_HORSE_CHECK_4(rideActor))) {
this->stateFlags2 |= PLAYER_STATE2_22;
@ -12068,9 +12069,9 @@ s32 func_8084DFF4(GlobalContext* globalCtx, Player* this) {
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
if (this->getItemId == GI_GAUNTLETS_SILVER) {
globalCtx->nextEntranceIndex = 0x0123;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
gSaveContext.nextCutsceneIndex = 0xFFF1;
globalCtx->fadeTransition = 0xF;
globalCtx->transitionType = TRANS_TYPE_SANDSTORM_END;
this->stateFlags1 &= ~PLAYER_STATE1_29;
func_80852FFC(globalCtx, NULL, 8);
}
@ -12678,7 +12679,7 @@ void func_8084F710(Player* this, GlobalContext* globalCtx) {
void func_8084F88C(Player* this, GlobalContext* globalCtx) {
LinkAnimation_Update(globalCtx, &this->skelAnime);
if ((this->unk_850++ > 8) && (globalCtx->sceneLoadFlag == 0)) {
if ((this->unk_850++ > 8) && (globalCtx->transitionTrigger == TRANS_TRIGGER_OFF)) {
if (this->unk_84F != 0) {
if (globalCtx->sceneNum == 9) {
@ -12690,16 +12691,16 @@ void func_8084F88C(Player* this, GlobalContext* globalCtx) {
Gameplay_TriggerVoidOut(globalCtx);
}
globalCtx->fadeTransition = 4;
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
func_80078884(NA_SE_OC_ABYSS);
} else {
globalCtx->fadeTransition = 2;
gSaveContext.nextTransition = 2;
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
gSaveContext.natureAmbienceId = 0xFF;
}
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
}
}
@ -13018,9 +13019,9 @@ void func_8085063C(Player* this, GlobalContext* globalCtx) {
if (globalCtx->msgCtx.choiceIndex == 0) {
gSaveContext.respawnFlag = 3;
globalCtx->sceneLoadFlag = 0x14;
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
globalCtx->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_TOP].entranceIndex;
globalCtx->fadeTransition = 5;
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE_FAST;
func_80088AF0(globalCtx);
return;
}

View file

@ -1477,7 +1477,7 @@ void FileChoose_LoadGame(GameState* thisx) {
gSaveContext.unk_13F2 = 0;
gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX;
gSaveContext.skyboxTime = 0;
gSaveContext.nextTransition = 0xFF;
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;
gSaveContext.nextCutsceneIndex = 0xFFEF;
gSaveContext.cutsceneTrigger = 0;
gSaveContext.chamberCutsceneNum = 0;

View file

@ -3390,7 +3390,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
if (pauseCtx->promptChoice == 0) {
Gameplay_TriggerRespawn(globalCtx);
gSaveContext.respawnFlag = -2;
gSaveContext.nextTransition = 2;
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
gSaveContext.health = 0x30;
Audio_QueueSeqCmd(0xF << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0xA);
gSaveContext.healthAccumulator = 0;
@ -3406,7 +3406,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
osSyncPrintf("Z_MAGIC_NOW_NOW=%d\n", gSaveContext.unk_13F6);
osSyncPrintf(VT_RST);
} else {
globalCtx->state.running = 0;
globalCtx->state.running = false;
SET_NEXT_GAMESTATE(&globalCtx->state, Opening_Init, OpeningContext);
}
}