mirror of https://github.com/zeldaret/oot.git
`#define CS_INDEX_D 0xFFFD` and co.
Co-authored-by: cadmic <cadmic24@gmail.com>
This commit is contained in:
parent
e42503320e
commit
4cae9073de
|
@ -409,19 +409,25 @@ typedef enum LinkAge {
|
|||
} LinkAge;
|
||||
|
||||
|
||||
// values `< 0xFFF0` indicate no cutscene, or a context in which manual cutscenes can be used; can be assigned to
|
||||
// - `gSaveContext.save.cutsceneIndex`
|
||||
// - `gSaveContext.nextCutsceneIndex`
|
||||
// using them implies an intention to have the Play state set `gSaveContext.sceneLayer` based on age and day time on state init
|
||||
// see enum values [`SCENE_LAYER_CHILD_DAY` .. `SCENE_LAYER_ADULT_NIGHT`]
|
||||
#define CS_INDEX_DEFAULT 0x0000
|
||||
#define CS_INDEX_UNK_8000 0x8000
|
||||
// Values that indicate that either no cutscene is playing or a
|
||||
// "manual"/"unscripted" cutscene is playing. The names "night"
|
||||
// and "day" are leftover from the original meaning of the cutscene
|
||||
// index (called "day_time"), and only map select uses these values
|
||||
// (to set gSaveContext.save.nightFlag).
|
||||
#define CS_INDEX_NIGHT 0x0000
|
||||
#define CS_INDEX_DAY 0x8000
|
||||
|
||||
// values `>= 0xFFF0` indicate a "scripted" cutscene; can be assigned to
|
||||
// - `gSaveContext.save.cutsceneIndex`
|
||||
// - `gSaveContext.nextCutsceneIndex`
|
||||
// using them implies an intention to have `z_play.c` set `gSaveContext.sceneLayer` directly by index
|
||||
// see `GET_CUTSCENE_LAYER(index)`
|
||||
// Values 0xFFF0-0xFFFF indicate that a cutscene script should be played.
|
||||
// If the value of `nextCutsceneIndex` is 0xFFF0-0xFFFF on scene load,
|
||||
// `Play_Init` will copy the value to `gSaveContext.cutsceneIndex`, load a
|
||||
// corresponding scene layer and start the scripted cutscene in the scene layer
|
||||
// (except for the value 0xFFFD, which is special-cased to do nothing on Play init).
|
||||
// It loads layer 4 for 0xFFF0, layer 5 for 0xFFF1, and so on.
|
||||
//
|
||||
// The cutsceneIndex could also be set to one of these values to start a
|
||||
// scripted cutscene immediately. In the vanilla game, this is used to play
|
||||
// the cutscene where the barrier in Ganon's Castle is dispelled (using index 0xFFFF)
|
||||
// and to preview cutscenes in debug mode (using index 0xFFFD).
|
||||
#define CS_INDEX_0 0xFFF0
|
||||
#define CS_INDEX_1 0xFFF1
|
||||
#define CS_INDEX_2 0xFFF2
|
||||
|
@ -433,17 +439,14 @@ typedef enum LinkAge {
|
|||
#define CS_INDEX_8 0xFFF8
|
||||
#define CS_INDEX_9 0xFFF9
|
||||
#define CS_INDEX_A 0xFFFA
|
||||
#define CS_INDEX_B 0xFFFB
|
||||
#define CS_INDEX_C 0xFFFC
|
||||
#define CS_INDEX_D 0xFFFD
|
||||
#define CS_INDEX_E 0xFFFE
|
||||
#define CS_INDEX_F 0xFFFF
|
||||
|
||||
// This value is "out of range" even for the largest set of entrances in the entrance table
|
||||
// but `z_demo.c` immediately sets `CS_STATE_STOP` state
|
||||
#define CS_INDEX_UNK_FFFF 0xFFFF
|
||||
|
||||
// sentinel value used for `cutsceneIndex` to indicate that it should be reset to default
|
||||
#define CS_INDEX_EMPTY 0xFFFD
|
||||
|
||||
// sentinel value used for `nextCutsceneIndex` to indicate that it is empty
|
||||
// otherwise its value will be copied to `cutsceneIndex` on Play state init
|
||||
#define CS_INDEX_NEXT_EMPTY 0xFFEF
|
||||
// Sentinel value for `nextCutsceneIndex` to indicate that no cutscene should be played next.
|
||||
#define NEXT_CS_INDEX_NONE 0xFFEF
|
||||
|
||||
|
||||
#define LINK_IS_ADULT (gSaveContext.save.linkAge == LINK_AGE_ADULT)
|
||||
|
|
|
@ -2204,7 +2204,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
|
|||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[1].press.button, BTN_CRIGHT)) {
|
||||
gUseCutsceneCam = false;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_EMPTY;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_D;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
sDebugCamAnim.curFrame = 0.0f;
|
||||
sDebugCamAnim.keyframe = 0;
|
||||
|
|
|
@ -26,7 +26,7 @@ void SaveContext_Init(void) {
|
|||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = NATURE_ID_DISABLED;
|
||||
gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_NEXT_EMPTY;
|
||||
gSaveContext.nextCutsceneIndex = NEXT_CS_INDEX_NONE;
|
||||
gSaveContext.cutsceneTrigger = 0;
|
||||
gSaveContext.chamberCutsceneNum = CHAMBER_CS_FOREST;
|
||||
gSaveContext.nextDayTime = NEXT_TIME_NONE;
|
||||
|
|
|
@ -214,14 +214,14 @@ void Cutscene_UpdateScripted(PlayState* play, CutsceneContext* csCtx) {
|
|||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DLEFT) && (csCtx->state == CS_STATE_IDLE) && IS_CUTSCENE_LAYER) {
|
||||
gUseCutsceneCam = false;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_EMPTY;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_D;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DUP) && (csCtx->state == CS_STATE_IDLE) && IS_CUTSCENE_LAYER &&
|
||||
!gDebugCamEnabled) {
|
||||
gUseCutsceneCam = true;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_EMPTY;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_D;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ void Cutscene_UpdateScripted(PlayState* play, CutsceneContext* csCtx) {
|
|||
|
||||
if ((gSaveContext.cutsceneTrigger != 0) && (csCtx->state == CS_STATE_IDLE)) {
|
||||
PRINTF(T("\nデモ開始要求 発令!", "\nDemo start request issued!"));
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_EMPTY;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_D;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
|
||||
|
@ -616,7 +616,7 @@ void CutsceneCmd_Destination(PlayState* play, CutsceneContext* csCtx, CsCmdDesti
|
|||
gSaveContext.forceRisingButtonAlphas = true;
|
||||
}
|
||||
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
|
||||
|
||||
switch (cmd->destination) {
|
||||
case CS_DEST_CUTSCENE_MAP_GANON_HORSE:
|
||||
|
@ -769,7 +769,7 @@ void CutsceneCmd_Destination(PlayState* play, CutsceneContext* csCtx, CsCmdDesti
|
|||
play->nextEntranceIndex = ENTR_DEATH_MOUNTAIN_TRAIL_0;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_UNK_8000;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DAY;
|
||||
break;
|
||||
|
||||
case CS_DEST_LAKE_HYLIA_WATER_RESTORED:
|
||||
|
@ -1390,10 +1390,10 @@ void CutsceneCmd_Destination(PlayState* play, CutsceneContext* csCtx, CsCmdDesti
|
|||
play->csCtx.script = SEGMENTED_TO_VIRTUAL(gTowerBarrierCs);
|
||||
play->csCtx.curFrame = 0;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_UNK_FFFF;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_F;
|
||||
csCtx->state = CS_STATE_STOP;
|
||||
} else {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_UNK_FFFF;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_F;
|
||||
csCtx->state = CS_STATE_STOP;
|
||||
}
|
||||
break;
|
||||
|
@ -2292,7 +2292,7 @@ void CutsceneHandler_StopScript(PlayState* play, CutsceneContext* csCtx) {
|
|||
|
||||
PRINTF(T("\n\n\n\n\nやっぱりここかいな", "\n\n\n\n\nThis is it after all"));
|
||||
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
|
||||
gSaveContext.gameMode = GAMEMODE_NORMAL;
|
||||
|
||||
if (gUseCutsceneCam) {
|
||||
|
@ -2318,7 +2318,7 @@ void Cutscene_SetupScripted(PlayState* play, CutsceneContext* csCtx) {
|
|||
u8 i;
|
||||
|
||||
if ((gSaveContext.cutsceneTrigger != 0) && (csCtx->state == CS_STATE_IDLE) && !Player_InCsMode(play)) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_EMPTY;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_D;
|
||||
}
|
||||
|
||||
if ((gSaveContext.save.cutsceneIndex >= CS_INDEX_0) && (csCtx->state == CS_STATE_IDLE)) {
|
||||
|
|
|
@ -2642,7 +2642,7 @@ void Environment_StopStormNatureAmbience(PlayState* play) {
|
|||
|
||||
void Environment_WarpSongLeave(PlayState* play) {
|
||||
gWeatherMode = WEATHER_MODE_CLEAR;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
|
||||
gSaveContext.respawnFlag = -3;
|
||||
play->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_RETURN].entranceIndex;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
|
|
|
@ -3562,7 +3562,7 @@ void Interface_Draw(PlayState* play) {
|
|||
(Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT)) {
|
||||
// Trade quest timer reached 0
|
||||
sSubTimerStateTimer = 40;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
gSaveContext.subTimerState = SUBTIMER_STATE_OFF;
|
||||
|
@ -3900,7 +3900,7 @@ void Interface_Draw(PlayState* play) {
|
|||
(play->sceneId != SCENE_INSIDE_GANONS_CASTLE_COLLAPSE))) {
|
||||
sSubTimerStateTimer = 40;
|
||||
gSaveContext.subTimerState = SUBTIMER_STATE_RESPAWN;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
|
||||
Message_StartTextbox(play, 0x71B0, NULL);
|
||||
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
|
||||
} else {
|
||||
|
|
|
@ -348,13 +348,13 @@ void Play_Init(GameState* thisx) {
|
|||
AnimTaskQueue_Reset(&this->animTaskQueue);
|
||||
Cutscene_InitContext(this, &this->csCtx);
|
||||
|
||||
if (gSaveContext.nextCutsceneIndex != CS_INDEX_NEXT_EMPTY) {
|
||||
if (gSaveContext.nextCutsceneIndex != NEXT_CS_INDEX_NONE) {
|
||||
gSaveContext.save.cutsceneIndex = gSaveContext.nextCutsceneIndex;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_NEXT_EMPTY;
|
||||
gSaveContext.nextCutsceneIndex = NEXT_CS_INDEX_NONE;
|
||||
}
|
||||
|
||||
if (gSaveContext.save.cutsceneIndex == CS_INDEX_EMPTY) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DEFAULT;
|
||||
if (gSaveContext.save.cutsceneIndex == CS_INDEX_D) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
|
||||
}
|
||||
|
||||
if (gSaveContext.nextDayTime != NEXT_TIME_NONE) {
|
||||
|
|
|
@ -863,7 +863,7 @@ void Sram_InitSave(FileSelectState* fileSelect, SramContext* sramCtx) {
|
|||
|
||||
#if DEBUG_FEATURES
|
||||
if (fileSelect->buttonIndex == 0) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -508,7 +508,7 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
|
|||
Math_SmoothStepToF(&this->lightRayAlpha, 0.0f, 0.2f, 6.0f, 0.01f);
|
||||
this->warpTimer++;
|
||||
|
||||
if (sWarpTimerTarget < this->warpTimer && gSaveContext.nextCutsceneIndex == CS_INDEX_NEXT_EMPTY) {
|
||||
if (sWarpTimerTarget < this->warpTimer && gSaveContext.nextCutsceneIndex == NEXT_CS_INDEX_NONE) {
|
||||
PRINTF("\n\n\nじかんがきたからおーしまい fade_direction=[%d]", play->transitionTrigger, TRANS_TRIGGER_START);
|
||||
|
||||
if (play->sceneId == SCENE_DODONGOS_CAVERN_BOSS) {
|
||||
|
@ -519,7 +519,7 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
|
|||
gSaveContext.nextCutsceneIndex = CS_INDEX_1;
|
||||
} else {
|
||||
play->nextEntranceIndex = ENTR_DEATH_MOUNTAIN_TRAIL_5;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
|
||||
}
|
||||
} else if (play->sceneId == SCENE_DEKU_TREE_BOSS) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_07)) {
|
||||
|
@ -530,11 +530,11 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
|
|||
gSaveContext.nextCutsceneIndex = CS_INDEX_1;
|
||||
} else {
|
||||
play->nextEntranceIndex = ENTR_KOKIRI_FOREST_11;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
|
||||
}
|
||||
} else if (play->sceneId == SCENE_JABU_JABU_BOSS) {
|
||||
play->nextEntranceIndex = ENTR_ZORAS_FOUNTAIN_0;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
|
||||
}
|
||||
PRINTF("\n\n\nおわりおわり");
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
|
@ -619,7 +619,7 @@ void DoorWarp1_RutoWarpOut(DoorWarp1* this, PlayState* play) {
|
|||
Math_SmoothStepToF(&this->lightRayAlpha, 0.0f, 0.2f, 6.0f, 0.01f);
|
||||
this->warpTimer++;
|
||||
|
||||
if (this->warpTimer > sWarpTimerTarget && gSaveContext.nextCutsceneIndex == CS_INDEX_NEXT_EMPTY) {
|
||||
if (this->warpTimer > sWarpTimerTarget && gSaveContext.nextCutsceneIndex == NEXT_CS_INDEX_NONE) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_37);
|
||||
Item_Give(play, ITEM_ZORA_SAPPHIRE);
|
||||
play->nextEntranceIndex = ENTR_ZORAS_FOUNTAIN_0;
|
||||
|
@ -719,13 +719,13 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
|||
}
|
||||
this->warpTimer++;
|
||||
|
||||
if (this->warpTimer > sWarpTimerTarget && gSaveContext.nextCutsceneIndex == CS_INDEX_NEXT_EMPTY) {
|
||||
if (this->warpTimer > sWarpTimerTarget && gSaveContext.nextCutsceneIndex == NEXT_CS_INDEX_NONE) {
|
||||
if (play->sceneId == SCENE_FOREST_TEMPLE_BOSS) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_48)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_48);
|
||||
Item_Give(play, ITEM_MEDALLION_FOREST);
|
||||
play->nextEntranceIndex = ENTR_CHAMBER_OF_THE_SAGES_0;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
|
||||
gSaveContext.chamberCutsceneNum = CHAMBER_CS_FOREST;
|
||||
} else {
|
||||
if (!LINK_IS_ADULT) {
|
||||
|
@ -733,7 +733,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
|||
} else {
|
||||
play->nextEntranceIndex = ENTR_SACRED_FOREST_MEADOW_3;
|
||||
}
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
|
||||
}
|
||||
} else if (play->sceneId == SCENE_FIRE_TEMPLE_BOSS) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_49)) {
|
||||
|
@ -747,14 +747,14 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
|||
} else {
|
||||
play->nextEntranceIndex = ENTR_DEATH_MOUNTAIN_CRATER_5;
|
||||
}
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
|
||||
}
|
||||
} else if (play->sceneId == SCENE_WATER_TEMPLE_BOSS) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_4A)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4A);
|
||||
Item_Give(play, ITEM_MEDALLION_WATER);
|
||||
play->nextEntranceIndex = ENTR_CHAMBER_OF_THE_SAGES_0;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
|
||||
gSaveContext.chamberCutsceneNum = CHAMBER_CS_WATER;
|
||||
} else {
|
||||
if (!LINK_IS_ADULT) {
|
||||
|
@ -762,13 +762,13 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
|||
} else {
|
||||
play->nextEntranceIndex = ENTR_LAKE_HYLIA_9;
|
||||
}
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
|
||||
}
|
||||
} else if (play->sceneId == SCENE_SPIRIT_TEMPLE_BOSS) {
|
||||
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) {
|
||||
Item_Give(play, ITEM_MEDALLION_SPIRIT);
|
||||
play->nextEntranceIndex = ENTR_CHAMBER_OF_THE_SAGES_0;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
|
||||
gSaveContext.chamberCutsceneNum = CHAMBER_CS_SPIRIT;
|
||||
} else {
|
||||
if (!LINK_IS_ADULT) {
|
||||
|
@ -776,13 +776,13 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
|||
} else {
|
||||
play->nextEntranceIndex = ENTR_DESERT_COLOSSUS_8;
|
||||
}
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
|
||||
}
|
||||
} else if (play->sceneId == SCENE_SHADOW_TEMPLE_BOSS) {
|
||||
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW)) {
|
||||
Item_Give(play, ITEM_MEDALLION_SHADOW);
|
||||
play->nextEntranceIndex = ENTR_CHAMBER_OF_THE_SAGES_0;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
|
||||
gSaveContext.chamberCutsceneNum = CHAMBER_CS_SHADOW;
|
||||
} else {
|
||||
if (!LINK_IS_ADULT) {
|
||||
|
@ -790,7 +790,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
|||
} else {
|
||||
play->nextEntranceIndex = ENTR_GRAVEYARD_8;
|
||||
}
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
|
||||
}
|
||||
}
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
|
|
|
@ -2569,7 +2569,7 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, PlayState* play) {
|
|||
EnHorse_UpdateHbaRaceInfo(this, play, &sHbaInfo);
|
||||
if ((this->hbaFlags & 1) || (this->hbaTimer >= 46)) {
|
||||
if ((isFanfarePlaying != true) && (gSaveContext.minigameState != 3)) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
|
||||
play->nextEntranceIndex = ENTR_GERUDOS_FORTRESS_16;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->transitionType = TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_BLACK, TCS_FAST);
|
||||
|
|
|
@ -120,7 +120,7 @@ s32 EnHorseGameCheck_DestroyIngoRace(EnHorseGameCheckBase* base, PlayState* play
|
|||
}
|
||||
|
||||
void EnHorseGameCheck_FinishIngoRace(EnHorseGameCheckIngoRace* this, PlayState* play) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
|
||||
if (this->result == INGO_RACE_PLAYER_WIN) {
|
||||
play->nextEntranceIndex = ENTR_LON_LON_RANCH_7;
|
||||
if (GET_EVENTINF(EVENTINF_INGO_RACE_SECOND_RACE)) {
|
||||
|
@ -307,21 +307,21 @@ s32 EnHorseGameCheck_DestroyMalonRace(EnHorseGameCheckBase* base, PlayState* pla
|
|||
|
||||
void EnHorseGameCheck_FinishMalonRace(EnHorseGameCheckMalonRace* this, PlayState* play) {
|
||||
if ((this->result == MALONRACE_SUCCESS) || (this->result == MALONRACE_TIME_UP)) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
|
||||
play->nextEntranceIndex = ENTR_LON_LON_RANCH_7;
|
||||
play->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
} else if (this->result == MALONRACE_FAILURE) {
|
||||
gSaveContext.timerSeconds = 240;
|
||||
gSaveContext.timerState = TIMER_STATE_UP_FREEZE;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
|
||||
play->nextEntranceIndex = ENTR_LON_LON_RANCH_7;
|
||||
play->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
} else {
|
||||
// "not supported"
|
||||
PRINTF("En_HGC_Spot20_Ta_end():対応せず\n");
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
|
||||
play->nextEntranceIndex = ENTR_LON_LON_RANCH_0;
|
||||
play->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
|
|
|
@ -393,7 +393,7 @@ void EnSa_ChangeAnim(EnSa* this, s32 index) {
|
|||
}
|
||||
|
||||
s32 func_80AF5DFC(EnSa* this, PlayState* play) {
|
||||
if (gSaveContext.save.cutsceneIndex >= CS_INDEX_0 && gSaveContext.save.cutsceneIndex != CS_INDEX_EMPTY) {
|
||||
if (gSaveContext.save.cutsceneIndex >= CS_INDEX_0 && gSaveContext.save.cutsceneIndex != CS_INDEX_D) {
|
||||
if (play->sceneId == SCENE_KOKIRI_FOREST) {
|
||||
return 4;
|
||||
}
|
||||
|
|
|
@ -1920,7 +1920,7 @@ void FileSelect_LoadGame(GameState* thisx) {
|
|||
gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX;
|
||||
gSaveContext.skyboxTime = CLOCK_TIME(0, 0);
|
||||
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;
|
||||
gSaveContext.nextCutsceneIndex = CS_INDEX_NEXT_EMPTY;
|
||||
gSaveContext.nextCutsceneIndex = NEXT_CS_INDEX_NONE;
|
||||
gSaveContext.cutsceneTrigger = 0;
|
||||
gSaveContext.chamberCutsceneNum = CHAMBER_CS_FOREST;
|
||||
gSaveContext.nextDayTime = NEXT_TIME_NONE;
|
||||
|
|
|
@ -310,9 +310,9 @@ void MapSelect_UpdateMenu(MapSelectState* this) {
|
|||
}
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_Z)) {
|
||||
if (gSaveContext.save.cutsceneIndex == CS_INDEX_UNK_8000) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DEFAULT;
|
||||
} else if (gSaveContext.save.cutsceneIndex == CS_INDEX_DEFAULT) {
|
||||
if (gSaveContext.save.cutsceneIndex == CS_INDEX_DAY) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
|
||||
} else if (gSaveContext.save.cutsceneIndex == CS_INDEX_NIGHT) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_0;
|
||||
} else if (gSaveContext.save.cutsceneIndex == CS_INDEX_0) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_1;
|
||||
|
@ -335,15 +335,15 @@ void MapSelect_UpdateMenu(MapSelectState* this) {
|
|||
} else if (gSaveContext.save.cutsceneIndex == CS_INDEX_9) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_A;
|
||||
} else if (gSaveContext.save.cutsceneIndex == CS_INDEX_A) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_UNK_8000;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DAY;
|
||||
}
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_R)) {
|
||||
if (gSaveContext.save.cutsceneIndex == CS_INDEX_UNK_8000) {
|
||||
if (gSaveContext.save.cutsceneIndex == CS_INDEX_DAY) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_A;
|
||||
} else if (gSaveContext.save.cutsceneIndex == CS_INDEX_DEFAULT) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_UNK_8000;
|
||||
} else if (gSaveContext.save.cutsceneIndex == CS_INDEX_NIGHT) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DAY;
|
||||
} else if (gSaveContext.save.cutsceneIndex == CS_INDEX_0) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DEFAULT;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
|
||||
} else if (gSaveContext.save.cutsceneIndex == CS_INDEX_1) {
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_0;
|
||||
} else if (gSaveContext.save.cutsceneIndex == CS_INDEX_2) {
|
||||
|
@ -368,7 +368,7 @@ void MapSelect_UpdateMenu(MapSelectState* this) {
|
|||
}
|
||||
|
||||
gSaveContext.save.nightFlag = 0;
|
||||
if (gSaveContext.save.cutsceneIndex == CS_INDEX_DEFAULT) {
|
||||
if (gSaveContext.save.cutsceneIndex == CS_INDEX_NIGHT) {
|
||||
gSaveContext.save.nightFlag = 1;
|
||||
}
|
||||
|
||||
|
@ -571,11 +571,11 @@ void MapSelect_PrintCutsceneSetting(MapSelectState* this, GfxPrint* printer, u16
|
|||
GfxPrint_SetColor(printer, 255, 255, 55, 255);
|
||||
|
||||
switch (csIndex) {
|
||||
case CS_INDEX_DEFAULT:
|
||||
case CS_INDEX_NIGHT:
|
||||
label = T(GFXP_HIRAGANA " ヨル " GFXP_KATAKANA "ゴロン", "Night");
|
||||
gSaveContext.save.dayTime = CLOCK_TIME(0, 0);
|
||||
break;
|
||||
case CS_INDEX_UNK_8000:
|
||||
case CS_INDEX_DAY:
|
||||
// clang-format off
|
||||
gSaveContext.save.dayTime = CLOCK_TIME(12, 0); label = T(GFXP_HIRAGANA "オヒル " GFXP_KATAKANA "ジャラ", "Day");
|
||||
// clang-format on
|
||||
|
@ -742,6 +742,6 @@ void MapSelect_Init(GameState* thisx) {
|
|||
DMA_REQUEST_SYNC(this->staticSegment, (uintptr_t)_z_select_staticSegmentRomStart, size, "../z_select.c", 1115);
|
||||
}
|
||||
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_UNK_8000;
|
||||
gSaveContext.save.cutsceneIndex = CS_INDEX_DAY;
|
||||
gSaveContext.save.linkAge = LINK_AGE_CHILD;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue