mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 15:04:31 +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:
parent
fed9ac3e20
commit
16790bc253
46 changed files with 2477 additions and 1382 deletions
|
@ -7437,7 +7437,7 @@ Vec3s Camera_Update(Camera* camera) {
|
|||
D_8011D3F0--;
|
||||
sCameraInterfaceFlags = 0x3200;
|
||||
Camera_UpdateInterface(sCameraInterfaceFlags);
|
||||
} else if (camera->globalCtx->transitionMode != 0) {
|
||||
} else if (camera->globalCtx->transitionMode != TRANS_MODE_OFF) {
|
||||
sCameraInterfaceFlags = 0xF200;
|
||||
Camera_UpdateInterface(sCameraInterfaceFlags);
|
||||
} else if (camera->globalCtx->csCtx.state != CS_STATE_IDLE) {
|
||||
|
|
|
@ -18,6 +18,6 @@ void SaveContext_Init(void) {
|
|||
gSaveContext.nextDayTime = 0xFFFF;
|
||||
gSaveContext.skyboxTime = 0;
|
||||
gSaveContext.dogIsLost = true;
|
||||
gSaveContext.nextTransition = 0xFF;
|
||||
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;
|
||||
gSaveContext.unk_13EE = 50;
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ void func_800645A0(GlobalContext* globalCtx, CutsceneContext* csCtx) {
|
|||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
|
||||
if ((gSaveContext.cutsceneTrigger != 0) && (globalCtx->sceneLoadFlag == 0x14)) {
|
||||
if ((gSaveContext.cutsceneTrigger != 0) && (globalCtx->transitionTrigger == TRANS_TRIGGER_START)) {
|
||||
gSaveContext.cutsceneTrigger = 0;
|
||||
}
|
||||
|
||||
|
@ -405,7 +405,7 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
|
|||
break;
|
||||
case 32:
|
||||
if (sp3F != 0) {
|
||||
globalCtx->envCtx.sandstormState = 1;
|
||||
globalCtx->envCtx.sandstormState = SANDSTORM_FILL;
|
||||
}
|
||||
func_800788CC(NA_SE_EV_SAND_STORM - SFX_FLAG);
|
||||
break;
|
||||
|
@ -494,7 +494,7 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
(CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_A) ||
|
||||
CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_B) ||
|
||||
CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_START)) &&
|
||||
(gSaveContext.fileNum != 0xFEDC) && (globalCtx->sceneLoadFlag == 0)) {
|
||||
(gSaveContext.fileNum != 0xFEDC) && (globalCtx->transitionTrigger == TRANS_TRIGGER_OFF)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
temp = 1;
|
||||
|
@ -505,7 +505,7 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
(gSaveContext.fileNum != 0xFEDC))) {
|
||||
csCtx->state = CS_STATE_UNSKIPPABLE_EXEC;
|
||||
Audio_SetCutsceneFlag(0);
|
||||
gSaveContext.unk_1410 = 1;
|
||||
gSaveContext.cutsceneTransitionControl = 1;
|
||||
|
||||
osSyncPrintf("\n分岐先指定!!=[%d]番", cmd->base); // "Future fork designation=No. [%d]"
|
||||
|
||||
|
@ -519,44 +519,44 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
case 1:
|
||||
globalCtx->nextEntranceIndex = 0x00A0;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 2:
|
||||
globalCtx->nextEntranceIndex = 0x00A0;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 10;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FILL_WHITE;
|
||||
break;
|
||||
case 3:
|
||||
globalCtx->nextEntranceIndex = 0x0117;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 10;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FILL_WHITE;
|
||||
break;
|
||||
case 4:
|
||||
globalCtx->nextEntranceIndex = 0x013D;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 10;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FILL_WHITE;
|
||||
break;
|
||||
case 5:
|
||||
globalCtx->nextEntranceIndex = 0x00EE;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 10;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FILL_WHITE;
|
||||
break;
|
||||
case 6:
|
||||
globalCtx->nextEntranceIndex = 0x00A0;
|
||||
gSaveContext.cutsceneIndex = 0xFFF2;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 10;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FILL_WHITE;
|
||||
break;
|
||||
case 7:
|
||||
globalCtx->nextEntranceIndex = 0x00EE;
|
||||
gSaveContext.cutsceneIndex = 0xFFF2;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 11;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_INSTANT;
|
||||
break;
|
||||
case 8:
|
||||
gSaveContext.fw.set = 0;
|
||||
|
@ -564,9 +564,9 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
if (!(gSaveContext.eventChkInf[4] & 0x20)) {
|
||||
gSaveContext.eventChkInf[4] |= 0x20;
|
||||
globalCtx->nextEntranceIndex = 0x00A0;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF3;
|
||||
globalCtx->fadeTransition = 11;
|
||||
globalCtx->transitionType = TRANS_TYPE_INSTANT;
|
||||
} else {
|
||||
if (gSaveContext.sceneSetupIndex < 4) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
|
@ -576,254 +576,254 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
}
|
||||
}
|
||||
globalCtx->nextEntranceIndex = 0x02CA;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
gSaveContext.nextTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
globalCtx->nextEntranceIndex = 0x0117;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 12;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FILL_BROWN;
|
||||
break;
|
||||
case 10:
|
||||
globalCtx->nextEntranceIndex = 0x00BB;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 11:
|
||||
globalCtx->nextEntranceIndex = 0x00EE;
|
||||
gSaveContext.cutsceneIndex = 0xFFF3;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 12:
|
||||
globalCtx->nextEntranceIndex = 0x047A;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 13:
|
||||
globalCtx->nextEntranceIndex = 0x010E;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
gSaveContext.nextTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 14:
|
||||
globalCtx->nextEntranceIndex = 0x0457;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 15:
|
||||
globalCtx->nextEntranceIndex = 0x0053;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF4;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 16:
|
||||
globalCtx->nextEntranceIndex = 0x0053;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF5;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 17:
|
||||
globalCtx->nextEntranceIndex = 0x0053;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF6;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 18:
|
||||
gSaveContext.eventChkInf[4] |= 0x8000;
|
||||
globalCtx->nextEntranceIndex = 0x0324;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
gSaveContext.nextTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 19:
|
||||
globalCtx->nextEntranceIndex = 0x013D;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 4;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
gSaveContext.cutsceneIndex = 0x8000;
|
||||
break;
|
||||
case 21:
|
||||
globalCtx->nextEntranceIndex = 0x0102;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 22:
|
||||
Item_Give(globalCtx, ITEM_SONG_REQUIEM);
|
||||
globalCtx->nextEntranceIndex = 0x0123;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 23:
|
||||
globalCtx->nextEntranceIndex = 0x00A0;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF8;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 24:
|
||||
globalCtx->nextEntranceIndex = 0x0028;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 25:
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_ADULT;
|
||||
globalCtx->nextEntranceIndex = 0x006B;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 26:
|
||||
globalCtx->nextEntranceIndex = 0x0053;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF4;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 27:
|
||||
globalCtx->nextEntranceIndex = 0x0053;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF5;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 28:
|
||||
globalCtx->nextEntranceIndex = 0x0053;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF6;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 29:
|
||||
globalCtx->nextEntranceIndex = 0x006B;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.chamberCutsceneNum = 0;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 30:
|
||||
globalCtx->nextEntranceIndex = 0x006B;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
Item_Give(globalCtx, ITEM_MEDALLION_FIRE);
|
||||
gSaveContext.chamberCutsceneNum = 1;
|
||||
break;
|
||||
case 31:
|
||||
globalCtx->nextEntranceIndex = 0x006B;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
gSaveContext.chamberCutsceneNum = 2;
|
||||
break;
|
||||
case 32:
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
globalCtx->nextEntranceIndex = 0x00CD;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF2;
|
||||
globalCtx->fadeTransition = 11;
|
||||
globalCtx->transitionType = TRANS_TYPE_INSTANT;
|
||||
break;
|
||||
case 33:
|
||||
globalCtx->nextEntranceIndex = 0x00CD;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 34:
|
||||
globalCtx->nextEntranceIndex = 0x00A0;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF3;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 35:
|
||||
globalCtx->nextEntranceIndex = 0x00CD;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
globalCtx->fadeTransition = 4;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
break;
|
||||
case 38:
|
||||
globalCtx->nextEntranceIndex = 0x00A0;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF4;
|
||||
globalCtx->fadeTransition = 4;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
break;
|
||||
case 39:
|
||||
globalCtx->nextEntranceIndex = 0x0053;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF9;
|
||||
globalCtx->fadeTransition = 4;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
break;
|
||||
case 40:
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_ADULT;
|
||||
globalCtx->nextEntranceIndex = 0x0053;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFFA;
|
||||
globalCtx->fadeTransition = 4;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
break;
|
||||
case 41:
|
||||
globalCtx->nextEntranceIndex = 0x04E6;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 42:
|
||||
globalCtx->nextEntranceIndex = 0x00DB;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF2;
|
||||
globalCtx->fadeTransition = 4;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
break;
|
||||
case 43:
|
||||
globalCtx->nextEntranceIndex = 0x0503;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 4;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
break;
|
||||
case 44:
|
||||
globalCtx->nextEntranceIndex = 0x0320;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 17;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE_INSTANT;
|
||||
break;
|
||||
case 46:
|
||||
gSaveContext.eventChkInf[4] |= 0x8000;
|
||||
globalCtx->nextEntranceIndex = 0x0324;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 4;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
break;
|
||||
case 47:
|
||||
Item_Give(globalCtx, ITEM_SONG_NOCTURNE);
|
||||
gSaveContext.eventChkInf[5] |= 0x10;
|
||||
globalCtx->nextEntranceIndex = 0x00DB;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
globalCtx->fadeTransition = 4;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
break;
|
||||
case 48:
|
||||
globalCtx->nextEntranceIndex = 0x01ED;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 15;
|
||||
gSaveContext.nextTransition = 15;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_SANDSTORM_END;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_SANDSTORM_END;
|
||||
break;
|
||||
case 49:
|
||||
globalCtx->nextEntranceIndex = 0x058C;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 4;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
break;
|
||||
case 50:
|
||||
globalCtx->nextEntranceIndex = 0x0513;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 17;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE_INSTANT;
|
||||
break;
|
||||
case 51:
|
||||
globalCtx->nextEntranceIndex = 0x00CD;
|
||||
gSaveContext.cutsceneIndex = 0xFFF8;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 41;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_WHITE, TCS_SLOW);
|
||||
break;
|
||||
case 52:
|
||||
globalCtx->nextEntranceIndex = 0x0053;
|
||||
gSaveContext.cutsceneIndex = 0xFFF7;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 11;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_INSTANT;
|
||||
break;
|
||||
case 53:
|
||||
globalCtx->nextEntranceIndex = 0x050F;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 54:
|
||||
gSaveContext.gameMode = 3;
|
||||
|
@ -831,104 +831,104 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
globalCtx->nextEntranceIndex = 0x0117;
|
||||
gSaveContext.cutsceneIndex = 0xFFF2;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 55:
|
||||
globalCtx->nextEntranceIndex = 0x0129;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 56:
|
||||
globalCtx->nextEntranceIndex = 0x00DB;
|
||||
gSaveContext.cutsceneIndex = 0xFFF4;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 57:
|
||||
globalCtx->nextEntranceIndex = 0x013D;
|
||||
gSaveContext.cutsceneIndex = 0xFFF3;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 58:
|
||||
globalCtx->nextEntranceIndex = 0x014D;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 59:
|
||||
globalCtx->nextEntranceIndex = 0x0102;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 60:
|
||||
globalCtx->nextEntranceIndex = 0x010E;
|
||||
gSaveContext.cutsceneIndex = 0xFFF2;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 61:
|
||||
globalCtx->nextEntranceIndex = 0x0108;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 62:
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_ADULT;
|
||||
globalCtx->nextEntranceIndex = 0x00EE;
|
||||
gSaveContext.cutsceneIndex = 0xFFF6;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 63:
|
||||
globalCtx->nextEntranceIndex = 0x00EE;
|
||||
gSaveContext.cutsceneIndex = 0xFFF7;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 64:
|
||||
globalCtx->nextEntranceIndex = 0x00CD;
|
||||
gSaveContext.cutsceneIndex = 0xFFF5;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 65:
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
globalCtx->nextEntranceIndex = 0x0157;
|
||||
gSaveContext.cutsceneIndex = 0xFFF2;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 66:
|
||||
globalCtx->nextEntranceIndex = 0x0554;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 67:
|
||||
globalCtx->nextEntranceIndex = 0x027E;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 68:
|
||||
globalCtx->nextEntranceIndex = 0x00A0;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF5;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 69:
|
||||
globalCtx->nextEntranceIndex = 0x05E8;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 70:
|
||||
globalCtx->nextEntranceIndex = 0x013D;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF4;
|
||||
globalCtx->fadeTransition = 2;
|
||||
gSaveContext.nextTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 71:
|
||||
gSaveContext.equips.equipment |= 0x0100;
|
||||
|
@ -937,57 +937,57 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
Player_SetEquipmentData(globalCtx, player);
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
globalCtx->nextEntranceIndex = 0x0053;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 72:
|
||||
globalCtx->nextEntranceIndex = 0x0400;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
globalCtx->fadeTransition = 2;
|
||||
gSaveContext.nextTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 73:
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
globalCtx->nextEntranceIndex = 0x0157;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF2;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 74:
|
||||
globalCtx->nextEntranceIndex = 0x0157;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF3;
|
||||
globalCtx->fadeTransition = 3;
|
||||
gSaveContext.nextTransition = 3;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 75:
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
globalCtx->nextEntranceIndex = 0x0157;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF4;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 76:
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_ADULT;
|
||||
globalCtx->nextEntranceIndex = 0x0157;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF5;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 77:
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
globalCtx->nextEntranceIndex = 0x0157;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF6;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 78:
|
||||
globalCtx->nextEntranceIndex = 0x0157;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF7;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 79:
|
||||
case 80:
|
||||
|
@ -1005,38 +1005,38 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
case 92:
|
||||
case 93:
|
||||
globalCtx->nextEntranceIndex = 0x0157;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 94:
|
||||
globalCtx->nextEntranceIndex = 0x02AE;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 95:
|
||||
if ((gSaveContext.eventChkInf[4] & 0x100) && (gSaveContext.eventChkInf[4] & 0x200) &&
|
||||
(gSaveContext.eventChkInf[4] & 0x400)) {
|
||||
globalCtx->nextEntranceIndex = 0x0053;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF3;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
} else {
|
||||
switch (gSaveContext.sceneSetupIndex) {
|
||||
case 8:
|
||||
globalCtx->nextEntranceIndex = 0x00FC;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 9:
|
||||
globalCtx->nextEntranceIndex = 0x0147;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 10:
|
||||
globalCtx->nextEntranceIndex = 0x0102;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1044,130 +1044,130 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
case 96:
|
||||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW)) {
|
||||
globalCtx->nextEntranceIndex = 0x006B;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
globalCtx->fadeTransition = 5;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE_FAST;
|
||||
} else {
|
||||
gSaveContext.eventChkInf[12] |= 0x100;
|
||||
globalCtx->nextEntranceIndex = 0x0610;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
gSaveContext.nextTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
|
||||
}
|
||||
break;
|
||||
case 97:
|
||||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) {
|
||||
globalCtx->nextEntranceIndex = 0x006B;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
globalCtx->fadeTransition = 5;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE_FAST;
|
||||
} else {
|
||||
globalCtx->nextEntranceIndex = 0x0580;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
gSaveContext.nextTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
|
||||
}
|
||||
break;
|
||||
case 98:
|
||||
globalCtx->nextEntranceIndex = 0x0564;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
gSaveContext.nextTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 99:
|
||||
globalCtx->nextEntranceIndex = 0x0608;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
gSaveContext.nextTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 100:
|
||||
globalCtx->nextEntranceIndex = 0x00EE;
|
||||
gSaveContext.cutsceneIndex = 0xFFF8;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
gSaveContext.nextTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 101:
|
||||
globalCtx->nextEntranceIndex = 0x01F5;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 15;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_SANDSTORM_END;
|
||||
break;
|
||||
case 102:
|
||||
globalCtx->nextEntranceIndex = 0x0590;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 103:
|
||||
globalCtx->nextEntranceIndex = 0x00CD;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF3;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 104:
|
||||
switch (sTitleCsState) {
|
||||
case 0:
|
||||
globalCtx->nextEntranceIndex = 0x008D;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF2;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
sTitleCsState++;
|
||||
break;
|
||||
case 1:
|
||||
globalCtx->nextEntranceIndex = 0x0147;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
sTitleCsState++;
|
||||
break;
|
||||
case 2:
|
||||
globalCtx->nextEntranceIndex = 0x00A0;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF6;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
sTitleCsState = 0;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 105:
|
||||
globalCtx->nextEntranceIndex = 0x00E4;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 106:
|
||||
globalCtx->nextEntranceIndex = 0x0574;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 107:
|
||||
globalCtx->nextEntranceIndex = 0x0538;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 108:
|
||||
globalCtx->nextEntranceIndex = 0x053C;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 109:
|
||||
globalCtx->nextEntranceIndex = 0x0540;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 110:
|
||||
globalCtx->nextEntranceIndex = 0x0544;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 111:
|
||||
globalCtx->nextEntranceIndex = 0x0548;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 112:
|
||||
globalCtx->nextEntranceIndex = 0x054C;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 113:
|
||||
if (Flags_GetEventChkInf(0xBB) && Flags_GetEventChkInf(0xBC) && Flags_GetEventChkInf(0xBD) &&
|
||||
|
@ -1184,26 +1184,26 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
break;
|
||||
case 114:
|
||||
globalCtx->nextEntranceIndex = 0x0185;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 115:
|
||||
globalCtx->nextEntranceIndex = 0x0594;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 2;
|
||||
gSaveContext.nextTransition = 2;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 116:
|
||||
if (gSaveContext.eventChkInf[12] & 0x100) {
|
||||
globalCtx->nextEntranceIndex = 0x0580;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
} else {
|
||||
globalCtx->nextEntranceIndex = 0x0610;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
}
|
||||
gSaveContext.nextTransition = 3;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 117:
|
||||
gSaveContext.gameMode = 3;
|
||||
|
@ -1211,21 +1211,21 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
globalCtx->linkAgeOnLoad = LINK_AGE_ADULT;
|
||||
globalCtx->nextEntranceIndex = 0x00CD;
|
||||
gSaveContext.cutsceneIndex = 0xFFF7;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
case 118:
|
||||
gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex = 0x0517;
|
||||
Gameplay_TriggerVoidOut(globalCtx);
|
||||
gSaveContext.respawnFlag = -2;
|
||||
gSaveContext.nextTransition = 2;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 119:
|
||||
gSaveContext.dayTime = 0x8000;
|
||||
gSaveContext.skyboxTime = 0x8000;
|
||||
globalCtx->nextEntranceIndex = 0x05F0;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1262,6 +1262,7 @@ void Cutscene_Command_TransitionFX(GlobalContext* globalCtx, CutsceneContext* cs
|
|||
globalCtx->envCtx.screenFillColor[3] = (1.0f - temp) * 255.0f;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 6:
|
||||
globalCtx->envCtx.screenFillColor[0] = 0;
|
||||
|
@ -1273,6 +1274,7 @@ void Cutscene_Command_TransitionFX(GlobalContext* globalCtx, CutsceneContext* cs
|
|||
globalCtx->envCtx.screenFillColor[3] = (1.0f - temp) * 255.0f;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case 7:
|
||||
globalCtx->envCtx.screenFillColor[0] = 255;
|
||||
|
@ -1284,6 +1286,7 @@ void Cutscene_Command_TransitionFX(GlobalContext* globalCtx, CutsceneContext* cs
|
|||
globalCtx->envCtx.screenFillColor[3] = 255.0f * temp;
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
case 8:
|
||||
globalCtx->envCtx.screenFillColor[0] = 0;
|
||||
|
@ -1295,9 +1298,11 @@ void Cutscene_Command_TransitionFX(GlobalContext* globalCtx, CutsceneContext* cs
|
|||
globalCtx->envCtx.screenFillColor[3] = 255.0f * temp;
|
||||
}
|
||||
break;
|
||||
|
||||
case 9:
|
||||
gSaveContext.unk_1410 = 1;
|
||||
gSaveContext.cutsceneTransitionControl = 1;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
case 11:
|
||||
globalCtx->envCtx.screenFillColor[0] = 0;
|
||||
|
@ -1309,9 +1314,11 @@ void Cutscene_Command_TransitionFX(GlobalContext* globalCtx, CutsceneContext* cs
|
|||
globalCtx->envCtx.screenFillColor[3] = 255.0f * temp;
|
||||
}
|
||||
break;
|
||||
|
||||
case 12:
|
||||
gSaveContext.unk_1410 = 255.0f - (155.0f * temp);
|
||||
gSaveContext.cutsceneTransitionControl = 255.0f - (155.0f * temp);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
globalCtx->envCtx.screenFillColor[0] = 0;
|
||||
globalCtx->envCtx.screenFillColor[1] = 0;
|
||||
|
|
|
@ -37,51 +37,50 @@ Gfx sCircleDList[] = {
|
|||
void TransitionCircle_Start(void* thisx) {
|
||||
TransitionCircle* this = (TransitionCircle*)thisx;
|
||||
|
||||
this->isDone = 0;
|
||||
this->isDone = false;
|
||||
|
||||
switch (this->effect) {
|
||||
case 1:
|
||||
this->texture = sCircleWipeWaveTex;
|
||||
switch (this->appearanceType) {
|
||||
case TCA_WAVE:
|
||||
this->texture = sTransCircleWaveTex;
|
||||
break;
|
||||
case 2:
|
||||
this->texture = sCircleWipeRippleTex;
|
||||
case TCA_RIPPLE:
|
||||
this->texture = sTransCircleRippleTex;
|
||||
break;
|
||||
case 3:
|
||||
this->texture = sCircleWipeStarburstTex;
|
||||
case TCA_STARBURST:
|
||||
this->texture = sTransCircleStarburstTex;
|
||||
break;
|
||||
default:
|
||||
this->texture = sCircleWipeDefaultTex;
|
||||
this->texture = sTransCircleNormalTex;
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->speed == 0) {
|
||||
this->step = 0x14;
|
||||
if (this->speedType == TCS_FAST) {
|
||||
this->speed = 20;
|
||||
} else {
|
||||
this->step = 0xA;
|
||||
this->speed = 10;
|
||||
}
|
||||
|
||||
if (this->typeColor == 0) {
|
||||
if (this->colorType == TCC_BLACK) {
|
||||
this->color.rgba = RGBA8(0, 0, 0, 255);
|
||||
} else if (this->typeColor == 1) {
|
||||
} else if (this->colorType == TCC_WHITE) {
|
||||
this->color.rgba = RGBA8(160, 160, 160, 255);
|
||||
} else if (this->typeColor == 2) {
|
||||
// yes, really.
|
||||
} else if (this->colorType == TCC_GRAY) {
|
||||
this->color.r = 100;
|
||||
this->color.g = 100;
|
||||
this->color.b = 100;
|
||||
this->color.a = 255;
|
||||
} else {
|
||||
this->step = 0x28;
|
||||
this->color.rgba = this->effect == 1 ? RGBA8(0, 0, 0, 255) : RGBA8(160, 160, 160, 255);
|
||||
this->speed = 40;
|
||||
this->color.rgba = this->appearanceType == TCA_WAVE ? RGBA8(0, 0, 0, 255) : RGBA8(160, 160, 160, 255);
|
||||
}
|
||||
if (this->unk_14 != 0) {
|
||||
if (this->direction != 0) {
|
||||
this->texY = 0;
|
||||
if (this->typeColor == 3) {
|
||||
if (this->colorType == TCC_SPECIAL) {
|
||||
this->texY = 0xFA;
|
||||
}
|
||||
} else {
|
||||
this->texY = 0x1F4;
|
||||
if (this->effect == 2) {
|
||||
if (this->appearanceType == TCA_RIPPLE) {
|
||||
Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
@ -105,29 +104,29 @@ void TransitionCircle_Update(void* thisx, s32 updateRate) {
|
|||
s32 temp_t2;
|
||||
s32 temp_t3;
|
||||
|
||||
if (this->unk_14 != 0) {
|
||||
if (this->direction != 0) {
|
||||
if (this->texY == 0) {
|
||||
if (this->effect == 2) {
|
||||
if (this->appearanceType == TCA_RIPPLE) {
|
||||
Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_IN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
this->texY += this->step * 3 / updateRate;
|
||||
this->texY += this->speed * 3 / updateRate;
|
||||
if (this->texY >= 0x1F4) {
|
||||
this->texY = 0x1F4;
|
||||
this->isDone = 1;
|
||||
this->isDone = true;
|
||||
}
|
||||
} else {
|
||||
this->texY -= this->step * 3 / updateRate;
|
||||
if (this->typeColor != 3) {
|
||||
this->texY -= this->speed * 3 / updateRate;
|
||||
if (this->colorType != TCC_SPECIAL) {
|
||||
if (this->texY <= 0) {
|
||||
this->texY = 0;
|
||||
this->isDone = 1;
|
||||
this->isDone = true;
|
||||
}
|
||||
} else {
|
||||
if (this->texY < 0xFB) {
|
||||
this->texY = 0xFA;
|
||||
this->isDone = 1;
|
||||
this->isDone = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -184,15 +183,18 @@ s32 TransitionCircle_IsDone(void* thisx) {
|
|||
void TransitionCircle_SetType(void* thisx, s32 type) {
|
||||
TransitionCircle* this = (TransitionCircle*)thisx;
|
||||
|
||||
if (type & 0x80) {
|
||||
this->unk_14 = (type >> 5) & 0x1;
|
||||
this->typeColor = (type >> 3) & 0x3;
|
||||
this->speed = type & 0x1;
|
||||
this->effect = (type >> 1) & 0x3;
|
||||
if (type & TC_SET_PARAMS) {
|
||||
// SetType is called twice for circles, the actual direction value will be set on the second call.
|
||||
// The direction set here will be overwritten on that second call.
|
||||
this->direction = (type >> 5) & 0x1;
|
||||
|
||||
this->colorType = (type >> 3) & 0x3;
|
||||
this->speedType = type & 0x1;
|
||||
this->appearanceType = (type >> 1) & 0x3;
|
||||
} else if (type == 1) {
|
||||
this->unk_14 = 1;
|
||||
this->direction = 1;
|
||||
} else {
|
||||
this->unk_14 = 0;
|
||||
this->direction = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,16 +49,16 @@ void TransitionFade_Update(void* thisx, s32 updateRate) {
|
|||
break;
|
||||
case 1:
|
||||
this->fadeTimer += updateRate;
|
||||
if (this->fadeTimer >= gSaveContext.fadeDuration) {
|
||||
this->fadeTimer = gSaveContext.fadeDuration;
|
||||
if (this->fadeTimer >= gSaveContext.transFadeDuration) {
|
||||
this->fadeTimer = gSaveContext.transFadeDuration;
|
||||
this->isDone = 1;
|
||||
}
|
||||
if (!gSaveContext.fadeDuration) {
|
||||
if (!gSaveContext.transFadeDuration) {
|
||||
// "Divide by 0! Zero is included in ZCommonGet fade_speed"
|
||||
osSyncPrintf(VT_COL(RED, WHITE) "0除算! ZCommonGet fade_speed に0がはいってる" VT_RST);
|
||||
}
|
||||
|
||||
alpha = (255.0f * this->fadeTimer) / ((void)0, gSaveContext.fadeDuration);
|
||||
alpha = (255.0f * this->fadeTimer) / ((void)0, gSaveContext.transFadeDuration);
|
||||
this->fadeColor.a = (this->fadeDirection != 0) ? 255 - alpha : alpha;
|
||||
break;
|
||||
case 2:
|
||||
|
|
|
@ -63,18 +63,18 @@ void TransitionWipe_Destroy(void* thisx) {
|
|||
|
||||
void TransitionWipe_Update(void* thisx, s32 updateRate) {
|
||||
TransitionWipe* this = (TransitionWipe*)thisx;
|
||||
u8 unk1419;
|
||||
u8 speed;
|
||||
|
||||
if (this->direction != 0) {
|
||||
unk1419 = gSaveContext.unk_1419;
|
||||
this->texY += (unk1419 * 3) / updateRate;
|
||||
speed = gSaveContext.transWipeSpeed;
|
||||
this->texY += (speed * 3) / updateRate;
|
||||
if (this->texY >= 0x264) {
|
||||
this->texY = 0x264;
|
||||
this->isDone = 1;
|
||||
}
|
||||
} else {
|
||||
unk1419 = gSaveContext.unk_1419;
|
||||
this->texY -= (unk1419 * 3) / updateRate;
|
||||
speed = gSaveContext.transWipeSpeed;
|
||||
this->texY -= (speed * 3) / updateRate;
|
||||
if (this->texY < 0x14E) {
|
||||
this->texY = 0x14D;
|
||||
this->isDone = 1;
|
||||
|
|
|
@ -13,10 +13,10 @@ void KaleidoSetup_Update(GlobalContext* globalCtx) {
|
|||
Input* input = &globalCtx->state.input[0];
|
||||
|
||||
if (pauseCtx->state == 0 && pauseCtx->debugState == 0 && globalCtx->gameOverCtx.state == GAMEOVER_INACTIVE &&
|
||||
globalCtx->sceneLoadFlag == 0 && globalCtx->transitionMode == 0 && gSaveContext.cutsceneIndex < 0xFFF0 &&
|
||||
gSaveContext.nextCutsceneIndex < 0xFFF0 && !Gameplay_InCsMode(globalCtx) &&
|
||||
globalCtx->shootingGalleryStatus <= 1 && gSaveContext.unk_13F0 != 8 && gSaveContext.unk_13F0 != 9 &&
|
||||
(globalCtx->sceneNum != SCENE_BOWLING || !Flags_GetSwitch(globalCtx, 0x38))) {
|
||||
globalCtx->transitionTrigger == TRANS_TRIGGER_OFF && globalCtx->transitionMode == TRANS_MODE_OFF &&
|
||||
gSaveContext.cutsceneIndex < 0xFFF0 && gSaveContext.nextCutsceneIndex < 0xFFF0 &&
|
||||
!Gameplay_InCsMode(globalCtx) && globalCtx->shootingGalleryStatus <= 1 && gSaveContext.unk_13F0 != 8 &&
|
||||
gSaveContext.unk_13F0 != 9 && (globalCtx->sceneNum != SCENE_BOWLING || !Flags_GetSwitch(globalCtx, 0x38))) {
|
||||
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_L) && CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
|
||||
if (BREG(0)) {
|
||||
|
|
|
@ -281,7 +281,7 @@ void Environment_Init(GlobalContext* globalCtx2, EnvironmentContext* envCtx, s32
|
|||
envCtx->skyboxFilterColor[1] = 0;
|
||||
envCtx->skyboxFilterColor[2] = 0;
|
||||
envCtx->skyboxFilterColor[3] = 0;
|
||||
envCtx->sandstormState = 0;
|
||||
envCtx->sandstormState = SANDSTORM_OFF;
|
||||
envCtx->sandstormPrimA = 0;
|
||||
envCtx->sandstormEnvA = 0;
|
||||
|
||||
|
@ -292,7 +292,7 @@ void Environment_Init(GlobalContext* globalCtx2, EnvironmentContext* envCtx, s32
|
|||
|
||||
sLightningFlashAlpha = 0;
|
||||
|
||||
gSaveContext.unk_1410 = 0;
|
||||
gSaveContext.cutsceneTransitionControl = 0;
|
||||
|
||||
envCtx->adjAmbientColor[0] = envCtx->adjAmbientColor[1] = envCtx->adjAmbientColor[2] = envCtx->adjLight1Color[0] =
|
||||
envCtx->adjLight1Color[1] = envCtx->adjLight1Color[2] = envCtx->adjFogColor[0] = envCtx->adjFogColor[1] =
|
||||
|
@ -879,7 +879,7 @@ void Environment_Update(GlobalContext* globalCtx, EnvironmentContext* envCtx, Li
|
|||
if ((pauseCtx->state == 0) && (gameOverCtx->state == GAMEOVER_INACTIVE)) {
|
||||
if (((msgCtx->msgLength == 0) && (msgCtx->msgMode == 0)) || (((void)0, gSaveContext.gameMode) == 3)) {
|
||||
if ((envCtx->unk_1A == 0) && !FrameAdvance_IsEnabled(globalCtx) &&
|
||||
(globalCtx->transitionMode == 0 || ((void)0, gSaveContext.gameMode) != 0)) {
|
||||
(globalCtx->transitionMode == TRANS_MODE_OFF || ((void)0, gSaveContext.gameMode) != 0)) {
|
||||
|
||||
if (IS_DAY || gTimeIncrement >= 0x190) {
|
||||
gSaveContext.dayTime += gTimeIncrement;
|
||||
|
@ -2229,7 +2229,7 @@ void Environment_DrawSandstorm(GlobalContext* globalCtx, u8 sandstormState) {
|
|||
u16 sp92;
|
||||
|
||||
switch (sandstormState) {
|
||||
case 3:
|
||||
case SANDSTORM_ACTIVE:
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT13) && (globalCtx->roomCtx.curRoom.num == 0)) {
|
||||
envA1 = 0;
|
||||
primA1 = (globalCtx->envCtx.sandstormEnvA > 128) ? 255 : globalCtx->envCtx.sandstormEnvA >> 1;
|
||||
|
@ -2242,11 +2242,13 @@ void Environment_DrawSandstorm(GlobalContext* globalCtx, u8 sandstormState) {
|
|||
envA1 = 128;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
|
||||
case SANDSTORM_FILL:
|
||||
primA1 = 255;
|
||||
envA1 = (globalCtx->envCtx.sandstormPrimA >= 255) ? 255 : 128;
|
||||
break;
|
||||
case 2:
|
||||
|
||||
case SANDSTORM_UNFILL:
|
||||
envA1 = 128;
|
||||
if (globalCtx->envCtx.sandstormEnvA > 128) {
|
||||
primA1 = 0xFF;
|
||||
|
@ -2258,15 +2260,16 @@ void Environment_DrawSandstorm(GlobalContext* globalCtx, u8 sandstormState) {
|
|||
primA1 += 73;
|
||||
}
|
||||
if ((primA1 >= primA) && (primA1 != 255)) {
|
||||
globalCtx->envCtx.sandstormState = 3;
|
||||
globalCtx->envCtx.sandstormState = SANDSTORM_ACTIVE;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
|
||||
case SANDSTORM_DISSIPATE:
|
||||
envA1 = 0;
|
||||
primA1 = (globalCtx->envCtx.sandstormEnvA > 128) ? 255 : globalCtx->envCtx.sandstormEnvA >> 1;
|
||||
|
||||
if (primA == 0) {
|
||||
globalCtx->envCtx.sandstormState = 0;
|
||||
globalCtx->envCtx.sandstormState = SANDSTORM_OFF;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -2434,9 +2437,9 @@ void Environment_WarpSongLeave(GlobalContext* globalCtx) {
|
|||
gSaveContext.cutsceneIndex = 0;
|
||||
gSaveContext.respawnFlag = -3;
|
||||
globalCtx->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_RETURN].entranceIndex;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
gSaveContext.nextTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
|
||||
|
||||
switch (globalCtx->nextEntranceIndex) {
|
||||
case 0x147:
|
||||
|
|
|
@ -669,7 +669,7 @@ void func_80083108(GlobalContext* globalCtx) {
|
|||
Interface_ChangeAlpha(6);
|
||||
}
|
||||
|
||||
if (globalCtx->transitionMode != 0) {
|
||||
if (globalCtx->transitionMode != TRANS_MODE_OFF) {
|
||||
Interface_ChangeAlpha(1);
|
||||
} else if (gSaveContext.minigameState == 1) {
|
||||
Interface_ChangeAlpha(8);
|
||||
|
@ -1062,7 +1062,7 @@ void func_80083108(GlobalContext* globalCtx) {
|
|||
|
||||
if (sp28) {
|
||||
gSaveContext.unk_13EA = 0;
|
||||
if ((globalCtx->sceneLoadFlag == 0) && (globalCtx->transitionMode == 0)) {
|
||||
if ((globalCtx->transitionTrigger == TRANS_TRIGGER_OFF) && (globalCtx->transitionMode == TRANS_MODE_OFF)) {
|
||||
Interface_ChangeAlpha(50);
|
||||
osSyncPrintf("???????? alpha_change( 50 ); ?????\n");
|
||||
} else {
|
||||
|
@ -2475,7 +2475,8 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) {
|
|||
case 7:
|
||||
if ((globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.debugState == 0) &&
|
||||
(msgCtx->msgMode == MSGMODE_NONE) && (globalCtx->gameOverCtx.state == GAMEOVER_INACTIVE) &&
|
||||
(globalCtx->sceneLoadFlag == 0) && (globalCtx->transitionMode == 0) && !Gameplay_InCsMode(globalCtx)) {
|
||||
(globalCtx->transitionTrigger == TRANS_TRIGGER_OFF) && (globalCtx->transitionMode == TRANS_MODE_OFF) &&
|
||||
!Gameplay_InCsMode(globalCtx)) {
|
||||
if ((gSaveContext.magic == 0) || ((func_8008F2F8(globalCtx) >= 2) && (func_8008F2F8(globalCtx) < 5)) ||
|
||||
((gSaveContext.equips.buttonItems[1] != ITEM_LENS) &&
|
||||
(gSaveContext.equips.buttonItems[2] != ITEM_LENS) &&
|
||||
|
@ -3389,8 +3390,8 @@ void Interface_Draw(GlobalContext* globalCtx) {
|
|||
// Trade quest timer reached 0
|
||||
D_8015FFE6 = 40;
|
||||
gSaveContext.cutsceneIndex = 0;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
gSaveContext.timer2State = 0;
|
||||
|
||||
if ((gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI) &&
|
||||
|
@ -3424,9 +3425,9 @@ void Interface_Draw(GlobalContext* globalCtx) {
|
|||
|
||||
if ((globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.debugState == 0) &&
|
||||
(globalCtx->gameOverCtx.state == GAMEOVER_INACTIVE) && (msgCtx->msgMode == MSGMODE_NONE) &&
|
||||
!(player->stateFlags2 & PLAYER_STATE2_24) && (globalCtx->sceneLoadFlag == 0) &&
|
||||
(globalCtx->transitionMode == 0) && !Gameplay_InCsMode(globalCtx) && (gSaveContext.minigameState != 1) &&
|
||||
(globalCtx->shootingGalleryStatus <= 1) &&
|
||||
!(player->stateFlags2 & PLAYER_STATE2_24) && (globalCtx->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
(globalCtx->transitionMode == TRANS_MODE_OFF) && !Gameplay_InCsMode(globalCtx) &&
|
||||
(gSaveContext.minigameState != 1) && (globalCtx->shootingGalleryStatus <= 1) &&
|
||||
!((globalCtx->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(globalCtx, 0x38))) {
|
||||
svar6 = 0;
|
||||
switch (gSaveContext.timer1State) {
|
||||
|
@ -3990,7 +3991,8 @@ void Interface_Update(GlobalContext* globalCtx) {
|
|||
|
||||
if ((gSaveContext.timer1State >= 3) && (globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.debugState == 0) &&
|
||||
(msgCtx->msgMode == MSGMODE_NONE) && !(player->stateFlags2 & PLAYER_STATE2_24) &&
|
||||
(globalCtx->sceneLoadFlag == 0) && (globalCtx->transitionMode == 0) && !Gameplay_InCsMode(globalCtx)) {}
|
||||
(globalCtx->transitionTrigger == TRANS_TRIGGER_OFF) && (globalCtx->transitionMode == TRANS_MODE_OFF) &&
|
||||
!Gameplay_InCsMode(globalCtx)) {}
|
||||
|
||||
if (gSaveContext.rupeeAccumulator != 0) {
|
||||
if (gSaveContext.rupeeAccumulator > 0) {
|
||||
|
@ -4073,8 +4075,8 @@ void Interface_Update(GlobalContext* globalCtx) {
|
|||
WREG(7) = interfaceCtx->unk_1F4;
|
||||
|
||||
if ((globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.debugState == 0) &&
|
||||
(msgCtx->msgMode == MSGMODE_NONE) && (globalCtx->sceneLoadFlag == 0) &&
|
||||
(globalCtx->gameOverCtx.state == GAMEOVER_INACTIVE) && (globalCtx->transitionMode == 0) &&
|
||||
(msgCtx->msgMode == MSGMODE_NONE) && (globalCtx->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
(globalCtx->gameOverCtx.state == GAMEOVER_INACTIVE) && (globalCtx->transitionMode == TRANS_MODE_OFF) &&
|
||||
((globalCtx->csCtx.state == CS_STATE_IDLE) || !Player_InCsMode(globalCtx))) {
|
||||
if ((gSaveContext.magicAcquired != 0) && (gSaveContext.magicLevel == 0)) {
|
||||
gSaveContext.magicLevel = gSaveContext.doubleMagic + 1;
|
||||
|
@ -4170,24 +4172,24 @@ void Interface_Update(GlobalContext* globalCtx) {
|
|||
} else if ((globalCtx->roomCtx.curRoom.unk_03 != 1) && (interfaceCtx->restrictions.sunsSong != 3)) {
|
||||
if ((gSaveContext.dayTime >= 0x4555) && (gSaveContext.dayTime < 0xC001)) {
|
||||
gSaveContext.nextDayTime = 0;
|
||||
globalCtx->fadeTransition = 4;
|
||||
gSaveContext.nextTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
||||
globalCtx->unk_11DE9 = true;
|
||||
} else {
|
||||
gSaveContext.nextDayTime = 0x8001;
|
||||
globalCtx->fadeTransition = 5;
|
||||
gSaveContext.nextTransition = 3;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE_FAST;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
|
||||
globalCtx->unk_11DE9 = true;
|
||||
}
|
||||
|
||||
if (globalCtx->sceneNum == SCENE_SPOT13) {
|
||||
globalCtx->fadeTransition = 14;
|
||||
gSaveContext.nextTransition = 14;
|
||||
globalCtx->transitionType = TRANS_TYPE_SANDSTORM_PERSIST;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_SANDSTORM_PERSIST;
|
||||
}
|
||||
|
||||
gSaveContext.respawnFlag = -2;
|
||||
globalCtx->nextEntranceIndex = gSaveContext.entranceIndex;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
|
||||
func_800F6964(30);
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
|
|
|
@ -10,7 +10,7 @@ s32 gTrnsnUnkState;
|
|||
VisMono D_80161498;
|
||||
Color_RGBA8_u32 D_801614B0;
|
||||
FaultClient D_801614B8;
|
||||
s16 D_801614C8;
|
||||
s16 sTransitionFillTimer;
|
||||
u64 D_801614D0[0xA00];
|
||||
|
||||
void func_800BC450(GlobalContext* globalCtx) {
|
||||
|
@ -43,13 +43,14 @@ void func_800BC590(GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_800BC5E0(GlobalContext* globalCtx, s32 transitionType) {
|
||||
void Gameplay_SetupTransition(GlobalContext* globalCtx, s32 transitionType) {
|
||||
TransitionContext* transitionCtx = &globalCtx->transitionCtx;
|
||||
|
||||
bzero(transitionCtx, sizeof(TransitionContext));
|
||||
|
||||
transitionCtx->transitionType = transitionType;
|
||||
|
||||
// circle types
|
||||
if ((transitionCtx->transitionType >> 5) == 1) {
|
||||
transitionCtx->init = TransitionCircle_Init;
|
||||
transitionCtx->destroy = TransitionCircle_Destroy;
|
||||
|
@ -62,7 +63,7 @@ void func_800BC5E0(GlobalContext* globalCtx, s32 transitionType) {
|
|||
transitionCtx->setEnvColor = TransitionCircle_SetEnvColor;
|
||||
} else {
|
||||
switch (transitionCtx->transitionType) {
|
||||
case 1:
|
||||
case TRANS_TYPE_TRIFORCE:
|
||||
transitionCtx->init = TransitionTriforce_Init;
|
||||
transitionCtx->destroy = TransitionTriforce_Destroy;
|
||||
transitionCtx->start = TransitionTriforce_Start;
|
||||
|
@ -73,8 +74,9 @@ void func_800BC5E0(GlobalContext* globalCtx, s32 transitionType) {
|
|||
transitionCtx->setColor = TransitionTriforce_SetColor;
|
||||
transitionCtx->setEnvColor = NULL;
|
||||
break;
|
||||
case 0:
|
||||
case 8:
|
||||
|
||||
case TRANS_TYPE_WIPE:
|
||||
case TRANS_TYPE_WIPE_FAST:
|
||||
transitionCtx->init = TransitionWipe_Init;
|
||||
transitionCtx->destroy = TransitionWipe_Destroy;
|
||||
transitionCtx->start = TransitionWipe_Start;
|
||||
|
@ -85,16 +87,17 @@ void func_800BC5E0(GlobalContext* globalCtx, s32 transitionType) {
|
|||
transitionCtx->setColor = TransitionWipe_SetColor;
|
||||
transitionCtx->setEnvColor = NULL;
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 13:
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
|
||||
case TRANS_TYPE_FADE_BLACK:
|
||||
case TRANS_TYPE_FADE_WHITE:
|
||||
case TRANS_TYPE_FADE_BLACK_FAST:
|
||||
case TRANS_TYPE_FADE_WHITE_FAST:
|
||||
case TRANS_TYPE_FADE_BLACK_SLOW:
|
||||
case TRANS_TYPE_FADE_WHITE_SLOW:
|
||||
case TRANS_TYPE_FADE_WHITE_CS_DELAYED:
|
||||
case TRANS_TYPE_FADE_WHITE_INSTANT:
|
||||
case TRANS_TYPE_FADE_GREEN:
|
||||
case TRANS_TYPE_FADE_BLUE:
|
||||
transitionCtx->init = TransitionFade_Init;
|
||||
transitionCtx->destroy = TransitionFade_Destroy;
|
||||
transitionCtx->start = TransitionFade_Start;
|
||||
|
@ -105,25 +108,32 @@ void func_800BC5E0(GlobalContext* globalCtx, s32 transitionType) {
|
|||
transitionCtx->setColor = TransitionFade_SetColor;
|
||||
transitionCtx->setEnvColor = NULL;
|
||||
break;
|
||||
case 9:
|
||||
case 10:
|
||||
globalCtx->transitionMode = 4;
|
||||
|
||||
case TRANS_TYPE_FILL_WHITE2:
|
||||
case TRANS_TYPE_FILL_WHITE:
|
||||
globalCtx->transitionMode = TRANS_MODE_FILL_WHITE_INIT;
|
||||
break;
|
||||
case 11:
|
||||
globalCtx->transitionMode = 10;
|
||||
|
||||
case TRANS_TYPE_INSTANT:
|
||||
globalCtx->transitionMode = TRANS_MODE_INSTANT;
|
||||
break;
|
||||
case 12:
|
||||
globalCtx->transitionMode = 7;
|
||||
|
||||
case TRANS_TYPE_FILL_BROWN:
|
||||
globalCtx->transitionMode = TRANS_MODE_FILL_BROWN_INIT;
|
||||
break;
|
||||
case 14:
|
||||
globalCtx->transitionMode = 12;
|
||||
|
||||
case TRANS_TYPE_SANDSTORM_PERSIST:
|
||||
globalCtx->transitionMode = TRANS_MODE_SANDSTORM_INIT;
|
||||
break;
|
||||
case 15:
|
||||
globalCtx->transitionMode = 14;
|
||||
|
||||
case TRANS_TYPE_SANDSTORM_END:
|
||||
globalCtx->transitionMode = TRANS_MODE_SANDSTORM_END_INIT;
|
||||
break;
|
||||
case 16:
|
||||
globalCtx->transitionMode = 16;
|
||||
|
||||
case TRANS_TYPE_CS_BLACK_FILL:
|
||||
globalCtx->transitionMode = TRANS_MODE_CS_BLACK_FILL_INIT;
|
||||
break;
|
||||
|
||||
default:
|
||||
Fault_AddHungupAndCrash("../z_play.c", 2290);
|
||||
break;
|
||||
|
@ -159,10 +169,10 @@ void Gameplay_Destroy(GameState* thisx) {
|
|||
gTrnsnUnkState = 0;
|
||||
}
|
||||
|
||||
if (globalCtx->transitionMode == 3) {
|
||||
if (globalCtx->transitionMode == TRANS_MODE_INSTANCE_RUNNING) {
|
||||
globalCtx->transitionCtx.destroy(&globalCtx->transitionCtx.data);
|
||||
func_800BC88C(globalCtx);
|
||||
globalCtx->transitionMode = 0;
|
||||
globalCtx->transitionMode = TRANS_MODE_OFF;
|
||||
}
|
||||
|
||||
ShrinkWindow_Destroy();
|
||||
|
@ -325,27 +335,28 @@ void Gameplay_Init(GameState* thisx) {
|
|||
PreRender_SetValuesSave(&globalCtx->pauseBgPreRender, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 0);
|
||||
PreRender_SetValues(&globalCtx->pauseBgPreRender, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
gTrnsnUnkState = 0;
|
||||
globalCtx->transitionMode = 0;
|
||||
globalCtx->transitionMode = TRANS_MODE_OFF;
|
||||
FrameAdvance_Init(&globalCtx->frameAdvCtx);
|
||||
Rand_Seed((u32)osGetTime());
|
||||
Matrix_Init(&globalCtx->state);
|
||||
globalCtx->state.main = Gameplay_Main;
|
||||
globalCtx->state.destroy = Gameplay_Destroy;
|
||||
globalCtx->sceneLoadFlag = -0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_END;
|
||||
globalCtx->unk_11E16 = 0xFF;
|
||||
globalCtx->unk_11E18 = 0;
|
||||
globalCtx->unk_11DE9 = false;
|
||||
|
||||
if (gSaveContext.gameMode != 1) {
|
||||
if (gSaveContext.nextTransition == 0xFF) {
|
||||
globalCtx->fadeTransition =
|
||||
(gEntranceTable[((void)0, gSaveContext.entranceIndex) + tempSetupIndex].field >> 7) & 0x7F; // Fade In
|
||||
if (gSaveContext.nextTransitionType == TRANS_NEXT_TYPE_DEFAULT) {
|
||||
// fade in
|
||||
globalCtx->transitionType =
|
||||
(gEntranceTable[((void)0, gSaveContext.entranceIndex) + tempSetupIndex].field >> 7) & 0x7F;
|
||||
} else {
|
||||
globalCtx->fadeTransition = gSaveContext.nextTransition;
|
||||
gSaveContext.nextTransition = 0xFF;
|
||||
globalCtx->transitionType = gSaveContext.nextTransitionType;
|
||||
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;
|
||||
}
|
||||
} else {
|
||||
globalCtx->fadeTransition = 6;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_SLOW;
|
||||
}
|
||||
|
||||
ShrinkWindow_Init();
|
||||
|
@ -443,8 +454,8 @@ void Gameplay_Update(GlobalContext* globalCtx) {
|
|||
gSegments[2] = VIRTUAL_TO_PHYSICAL(globalCtx->sceneSegment);
|
||||
|
||||
if (FrameAdvance_Update(&globalCtx->frameAdvCtx, &input[1])) {
|
||||
if ((globalCtx->transitionMode == 0) && (globalCtx->sceneLoadFlag != 0)) {
|
||||
globalCtx->transitionMode = 1;
|
||||
if ((globalCtx->transitionMode == TRANS_MODE_OFF) && (globalCtx->transitionTrigger != TRANS_TRIGGER_OFF)) {
|
||||
globalCtx->transitionMode = TRANS_MODE_SETUP;
|
||||
}
|
||||
|
||||
if (gTrnsnUnkState != 0) {
|
||||
|
@ -467,19 +478,22 @@ void Gameplay_Update(GlobalContext* globalCtx) {
|
|||
|
||||
if (globalCtx->transitionMode) {
|
||||
switch (globalCtx->transitionMode) {
|
||||
case 1:
|
||||
if (globalCtx->sceneLoadFlag != -0x14) {
|
||||
s16 sp6E = 0;
|
||||
case TRANS_MODE_SETUP:
|
||||
if (globalCtx->transitionTrigger != TRANS_TRIGGER_END) {
|
||||
s16 sceneSetupIndex = 0;
|
||||
|
||||
Interface_ChangeAlpha(1);
|
||||
|
||||
if (gSaveContext.cutsceneIndex >= 0xFFF0) {
|
||||
sp6E = (gSaveContext.cutsceneIndex & 0xF) + 4;
|
||||
sceneSetupIndex = (gSaveContext.cutsceneIndex & 0xF) + 4;
|
||||
}
|
||||
|
||||
if (!(gEntranceTable[globalCtx->nextEntranceIndex + sp6E].field & 0x8000)) { // Continue BGM Off
|
||||
// fade out bgm if "continue bgm" flag is not set
|
||||
if (!(gEntranceTable[globalCtx->nextEntranceIndex + sceneSetupIndex].field & 0x8000)) {
|
||||
// "Sound initalized. 111"
|
||||
osSyncPrintf("\n\n\nサウンドイニシャル来ました。111");
|
||||
if ((globalCtx->fadeTransition < 56) && !Environment_IsForcedSequenceDisabled()) {
|
||||
if ((globalCtx->transitionType < TRANS_TYPE_MAX) &&
|
||||
!Environment_IsForcedSequenceDisabled()) {
|
||||
// "Sound initalized. 222"
|
||||
osSyncPrintf("\n\n\nサウンドイニシャル来ました。222");
|
||||
func_800F6964(0x14);
|
||||
|
@ -489,71 +503,80 @@ void Gameplay_Update(GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (CREG(11) == 0) {
|
||||
func_800BC5E0(globalCtx, globalCtx->fadeTransition);
|
||||
if (!R_TRANS_DBG_ENABLED) {
|
||||
Gameplay_SetupTransition(globalCtx, globalCtx->transitionType);
|
||||
} else {
|
||||
func_800BC5E0(globalCtx, CREG(12));
|
||||
Gameplay_SetupTransition(globalCtx, R_TRANS_DBG_TYPE);
|
||||
}
|
||||
|
||||
if (globalCtx->transitionMode >= 4) {
|
||||
if (globalCtx->transitionMode >= TRANS_MODE_FILL_WHITE_INIT) {
|
||||
// non-instance modes break out of this switch
|
||||
break;
|
||||
}
|
||||
|
||||
case 2:
|
||||
// fallthrough
|
||||
case TRANS_MODE_INSTANCE_INIT:
|
||||
globalCtx->transitionCtx.init(&globalCtx->transitionCtx.data);
|
||||
|
||||
// circle types
|
||||
if ((globalCtx->transitionCtx.transitionType >> 5) == 1) {
|
||||
globalCtx->transitionCtx.setType(&globalCtx->transitionCtx.data,
|
||||
globalCtx->transitionCtx.transitionType | 0x80);
|
||||
globalCtx->transitionCtx.transitionType | TC_SET_PARAMS);
|
||||
}
|
||||
|
||||
gSaveContext.unk_1419 = 14;
|
||||
if ((globalCtx->transitionCtx.transitionType == 8) ||
|
||||
(globalCtx->transitionCtx.transitionType == 9)) {
|
||||
gSaveContext.unk_1419 = 28;
|
||||
gSaveContext.transWipeSpeed = 14;
|
||||
|
||||
if ((globalCtx->transitionCtx.transitionType == TRANS_TYPE_WIPE_FAST) ||
|
||||
(globalCtx->transitionCtx.transitionType == TRANS_TYPE_FILL_WHITE2)) {
|
||||
//! @bug TRANS_TYPE_FILL_WHITE2 will never reach this code.
|
||||
//! It is a non-instance type transition which doesn't run this case.
|
||||
gSaveContext.transWipeSpeed = 28;
|
||||
}
|
||||
|
||||
gSaveContext.fadeDuration = 60;
|
||||
if ((globalCtx->transitionCtx.transitionType == 4) ||
|
||||
(globalCtx->transitionCtx.transitionType == 5)) {
|
||||
gSaveContext.fadeDuration = 20;
|
||||
} else if ((globalCtx->transitionCtx.transitionType == 6) ||
|
||||
(globalCtx->transitionCtx.transitionType == 7)) {
|
||||
gSaveContext.fadeDuration = 150;
|
||||
} else if (globalCtx->transitionCtx.transitionType == 17) {
|
||||
gSaveContext.fadeDuration = 2;
|
||||
gSaveContext.transFadeDuration = 60;
|
||||
|
||||
if ((globalCtx->transitionCtx.transitionType == TRANS_TYPE_FADE_BLACK_FAST) ||
|
||||
(globalCtx->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE_FAST)) {
|
||||
gSaveContext.transFadeDuration = 20;
|
||||
} else if ((globalCtx->transitionCtx.transitionType == TRANS_TYPE_FADE_BLACK_SLOW) ||
|
||||
(globalCtx->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE_SLOW)) {
|
||||
gSaveContext.transFadeDuration = 150;
|
||||
} else if (globalCtx->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE_INSTANT) {
|
||||
gSaveContext.transFadeDuration = 2;
|
||||
}
|
||||
|
||||
if ((globalCtx->transitionCtx.transitionType == 3) ||
|
||||
(globalCtx->transitionCtx.transitionType == 5) ||
|
||||
(globalCtx->transitionCtx.transitionType == 7) ||
|
||||
(globalCtx->transitionCtx.transitionType == 13) ||
|
||||
(globalCtx->transitionCtx.transitionType == 17)) {
|
||||
if ((globalCtx->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE) ||
|
||||
(globalCtx->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE_FAST) ||
|
||||
(globalCtx->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE_SLOW) ||
|
||||
(globalCtx->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE_CS_DELAYED) ||
|
||||
(globalCtx->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE_INSTANT)) {
|
||||
globalCtx->transitionCtx.setColor(&globalCtx->transitionCtx.data, RGBA8(160, 160, 160, 255));
|
||||
if (globalCtx->transitionCtx.setEnvColor != NULL) {
|
||||
globalCtx->transitionCtx.setEnvColor(&globalCtx->transitionCtx.data,
|
||||
RGBA8(160, 160, 160, 255));
|
||||
}
|
||||
} else if (globalCtx->transitionCtx.transitionType == 18) {
|
||||
} else if (globalCtx->transitionCtx.transitionType == TRANS_TYPE_FADE_GREEN) {
|
||||
globalCtx->transitionCtx.setColor(&globalCtx->transitionCtx.data, RGBA8(140, 140, 100, 255));
|
||||
|
||||
if (globalCtx->transitionCtx.setEnvColor != NULL) {
|
||||
globalCtx->transitionCtx.setEnvColor(&globalCtx->transitionCtx.data,
|
||||
RGBA8(140, 140, 100, 255));
|
||||
}
|
||||
} else if (globalCtx->transitionCtx.transitionType == 19) {
|
||||
} else if (globalCtx->transitionCtx.transitionType == TRANS_TYPE_FADE_BLUE) {
|
||||
globalCtx->transitionCtx.setColor(&globalCtx->transitionCtx.data, RGBA8(70, 100, 110, 255));
|
||||
|
||||
if (globalCtx->transitionCtx.setEnvColor != NULL) {
|
||||
globalCtx->transitionCtx.setEnvColor(&globalCtx->transitionCtx.data,
|
||||
RGBA8(70, 100, 110, 255));
|
||||
}
|
||||
} else {
|
||||
globalCtx->transitionCtx.setColor(&globalCtx->transitionCtx.data, RGBA8(0, 0, 0, 0));
|
||||
|
||||
if (globalCtx->transitionCtx.setEnvColor != NULL) {
|
||||
globalCtx->transitionCtx.setEnvColor(&globalCtx->transitionCtx.data, RGBA8(0, 0, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
if (globalCtx->sceneLoadFlag == -0x14) {
|
||||
if (globalCtx->transitionTrigger == TRANS_TRIGGER_END) {
|
||||
globalCtx->transitionCtx.setType(&globalCtx->transitionCtx.data, 1);
|
||||
} else {
|
||||
globalCtx->transitionCtx.setType(&globalCtx->transitionCtx.data, 2);
|
||||
|
@ -561,26 +584,28 @@ void Gameplay_Update(GlobalContext* globalCtx) {
|
|||
|
||||
globalCtx->transitionCtx.start(&globalCtx->transitionCtx);
|
||||
|
||||
if (globalCtx->transitionCtx.transitionType == 13) {
|
||||
globalCtx->transitionMode = 11;
|
||||
if (globalCtx->transitionCtx.transitionType == TRANS_TYPE_FADE_WHITE_CS_DELAYED) {
|
||||
globalCtx->transitionMode = TRANS_MODE_INSTANCE_WAIT;
|
||||
} else {
|
||||
globalCtx->transitionMode = 3;
|
||||
globalCtx->transitionMode = TRANS_MODE_INSTANCE_RUNNING;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (globalCtx->transitionCtx.isDone(&globalCtx->transitionCtx) != 0) {
|
||||
if (globalCtx->transitionCtx.transitionType >= 56) {
|
||||
if (globalCtx->sceneLoadFlag == -0x14) {
|
||||
case TRANS_MODE_INSTANCE_RUNNING:
|
||||
if (globalCtx->transitionCtx.isDone(&globalCtx->transitionCtx)) {
|
||||
if (globalCtx->transitionCtx.transitionType >= TRANS_TYPE_MAX) {
|
||||
if (globalCtx->transitionTrigger == TRANS_TRIGGER_END) {
|
||||
globalCtx->transitionCtx.destroy(&globalCtx->transitionCtx);
|
||||
func_800BC88C(globalCtx);
|
||||
globalCtx->transitionMode = 0;
|
||||
globalCtx->transitionMode = TRANS_MODE_OFF;
|
||||
}
|
||||
} else if (globalCtx->sceneLoadFlag != -0x14) {
|
||||
globalCtx->state.running = 0;
|
||||
} else if (globalCtx->transitionTrigger != TRANS_TRIGGER_END) {
|
||||
globalCtx->state.running = false;
|
||||
|
||||
if (gSaveContext.gameMode != 2) {
|
||||
SET_NEXT_GAMESTATE(&globalCtx->state, Gameplay_Init, GlobalContext);
|
||||
gSaveContext.entranceIndex = globalCtx->nextEntranceIndex;
|
||||
|
||||
if (gSaveContext.minigameState == 1) {
|
||||
gSaveContext.minigameState = 3;
|
||||
}
|
||||
|
@ -590,177 +615,186 @@ void Gameplay_Update(GlobalContext* globalCtx) {
|
|||
} else {
|
||||
globalCtx->transitionCtx.destroy(&globalCtx->transitionCtx);
|
||||
func_800BC88C(globalCtx);
|
||||
globalCtx->transitionMode = 0;
|
||||
globalCtx->transitionMode = TRANS_MODE_OFF;
|
||||
|
||||
if (gTrnsnUnkState == 3) {
|
||||
TransitionUnk_Destroy(&sTrnsnUnk);
|
||||
gTrnsnUnkState = 0;
|
||||
R_UPDATE_RATE = 3;
|
||||
}
|
||||
}
|
||||
globalCtx->sceneLoadFlag = 0;
|
||||
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_OFF;
|
||||
} else {
|
||||
globalCtx->transitionCtx.update(&globalCtx->transitionCtx.data, R_UPDATE_RATE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// update non-instance transitions
|
||||
switch (globalCtx->transitionMode) {
|
||||
case 4:
|
||||
D_801614C8 = 0;
|
||||
case TRANS_MODE_FILL_WHITE_INIT:
|
||||
sTransitionFillTimer = 0;
|
||||
globalCtx->envCtx.fillScreen = true;
|
||||
globalCtx->envCtx.screenFillColor[0] = 160;
|
||||
globalCtx->envCtx.screenFillColor[1] = 160;
|
||||
globalCtx->envCtx.screenFillColor[2] = 160;
|
||||
if (globalCtx->sceneLoadFlag != -0x14) {
|
||||
|
||||
if (globalCtx->transitionTrigger != TRANS_TRIGGER_END) {
|
||||
globalCtx->envCtx.screenFillColor[3] = 0;
|
||||
globalCtx->transitionMode = 5;
|
||||
globalCtx->transitionMode = TRANS_MODE_FILL_IN;
|
||||
} else {
|
||||
globalCtx->envCtx.screenFillColor[3] = 255;
|
||||
globalCtx->transitionMode = 6;
|
||||
globalCtx->transitionMode = TRANS_MODE_FILL_OUT;
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
globalCtx->envCtx.screenFillColor[3] = (D_801614C8 / 20.0f) * 255.0f;
|
||||
if (D_801614C8 >= 20 && 1) {
|
||||
globalCtx->state.running = 0;
|
||||
case TRANS_MODE_FILL_IN:
|
||||
globalCtx->envCtx.screenFillColor[3] = (sTransitionFillTimer / 20.0f) * 255.0f;
|
||||
|
||||
if (sTransitionFillTimer >= 20) {
|
||||
globalCtx->state.running = false;
|
||||
SET_NEXT_GAMESTATE(&globalCtx->state, Gameplay_Init, GlobalContext);
|
||||
gSaveContext.entranceIndex = globalCtx->nextEntranceIndex;
|
||||
globalCtx->sceneLoadFlag = 0;
|
||||
globalCtx->transitionMode = 0;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_OFF;
|
||||
globalCtx->transitionMode = TRANS_MODE_OFF;
|
||||
} else {
|
||||
D_801614C8++;
|
||||
sTransitionFillTimer++;
|
||||
}
|
||||
break;
|
||||
|
||||
case 6:
|
||||
globalCtx->envCtx.screenFillColor[3] = (1 - D_801614C8 / 20.0f) * 255.0f;
|
||||
if (D_801614C8 >= 20 && 1) {
|
||||
case TRANS_MODE_FILL_OUT:
|
||||
globalCtx->envCtx.screenFillColor[3] = (1 - sTransitionFillTimer / 20.0f) * 255.0f;
|
||||
|
||||
if (sTransitionFillTimer >= 20) {
|
||||
gTrnsnUnkState = 0;
|
||||
R_UPDATE_RATE = 3;
|
||||
globalCtx->sceneLoadFlag = 0;
|
||||
globalCtx->transitionMode = 0;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_OFF;
|
||||
globalCtx->transitionMode = TRANS_MODE_OFF;
|
||||
globalCtx->envCtx.fillScreen = false;
|
||||
} else {
|
||||
D_801614C8++;
|
||||
sTransitionFillTimer++;
|
||||
}
|
||||
break;
|
||||
|
||||
case 7:
|
||||
D_801614C8 = 0;
|
||||
case TRANS_MODE_FILL_BROWN_INIT:
|
||||
sTransitionFillTimer = 0;
|
||||
globalCtx->envCtx.fillScreen = true;
|
||||
globalCtx->envCtx.screenFillColor[0] = 170;
|
||||
globalCtx->envCtx.screenFillColor[1] = 160;
|
||||
globalCtx->envCtx.screenFillColor[2] = 150;
|
||||
if (globalCtx->sceneLoadFlag != -0x14) {
|
||||
|
||||
if (globalCtx->transitionTrigger != TRANS_TRIGGER_END) {
|
||||
globalCtx->envCtx.screenFillColor[3] = 0;
|
||||
globalCtx->transitionMode = 5;
|
||||
globalCtx->transitionMode = TRANS_MODE_FILL_IN;
|
||||
} else {
|
||||
globalCtx->envCtx.screenFillColor[3] = 255;
|
||||
globalCtx->transitionMode = 6;
|
||||
globalCtx->transitionMode = TRANS_MODE_FILL_OUT;
|
||||
}
|
||||
break;
|
||||
|
||||
case 10:
|
||||
if (globalCtx->sceneLoadFlag != -0x14) {
|
||||
globalCtx->state.running = 0;
|
||||
case TRANS_MODE_INSTANT:
|
||||
if (globalCtx->transitionTrigger != TRANS_TRIGGER_END) {
|
||||
globalCtx->state.running = false;
|
||||
SET_NEXT_GAMESTATE(&globalCtx->state, Gameplay_Init, GlobalContext);
|
||||
gSaveContext.entranceIndex = globalCtx->nextEntranceIndex;
|
||||
globalCtx->sceneLoadFlag = 0;
|
||||
globalCtx->transitionMode = 0;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_OFF;
|
||||
globalCtx->transitionMode = TRANS_MODE_OFF;
|
||||
} else {
|
||||
gTrnsnUnkState = 0;
|
||||
R_UPDATE_RATE = 3;
|
||||
globalCtx->sceneLoadFlag = 0;
|
||||
globalCtx->transitionMode = 0;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_OFF;
|
||||
globalCtx->transitionMode = TRANS_MODE_OFF;
|
||||
}
|
||||
break;
|
||||
|
||||
case 11:
|
||||
if (gSaveContext.unk_1410 != 0) {
|
||||
globalCtx->transitionMode = 3;
|
||||
case TRANS_MODE_INSTANCE_WAIT:
|
||||
if (gSaveContext.cutsceneTransitionControl != 0) {
|
||||
globalCtx->transitionMode = TRANS_MODE_INSTANCE_RUNNING;
|
||||
}
|
||||
break;
|
||||
|
||||
case 12:
|
||||
if (globalCtx->sceneLoadFlag != -0x14) {
|
||||
globalCtx->envCtx.sandstormState = 1;
|
||||
globalCtx->transitionMode = 13;
|
||||
case TRANS_MODE_SANDSTORM_INIT:
|
||||
if (globalCtx->transitionTrigger != TRANS_TRIGGER_END) {
|
||||
// trigger in, leaving area
|
||||
globalCtx->envCtx.sandstormState = SANDSTORM_FILL;
|
||||
globalCtx->transitionMode = TRANS_MODE_SANDSTORM;
|
||||
} else {
|
||||
globalCtx->envCtx.sandstormState = 2;
|
||||
globalCtx->envCtx.sandstormState = SANDSTORM_UNFILL;
|
||||
globalCtx->envCtx.sandstormPrimA = 255;
|
||||
globalCtx->envCtx.sandstormEnvA = 255;
|
||||
globalCtx->transitionMode = 13;
|
||||
globalCtx->transitionMode = TRANS_MODE_SANDSTORM;
|
||||
}
|
||||
break;
|
||||
|
||||
case 13:
|
||||
case TRANS_MODE_SANDSTORM:
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
if (globalCtx->sceneLoadFlag == -0x14) {
|
||||
|
||||
if (globalCtx->transitionTrigger == TRANS_TRIGGER_END) {
|
||||
if (globalCtx->envCtx.sandstormPrimA < 110) {
|
||||
gTrnsnUnkState = 0;
|
||||
R_UPDATE_RATE = 3;
|
||||
globalCtx->sceneLoadFlag = 0;
|
||||
globalCtx->transitionMode = 0;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_OFF;
|
||||
globalCtx->transitionMode = TRANS_MODE_OFF;
|
||||
}
|
||||
} else {
|
||||
if (globalCtx->envCtx.sandstormEnvA == 255) {
|
||||
globalCtx->state.running = 0;
|
||||
globalCtx->state.running = false;
|
||||
SET_NEXT_GAMESTATE(&globalCtx->state, Gameplay_Init, GlobalContext);
|
||||
gSaveContext.entranceIndex = globalCtx->nextEntranceIndex;
|
||||
globalCtx->sceneLoadFlag = 0;
|
||||
globalCtx->transitionMode = 0;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_OFF;
|
||||
globalCtx->transitionMode = TRANS_MODE_OFF;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 14:
|
||||
if (globalCtx->sceneLoadFlag == -0x14) {
|
||||
globalCtx->envCtx.sandstormState = 4;
|
||||
case TRANS_MODE_SANDSTORM_END_INIT:
|
||||
if (globalCtx->transitionTrigger == TRANS_TRIGGER_END) {
|
||||
globalCtx->envCtx.sandstormState = SANDSTORM_DISSIPATE;
|
||||
globalCtx->envCtx.sandstormPrimA = 255;
|
||||
globalCtx->envCtx.sandstormEnvA = 255;
|
||||
// "It's here!!!!!!!!!"
|
||||
LOG_STRING("来た!!!!!!!!!!!!!!!!!!!!!", "../z_play.c", 3471);
|
||||
globalCtx->transitionMode = 15;
|
||||
globalCtx->transitionMode = TRANS_MODE_SANDSTORM_END;
|
||||
} else {
|
||||
globalCtx->transitionMode = 12;
|
||||
globalCtx->transitionMode = TRANS_MODE_SANDSTORM_INIT;
|
||||
}
|
||||
break;
|
||||
|
||||
case 15:
|
||||
case TRANS_MODE_SANDSTORM_END:
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
if (globalCtx->sceneLoadFlag == -0x14) {
|
||||
if (globalCtx->transitionTrigger == TRANS_TRIGGER_END) {
|
||||
if (globalCtx->envCtx.sandstormPrimA <= 0) {
|
||||
gTrnsnUnkState = 0;
|
||||
R_UPDATE_RATE = 3;
|
||||
globalCtx->sceneLoadFlag = 0;
|
||||
globalCtx->transitionMode = 0;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_OFF;
|
||||
globalCtx->transitionMode = TRANS_MODE_OFF;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 16:
|
||||
D_801614C8 = 0;
|
||||
case TRANS_MODE_CS_BLACK_FILL_INIT:
|
||||
sTransitionFillTimer = 0;
|
||||
globalCtx->envCtx.fillScreen = true;
|
||||
globalCtx->envCtx.screenFillColor[0] = 0;
|
||||
globalCtx->envCtx.screenFillColor[1] = 0;
|
||||
globalCtx->envCtx.screenFillColor[2] = 0;
|
||||
globalCtx->envCtx.screenFillColor[3] = 255;
|
||||
globalCtx->transitionMode = 17;
|
||||
globalCtx->transitionMode = TRANS_MODE_CS_BLACK_FILL;
|
||||
break;
|
||||
|
||||
case 17:
|
||||
if (gSaveContext.unk_1410 != 0) {
|
||||
globalCtx->envCtx.screenFillColor[3] = gSaveContext.unk_1410;
|
||||
if (gSaveContext.unk_1410 < 0x65) {
|
||||
case TRANS_MODE_CS_BLACK_FILL:
|
||||
if (gSaveContext.cutsceneTransitionControl != 0) {
|
||||
globalCtx->envCtx.screenFillColor[3] = gSaveContext.cutsceneTransitionControl;
|
||||
if (gSaveContext.cutsceneTransitionControl <= 100) {
|
||||
gTrnsnUnkState = 0;
|
||||
R_UPDATE_RATE = 3;
|
||||
globalCtx->sceneLoadFlag = 0;
|
||||
globalCtx->transitionMode = 0;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_OFF;
|
||||
globalCtx->transitionMode = TRANS_MODE_OFF;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1116,7 +1150,8 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
|
|||
gfxP = Graph_GfxPlusOne(sp1CC);
|
||||
gSPDisplayList(OVERLAY_DISP++, gfxP);
|
||||
|
||||
if ((globalCtx->transitionMode == 3) || (globalCtx->transitionMode == 11) ||
|
||||
if ((globalCtx->transitionMode == TRANS_MODE_INSTANCE_RUNNING) ||
|
||||
(globalCtx->transitionMode == TRANS_MODE_INSTANCE_WAIT) ||
|
||||
(globalCtx->transitionCtx.transitionType >= 56)) {
|
||||
View view;
|
||||
|
||||
|
@ -1271,7 +1306,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if ((HREG(80) != 10) || (HREG(88) != 0)) {
|
||||
if (globalCtx->envCtx.sandstormState != 0) {
|
||||
if (globalCtx->envCtx.sandstormState != SANDSTORM_OFF) {
|
||||
Environment_DrawSandstorm(globalCtx, globalCtx->envCtx.sandstormState);
|
||||
}
|
||||
}
|
||||
|
@ -1756,14 +1791,14 @@ void Gameplay_TriggerVoidOut(GlobalContext* globalCtx) {
|
|||
gSaveContext.respawn[RESPAWN_MODE_DOWN].tempSwchFlags = globalCtx->actorCtx.flags.tempSwch;
|
||||
gSaveContext.respawn[RESPAWN_MODE_DOWN].tempCollectFlags = globalCtx->actorCtx.flags.tempCollect;
|
||||
gSaveContext.respawnFlag = 1;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex;
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
}
|
||||
|
||||
void Gameplay_LoadToLastEntrance(GlobalContext* globalCtx) {
|
||||
gSaveContext.respawnFlag = -1;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
|
||||
if ((globalCtx->sceneNum == SCENE_GANON_SONOGO) || (globalCtx->sceneNum == SCENE_GANON_FINAL) ||
|
||||
(globalCtx->sceneNum == SCENE_GANONTIKA_SONOGO) || (globalCtx->sceneNum == SCENE_GANON_DEMO)) {
|
||||
|
@ -1776,7 +1811,7 @@ void Gameplay_LoadToLastEntrance(GlobalContext* globalCtx) {
|
|||
globalCtx->nextEntranceIndex = gSaveContext.entranceIndex;
|
||||
}
|
||||
|
||||
globalCtx->fadeTransition = 2;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
}
|
||||
|
||||
void Gameplay_TriggerRespawn(GlobalContext* globalCtx) {
|
||||
|
|
|
@ -481,7 +481,7 @@ void Player_SetBootData(GlobalContext* globalCtx, Player* this) {
|
|||
|
||||
s32 Player_InBlockingCsMode(GlobalContext* globalCtx, Player* this) {
|
||||
return (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->csMode != 0) ||
|
||||
(globalCtx->sceneLoadFlag == 0x14) || (this->stateFlags1 & PLAYER_STATE1_0) ||
|
||||
(globalCtx->transitionTrigger == TRANS_TRIGGER_START) || (this->stateFlags1 & PLAYER_STATE1_0) ||
|
||||
(this->stateFlags3 & PLAYER_STATE3_7) ||
|
||||
((gSaveContext.unk_13F0 != 0) && (Player_ActionToMagicSpell(this, this->itemActionParam) >= 0));
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue