mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-13 03:14:38 +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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue