diff --git a/soh/soh/Enhancements/presets.h b/soh/soh/Enhancements/presets.h index 7d190be11..4c9897701 100644 --- a/soh/soh/Enhancements/presets.h +++ b/soh/soh/Enhancements/presets.h @@ -554,7 +554,7 @@ const std::vector s6PresetEntries = { PRESET_ENTRY_S32("gRandomizeCuccosToReturn", 4), PRESET_ENTRY_S32("gRandomizeDoorOfTime", RO_DOOROFTIME_OPEN), PRESET_ENTRY_STRING("gRandomizeExcludedLocations", "48,"), - PRESET_ENTRY_S32("gRandomizeForest", 1), + PRESET_ENTRY_S32("gRandomizeForest", RO_FOREST_CLOSED_DEKU), PRESET_ENTRY_S32("gRandomizeGanonTrial", 0), PRESET_ENTRY_S32("gRandomizeGerudoFortress", RO_GF_FAST), PRESET_ENTRY_S32("gRandomizeIceTraps", RO_ICE_TRAPS_OFF), @@ -590,7 +590,7 @@ const std::vector hellModePresetEntries = { PRESET_ENTRY_S32("gRandomizeDoorOfTime", RO_DOOROFTIME_OPEN), PRESET_ENTRY_S32("gRandomizeEnableBombchuDrops", 1), PRESET_ENTRY_S32("gRandomizeEnableGlitchCutscenes", 1), - PRESET_ENTRY_S32("gRandomizeForest", 2), + PRESET_ENTRY_S32("gRandomizeForest", RO_FOREST_OPEN), PRESET_ENTRY_S32("gRandomizeGanonTrial", 2), PRESET_ENTRY_S32("gRandomizeGanonTrialCount", 6), PRESET_ENTRY_S32("gRandomizeGerudoKeys", 3), diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 16b4acb9a..91ff2622a 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -596,9 +596,9 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) { if(it.value() == "Closed") { gSaveContext.randoSettings[index].value = RO_FOREST_CLOSED; } else if(it.value() == "Open") { - gSaveContext.randoSettings[index].value = RO_FOREST_CLOSED_DEKU; - } else if(it.value() == "Closed Deku") { gSaveContext.randoSettings[index].value = RO_FOREST_OPEN; + } else if(it.value() == "Closed Deku") { + gSaveContext.randoSettings[index].value = RO_FOREST_CLOSED_DEKU; } break; case RSK_KAK_GATE: @@ -2566,7 +2566,7 @@ void GenerateRandomizerImgui() { std::unordered_map cvarSettings; cvarSettings[RSK_LOGIC_RULES] = CVar_GetS32("gRandomizeLogicRules", 0); - cvarSettings[RSK_FOREST] = CVar_GetS32("gRandomizeForest", 0); + cvarSettings[RSK_FOREST] = CVar_GetS32("gRandomizeForest", RO_FOREST_CLOSED); cvarSettings[RSK_KAK_GATE] = CVar_GetS32("gRandomizeKakarikoGate", RO_KAK_GATE_CLOSED); cvarSettings[RSK_DOOR_OF_TIME] = CVar_GetS32("gRandomizeDoorOfTime", RO_DOOROFTIME_CLOSED); cvarSettings[RSK_ZORAS_FOUNTAIN] = CVar_GetS32("gRandomizeZorasFountain", 0); @@ -2896,7 +2896,7 @@ void DrawRandoEditor(bool& open) { //Disabled when Forest is set to Closed or under very specific conditions //RANDOTODO: Replace magic number checks with enums bool disableRandoStartingAge = (CVar_GetS32("gRandomizeLogicRules", 0) == 0) && // glitchless logic - ((CVar_GetS32("gRandomizeForest", 0) == 0) || // Closed Forest + ((CVar_GetS32("gRandomizeForest", RO_FOREST_CLOSED) == RO_FOREST_CLOSED) || ((CVar_GetS32("gRandomizeDoorOfTime", RO_DOOROFTIME_CLOSED) == RO_DOOROFTIME_CLOSED) && (CVar_GetS32("gRandomizeShuffleOcarinas", 0) == 0))); // ocarinas not shuffled diff --git a/soh/src/code/z_sram.c b/soh/src/code/z_sram.c index e3f080e67..5fb913083 100644 --- a/soh/src/code/z_sram.c +++ b/soh/src/code/z_sram.c @@ -372,15 +372,15 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) { int openForest = Randomizer_GetSettingValue(RSK_FOREST); switch (openForest) { - case 0: // closed + case RO_FOREST_CLOSED: break; - case 1: // open + case RO_FOREST_CLOSED_DEKU: + Flags_SetEventChkInf(7); + break; + case RO_FOREST_OPEN: Flags_SetEventChkInf(7); gSaveContext.eventChkInf[0] |= 0x10; break; - case 2: // closed deku - Flags_SetEventChkInf(7); - break; } int startingAge = Randomizer_GetSettingValue(RSK_STARTING_AGE); diff --git a/soh/src/overlays/actors/ovl_En_Md/z_en_md.c b/soh/src/overlays/actors/ovl_En_Md/z_en_md.c index 99dd5605c..82d56124a 100644 --- a/soh/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/soh/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -487,7 +487,6 @@ u8 EnMd_ShouldSpawn(EnMd* this, PlayState* play) { // if we have beaten deku tree or have open forest turned on // or have already shown mido we have an equipped sword/shield if (Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE) || - Randomizer_GetSettingValue(RSK_FOREST) == 1 || gSaveContext.eventChkInf[0] & 0x10) { return 0; }