diff options
| author | briaguya <70942617+briaguya-ai@users.noreply.github.com> | 2022-12-06 00:37:07 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-06 00:37:07 -0500 |
| commit | d03e876289ef4ebac7f9a17f1bb37628bc4e0584 (patch) | |
| tree | 398f3e089af4bd90a1db6ee1578e29cbe045d507 | |
| parent | 4ee0ddaa15c2ee2b3a29a005030696ce90b84684 (diff) | |
use enum for logic (#2098)
Co-authored-by: briaguya <briaguya@alice>
| -rw-r--r-- | soh/soh/Enhancements/randomizer/3drando/settings.cpp | 4 | ||||
| -rw-r--r-- | soh/soh/Enhancements/randomizer/randomizer.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/soh/soh/Enhancements/randomizer/3drando/settings.cpp b/soh/soh/Enhancements/randomizer/3drando/settings.cpp index 1a53d1635..d6cb80c79 100644 --- a/soh/soh/Enhancements/randomizer/3drando/settings.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/settings.cpp @@ -2507,10 +2507,10 @@ namespace Settings { // RANDTODO: Switch this back once all logic options are implemented // Logic.SetSelectedIndex(cvarSettings[RSK_LOGIC_RULES]); switch (cvarSettings[RSK_LOGIC_RULES]) { - case 0: + case RO_LOGIC_GLITCHLESS: Logic.SetSelectedIndex(0); break; - case 1: + case RO_LOGIC_NO_LOGIC: Logic.SetSelectedIndex(2); break; } diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index db0027eef..085b74f0e 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -2560,7 +2560,7 @@ void GenerateRandomizerImgui() { CVar_Save(); std::unordered_map<RandomizerSettingKey, u8> cvarSettings; - cvarSettings[RSK_LOGIC_RULES] = CVar_GetS32("gRandomizeLogicRules", 0); + cvarSettings[RSK_LOGIC_RULES] = CVar_GetS32("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS); 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); @@ -2890,7 +2890,7 @@ void DrawRandoEditor(bool& open) { //Starting Age //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 + bool disableRandoStartingAge = (CVar_GetS32("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) == RO_LOGIC_GLITCHLESS) && ((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 |
