CS_INDEX_NONE is back

This commit is contained in:
Dragorn421 2025-06-02 08:12:11 +02:00
parent 54c25c77f9
commit 8baa7a75fc
No known key found for this signature in database
GPG Key ID: 381AEBAF3D429335
9 changed files with 26 additions and 25 deletions

View File

@ -414,7 +414,8 @@ typedef enum LinkAge {
// and "day" are leftover from the original meaning of the cutscene
// index (called "day_time"), and only map select uses these values
// to indicate time of day (to set gSaveContext.save.nightFlag).
#define CS_INDEX_NIGHT 0x0000
#define CS_INDEX_NONE 0x0000
#define CS_INDEX_NIGHT CS_INDEX_NONE
#define CS_INDEX_DAY 0x8000
// Values 0xFFF0-0xFFFF indicate that a cutscene script should be played.

View File

@ -616,7 +616,7 @@ void CutsceneCmd_Destination(PlayState* play, CutsceneContext* csCtx, CsCmdDesti
gSaveContext.forceRisingButtonAlphas = true;
}
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
gSaveContext.save.cutsceneIndex = CS_INDEX_NONE;
switch (cmd->destination) {
case CS_DEST_CUTSCENE_MAP_GANON_HORSE:
@ -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_NIGHT;
gSaveContext.save.cutsceneIndex = CS_INDEX_NONE;
gSaveContext.gameMode = GAMEMODE_NORMAL;
if (gUseCutsceneCam) {

View File

@ -2642,7 +2642,7 @@ void Environment_StopStormNatureAmbience(PlayState* play) {
void Environment_WarpSongLeave(PlayState* play) {
gWeatherMode = WEATHER_MODE_CLEAR;
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
gSaveContext.save.cutsceneIndex = CS_INDEX_NONE;
gSaveContext.respawnFlag = -3;
play->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_RETURN].entranceIndex;
play->transitionTrigger = TRANS_TRIGGER_START;

View File

@ -3564,7 +3564,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_NIGHT;
gSaveContext.save.cutsceneIndex = CS_INDEX_NONE;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.subTimerState = SUBTIMER_STATE_OFF;
@ -3902,7 +3902,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_NIGHT;
gSaveContext.save.cutsceneIndex = CS_INDEX_NONE;
Message_StartTextbox(play, 0x71B0, NULL);
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
} else {

View File

@ -354,7 +354,7 @@ void Play_Init(GameState* thisx) {
}
if (gSaveContext.save.cutsceneIndex == CS_INDEX_D) {
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
gSaveContext.save.cutsceneIndex = CS_INDEX_NONE;
}
if (gSaveContext.nextDayTime != NEXT_TIME_NONE) {

View File

@ -863,7 +863,7 @@ void Sram_InitSave(FileSelectState* fileSelect, SramContext* sramCtx) {
#if DEBUG_FEATURES
if (fileSelect->buttonIndex == 0) {
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
gSaveContext.save.cutsceneIndex = CS_INDEX_NONE;
}
#endif

View File

@ -522,7 +522,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_NIGHT;
gSaveContext.nextCutsceneIndex = CS_INDEX_NONE;
}
} else if (play->sceneId == SCENE_DEKU_TREE_BOSS) {
if (!Flags_GetEventChkInf(EVENTCHKINF_07)) {
@ -533,11 +533,11 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = CS_INDEX_1;
} else {
play->nextEntranceIndex = ENTR_KOKIRI_FOREST_11;
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
gSaveContext.nextCutsceneIndex = CS_INDEX_NONE;
}
} else if (play->sceneId == SCENE_JABU_JABU_BOSS) {
play->nextEntranceIndex = ENTR_ZORAS_FOUNTAIN_0;
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
gSaveContext.nextCutsceneIndex = CS_INDEX_NONE;
}
PRINTF(T("\n\n\nおわりおわり", "\n\n\nThe end The end"));
play->transitionTrigger = TRANS_TRIGGER_START;
@ -728,7 +728,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
SET_EVENTCHKINF(EVENTCHKINF_48);
Item_Give(play, ITEM_MEDALLION_FOREST);
play->nextEntranceIndex = ENTR_CHAMBER_OF_THE_SAGES_0;
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
gSaveContext.nextCutsceneIndex = CS_INDEX_NONE;
gSaveContext.chamberCutsceneNum = CHAMBER_CS_FOREST;
} else {
if (!LINK_IS_ADULT) {
@ -736,7 +736,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
} else {
play->nextEntranceIndex = ENTR_SACRED_FOREST_MEADOW_3;
}
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
gSaveContext.nextCutsceneIndex = CS_INDEX_NONE;
}
} else if (play->sceneId == SCENE_FIRE_TEMPLE_BOSS) {
if (!GET_EVENTCHKINF(EVENTCHKINF_49)) {
@ -750,14 +750,14 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
} else {
play->nextEntranceIndex = ENTR_DEATH_MOUNTAIN_CRATER_5;
}
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
gSaveContext.nextCutsceneIndex = CS_INDEX_NONE;
}
} 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_NIGHT;
gSaveContext.nextCutsceneIndex = CS_INDEX_NONE;
gSaveContext.chamberCutsceneNum = CHAMBER_CS_WATER;
} else {
if (!LINK_IS_ADULT) {
@ -765,13 +765,13 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
} else {
play->nextEntranceIndex = ENTR_LAKE_HYLIA_9;
}
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
gSaveContext.nextCutsceneIndex = CS_INDEX_NONE;
}
} 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_NIGHT;
gSaveContext.nextCutsceneIndex = CS_INDEX_NONE;
gSaveContext.chamberCutsceneNum = CHAMBER_CS_SPIRIT;
} else {
if (!LINK_IS_ADULT) {
@ -779,13 +779,13 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
} else {
play->nextEntranceIndex = ENTR_DESERT_COLOSSUS_8;
}
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
gSaveContext.nextCutsceneIndex = CS_INDEX_NONE;
}
} 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_NIGHT;
gSaveContext.nextCutsceneIndex = CS_INDEX_NONE;
gSaveContext.chamberCutsceneNum = CHAMBER_CS_SHADOW;
} else {
if (!LINK_IS_ADULT) {
@ -793,7 +793,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
} else {
play->nextEntranceIndex = ENTR_GRAVEYARD_8;
}
gSaveContext.nextCutsceneIndex = CS_INDEX_NIGHT;
gSaveContext.nextCutsceneIndex = CS_INDEX_NONE;
}
}
play->transitionTrigger = TRANS_TRIGGER_START;

