From 7e9c5d428cba2a30eab325ff567a5220e635d94c Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Tue, 29 Nov 2022 18:30:52 -0500 Subject: [PATCH] Use gerudo fortress enum (#2040) Co-authored-by: briaguya --- soh/soh/Enhancements/presets.h | 2 +- soh/soh/Enhancements/randomizer/randomizer.cpp | 2 +- soh/src/code/z_sram.c | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/soh/soh/Enhancements/presets.h b/soh/soh/Enhancements/presets.h index 02768cb86..64615914a 100644 --- a/soh/soh/Enhancements/presets.h +++ b/soh/soh/Enhancements/presets.h @@ -556,7 +556,7 @@ const std::vector s6PresetEntries = { PRESET_ENTRY_STRING("gRandomizeExcludedLocations", "48,"), PRESET_ENTRY_S32("gRandomizeForest", 1), PRESET_ENTRY_S32("gRandomizeGanonTrial", 0), - PRESET_ENTRY_S32("gRandomizeGerudoFortress", 1), + PRESET_ENTRY_S32("gRandomizeGerudoFortress", RO_GF_FAST), PRESET_ENTRY_S32("gRandomizeIceTraps", 0), PRESET_ENTRY_S32("gRandomizeKakarikoGate", 1), PRESET_ENTRY_S32("gRandomizeMedallionCount", 6), diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 72055d921..fd54c2e29 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -2565,7 +2565,7 @@ void GenerateRandomizerImgui() { cvarSettings[RSK_DOOR_OF_TIME] = CVar_GetS32("gRandomizeDoorOfTime", RO_DOOROFTIME_CLOSED); cvarSettings[RSK_ZORAS_FOUNTAIN] = CVar_GetS32("gRandomizeZorasFountain", 0); cvarSettings[RSK_STARTING_AGE] = CVar_GetS32("gRandomizeStartingAge", 0); - cvarSettings[RSK_GERUDO_FORTRESS] = CVar_GetS32("gRandomizeGerudoFortress", 0); + cvarSettings[RSK_GERUDO_FORTRESS] = CVar_GetS32("gRandomizeGerudoFortress", RO_GF_NORMAL); cvarSettings[RSK_RAINBOW_BRIDGE] = CVar_GetS32("gRandomizeRainbowBridge", 0); cvarSettings[RSK_RAINBOW_BRIDGE_STONE_COUNT] = CVar_GetS32("gRandomizeStoneCount", 3); cvarSettings[RSK_RAINBOW_BRIDGE_MEDALLION_COUNT] = CVar_GetS32("gRandomizeMedallionCount", 6); diff --git a/soh/src/code/z_sram.c b/soh/src/code/z_sram.c index 9cdc54b01..822852bd6 100644 --- a/soh/src/code/z_sram.c +++ b/soh/src/code/z_sram.c @@ -539,8 +539,8 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) { // skip verbose lake owl, skip to "i'm on my way back to the castle" gSaveContext.infTable[25] |= 0x20; - // fast gerudo fortress - if (Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == 1 || Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == 2) { + if (Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == RO_GF_FAST || + Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == RO_GF_OPEN) { gSaveContext.eventChkInf[9] |= 2; gSaveContext.eventChkInf[9] |= 4; gSaveContext.eventChkInf[9] |= 8; @@ -558,8 +558,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) { gSaveContext.sceneFlags[12].collect |= (1 << 0x0F); } - // open gerudo fortress - if (Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == 2) { + if (Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == RO_GF_OPEN) { gSaveContext.eventChkInf[9] |= 1; gSaveContext.sceneFlags[12].swch |= (1 << 0x01); gSaveContext.sceneFlags[12].swch |= (1 << 0x05);