Skip cutscenes for DOT and Rainbow bridge in rando (#1908)

This commit is contained in:
Garrett Cox 2022-11-04 20:47:13 -05:00 committed by GitHub
parent a40b7180d9
commit 960c2732e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 37 deletions

View File

@ -97,46 +97,50 @@ void BgGjyoBridge_TriggerCutscene(BgGjyoBridge* this, GlobalContext* globalCtx)
int bridgeDungeonCount = Randomizer_GetSettingValue(RSK_RAINBOW_BRIDGE_DUNGEON_COUNT);
int bridgeTokenCount = Randomizer_GetSettingValue(RSK_RAINBOW_BRIDGE_TOKEN_COUNT);
if (CheckPlayerPosition(player, globalCtx)) {
switch (bridge) {
case 1:
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) &&
(INV_CONTENT(ITEM_ARROW_LIGHT) == ITEM_ARROW_LIGHT)) {
LaunchBridgeCutscene(this, globalCtx);
}
break;
case 2:
if (CheckStoneCount() >= bridgeStoneCount) {
LaunchBridgeCutscene(this, globalCtx);
}
break;
case 3:
if (CheckMedallionCount() >= bridgeMedallionCount) {
LaunchBridgeCutscene(this, globalCtx);
}
break;
case 4:
if ((CheckMedallionCount() + CheckStoneCount()) >= bridgeRewardCount) {
LaunchBridgeCutscene(this, globalCtx);
}
break;
case 5:
if (CheckDungeonCount() >= bridgeDungeonCount) {
LaunchBridgeCutscene(this, globalCtx);
}
break;
case 6:
if (gSaveContext.inventory.gsTokens >= bridgeTokenCount) {
LaunchBridgeCutscene(this, globalCtx);
}
break;
}
switch (bridge) {
case 1:
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) &&
(INV_CONTENT(ITEM_ARROW_LIGHT) == ITEM_ARROW_LIGHT)) {
this->actionFunc = BgGjyoBridge_SpawnBridge;
func_800F595C(NA_BGM_BRIDGE_TO_GANONS);
}
break;
case 2:
if (CheckStoneCount() >= bridgeStoneCount) {
this->actionFunc = BgGjyoBridge_SpawnBridge;
func_800F595C(NA_BGM_BRIDGE_TO_GANONS);
}
break;
case 3:
if (CheckMedallionCount() >= bridgeMedallionCount) {
this->actionFunc = BgGjyoBridge_SpawnBridge;
func_800F595C(NA_BGM_BRIDGE_TO_GANONS);
}
break;
case 4:
if ((CheckMedallionCount() + CheckStoneCount()) >= bridgeRewardCount) {
this->actionFunc = BgGjyoBridge_SpawnBridge;
func_800F595C(NA_BGM_BRIDGE_TO_GANONS);
}
break;
case 5:
if (CheckDungeonCount() >= bridgeDungeonCount) {
this->actionFunc = BgGjyoBridge_SpawnBridge;
func_800F595C(NA_BGM_BRIDGE_TO_GANONS);
}
break;
case 6:
if (gSaveContext.inventory.gsTokens >= bridgeTokenCount) {
this->actionFunc = BgGjyoBridge_SpawnBridge;
func_800F595C(NA_BGM_BRIDGE_TO_GANONS);
}
break;
}
}
}
void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, GlobalContext* globalCtx) {
if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[2] != NULL) &&
if (gSaveContext.n64ddFlag || (globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[2] != NULL) &&
(globalCtx->csCtx.npcActions[2]->action == 2)) {
this->dyna.actor.draw = BgGjyoBridge_Draw;
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);

View File

@ -265,11 +265,13 @@ void func_80ABF4C8(EnOkarinaTag* this, GlobalContext* globalCtx) {
func_80078884(NA_SE_SY_OCARINA_ERROR);
break;
} else {
Flags_SetEnv(globalCtx, 2);
func_80078884(NA_SE_SY_CORRECT_CHIME);
}
} else {
globalCtx->csCtx.segment = D_80ABFB40;
gSaveContext.cutsceneTrigger = 1;
}
globalCtx->csCtx.segment = D_80ABFB40;
gSaveContext.cutsceneTrigger = 1;
break;
case 6:
// Don't start the cutscene in a rando save.