Skip to content

Commit

Permalink
Another round of fixes for skip intro and grotto rando (HarbourMaster…
Browse files Browse the repository at this point in the history
  • Loading branch information
Archez authored Jul 26, 2024
1 parent e66dada commit b81a3dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion soh/soh/Enhancements/TimeSavers/SkipCutscene/SkipIntro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ void SkipIntro_Register() {
bool shuffleOverworldSpawns =
OTRGlobals::Instance->gRandoContext->GetOption(RSK_SHUFFLE_OVERWORLD_SPAWNS).Is(true);
if ((CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Intro"), IS_RANDO) ||
(IS_RANDO && (adultStart || shuffleOverworldSpawns)) && gSaveContext.cutsceneIndex == 0xFFF1)) {
(IS_RANDO && (adultStart || shuffleOverworldSpawns))) &&
gSaveContext.cutsceneIndex == 0xFFF1) {
// Calculate spawn location. Start with vanilla, Link's house.
int32_t spawnEntrance = ENTR_LINKS_HOUSE_0;
// If we're not in rando, we can skip all of the below.
Expand Down
8 changes: 4 additions & 4 deletions soh/soh/Enhancements/randomizer/randomizer_grotto.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ s16 Grotto_GetEntranceValueHandlingGrottoRando(s16 nextEntranceIndex) {
nextEntranceIndex = grottoExitList[grottoId];
}

// Get the new grotto id from the next entrance
grottoId = nextEntranceIndex & 0x00FF;
// Get the new grotto id from the next entrance, temp value to override modifying the static one
s8 tempGrottoId = nextEntranceIndex & 0x00FF;

// Grotto Returns
if (nextEntranceIndex >= ENTRANCE_RANDO_GROTTO_EXIT_START && nextEntranceIndex < ENTRANCE_RANDO_GROTTO_EXIT_START + NUM_GROTTOS) {
GrottoReturnInfo grotto = grottoReturnTable[grottoId];
GrottoReturnInfo grotto = grottoReturnTable[tempGrottoId];

// When the nextEntranceIndex is determined by a dynamic exit,
// or set by Entrance_OverrideBlueWarp to mark a blue warp entrance,
Expand All @@ -162,7 +162,7 @@ s16 Grotto_GetEntranceValueHandlingGrottoRando(s16 nextEntranceIndex) {
}
// Grotto Loads
} else if (nextEntranceIndex >= ENTRANCE_RANDO_GROTTO_LOAD_START && nextEntranceIndex < ENTRANCE_RANDO_GROTTO_EXIT_START) {
GrottoLoadInfo grotto = grottoLoadTable[grottoId];
GrottoLoadInfo grotto = grottoLoadTable[tempGrottoId];
nextEntranceIndex = grotto.entranceIndex;
}

Expand Down

0 comments on commit b81a3dd

Please sign in to comment.