View File

@ -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_NIGHT;
gSaveContext.save.cutsceneIndex = CS_INDEX_NONE;
play->nextEntranceIndex = ENTR_GERUDOS_FORTRESS_16;
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_BLACK, TCS_FAST);

View File

@ -121,7 +121,7 @@ s32 EnHorseGameCheck_DestroyIngoRace(EnHorseGameCheckBase* base, PlayState* play
}
void EnHorseGameCheck_FinishIngoRace(EnHorseGameCheckIngoRace* this, PlayState* play) {
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
gSaveContext.save.cutsceneIndex = CS_INDEX_NONE;
if (this->result == INGO_RACE_PLAYER_WIN) {
play->nextEntranceIndex = ENTR_LON_LON_RANCH_7;
if (GET_EVENTINF(EVENTINF_INGO_RACE_SECOND_RACE)) {
@ -308,20 +308,20 @@ 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_NIGHT;
gSaveContext.save.cutsceneIndex = CS_INDEX_NONE;
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_NIGHT;
gSaveContext.save.cutsceneIndex = CS_INDEX_NONE;
play->nextEntranceIndex = ENTR_LON_LON_RANCH_7;
play->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
play->transitionTrigger = TRANS_TRIGGER_START;
} else {
PRINTF(T("En_HGC_Spot20_Ta_end():対応せず\n", "En_HGC_Spot20_Ta_end(): not supported\n"));
gSaveContext.save.cutsceneIndex = CS_INDEX_NIGHT;
gSaveContext.save.cutsceneIndex = CS_INDEX_NONE;
play->nextEntranceIndex = ENTR_LON_LON_RANCH_0;
play->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
play->transitionTrigger = TRANS_TRIGGER_START;