diff --git a/soh/soh/Enhancements/audio/AudioCollection.cpp b/soh/soh/Enhancements/audio/AudioCollection.cpp index 415049bbe1e..d637758a822 100644 --- a/soh/soh/Enhancements/audio/AudioCollection.cpp +++ b/soh/soh/Enhancements/audio/AudioCollection.cpp @@ -331,12 +331,12 @@ AudioCollection::AudioCollection() { } std::string AudioCollection::GetCvarKey(std::string sfxKey) { - auto prefix = AUDIO_CVAR("ReplacedSequences."); + auto prefix = CVAR_AUDIO("ReplacedSequences."); return prefix + sfxKey + ".value"; } std::string AudioCollection::GetCvarLockKey(std::string sfxKey) { - auto prefix = std::string(AUDIO_CVAR("ReplacedSequences.")); + auto prefix = std::string(CVAR_AUDIO("ReplacedSequences.")); return prefix + sfxKey + ".locked"; } @@ -365,7 +365,7 @@ uint16_t AudioCollection::GetReplacementSequence(uint16_t seqId) { // for Hyrule Field instead. Otherwise, leave it alone, so that without any sfx editor modifications we will // play the normal track as usual. if (seqId == NA_BGM_FIELD_MORNING) { - if (CVarGetInteger(AUDIO_CVAR("ReplacedSequences.NA_BGM_FIELD_LOGIC.value"), NA_BGM_FIELD_LOGIC) != NA_BGM_FIELD_LOGIC) { + if (CVarGetInteger(CVAR_AUDIO("ReplacedSequences.NA_BGM_FIELD_LOGIC.value"), NA_BGM_FIELD_LOGIC) != NA_BGM_FIELD_LOGIC) { seqId = NA_BGM_FIELD_LOGIC; } } @@ -384,7 +384,7 @@ uint16_t AudioCollection::GetReplacementSequence(uint16_t seqId) { } void AudioCollection::RemoveFromShufflePool(SequenceInfo* seqInfo) { - const std::string cvarKey = std::string(AUDIO_CVAR("Excluded.")) + seqInfo->sfxKey; + const std::string cvarKey = std::string(CVAR_AUDIO("Excluded.")) + seqInfo->sfxKey; excludedSequences.insert(seqInfo); includedSequences.erase(seqInfo); CVarSetInteger(cvarKey.c_str(), 1); @@ -392,7 +392,7 @@ void AudioCollection::RemoveFromShufflePool(SequenceInfo* seqInfo) { } void AudioCollection::AddToShufflePool(SequenceInfo* seqInfo) { - const std::string cvarKey = std::string(AUDIO_CVAR("Excluded.")) + seqInfo->sfxKey; + const std::string cvarKey = std::string(CVAR_AUDIO("Excluded.")) + seqInfo->sfxKey; includedSequences.insert(seqInfo); excludedSequences.erase(seqInfo); CVarClear(cvarKey.c_str()); @@ -404,7 +404,7 @@ void AudioCollection::InitializeShufflePool() { for (auto& [seqId, seqInfo] : sequenceMap) { if (!seqInfo.canBeUsedAsReplacement) continue; - const std::string cvarKey = std::string(AUDIO_CVAR("Excluded.")) + seqInfo.sfxKey; + const std::string cvarKey = std::string(CVAR_AUDIO("Excluded.")) + seqInfo.sfxKey; if (CVarGetInteger(cvarKey.c_str(), 0)) { excludedSequences.insert(&seqInfo); } else { diff --git a/soh/soh/Enhancements/audio/AudioEditor.cpp b/soh/soh/Enhancements/audio/AudioEditor.cpp index e809ce7858f..e27de6b5686 100644 --- a/soh/soh/Enhancements/audio/AudioEditor.cpp +++ b/soh/soh/Enhancements/audio/AudioEditor.cpp @@ -163,17 +163,17 @@ void DrawPreviewButton(uint16_t sequenceId, std::string sfxKey, SeqType sequence const std::string stopButton = ICON_FA_STOP + hiddenKey; const std::string previewButton = ICON_FA_PLAY + hiddenKey; - if (CVarGetInteger(AUDIO_CVAR("Playing"), 0) == sequenceId) { + if (CVarGetInteger(CVAR_AUDIO("Playing"), 0) == sequenceId) { if (ImGui::Button(stopButton.c_str())) { func_800F5C2C(); - CVarSetInteger(AUDIO_CVAR("Playing"), 0); + CVarSetInteger(CVAR_AUDIO("Playing"), 0); } UIWidgets::Tooltip("Stop Preview"); } else { if (ImGui::Button(previewButton.c_str())) { - if (CVarGetInteger(AUDIO_CVAR("Playing"), 0) != 0) { + if (CVarGetInteger(CVAR_AUDIO("Playing"), 0) != 0) { func_800F5C2C(); - CVarSetInteger(AUDIO_CVAR("Playing"), 0); + CVarSetInteger(CVAR_AUDIO("Playing"), 0); } else { if (sequenceType == SEQ_SFX || sequenceType == SEQ_VOICE) { Audio_PlaySoundGeneral(sequenceId, &pos, 4, &freqScale, &freqScale, &reverbAdd); @@ -183,7 +183,7 @@ void DrawPreviewButton(uint16_t sequenceId, std::string sfxKey, SeqType sequence } else { // TODO: Cant do both here, so have to click preview button twice PreviewSequence(sequenceId); - CVarSetInteger(AUDIO_CVAR("Playing"), sequenceId); + CVarSetInteger(CVAR_AUDIO("Playing"), sequenceId); } } } @@ -411,7 +411,7 @@ void DrawTypeChip(SeqType type) { void AudioEditorRegisterOnSceneInitHook() { GameInteractor::Instance->RegisterGameHook([](int16_t sceneNum) { - if (CVarGetInteger(AUDIO_CVAR("RandomizeAllOnNewScene"), 0)) { + if (CVarGetInteger(CVAR_AUDIO("RandomizeAllOnNewScene"), 0)) { AudioEditor_RandomizeAll(); } }); @@ -492,18 +492,18 @@ void AudioEditor::DrawElement() { ImGui::TableNextColumn(); if (ImGui::BeginChild("SfxOptions", ImVec2(0, -8))) { ImGui::PushItemWidth(-FLT_MIN); - UIWidgets::EnhancementCheckbox("Disable Enemy Proximity Music", AUDIO_CVAR("EnemyBGMDisable")); + UIWidgets::EnhancementCheckbox("Disable Enemy Proximity Music", CVAR_AUDIO("EnemyBGMDisable")); UIWidgets::InsertHelpHoverText( "Disables the music change when getting close to enemies. Useful for hearing " "your custom music for each scene more often."); - UIWidgets::EnhancementCheckbox("Disable Leading Music in Lost Woods", AUDIO_CVAR("LostWoodsConsistentVolume")); + UIWidgets::EnhancementCheckbox("Disable Leading Music in Lost Woods", CVAR_AUDIO("LostWoodsConsistentVolume")); UIWidgets::InsertHelpHoverText( "Disables the volume shifting in the Lost Woods. Useful for hearing " "your custom music in the Lost Woods if you don't need the navigation assitance " "the volume changing provides. If toggling this while in the Lost Woods, reload " "the area for the effect to kick in." ); - UIWidgets::EnhancementCheckbox("Display Sequence Name on Overlay", AUDIO_CVAR("SeqNameOverlay")); + UIWidgets::EnhancementCheckbox("Display Sequence Name on Overlay", CVAR_AUDIO("SeqNameOverlay")); UIWidgets::InsertHelpHoverText( "Displays the name of the current sequence in the corner of the screen whenever a new sequence " "is loaded to the main sequence player (does not apply to fanfares or enemy BGM)." @@ -511,28 +511,28 @@ void AudioEditor::DrawElement() { ImGui::SameLine(); ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x); UIWidgets::EnhancementSliderInt("Overlay Duration: %d seconds", "##SeqNameOverlayDuration", - AUDIO_CVAR("SeqNameOverlayDuration"), 1, 10, "", 5); + CVAR_AUDIO("SeqNameOverlayDuration"), 1, 10, "", 5); ImGui::PopItemWidth(); ImGui::NewLine(); ImGui::PopItemWidth(); UIWidgets::EnhancementSliderFloat("Link's voice pitch multiplier: %.1f %%", "##linkVoiceFreqMultiplier", - AUDIO_CVAR("LinkVoiceFreqMultiplier"), 0.4, 2.5, "", 1.0, true, true); + CVAR_AUDIO("LinkVoiceFreqMultiplier"), 0.4, 2.5, "", 1.0, true, true); ImGui::SameLine(); const std::string resetButton = "Reset##linkVoiceFreqMultiplier"; if (ImGui::Button(resetButton.c_str())) { - CVarSetFloat(AUDIO_CVAR("LinkVoiceFreqMultiplier"), 1.0f); + CVarSetFloat(CVAR_AUDIO("LinkVoiceFreqMultiplier"), 1.0f); LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } ImGui::NewLine(); - UIWidgets::EnhancementCheckbox("Randomize All Music and Sound Effects on New Scene", AUDIO_CVAR("RandomizeAllOnNewScene")); + UIWidgets::EnhancementCheckbox("Randomize All Music and Sound Effects on New Scene", CVAR_AUDIO("RandomizeAllOnNewScene")); UIWidgets::Tooltip("Enables randomizing all unlocked music and sound effects when you enter a new scene."); ImGui::NewLine(); ImGui::PushItemWidth(-FLT_MIN); UIWidgets::PaddedSeparator(); UIWidgets::PaddedText("The following options are experimental and may cause music\nto sound odd or have other undesireable effects."); - UIWidgets::EnhancementCheckbox("Lower Octaves of Unplayable High Notes", AUDIO_CVAR("ExperimentalOctaveDrop")); + UIWidgets::EnhancementCheckbox("Lower Octaves of Unplayable High Notes", CVAR_AUDIO("ExperimentalOctaveDrop")); UIWidgets::InsertHelpHoverText("Some custom sequences may have notes that are too high for the game's audio " "engine to play. Enabling this checkbox will cause these notes to drop a " "couple of octaves so they can still harmonize with the other notes of the " diff --git a/soh/soh/Enhancements/controls/InputViewer.cpp b/soh/soh/Enhancements/controls/InputViewer.cpp index 084383bbdf4..fb476e9aac7 100644 --- a/soh/soh/Enhancements/controls/InputViewer.cpp +++ b/soh/soh/Enhancements/controls/InputViewer.cpp @@ -60,7 +60,7 @@ void InputViewer::RenderButton(std::string btnTexture, std::string btnOutlineTex } void InputViewer::DrawElement() { - if (CVarGetInteger(WINDOW_CVAR("InputViewer"), 0)) { + if (CVarGetInteger(CVAR_WINDOW("InputViewer"), 0)) { static bool sButtonTexturesLoaded = false; if (!sButtonTexturesLoaded) { LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage( diff --git a/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp b/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp index ed86a59e9b0..02781bf049a 100644 --- a/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp +++ b/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp @@ -1680,7 +1680,7 @@ void SohInputEditorWindow::DrawMiscControlPanel() { UIWidgets::Tooltip("Allows the cursor on the pause menu to be over any slot. Sometimes required in rando to select " "certain items."); UIWidgets::Spacer(0); - ImGui::BeginDisabled(CVarGetInteger(SETTING_CVAR("DisableChanges"), 0)); + ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0)); UIWidgets::PaddedEnhancementCheckbox("Enable speed modifiers", "gEnableWalkModify", true, false); UIWidgets::Tooltip("Hold the assigned button to change the maximum walking or swimming speed"); if (CVarGetInteger("gEnableWalkModify", 0)) { @@ -1839,7 +1839,7 @@ void SohInputEditorWindow::DrawLinkTab() { } void SohInputEditorWindow::DrawIvanTab() { - if (CVarGetInteger("gDebugEnabled", 0)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) { DrawDebugPortTab(1, "Ivan (P2)"); return; } @@ -2246,7 +2246,7 @@ void SohInputEditorWindow::DrawElement() { ImGui::BeginTabBar("##ControllerConfigPortTabs"); DrawLinkTab(); DrawIvanTab(); - if (CVarGetInteger("gDebugEnabled", 0)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) { DrawDebugPortTab(2); DrawDebugPortTab(3); } diff --git a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp index 0ec469fe01a..0b0f94f21ae 100644 --- a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp +++ b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp @@ -1345,7 +1345,7 @@ void Reset_Option_Double(const char* Button_Title, const char* name) { } } void DrawSillyTab() { - ImGui::BeginDisabled(CVarGetInteger(SETTING_CVAR("DisableChanges"), 0)); + ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0)); if (CVarGetInteger("gLetItSnow", 0)) { if (UIWidgets::EnhancementCheckbox("Let It Snow", "gLetItSnow")) { LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_Remote.cpp b/soh/soh/Enhancements/game-interactor/GameInteractor_Remote.cpp index 7a3f96f14a8..1d933d8d277 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor_Remote.cpp +++ b/soh/soh/Enhancements/game-interactor/GameInteractor_Remote.cpp @@ -17,7 +17,7 @@ void GameInteractor::EnableRemoteInteractor() { return; } - if (SDLNet_ResolveHost(&remoteIP, CVarGetString(REMOTE_CVAR("IP"), "127.0.0.1"), CVarGetInteger(REMOTE_CVAR("Port"), 43384)) == -1) { + if (SDLNet_ResolveHost(&remoteIP, CVarGetString(CVAR_REMOTE("IP"), "127.0.0.1"), CVarGetInteger(CVAR_REMOTE("Port"), 43384)) == -1) { SPDLOG_ERROR("[GameInteractor] SDLNet_ResolveHost: {}", SDLNet_GetError()); } diff --git a/soh/soh/Enhancements/mods.cpp b/soh/soh/Enhancements/mods.cpp index f638787110d..b32e7d798ed 100644 --- a/soh/soh/Enhancements/mods.cpp +++ b/soh/soh/Enhancements/mods.cpp @@ -66,7 +66,7 @@ void ReloadSceneTogglingLinkAge() { void RegisterInfiniteMoney() { GameInteractor::Instance->RegisterGameHook([]() { if (!GameInteractor::IsSaveLoaded(true)) return; - if (CVarGetInteger(CHEAT_CVAR("InfiniteMoney"), 0) != 0) { + if (CVarGetInteger(CVAR_CHEAT("InfiniteMoney"), 0) != 0) { if (gSaveContext.rupees < CUR_CAPACITY(UPG_WALLET)) { gSaveContext.rupees = CUR_CAPACITY(UPG_WALLET); } @@ -77,7 +77,7 @@ void RegisterInfiniteMoney() { void RegisterInfiniteHealth() { GameInteractor::Instance->RegisterGameHook([]() { if (!GameInteractor::IsSaveLoaded(true)) return; - if (CVarGetInteger(CHEAT_CVAR("InfiniteHealth"), 0) != 0) { + if (CVarGetInteger(CVAR_CHEAT("InfiniteHealth"), 0) != 0) { if (gSaveContext.health < gSaveContext.healthCapacity) { gSaveContext.health = gSaveContext.healthCapacity; } @@ -88,7 +88,7 @@ void RegisterInfiniteHealth() { void RegisterInfiniteAmmo() { GameInteractor::Instance->RegisterGameHook([]() { if (!GameInteractor::IsSaveLoaded(true)) return; - if (CVarGetInteger(CHEAT_CVAR("InfiniteAmmo"), 0) != 0) { + if (CVarGetInteger(CVAR_CHEAT("InfiniteAmmo"), 0) != 0) { // Deku Sticks if (AMMO(ITEM_STICK) < CUR_CAPACITY(UPG_STICKS)) { AMMO(ITEM_STICK) = CUR_CAPACITY(UPG_STICKS); @@ -125,7 +125,7 @@ void RegisterInfiniteAmmo() { void RegisterInfiniteMagic() { GameInteractor::Instance->RegisterGameHook([]() { if (!GameInteractor::IsSaveLoaded(true)) return; - if (CVarGetInteger(CHEAT_CVAR("InfiniteMagic"), 0) != 0) { + if (CVarGetInteger(CVAR_CHEAT("InfiniteMagic"), 0) != 0) { if (gSaveContext.isMagicAcquired && gSaveContext.magic != (gSaveContext.isDoubleMagicAcquired + 1) * 0x30) { gSaveContext.magic = (gSaveContext.isDoubleMagicAcquired + 1) * 0x30; } @@ -136,7 +136,7 @@ void RegisterInfiniteMagic() { void RegisterInfiniteNayrusLove() { GameInteractor::Instance->RegisterGameHook([]() { if (!GameInteractor::IsSaveLoaded(true)) return; - if (CVarGetInteger(CHEAT_CVAR("InfiniteNayru"), 0) != 0) { + if (CVarGetInteger(CVAR_CHEAT("InfiniteNayru"), 0) != 0) { gSaveContext.nayrusLoveTimer = 0x44B; } }); @@ -146,7 +146,7 @@ void RegisterMoonJumpOnL() { GameInteractor::Instance->RegisterGameHook([]() { if (!GameInteractor::IsSaveLoaded(true)) return; - if (CVarGetInteger(CHEAT_CVAR("MoonJumpOnL"), 0) != 0) { + if (CVarGetInteger(CVAR_CHEAT("MoonJumpOnL"), 0) != 0) { Player* player = GET_PLAYER(gPlayState); if (CHECK_BTN_ANY(gPlayState->state.input[0].cur.button, BTN_L)) { @@ -161,7 +161,7 @@ void RegisterInfiniteISG() { GameInteractor::Instance->RegisterGameHook([]() { if (!GameInteractor::IsSaveLoaded(true)) return; - if (CVarGetInteger(CHEAT_CVAR("EasyISG"), 0) != 0) { + if (CVarGetInteger(CVAR_CHEAT("EasyISG"), 0) != 0) { Player* player = GET_PLAYER(gPlayState); player->meleeWeaponState = 1; } @@ -173,7 +173,7 @@ void RegisterEzQPA() { GameInteractor::Instance->RegisterGameHook([]() { if (!GameInteractor::IsSaveLoaded(true)) return; - if (CVarGetInteger(CHEAT_CVAR("EasyQPA"), 0) != 0) { + if (CVarGetInteger(CVAR_CHEAT("EasyQPA"), 0) != 0) { Player* player = GET_PLAYER(gPlayState); player->meleeWeaponQuads[0].info.toucher.dmgFlags = 0x16171617; player->meleeWeaponQuads[1].info.toucher.dmgFlags = 0x16171617; @@ -185,7 +185,7 @@ void RegisterUnrestrictedItems() { GameInteractor::Instance->RegisterGameHook([]() { if (!GameInteractor::IsSaveLoaded(true)) return; - if (CVarGetInteger(CHEAT_CVAR("NoRestrictItems"), 0) != 0) { + if (CVarGetInteger(CVAR_CHEAT("NoRestrictItems"), 0) != 0) { u8 sunsBackup = gPlayState->interfaceCtx.restrictions.sunsSong; memset(&gPlayState->interfaceCtx.restrictions, 0, sizeof(gPlayState->interfaceCtx.restrictions)); gPlayState->interfaceCtx.restrictions.sunsSong = sunsBackup; @@ -195,7 +195,7 @@ void RegisterUnrestrictedItems() { void RegisterFreezeTime() { GameInteractor::Instance->RegisterGameHook([]() { - if (CVarGetInteger(CHEAT_CVAR("FreezeTime"), 0) != 0) { + if (CVarGetInteger(CVAR_CHEAT("FreezeTime"), 0) != 0) { if (CVarGetInteger("gPrevTime", -1) == -1) { CVarSetInteger("gPrevTime", gSaveContext.dayTime); } @@ -214,7 +214,7 @@ void RegisterSwitchAge() { static bool warped = false; if (!GameInteractor::IsSaveLoaded(true)) { - CVarClear(GENERAL_CVAR("SwitchAge")); + CVarClear(CVAR_GENERAL("SwitchAge")); warped = false; return; } @@ -224,7 +224,7 @@ void RegisterSwitchAge() { static RoomContext* roomCtx; static s32 roomNum; - if (CVarGetInteger(GENERAL_CVAR("SwitchAge"), 0) && !warped) { + if (CVarGetInteger(CVAR_GENERAL("SwitchAge"), 0) && !warped) { playerPos = GET_PLAYER(gPlayState)->actor.world.pos; playerYaw = GET_PLAYER(gPlayState)->actor.shape.rot.y; roomCtx = &gPlayState->roomCtx; @@ -243,7 +243,7 @@ void RegisterSwitchAge() { func_80097534(gPlayState, roomCtx); // load map for new room (unloading the previous room) } warped = false; - CVarClear(GENERAL_CVAR("SwitchAge")); + CVarClear(CVAR_GENERAL("SwitchAge")); } }); } diff --git a/soh/soh/Enhancements/presets.h b/soh/soh/Enhancements/presets.h index f34a0e90cbf..fc202b94fad 100644 --- a/soh/soh/Enhancements/presets.h +++ b/soh/soh/Enhancements/presets.h @@ -283,10 +283,10 @@ const std::vector enhancementsCvars = { const std::vector cheatCvars = { "gConsoleEnabled", - WINDOW_CVAR("ActorViewer"), - WINDOW_CVAR("CollisionViewer"), - WINDOW_CVAR("DLViewer"), - WINDOW_CVAR("SaveEditor"), + CVAR_WINDOW("ActorViewer"), + CVAR_WINDOW("CollisionViewer"), + CVAR_WINDOW("DLViewer"), + CVAR_WINDOW("SaveEditor"), "gEnableWalkModify", "gWalkSpeedToggle", "gWalkModifierOne", @@ -298,53 +298,53 @@ const std::vector cheatCvars = { "gCustomizeShootingGallery", "gCustomizeBombchuBowling", "gCustomizeFishing", - CHEAT_CVAR("InfiniteAmmo"), - CHEAT_CVAR("InfiniteEponaBoost"), - CHEAT_CVAR("InfiniteHealth"), - CHEAT_CVAR("InfiniteMagic"), - CHEAT_CVAR("InfiniteMoney"), - CHEAT_CVAR("InfiniteNayru"), - CHEAT_CVAR("NoClip"), - CHEAT_CVAR("ClimbEverything"), - CHEAT_CVAR("HookshotEverything"), - CHEAT_CVAR("HookshotReachMultiplier"), - CHEAT_CVAR("MoonJumpOnL"), - CHEAT_CVAR("SuperTunic"), - CHEAT_CVAR("EasyISG"), - CHEAT_CVAR("EasyQPA"), - CHEAT_CVAR("TimelessEquipment"), - CHEAT_CVAR("EasyPauseBuffer"), - CHEAT_CVAR("EasyInputBuffer"), - CHEAT_CVAR("NoRestrictItems"), - CHEAT_CVAR("FreezeTime"), + CVAR_CHEAT("InfiniteAmmo"), + CVAR_CHEAT("InfiniteEponaBoost"), + CVAR_CHEAT("InfiniteHealth"), + CVAR_CHEAT("InfiniteMagic"), + CVAR_CHEAT("InfiniteMoney"), + CVAR_CHEAT("InfiniteNayru"), + CVAR_CHEAT("NoClip"), + CVAR_CHEAT("ClimbEverything"), + CVAR_CHEAT("HookshotEverything"), + CVAR_CHEAT("HookshotReachMultiplier"), + CVAR_CHEAT("MoonJumpOnL"), + CVAR_CHEAT("SuperTunic"), + CVAR_CHEAT("EasyISG"), + CVAR_CHEAT("EasyQPA"), + CVAR_CHEAT("TimelessEquipment"), + CVAR_CHEAT("EasyPauseBuffer"), + CVAR_CHEAT("EasyInputBuffer"), + CVAR_CHEAT("NoRestrictItems"), + CVAR_CHEAT("FreezeTime"), "gPrevTime", - CHEAT_CVAR("DropsDontDie"), - CHEAT_CVAR("FireproofDekuShield"), - CHEAT_CVAR("ShieldTwoHanded"), - CHEAT_CVAR("TimeSync"), - "gDebugEnabled", - DEV_TOOLS_CVAR("SkulltulaDebugEnabled"), - DEV_TOOLS_CVAR("SkipLogoTitle"), - DEV_TOOLS_CVAR("SaveFileID"), - CHEAT_CVAR("EnableBetaQuest"), - "gBetterDebugWarpScreen", - GENERAL_CVAR("SwitchAge"), + CVAR_CHEAT("DropsDontDie"), + CVAR_CHEAT("FireproofDekuShield"), + CVAR_CHEAT("ShieldTwoHanded"), + CVAR_CHEAT("TimeSync"), + CVAR_DEVELOPER_TOOLS("DebugEnabled"), + CVAR_DEVELOPER_TOOLS("SkulltulaDebugEnabled"), + CVAR_DEVELOPER_TOOLS("SkipLogoTitle"), + CVAR_DEVELOPER_TOOLS("SaveFileID"), + CVAR_CHEAT("EnableBetaQuest"), + CVAR_DEVELOPER_TOOLS("BetterDebugWarpScreen"), + CVAR_GENERAL("SwitchAge"), "gSwitchTimeline", - CHEAT_CVAR("NoRedeadFreeze"), - CHEAT_CVAR("NoKeeseGuayTarget"), - CHEAT_CVAR("BombTimerMultiplier"), - CHEAT_CVAR("NoFishDespawn"), - CHEAT_CVAR("NoBugsDespawn"), + CVAR_CHEAT("NoRedeadFreeze"), + CVAR_CHEAT("NoKeeseGuayTarget"), + CVAR_CHEAT("BombTimerMultiplier"), + CVAR_CHEAT("NoFishDespawn"), + CVAR_CHEAT("NoBugsDespawn"), "gWalkModifierDoesntChangeJump", "gStatsEnabled", - CHEAT_CVAR("SaveStatesEnabled"), - CHEAT_CVAR("SaveStatePromise"), - "gRegEditEnabled", + CVAR_CHEAT("SaveStatesEnabled"), + CVAR_CHEAT("SaveStatePromise"), + CVAR_DEVELOPER_TOOLS("RegEditEnabled"), "gPreset0", "gPreset1", - CHEAT_CVAR("DekuStick"), - "gDebugWarpScreenTranslation", - "gDebugSaveFileMode", + CVAR_CHEAT("DekuStick"), + CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), + CVAR_DEVELOPER_TOOLS("DebugSaveFileMode"), "gCosmetics.Link_BodyScale.Changed", "gCosmetics.Link_BodyScale.Value", "gCosmetics.Link_HeadScale.Changed", @@ -355,140 +355,140 @@ const std::vector cheatCvars = { }; const std::vector randomizerCvars = { - RANDOMIZER_SEED_CVAR("10GSHint"), - RANDOMIZER_SEED_CVAR("20GSHint"), - RANDOMIZER_SEED_CVAR("30GSHint"), - RANDOMIZER_SEED_CVAR("40GSHint"), - RANDOMIZER_SEED_CVAR("50GSHint"), - RANDOMIZER_SEED_CVAR("AllLocationsReachable"), - RANDOMIZER_SEED_CVAR("AltarHint"), - RANDOMIZER_SEED_CVAR("BigPoeTargetCount"), - RANDOMIZER_SEED_CVAR("BlueFireArrows"), - RANDOMIZER_SEED_CVAR("BombchusInLogic"), - RANDOMIZER_SEED_CVAR("BossKeysanity"), - RANDOMIZER_SEED_CVAR("BridgeRewardOptions"), - RANDOMIZER_SEED_CVAR("CompleteMaskQuest"), - RANDOMIZER_SEED_CVAR("CuccosToReturn"), - RANDOMIZER_SEED_CVAR("DampeHint"), - RANDOMIZER_SEED_CVAR("DecoupleEntrances"), - RANDOMIZER_SEED_CVAR("DoorOfTime"), - RANDOMIZER_SEED_CVAR("DungeonCount"), - RANDOMIZER_SEED_CVAR("EnableBombchuDrops"), - RANDOMIZER_SEED_CVAR("EnableGlitchCutscenes"), - RANDOMIZER_SEED_CVAR("EnabledGlitches"), - RANDOMIZER_SEED_CVAR("EnabledTricks"), - RANDOMIZER_SEED_CVAR("ExcludedLocations"), - RANDOMIZER_SEED_CVAR("Forest"), - RANDOMIZER_SEED_CVAR("FullWallets"), - RANDOMIZER_SEED_CVAR("GanonTrial"), - RANDOMIZER_SEED_CVAR("GanonTrialCount"), - RANDOMIZER_SEED_CVAR("GerudoFortress"), - RANDOMIZER_SEED_CVAR("GerudoKeys"), - RANDOMIZER_SEED_CVAR("GossipStoneHints"), - RANDOMIZER_SEED_CVAR("GsExpectSunsSong"), - RANDOMIZER_SEED_CVAR("HintClarity"), - RANDOMIZER_SEED_CVAR("HintDistribution"), - RANDOMIZER_SEED_CVAR("IceTraps"), - RANDOMIZER_SEED_CVAR("ItemPool"), - RANDOMIZER_SEED_CVAR("KakarikoGate"), - RANDOMIZER_SEED_CVAR("Keysanity"), - RANDOMIZER_SEED_CVAR("LacsDungeonCount"), - RANDOMIZER_SEED_CVAR("LacsMedallionCount"), - RANDOMIZER_SEED_CVAR("LacsRewardCount"), - RANDOMIZER_SEED_CVAR("LacsRewardOptions"), - RANDOMIZER_SEED_CVAR("LacsStoneCount"), - RANDOMIZER_SEED_CVAR("LacsTokenCount"), - RANDOMIZER_SEED_CVAR("LAHint"), - RANDOMIZER_SEED_CVAR("LinksPocket"), - RANDOMIZER_SEED_CVAR("LogicRules"), - RANDOMIZER_SEED_CVAR("MedallionCount"), - RANDOMIZER_SEED_CVAR("MixDungeons"), - RANDOMIZER_SEED_CVAR("MixedEntrances"), - RANDOMIZER_SEED_CVAR("MixGrottos"), - RANDOMIZER_SEED_CVAR("MixInteriors"), - RANDOMIZER_SEED_CVAR("MixOverworld"), - RANDOMIZER_SEED_CVAR("MQDungeonCount"), - RANDOMIZER_SEED_CVAR("MQDungeons"), - RANDOMIZER_SEED_CVAR("RainbowBridge"), - RANDOMIZER_SEED_CVAR("RewardCount"), - RANDOMIZER_SEED_CVAR("ScrubText"), - RANDOMIZER_SEED_CVAR("Shopsanity"), - RANDOMIZER_SEED_CVAR("ShopsanityPrices"), - RANDOMIZER_SEED_CVAR("ShopsanityPricesAffordable"), - RANDOMIZER_SEED_CVAR("ShuffleAdultTrade"), - RANDOMIZER_SEED_CVAR("ShuffleBeans"), - RANDOMIZER_SEED_CVAR("ShuffleBossEntrances"), - RANDOMIZER_SEED_CVAR("ShuffleCows"), - RANDOMIZER_SEED_CVAR("ShuffleDungeonReward"), - RANDOMIZER_SEED_CVAR("ShuffleDungeonsEntrances"), - RANDOMIZER_SEED_CVAR("ShuffleFrogSongRupees"), - RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), - RANDOMIZER_SEED_CVAR("ShuffleGerudoToken"), - RANDOMIZER_SEED_CVAR("ShuffleGrottosEntrances"), - RANDOMIZER_SEED_CVAR("ShuffleInteriorsEntrances"), - RANDOMIZER_SEED_CVAR("ShuffleKeyRings"), - RANDOMIZER_SEED_CVAR("ShuffleKeyRingsBottomOfTheWell"), - RANDOMIZER_SEED_CVAR("ShuffleKeyRingsFireTemple"), - RANDOMIZER_SEED_CVAR("ShuffleKeyRingsForestTemple"), - RANDOMIZER_SEED_CVAR("ShuffleKeyRingsGanonsCastle"), - RANDOMIZER_SEED_CVAR("ShuffleKeyRingsGerudoFortress"), - RANDOMIZER_SEED_CVAR("ShuffleKeyRingsGTG"), - RANDOMIZER_SEED_CVAR("ShuffleKeyRingsRandomCount"), - RANDOMIZER_SEED_CVAR("ShuffleKeyRingsShadowTemple"), - RANDOMIZER_SEED_CVAR("ShuffleKeyRingsSpiritTemple"), - RANDOMIZER_SEED_CVAR("ShuffleKeyRingsWaterTemple"), - RANDOMIZER_SEED_CVAR("ShuffleKokiriSword"), - RANDOMIZER_SEED_CVAR("ShuffleMerchants"), - RANDOMIZER_SEED_CVAR("ShuffleOcarinas"), - RANDOMIZER_SEED_CVAR("ShuffleOverworldEntrances"), - RANDOMIZER_SEED_CVAR("ShuffleOverworldSpawns"), - RANDOMIZER_SEED_CVAR("ShuffleOwlDrops"), - RANDOMIZER_SEED_CVAR("ShuffleScrubs"), - RANDOMIZER_SEED_CVAR("ShuffleSongs"), - RANDOMIZER_SEED_CVAR("ShuffleTokens"), - RANDOMIZER_SEED_CVAR("ShuffleWarpSongs"), - RANDOMIZER_SEED_CVAR("ShuffleWeirdEgg"), - RANDOMIZER_SEED_CVAR("SkipChildStealth"), - RANDOMIZER_SEED_CVAR("SkipChildZelda"), - RANDOMIZER_SEED_CVAR("SkipEponaRace"), - RANDOMIZER_SEED_CVAR("SkipScarecrowsSong"), - RANDOMIZER_SEED_CVAR("SkipTowerEscape"), - RANDOMIZER_SEED_CVAR("StartingAge"), - RANDOMIZER_SEED_CVAR("StartingConsumables"), - RANDOMIZER_SEED_CVAR("StartingBoleroOfFire"), - RANDOMIZER_SEED_CVAR("StartingDekuShield"), - RANDOMIZER_SEED_CVAR("StartingEponasSong"), - RANDOMIZER_SEED_CVAR("StartingKokiriSword"), - RANDOMIZER_SEED_CVAR("StartingMapsCompasses"), - RANDOMIZER_SEED_CVAR("StartingMinuetOfForest"), - RANDOMIZER_SEED_CVAR("StartingNocturneOfShadow"), - RANDOMIZER_SEED_CVAR("StartingOcarina"), - RANDOMIZER_SEED_CVAR("StartingPreludeOfLight"), - RANDOMIZER_SEED_CVAR("StartingRequiemOfSpirit"), - RANDOMIZER_SEED_CVAR("StartingSariasSong"), - RANDOMIZER_SEED_CVAR("StartingSerenadeOfWater"), - RANDOMIZER_SEED_CVAR("StartingSkulltulaToken"), - RANDOMIZER_SEED_CVAR("StartingSongOfStorms"), - RANDOMIZER_SEED_CVAR("StartingSongOfTime"), - RANDOMIZER_SEED_CVAR("StartingSunsSong"), - RANDOMIZER_SEED_CVAR("StartingZeldasLullaby"), - RANDOMIZER_SEED_CVAR("StoneCount"), - RANDOMIZER_SEED_CVAR("SunlightArrows"), - RANDOMIZER_SEED_CVAR("TokenCount"), - RANDOMIZER_SEED_CVAR("WarpSongText"), - RANDOMIZER_SEED_CVAR("ZorasFountain"), - RANDOMIZER_SEED_CVAR("Shuffle100GSReward"), - RANDOMIZER_SEED_CVAR("GregHint"), - RANDOMIZER_SEED_CVAR("ManualSeedEntry"), - RANDOMIZER_SEED_CVAR("TriforceHuntTotalPieces"), - RANDOMIZER_SEED_CVAR("TriforceHuntRequiredPieces"), - RANDOMIZER_SEED_CVAR("TriforceHunt"), - RANDOMIZER_SEED_CVAR("ShuffleMasterSword"), - RANDOMIZER_SEED_CVAR("SariaHint"), - RANDO_ENHANCEMENT_CVAR("RandomizeRupeeNames"), - RANDOMIZER_SEED_CVAR("FrogsHint"), - RANDO_ENHANCEMENT_CVAR("RandoRelevantNavi"), - RANDO_ENHANCEMENT_CVAR("QuestItemFanfares"), + CVAR_RANDOMIZER_SETTING("10GSHint"), + CVAR_RANDOMIZER_SETTING("20GSHint"), + CVAR_RANDOMIZER_SETTING("30GSHint"), + CVAR_RANDOMIZER_SETTING("40GSHint"), + CVAR_RANDOMIZER_SETTING("50GSHint"), + CVAR_RANDOMIZER_SETTING("AllLocationsReachable"), + CVAR_RANDOMIZER_SETTING("AltarHint"), + CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), + CVAR_RANDOMIZER_SETTING("BlueFireArrows"), + CVAR_RANDOMIZER_SETTING("BombchusInLogic"), + CVAR_RANDOMIZER_SETTING("BossKeysanity"), + CVAR_RANDOMIZER_SETTING("BridgeRewardOptions"), + CVAR_RANDOMIZER_SETTING("CompleteMaskQuest"), + CVAR_RANDOMIZER_SETTING("CuccosToReturn"), + CVAR_RANDOMIZER_SETTING("DampeHint"), + CVAR_RANDOMIZER_SETTING("DecoupleEntrances"), + CVAR_RANDOMIZER_SETTING("DoorOfTime"), + CVAR_RANDOMIZER_SETTING("DungeonCount"), + CVAR_RANDOMIZER_SETTING("EnableBombchuDrops"), + CVAR_RANDOMIZER_SETTING("EnableGlitchCutscenes"), + CVAR_RANDOMIZER_SETTING("EnabledGlitches"), + CVAR_RANDOMIZER_SETTING("EnabledTricks"), + CVAR_RANDOMIZER_SETTING("ExcludedLocations"), + CVAR_RANDOMIZER_SETTING("Forest"), + CVAR_RANDOMIZER_SETTING("FullWallets"), + CVAR_RANDOMIZER_SETTING("GanonTrial"), + CVAR_RANDOMIZER_SETTING("GanonTrialCount"), + CVAR_RANDOMIZER_SETTING("GerudoFortress"), + CVAR_RANDOMIZER_SETTING("GerudoKeys"), + CVAR_RANDOMIZER_SETTING("GossipStoneHints"), + CVAR_RANDOMIZER_SETTING("GsExpectSunsSong"), + CVAR_RANDOMIZER_SETTING("HintClarity"), + CVAR_RANDOMIZER_SETTING("HintDistribution"), + CVAR_RANDOMIZER_SETTING("IceTraps"), + CVAR_RANDOMIZER_SETTING("ItemPool"), + CVAR_RANDOMIZER_SETTING("KakarikoGate"), + CVAR_RANDOMIZER_SETTING("Keysanity"), + CVAR_RANDOMIZER_SETTING("LacsDungeonCount"), + CVAR_RANDOMIZER_SETTING("LacsMedallionCount"), + CVAR_RANDOMIZER_SETTING("LacsRewardCount"), + CVAR_RANDOMIZER_SETTING("LacsRewardOptions"), + CVAR_RANDOMIZER_SETTING("LacsStoneCount"), + CVAR_RANDOMIZER_SETTING("LacsTokenCount"), + CVAR_RANDOMIZER_SETTING("LAHint"), + CVAR_RANDOMIZER_SETTING("LinksPocket"), + CVAR_RANDOMIZER_SETTING("LogicRules"), + CVAR_RANDOMIZER_SETTING("MedallionCount"), + CVAR_RANDOMIZER_SETTING("MixDungeons"), + CVAR_RANDOMIZER_SETTING("MixedEntrances"), + CVAR_RANDOMIZER_SETTING("MixGrottos"), + CVAR_RANDOMIZER_SETTING("MixInteriors"), + CVAR_RANDOMIZER_SETTING("MixOverworld"), + CVAR_RANDOMIZER_SETTING("MQDungeonCount"), + CVAR_RANDOMIZER_SETTING("MQDungeons"), + CVAR_RANDOMIZER_SETTING("RainbowBridge"), + CVAR_RANDOMIZER_SETTING("RewardCount"), + CVAR_RANDOMIZER_SETTING("ScrubText"), + CVAR_RANDOMIZER_SETTING("Shopsanity"), + CVAR_RANDOMIZER_SETTING("ShopsanityPrices"), + CVAR_RANDOMIZER_SETTING("ShopsanityPricesAffordable"), + CVAR_RANDOMIZER_SETTING("ShuffleAdultTrade"), + CVAR_RANDOMIZER_SETTING("ShuffleBeans"), + CVAR_RANDOMIZER_SETTING("ShuffleBossEntrances"), + CVAR_RANDOMIZER_SETTING("ShuffleCows"), + CVAR_RANDOMIZER_SETTING("ShuffleDungeonReward"), + CVAR_RANDOMIZER_SETTING("ShuffleDungeonsEntrances"), + CVAR_RANDOMIZER_SETTING("ShuffleFrogSongRupees"), + CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), + CVAR_RANDOMIZER_SETTING("ShuffleGerudoToken"), + CVAR_RANDOMIZER_SETTING("ShuffleGrottosEntrances"), + CVAR_RANDOMIZER_SETTING("ShuffleInteriorsEntrances"), + CVAR_RANDOMIZER_SETTING("ShuffleKeyRings"), + CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsBottomOfTheWell"), + CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsFireTemple"), + CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsForestTemple"), + CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsGanonsCastle"), + CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsGerudoFortress"), + CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsGTG"), + CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsRandomCount"), + CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsShadowTemple"), + CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsSpiritTemple"), + CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsWaterTemple"), + CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), + CVAR_RANDOMIZER_SETTING("ShuffleMerchants"), + CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), + CVAR_RANDOMIZER_SETTING("ShuffleOverworldEntrances"), + CVAR_RANDOMIZER_SETTING("ShuffleOverworldSpawns"), + CVAR_RANDOMIZER_SETTING("ShuffleOwlDrops"), + CVAR_RANDOMIZER_SETTING("ShuffleScrubs"), + CVAR_RANDOMIZER_SETTING("ShuffleSongs"), + CVAR_RANDOMIZER_SETTING("ShuffleTokens"), + CVAR_RANDOMIZER_SETTING("ShuffleWarpSongs"), + CVAR_RANDOMIZER_SETTING("ShuffleWeirdEgg"), + CVAR_RANDOMIZER_SETTING("SkipChildStealth"), + CVAR_RANDOMIZER_SETTING("SkipChildZelda"), + CVAR_RANDOMIZER_SETTING("SkipEponaRace"), + CVAR_RANDOMIZER_SETTING("SkipScarecrowsSong"), + CVAR_RANDOMIZER_SETTING("SkipTowerEscape"), + CVAR_RANDOMIZER_SETTING("StartingAge"), + CVAR_RANDOMIZER_SETTING("StartingConsumables"), + CVAR_RANDOMIZER_SETTING("StartingBoleroOfFire"), + CVAR_RANDOMIZER_SETTING("StartingDekuShield"), + CVAR_RANDOMIZER_SETTING("StartingEponasSong"), + CVAR_RANDOMIZER_SETTING("StartingKokiriSword"), + CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), + CVAR_RANDOMIZER_SETTING("StartingMinuetOfForest"), + CVAR_RANDOMIZER_SETTING("StartingNocturneOfShadow"), + CVAR_RANDOMIZER_SETTING("StartingOcarina"), + CVAR_RANDOMIZER_SETTING("StartingPreludeOfLight"), + CVAR_RANDOMIZER_SETTING("StartingRequiemOfSpirit"), + CVAR_RANDOMIZER_SETTING("StartingSariasSong"), + CVAR_RANDOMIZER_SETTING("StartingSerenadeOfWater"), + CVAR_RANDOMIZER_SETTING("StartingSkulltulaToken"), + CVAR_RANDOMIZER_SETTING("StartingSongOfStorms"), + CVAR_RANDOMIZER_SETTING("StartingSongOfTime"), + CVAR_RANDOMIZER_SETTING("StartingSunsSong"), + CVAR_RANDOMIZER_SETTING("StartingZeldasLullaby"), + CVAR_RANDOMIZER_SETTING("StoneCount"), + CVAR_RANDOMIZER_SETTING("SunlightArrows"), + CVAR_RANDOMIZER_SETTING("TokenCount"), + CVAR_RANDOMIZER_SETTING("WarpSongText"), + CVAR_RANDOMIZER_SETTING("ZorasFountain"), + CVAR_RANDOMIZER_SETTING("Shuffle100GSReward"), + CVAR_RANDOMIZER_SETTING("GregHint"), + CVAR_RANDOMIZER_SETTING("ManualSeedEntry"), + CVAR_RANDOMIZER_SETTING("TriforceHuntTotalPieces"), + CVAR_RANDOMIZER_SETTING("TriforceHuntRequiredPieces"), + CVAR_RANDOMIZER_SETTING("TriforceHunt"), + CVAR_RANDOMIZER_SETTING("ShuffleMasterSword"), + CVAR_RANDOMIZER_SETTING("SariaHint"), + CVAR_RANDOMIZER_ENHANCEMENT("RandomizeRupeeNames"), + CVAR_RANDOMIZER_SETTING("FrogsHint"), + CVAR_RANDOMIZER_ENHANCEMENT("RandoRelevantNavi"), + CVAR_RANDOMIZER_ENHANCEMENT("QuestItemFanfares"), }; const std::vector vanillaPlusPresetEntries = { @@ -857,7 +857,7 @@ const std::vector randomizerPresetEntries = { }; const std::vector spockRacePresetEntries = { - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("LogicRules"), 0), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LogicRules"), 0), PRESET_ENTRY_S32("gTextSpeed", 5), PRESET_ENTRY_S32("gMweepSpeed", 5), PRESET_ENTRY_S32("gClimbSpeed", 4), @@ -899,55 +899,55 @@ const std::vector spockRacePresetEntries = { PRESET_ENTRY_S32("gChildMinimumWeightFish", 3), PRESET_ENTRY_S32("gGoronPot", 1), PRESET_ENTRY_S32("gForgeTime", 0), - PRESET_ENTRY_S32(CHEAT_CVAR("EasyPauseBuffer"), 1), + PRESET_ENTRY_S32(CVAR_CHEAT("EasyPauseBuffer"), 1), PRESET_ENTRY_S32("gDampeAllNight", 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("10GSHint"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("20GSHint"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("30GSHint"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("40GSHint"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("50GSHint"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("AllLocationsReachable"), 0), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("BlueFireArrows"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("BombchusInLogic"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("CompleteMaskQuest"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("CuccosToReturn"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("DampeHint"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("DoorOfTime"), RO_DOOROFTIME_OPEN), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("EnableBombchuDrops"), 1), - PRESET_ENTRY_CPP_STRING(RANDOMIZER_SEED_CVAR("ExcludedLocations"), FormatLocations( + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("10GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("20GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("30GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("40GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("50GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("AllLocationsReachable"), 0), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BlueFireArrows"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BombchusInLogic"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CompleteMaskQuest"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DampeHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DoorOfTime"), RO_DOOROFTIME_OPEN), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("EnableBombchuDrops"), 1), + PRESET_ENTRY_CPP_STRING(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), FormatLocations( { RC_MARKET_10_BIG_POES, RC_KAK_40_GOLD_SKULLTULA_REWARD, RC_KAK_50_GOLD_SKULLTULA_REWARD, RC_ZR_FROGS_OCARINA_GAME })), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("Forest"), RO_FOREST_OPEN), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("FullWallets"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("GanonTrial"), RO_GANONS_TRIALS_SKIP), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("GerudoFortress"), RO_GF_FAST), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("GregHint"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("GsExpectSunsSong"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("KakarikoGate"), RO_KAK_GATE_OPEN), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("LacsRewardCount"), 5), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("RainbowBridge"), RO_BRIDGE_GREG), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ScrubText"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("Shopsanity"), RO_SHOPSANITY_RANDOM), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_LACS_REWARDS), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleKeyRings"), RO_KEYRINGS_COUNT), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleKokiriSword"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleOcarinas"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleScrubs"), RO_SCRUBS_AFFORDABLE), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipChildStealth"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipChildZelda"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipEponaRace"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipScarecrowsSong"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipTowerEscape"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("StartingConsumables"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_STARTWITH), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("StartingOcarina"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SunlightArrows"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Forest"), RO_FOREST_OPEN), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FullWallets"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SKIP), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_FAST), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GregHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GsExpectSunsSong"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("KakarikoGate"), RO_KAK_GATE_OPEN), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LacsRewardCount"), 5), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("RainbowBridge"), RO_BRIDGE_GREG), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ScrubText"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Shopsanity"), RO_SHOPSANITY_RANDOM), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_LACS_REWARDS), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKeyRings"), RO_KEYRINGS_COUNT), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleScrubs"), RO_SCRUBS_AFFORDABLE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildStealth"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipEponaRace"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipScarecrowsSong"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipTowerEscape"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingConsumables"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_STARTWITH), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingOcarina"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SunlightArrows"), 1), }; const std::vector spockRaceNoLogicPresetEntries = { PRESET_ENTRY_S32("gAdultBunnyHood", 1), PRESET_ENTRY_S32("gAdultMinimumWeightFish", 6), PRESET_ENTRY_S32("gAssignableTunicsAndBoots", 1), - PRESET_ENTRY_S32(CHEAT_CVAR("EasyPauseBuffer"), 1), + PRESET_ENTRY_S32(CVAR_CHEAT("EasyPauseBuffer"), 1), PRESET_ENTRY_S32("gChildMinimumWeightFish", 3), PRESET_ENTRY_S32("gClimbSpeed", 4), PRESET_ENTRY_S32("gCosmetics.Goron_NeckLength", 1000), @@ -980,55 +980,55 @@ const std::vector spockRaceNoLogicPresetEntries = { PRESET_ENTRY_S32("gNoForcedNavi", 1), PRESET_ENTRY_S32("gNoInputForCredits", 1), PRESET_ENTRY_S32("gPauseAnyCursor", 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("10GSHint"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("20GSHint"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("30GSHint"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("40GSHint"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("50GSHint"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("AllLocationsReachable"), 0), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("BlueFireArrows"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("BombchusInLogic"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("BossKeysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("CompleteMaskQuest"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("CuccosToReturn"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("DampeHint"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("DoorOfTime"), RO_DOOROFTIME_OPEN), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("EnableBombchuDrops"), 1), - PRESET_ENTRY_CPP_STRING(RANDOMIZER_SEED_CVAR("ExcludedLocations"), FormatLocations( + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("10GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("20GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("30GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("40GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("50GSHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("AllLocationsReachable"), 0), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BlueFireArrows"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BombchusInLogic"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BossKeysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CompleteMaskQuest"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DampeHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DoorOfTime"), RO_DOOROFTIME_OPEN), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("EnableBombchuDrops"), 1), + PRESET_ENTRY_CPP_STRING(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), FormatLocations( { RC_MARKET_10_BIG_POES, RC_KAK_40_GOLD_SKULLTULA_REWARD, RC_KAK_50_GOLD_SKULLTULA_REWARD, RC_ZR_FROGS_OCARINA_GAME })), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("Forest"), RO_FOREST_OPEN), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("FullWallets"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("GanonTrial"), RO_GANONS_TRIALS_SKIP), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("GerudoFortress"), RO_GF_FAST), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("GerudoKeys"), RO_GERUDO_KEYS_ANYWHERE), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("GregHint"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("GsExpectSunsSong"), 0), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("KakarikoGate"), RO_KAK_GATE_OPEN), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("Keysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("LacsRewardCount"), 5), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("LogicRules"), RO_LOGIC_NO_LOGIC), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("RainbowBridge"), RO_BRIDGE_GREG), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ScrubText"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("Shopsanity"), RO_SHOPSANITY_RANDOM), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleAdultTrade"), 0), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleBeans"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_LACS_REWARDS), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleGerudoToken"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleKeyRings"), RO_KEYRINGS_COUNT), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleKokiriSword"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleOcarinas"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleScrubs"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleSongs"), RO_SONG_SHUFFLE_ANYWHERE), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleTokens"), RO_TOKENSANITY_ALL), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipChildStealth"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipChildZelda"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipEponaRace"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipScarecrowsSong"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipTowerEscape"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("StartingConsumables"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_STARTWITH), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("StartingOcarina"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SunlightArrows"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Forest"), RO_FOREST_OPEN), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("FullWallets"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SKIP), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_FAST), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GregHint"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GsExpectSunsSong"), 0), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("KakarikoGate"), RO_KAK_GATE_OPEN), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Keysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LacsRewardCount"), 5), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_NO_LOGIC), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("RainbowBridge"), RO_BRIDGE_GREG), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ScrubText"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Shopsanity"), RO_SHOPSANITY_RANDOM), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleAdultTrade"), 0), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleBeans"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_LACS_REWARDS), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGerudoToken"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKeyRings"), RO_KEYRINGS_COUNT), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleScrubs"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleSongs"), RO_SONG_SHUFFLE_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleTokens"), RO_TOKENSANITY_ALL), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildStealth"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipEponaRace"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipScarecrowsSong"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipTowerEscape"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingConsumables"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_STARTWITH), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingOcarina"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SunlightArrows"), 1), PRESET_ENTRY_S32("gSeparateArrows", 1), PRESET_ENTRY_S32("gSkipScarecrow", 1), PRESET_ENTRY_S32("gSkulltulaFreeze", 1), @@ -1039,33 +1039,33 @@ const std::vector s6PresetEntries = { PRESET_ENTRY_S32("gFastChests", 1), PRESET_ENTRY_S32("gMMBunnyHood", BUNNY_HOOD_FAST), PRESET_ENTRY_S32("gAdultBunnyHood", 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("BigPoeTargetCount"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("CuccosToReturn"), 4), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("DoorOfTime"), RO_DOOROFTIME_OPEN), - PRESET_ENTRY_CPP_STRING(RANDOMIZER_SEED_CVAR("ExcludedLocations"), FormatLocations({ RC_DEKU_THEATER_MASK_OF_TRUTH })), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("Forest"), RO_FOREST_CLOSED_DEKU), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("GanonTrial"), RO_GANONS_TRIALS_SKIP), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("GerudoFortress"), RO_GF_FAST), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("IceTraps"), RO_ICE_TRAPS_OFF), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("KakarikoGate"), RO_KAK_GATE_OPEN), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("MedallionCount"), 6), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("MQDungeons"), RO_MQ_DUNGEONS_NONE), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("RainbowBridge"), RO_BRIDGE_MEDALLIONS), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleAdultTrade"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_END_OF_DUNGEON), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_STARTWITH), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleKokiriSword"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleOverworldSpawns"), RO_GENERIC_ON), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipChildStealth"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipChildZelda"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipEponaRace"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipTowerEscape"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("StartingAge"), RO_AGE_RANDOM), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("StartingConsumables"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("StartingDekuShield"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_STARTWITH), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("StartingOcarina"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ZorasFountain"), 0), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 4), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DoorOfTime"), RO_DOOROFTIME_OPEN), + PRESET_ENTRY_CPP_STRING(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), FormatLocations({ RC_DEKU_THEATER_MASK_OF_TRUTH })), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Forest"), RO_FOREST_CLOSED_DEKU), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SKIP), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_FAST), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("IceTraps"), RO_ICE_TRAPS_OFF), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("KakarikoGate"), RO_KAK_GATE_OPEN), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MedallionCount"), 6), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MQDungeons"), RO_MQ_DUNGEONS_NONE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("RainbowBridge"), RO_BRIDGE_MEDALLIONS), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleAdultTrade"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_END_OF_DUNGEON), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_STARTWITH), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOverworldSpawns"), RO_GENERIC_ON), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildStealth"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipEponaRace"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipTowerEscape"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingAge"), RO_AGE_RANDOM), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingConsumables"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingDekuShield"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_STARTWITH), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingOcarina"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ZorasFountain"), 0), }; const std::vector hellModePresetEntries = { @@ -1073,51 +1073,51 @@ const std::vector hellModePresetEntries = { PRESET_ENTRY_S32("gFastChests", 1), PRESET_ENTRY_S32("gMMBunnyHood", BUNNY_HOOD_FAST), PRESET_ENTRY_S32("gAdultBunnyHood", 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("BigPoeTargetCount"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("BlueFireArrows"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("BossKeysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("CompleteMaskQuest"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("CuccosToReturn"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("DoorOfTime"), RO_DOOROFTIME_OPEN), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("EnableBombchuDrops"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("EnableGlitchCutscenes"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("Forest"), RO_FOREST_OPEN), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("GanonTrial"), RO_GANONS_TRIALS_SET_NUMBER), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("GanonTrialCount"), 6), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("GerudoKeys"), RO_GERUDO_KEYS_ANYWHERE), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("GsExpectSunsSong"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("IceTraps"), RO_ICE_TRAPS_ONSLAUGHT), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ItemPool"), RO_ITEM_POOL_MINIMAL), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("KakarikoGate"), RO_KAK_GATE_OPEN), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("Keysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("LinksPocket"), RO_LINKS_POCKET_NOTHING), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("MQDungeons"), RO_MQ_DUNGEONS_RANDOM_NUMBER), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("RainbowBridge"), RO_BRIDGE_DUNGEON_REWARDS), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("Shopsanity"), RO_SHOPSANITY_FOUR_ITEMS), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShopsanityPrices"), RO_SHOPSANITY_PRICE_TYCOON), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleAdultTrade"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleBeans"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleCows"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_ANYWHERE), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleFrogSongRupees"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_LACS_DUNGEONS), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleGerudoToken"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleKeyRings"), RO_KEYRINGS_RANDOM), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleKokiriSword"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleMasterSword"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleOcarinas"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleScrubs"), RO_SCRUBS_RANDOM), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleSongs"), RO_SONG_SHUFFLE_ANYWHERE), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleTokens"), RO_TOKENSANITY_ALL), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ShuffleWeirdEgg"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipChildStealth"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipEponaRace"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipScarecrowsSong"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SkipTowerEscape"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("StartingAge"), RO_AGE_RANDOM), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_ANYWHERE), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("SunlightArrows"), 1), - PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("ZorasFountain"), 2), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BlueFireArrows"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("BossKeysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CompleteMaskQuest"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("DoorOfTime"), RO_DOOROFTIME_OPEN), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("EnableBombchuDrops"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("EnableGlitchCutscenes"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Forest"), RO_FOREST_OPEN), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SET_NUMBER), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GanonTrialCount"), 6), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("GsExpectSunsSong"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("IceTraps"), RO_ICE_TRAPS_ONSLAUGHT), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ItemPool"), RO_ITEM_POOL_MINIMAL), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("KakarikoGate"), RO_KAK_GATE_OPEN), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Keysanity"), RO_DUNGEON_ITEM_LOC_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("LinksPocket"), RO_LINKS_POCKET_NOTHING), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("MQDungeons"), RO_MQ_DUNGEONS_RANDOM_NUMBER), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("RainbowBridge"), RO_BRIDGE_DUNGEON_REWARDS), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("Shopsanity"), RO_SHOPSANITY_FOUR_ITEMS), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShopsanityPrices"), RO_SHOPSANITY_PRICE_TYCOON), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleAdultTrade"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleBeans"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleCows"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleFrogSongRupees"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_LACS_DUNGEONS), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleGerudoToken"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKeyRings"), RO_KEYRINGS_RANDOM), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleMasterSword"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleScrubs"), RO_SCRUBS_RANDOM), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleSongs"), RO_SONG_SHUFFLE_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleTokens"), RO_TOKENSANITY_ALL), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ShuffleWeirdEgg"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipChildStealth"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipEponaRace"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipScarecrowsSong"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SkipTowerEscape"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingAge"), RO_AGE_RANDOM), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_ANYWHERE), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("SunlightArrows"), 1), + PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("ZorasFountain"), 2), }; typedef struct PresetDefinition { diff --git a/soh/soh/Enhancements/randomizer/3drando/playthrough.cpp b/soh/soh/Enhancements/randomizer/3drando/playthrough.cpp index 8fb8aa9b271..e1a5656eaea 100644 --- a/soh/soh/Enhancements/randomizer/3drando/playthrough.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/playthrough.cpp @@ -42,7 +42,7 @@ int Playthrough_Init(uint32_t seed, std::unordered_mapgetItemId == RG_GERUDO_FORTRESS_SMALL_KEY ? Randomizer_GetSettingValue(RSK_GERUDO_KEYS) != RO_GERUDO_KEYS_VANILLA : DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_KEYSANITY); - s8 isColoredKeysEnabled = keysCanBeOutsideDungeon && CVarGetInteger(RANDO_ENHANCEMENT_CVAR("MatchKeyColors"), 1); + s8 isColoredKeysEnabled = keysCanBeOutsideDungeon && CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MatchKeyColors"), 1); s16 color_slot = getItemEntry->getItemId - RG_FOREST_TEMPLE_SMALL_KEY; s16 colors[9][3] = { { 4, 195, 46 }, // Forest Temple @@ -63,7 +63,7 @@ extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEnt s8 keysCanBeOutsideDungeon = getItemEntry->getItemId == RG_GANONS_CASTLE_BOSS_KEY ? DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_GANONS_BOSS_KEY) : DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_BOSS_KEYSANITY); - s8 isColoredKeysEnabled = keysCanBeOutsideDungeon && CVarGetInteger(RANDO_ENHANCEMENT_CVAR("MatchKeyColors"), 1); + s8 isColoredKeysEnabled = keysCanBeOutsideDungeon && CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MatchKeyColors"), 1); s16 color_slot; color_slot = getItemEntry->getItemId - RG_FOREST_TEMPLE_BOSS_KEY; s16 colors[6][3] = { diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 6fdf1f3b2f9..40b3daaf3f4 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -2831,143 +2831,143 @@ void GenerateRandomizerImgui(std::string seed = "") { CVarSave(); std::unordered_map cvarSettings; - cvarSettings[RSK_LOGIC_RULES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("LogicRules"), RO_LOGIC_GLITCHLESS); - cvarSettings[RSK_ALL_LOCATIONS_REACHABLE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("AllLocationsReachable"), RO_GENERIC_ON); - cvarSettings[RSK_FOREST] = CVarGetInteger(RANDOMIZER_SEED_CVAR("Forest"), RO_FOREST_CLOSED); - cvarSettings[RSK_KAK_GATE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("KakarikoGate"), RO_KAK_GATE_CLOSED); - cvarSettings[RSK_DOOR_OF_TIME] = CVarGetInteger(RANDOMIZER_SEED_CVAR("DoorOfTime"), RO_DOOROFTIME_CLOSED); - cvarSettings[RSK_ZORAS_FOUNTAIN] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ZorasFountain"), 0); - cvarSettings[RSK_STARTING_AGE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingAge"), RO_AGE_CHILD); - cvarSettings[RSK_GERUDO_FORTRESS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("GerudoFortress"), RO_GF_NORMAL); - cvarSettings[RSK_RAINBOW_BRIDGE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("RainbowBridge"), RO_BRIDGE_VANILLA); - cvarSettings[RSK_RAINBOW_BRIDGE_STONE_COUNT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StoneCount"), 3); - cvarSettings[RSK_RAINBOW_BRIDGE_MEDALLION_COUNT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MedallionCount"), 6); - cvarSettings[RSK_RAINBOW_BRIDGE_REWARD_COUNT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("RewardCount"), 9); - cvarSettings[RSK_RAINBOW_BRIDGE_DUNGEON_COUNT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("DungeonCount"), 8); - cvarSettings[RSK_RAINBOW_BRIDGE_TOKEN_COUNT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("TokenCount"), 100); - cvarSettings[RSK_BRIDGE_OPTIONS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("BridgeRewardOptions"), 0); - cvarSettings[RSK_GANONS_TRIALS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("GanonTrial"), RO_GANONS_TRIALS_SET_NUMBER); - cvarSettings[RSK_TRIAL_COUNT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("GanonTrialCount"), 6); - cvarSettings[RSK_STARTING_OCARINA] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingOcarina"), 0); - cvarSettings[RSK_SHUFFLE_OCARINA] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleOcarinas"), 0) || - CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingOcarina"), 0); - cvarSettings[RSK_STARTING_KOKIRI_SWORD] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingKokiriSword"), 0); - cvarSettings[RSK_SHUFFLE_KOKIRI_SWORD] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleKokiriSword"), 0) || - CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingKokiriSword"), 0); - cvarSettings[RSK_SHUFFLE_MASTER_SWORD] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleMasterSword"), 0); - cvarSettings[RSK_STARTING_DEKU_SHIELD] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingDekuShield"), 0); - cvarSettings[RSK_STARTING_ZELDAS_LULLABY] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingZeldasLullaby"), 0); - cvarSettings[RSK_STARTING_EPONAS_SONG] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingEponasSong"), 0); - cvarSettings[RSK_STARTING_SARIAS_SONG] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingSariasSong"), 0); - cvarSettings[RSK_STARTING_SUNS_SONG] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingSunsSong"), 0); - cvarSettings[RSK_STARTING_SONG_OF_TIME] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingSongOfTime"), 0); - cvarSettings[RSK_STARTING_SONG_OF_STORMS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingSongOfStorms"), 0); - cvarSettings[RSK_STARTING_MINUET_OF_FOREST] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingMinuetOfForest"), 0); - cvarSettings[RSK_STARTING_BOLERO_OF_FIRE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingBoleroOfFire"), 0); - cvarSettings[RSK_STARTING_SERENADE_OF_WATER] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingSerenadeOfWater"), 0); - cvarSettings[RSK_STARTING_REQUIEM_OF_SPIRIT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingRequiemOfSpirit"), 0); - cvarSettings[RSK_STARTING_NOCTURNE_OF_SHADOW] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingNocturneOfShadow"), 0); - cvarSettings[RSK_STARTING_PRELUDE_OF_LIGHT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingPreludeOfLight"), 0); - cvarSettings[RSK_STARTING_SKULLTULA_TOKEN] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingSkulltulaToken"), 0); - cvarSettings[RSK_STARTING_MAPS_COMPASSES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON); - cvarSettings[RSK_SHUFFLE_DUNGEON_REWARDS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_END_OF_DUNGEON); - cvarSettings[RSK_SHUFFLE_SONGS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleSongs"), RO_SONG_SHUFFLE_SONG_LOCATIONS); - cvarSettings[RSK_SHUFFLE_TOKENS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleTokens"), RO_TOKENSANITY_OFF); - cvarSettings[RSK_SHOPSANITY] = CVarGetInteger(RANDOMIZER_SEED_CVAR("Shopsanity"), RO_SHOPSANITY_OFF); - cvarSettings[RSK_SHOPSANITY_PRICES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShopsanityPrices"), RO_SHOPSANITY_PRICE_BALANCED); - cvarSettings[RSK_SHOPSANITY_PRICES_AFFORDABLE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShopsanityPricesAffordable"), RO_SHOPSANITY_OFF); - cvarSettings[RSK_SHUFFLE_SCRUBS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleScrubs"), RO_SCRUBS_OFF); - cvarSettings[RSK_SHUFFLE_COWS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleCows"), 0); - cvarSettings[RSK_SHUFFLE_ADULT_TRADE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleAdultTrade"), 0); - cvarSettings[RSK_SHUFFLE_MAGIC_BEANS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleBeans"), 0); - cvarSettings[RSK_SHUFFLE_MERCHANTS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleMerchants"), RO_SHUFFLE_MERCHANTS_OFF); - cvarSettings[RSK_SHUFFLE_100_GS_REWARD] = CVarGetInteger(RANDOMIZER_SEED_CVAR("Shuffle100GSReward"), RO_GENERIC_OFF); - cvarSettings[RSK_ENABLE_BOMBCHU_DROPS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("EnableBombchuDrops"), 0); - cvarSettings[RSK_BOMBCHUS_IN_LOGIC] = CVarGetInteger(RANDOMIZER_SEED_CVAR("BombchusInLogic"), 0); - cvarSettings[RSK_SKIP_CHILD_ZELDA] = CVarGetInteger(RANDOMIZER_SEED_CVAR("SkipChildZelda"), 0); + cvarSettings[RSK_LOGIC_RULES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS); + cvarSettings[RSK_ALL_LOCATIONS_REACHABLE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("AllLocationsReachable"), RO_GENERIC_ON); + cvarSettings[RSK_FOREST] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("Forest"), RO_FOREST_CLOSED); + cvarSettings[RSK_KAK_GATE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("KakarikoGate"), RO_KAK_GATE_CLOSED); + cvarSettings[RSK_DOOR_OF_TIME] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("DoorOfTime"), RO_DOOROFTIME_CLOSED); + cvarSettings[RSK_ZORAS_FOUNTAIN] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ZorasFountain"), 0); + cvarSettings[RSK_STARTING_AGE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingAge"), RO_AGE_CHILD); + cvarSettings[RSK_GERUDO_FORTRESS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_NORMAL); + cvarSettings[RSK_RAINBOW_BRIDGE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("RainbowBridge"), RO_BRIDGE_VANILLA); + cvarSettings[RSK_RAINBOW_BRIDGE_STONE_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StoneCount"), 3); + cvarSettings[RSK_RAINBOW_BRIDGE_MEDALLION_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MedallionCount"), 6); + cvarSettings[RSK_RAINBOW_BRIDGE_REWARD_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("RewardCount"), 9); + cvarSettings[RSK_RAINBOW_BRIDGE_DUNGEON_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("DungeonCount"), 8); + cvarSettings[RSK_RAINBOW_BRIDGE_TOKEN_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("TokenCount"), 100); + cvarSettings[RSK_BRIDGE_OPTIONS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("BridgeRewardOptions"), 0); + cvarSettings[RSK_GANONS_TRIALS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SET_NUMBER); + cvarSettings[RSK_TRIAL_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("GanonTrialCount"), 6); + cvarSettings[RSK_STARTING_OCARINA] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingOcarina"), 0); + cvarSettings[RSK_SHUFFLE_OCARINA] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), 0) || + CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingOcarina"), 0); + cvarSettings[RSK_STARTING_KOKIRI_SWORD] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingKokiriSword"), 0); + cvarSettings[RSK_SHUFFLE_KOKIRI_SWORD] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), 0) || + CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingKokiriSword"), 0); + cvarSettings[RSK_SHUFFLE_MASTER_SWORD] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleMasterSword"), 0); + cvarSettings[RSK_STARTING_DEKU_SHIELD] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingDekuShield"), 0); + cvarSettings[RSK_STARTING_ZELDAS_LULLABY] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingZeldasLullaby"), 0); + cvarSettings[RSK_STARTING_EPONAS_SONG] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingEponasSong"), 0); + cvarSettings[RSK_STARTING_SARIAS_SONG] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingSariasSong"), 0); + cvarSettings[RSK_STARTING_SUNS_SONG] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingSunsSong"), 0); + cvarSettings[RSK_STARTING_SONG_OF_TIME] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingSongOfTime"), 0); + cvarSettings[RSK_STARTING_SONG_OF_STORMS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingSongOfStorms"), 0); + cvarSettings[RSK_STARTING_MINUET_OF_FOREST] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingMinuetOfForest"), 0); + cvarSettings[RSK_STARTING_BOLERO_OF_FIRE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingBoleroOfFire"), 0); + cvarSettings[RSK_STARTING_SERENADE_OF_WATER] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingSerenadeOfWater"), 0); + cvarSettings[RSK_STARTING_REQUIEM_OF_SPIRIT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingRequiemOfSpirit"), 0); + cvarSettings[RSK_STARTING_NOCTURNE_OF_SHADOW] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingNocturneOfShadow"), 0); + cvarSettings[RSK_STARTING_PRELUDE_OF_LIGHT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingPreludeOfLight"), 0); + cvarSettings[RSK_STARTING_SKULLTULA_TOKEN] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingSkulltulaToken"), 0); + cvarSettings[RSK_STARTING_MAPS_COMPASSES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON); + cvarSettings[RSK_SHUFFLE_DUNGEON_REWARDS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_END_OF_DUNGEON); + cvarSettings[RSK_SHUFFLE_SONGS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleSongs"), RO_SONG_SHUFFLE_SONG_LOCATIONS); + cvarSettings[RSK_SHUFFLE_TOKENS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleTokens"), RO_TOKENSANITY_OFF); + cvarSettings[RSK_SHOPSANITY] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("Shopsanity"), RO_SHOPSANITY_OFF); + cvarSettings[RSK_SHOPSANITY_PRICES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShopsanityPrices"), RO_SHOPSANITY_PRICE_BALANCED); + cvarSettings[RSK_SHOPSANITY_PRICES_AFFORDABLE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShopsanityPricesAffordable"), RO_SHOPSANITY_OFF); + cvarSettings[RSK_SHUFFLE_SCRUBS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleScrubs"), RO_SCRUBS_OFF); + cvarSettings[RSK_SHUFFLE_COWS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleCows"), 0); + cvarSettings[RSK_SHUFFLE_ADULT_TRADE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleAdultTrade"), 0); + cvarSettings[RSK_SHUFFLE_MAGIC_BEANS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleBeans"), 0); + cvarSettings[RSK_SHUFFLE_MERCHANTS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleMerchants"), RO_SHUFFLE_MERCHANTS_OFF); + cvarSettings[RSK_SHUFFLE_100_GS_REWARD] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("Shuffle100GSReward"), RO_GENERIC_OFF); + cvarSettings[RSK_ENABLE_BOMBCHU_DROPS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("EnableBombchuDrops"), 0); + cvarSettings[RSK_BOMBCHUS_IN_LOGIC] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("BombchusInLogic"), 0); + cvarSettings[RSK_SKIP_CHILD_ZELDA] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), 0); // if we skip child zelda, we start with zelda's letter, and malon starts // at the ranch, so we should *not* shuffle the weird egg - cvarSettings[RSK_SHUFFLE_WEIRD_EGG] = ((CVarGetInteger(RANDOMIZER_SEED_CVAR("SkipChildZelda"), 0) == 0) && - CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleWeirdEgg"), 0)); - cvarSettings[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGerudoToken"), 0); - cvarSettings[RSK_SHUFFLE_FROG_SONG_RUPEES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleFrogSongRupees"), 0); - cvarSettings[RSK_ITEM_POOL] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ItemPool"), RO_ITEM_POOL_BALANCED); - cvarSettings[RSK_ICE_TRAPS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("IceTraps"), RO_ICE_TRAPS_NORMAL); - cvarSettings[RSK_TOT_ALTAR_HINT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("AltarHint"), RO_GENERIC_ON); - cvarSettings[RSK_LIGHT_ARROWS_HINT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("LAHint"), RO_GENERIC_ON); - cvarSettings[RSK_DAMPES_DIARY_HINT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("DampeHint"), RO_GENERIC_OFF); - cvarSettings[RSK_GREG_HINT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("GregHint"), RO_GENERIC_OFF); - cvarSettings[RSK_SARIA_HINT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("SariaHint"), RO_GENERIC_OFF); - cvarSettings[RSK_FROGS_HINT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("FrogsHint"), RO_GENERIC_OFF); - cvarSettings[RSK_WARP_SONG_HINTS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("WarpSongText"), RO_GENERIC_OFF); - cvarSettings[RSK_SCRUB_TEXT_HINT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ScrubText"), RO_GENERIC_OFF); - cvarSettings[RSK_KAK_10_SKULLS_HINT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("10GSHint"), RO_GENERIC_OFF); - cvarSettings[RSK_KAK_20_SKULLS_HINT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("20GSHint"), RO_GENERIC_OFF); - cvarSettings[RSK_KAK_30_SKULLS_HINT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("30GSHint"), RO_GENERIC_OFF); - cvarSettings[RSK_KAK_40_SKULLS_HINT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("40GSHint"), RO_GENERIC_OFF); - cvarSettings[RSK_KAK_50_SKULLS_HINT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("50GSHint"), RO_GENERIC_OFF); - cvarSettings[RSK_GOSSIP_STONE_HINTS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("GossipStoneHints"), RO_GOSSIP_STONES_NEED_NOTHING); - cvarSettings[RSK_HINT_CLARITY] = CVarGetInteger(RANDOMIZER_SEED_CVAR("HintClarity"), RO_HINT_CLARITY_CLEAR); - cvarSettings[RSK_HINT_DISTRIBUTION] = CVarGetInteger(RANDOMIZER_SEED_CVAR("HintDistribution"), RO_HINT_DIST_BALANCED); - cvarSettings[RSK_BLUE_FIRE_ARROWS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("BlueFireArrows"), 0); - cvarSettings[RSK_SUNLIGHT_ARROWS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("SunlightArrows"), 0); - cvarSettings[RSK_KEYSANITY] = CVarGetInteger(RANDOMIZER_SEED_CVAR("Keysanity"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON); - cvarSettings[RSK_GERUDO_KEYS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("GerudoKeys"), RO_GERUDO_KEYS_VANILLA); - cvarSettings[RSK_KEYRINGS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleKeyRings"), RO_KEYRINGS_OFF); - int maxKeyringCount = (CVarGetInteger(RANDOMIZER_SEED_CVAR("GerudoFortress"), RO_GF_NORMAL) == RO_GF_NORMAL && - CVarGetInteger(RANDOMIZER_SEED_CVAR("GerudoKeys"), RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA) ? 9 : 8; - cvarSettings[RSK_KEYRINGS_RANDOM_COUNT] = std::min(CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleKeyRingsRandomCount"), maxKeyringCount), maxKeyringCount); + cvarSettings[RSK_SHUFFLE_WEIRD_EGG] = ((CVarGetInteger(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), 0) == 0) && + CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleWeirdEgg"), 0)); + cvarSettings[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGerudoToken"), 0); + cvarSettings[RSK_SHUFFLE_FROG_SONG_RUPEES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleFrogSongRupees"), 0); + cvarSettings[RSK_ITEM_POOL] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ItemPool"), RO_ITEM_POOL_BALANCED); + cvarSettings[RSK_ICE_TRAPS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("IceTraps"), RO_ICE_TRAPS_NORMAL); + cvarSettings[RSK_TOT_ALTAR_HINT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("AltarHint"), RO_GENERIC_ON); + cvarSettings[RSK_LIGHT_ARROWS_HINT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("LAHint"), RO_GENERIC_ON); + cvarSettings[RSK_DAMPES_DIARY_HINT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("DampeHint"), RO_GENERIC_OFF); + cvarSettings[RSK_GREG_HINT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("GregHint"), RO_GENERIC_OFF); + cvarSettings[RSK_SARIA_HINT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("SariaHint"), RO_GENERIC_OFF); + cvarSettings[RSK_FROGS_HINT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("FrogsHint"), RO_GENERIC_OFF); + cvarSettings[RSK_WARP_SONG_HINTS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("WarpSongText"), RO_GENERIC_OFF); + cvarSettings[RSK_SCRUB_TEXT_HINT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ScrubText"), RO_GENERIC_OFF); + cvarSettings[RSK_KAK_10_SKULLS_HINT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("10GSHint"), RO_GENERIC_OFF); + cvarSettings[RSK_KAK_20_SKULLS_HINT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("20GSHint"), RO_GENERIC_OFF); + cvarSettings[RSK_KAK_30_SKULLS_HINT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("30GSHint"), RO_GENERIC_OFF); + cvarSettings[RSK_KAK_40_SKULLS_HINT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("40GSHint"), RO_GENERIC_OFF); + cvarSettings[RSK_KAK_50_SKULLS_HINT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("50GSHint"), RO_GENERIC_OFF); + cvarSettings[RSK_GOSSIP_STONE_HINTS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("GossipStoneHints"), RO_GOSSIP_STONES_NEED_NOTHING); + cvarSettings[RSK_HINT_CLARITY] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("HintClarity"), RO_HINT_CLARITY_CLEAR); + cvarSettings[RSK_HINT_DISTRIBUTION] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("HintDistribution"), RO_HINT_DIST_BALANCED); + cvarSettings[RSK_BLUE_FIRE_ARROWS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("BlueFireArrows"), 0); + cvarSettings[RSK_SUNLIGHT_ARROWS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("SunlightArrows"), 0); + cvarSettings[RSK_KEYSANITY] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("Keysanity"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON); + cvarSettings[RSK_GERUDO_KEYS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_VANILLA); + cvarSettings[RSK_KEYRINGS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleKeyRings"), RO_KEYRINGS_OFF); + int maxKeyringCount = (CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_NORMAL) == RO_GF_NORMAL && + CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA) ? 9 : 8; + cvarSettings[RSK_KEYRINGS_RANDOM_COUNT] = std::min(CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsRandomCount"), maxKeyringCount), maxKeyringCount); // Don't allow this to be on if Gerudo Fortress Carpenters is anything other than Normal cvarSettings[RSK_KEYRINGS_GERUDO_FORTRESS] = - (CVarGetInteger(RANDOMIZER_SEED_CVAR("GerudoFortress"), RO_GF_NORMAL) == RO_GF_NORMAL && - CVarGetInteger(RANDOMIZER_SEED_CVAR("GerudoKeys"), RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA) - ? CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleKeyRingsGerudoFortress"), RO_GENERIC_OFF) : RO_GENERIC_OFF; - cvarSettings[RSK_KEYRINGS_FOREST_TEMPLE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleKeyRingsForestTemple"), 0); - cvarSettings[RSK_KEYRINGS_FIRE_TEMPLE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleKeyRingsFireTemple"), 0); - cvarSettings[RSK_KEYRINGS_WATER_TEMPLE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleKeyRingsWaterTemple"), 0); - cvarSettings[RSK_KEYRINGS_SPIRIT_TEMPLE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleKeyRingsSpiritTemple"), 0); - cvarSettings[RSK_KEYRINGS_SHADOW_TEMPLE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleKeyRingsShadowTemple"), 0); - cvarSettings[RSK_KEYRINGS_BOTTOM_OF_THE_WELL] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleKeyRingsBottomOfTheWell"), 0); - cvarSettings[RSK_KEYRINGS_GTG] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleKeyRingsGTG"), 0); - cvarSettings[RSK_KEYRINGS_GANONS_CASTLE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleKeyRingsGanonsCastle"), 0); - cvarSettings[RSK_BOSS_KEYSANITY] = CVarGetInteger(RANDOMIZER_SEED_CVAR("BossKeysanity"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON); - cvarSettings[RSK_GANONS_BOSS_KEY] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA); - cvarSettings[RSK_LACS_STONE_COUNT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("LacsStoneCount"), 3); - cvarSettings[RSK_LACS_MEDALLION_COUNT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("LacsMedallionCount"), 6); - cvarSettings[RSK_LACS_REWARD_COUNT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("LacsRewardCount"), 9); - cvarSettings[RSK_LACS_DUNGEON_COUNT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("LacsDungeonCount"), 8); - cvarSettings[RSK_LACS_TOKEN_COUNT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("LacsTokenCount"), 100); - cvarSettings[RSK_LACS_OPTIONS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("LacsRewardOptions"), 0); - cvarSettings[RSK_STARTING_CONSUMABLES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingConsumables"), 0); - cvarSettings[RSK_FULL_WALLETS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("FullWallets"), 0); + (CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_NORMAL) == RO_GF_NORMAL && + CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA) + ? CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsGerudoFortress"), RO_GENERIC_OFF) : RO_GENERIC_OFF; + cvarSettings[RSK_KEYRINGS_FOREST_TEMPLE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsForestTemple"), 0); + cvarSettings[RSK_KEYRINGS_FIRE_TEMPLE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsFireTemple"), 0); + cvarSettings[RSK_KEYRINGS_WATER_TEMPLE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsWaterTemple"), 0); + cvarSettings[RSK_KEYRINGS_SPIRIT_TEMPLE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsSpiritTemple"), 0); + cvarSettings[RSK_KEYRINGS_SHADOW_TEMPLE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsShadowTemple"), 0); + cvarSettings[RSK_KEYRINGS_BOTTOM_OF_THE_WELL] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsBottomOfTheWell"), 0); + cvarSettings[RSK_KEYRINGS_GTG] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsGTG"), 0); + cvarSettings[RSK_KEYRINGS_GANONS_CASTLE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsGanonsCastle"), 0); + cvarSettings[RSK_BOSS_KEYSANITY] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("BossKeysanity"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON); + cvarSettings[RSK_GANONS_BOSS_KEY] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA); + cvarSettings[RSK_LACS_STONE_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("LacsStoneCount"), 3); + cvarSettings[RSK_LACS_MEDALLION_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("LacsMedallionCount"), 6); + cvarSettings[RSK_LACS_REWARD_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("LacsRewardCount"), 9); + cvarSettings[RSK_LACS_DUNGEON_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("LacsDungeonCount"), 8); + cvarSettings[RSK_LACS_TOKEN_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("LacsTokenCount"), 100); + cvarSettings[RSK_LACS_OPTIONS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("LacsRewardOptions"), 0); + cvarSettings[RSK_STARTING_CONSUMABLES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingConsumables"), 0); + cvarSettings[RSK_FULL_WALLETS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("FullWallets"), 0); // RANDOTODO implement chest minigame shuffle with keysanity cvarSettings[RSK_SHUFFLE_CHEST_MINIGAME] = false; cvarSettings[RSK_LANGUAGE] = CVarGetInteger("gLanguages", 0); - cvarSettings[RSK_CUCCO_COUNT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("CuccosToReturn"), 7); - cvarSettings[RSK_BIG_POE_COUNT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("BigPoeTargetCount"), 10); + cvarSettings[RSK_CUCCO_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 7); + cvarSettings[RSK_BIG_POE_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), 10); // If we skip child zelda, skip child stealth is pointless, so this needs to be reflected in the spoiler log - cvarSettings[RSK_SKIP_CHILD_STEALTH] = !CVarGetInteger(RANDOMIZER_SEED_CVAR("SkipChildZelda"), 0) && CVarGetInteger(RANDOMIZER_SEED_CVAR("SkipChildStealth"), 0); + cvarSettings[RSK_SKIP_CHILD_STEALTH] = !CVarGetInteger(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), 0) && CVarGetInteger(CVAR_RANDOMIZER_SETTING("SkipChildStealth"), 0); - cvarSettings[RSK_SKIP_EPONA_RACE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("SkipEponaRace"), 0); - cvarSettings[RSK_SKIP_TOWER_ESCAPE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("SkipTowerEscape"), 0); - cvarSettings[RSK_COMPLETE_MASK_QUEST] = CVarGetInteger(RANDOMIZER_SEED_CVAR("CompleteMaskQuest"), 0); - cvarSettings[RSK_SKIP_SCARECROWS_SONG] = CVarGetInteger(RANDOMIZER_SEED_CVAR("SkipScarecrowsSong"), 0); - cvarSettings[RSK_ENABLE_GLITCH_CUTSCENES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("EnableGlitchCutscenes"), 0); + cvarSettings[RSK_SKIP_EPONA_RACE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("SkipEponaRace"), 0); + cvarSettings[RSK_SKIP_TOWER_ESCAPE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("SkipTowerEscape"), 0); + cvarSettings[RSK_COMPLETE_MASK_QUEST] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("CompleteMaskQuest"), 0); + cvarSettings[RSK_SKIP_SCARECROWS_SONG] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("SkipScarecrowsSong"), 0); + cvarSettings[RSK_ENABLE_GLITCH_CUTSCENES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("EnableGlitchCutscenes"), 0); - cvarSettings[RSK_SKULLS_SUNS_SONG] = CVarGetInteger(RANDOMIZER_SEED_CVAR("GsExpectSunsSong"), 0); + cvarSettings[RSK_SKULLS_SUNS_SONG] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("GsExpectSunsSong"), 0); // Link's Pocket has to have a dungeon reward if the other rewards are shuffled to end of dungeon. - cvarSettings[RSK_LINKS_POCKET] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_END_OF_DUNGEON) != RO_DUNGEON_REWARDS_END_OF_DUNGEON ? - CVarGetInteger(RANDOMIZER_SEED_CVAR("LinksPocket"), RO_LINKS_POCKET_DUNGEON_REWARD) : RO_LINKS_POCKET_DUNGEON_REWARD; + cvarSettings[RSK_LINKS_POCKET] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_END_OF_DUNGEON) != RO_DUNGEON_REWARDS_END_OF_DUNGEON ? + CVarGetInteger(CVAR_RANDOMIZER_SETTING("LinksPocket"), RO_LINKS_POCKET_DUNGEON_REWARD) : RO_LINKS_POCKET_DUNGEON_REWARD; if (OTRGlobals::Instance->HasMasterQuest() && OTRGlobals::Instance->HasOriginal()) { // If both OTRs are loaded. - cvarSettings[RSK_RANDOM_MQ_DUNGEONS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeons"), RO_MQ_DUNGEONS_NONE); - cvarSettings[RSK_MQ_DUNGEON_COUNT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeonCount"), 12); + cvarSettings[RSK_RANDOM_MQ_DUNGEONS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeons"), RO_MQ_DUNGEONS_NONE); + cvarSettings[RSK_MQ_DUNGEON_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonCount"), 12); } else if (OTRGlobals::Instance->HasMasterQuest()) { // If only Master Quest is loaded. cvarSettings[RSK_RANDOM_MQ_DUNGEONS] = RO_MQ_DUNGEONS_SET_NUMBER; @@ -2978,52 +2978,52 @@ void GenerateRandomizerImgui(std::string seed = "") { cvarSettings[RSK_MQ_DUNGEON_COUNT] = 0; } - cvarSettings[RSK_TRIFORCE_HUNT] = CVarGetInteger(RANDOMIZER_SEED_CVAR("TriforceHunt"), 0); - cvarSettings[RSK_TRIFORCE_HUNT_PIECES_TOTAL] = CVarGetInteger(RANDOMIZER_SEED_CVAR("TriforceHuntTotalPieces"), 30); - cvarSettings[RSK_TRIFORCE_HUNT_PIECES_REQUIRED] = CVarGetInteger(RANDOMIZER_SEED_CVAR("TriforceHuntRequiredPieces"), 20); + cvarSettings[RSK_TRIFORCE_HUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("TriforceHunt"), 0); + cvarSettings[RSK_TRIFORCE_HUNT_PIECES_TOTAL] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("TriforceHuntTotalPieces"), 30); + cvarSettings[RSK_TRIFORCE_HUNT_PIECES_REQUIRED] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("TriforceHuntRequiredPieces"), 20); - cvarSettings[RSK_MQ_DEKU_TREE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeonsDekuTree"), 0); - cvarSettings[RSK_MQ_DODONGOS_CAVERN] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeonsDodongosCavern"), 0); - cvarSettings[RSK_MQ_JABU_JABU] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeonsJabuJabu"), 0); - cvarSettings[RSK_MQ_FOREST_TEMPLE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeonsForestTemple"), 0); - cvarSettings[RSK_MQ_FIRE_TEMPLE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeonsFireTemple"), 0); - cvarSettings[RSK_MQ_WATER_TEMPLE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeonsWaterTemple"), 0); - cvarSettings[RSK_MQ_SPIRIT_TEMPLE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeonsSpiritTemple"), 0); - cvarSettings[RSK_MQ_SHADOW_TEMPLE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeonsShadowTemple"), 0); - cvarSettings[RSK_MQ_BOTTOM_OF_THE_WELL] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeonsBottomOfTheWell"), 0); - cvarSettings[RSK_MQ_ICE_CAVERN] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeonsIceCavern"), 0); - cvarSettings[RSK_MQ_GTG] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeonsGTG"), 0); - cvarSettings[RSK_MQ_GANONS_CASTLE] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeonsGanonsCastle"), 0); + cvarSettings[RSK_MQ_DEKU_TREE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonsDekuTree"), 0); + cvarSettings[RSK_MQ_DODONGOS_CAVERN] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonsDodongosCavern"), 0); + cvarSettings[RSK_MQ_JABU_JABU] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonsJabuJabu"), 0); + cvarSettings[RSK_MQ_FOREST_TEMPLE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonsForestTemple"), 0); + cvarSettings[RSK_MQ_FIRE_TEMPLE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonsFireTemple"), 0); + cvarSettings[RSK_MQ_WATER_TEMPLE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonsWaterTemple"), 0); + cvarSettings[RSK_MQ_SPIRIT_TEMPLE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonsSpiritTemple"), 0); + cvarSettings[RSK_MQ_SHADOW_TEMPLE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonsShadowTemple"), 0); + cvarSettings[RSK_MQ_BOTTOM_OF_THE_WELL] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonsBottomOfTheWell"), 0); + cvarSettings[RSK_MQ_ICE_CAVERN] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonsIceCavern"), 0); + cvarSettings[RSK_MQ_GTG] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonsGTG"), 0); + cvarSettings[RSK_MQ_GANONS_CASTLE] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonsGanonsCastle"), 0); // Enable if any of the entrance rando options are enabled. - cvarSettings[RSK_SHUFFLE_ENTRANCES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleDungeonsEntrances"), RO_DUNGEON_ENTRANCE_SHUFFLE_OFF) || - CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleBossEntrances"), RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF) || - CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleOverworldEntrances"), RO_GENERIC_OFF) || - CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleInteriorsEntrances"), RO_INTERIOR_ENTRANCE_SHUFFLE_OFF) || - CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGrottosEntrances"), RO_GENERIC_OFF) || - CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleOwlDrops"), RO_GENERIC_OFF) || - CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleWarpSongs"), RO_GENERIC_OFF) || - CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleOverworldSpawns"), RO_GENERIC_OFF); - - cvarSettings[RSK_SHUFFLE_DUNGEON_ENTRANCES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleDungeonsEntrances"), RO_DUNGEON_ENTRANCE_SHUFFLE_OFF); - cvarSettings[RSK_SHUFFLE_BOSS_ENTRANCES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleBossEntrances"), RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF); - cvarSettings[RSK_SHUFFLE_OVERWORLD_ENTRANCES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleOverworldEntrances"), RO_GENERIC_OFF); - cvarSettings[RSK_SHUFFLE_INTERIOR_ENTRANCES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleInteriorsEntrances"), RO_INTERIOR_ENTRANCE_SHUFFLE_OFF); - cvarSettings[RSK_SHUFFLE_GROTTO_ENTRANCES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGrottosEntrances"), RO_GENERIC_OFF); - cvarSettings[RSK_SHUFFLE_OWL_DROPS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleOwlDrops"), RO_GENERIC_OFF); - cvarSettings[RSK_SHUFFLE_WARP_SONGS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleWarpSongs"), RO_GENERIC_OFF); - cvarSettings[RSK_SHUFFLE_OVERWORLD_SPAWNS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleOverworldSpawns"), RO_GENERIC_OFF); - cvarSettings[RSK_MIXED_ENTRANCE_POOLS] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MixedEntrances"), RO_GENERIC_OFF); - cvarSettings[RSK_MIX_DUNGEON_ENTRANCES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MixDungeons"), RO_GENERIC_OFF); - cvarSettings[RSK_MIX_BOSS_ENTRANCES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MixBosses"), RO_GENERIC_OFF); - cvarSettings[RSK_MIX_OVERWORLD_ENTRANCES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MixOverworld"), RO_GENERIC_OFF); - cvarSettings[RSK_MIX_INTERIOR_ENTRANCES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MixInteriors"), RO_GENERIC_OFF); - cvarSettings[RSK_MIX_GROTTO_ENTRANCES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("MixGrottos"), RO_GENERIC_OFF); - cvarSettings[RSK_DECOUPLED_ENTRANCES] = CVarGetInteger(RANDOMIZER_SEED_CVAR("DecoupleEntrances"), RO_GENERIC_OFF); + cvarSettings[RSK_SHUFFLE_ENTRANCES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleDungeonsEntrances"), RO_DUNGEON_ENTRANCE_SHUFFLE_OFF) || + CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleBossEntrances"), RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF) || + CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleOverworldEntrances"), RO_GENERIC_OFF) || + CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleInteriorsEntrances"), RO_INTERIOR_ENTRANCE_SHUFFLE_OFF) || + CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGrottosEntrances"), RO_GENERIC_OFF) || + CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleOwlDrops"), RO_GENERIC_OFF) || + CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleWarpSongs"), RO_GENERIC_OFF) || + CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleOverworldSpawns"), RO_GENERIC_OFF); + + cvarSettings[RSK_SHUFFLE_DUNGEON_ENTRANCES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleDungeonsEntrances"), RO_DUNGEON_ENTRANCE_SHUFFLE_OFF); + cvarSettings[RSK_SHUFFLE_BOSS_ENTRANCES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleBossEntrances"), RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF); + cvarSettings[RSK_SHUFFLE_OVERWORLD_ENTRANCES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleOverworldEntrances"), RO_GENERIC_OFF); + cvarSettings[RSK_SHUFFLE_INTERIOR_ENTRANCES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleInteriorsEntrances"), RO_INTERIOR_ENTRANCE_SHUFFLE_OFF); + cvarSettings[RSK_SHUFFLE_GROTTO_ENTRANCES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGrottosEntrances"), RO_GENERIC_OFF); + cvarSettings[RSK_SHUFFLE_OWL_DROPS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleOwlDrops"), RO_GENERIC_OFF); + cvarSettings[RSK_SHUFFLE_WARP_SONGS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleWarpSongs"), RO_GENERIC_OFF); + cvarSettings[RSK_SHUFFLE_OVERWORLD_SPAWNS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleOverworldSpawns"), RO_GENERIC_OFF); + cvarSettings[RSK_MIXED_ENTRANCE_POOLS] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MixedEntrances"), RO_GENERIC_OFF); + cvarSettings[RSK_MIX_DUNGEON_ENTRANCES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MixDungeons"), RO_GENERIC_OFF); + cvarSettings[RSK_MIX_BOSS_ENTRANCES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MixBosses"), RO_GENERIC_OFF); + cvarSettings[RSK_MIX_OVERWORLD_ENTRANCES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MixOverworld"), RO_GENERIC_OFF); + cvarSettings[RSK_MIX_INTERIOR_ENTRANCES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MixInteriors"), RO_GENERIC_OFF); + cvarSettings[RSK_MIX_GROTTO_ENTRANCES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MixGrottos"), RO_GENERIC_OFF); + cvarSettings[RSK_DECOUPLED_ENTRANCES] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("DecoupleEntrances"), RO_GENERIC_OFF); // todo: this efficently when we build out cvar array support std::set excludedLocations; - std::stringstream excludedLocationStringStream(CVarGetString(RANDOMIZER_SEED_CVAR("ExcludedLocations"), "")); + std::stringstream excludedLocationStringStream(CVarGetString(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), "")); std::string excludedLocationString; while (getline(excludedLocationStringStream, excludedLocationString, ',')) { excludedLocations.insert((RandomizerCheck)std::stoi(excludedLocationString)); @@ -3032,7 +3032,7 @@ void GenerateRandomizerImgui(std::string seed = "") { // todo: better way to sort out linking tricks rather than name std::set enabledTricks; - std::stringstream enabledTrickStringStream(CVarGetString(RANDOMIZER_SEED_CVAR("EnabledTricks"), "")); + std::stringstream enabledTrickStringStream(CVarGetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), "")); std::string enabledTrickString; while (getline(enabledTrickStringStream, enabledTrickString, ',')) { enabledTricks.insert((RandomizerTrick)std::stoi(enabledTrickString)); @@ -3149,13 +3149,13 @@ void RandomizerSettingsWindow::DrawElement() { UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f); } - ImGui::BeginDisabled(CVarGetInteger(SETTING_CVAR("DisableChanges"), 0)); + ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0)); DrawPresetSelector(PRESET_TYPE_RANDOMIZER); ImGui::EndDisabled(); UIWidgets::Spacer(0); - UIWidgets::EnhancementCheckbox("Manual seed entry", RANDOMIZER_SEED_CVAR("ManualSeedEntry"), false, ""); - if (CVarGetInteger(RANDOMIZER_SEED_CVAR("ManualSeedEntry"), 0)) { + UIWidgets::EnhancementCheckbox("Manual seed entry", CVAR_RANDOMIZER_SETTING("ManualSeedEntry"), false, ""); + if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ManualSeedEntry"), 0)) { ImGui::Text("Seed"); ImGui::InputText("##RandomizerSeed", seedString, MAX_SEED_STRING_SIZE, ImGuiInputTextFlags_CallbackCharFilter, UIWidgets::TextFilters::FilterAlphaNum); UIWidgets::Tooltip( @@ -3174,14 +3174,14 @@ void RandomizerSettingsWindow::DrawElement() { } UIWidgets::Spacer(0); - ImGui::BeginDisabled(CVarGetInteger(RANDOMIZER_SEED_CVAR("DontGenerateSpoiler"), 0) && gSaveContext.gameMode != GAMEMODE_FILE_SELECT); + ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0) && gSaveContext.gameMode != GAMEMODE_FILE_SELECT); if (ImGui::Button("Generate Randomizer")) { - GenerateRandomizer(CVarGetInteger(RANDOMIZER_SEED_CVAR("ManualSeedEntry"), 0) ? seedString : ""); + GenerateRandomizer(CVarGetInteger(CVAR_RANDOMIZER_SETTING("ManualSeedEntry"), 0) ? seedString : ""); } ImGui::EndDisabled(); UIWidgets::Spacer(0); - if (!CVarGetInteger(RANDOMIZER_SEED_CVAR("DontGenerateSpoiler"), 0)) { + if (!CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0)) { std::string spoilerfilepath = CVarGetString("gSpoilerLog", ""); ImGui::Text("Spoiler File: %s", spoilerfilepath.c_str()); } @@ -3192,7 +3192,7 @@ void RandomizerSettingsWindow::DrawElement() { UIWidgets::PaddedSeparator(); - ImGui::BeginDisabled(CVarGetInteger(SETTING_CVAR("DisableChanges"), 0)); + ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0)); ImGuiWindow* window = ImGui::GetCurrentWindow(); static ImVec2 cellPadding(8.0f, 8.0f); @@ -3209,7 +3209,7 @@ void RandomizerSettingsWindow::DrawElement() { ImGui::PopItemFlag(); ImGui::TableNextRow(); - ImGui::BeginDisabled(CVarGetInteger(RANDOMIZER_SEED_CVAR("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA); + ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA); // COLUMN 1 - Area Access ImGui::TableNextColumn(); window->DC.CurrLineTextBaseOffset = 0.0f; @@ -3230,7 +3230,7 @@ void RandomizerSettingsWindow::DrawElement() { "Open - Mido no longer blocks the path to the Deku Tree. Kokiri " "boy no longer blocks the path out of the forest." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("Forest"), randoForest, RO_FOREST_CLOSED); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("Forest"), randoForest, RO_FOREST_CLOSED); UIWidgets::PaddedSeparator(); @@ -3243,7 +3243,7 @@ void RandomizerSettingsWindow::DrawElement() { "Open - The gate is always open. The happy mask shop " "will open immediately after obtaining Zelda's letter." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("KakarikoGate"), randoKakarikoGate, RO_KAK_GATE_CLOSED); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("KakarikoGate"), randoKakarikoGate, RO_KAK_GATE_CLOSED); UIWidgets::PaddedSeparator(); @@ -3258,7 +3258,7 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "Open - The Door of Time is permanently open with no requirements." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("DoorOfTime"), randoDoorOfTime, RO_DOOROFTIME_CLOSED); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("DoorOfTime"), randoDoorOfTime, RO_DOOROFTIME_CLOSED); UIWidgets::PaddedSeparator(); @@ -3275,7 +3275,7 @@ void RandomizerSettingsWindow::DrawElement() { "Open - King Zora has already mweeped out of the way in both " "time periods. Ruto's Letter is removed from the item pool." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("ZorasFountain"), randoZorasFountain, RO_ZF_CLOSED); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("ZorasFountain"), randoZorasFountain, RO_ZF_CLOSED); UIWidgets::PaddedSeparator(); @@ -3289,9 +3289,9 @@ void RandomizerSettingsWindow::DrawElement() { //Starting Age //Disabled when Forest is set to Closed or under very specific conditions - bool disableRandoStartingAge = CVarGetInteger(RANDOMIZER_SEED_CVAR("Forest"), RO_FOREST_CLOSED) == RO_FOREST_CLOSED || - ((CVarGetInteger(RANDOMIZER_SEED_CVAR("DoorOfTime"), RO_DOOROFTIME_CLOSED) == RO_DOOROFTIME_CLOSED) && - (CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleOcarinas"), RO_GENERIC_OFF) == RO_GENERIC_OFF)); // closed door of time with ocarina shuffle off + bool disableRandoStartingAge = CVarGetInteger(CVAR_RANDOMIZER_SETTING("Forest"), RO_FOREST_CLOSED) == RO_FOREST_CLOSED || + ((CVarGetInteger(CVAR_RANDOMIZER_SETTING("DoorOfTime"), RO_DOOROFTIME_CLOSED) == RO_DOOROFTIME_CLOSED) && + (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), RO_GENERIC_OFF) == RO_GENERIC_OFF)); // closed door of time with ocarina shuffle off static const char* disableRandoStartingAgeText = "This option is disabled due to other options making the game unbeatable."; ImGui::Text("%s", Settings::StartingAge.GetName().c_str()); @@ -3300,7 +3300,7 @@ void RandomizerSettingsWindow::DrawElement() { "Starting as adult means you start with the Master Sword in your inventory.\n" "The child option is forcefully set if it would conflict with other options." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("StartingAge"), randoStartingAge, RO_AGE_CHILD, disableRandoStartingAge, disableRandoStartingAgeText, RO_AGE_CHILD); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("StartingAge"), randoStartingAge, RO_AGE_CHILD, disableRandoStartingAge, disableRandoStartingAgeText, RO_AGE_CHILD); UIWidgets::PaddedSeparator(); @@ -3318,7 +3318,7 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "Only \"Normal\" is compatible with Gerudo Fortress Key Rings." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("GerudoFortress"), randoGerudoFortress, RO_GF_NORMAL); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("GerudoFortress"), randoGerudoFortress, RO_GF_NORMAL); UIWidgets::PaddedSeparator(); @@ -3347,9 +3347,9 @@ void RandomizerSettingsWindow::DrawElement() { "Greg - Find Greg the Green Rupee." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("RainbowBridge"), randoRainbowBridge, RO_BRIDGE_VANILLA); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("RainbowBridge"), randoRainbowBridge, RO_BRIDGE_VANILLA); ImGui::PopItemWidth(); - switch (CVarGetInteger(RANDOMIZER_SEED_CVAR("RainbowBridge"), RO_BRIDGE_VANILLA)) { + switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("RainbowBridge"), RO_BRIDGE_VANILLA)) { case RO_BRIDGE_ALWAYS_OPEN: break; case RO_BRIDGE_VANILLA: @@ -3367,19 +3367,19 @@ void RandomizerSettingsWindow::DrawElement() { "Greg as Wildcard - Greg does not change logic, Greg helps open the bridge, max number of " "rewards on slider does not change."); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("BridgeRewardOptions"), randoBridgeRewardOptions, RO_BRIDGE_STANDARD_REWARD); - switch (CVarGetInteger(RANDOMIZER_SEED_CVAR("BridgeRewardOptions"), RO_BRIDGE_STANDARD_REWARD)) { + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("BridgeRewardOptions"), randoBridgeRewardOptions, RO_BRIDGE_STANDARD_REWARD); + switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("BridgeRewardOptions"), RO_BRIDGE_STANDARD_REWARD)) { case RO_BRIDGE_STANDARD_REWARD: UIWidgets::PaddedEnhancementSliderInt("Stone Count: %d", "##RandoStoneCount", - RANDOMIZER_SEED_CVAR("StoneCount"), 1, 3, "", 3, true, true, false); + CVAR_RANDOMIZER_SETTING("StoneCount"), 1, 3, "", 3, true, true, false); break; case RO_BRIDGE_GREG_REWARD: UIWidgets::PaddedEnhancementSliderInt("Stone Count: %d", "##RandoStoneCount", - RANDOMIZER_SEED_CVAR("StoneCount"), 1, 4, "", 4, true, true, false); + CVAR_RANDOMIZER_SETTING("StoneCount"), 1, 4, "", 4, true, true, false); break; case RO_BRIDGE_WILDCARD_REWARD: UIWidgets::PaddedEnhancementSliderInt("Stone Count: %d", "##RandoStoneCount", - RANDOMIZER_SEED_CVAR("StoneCount"), 1, 3, "", 3, true, true, false); + CVAR_RANDOMIZER_SETTING("StoneCount"), 1, 3, "", 3, true, true, false); break; } break; @@ -3396,19 +3396,19 @@ void RandomizerSettingsWindow::DrawElement() { "Greg as Wildcard - Greg does not change logic, Greg helps open the bridge, max number of " "rewards on slider does not change."); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("BridgeRewardOptions"), randoBridgeRewardOptions, RO_BRIDGE_STANDARD_REWARD); - switch (CVarGetInteger(RANDOMIZER_SEED_CVAR("BridgeRewardOptions"), RO_BRIDGE_STANDARD_REWARD)) { + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("BridgeRewardOptions"), randoBridgeRewardOptions, RO_BRIDGE_STANDARD_REWARD); + switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("BridgeRewardOptions"), RO_BRIDGE_STANDARD_REWARD)) { case RO_BRIDGE_STANDARD_REWARD: UIWidgets::PaddedEnhancementSliderInt("Medallion Count: %d", "##RandoMedallionCount", - RANDOMIZER_SEED_CVAR("MedallionCount"), 1, 6, "", 6, true, true, false); + CVAR_RANDOMIZER_SETTING("MedallionCount"), 1, 6, "", 6, true, true, false); break; case RO_BRIDGE_GREG_REWARD: UIWidgets::PaddedEnhancementSliderInt("Medallion Count: %d", "##RandoMedallionCount", - RANDOMIZER_SEED_CVAR("MedallionCount"), 1, 7, "", 7, true, true, false); + CVAR_RANDOMIZER_SETTING("MedallionCount"), 1, 7, "", 7, true, true, false); break; case RO_BRIDGE_WILDCARD_REWARD: UIWidgets::PaddedEnhancementSliderInt("Medallion Count: %d", "##RandoMedallionCount", - RANDOMIZER_SEED_CVAR("MedallionCount"), 1, 6, "", 6, true, true, false); + CVAR_RANDOMIZER_SETTING("MedallionCount"), 1, 6, "", 6, true, true, false); break; } break; @@ -3425,19 +3425,19 @@ void RandomizerSettingsWindow::DrawElement() { "Greg as Wildcard - Greg does not change logic, Greg helps open the bridge, max number of " "rewards on slider does not change."); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("BridgeRewardOptions"), randoBridgeRewardOptions, RO_BRIDGE_STANDARD_REWARD); - switch (CVarGetInteger(RANDOMIZER_SEED_CVAR("BridgeRewardOptions"), RO_BRIDGE_STANDARD_REWARD)) { + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("BridgeRewardOptions"), randoBridgeRewardOptions, RO_BRIDGE_STANDARD_REWARD); + switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("BridgeRewardOptions"), RO_BRIDGE_STANDARD_REWARD)) { case RO_BRIDGE_STANDARD_REWARD: UIWidgets::PaddedEnhancementSliderInt("Reward Count: %d", "##RandoRewardCount", - RANDOMIZER_SEED_CVAR("RewardCount"), 1, 9, "", 9, true, true, false); + CVAR_RANDOMIZER_SETTING("RewardCount"), 1, 9, "", 9, true, true, false); break; case RO_BRIDGE_GREG_REWARD: UIWidgets::PaddedEnhancementSliderInt("Reward Count: %d", "##RandoRewardCount", - RANDOMIZER_SEED_CVAR("RewardCount"), 1, 10, "", 10, true, true, false); + CVAR_RANDOMIZER_SETTING("RewardCount"), 1, 10, "", 10, true, true, false); break; case RO_BRIDGE_WILDCARD_REWARD: UIWidgets::PaddedEnhancementSliderInt("Reward Count: %d", "##RandoRewardCount", - RANDOMIZER_SEED_CVAR("RewardCount"), 1, 9, "", 9, true, true, false); + CVAR_RANDOMIZER_SETTING("RewardCount"), 1, 9, "", 9, true, true, false); break; } @@ -3455,25 +3455,25 @@ void RandomizerSettingsWindow::DrawElement() { "Greg as Wildcard - Greg does not change logic, Greg helps open the bridge, max number of " "rewards on slider does not change."); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("BridgeRewardOptions"), randoBridgeRewardOptions, RO_BRIDGE_STANDARD_REWARD); - switch (CVarGetInteger(RANDOMIZER_SEED_CVAR("BridgeRewardOptions"), RO_BRIDGE_STANDARD_REWARD)) { + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("BridgeRewardOptions"), randoBridgeRewardOptions, RO_BRIDGE_STANDARD_REWARD); + switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("BridgeRewardOptions"), RO_BRIDGE_STANDARD_REWARD)) { case RO_BRIDGE_STANDARD_REWARD: UIWidgets::PaddedEnhancementSliderInt("Dungeon Count: %d", "##RandoDungeonCount", - RANDOMIZER_SEED_CVAR("DungeonCount"), 1, 8, "", 8, true, true, false); + CVAR_RANDOMIZER_SETTING("DungeonCount"), 1, 8, "", 8, true, true, false); break; case RO_BRIDGE_GREG_REWARD: UIWidgets::PaddedEnhancementSliderInt("Dungeon Count: %d", "##RandoDungeonCount", - RANDOMIZER_SEED_CVAR("DungeonCount"), 1, 9, "", 9, true, true, false); + CVAR_RANDOMIZER_SETTING("DungeonCount"), 1, 9, "", 9, true, true, false); break; case RO_BRIDGE_WILDCARD_REWARD: UIWidgets::PaddedEnhancementSliderInt("Dungeon Count: %d", "##RandoDungeonCount", - RANDOMIZER_SEED_CVAR("DungeonCount"), 1, 8, "", 8, true, true, false); + CVAR_RANDOMIZER_SETTING("DungeonCount"), 1, 8, "", 8, true, true, false); break; } break; case RO_BRIDGE_TOKENS: UIWidgets::PaddedEnhancementSliderInt("Token Count: %d", "##RandoTokenCount", - RANDOMIZER_SEED_CVAR("TokenCount"), 1, 100, "", 100, true, true, false); + CVAR_RANDOMIZER_SETTING("TokenCount"), 1, 100, "", 100, true, true, false); break; case RO_BRIDGE_GREG: break; @@ -3494,11 +3494,11 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "Random Number - A Random number and set of trials will be required." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("GanonTrial"), randoGanonsTrial, RO_GANONS_TRIALS_SET_NUMBER); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("GanonTrial"), randoGanonsTrial, RO_GANONS_TRIALS_SET_NUMBER); ImGui::PopItemWidth(); - if (CVarGetInteger(RANDOMIZER_SEED_CVAR("GanonTrial"), RO_GANONS_TRIALS_SET_NUMBER) == RO_GANONS_TRIALS_SET_NUMBER) { + if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("GanonTrial"), RO_GANONS_TRIALS_SET_NUMBER) == RO_GANONS_TRIALS_SET_NUMBER) { UIWidgets::PaddedEnhancementSliderInt("Ganon's Trial Count: %d", "##RandoTrialCount", - RANDOMIZER_SEED_CVAR("GanonTrialCount"), 1, 6, "", 6, true, true, false); + CVAR_RANDOMIZER_SETTING("GanonTrialCount"), 1, 6, "", 6, true, true, false); UIWidgets::InsertHelpHoverText("Set the number of trials required to enter Ganon's Tower."); } @@ -3522,46 +3522,46 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "Selection - Leave unchecked for Vanilla and checked for Master Quest." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("MQDungeons"), randoMqDungeons, RO_MQ_DUNGEONS_NONE); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("MQDungeons"), randoMqDungeons, RO_MQ_DUNGEONS_NONE); ImGui::PopItemWidth(); - if (CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeons"), RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_SET_NUMBER) { + if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeons"), RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_SET_NUMBER) { UIWidgets::PaddedEnhancementSliderInt( - "Master Quest Dungeon Count: %d", "##RandoMqDungeonCount", RANDOMIZER_SEED_CVAR("MQDungeonCount"), 1, - 12, "", CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeonCount"), 12), true, true, false); + "Master Quest Dungeon Count: %d", "##RandoMqDungeonCount", CVAR_RANDOMIZER_SETTING("MQDungeonCount"), 1, + 12, "", CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonCount"), 12), true, true, false); } - else if (CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeons"), RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_SELECTION) { + else if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeons"), RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_SELECTION) { UIWidgets::EnhancementCheckbox("Deku Tree##RandomizeMqDungeons", - RANDOMIZER_SEED_CVAR("MQDungeonsDekuTree")); + CVAR_RANDOMIZER_SETTING("MQDungeonsDekuTree")); UIWidgets::EnhancementCheckbox("Dodongo's Cavern##RandomizeMqDungeons", - RANDOMIZER_SEED_CVAR("MQDungeonsDodongosCavern")); + CVAR_RANDOMIZER_SETTING("MQDungeonsDodongosCavern")); UIWidgets::EnhancementCheckbox("Jabu Jabu's Belly##RandomizeMqDungeons", - RANDOMIZER_SEED_CVAR("MQDungeonsJabuJabu")); + CVAR_RANDOMIZER_SETTING("MQDungeonsJabuJabu")); UIWidgets::EnhancementCheckbox("Forest Temple##RandomizeMqDungeons", - RANDOMIZER_SEED_CVAR("MQDungeonsForestTemple")); + CVAR_RANDOMIZER_SETTING("MQDungeonsForestTemple")); UIWidgets::EnhancementCheckbox("Fire Temple##RandomizeMqDungeons", - RANDOMIZER_SEED_CVAR("MQDungeonsFireTemple")); + CVAR_RANDOMIZER_SETTING("MQDungeonsFireTemple")); UIWidgets::EnhancementCheckbox("Water Temple##RandomizeMqDungeons", - RANDOMIZER_SEED_CVAR("MQDungeonsWaterTemple")); + CVAR_RANDOMIZER_SETTING("MQDungeonsWaterTemple")); UIWidgets::EnhancementCheckbox("Spirit Temple##RandomizeMqDungeons", - RANDOMIZER_SEED_CVAR("MQDungeonsSpiritTemple")); + CVAR_RANDOMIZER_SETTING("MQDungeonsSpiritTemple")); UIWidgets::EnhancementCheckbox("Shadow Temple##RandomizeMqDungeons", - RANDOMIZER_SEED_CVAR("MQDungeonsShadowTemple")); + CVAR_RANDOMIZER_SETTING("MQDungeonsShadowTemple")); UIWidgets::EnhancementCheckbox("Bottom of the Well##RandomizeMqDungeons", - RANDOMIZER_SEED_CVAR("MQDungeonsBottomOfTheWell")); + CVAR_RANDOMIZER_SETTING("MQDungeonsBottomOfTheWell")); UIWidgets::EnhancementCheckbox("Ice Cavern##RandomizeMqDungeons", - RANDOMIZER_SEED_CVAR("MQDungeonsIceCavern")); - UIWidgets::EnhancementCheckbox("Gerudo Training Grounds##RandomizeMqDungeons", RANDOMIZER_SEED_CVAR("MQDungeonsGTG")); + CVAR_RANDOMIZER_SETTING("MQDungeonsIceCavern")); + UIWidgets::EnhancementCheckbox("Gerudo Training Grounds##RandomizeMqDungeons", CVAR_RANDOMIZER_SETTING("MQDungeonsGTG")); UIWidgets::EnhancementCheckbox("Ganon's Castle##RandomizeMqDungeons", - RANDOMIZER_SEED_CVAR("MQDungeonsGanonsCastle")); + CVAR_RANDOMIZER_SETTING("MQDungeonsGanonsCastle")); } UIWidgets::PaddedSeparator(); } - ImGui::BeginDisabled(CVarGetInteger(RANDOMIZER_SEED_CVAR("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA); + ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA); // Triforce Hunt - UIWidgets::EnhancementCheckbox("Triforce Hunt", RANDOMIZER_SEED_CVAR("TriforceHunt")); + UIWidgets::EnhancementCheckbox("Triforce Hunt", CVAR_RANDOMIZER_SETTING("TriforceHunt")); UIWidgets::InsertHelpHoverText( "Pieces of the Triforce of Courage have been scattered across the world. Find them all to finish the game!\n\n" "When the required amount of pieces have been found, the game is saved and Ganon's Boss key is given " @@ -3569,26 +3569,26 @@ void RandomizerSettingsWindow::DrawElement() { "Keep in mind Ganon might not be logically beatable when \"All Locations Reachable\" is turned off." ); - if (CVarGetInteger(RANDOMIZER_SEED_CVAR("TriforceHunt"), 0)) { + if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("TriforceHunt"), 0)) { // Triforce Hunt (total pieces) UIWidgets::Spacer(0); - int totalPieces = CVarGetInteger(RANDOMIZER_SEED_CVAR("TriforceHuntTotalPieces"), 30); + int totalPieces = CVarGetInteger(CVAR_RANDOMIZER_SETTING("TriforceHuntTotalPieces"), 30); ImGui::Text("Triforce Pieces in the world: %d", totalPieces); UIWidgets::InsertHelpHoverText( "The amount of Triforce pieces that will be placed in the world. " "Keep in mind seed generation can fail if more pieces are placed than there are junk items in the item pool." ); ImGui::SameLine(); - UIWidgets::EnhancementSliderInt("", "##TriforceHuntTotalPieces", RANDOMIZER_SEED_CVAR("TriforceHuntTotalPieces"), 1, 100, "", 30); + UIWidgets::EnhancementSliderInt("", "##TriforceHuntTotalPieces", CVAR_RANDOMIZER_SETTING("TriforceHuntTotalPieces"), 1, 100, "", 30); // Triforce Hunt (required pieces) - int requiredPieces = CVarGetInteger(RANDOMIZER_SEED_CVAR("TriforceHuntRequiredPieces"), 20); + int requiredPieces = CVarGetInteger(CVAR_RANDOMIZER_SETTING("TriforceHuntRequiredPieces"), 20); ImGui::Text("Triforce Pieces to win: %d", requiredPieces); UIWidgets::InsertHelpHoverText( "The amount of Triforce pieces required to win the game." ); ImGui::SameLine(); - UIWidgets::EnhancementSliderInt("", "##TriforceHuntRequiredPieces", RANDOMIZER_SEED_CVAR("TriforceHuntRequiredPieces"), 1, totalPieces, "", 20); + UIWidgets::EnhancementSliderInt("", "##TriforceHuntRequiredPieces", CVAR_RANDOMIZER_SETTING("TriforceHuntRequiredPieces"), 1, totalPieces, "", 20); } UIWidgets::PaddedSeparator(); @@ -3615,7 +3615,7 @@ void RandomizerSettingsWindow::DrawElement() { "- Bottom of the Well will be open for adult after playing Song of Storms to the Windmill guy as child.\n" "- Gerudo Training Ground will be open for child after adult has paid to open the gate once." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("ShuffleDungeonsEntrances"), randoShuffleDungeonsEntrances, RO_DUNGEON_ENTRANCE_SHUFFLE_OFF); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("ShuffleDungeonsEntrances"), randoShuffleDungeonsEntrances, RO_DUNGEON_ENTRANCE_SHUFFLE_OFF); UIWidgets::PaddedSeparator(); @@ -3628,12 +3628,12 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "Full - Shuffle the entrances of all boss rooms together. Child may be expected to defeat Phantom Ganon and/or Bongo Bongo." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("ShuffleBossEntrances"), randoShuffleBossEntrances, RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("ShuffleBossEntrances"), randoShuffleBossEntrances, RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF); UIWidgets::PaddedSeparator(); // Shuffle Overworld Entrances - UIWidgets::EnhancementCheckbox("Shuffle Overworld Entrances", RANDOMIZER_SEED_CVAR("ShuffleOverworldEntrances")); + UIWidgets::EnhancementCheckbox("Shuffle Overworld Entrances", CVAR_RANDOMIZER_SETTING("ShuffleOverworldEntrances")); UIWidgets::InsertHelpHoverText( "Shuffle the pool of Overworld entrances, which corresponds to almost all loading zones between overworld areas.\n" "\n" @@ -3656,12 +3656,12 @@ void RandomizerSettingsWindow::DrawElement() { "- Temple of Time\n" "- Kakariko Potion Shop" ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("ShuffleInteriorsEntrances"), randoShuffleInteriorsEntrances, RO_INTERIOR_ENTRANCE_SHUFFLE_OFF); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("ShuffleInteriorsEntrances"), randoShuffleInteriorsEntrances, RO_INTERIOR_ENTRANCE_SHUFFLE_OFF); UIWidgets::PaddedSeparator(); // Shuffle Grotto Entrances - UIWidgets::EnhancementCheckbox("Shuffle Grotto Entrances", RANDOMIZER_SEED_CVAR("ShuffleGrottosEntrances")); + UIWidgets::EnhancementCheckbox("Shuffle Grotto Entrances", CVAR_RANDOMIZER_SETTING("ShuffleGrottosEntrances")); UIWidgets::InsertHelpHoverText( "Shuffle the pool of grotto entrances, including all graves, small Fairy fountains and the Deku Theatre." ); @@ -3669,7 +3669,7 @@ void RandomizerSettingsWindow::DrawElement() { UIWidgets::PaddedSeparator(); // Shuffle Owl Drops - UIWidgets::EnhancementCheckbox("Shuffle Owl Drops", RANDOMIZER_SEED_CVAR("ShuffleOwlDrops")); + UIWidgets::EnhancementCheckbox("Shuffle Owl Drops", CVAR_RANDOMIZER_SETTING("ShuffleOwlDrops")); UIWidgets::InsertHelpHoverText( "Randomize where Kaepora Gaebora (the Owl) drops you at when you talk " "to him at Lake Hylia or at the top of Death Mountain Trail." @@ -3678,7 +3678,7 @@ void RandomizerSettingsWindow::DrawElement() { UIWidgets::PaddedSeparator(); // Shuffle Warp Songs - UIWidgets::EnhancementCheckbox("Shuffle Warp Songs", RANDOMIZER_SEED_CVAR("ShuffleWarpSongs")); + UIWidgets::EnhancementCheckbox("Shuffle Warp Songs", CVAR_RANDOMIZER_SETTING("ShuffleWarpSongs")); UIWidgets::InsertHelpHoverText( "Randomize where each of the 6 warp songs leads to." ); @@ -3686,7 +3686,7 @@ void RandomizerSettingsWindow::DrawElement() { UIWidgets::PaddedSeparator(); // Shuffle Overworld Spawns - UIWidgets::EnhancementCheckbox("Shuffle Overworld Spawns", RANDOMIZER_SEED_CVAR("ShuffleOverworldSpawns")); + UIWidgets::EnhancementCheckbox("Shuffle Overworld Spawns", CVAR_RANDOMIZER_SETTING("ShuffleOverworldSpawns")); UIWidgets::InsertHelpHoverText( "Randomize where you start as Child or Adult when loading a save in the Overworld. This " "means you may not necessarily spawn inside Link's House or Temple of Time.\n" @@ -3700,7 +3700,7 @@ void RandomizerSettingsWindow::DrawElement() { UIWidgets::PaddedSeparator(); // Decouple Entrances - UIWidgets::EnhancementCheckbox("Decouple Entrances", RANDOMIZER_SEED_CVAR("DecoupleEntrances")); + UIWidgets::EnhancementCheckbox("Decouple Entrances", CVAR_RANDOMIZER_SETTING("DecoupleEntrances")); UIWidgets::InsertHelpHoverText( "Decouple entrances when shuffling them. This means you are no longer guaranteed " "to end up back where you came from when you go back through an entrance.\n" @@ -3712,7 +3712,7 @@ void RandomizerSettingsWindow::DrawElement() { UIWidgets::PaddedSeparator(); // Mixed Entrance Pools - UIWidgets::EnhancementCheckbox("Mixed Entrance Pools", RANDOMIZER_SEED_CVAR("MixedEntrances")); + UIWidgets::EnhancementCheckbox("Mixed Entrance Pools", CVAR_RANDOMIZER_SETTING("MixedEntrances")); UIWidgets::InsertHelpHoverText( "Shuffle entrances into a mixed pool instead of separate ones. Has no affect on pools whose " "entrances aren't shuffled, and \"Shuffle Boss Entrances\" must be set to \"Full\" to include them.\n" @@ -3722,36 +3722,36 @@ void RandomizerSettingsWindow::DrawElement() { "vice versa, while overworld entrances are shuffled in their own separate pool and indoors stay vanilla." ); - if (CVarGetInteger(RANDOMIZER_SEED_CVAR("MixedEntrances"), RO_GENERIC_OFF)) { - if (CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleDungeonsEntrances"), RO_GENERIC_OFF)) { + if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("MixedEntrances"), RO_GENERIC_OFF)) { + if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleDungeonsEntrances"), RO_GENERIC_OFF)) { UIWidgets::Spacer(0); ImGui::SetCursorPosX(20); - UIWidgets::EnhancementCheckbox("Mix Dungeons", RANDOMIZER_SEED_CVAR("MixDungeons")); + UIWidgets::EnhancementCheckbox("Mix Dungeons", CVAR_RANDOMIZER_SETTING("MixDungeons")); UIWidgets::InsertHelpHoverText("Dungeon entrances will be part of the mixed pool"); } - if (CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleBossEntrances"), RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF) == + if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleBossEntrances"), RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF) == RO_BOSS_ROOM_ENTRANCE_SHUFFLE_FULL) { UIWidgets::Spacer(0); ImGui::SetCursorPosX(20); - UIWidgets::EnhancementCheckbox("Mix Bosses", RANDOMIZER_SEED_CVAR("MixBosses")); + UIWidgets::EnhancementCheckbox("Mix Bosses", CVAR_RANDOMIZER_SETTING("MixBosses")); UIWidgets::InsertHelpHoverText("Boss entrances will be part of the mixed pool"); } - if (CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleOverworldEntrances"), RO_GENERIC_OFF)) { + if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleOverworldEntrances"), RO_GENERIC_OFF)) { UIWidgets::Spacer(0); ImGui::SetCursorPosX(20); - UIWidgets::EnhancementCheckbox("Mix Overworld", RANDOMIZER_SEED_CVAR("MixOverworld")); + UIWidgets::EnhancementCheckbox("Mix Overworld", CVAR_RANDOMIZER_SETTING("MixOverworld")); UIWidgets::InsertHelpHoverText("Overworld entrances will be part of the mixed pool"); } - if (CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleInteriorsEntrances"), RO_GENERIC_OFF)) { + if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleInteriorsEntrances"), RO_GENERIC_OFF)) { UIWidgets::Spacer(0); ImGui::SetCursorPosX(20); - UIWidgets::EnhancementCheckbox("Mix Interiors", RANDOMIZER_SEED_CVAR("MixInteriors")); + UIWidgets::EnhancementCheckbox("Mix Interiors", CVAR_RANDOMIZER_SETTING("MixInteriors")); UIWidgets::InsertHelpHoverText("Interior entrances will be part of the mixed pool"); } - if (CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGrottosEntrances"), RO_GENERIC_OFF)) { + if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGrottosEntrances"), RO_GENERIC_OFF)) { UIWidgets::Spacer(0); ImGui::SetCursorPosX(20); - UIWidgets::EnhancementCheckbox("Mix Grottos", RANDOMIZER_SEED_CVAR("MixGrottos")); + UIWidgets::EnhancementCheckbox("Mix Grottos", CVAR_RANDOMIZER_SETTING("MixGrottos")); UIWidgets::InsertHelpHoverText("Grotto entrances will be part of the mixed pool"); } } @@ -3764,7 +3764,7 @@ void RandomizerSettingsWindow::DrawElement() { ImGui::EndTabItem(); } - ImGui::BeginDisabled(CVarGetInteger(RANDOMIZER_SEED_CVAR("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA); + ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA); if (ImGui::BeginTabItem("Items")) { ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding); if (ImGui::BeginTable("tableRandoStartingInventory", 3, ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) { @@ -3796,7 +3796,7 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "Anywhere - Songs can appear at any location." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("ShuffleSongs"), randoShuffleSongs, RO_SONG_SHUFFLE_SONG_LOCATIONS); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("ShuffleSongs"), randoShuffleSongs, RO_SONG_SHUFFLE_SONG_LOCATIONS); UIWidgets::PaddedSeparator(); @@ -3814,9 +3814,9 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "All Tokens - Shuffle all 100 GS tokens." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("ShuffleTokens"), randoTokensanity, RO_TOKENSANITY_OFF); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("ShuffleTokens"), randoTokensanity, RO_TOKENSANITY_OFF); - UIWidgets::PaddedEnhancementCheckbox("Nighttime GS expect Sun's Song", RANDOMIZER_SEED_CVAR("GsExpectSunsSong"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Nighttime GS expect Sun's Song", CVAR_RANDOMIZER_SETTING("GsExpectSunsSong"), true, false); UIWidgets::InsertHelpHoverText( "All Golden Skulltulas that require nighttime to appear will only be " "expected to be collected after getting Sun's Song." @@ -3826,9 +3826,9 @@ void RandomizerSettingsWindow::DrawElement() { // Shuffle Kokiri Sword // Disabled when Start with Kokiri Sword is active - bool disableShuffleKokiriSword = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingKokiriSword"), 0); + bool disableShuffleKokiriSword = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingKokiriSword"), 0); static const char* disableShuffleKokiriSwordText = "This option is disabled because \"Start with Kokiri Sword\" is enabled."; - UIWidgets::EnhancementCheckbox(Settings::ShuffleKokiriSword.GetName().c_str(), RANDOMIZER_SEED_CVAR("ShuffleKokiriSword"), + UIWidgets::EnhancementCheckbox(Settings::ShuffleKokiriSword.GetName().c_str(), CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), disableShuffleKokiriSword, disableShuffleKokiriSwordText); UIWidgets::InsertHelpHoverText( "Shuffles the Kokiri Sword into the item pool.\n" @@ -3840,9 +3840,9 @@ void RandomizerSettingsWindow::DrawElement() { //Shuffle Master Sword //RANDOTODO: Disable when Start with Master Sword is active - // bool disableShuffleMasterSword = CvarGetInteger(RANDOMIZER_SEED_CVAR("StartingMasterSword"), 0); + // bool disableShuffleMasterSword = CvarGetInteger(CVAR_RANDOMIZER_SETTING("StartingMasterSword"), 0); // static const char* disableShuffleMasterSwordText = "This option is disabled because \"Start with Master Sword\" is enabled."; - UIWidgets::EnhancementCheckbox(Settings::ShuffleMasterSword.GetName().c_str(), RANDOMIZER_SEED_CVAR("ShuffleMasterSword")); + UIWidgets::EnhancementCheckbox(Settings::ShuffleMasterSword.GetName().c_str(), CVAR_RANDOMIZER_SETTING("ShuffleMasterSword")); UIWidgets::InsertHelpHoverText( "Shuffles the Master Sword into the item pool.\n" "\n" @@ -3854,9 +3854,9 @@ void RandomizerSettingsWindow::DrawElement() { // Shuffle Ocarinas // Disabled when Start with Ocarina is active - bool disableShuffleOcarinas = CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingOcarina"), 0); + bool disableShuffleOcarinas = CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingOcarina"), 0); static const char* disableShuffleOcarinasText = "This option is disabled because \"Start with Fairy Ocarina\" is enabled."; - UIWidgets::EnhancementCheckbox(Settings::ShuffleOcarinas.GetName().c_str(), RANDOMIZER_SEED_CVAR("ShuffleOcarinas"), + UIWidgets::EnhancementCheckbox(Settings::ShuffleOcarinas.GetName().c_str(), CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), disableShuffleOcarinas, disableShuffleOcarinasText); UIWidgets::InsertHelpHoverText( "Enabling this shuffles the Fairy Ocarina and the Ocarina of Time into the item pool.\n" @@ -3868,9 +3868,9 @@ void RandomizerSettingsWindow::DrawElement() { // Shuffle Weird Egg // Disabled when Skip Child Zelda is active - bool disableShuffleWeirdEgg = CVarGetInteger(RANDOMIZER_SEED_CVAR("SkipChildZelda"), 0); + bool disableShuffleWeirdEgg = CVarGetInteger(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), 0); static const char* disableShuffleWeirdEggText = "This option is disabled because \"Skip Child Zelda\" is enabled."; - UIWidgets::EnhancementCheckbox(Settings::ShuffleWeirdEgg.GetName().c_str(), RANDOMIZER_SEED_CVAR("ShuffleWeirdEgg"), + UIWidgets::EnhancementCheckbox(Settings::ShuffleWeirdEgg.GetName().c_str(), CVAR_RANDOMIZER_SETTING("ShuffleWeirdEgg"), disableShuffleWeirdEgg, disableShuffleWeirdEggText); UIWidgets::InsertHelpHoverText( "Shuffles the Weird Egg from Malon in to the item pool. Enabling " @@ -3887,7 +3887,7 @@ void RandomizerSettingsWindow::DrawElement() { UIWidgets::PaddedSeparator(); // Shuffle Gerudo Membership Card - UIWidgets::EnhancementCheckbox(Settings::ShuffleGerudoToken.GetName().c_str(), RANDOMIZER_SEED_CVAR("ShuffleGerudoToken")); + UIWidgets::EnhancementCheckbox(Settings::ShuffleGerudoToken.GetName().c_str(), CVAR_RANDOMIZER_SETTING("ShuffleGerudoToken")); UIWidgets::InsertHelpHoverText( "Shuffles the Gerudo Membership Card into the item pool.\n" "\n" @@ -3917,10 +3917,10 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "Random - Vanilla shop items will be shuffled among different shops, and each shop will contain a random number(1-4) of non-vanilla shop items.\n" ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("Shopsanity"), randoShopsanity, RO_SHOPSANITY_OFF); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("Shopsanity"), randoShopsanity, RO_SHOPSANITY_OFF); // Shopsanity Prices - switch (CVarGetInteger(RANDOMIZER_SEED_CVAR("Shopsanity"), RO_SHOPSANITY_OFF)) { + switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("Shopsanity"), RO_SHOPSANITY_OFF)) { case RO_SHOPSANITY_OFF: case RO_SHOPSANITY_ZERO_ITEMS: // no need to show it if there aren't shop slots in the pool break; @@ -3932,9 +3932,9 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "X Wallet - Randomized between 5 and the wallet's max size, in multiples of 5" ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("ShopsanityPrices"), randoShopsanityPrices, RO_SHOPSANITY_PRICE_BALANCED); - UIWidgets::EnhancementCheckbox(Settings::ShopsanityPricesAffordable.GetName().c_str(), RANDOMIZER_SEED_CVAR("ShopsanityPricesAffordable"), - CVarGetInteger(RANDOMIZER_SEED_CVAR("ShopsanityPrices"), RO_SHOPSANITY_PRICE_BALANCED) == RO_SHOPSANITY_PRICE_BALANCED, + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("ShopsanityPrices"), randoShopsanityPrices, RO_SHOPSANITY_PRICE_BALANCED); + UIWidgets::EnhancementCheckbox(Settings::ShopsanityPricesAffordable.GetName().c_str(), CVAR_RANDOMIZER_SETTING("ShopsanityPricesAffordable"), + CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShopsanityPrices"), RO_SHOPSANITY_PRICE_BALANCED) == RO_SHOPSANITY_PRICE_BALANCED, "This can only apply to a wallet range."); UIWidgets::InsertHelpHoverText("Random selection between the selected wallet tier's affordable price and the affordable prices of the preceding wallet tiers.\n\n" "Affordable prices per tier: starter = 10, adult = 105, giant = 205, tycoon = 505\n\n" @@ -3954,17 +3954,17 @@ void RandomizerSettingsWindow::DrawElement() { "Expensive - Scrubs will be shuffled and their item will cost the vanilla price.\n" "\n" "Random - Scrubs will be shuffled and their item will cost will be between 0-95 rupees.\n"); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("ShuffleScrubs"), randoShuffleScrubs, RO_SCRUBS_OFF); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("ShuffleScrubs"), randoShuffleScrubs, RO_SCRUBS_OFF); UIWidgets::PaddedSeparator(); // Shuffle Cows - UIWidgets::EnhancementCheckbox(Settings::ShuffleCows.GetName().c_str(), RANDOMIZER_SEED_CVAR("ShuffleCows")); + UIWidgets::EnhancementCheckbox(Settings::ShuffleCows.GetName().c_str(), CVAR_RANDOMIZER_SETTING("ShuffleCows")); UIWidgets::InsertHelpHoverText("Cows give a randomized item from the pool upon performing Epona's Song in front of them."); UIWidgets::PaddedSeparator(); - UIWidgets::EnhancementCheckbox(Settings::ShuffleMagicBeans.GetName().c_str(), RANDOMIZER_SEED_CVAR("ShuffleBeans")); + UIWidgets::EnhancementCheckbox(Settings::ShuffleMagicBeans.GetName().c_str(), CVAR_RANDOMIZER_SETTING("ShuffleBeans")); UIWidgets::InsertHelpHoverText( "Enabling this adds a pack of 10 beans to the item pool and changes the Magic Bean " "Salesman to sell a random item at a price of 60 rupees." @@ -3985,12 +3985,12 @@ void RandomizerSettingsWindow::DrawElement() { "Granny's item will only be offered after you have traded in the Odd Mushroom when Shuffle Adult Trade is on. " "Otherwise when off, you will need to have found the Claim Check to buy her item (simulating the trade quest is complete)." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("ShuffleMerchants"), randoShuffleMerchants, RO_SHUFFLE_MERCHANTS_OFF); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("ShuffleMerchants"), randoShuffleMerchants, RO_SHUFFLE_MERCHANTS_OFF); UIWidgets::PaddedSeparator(); // Shuffle Frog Song Rupees - UIWidgets::EnhancementCheckbox(Settings::ShuffleFrogSongRupees.GetName().c_str(), RANDOMIZER_SEED_CVAR("ShuffleFrogSongRupees")); + UIWidgets::EnhancementCheckbox(Settings::ShuffleFrogSongRupees.GetName().c_str(), CVAR_RANDOMIZER_SETTING("ShuffleFrogSongRupees")); UIWidgets::InsertHelpHoverText( "Shuffles 5 Purple Rupees into to the item pool, and allows\n" "you to earn items by playing songs at the Frog Choir.\n" @@ -4002,7 +4002,7 @@ void RandomizerSettingsWindow::DrawElement() { UIWidgets::PaddedSeparator(); // Shuffle Adult Trade Quest - UIWidgets::EnhancementCheckbox(Settings::ShuffleAdultTradeQuest.GetName().c_str(), RANDOMIZER_SEED_CVAR("ShuffleAdultTrade")); + UIWidgets::EnhancementCheckbox(Settings::ShuffleAdultTradeQuest.GetName().c_str(), CVAR_RANDOMIZER_SETTING("ShuffleAdultTrade")); UIWidgets::InsertHelpHoverText( "Adds all of the adult trade quest items into the pool, each of which " "can be traded for a unique reward.\n" @@ -4019,9 +4019,9 @@ void RandomizerSettingsWindow::DrawElement() { // Shuffle 100 GS Reward // Forcefully enabled if Ganon's Boss Key is on the cursed man bool forceEnable100GSShuffle = - (CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) == RO_GANON_BOSS_KEY_KAK_TOKENS); + (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) == RO_GANON_BOSS_KEY_KAK_TOKENS); static const char* disable100GSRewardText = "This option is forcefully enabled because \"Ganon's Boss Key\" is set to \"100 GS Reward.\""; - UIWidgets::EnhancementCheckbox(Settings::Shuffle100GSReward.GetName().c_str(), RANDOMIZER_SEED_CVAR("Shuffle100GSReward"), + UIWidgets::EnhancementCheckbox(Settings::Shuffle100GSReward.GetName().c_str(), CVAR_RANDOMIZER_SETTING("Shuffle100GSReward"), forceEnable100GSShuffle, disable100GSRewardText, UIWidgets::CheckboxGraphics::Checkmark); UIWidgets::InsertHelpHoverText( "Shuffle the item the cursed rich man in the House of Skulltula gives when you " @@ -4055,7 +4055,7 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "Anywhere - Spiritual stones and medallions can appear anywhere." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("ShuffleDungeonReward"), randoShuffleDungeonRewards, RO_DUNGEON_REWARDS_END_OF_DUNGEON); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("ShuffleDungeonReward"), randoShuffleDungeonRewards, RO_DUNGEON_REWARDS_END_OF_DUNGEON); UIWidgets::PaddedSeparator(); @@ -4074,7 +4074,7 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "Anywhere - Maps & Compasses can appear anywhere in the world." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("StartingMapsCompasses"), randoShuffleMapsAndCompasses, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), randoShuffleMapsAndCompasses, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON); UIWidgets::PaddedSeparator(); @@ -4095,7 +4095,7 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "Anywhere - Small Keys can appear anywhere in the world." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("Keysanity"), randoShuffleSmallKeys, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("Keysanity"), randoShuffleSmallKeys, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON); UIWidgets::PaddedSeparator(); @@ -4118,30 +4118,30 @@ void RandomizerSettingsWindow::DrawElement() { "other than Vanilla, then the maximum amount of Key Rings that can be selected by Random or " "Count will be 9. Otherwise, the maximum amount of Key Rings will be 8." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("ShuffleKeyRings"), randoShuffleKeyRings, RO_KEYRINGS_OFF); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("ShuffleKeyRings"), randoShuffleKeyRings, RO_KEYRINGS_OFF); ImGui::PopItemWidth(); - switch (CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleKeyRings"), RO_KEYRINGS_OFF)) { + switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleKeyRings"), RO_KEYRINGS_OFF)) { case RO_KEYRINGS_COUNT: - maxKeyringCount = (CVarGetInteger(RANDOMIZER_SEED_CVAR("GerudoFortress"), RO_GF_NORMAL) == RO_GF_NORMAL && - CVarGetInteger(RANDOMIZER_SEED_CVAR("GerudoKeys"), RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA) ? 9 : 8; + maxKeyringCount = (CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_NORMAL) == RO_GF_NORMAL && + CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA) ? 9 : 8; UIWidgets::PaddedEnhancementSliderInt("Key Ring Count: %d", "##RandomizeShuffleKeyRingsRandomCount", - RANDOMIZER_SEED_CVAR("ShuffleKeyRingsRandomCount"), 1, + CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsRandomCount"), 1, maxKeyringCount, "", maxKeyringCount, true, true, false); break; case RO_KEYRINGS_SELECTION: disableGFKeyring = - CVarGetInteger(RANDOMIZER_SEED_CVAR("GerudoFortress"), RO_GF_NORMAL) != RO_GF_NORMAL || CVarGetInteger(RANDOMIZER_SEED_CVAR("GerudoKeys"), RO_GERUDO_KEYS_VANILLA) == RO_GERUDO_KEYS_VANILLA; - UIWidgets::EnhancementCheckbox("Gerudo Fortress##RandomizeShuffleKeyRings", RANDOMIZER_SEED_CVAR("ShuffleKeyRingsGerudoFortress"), + CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_NORMAL) != RO_GF_NORMAL || CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_VANILLA) == RO_GERUDO_KEYS_VANILLA; + UIWidgets::EnhancementCheckbox("Gerudo Fortress##RandomizeShuffleKeyRings", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsGerudoFortress"), disableGFKeyring, "Disabled because the currently selected Gerudo Fortress Carpenters\n setting and/or Gerudo Fortress Keys setting is incompatible with \nhaving a Gerudo Fortress keyring."); - UIWidgets::EnhancementCheckbox("Forest Temple##RandomizeShuffleKeyRings", RANDOMIZER_SEED_CVAR("ShuffleKeyRingsForestTemple")); - UIWidgets::EnhancementCheckbox("Fire Temple##RandomizeShuffleKeyRings", RANDOMIZER_SEED_CVAR("ShuffleKeyRingsFireTemple")); - UIWidgets::EnhancementCheckbox("Water Temple##RandomizeShuffleKeyRings", RANDOMIZER_SEED_CVAR("ShuffleKeyRingsWaterTemple")); - UIWidgets::EnhancementCheckbox("Spirit Temple##RandomizeShuffleKeyRings", RANDOMIZER_SEED_CVAR("ShuffleKeyRingsSpiritTemple")); - UIWidgets::EnhancementCheckbox("Shadow Temple##RandomizeShuffleKeyRings", RANDOMIZER_SEED_CVAR("ShuffleKeyRingsShadowTemple")); - UIWidgets::EnhancementCheckbox("Bottom of the Well##RandomizeShuffleKeyRings", RANDOMIZER_SEED_CVAR("ShuffleKeyRingsBottomOfTheWell")); - UIWidgets::EnhancementCheckbox("Gerudo Training Grounds##RandomizeShuffleKeyRings", RANDOMIZER_SEED_CVAR("ShuffleKeyRingsGTG")); - UIWidgets::EnhancementCheckbox("Ganon's Castle##RandomizeShuffleKeyRings", RANDOMIZER_SEED_CVAR("ShuffleKeyRingsGanonsCastle")); + UIWidgets::EnhancementCheckbox("Forest Temple##RandomizeShuffleKeyRings", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsForestTemple")); + UIWidgets::EnhancementCheckbox("Fire Temple##RandomizeShuffleKeyRings", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsFireTemple")); + UIWidgets::EnhancementCheckbox("Water Temple##RandomizeShuffleKeyRings", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsWaterTemple")); + UIWidgets::EnhancementCheckbox("Spirit Temple##RandomizeShuffleKeyRings", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsSpiritTemple")); + UIWidgets::EnhancementCheckbox("Shadow Temple##RandomizeShuffleKeyRings", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsShadowTemple")); + UIWidgets::EnhancementCheckbox("Bottom of the Well##RandomizeShuffleKeyRings", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsBottomOfTheWell")); + UIWidgets::EnhancementCheckbox("Gerudo Training Grounds##RandomizeShuffleKeyRings", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsGTG")); + UIWidgets::EnhancementCheckbox("Ganon's Castle##RandomizeShuffleKeyRings", CVAR_RANDOMIZER_SETTING("ShuffleKeyRingsGanonsCastle")); break; default: break; @@ -4161,7 +4161,7 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "Anywhere - Thieve's Hideout Keys can appear anywhere in the world." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("GerudoKeys"), randoShuffleGerudoFortressKeys, RO_GERUDO_KEYS_VANILLA); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("GerudoKeys"), randoShuffleGerudoFortressKeys, RO_GERUDO_KEYS_VANILLA); UIWidgets::PaddedSeparator(); @@ -4180,7 +4180,7 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "Anywhere - Boss Keys can appear anywhere in the world." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("BossKeysanity"), randoShuffleBossKeys, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("BossKeysanity"), randoShuffleBossKeys, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON); UIWidgets::PaddedSeparator(); @@ -4209,13 +4209,13 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "100 GS Reward - Ganon's Boss Key will be awarded by the cursed rich man after you collect 100 Gold Skulltula Tokens." ); - bool disableGBK = CVarGetInteger(RANDOMIZER_SEED_CVAR("TriforceHunt"), 0); + bool disableGBK = CVarGetInteger(CVAR_RANDOMIZER_SETTING("TriforceHunt"), 0); static const char* disableGBKText = "This option is disabled because Triforce Hunt is enabled. Ganon's Boss key\nwill instead be given to you after Triforce Hunt completion."; - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), randoShuffleGanonsBossKey, + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), randoShuffleGanonsBossKey, RO_GANON_BOSS_KEY_VANILLA, disableGBK, disableGBKText, RO_GANON_BOSS_KEY_VANILLA); ImGui::PopItemWidth(); - switch (CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA)) { + switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA)) { case RO_GANON_BOSS_KEY_LACS_STONES: ImGui::Text("Reward Options"); UIWidgets::InsertHelpHoverText( @@ -4229,19 +4229,19 @@ void RandomizerSettingsWindow::DrawElement() { "Greg as Wildcard - Greg does not change logic, Greg helps obtain GBK, max number of " "rewards on slider does not change."); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("LacsRewardOptions"), randoLACSRewardOptions, RO_LACS_STANDARD_REWARD); - switch (CVarGetInteger(RANDOMIZER_SEED_CVAR("LacsRewardOptions"), RO_LACS_STANDARD_REWARD)) { + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("LacsRewardOptions"), randoLACSRewardOptions, RO_LACS_STANDARD_REWARD); + switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("LacsRewardOptions"), RO_LACS_STANDARD_REWARD)) { case RO_LACS_STANDARD_REWARD: UIWidgets::PaddedEnhancementSliderInt("Stone Count: %d", "##RandoLacsStoneCount", - RANDOMIZER_SEED_CVAR("LacsStoneCount"), 1, 3, "", 3, true, true, false); + CVAR_RANDOMIZER_SETTING("LacsStoneCount"), 1, 3, "", 3, true, true, false); break; case RO_LACS_GREG_REWARD: UIWidgets::PaddedEnhancementSliderInt("Stone Count: %d", "##RandoLacsStoneCount", - RANDOMIZER_SEED_CVAR("LacsStoneCount"), 1, 4, "", 3, true, true, false); + CVAR_RANDOMIZER_SETTING("LacsStoneCount"), 1, 4, "", 3, true, true, false); break; case RO_LACS_WILDCARD_REWARD: UIWidgets::PaddedEnhancementSliderInt("Stone Count: %d", "##RandoLacsStoneCount", - RANDOMIZER_SEED_CVAR("LacsStoneCount"), 1, 3, "", 3, true, true, false); + CVAR_RANDOMIZER_SETTING("LacsStoneCount"), 1, 3, "", 3, true, true, false); break; } break; @@ -4258,19 +4258,19 @@ void RandomizerSettingsWindow::DrawElement() { "Greg as Wildcard - Greg does not change logic, Greg helps obtain GBK, max number of " "rewards on slider does not change."); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("LacsRewardOptions"), randoLACSRewardOptions, RO_LACS_STANDARD_REWARD); - switch (CVarGetInteger(RANDOMIZER_SEED_CVAR("LacsRewardOptions"), RO_LACS_STANDARD_REWARD)) { + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("LacsRewardOptions"), randoLACSRewardOptions, RO_LACS_STANDARD_REWARD); + switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("LacsRewardOptions"), RO_LACS_STANDARD_REWARD)) { case RO_LACS_STANDARD_REWARD: UIWidgets::PaddedEnhancementSliderInt("Medallion Count: %d", "##RandoLacsMedallionCount", - RANDOMIZER_SEED_CVAR("LacsMedallionCount"), 1, 6, "", 6, true, true, false); + CVAR_RANDOMIZER_SETTING("LacsMedallionCount"), 1, 6, "", 6, true, true, false); break; case RO_LACS_GREG_REWARD: UIWidgets::PaddedEnhancementSliderInt("Medallion Count: %d", "##RandoLacsMedallionCount", - RANDOMIZER_SEED_CVAR("LacsMedallionCount"), 1, 7, "", 6, true, true, false); + CVAR_RANDOMIZER_SETTING("LacsMedallionCount"), 1, 7, "", 6, true, true, false); break; case RO_LACS_WILDCARD_REWARD: UIWidgets::PaddedEnhancementSliderInt("Medallion Count: %d", "##RandoLacsMedallionCount", - RANDOMIZER_SEED_CVAR("LacsMedallionCount"), 1, 6, "", 6, true, true, false); + CVAR_RANDOMIZER_SETTING("LacsMedallionCount"), 1, 6, "", 6, true, true, false); break; } break; @@ -4287,19 +4287,19 @@ void RandomizerSettingsWindow::DrawElement() { "Greg as Wildcard - Greg does not change logic, Greg helps obtain GBK, max number of " "rewards on slider does not change."); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("LacsRewardOptions"), randoLACSRewardOptions, RO_LACS_STANDARD_REWARD); - switch (CVarGetInteger(RANDOMIZER_SEED_CVAR("LacsRewardOptions"), RO_LACS_STANDARD_REWARD)) { + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("LacsRewardOptions"), randoLACSRewardOptions, RO_LACS_STANDARD_REWARD); + switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("LacsRewardOptions"), RO_LACS_STANDARD_REWARD)) { case RO_LACS_STANDARD_REWARD: UIWidgets::PaddedEnhancementSliderInt("Reward Count: %d", "##RandoLacsRewardCount", - RANDOMIZER_SEED_CVAR("LacsRewardCount"), 1, 9, "", 9, true, true, false); + CVAR_RANDOMIZER_SETTING("LacsRewardCount"), 1, 9, "", 9, true, true, false); break; case RO_LACS_GREG_REWARD: UIWidgets::PaddedEnhancementSliderInt("Reward Count: %d", "##RandoLacsRewardCount", - RANDOMIZER_SEED_CVAR("LacsRewardCount"), 1, 10, "", 9, true, true, false); + CVAR_RANDOMIZER_SETTING("LacsRewardCount"), 1, 10, "", 9, true, true, false); break; case RO_LACS_WILDCARD_REWARD: UIWidgets::PaddedEnhancementSliderInt("Reward Count: %d", "##RandoLacsRewardCount", - RANDOMIZER_SEED_CVAR("LacsRewardCount"), 1, 9, "", 9, true, true, false); + CVAR_RANDOMIZER_SETTING("LacsRewardCount"), 1, 9, "", 9, true, true, false); break; } break; @@ -4316,25 +4316,25 @@ void RandomizerSettingsWindow::DrawElement() { "Greg as Wildcard - Greg does not change logic, Greg helps obtain GBK, max number of " "rewards on slider does not change."); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("LacsRewardOptions"), randoLACSRewardOptions, RO_LACS_STANDARD_REWARD); - switch (CVarGetInteger(RANDOMIZER_SEED_CVAR("LacsRewardOptions"), RO_LACS_STANDARD_REWARD)) { + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("LacsRewardOptions"), randoLACSRewardOptions, RO_LACS_STANDARD_REWARD); + switch (CVarGetInteger(CVAR_RANDOMIZER_SETTING("LacsRewardOptions"), RO_LACS_STANDARD_REWARD)) { case RO_LACS_STANDARD_REWARD: UIWidgets::PaddedEnhancementSliderInt("Dungeon Count: %d", "##RandoLacsDungeonCount", - RANDOMIZER_SEED_CVAR("LacsDungeonCount"), 1, 8, "", 8, true, true, false); + CVAR_RANDOMIZER_SETTING("LacsDungeonCount"), 1, 8, "", 8, true, true, false); break; case RO_LACS_GREG_REWARD: UIWidgets::PaddedEnhancementSliderInt("Dungeon Count: %d", "##RandoLacsDungeonCount", - RANDOMIZER_SEED_CVAR("LacsDungeonCount"), 1, 9, "", 8, true, true, false); + CVAR_RANDOMIZER_SETTING("LacsDungeonCount"), 1, 9, "", 8, true, true, false); break; case RO_LACS_WILDCARD_REWARD: UIWidgets::PaddedEnhancementSliderInt("Dungeon Count: %d", "##RandoLacsDungeonCount", - RANDOMIZER_SEED_CVAR("LacsDungeonCount"), 1, 8, "", 8, true, true, false); + CVAR_RANDOMIZER_SETTING("LacsDungeonCount"), 1, 8, "", 8, true, true, false); break; } break; case RO_GANON_BOSS_KEY_LACS_TOKENS: UIWidgets::PaddedEnhancementSliderInt("Token Count: %d", "##RandoLacsTokenCount", - RANDOMIZER_SEED_CVAR("LacsTokenCount"), 1, 100, "", 100, true, true, false); + CVAR_RANDOMIZER_SETTING("LacsTokenCount"), 1, 100, "", 100, true, true, false); break; default: break; @@ -4352,7 +4352,7 @@ void RandomizerSettingsWindow::DrawElement() { } ImGui::EndDisabled(); - ImGui::BeginDisabled(CVarGetInteger(RANDOMIZER_SEED_CVAR("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA); + ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA); if (ImGui::BeginTabItem("Gameplay")) { ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding); if (ImGui::BeginTable("tableRandoGameplay", 3, ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) { @@ -4370,57 +4370,57 @@ void RandomizerSettingsWindow::DrawElement() { ImGui::BeginChild("ChildTimeSavers", ImVec2(0, -8)); // Cuccos to return - int cuccos = CVarGetInteger(RANDOMIZER_SEED_CVAR("CuccosToReturn"), 7); + int cuccos = CVarGetInteger(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 7); ImGui::Text("Cuccos to return: %d", cuccos); UIWidgets::InsertHelpHoverText("The amount of cuccos needed to claim the reward from Anju the cucco lady"); ImGui::SameLine(); - UIWidgets::EnhancementSliderInt("", "##RandoCuccosToReturn", RANDOMIZER_SEED_CVAR("CuccosToReturn"), 0, 7, "", 7); + UIWidgets::EnhancementSliderInt("", "##RandoCuccosToReturn", CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 0, 7, "", 7); UIWidgets::PaddedSeparator(); // Big Poe Target Count - int poes = CVarGetInteger(RANDOMIZER_SEED_CVAR("BigPoeTargetCount"), 10); + int poes = CVarGetInteger(CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), 10); ImGui::Text("Big Poe Target Count: %d", poes); UIWidgets::InsertHelpHoverText("The Poe collector will give a reward for turning in this many Big Poes."); ImGui::SameLine(); - UIWidgets::EnhancementSliderInt("", "##RandoBigPoeTargetCount", RANDOMIZER_SEED_CVAR("BigPoeTargetCount"), 1, 10, "", 10); + UIWidgets::EnhancementSliderInt("", "##RandoBigPoeTargetCount", CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), 1, 10, "", 10); UIWidgets::PaddedSeparator(); // Skip child stealth // Disabled when Skip Child Zelda is active - bool disableChildStealth = CVarGetInteger(RANDOMIZER_SEED_CVAR("SkipChildZelda"), 0); + bool disableChildStealth = CVarGetInteger(CVAR_RANDOMIZER_SETTING("SkipChildZelda"), 0); static const char* disableChildStealthText = "This option is disabled because \"Skip Child Zelda\" is enabled"; - UIWidgets::EnhancementCheckbox(Settings::SkipChildStealth.GetName().c_str(), RANDOMIZER_SEED_CVAR("SkipChildStealth"), disableChildStealth, disableChildStealthText); + UIWidgets::EnhancementCheckbox(Settings::SkipChildStealth.GetName().c_str(), CVAR_RANDOMIZER_SETTING("SkipChildStealth"), disableChildStealth, disableChildStealthText); UIWidgets::InsertHelpHoverText("The crawlspace into Hyrule Castle goes straight to Zelda, skipping the guards."); UIWidgets::PaddedSeparator(); // Skip child zelda - UIWidgets::EnhancementCheckbox("Skip Child Zelda", RANDOMIZER_SEED_CVAR("SkipChildZelda")); + UIWidgets::EnhancementCheckbox("Skip Child Zelda", CVAR_RANDOMIZER_SETTING("SkipChildZelda")); UIWidgets::InsertHelpHoverText("Start with Zelda's Letter and the item Impa would normally give you and skip the sequence up " "until after meeting Zelda. Disables the ability to shuffle Weird Egg."); UIWidgets::PaddedSeparator(); // Skip Epona race - UIWidgets::EnhancementCheckbox(Settings::SkipEponaRace.GetName().c_str(), RANDOMIZER_SEED_CVAR("SkipEponaRace")); + UIWidgets::EnhancementCheckbox(Settings::SkipEponaRace.GetName().c_str(), CVAR_RANDOMIZER_SETTING("SkipEponaRace")); UIWidgets::InsertHelpHoverText("Epona can be summoned with Epona's Song without needing to race Ingo."); UIWidgets::PaddedSeparator(); // Skip tower escape - UIWidgets::EnhancementCheckbox(Settings::SkipTowerEscape.GetName().c_str(), RANDOMIZER_SEED_CVAR("SkipTowerEscape")); + UIWidgets::EnhancementCheckbox(Settings::SkipTowerEscape.GetName().c_str(), CVAR_RANDOMIZER_SETTING("SkipTowerEscape")); UIWidgets::InsertHelpHoverText("The tower escape sequence between Ganondorf and Ganon will be skipped."); UIWidgets::PaddedSeparator(); // Complete mask quest - UIWidgets::EnhancementCheckbox(Settings::CompleteMaskQuest.GetName().c_str(), RANDOMIZER_SEED_CVAR("CompleteMaskQuest")); + UIWidgets::EnhancementCheckbox(Settings::CompleteMaskQuest.GetName().c_str(), CVAR_RANDOMIZER_SETTING("CompleteMaskQuest")); UIWidgets::InsertHelpHoverText("Once the happy mask shop is opened, all masks will be available to be borrowed."); UIWidgets::PaddedSeparator(); // Skip Scarecrow Song - UIWidgets::EnhancementCheckbox(Settings::FreeScarecrow.GetName().c_str(), RANDOMIZER_SEED_CVAR("SkipScarecrowsSong")); + UIWidgets::EnhancementCheckbox(Settings::FreeScarecrow.GetName().c_str(), CVAR_RANDOMIZER_SETTING("SkipScarecrowsSong")); UIWidgets::InsertHelpHoverText( "Start with the ability to summon Pierre the scarecrow. Pulling out an ocarina in the usual locations will automatically summon him." ); @@ -4448,7 +4448,7 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "Minimal - Most excess items are removed." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("ItemPool"), randoItemPool, RO_ITEM_POOL_BALANCED); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("ItemPool"), randoItemPool, RO_ITEM_POOL_BALANCED); UIWidgets::PaddedSeparator(); // Ice Traps @@ -4467,7 +4467,7 @@ void RandomizerSettingsWindow::DrawElement() { "Onslaught - All junk items will be replaced by Ice Traps, even those " "in the base pool." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("IceTraps"), randoIceTraps, RO_ICE_TRAPS_NORMAL); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("IceTraps"), randoIceTraps, RO_ICE_TRAPS_NORMAL); UIWidgets::PaddedSeparator(); @@ -4485,8 +4485,8 @@ void RandomizerSettingsWindow::DrawElement() { "Need Stone of Agony - Hints are only available after obtaining the Stone of Agony.\n" "\n" "Need Mask of Truth - Hints are only available whilst wearing the Mask of Truth.\n"); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("GossipStoneHints"), randoGossipStoneHints, RO_GOSSIP_STONES_NEED_NOTHING); - if (CVarGetInteger(RANDOMIZER_SEED_CVAR("GossipStoneHints"), RO_GOSSIP_STONES_NEED_NOTHING) != RO_GOSSIP_STONES_NONE) { + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("GossipStoneHints"), randoGossipStoneHints, RO_GOSSIP_STONES_NEED_NOTHING); + if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("GossipStoneHints"), RO_GOSSIP_STONES_NEED_NOTHING) != RO_GOSSIP_STONES_NONE) { // Hint Clarity UIWidgets::Spacer(0); ImGui::Indent(); @@ -4503,7 +4503,7 @@ void RandomizerSettingsWindow::DrawElement() { "Clear - Hints are clearly written and are unique for each item.\n" "Ex: Kokiri Sword > the Kokiri Sword" ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("HintClarity"), randoHintClarity, RO_HINT_CLARITY_CLEAR); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("HintClarity"), randoHintClarity, RO_HINT_CLARITY_CLEAR); // Hint Distribution UIWidgets::Spacer(0); @@ -4519,7 +4519,7 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "Very Strong - Many powerful hints." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("HintDistribution"), randoHintDistribution, RO_HINT_DIST_BALANCED); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("HintDistribution"), randoHintDistribution, RO_HINT_DIST_BALANCED); ImGui::Unindent(); } @@ -4534,30 +4534,30 @@ void RandomizerSettingsWindow::DrawElement() { ImGui::Indent(); //Altar, Light Arrows, and Warp Songs are enabled by default - UIWidgets::PaddedEnhancementCheckbox("Altar Text", RANDOMIZER_SEED_CVAR("AltarHint"), true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true); + UIWidgets::PaddedEnhancementCheckbox("Altar Text", CVAR_RANDOMIZER_SETTING("AltarHint"), true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true); UIWidgets::InsertHelpHoverText("Reading the Temple of Time altar as child will tell you the locations of the Spiritual Stones.\n" "Reading the Temple of Time altar as adult will tell you the locations of the Medallions, as well as the conditions for building the Rainbow Bridge and getting the Boss Key for Ganon's Castle."); - UIWidgets::PaddedEnhancementCheckbox("Light Arrows", RANDOMIZER_SEED_CVAR("LAHint"), true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true); + UIWidgets::PaddedEnhancementCheckbox("Light Arrows", CVAR_RANDOMIZER_SETTING("LAHint"), true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true); UIWidgets::InsertHelpHoverText("Talking to Ganondorf in his boss room or Sheik inside Ganon's Castle (when trials are enabled) will tell you the location of the Light Arrows." "If this option is enabled and Ganondorf is reachable without Light Arrows, Gossip Stones will never hint the Light Arrows."); - UIWidgets::PaddedEnhancementCheckbox("Dampe's Diary (Hookshot)", RANDOMIZER_SEED_CVAR("DampeHint"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Dampe's Diary (Hookshot)", CVAR_RANDOMIZER_SETTING("DampeHint"), true, false); UIWidgets::InsertHelpHoverText("Reading the diary of Dampé the gravekeeper as adult will tell you the location of one of the Hookshots."); - UIWidgets::PaddedEnhancementCheckbox("Greg the Green Rupee", RANDOMIZER_SEED_CVAR("GregHint"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Greg the Green Rupee", CVAR_RANDOMIZER_SETTING("GregHint"), true, false); UIWidgets::InsertHelpHoverText("Talking to the chest game owner after buying a key will tell you the location of Greg the Green Rupee."); - UIWidgets::PaddedEnhancementCheckbox("Saria (Magic)", RANDOMIZER_SEED_CVAR("SariaHint"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Saria (Magic)", CVAR_RANDOMIZER_SETTING("SariaHint"), true, false); UIWidgets::InsertHelpHoverText("Talking to Saria either in person or through Saria's Song will tell you the location of a progressive magic meter."); - UIWidgets::PaddedEnhancementCheckbox("Frog Ocarina Game", RANDOMIZER_SEED_CVAR("FrogsHint"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Frog Ocarina Game", CVAR_RANDOMIZER_SETTING("FrogsHint"), true, false); UIWidgets::InsertHelpHoverText("Standing near the pedestal for the frogs in Zora's River will tell you the reward for the frogs' ocarina game."); - UIWidgets::PaddedEnhancementCheckbox("Warp Song text", RANDOMIZER_SEED_CVAR("WarpSongText"), true, false, !CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleWarpSongs"), RO_GENERIC_OFF), + UIWidgets::PaddedEnhancementCheckbox("Warp Song text", CVAR_RANDOMIZER_SETTING("WarpSongText"), true, false, !CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleWarpSongs"), RO_GENERIC_OFF), "This option is disabled since warp songs are not shuffled.", UIWidgets::CheckboxGraphics::Cross, true); UIWidgets::InsertHelpHoverText("Playing a warp song will tell you where it leads. (If warp song destinations are vanilla, this is always enabled.)"); - UIWidgets::PaddedEnhancementCheckbox("Scrub Item text", RANDOMIZER_SEED_CVAR("ScrubText"), true, false, false, "", UIWidgets::CheckboxGraphics::Cross, false); + UIWidgets::PaddedEnhancementCheckbox("Scrub Item text", CVAR_RANDOMIZER_SETTING("ScrubText"), true, false, false, "", UIWidgets::CheckboxGraphics::Cross, false); UIWidgets::InsertHelpHoverText("Business scrubs will reveal the identity of what they're selling."); - UIWidgets::PaddedEnhancementCheckbox("House of Skulltula: 10", RANDOMIZER_SEED_CVAR("10GSHint"), true, false); - UIWidgets::PaddedEnhancementCheckbox("House of Skulltula: 20", RANDOMIZER_SEED_CVAR("20GSHint"), true, false); - UIWidgets::PaddedEnhancementCheckbox("House of Skulltula: 30", RANDOMIZER_SEED_CVAR("30GSHint"), true, false); - UIWidgets::PaddedEnhancementCheckbox("House of Skulltula: 40", RANDOMIZER_SEED_CVAR("40GSHint"), true, false); - UIWidgets::PaddedEnhancementCheckbox("House of Skulltula: 50", RANDOMIZER_SEED_CVAR("50GSHint"), true, false); + UIWidgets::PaddedEnhancementCheckbox("House of Skulltula: 10", CVAR_RANDOMIZER_SETTING("10GSHint"), true, false); + UIWidgets::PaddedEnhancementCheckbox("House of Skulltula: 20", CVAR_RANDOMIZER_SETTING("20GSHint"), true, false); + UIWidgets::PaddedEnhancementCheckbox("House of Skulltula: 30", CVAR_RANDOMIZER_SETTING("30GSHint"), true, false); + UIWidgets::PaddedEnhancementCheckbox("House of Skulltula: 40", CVAR_RANDOMIZER_SETTING("40GSHint"), true, false); + UIWidgets::PaddedEnhancementCheckbox("House of Skulltula: 50", CVAR_RANDOMIZER_SETTING("50GSHint"), true, false); ImGui::Unindent(); @@ -4572,13 +4572,13 @@ void RandomizerSettingsWindow::DrawElement() { ImGui::BeginChild("ChildAdditionalFeatures", ImVec2(0, -8)); ImGui::PushItemWidth(-FLT_MIN); - UIWidgets::EnhancementCheckbox("Full Wallets", RANDOMIZER_SEED_CVAR("FullWallets")); + UIWidgets::EnhancementCheckbox("Full Wallets", CVAR_RANDOMIZER_SETTING("FullWallets")); UIWidgets::InsertHelpHoverText("Start with a full wallet. All wallet upgrades come filled with rupees."); UIWidgets::PaddedSeparator(); // Bombchus in Logic - UIWidgets::EnhancementCheckbox(Settings::BombchusInLogic.GetName().c_str(), RANDOMIZER_SEED_CVAR("BombchusInLogic")); + UIWidgets::EnhancementCheckbox(Settings::BombchusInLogic.GetName().c_str(), CVAR_RANDOMIZER_SETTING("BombchusInLogic")); UIWidgets::InsertHelpHoverText( "Bombchus are properly considered in logic.\n" "\n" @@ -4592,14 +4592,14 @@ void RandomizerSettingsWindow::DrawElement() { UIWidgets::PaddedSeparator(); // Enable Bombchu Drops - UIWidgets::EnhancementCheckbox("Enable Bombchu Drops", RANDOMIZER_SEED_CVAR("EnableBombchuDrops")); + UIWidgets::EnhancementCheckbox("Enable Bombchu Drops", CVAR_RANDOMIZER_SETTING("EnableBombchuDrops")); UIWidgets::InsertHelpHoverText( "Once you obtain bombchus for the first time, refills can be found in bushes and other places where bomb drops can normally spawn." ); UIWidgets::PaddedSeparator(); - UIWidgets::EnhancementCheckbox("Blue Fire Arrows", RANDOMIZER_SEED_CVAR("BlueFireArrows")); + UIWidgets::EnhancementCheckbox("Blue Fire Arrows", CVAR_RANDOMIZER_SETTING("BlueFireArrows")); UIWidgets::InsertHelpHoverText( "Ice Arrows act like Blue Fire, making them able to melt red ice. " "Item placement logic will respect this option, so it might be required to use this to progress." @@ -4607,7 +4607,7 @@ void RandomizerSettingsWindow::DrawElement() { UIWidgets::PaddedSeparator(); - UIWidgets::EnhancementCheckbox("Sunlight Arrows", RANDOMIZER_SEED_CVAR("SunlightArrows")); + UIWidgets::EnhancementCheckbox("Sunlight Arrows", CVAR_RANDOMIZER_SETTING("SunlightArrows")); UIWidgets::InsertHelpHoverText( "Light Arrows can be used to light up the sun switches instead of using the Mirror Shield. " "Item placement logic will respect this option, so it might be required to use this to progress." @@ -4624,7 +4624,7 @@ void RandomizerSettingsWindow::DrawElement() { } ImGui::EndDisabled(); - ImGui::BeginDisabled(CVarGetInteger(RANDOMIZER_SEED_CVAR("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA); + ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA); static bool locationsTabOpen = false; if (ImGui::BeginTabItem("Locations")) { ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding); @@ -4632,7 +4632,7 @@ void RandomizerSettingsWindow::DrawElement() { locationsTabOpen = true; RandomizerCheckObjects::UpdateImGuiVisibility(); // todo: this efficently when we build out cvar array support - std::stringstream excludedLocationStringStream(CVarGetString(RANDOMIZER_SEED_CVAR("ExcludedLocations"), "")); + std::stringstream excludedLocationStringStream(CVarGetString(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), "")); std::string excludedLocationString; excludedLocations.clear(); while (getline(excludedLocationStringStream, excludedLocationString, ',')) { @@ -4682,7 +4682,7 @@ void RandomizerSettingsWindow::DrawElement() { excludedLocationString += std::to_string(excludedLocationIt); excludedLocationString += ","; } - CVarSetString(RANDOMIZER_SEED_CVAR("ExcludedLocations"), excludedLocationString.c_str()); + CVarSetString(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), excludedLocationString.c_str()); LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } ImGui::SameLine(); @@ -4724,9 +4724,9 @@ void RandomizerSettingsWindow::DrawElement() { excludedLocationString += ","; } if (excludedLocationString == "") { - CVarClear(RANDOMIZER_SEED_CVAR("ExcludedLocations")); + CVarClear(CVAR_RANDOMIZER_SETTING("ExcludedLocations")); } else { - CVarSetString(RANDOMIZER_SEED_CVAR("ExcludedLocations"), excludedLocationString.c_str()); + CVarSetString(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), excludedLocationString.c_str()); } LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } @@ -4755,13 +4755,13 @@ void RandomizerSettingsWindow::DrawElement() { tricksTabOpen = true; //RandomizerTricks::UpdateImGuiVisibility(); // todo: this efficently when we build out cvar array support - std::stringstream enabledTrickStringStream(CVarGetString(RANDOMIZER_SEED_CVAR("EnabledTricks"), "")); + std::stringstream enabledTrickStringStream(CVarGetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), "")); std::string enabledTrickString; enabledTricks.clear(); while (getline(enabledTrickStringStream, enabledTrickString, ',')) { enabledTricks.insert((RandomizerTrick)std::stoi(enabledTrickString)); } - std::stringstream enabledGlitchStringStream(CVarGetString(RANDOMIZER_SEED_CVAR("EnabledGlitches"), "")); + std::stringstream enabledGlitchStringStream(CVarGetString(CVAR_RANDOMIZER_SETTING("EnabledGlitches"), "")); std::string enabledGlitchString; enabledGlitches.clear(); while (getline(enabledGlitchStringStream, enabledGlitchString, ',')) { @@ -4785,10 +4785,10 @@ void RandomizerSettingsWindow::DrawElement() { "\n" "Vanilla - Places all items and dungeon rewards in their vanilla locations." ); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("LogicRules"), randoLogicRules, RO_LOGIC_GLITCHLESS); - if (CVarGetInteger(RANDOMIZER_SEED_CVAR("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_GLITCHLESS) { + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("LogicRules"), randoLogicRules, RO_LOGIC_GLITCHLESS); + if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_GLITCHLESS) { ImGui::SameLine(); - UIWidgets::EnhancementCheckbox(Settings::LocationsReachable.GetName().c_str(), RANDOMIZER_SEED_CVAR("AllLocationsReachable"), false, "", UIWidgets::CheckboxGraphics::Cross, RO_GENERIC_ON); + UIWidgets::EnhancementCheckbox(Settings::LocationsReachable.GetName().c_str(), CVAR_RANDOMIZER_SETTING("AllLocationsReachable"), false, "", UIWidgets::CheckboxGraphics::Cross, RO_GENERIC_ON); UIWidgets::InsertHelpHoverText( "When this options is enabled, the randomizer will " "guarantee that every item is obtainable and every " @@ -4797,7 +4797,7 @@ void RandomizerSettingsWindow::DrawElement() { "will be guaranteed reachable." ); } - if (CVarGetInteger(RANDOMIZER_SEED_CVAR("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA) { + if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA) { ImGui::SameLine(); ImGui::TextColored(ImVec4(1.0f, 0.0f, 0.0f, 1.0f), "Heads up! This will disable all rando settings except for entrance shuffle and starter items"); } @@ -4805,7 +4805,7 @@ void RandomizerSettingsWindow::DrawElement() { UIWidgets::PaddedSeparator(); // Enable Glitch-Useful Cutscenes - UIWidgets::EnhancementCheckbox(Settings::EnableGlitchCutscenes.GetName().c_str(), RANDOMIZER_SEED_CVAR("EnableGlitchCutscenes")); + UIWidgets::EnhancementCheckbox(Settings::EnableGlitchCutscenes.GetName().c_str(), CVAR_RANDOMIZER_SETTING("EnableGlitchCutscenes")); UIWidgets::InsertHelpHoverText( "The cutscenes of the Poes in Forest Temple and Darunia in Fire Temple will not be skipped. " "These cutscenes are only useful for glitched gameplay and can be safely skipped otherwise."); @@ -4814,7 +4814,7 @@ void RandomizerSettingsWindow::DrawElement() { ImGui::EndTable(); } - ImGui::BeginDisabled(CVarGetInteger(RANDOMIZER_SEED_CVAR("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA); + ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA); // Tricks static std::unordered_map areaTreeDisabled { @@ -4897,7 +4897,7 @@ void RandomizerSettingsWindow::DrawElement() { }; static ImGuiTextFilter trickSearch; trickSearch.Draw("Filter (inc,-exc)", 490.0f); - if (CVarGetInteger(RANDOMIZER_SEED_CVAR("LogicRules"), RO_LOGIC_GLITCHLESS) != RO_LOGIC_NO_LOGIC) { + if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) != RO_LOGIC_NO_LOGIC) { ImGui::SameLine(); if (ImGui::Button("Disable All")) { for (auto [rtArea, rtObjects] : RandomizerTricks::GetAllRTObjectsByArea()) { @@ -4913,7 +4913,7 @@ void RandomizerSettingsWindow::DrawElement() { enabledTrickString += std::to_string(enabledTrickIt); enabledTrickString += ","; } - CVarClear(RANDOMIZER_SEED_CVAR("EnabledTricks")); + CVarClear(CVAR_RANDOMIZER_SETTING("EnabledTricks")); LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } ImGui::SameLine(); @@ -4930,7 +4930,7 @@ void RandomizerSettingsWindow::DrawElement() { enabledTrickString += std::to_string(enabledTrickIt); enabledTrickString += ","; } - CVarSetString(RANDOMIZER_SEED_CVAR("EnabledTricks"), enabledTrickString.c_str()); + CVarSetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), enabledTrickString.c_str()); LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } } @@ -4952,7 +4952,7 @@ void RandomizerSettingsWindow::DrawElement() { ImGui::PopItemFlag(); ImGui::TableNextRow(); - if (CVarGetInteger(RANDOMIZER_SEED_CVAR("LogicRules"), RO_LOGIC_GLITCHLESS) != RO_LOGIC_NO_LOGIC) { + if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) != RO_LOGIC_NO_LOGIC) { // COLUMN 1 - DISABLED TRICKS ImGui::TableNextColumn(); @@ -5007,7 +5007,7 @@ void RandomizerSettingsWindow::DrawElement() { enabledTrickString += std::to_string(enabledTrickIt); enabledTrickString += ","; } - CVarSetString(RANDOMIZER_SEED_CVAR("EnabledTricks"), enabledTrickString.c_str()); + CVarSetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), enabledTrickString.c_str()); LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } @@ -5043,7 +5043,7 @@ void RandomizerSettingsWindow::DrawElement() { enabledTrickString += std::to_string(enabledTrickIt); enabledTrickString += ","; } - CVarSetString(RANDOMIZER_SEED_CVAR("EnabledTricks"), enabledTrickString.c_str()); + CVarSetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), enabledTrickString.c_str()); LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } DrawTagChips(*rtObject.rtTags); @@ -5117,7 +5117,7 @@ void RandomizerSettingsWindow::DrawElement() { enabledTrickString += std::to_string(enabledTrickIt); enabledTrickString += ","; } - CVarClear(RANDOMIZER_SEED_CVAR("EnabledTricks")); + CVarClear(CVAR_RANDOMIZER_SETTING("EnabledTricks")); LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } @@ -5156,9 +5156,9 @@ void RandomizerSettingsWindow::DrawElement() { enabledTrickString += ","; } if (enabledTrickString == "") { - CVarClear(RANDOMIZER_SEED_CVAR("EnabledTricks")); + CVarClear(CVAR_RANDOMIZER_SETTING("EnabledTricks")); } else { - CVarSetString(RANDOMIZER_SEED_CVAR("EnabledTricks"), enabledTrickString.c_str()); + CVarSetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), enabledTrickString.c_str()); } LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } @@ -5215,17 +5215,17 @@ void RandomizerSettingsWindow::DrawElement() { window->DC.CurrLineTextBaseOffset = 0.0f; ImGui::BeginChild("ChildStartingEquipment", ImVec2(0, -8)); ImGui::BeginDisabled( - CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_END_OF_DUNGEON) == RO_DUNGEON_REWARDS_END_OF_DUNGEON || - CVarGetInteger(RANDOMIZER_SEED_CVAR("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA + CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_END_OF_DUNGEON) == RO_DUNGEON_REWARDS_END_OF_DUNGEON || + CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA ); ImGui::Text("%s", Settings::LinksPocketItem.GetName().c_str()); - UIWidgets::EnhancementCombobox(RANDOMIZER_SEED_CVAR("LinksPocket"), randoLinksPocket, RO_LINKS_POCKET_DUNGEON_REWARD); + UIWidgets::EnhancementCombobox(CVAR_RANDOMIZER_SETTING("LinksPocket"), randoLinksPocket, RO_LINKS_POCKET_DUNGEON_REWARD); UIWidgets::PaddedSeparator(); ImGui::EndDisabled(); - UIWidgets::EnhancementCheckbox(Settings::StartingKokiriSword.GetName().c_str(), RANDOMIZER_SEED_CVAR("StartingKokiriSword")); + UIWidgets::EnhancementCheckbox(Settings::StartingKokiriSword.GetName().c_str(), CVAR_RANDOMIZER_SETTING("StartingKokiriSword")); UIWidgets::PaddedSeparator(); - UIWidgets::EnhancementCheckbox(Settings::StartingDekuShield.GetName().c_str(), RANDOMIZER_SEED_CVAR("StartingDekuShield")); + UIWidgets::EnhancementCheckbox(Settings::StartingDekuShield.GetName().c_str(), CVAR_RANDOMIZER_SETTING("StartingDekuShield")); UIWidgets::PaddedSeparator(); @@ -5236,13 +5236,13 @@ void RandomizerSettingsWindow::DrawElement() { window->DC.CurrLineTextBaseOffset = 0.0f; ImGui::BeginChild("ChildStartingItems", ImVec2(0, -8)); - ImGui::BeginDisabled(CVarGetInteger(RANDOMIZER_SEED_CVAR("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA); - UIWidgets::EnhancementCheckbox(Settings::StartingOcarina.GetName().c_str(), RANDOMIZER_SEED_CVAR("StartingOcarina")); + ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == RO_LOGIC_VANILLA); + UIWidgets::EnhancementCheckbox(Settings::StartingOcarina.GetName().c_str(), CVAR_RANDOMIZER_SETTING("StartingOcarina")); UIWidgets::PaddedSeparator(); ImGui::EndDisabled(); - UIWidgets::EnhancementCheckbox(Settings::StartingConsumables.GetName().c_str(), RANDOMIZER_SEED_CVAR("StartingConsumables")); + UIWidgets::EnhancementCheckbox(Settings::StartingConsumables.GetName().c_str(), CVAR_RANDOMIZER_SETTING("StartingConsumables")); UIWidgets::PaddedSeparator(); - UIWidgets::EnhancementSliderInt("Gold Skulltula Tokens: %d", "##RandoStartingSkulltulaToken", RANDOMIZER_SEED_CVAR("StartingSkulltulaToken"), 0, 100, "", 0); + UIWidgets::EnhancementSliderInt("Gold Skulltula Tokens: %d", "##RandoStartingSkulltulaToken", CVAR_RANDOMIZER_SETTING("StartingSkulltulaToken"), 0, 100, "", 0); UIWidgets::PaddedSeparator(); ImGui::EndChild(); @@ -5251,22 +5251,22 @@ void RandomizerSettingsWindow::DrawElement() { ImGui::TableNextColumn(); window->DC.CurrLineTextBaseOffset = 0.0f; ImGui::BeginChild("ChildStartingSongs", ImVec2(0, -8)); - UIWidgets::EnhancementCheckbox(Settings::StartingZeldasLullaby.GetName().c_str(), RANDOMIZER_SEED_CVAR("StartingZeldasLullaby")); - UIWidgets::EnhancementCheckbox(Settings::StartingEponasSong.GetName().c_str(), RANDOMIZER_SEED_CVAR("StartingEponasSong")); - UIWidgets::EnhancementCheckbox(Settings::StartingSariasSong.GetName().c_str(), RANDOMIZER_SEED_CVAR("StartingSariasSong")); - UIWidgets::EnhancementCheckbox(Settings::StartingSunsSong.GetName().c_str(), RANDOMIZER_SEED_CVAR("StartingSunsSong")); - UIWidgets::EnhancementCheckbox(Settings::StartingSongOfTime.GetName().c_str(), RANDOMIZER_SEED_CVAR("StartingSongOfTime")); - UIWidgets::EnhancementCheckbox(Settings::StartingSongOfStorms.GetName().c_str(), RANDOMIZER_SEED_CVAR("StartingSongOfStorms")); + UIWidgets::EnhancementCheckbox(Settings::StartingZeldasLullaby.GetName().c_str(), CVAR_RANDOMIZER_SETTING("StartingZeldasLullaby")); + UIWidgets::EnhancementCheckbox(Settings::StartingEponasSong.GetName().c_str(), CVAR_RANDOMIZER_SETTING("StartingEponasSong")); + UIWidgets::EnhancementCheckbox(Settings::StartingSariasSong.GetName().c_str(), CVAR_RANDOMIZER_SETTING("StartingSariasSong")); + UIWidgets::EnhancementCheckbox(Settings::StartingSunsSong.GetName().c_str(), CVAR_RANDOMIZER_SETTING("StartingSunsSong")); + UIWidgets::EnhancementCheckbox(Settings::StartingSongOfTime.GetName().c_str(), CVAR_RANDOMIZER_SETTING("StartingSongOfTime")); + UIWidgets::EnhancementCheckbox(Settings::StartingSongOfStorms.GetName().c_str(), CVAR_RANDOMIZER_SETTING("StartingSongOfStorms")); UIWidgets::PaddedSeparator(); ImGui::Text("Warp Songs"); UIWidgets::PaddedSeparator(); - UIWidgets::EnhancementCheckbox(Settings::StartingMinuetOfForest.GetName().c_str(), RANDOMIZER_SEED_CVAR("StartingMinuetOfForest")); - UIWidgets::EnhancementCheckbox(Settings::StartingBoleroOfFire.GetName().c_str(), RANDOMIZER_SEED_CVAR("StartingBoleroOfFire")); - UIWidgets::EnhancementCheckbox(Settings::StartingSerenadeOfWater.GetName().c_str(), RANDOMIZER_SEED_CVAR("StartingSerenadeOfWater")); - UIWidgets::EnhancementCheckbox(Settings::StartingRequiemOfSpirit.GetName().c_str(), RANDOMIZER_SEED_CVAR("StartingRequiemOfSpirit")); - UIWidgets::EnhancementCheckbox(Settings::StartingNocturneOfShadow.GetName().c_str(), RANDOMIZER_SEED_CVAR("StartingNocturneOfShadow")); - UIWidgets::EnhancementCheckbox(Settings::StartingPreludeOfLight.GetName().c_str(), RANDOMIZER_SEED_CVAR("StartingPreludeOfLight")); + UIWidgets::EnhancementCheckbox(Settings::StartingMinuetOfForest.GetName().c_str(), CVAR_RANDOMIZER_SETTING("StartingMinuetOfForest")); + UIWidgets::EnhancementCheckbox(Settings::StartingBoleroOfFire.GetName().c_str(), CVAR_RANDOMIZER_SETTING("StartingBoleroOfFire")); + UIWidgets::EnhancementCheckbox(Settings::StartingSerenadeOfWater.GetName().c_str(), CVAR_RANDOMIZER_SETTING("StartingSerenadeOfWater")); + UIWidgets::EnhancementCheckbox(Settings::StartingRequiemOfSpirit.GetName().c_str(), CVAR_RANDOMIZER_SETTING("StartingRequiemOfSpirit")); + UIWidgets::EnhancementCheckbox(Settings::StartingNocturneOfShadow.GetName().c_str(), CVAR_RANDOMIZER_SETTING("StartingNocturneOfShadow")); + UIWidgets::EnhancementCheckbox(Settings::StartingPreludeOfLight.GetName().c_str(), CVAR_RANDOMIZER_SETTING("StartingPreludeOfLight")); UIWidgets::PaddedSeparator(); ImGui::EndChild(); diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp b/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp index f3582a5cb7b..b97a6f33578 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp @@ -885,57 +885,57 @@ void RandomizerCheckObjects::UpdateImGuiVisibility() { (!RandomizerCheckObjects::AreaIsDungeon(locationIt.rcArea) || locationIt.vOrMQ == RCVORMQ_BOTH || locationIt.vOrMQ == RCVORMQ_MQ && - ((CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeons"), RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_SET_NUMBER && (CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeonCount"), 12) > 0) || // at least one MQ dungeon - CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeons"), RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_RANDOM_NUMBER)) || + ((CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeons"), RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_SET_NUMBER && (CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonCount"), 12) > 0) || // at least one MQ dungeon + CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeons"), RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_RANDOM_NUMBER)) || locationIt.vOrMQ == RCVORMQ_VANILLA && - (CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeons"), RO_MQ_DUNGEONS_NONE) != RO_MQ_DUNGEONS_SET_NUMBER || CVarGetInteger(RANDOMIZER_SEED_CVAR("MQDungeonCount"), 12) < 12) // at least one vanilla dungeon + (CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeons"), RO_MQ_DUNGEONS_NONE) != RO_MQ_DUNGEONS_SET_NUMBER || CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonCount"), 12) < 12) // at least one vanilla dungeon ) && - (locationIt.rcType != RCTYPE_SHOP || CVarGetInteger(RANDOMIZER_SEED_CVAR("Shopsanity"), RO_SHOPSANITY_OFF) > RO_SHOPSANITY_ZERO_ITEMS) && - (locationIt.rcType != RCTYPE_SCRUB || CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleScrubs"), RO_SCRUBS_OFF) != RO_SCRUBS_OFF || + (locationIt.rcType != RCTYPE_SHOP || CVarGetInteger(CVAR_RANDOMIZER_SETTING("Shopsanity"), RO_SHOPSANITY_OFF) > RO_SHOPSANITY_ZERO_ITEMS) && + (locationIt.rcType != RCTYPE_SCRUB || CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleScrubs"), RO_SCRUBS_OFF) != RO_SCRUBS_OFF || locationIt.rc == RC_HF_DEKU_SCRUB_GROTTO || locationIt.rc == RC_LW_DEKU_SCRUB_GROTTO_FRONT || locationIt.rc == RC_LW_DEKU_SCRUB_NEAR_BRIDGE) && // The 3 scrubs that are always randomized - (locationIt.rcType != RCTYPE_MERCHANT || CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleMerchants"), RO_SHUFFLE_MERCHANTS_OFF) != RO_SHUFFLE_MERCHANTS_OFF) && - (locationIt.rcType != RCTYPE_SONG_LOCATION || CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleSongs"), RO_SONG_SHUFFLE_SONG_LOCATIONS) != RO_SONG_SHUFFLE_SONG_LOCATIONS) && // song locations + (locationIt.rcType != RCTYPE_MERCHANT || CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleMerchants"), RO_SHUFFLE_MERCHANTS_OFF) != RO_SHUFFLE_MERCHANTS_OFF) && + (locationIt.rcType != RCTYPE_SONG_LOCATION || CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleSongs"), RO_SONG_SHUFFLE_SONG_LOCATIONS) != RO_SONG_SHUFFLE_SONG_LOCATIONS) && // song locations ((locationIt.rcType != RCTYPE_BOSS_HEART_OR_OTHER_REWARD && locationIt.rc != RC_SONG_FROM_IMPA && locationIt.rc != RC_SHEIK_IN_ICE_CAVERN) || - CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleSongs"), RO_SONG_SHUFFLE_SONG_LOCATIONS) != RO_SONG_SHUFFLE_DUNGEON_REWARDS) && // song dungeon rewards - (locationIt.rcType != RCTYPE_DUNGEON_REWARD || CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_END_OF_DUNGEON) != RO_DUNGEON_REWARDS_END_OF_DUNGEON) && // dungeon rewards end of dungeons - (locationIt.rcType != RCTYPE_OCARINA || CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleOcarinas"), RO_GENERIC_NO)) && // ocarina locations + CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleSongs"), RO_SONG_SHUFFLE_SONG_LOCATIONS) != RO_SONG_SHUFFLE_DUNGEON_REWARDS) && // song dungeon rewards + (locationIt.rcType != RCTYPE_DUNGEON_REWARD || CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleDungeonReward"), RO_DUNGEON_REWARDS_END_OF_DUNGEON) != RO_DUNGEON_REWARDS_END_OF_DUNGEON) && // dungeon rewards end of dungeons + (locationIt.rcType != RCTYPE_OCARINA || CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleOcarinas"), RO_GENERIC_NO)) && // ocarina locations (locationIt.rc != RC_HC_ZELDAS_LETTER) && // don't show until we support shuffling letter (locationIt.rcType != RCTYPE_GOSSIP_STONE) && // don't show gossip stones (maybe gossipsanity will be a thing eventually?) (locationIt.rcType != RCTYPE_LINKS_POCKET) && // links pocket can be set to nothing if needed (locationIt.rcType != RCTYPE_CHEST_GAME) && // don't show non final reward chest game checks until we support shuffling them (locationIt.rcType != RCTYPE_SKULL_TOKEN || - (CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleTokens"), RO_TOKENSANITY_OFF) == RO_TOKENSANITY_ALL) || - ((CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleTokens"), RO_TOKENSANITY_OFF) == RO_TOKENSANITY_OVERWORLD) && RandomizerCheckObjects::AreaIsOverworld(locationIt.rcArea)) || - ((CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleTokens"), RO_TOKENSANITY_OFF) == RO_TOKENSANITY_DUNGEONS) && RandomizerCheckObjects::AreaIsDungeon(locationIt.rcArea)) + (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleTokens"), RO_TOKENSANITY_OFF) == RO_TOKENSANITY_ALL) || + ((CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleTokens"), RO_TOKENSANITY_OFF) == RO_TOKENSANITY_OVERWORLD) && RandomizerCheckObjects::AreaIsOverworld(locationIt.rcArea)) || + ((CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleTokens"), RO_TOKENSANITY_OFF) == RO_TOKENSANITY_DUNGEONS) && RandomizerCheckObjects::AreaIsDungeon(locationIt.rcArea)) ) && - (locationIt.rcType != RCTYPE_COW || CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleCows"), RO_GENERIC_NO)) && - (locationIt.rcType != RCTYPE_ADULT_TRADE || CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleAdultTrade"), RO_GENERIC_NO)) && - (locationIt.rc != RC_KF_KOKIRI_SWORD_CHEST || CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleKokiriSword"), RO_GENERIC_NO)) && - (locationIt.rc != RC_ZR_MAGIC_BEAN_SALESMAN || CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleBeans"), RO_GENERIC_NO)) && - (locationIt.rc != RC_HC_MALON_EGG || CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleWeirdEgg"), RO_GENERIC_NO)) && - (locationIt.rcType != RCTYPE_FROG_SONG || CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleFrogSongRupees"), RO_GENERIC_NO)) && - (locationIt.rcType != RCTYPE_MAP_COMPASS || CVarGetInteger(RANDOMIZER_SEED_CVAR("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) != RO_DUNGEON_ITEM_LOC_VANILLA) && - (locationIt.rcType != RCTYPE_SMALL_KEY || CVarGetInteger(RANDOMIZER_SEED_CVAR("Keysanity"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) != RO_DUNGEON_ITEM_LOC_VANILLA) && - (locationIt.rcType != RCTYPE_BOSS_KEY || CVarGetInteger(RANDOMIZER_SEED_CVAR("BossKeysanity"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) != RO_DUNGEON_ITEM_LOC_VANILLA) && - (locationIt.rcType != RCTYPE_GANON_BOSS_KEY || CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_VANILLA) && // vanilla ganon boss key + (locationIt.rcType != RCTYPE_COW || CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleCows"), RO_GENERIC_NO)) && + (locationIt.rcType != RCTYPE_ADULT_TRADE || CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleAdultTrade"), RO_GENERIC_NO)) && + (locationIt.rc != RC_KF_KOKIRI_SWORD_CHEST || CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleKokiriSword"), RO_GENERIC_NO)) && + (locationIt.rc != RC_ZR_MAGIC_BEAN_SALESMAN || CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleBeans"), RO_GENERIC_NO)) && + (locationIt.rc != RC_HC_MALON_EGG || CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleWeirdEgg"), RO_GENERIC_NO)) && + (locationIt.rcType != RCTYPE_FROG_SONG || CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleFrogSongRupees"), RO_GENERIC_NO)) && + (locationIt.rcType != RCTYPE_MAP_COMPASS || CVarGetInteger(CVAR_RANDOMIZER_SETTING("StartingMapsCompasses"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) != RO_DUNGEON_ITEM_LOC_VANILLA) && + (locationIt.rcType != RCTYPE_SMALL_KEY || CVarGetInteger(CVAR_RANDOMIZER_SETTING("Keysanity"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) != RO_DUNGEON_ITEM_LOC_VANILLA) && + (locationIt.rcType != RCTYPE_BOSS_KEY || CVarGetInteger(CVAR_RANDOMIZER_SETTING("BossKeysanity"), RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) != RO_DUNGEON_ITEM_LOC_VANILLA) && + (locationIt.rcType != RCTYPE_GANON_BOSS_KEY || CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_VANILLA) && // vanilla ganon boss key (locationIt.rc != RC_TOT_LIGHT_ARROWS_CUTSCENE || - (CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_LACS_DUNGEONS && - CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_LACS_MEDALLIONS && - CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_LACS_REWARDS && - CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_LACS_STONES && - CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_LACS_TOKENS && - CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_LACS_VANILLA) + (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_LACS_DUNGEONS && + CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_LACS_MEDALLIONS && + CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_LACS_REWARDS && + CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_LACS_STONES && + CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_LACS_TOKENS && + CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_LACS_VANILLA) ) && // LACS ganon boss key - (locationIt.rc != RC_KAK_100_GOLD_SKULLTULA_REWARD || CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_KAK_TOKENS) && // 100 skull reward ganon boss key + (locationIt.rc != RC_KAK_100_GOLD_SKULLTULA_REWARD || CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGanonBossKey"), RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_KAK_TOKENS) && // 100 skull reward ganon boss key (locationIt.rcType != RCTYPE_GF_KEY && locationIt.rc != RC_GF_GERUDO_MEMBERSHIP_CARD || - (CVarGetInteger(RANDOMIZER_SEED_CVAR("GerudoFortress"), RO_GF_NORMAL) == RO_GF_OPEN && locationIt.rcType != RCTYPE_GF_KEY && locationIt.rc != RC_GF_GERUDO_MEMBERSHIP_CARD) || - (CVarGetInteger(RANDOMIZER_SEED_CVAR("GerudoFortress"), RO_GF_NORMAL) == RO_GF_FAST && - ((locationIt.rc == RC_GF_GERUDO_MEMBERSHIP_CARD && CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGerudoToken"), RO_GENERIC_NO) == RO_GENERIC_YES) || - (locationIt.rc == RC_GF_NORTH_F1_CARPENTER && CVarGetInteger(RANDOMIZER_SEED_CVAR("GerudoKeys"), RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA)) + (CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_NORMAL) == RO_GF_OPEN && locationIt.rcType != RCTYPE_GF_KEY && locationIt.rc != RC_GF_GERUDO_MEMBERSHIP_CARD) || + (CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_NORMAL) == RO_GF_FAST && + ((locationIt.rc == RC_GF_GERUDO_MEMBERSHIP_CARD && CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGerudoToken"), RO_GENERIC_NO) == RO_GENERIC_YES) || + (locationIt.rc == RC_GF_NORTH_F1_CARPENTER && CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA)) ) || - (CVarGetInteger(RANDOMIZER_SEED_CVAR("GerudoFortress"), RO_GF_NORMAL) == RO_GF_NORMAL && - ((locationIt.rc == RC_GF_GERUDO_MEMBERSHIP_CARD && CVarGetInteger(RANDOMIZER_SEED_CVAR("ShuffleGerudoToken"), RO_GENERIC_NO) == RO_GENERIC_YES) || - (locationIt.rcType == RCTYPE_GF_KEY && CVarGetInteger(RANDOMIZER_SEED_CVAR("GerudoKeys"), RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA)) + (CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoFortress"), RO_GF_NORMAL) == RO_GF_NORMAL && + ((locationIt.rc == RC_GF_GERUDO_MEMBERSHIP_CARD && CVarGetInteger(CVAR_RANDOMIZER_SETTING("ShuffleGerudoToken"), RO_GENERIC_NO) == RO_GENERIC_YES) || + (locationIt.rcType == RCTYPE_GF_KEY && CVarGetInteger(CVAR_RANDOMIZER_SETTING("GerudoKeys"), RO_GERUDO_KEYS_VANILLA) != RO_GERUDO_KEYS_VANILLA)) ) ) ); diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp index d991c464fbe..9d747c0639a 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp @@ -869,14 +869,14 @@ void UpdateCheck(uint32_t check, RandomizerCheckTrackerData data) { void CheckTrackerWindow::DrawElement() { ImGui::SetNextWindowSize(ImVec2(400, 540), ImGuiCond_FirstUseEver); - if (CVarGetInteger(CHECK_TRACKER_CVAR("WindowType"), TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) { - if (CVarGetInteger(CHECK_TRACKER_CVAR("ShowOnlyPaused"), 0) && (gPlayState == nullptr || gPlayState->pauseCtx.state == 0)) { + if (CVarGetInteger(CVAR_TRACKER_CHECK("WindowType"), TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) { + if (CVarGetInteger(CVAR_TRACKER_CHECK("ShowOnlyPaused"), 0) && (gPlayState == nullptr || gPlayState->pauseCtx.state == 0)) { return; } - if (CVarGetInteger(CHECK_TRACKER_CVAR("DisplayType"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) { - int comboButton1Mask = buttons[CVarGetInteger(CHECK_TRACKER_CVAR("ComboButton1"), TRACKER_COMBO_BUTTON_L)]; - int comboButton2Mask = buttons[CVarGetInteger(CHECK_TRACKER_CVAR("ComboButton2"), TRACKER_COMBO_BUTTON_R)]; + if (CVarGetInteger(CVAR_TRACKER_CHECK("DisplayType"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) { + int comboButton1Mask = buttons[CVarGetInteger(CVAR_TRACKER_CHECK("ComboButton1"), TRACKER_COMBO_BUTTON_L)]; + int comboButton2Mask = buttons[CVarGetInteger(CVAR_TRACKER_CHECK("ComboButton2"), TRACKER_COMBO_BUTTON_R)]; OSContPad* trackerButtonsPressed = LUS::Context::GetInstance()->GetControlDeck()->GetPads(); bool comboButtonsHeld = trackerButtonsPressed != nullptr && trackerButtonsPressed[0].button & comboButton1Mask && @@ -916,7 +916,7 @@ void CheckTrackerWindow::DrawElement() { ImGui::TableNextRow(0, headerHeight); ImGui::TableNextColumn(); UIWidgets::EnhancementCheckbox( - "Show Hidden Items", CHECK_TRACKER_CVAR("ShowHidden"), false, + "Show Hidden Items", CVAR_TRACKER_CHECK("ShowHidden"), false, "When active, items will show hidden checks by default when updated to this state."); UIWidgets::PaddedSeparator(); if (ImGui::Button("Expand All")) { @@ -955,17 +955,17 @@ void CheckTrackerWindow::DrawElement() { RainbowTick(); bool doDraw = false; bool thisAreaFullyChecked = false; - bool showHidden = CVarGetInteger(CHECK_TRACKER_CVAR("ShowHidden"), 0); - bool hideIncomplete = CVarGetInteger(CHECK_TRACKER_CVAR("AreaIncomplete.Hide"), 0); - bool hideComplete = CVarGetInteger(CHECK_TRACKER_CVAR("AreaComplete.Hide"), 0); + bool showHidden = CVarGetInteger(CVAR_TRACKER_CHECK("ShowHidden"), 0); + bool hideIncomplete = CVarGetInteger(CVAR_TRACKER_CHECK("AreaIncomplete.Hide"), 0); + bool hideComplete = CVarGetInteger(CVAR_TRACKER_CHECK("AreaComplete.Hide"), 0); bool collapseLogic; bool doingCollapseOrExpand = optExpandAll || optCollapseAll; bool isThisAreaSpoiled; RandomizerCheckArea lastArea = RCAREA_INVALID; - Color_RGBA8 areaCompleteColor = CVarGetColor(CHECK_TRACKER_CVAR("AreaComplete.MainColor"), Color_Main_Default); - Color_RGBA8 areaIncompleteColor = CVarGetColor(CHECK_TRACKER_CVAR("AreaIncomplete.MainColor"), Color_Main_Default); - Color_RGBA8 extraCompleteColor = CVarGetColor(CHECK_TRACKER_CVAR("AreaComplete.ExtraColor"), Color_Area_Complete_Extra_Default); - Color_RGBA8 extraIncompleteColor = CVarGetColor(CHECK_TRACKER_CVAR("AreaIncomplete.ExtraColor"), Color_Area_Incomplete_Extra_Default); + Color_RGBA8 areaCompleteColor = CVarGetColor(CVAR_TRACKER_CHECK("AreaComplete.MainColor"), Color_Main_Default); + Color_RGBA8 areaIncompleteColor = CVarGetColor(CVAR_TRACKER_CHECK("AreaIncomplete.MainColor"), Color_Main_Default); + Color_RGBA8 extraCompleteColor = CVarGetColor(CVAR_TRACKER_CHECK("AreaComplete.ExtraColor"), Color_Area_Complete_Extra_Default); + Color_RGBA8 extraIncompleteColor = CVarGetColor(CVAR_TRACKER_CHECK("AreaIncomplete.ExtraColor"), Color_Area_Incomplete_Extra_Default); Color_RGBA8 mainColor; Color_RGBA8 extraColor; std::string stemp; @@ -1020,7 +1020,7 @@ void CheckTrackerWindow::DrawElement() { ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(extraColor.r / 255.0f, extraColor.g / 255.0f, extraColor.b / 255.0f, extraColor.a / 255.0f)); - isThisAreaSpoiled = IsAreaSpoiled(rcArea) || CVarGetInteger(CHECK_TRACKER_CVAR("MQSpoilers"), 0); + isThisAreaSpoiled = IsAreaSpoiled(rcArea) || CVarGetInteger(CVAR_TRACKER_CHECK("MQSpoilers"), 0); if (isThisAreaSpoiled) { if (showVOrMQ && RandomizerCheckObjects::AreaIsDungeon(rcArea)) { @@ -1098,12 +1098,12 @@ void BeginFloatWindows(std::string UniqueName, bool& open, ImGuiWindowFlags flag ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_NoFocusOnAppearing; } - if (CVarGetInteger(CHECK_TRACKER_CVAR("WindowType"), TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) { + if (CVarGetInteger(CVAR_TRACKER_CHECK("WindowType"), TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) { ImGui::SetNextWindowViewport(ImGui::GetMainViewport()->ID); windowFlags |= ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoScrollbar; - if (!CVarGetInteger(CHECK_TRACKER_CVAR("Draggable"), 0)) { + if (!CVarGetInteger(CVAR_TRACKER_CHECK("Draggable"), 0)) { windowFlags |= ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoMove; } } @@ -1363,52 +1363,52 @@ void DrawLocation(RandomizerCheckObject rcObj) { Color_RGBA8 mainColor; Color_RGBA8 extraColor; std::string txt; - bool showHidden = CVarGetInteger(CHECK_TRACKER_CVAR("ShowHidden"), 0); + bool showHidden = CVarGetInteger(CVAR_TRACKER_CHECK("ShowHidden"), 0); RandomizerCheckTrackerData checkData = gSaveContext.checkTrackerData[rcObj.rc]; RandomizerCheckStatus status = checkData.status; bool skipped = checkData.skipped; if (status == RCSHOW_COLLECTED) { - if (!showHidden && CVarGetInteger(CHECK_TRACKER_CVAR("Collected.Hide"), 0)) { + if (!showHidden && CVarGetInteger(CVAR_TRACKER_CHECK("Collected.Hide"), 0)) { return; } - mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CHECK_TRACKER_CVAR("Collected.ExtraColor"), Color_Collected_Extra_Default) : - CVarGetColor(CHECK_TRACKER_CVAR("Collected.MainColor"), Color_Main_Default); - extraColor = CVarGetColor(CHECK_TRACKER_CVAR("Collected.ExtraColor"), Color_Collected_Extra_Default); + mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CVAR_TRACKER_CHECK("Collected.ExtraColor"), Color_Collected_Extra_Default) : + CVarGetColor(CVAR_TRACKER_CHECK("Collected.MainColor"), Color_Main_Default); + extraColor = CVarGetColor(CVAR_TRACKER_CHECK("Collected.ExtraColor"), Color_Collected_Extra_Default); } else if (status == RCSHOW_SAVED) { - if (!showHidden && CVarGetInteger(CHECK_TRACKER_CVAR("Saved.Hide"), 0)) { + if (!showHidden && CVarGetInteger(CVAR_TRACKER_CHECK("Saved.Hide"), 0)) { return; } - mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CHECK_TRACKER_CVAR("Saved.ExtraColor"), Color_Saved_Extra_Default) : - CVarGetColor(CHECK_TRACKER_CVAR("Saved.MainColor"), Color_Main_Default); - extraColor = CVarGetColor(CHECK_TRACKER_CVAR("Saved.ExtraColor"), Color_Saved_Extra_Default); + mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CVAR_TRACKER_CHECK("Saved.ExtraColor"), Color_Saved_Extra_Default) : + CVarGetColor(CVAR_TRACKER_CHECK("Saved.MainColor"), Color_Main_Default); + extraColor = CVarGetColor(CVAR_TRACKER_CHECK("Saved.ExtraColor"), Color_Saved_Extra_Default); } else if (skipped) { - if (!showHidden && CVarGetInteger(CHECK_TRACKER_CVAR("Skipped.Hide"), 0)) { + if (!showHidden && CVarGetInteger(CVAR_TRACKER_CHECK("Skipped.Hide"), 0)) { return; } - mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CHECK_TRACKER_CVAR("Skipped.ExtraColor"), Color_Skipped_Extra_Default) : - CVarGetColor(CHECK_TRACKER_CVAR("Skipped.MainColor"), Color_Main_Default); - extraColor = CVarGetColor(CHECK_TRACKER_CVAR("Skipped.ExtraColor"), Color_Skipped_Extra_Default); + mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CVAR_TRACKER_CHECK("Skipped.ExtraColor"), Color_Skipped_Extra_Default) : + CVarGetColor(CVAR_TRACKER_CHECK("Skipped.MainColor"), Color_Main_Default); + extraColor = CVarGetColor(CVAR_TRACKER_CHECK("Skipped.ExtraColor"), Color_Skipped_Extra_Default); } else if (status == RCSHOW_SEEN || status == RCSHOW_IDENTIFIED) { - if (!showHidden && CVarGetInteger(CHECK_TRACKER_CVAR("Seen.Hide"), 0)) { + if (!showHidden && CVarGetInteger(CVAR_TRACKER_CHECK("Seen.Hide"), 0)) { return; } - mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CHECK_TRACKER_CVAR("Seen.ExtraColor"), Color_Seen_Extra_Default) : - CVarGetColor(CHECK_TRACKER_CVAR("Seen.MainColor"), Color_Main_Default); - extraColor = CVarGetColor(CHECK_TRACKER_CVAR("Seen.ExtraColor"), Color_Seen_Extra_Default); + mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CVAR_TRACKER_CHECK("Seen.ExtraColor"), Color_Seen_Extra_Default) : + CVarGetColor(CVAR_TRACKER_CHECK("Seen.MainColor"), Color_Main_Default); + extraColor = CVarGetColor(CVAR_TRACKER_CHECK("Seen.ExtraColor"), Color_Seen_Extra_Default); } else if (status == RCSHOW_SCUMMED) { - if (!showHidden && CVarGetInteger(CHECK_TRACKER_CVAR("Scummed.Hide"), 0)) { + if (!showHidden && CVarGetInteger(CVAR_TRACKER_CHECK("Scummed.Hide"), 0)) { return; } - mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CHECK_TRACKER_CVAR("Scummed.ExtraColor"), Color_Scummed_Extra_Default) : - CVarGetColor(CHECK_TRACKER_CVAR("Scummed.MainColor"), Color_Main_Default); - extraColor = CVarGetColor(CHECK_TRACKER_CVAR("Scummed.ExtraColor"), Color_Scummed_Extra_Default); + mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CVAR_TRACKER_CHECK("Scummed.ExtraColor"), Color_Scummed_Extra_Default) : + CVarGetColor(CVAR_TRACKER_CHECK("Scummed.MainColor"), Color_Main_Default); + extraColor = CVarGetColor(CVAR_TRACKER_CHECK("Scummed.ExtraColor"), Color_Scummed_Extra_Default); } else if (status == RCSHOW_UNCHECKED) { - if (!showHidden && CVarGetInteger(CHECK_TRACKER_CVAR("Unchecked.Hide"), 0)) { + if (!showHidden && CVarGetInteger(CVAR_TRACKER_CHECK("Unchecked.Hide"), 0)) { return; } - mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CHECK_TRACKER_CVAR("Unchecked.ExtraColor"), Color_Unchecked_Extra_Default) : - CVarGetColor(CHECK_TRACKER_CVAR("Unchecked.MainColor"), Color_Main_Default); - extraColor = CVarGetColor(CHECK_TRACKER_CVAR("Unchecked.ExtraColor"), Color_Unchecked_Extra_Default); + mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CVAR_TRACKER_CHECK("Unchecked.ExtraColor"), Color_Unchecked_Extra_Default) : + CVarGetColor(CVAR_TRACKER_CHECK("Unchecked.MainColor"), Color_Main_Default); + extraColor = CVarGetColor(CVAR_TRACKER_CHECK("Unchecked.ExtraColor"), Color_Unchecked_Extra_Default); } //Main Text @@ -1503,15 +1503,15 @@ void DrawLocation(RandomizerCheckObject rcObj) { } static std::set rainbowCVars = { - CHECK_TRACKER_CVAR("AreaIncomplete.MainColor"), CHECK_TRACKER_CVAR("AreaIncomplete.ExtraColor"), - CHECK_TRACKER_CVAR("AreaComplete.MainColor"), CHECK_TRACKER_CVAR("AreaComplete.ExtraColor"), - CHECK_TRACKER_CVAR("Unchecked.MainColor"), CHECK_TRACKER_CVAR("Unchecked.ExtraColor"), - CHECK_TRACKER_CVAR("Skipped.MainColor"), CHECK_TRACKER_CVAR("Skipped.ExtraColor"), - CHECK_TRACKER_CVAR("Seen.MainColor"), CHECK_TRACKER_CVAR("Seen.ExtraColor"), - CHECK_TRACKER_CVAR("Hinted.MainColor"), CHECK_TRACKER_CVAR("Hinted.ExtraColor"), - CHECK_TRACKER_CVAR("Collected.MainColor"), CHECK_TRACKER_CVAR("Collected.ExtraColor"), - CHECK_TRACKER_CVAR("Scummed.MainColor"), CHECK_TRACKER_CVAR("Scummed.ExtraColor"), - CHECK_TRACKER_CVAR("Saved.MainColor"), CHECK_TRACKER_CVAR("Saved.ExtraColor"), + CVAR_TRACKER_CHECK("AreaIncomplete.MainColor"), CVAR_TRACKER_CHECK("AreaIncomplete.ExtraColor"), + CVAR_TRACKER_CHECK("AreaComplete.MainColor"), CVAR_TRACKER_CHECK("AreaComplete.ExtraColor"), + CVAR_TRACKER_CHECK("Unchecked.MainColor"), CVAR_TRACKER_CHECK("Unchecked.ExtraColor"), + CVAR_TRACKER_CHECK("Skipped.MainColor"), CVAR_TRACKER_CHECK("Skipped.ExtraColor"), + CVAR_TRACKER_CHECK("Seen.MainColor"), CVAR_TRACKER_CHECK("Seen.ExtraColor"), + CVAR_TRACKER_CHECK("Hinted.MainColor"), CVAR_TRACKER_CHECK("Hinted.ExtraColor"), + CVAR_TRACKER_CHECK("Collected.MainColor"), CVAR_TRACKER_CHECK("Collected.ExtraColor"), + CVAR_TRACKER_CHECK("Scummed.MainColor"), CVAR_TRACKER_CHECK("Scummed.ExtraColor"), + CVAR_TRACKER_CHECK("Saved.MainColor"), CVAR_TRACKER_CHECK("Saved.ExtraColor"), }; int hue = 0; @@ -1606,33 +1606,33 @@ void CheckTrackerSettingsWindow::DrawElement() { ImGui::TableNextRow(); ImGui::TableNextColumn(); ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x); - if (UIWidgets::EnhancementColor("BG Color", CHECK_TRACKER_CVAR("BgColor"), + if (UIWidgets::EnhancementColor("BG Color", CVAR_TRACKER_CHECK("BgColor"), ImVec4(Color_Background.r, Color_Background.g, Color_Background.b, Color_Background.a), ImVec4(Color_Bg_Default.r, Color_Bg_Default.g, Color_Bg_Default.b, Color_Bg_Default.a), false, true)) { - Color_Background = CVarGetColor(CHECK_TRACKER_CVAR("BgColor"), Color_Bg_Default); + Color_Background = CVarGetColor(CVAR_TRACKER_CHECK("BgColor"), Color_Bg_Default); } ImGui::PopItemWidth(); - UIWidgets::LabeledRightAlignedEnhancementCombobox("Window Type", CHECK_TRACKER_CVAR("WindowType"), windowType, TRACKER_WINDOW_WINDOW); - if (CVarGetInteger(CHECK_TRACKER_CVAR("WindowType"), TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) { - UIWidgets::EnhancementCheckbox("Enable Dragging", CHECK_TRACKER_CVAR("Draggable")); - UIWidgets::EnhancementCheckbox("Only enable while paused", CHECK_TRACKER_CVAR("ShowOnlyPaused")); - UIWidgets::LabeledRightAlignedEnhancementCombobox("Display Mode", CHECK_TRACKER_CVAR("DisplayType"), displayType, 0); - if (CVarGetInteger(CHECK_TRACKER_CVAR("DisplayType"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) { - UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 1", CHECK_TRACKER_CVAR("ComboButton1"), buttonStrings, TRACKER_COMBO_BUTTON_L); - UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 2", CHECK_TRACKER_CVAR("ComboButton2"), buttonStrings, TRACKER_COMBO_BUTTON_R); + UIWidgets::LabeledRightAlignedEnhancementCombobox("Window Type", CVAR_TRACKER_CHECK("WindowType"), windowType, TRACKER_WINDOW_WINDOW); + if (CVarGetInteger(CVAR_TRACKER_CHECK("WindowType"), TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) { + UIWidgets::EnhancementCheckbox("Enable Dragging", CVAR_TRACKER_CHECK("Draggable")); + UIWidgets::EnhancementCheckbox("Only enable while paused", CVAR_TRACKER_CHECK("ShowOnlyPaused")); + UIWidgets::LabeledRightAlignedEnhancementCombobox("Display Mode", CVAR_TRACKER_CHECK("DisplayType"), displayType, 0); + if (CVarGetInteger(CVAR_TRACKER_CHECK("DisplayType"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) { + UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 1", CVAR_TRACKER_CHECK("ComboButton1"), buttonStrings, TRACKER_COMBO_BUTTON_L); + UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 2", CVAR_TRACKER_CHECK("ComboButton2"), buttonStrings, TRACKER_COMBO_BUTTON_R); } } - UIWidgets::EnhancementCheckbox("Vanilla/MQ Dungeon Spoilers", CHECK_TRACKER_CVAR("MQSpoilers")); + UIWidgets::EnhancementCheckbox("Vanilla/MQ Dungeon Spoilers", CVAR_TRACKER_CHECK("MQSpoilers")); UIWidgets::Tooltip("If enabled, Vanilla/MQ dungeons will show on the tracker immediately. Otherwise, Vanilla/MQ dungeon locations must be unlocked."); - if (UIWidgets::EnhancementCheckbox("Hide right-side shop item checks", CHECK_TRACKER_CVAR("HideRightShopChecks"), false, "", UIWidgets::CheckboxGraphics::Cross, true)) { + if (UIWidgets::EnhancementCheckbox("Hide right-side shop item checks", CVAR_TRACKER_CHECK("HideRightShopChecks"), false, "", UIWidgets::CheckboxGraphics::Cross, true)) { hideShopRightChecks = !hideShopRightChecks; RecalculateAreaTotals(); } UIWidgets::Tooltip("If enabled, will prevent the tracker from displaying slots 1-4 in all shops."); - if (UIWidgets::EnhancementCheckbox("Always show gold skulltulas", CHECK_TRACKER_CVAR("AlwaysShowGSLocs"), false, "")) { + if (UIWidgets::EnhancementCheckbox("Always show gold skulltulas", CVAR_TRACKER_CHECK("AlwaysShowGSLocs"), false, "")) { alwaysShowGS = !alwaysShowGS; RecalculateAreaTotals(); } @@ -1645,15 +1645,15 @@ void CheckTrackerSettingsWindow::DrawElement() { ImGui::TableNextColumn(); - CheckTracker::ImGuiDrawTwoColorPickerSection("Area Incomplete", CHECK_TRACKER_CVAR("AreaIncomplete.MainColor"), CHECK_TRACKER_CVAR("AreaIncomplete.ExtraColor"), Color_Area_Incomplete_Main, Color_Area_Incomplete_Extra, Color_Main_Default, Color_Area_Incomplete_Extra_Default, CHECK_TRACKER_CVAR("AreaIncomplete.Hide"), ""); - CheckTracker::ImGuiDrawTwoColorPickerSection("Area Complete", CHECK_TRACKER_CVAR("AreaComplete.MainColor"), CHECK_TRACKER_CVAR("AreaComplete.ExtraColor"), Color_Area_Complete_Main, Color_Area_Complete_Extra, Color_Main_Default, Color_Area_Complete_Extra_Default, CHECK_TRACKER_CVAR("AreaComplete.Hide"), ""); - CheckTracker::ImGuiDrawTwoColorPickerSection("Unchecked", CHECK_TRACKER_CVAR("Unchecked.MainColor"), CHECK_TRACKER_CVAR("Unchecked.ExtraColor"), Color_Unchecked_Main, Color_Unchecked_Extra, Color_Main_Default, Color_Unchecked_Extra_Default, CHECK_TRACKER_CVAR("Unchecked.Hide"), "Checks you have not interacted with at all."); - CheckTracker::ImGuiDrawTwoColorPickerSection("Skipped", CHECK_TRACKER_CVAR("Skipped.MainColor"), CHECK_TRACKER_CVAR("Skipped.ExtraColor"), Color_Skipped_Main, Color_Skipped_Extra, Color_Main_Default, Color_Skipped_Extra_Default, CHECK_TRACKER_CVAR("Skipped.Hide"), ""); - CheckTracker::ImGuiDrawTwoColorPickerSection("Seen", CHECK_TRACKER_CVAR("Seen.MainColor"), CHECK_TRACKER_CVAR("Seen.ExtraColor"), Color_Seen_Main, Color_Seen_Extra, Color_Main_Default, Color_Seen_Extra_Default, CHECK_TRACKER_CVAR("Seen.Hide"), "Used for shops. Shows item names for shop slots when walking in, and prices when highlighting them in buy mode."); - CheckTracker::ImGuiDrawTwoColorPickerSection("Scummed", CHECK_TRACKER_CVAR("Scummed.MainColor"), CHECK_TRACKER_CVAR("Scummed.ExtraColor"), Color_Scummed_Main, Color_Scummed_Extra, Color_Main_Default, Color_Scummed_Extra_Default, "gCheckTrackerScummedHide", "Checks you collect, but then reload before saving so you no longer have them."); - //CheckTracker::ImGuiDrawTwoColorPickerSection("Hinted (WIP)", CHECK_TRACKER_CVAR("Hinted.MainColor"), CHECK_TRACKER_CVAR("Hinted.ExtraColor"), Color_Hinted_Main, Color_Hinted_Extra, Color_Main_Default, Color_Hinted_Extra_Default, CHECK_TRACKER_CVAR("Hinted.Hide"), ""); - CheckTracker::ImGuiDrawTwoColorPickerSection("Collected", CHECK_TRACKER_CVAR("Collected.MainColor"), CHECK_TRACKER_CVAR("Collected.ExtraColor"), Color_Collected_Main, Color_Collected_Extra, Color_Main_Default, Color_Collected_Extra_Default, CHECK_TRACKER_CVAR("Collected.Hide"), "Checks you have collected without saving or reloading yet."); - CheckTracker::ImGuiDrawTwoColorPickerSection("Saved", CHECK_TRACKER_CVAR("Saved.MainColor"), CHECK_TRACKER_CVAR("Saved.ExtraColor"), Color_Saved_Main, Color_Saved_Extra, Color_Main_Default, Color_Saved_Extra_Default, CHECK_TRACKER_CVAR("Saved.Hide"), "Checks that you saved the game while having collected."); + CheckTracker::ImGuiDrawTwoColorPickerSection("Area Incomplete", CVAR_TRACKER_CHECK("AreaIncomplete.MainColor"), CVAR_TRACKER_CHECK("AreaIncomplete.ExtraColor"), Color_Area_Incomplete_Main, Color_Area_Incomplete_Extra, Color_Main_Default, Color_Area_Incomplete_Extra_Default, CVAR_TRACKER_CHECK("AreaIncomplete.Hide"), ""); + CheckTracker::ImGuiDrawTwoColorPickerSection("Area Complete", CVAR_TRACKER_CHECK("AreaComplete.MainColor"), CVAR_TRACKER_CHECK("AreaComplete.ExtraColor"), Color_Area_Complete_Main, Color_Area_Complete_Extra, Color_Main_Default, Color_Area_Complete_Extra_Default, CVAR_TRACKER_CHECK("AreaComplete.Hide"), ""); + CheckTracker::ImGuiDrawTwoColorPickerSection("Unchecked", CVAR_TRACKER_CHECK("Unchecked.MainColor"), CVAR_TRACKER_CHECK("Unchecked.ExtraColor"), Color_Unchecked_Main, Color_Unchecked_Extra, Color_Main_Default, Color_Unchecked_Extra_Default, CVAR_TRACKER_CHECK("Unchecked.Hide"), "Checks you have not interacted with at all."); + CheckTracker::ImGuiDrawTwoColorPickerSection("Skipped", CVAR_TRACKER_CHECK("Skipped.MainColor"), CVAR_TRACKER_CHECK("Skipped.ExtraColor"), Color_Skipped_Main, Color_Skipped_Extra, Color_Main_Default, Color_Skipped_Extra_Default, CVAR_TRACKER_CHECK("Skipped.Hide"), ""); + CheckTracker::ImGuiDrawTwoColorPickerSection("Seen", CVAR_TRACKER_CHECK("Seen.MainColor"), CVAR_TRACKER_CHECK("Seen.ExtraColor"), Color_Seen_Main, Color_Seen_Extra, Color_Main_Default, Color_Seen_Extra_Default, CVAR_TRACKER_CHECK("Seen.Hide"), "Used for shops. Shows item names for shop slots when walking in, and prices when highlighting them in buy mode."); + CheckTracker::ImGuiDrawTwoColorPickerSection("Scummed", CVAR_TRACKER_CHECK("Scummed.MainColor"), CVAR_TRACKER_CHECK("Scummed.ExtraColor"), Color_Scummed_Main, Color_Scummed_Extra, Color_Main_Default, Color_Scummed_Extra_Default, "gCheckTrackerScummedHide", "Checks you collect, but then reload before saving so you no longer have them."); + //CheckTracker::ImGuiDrawTwoColorPickerSection("Hinted (WIP)", CVAR_TRACKER_CHECK("Hinted.MainColor"), CVAR_TRACKER_CHECK("Hinted.ExtraColor"), Color_Hinted_Main, Color_Hinted_Extra, Color_Main_Default, Color_Hinted_Extra_Default, CVAR_TRACKER_CHECK("Hinted.Hide"), ""); + CheckTracker::ImGuiDrawTwoColorPickerSection("Collected", CVAR_TRACKER_CHECK("Collected.MainColor"), CVAR_TRACKER_CHECK("Collected.ExtraColor"), Color_Collected_Main, Color_Collected_Extra, Color_Main_Default, Color_Collected_Extra_Default, CVAR_TRACKER_CHECK("Collected.Hide"), "Checks you have collected without saving or reloading yet."); + CheckTracker::ImGuiDrawTwoColorPickerSection("Saved", CVAR_TRACKER_CHECK("Saved.MainColor"), CVAR_TRACKER_CHECK("Saved.ExtraColor"), Color_Saved_Main, Color_Saved_Extra, Color_Main_Default, Color_Saved_Extra_Default, CVAR_TRACKER_CHECK("Saved.Hide"), "Checks that you saved the game while having collected."); ImGui::PopStyleVar(1); ImGui::EndTable(); @@ -1661,25 +1661,25 @@ void CheckTrackerSettingsWindow::DrawElement() { } void CheckTrackerWindow::InitElement() { - Color_Background = CVarGetColor(CHECK_TRACKER_CVAR("BgColor"), Color_Bg_Default); - Color_Area_Incomplete_Main = CVarGetColor(CHECK_TRACKER_CVAR("AreaIncomplete.MainColor"), Color_Main_Default); - Color_Area_Incomplete_Extra = CVarGetColor(CHECK_TRACKER_CVAR("AreaIncomplete.ExtraColor"), Color_Area_Incomplete_Extra_Default); - Color_Area_Complete_Main = CVarGetColor(CHECK_TRACKER_CVAR("AreaComplete.MainColor"), Color_Main_Default); - Color_Area_Complete_Extra = CVarGetColor(CHECK_TRACKER_CVAR("AreaComplete.ExtraColor"), Color_Area_Complete_Extra_Default); - Color_Unchecked_Main = CVarGetColor(CHECK_TRACKER_CVAR("Unchecked.MainColor"), Color_Main_Default); - Color_Unchecked_Extra = CVarGetColor(CHECK_TRACKER_CVAR("Unchecked.ExtraColor"), Color_Unchecked_Extra_Default); - Color_Skipped_Main = CVarGetColor(CHECK_TRACKER_CVAR("Skipped.MainColor"), Color_Main_Default); - Color_Skipped_Extra = CVarGetColor(CHECK_TRACKER_CVAR("Skipped.ExtraColor"), Color_Skipped_Extra_Default); - Color_Seen_Main = CVarGetColor(CHECK_TRACKER_CVAR("Seen.MainColor"), Color_Main_Default); - Color_Seen_Extra = CVarGetColor(CHECK_TRACKER_CVAR("Seen.ExtraColor"), Color_Seen_Extra_Default); - Color_Hinted_Main = CVarGetColor(CHECK_TRACKER_CVAR("Hinted.MainColor"), Color_Main_Default); - Color_Hinted_Extra = CVarGetColor(CHECK_TRACKER_CVAR("Hinted.ExtraColor"), Color_Hinted_Extra_Default); - Color_Collected_Main = CVarGetColor(CHECK_TRACKER_CVAR("Collected.MainColor"), Color_Main_Default); - Color_Collected_Extra = CVarGetColor(CHECK_TRACKER_CVAR("Collected.ExtraColor"), Color_Collected_Extra_Default); - Color_Scummed_Main = CVarGetColor(CHECK_TRACKER_CVAR("Scummed.MainColor"), Color_Main_Default); - Color_Scummed_Extra = CVarGetColor(CHECK_TRACKER_CVAR("Scummed.ExtraColor"), Color_Scummed_Extra_Default); - Color_Saved_Main = CVarGetColor(CHECK_TRACKER_CVAR("Saved.MainColor"), Color_Main_Default); - Color_Saved_Extra = CVarGetColor(CHECK_TRACKER_CVAR("Saved.ExtraColor"), Color_Saved_Extra_Default); + Color_Background = CVarGetColor(CVAR_TRACKER_CHECK("BgColor"), Color_Bg_Default); + Color_Area_Incomplete_Main = CVarGetColor(CVAR_TRACKER_CHECK("AreaIncomplete.MainColor"), Color_Main_Default); + Color_Area_Incomplete_Extra = CVarGetColor(CVAR_TRACKER_CHECK("AreaIncomplete.ExtraColor"), Color_Area_Incomplete_Extra_Default); + Color_Area_Complete_Main = CVarGetColor(CVAR_TRACKER_CHECK("AreaComplete.MainColor"), Color_Main_Default); + Color_Area_Complete_Extra = CVarGetColor(CVAR_TRACKER_CHECK("AreaComplete.ExtraColor"), Color_Area_Complete_Extra_Default); + Color_Unchecked_Main = CVarGetColor(CVAR_TRACKER_CHECK("Unchecked.MainColor"), Color_Main_Default); + Color_Unchecked_Extra = CVarGetColor(CVAR_TRACKER_CHECK("Unchecked.ExtraColor"), Color_Unchecked_Extra_Default); + Color_Skipped_Main = CVarGetColor(CVAR_TRACKER_CHECK("Skipped.MainColor"), Color_Main_Default); + Color_Skipped_Extra = CVarGetColor(CVAR_TRACKER_CHECK("Skipped.ExtraColor"), Color_Skipped_Extra_Default); + Color_Seen_Main = CVarGetColor(CVAR_TRACKER_CHECK("Seen.MainColor"), Color_Main_Default); + Color_Seen_Extra = CVarGetColor(CVAR_TRACKER_CHECK("Seen.ExtraColor"), Color_Seen_Extra_Default); + Color_Hinted_Main = CVarGetColor(CVAR_TRACKER_CHECK("Hinted.MainColor"), Color_Main_Default); + Color_Hinted_Extra = CVarGetColor(CVAR_TRACKER_CHECK("Hinted.ExtraColor"), Color_Hinted_Extra_Default); + Color_Collected_Main = CVarGetColor(CVAR_TRACKER_CHECK("Collected.MainColor"), Color_Main_Default); + Color_Collected_Extra = CVarGetColor(CVAR_TRACKER_CHECK("Collected.ExtraColor"), Color_Collected_Extra_Default); + Color_Scummed_Main = CVarGetColor(CVAR_TRACKER_CHECK("Scummed.MainColor"), Color_Main_Default); + Color_Scummed_Extra = CVarGetColor(CVAR_TRACKER_CHECK("Scummed.ExtraColor"), Color_Scummed_Extra_Default); + Color_Saved_Main = CVarGetColor(CVAR_TRACKER_CHECK("Saved.MainColor"), Color_Main_Default); + Color_Saved_Extra = CVarGetColor(CVAR_TRACKER_CHECK("Saved.ExtraColor"), Color_Saved_Extra_Default); SaveManager::Instance->AddInitFunction(InitTrackerData); sectionId = SaveManager::Instance->AddSaveFunction("trackerData", 1, SaveFile, true, -1); @@ -1695,8 +1695,8 @@ void CheckTrackerWindow::InitElement() { GameInteractor::Instance->RegisterGameHook(CheckTrackerSceneFlagSet); GameInteractor::Instance->RegisterGameHook(CheckTrackerFlagSet); - hideShopRightChecks = CVarGetInteger(CHECK_TRACKER_CVAR("HideRightShopChecks"), 1); - alwaysShowGS = CVarGetInteger(CHECK_TRACKER_CVAR("AlwaysShowGSLocs"), 0); + hideShopRightChecks = CVarGetInteger(CVAR_TRACKER_CHECK("HideRightShopChecks"), 1); + alwaysShowGS = CVarGetInteger(CVAR_TRACKER_CHECK("AlwaysShowGSLocs"), 0); LocationTable_Init(); } diff --git a/soh/soh/Enhancements/randomizer/randomizer_entrance_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_entrance_tracker.cpp index e05a5ed387f..31d92165708 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_entrance_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_entrance_tracker.cpp @@ -665,25 +665,25 @@ void EntranceTrackerWindow::DrawElement() { ImGui::TableNextColumn(); ImGui::Text("Sort By"); - UIWidgets::EnhancementRadioButton("To", ENTRANCE_TRACKER_CVAR("SortBy"), 0); + UIWidgets::EnhancementRadioButton("To", CVAR_TRACKER_ENTRANCE("SortBy"), 0); UIWidgets::Tooltip("Sort entrances by the original source entrance"); - UIWidgets::EnhancementRadioButton("From", ENTRANCE_TRACKER_CVAR("SortBy"), 1); + UIWidgets::EnhancementRadioButton("From", CVAR_TRACKER_ENTRANCE("SortBy"), 1); UIWidgets::Tooltip("Sort entrances by the overrided destination"); UIWidgets::Spacer(2.0f); ImGui::Text("List Items"); - UIWidgets::PaddedEnhancementCheckbox("Auto scroll", ENTRANCE_TRACKER_CVAR("AutoScroll"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Auto scroll", CVAR_TRACKER_ENTRANCE("AutoScroll"), true, false); UIWidgets::Tooltip("Automatically scroll to the first aviable entrance in the current scene"); - UIWidgets::PaddedEnhancementCheckbox("Highlight previous", ENTRANCE_TRACKER_CVAR("HighlightPrevious"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Highlight previous", CVAR_TRACKER_ENTRANCE("HighlightPrevious"), true, false); UIWidgets::Tooltip("Highlight the previous entrance that Link came from"); - UIWidgets::PaddedEnhancementCheckbox("Highlight available", ENTRANCE_TRACKER_CVAR("HighlightAvailable"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Highlight available", CVAR_TRACKER_ENTRANCE("HighlightAvailable"), true, false); UIWidgets::Tooltip("Highlight available entrances in the current scene"); - UIWidgets::PaddedEnhancementCheckbox("Hide undiscovered", ENTRANCE_TRACKER_CVAR("CollapseUndiscovered"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Hide undiscovered", CVAR_TRACKER_ENTRANCE("CollapseUndiscovered"), true, false); UIWidgets::Tooltip("Collapse undiscovered entrances towards the bottom of each group"); bool disableHideReverseEntrances = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_DECOUPLED_ENTRANCES) == RO_GENERIC_ON; static const char* disableHideReverseEntrancesText = "This option is disabled because \"Decouple Entrances\" is enabled."; - UIWidgets::PaddedEnhancementCheckbox("Hide reverse", ENTRANCE_TRACKER_CVAR("HideReverseEntrances"), true, false, + UIWidgets::PaddedEnhancementCheckbox("Hide reverse", CVAR_TRACKER_ENTRANCE("HideReverseEntrances"), true, false, disableHideReverseEntrances, disableHideReverseEntrancesText, UIWidgets::CheckboxGraphics::Cross, true); UIWidgets::Tooltip("Hide reverse entrance transitions when Decouple Entrances is off"); UIWidgets::Spacer(0); @@ -691,17 +691,17 @@ void EntranceTrackerWindow::DrawElement() { ImGui::TableNextColumn(); ImGui::Text("Group By"); - UIWidgets::EnhancementRadioButton("Area", ENTRANCE_TRACKER_CVAR("GroupBy"), 0); + UIWidgets::EnhancementRadioButton("Area", CVAR_TRACKER_ENTRANCE("GroupBy"), 0); UIWidgets::Tooltip("Group entrances by their area"); - UIWidgets::EnhancementRadioButton("Type", ENTRANCE_TRACKER_CVAR("GroupBy"), 1); + UIWidgets::EnhancementRadioButton("Type", CVAR_TRACKER_ENTRANCE("GroupBy"), 1); UIWidgets::Tooltip("Group entrances by their entrance type"); UIWidgets::Spacer(2.0f); ImGui::Text("Spoiler Reveal"); - UIWidgets::PaddedEnhancementCheckbox("Show \"To\"", ENTRANCE_TRACKER_CVAR("ShowTo"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Show \"To\"", CVAR_TRACKER_ENTRANCE("ShowTo"), true, false); UIWidgets::Tooltip("Reveal the \"To\" entrance for undiscovered entrances"); - UIWidgets::PaddedEnhancementCheckbox("Show \"From\"", ENTRANCE_TRACKER_CVAR("ShowFrom"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Show \"From\"", CVAR_TRACKER_ENTRANCE("ShowFrom"), true, false); UIWidgets::Tooltip("Reveal the \"From\" entrance for undiscovered entrances"); ImGui::EndTable(); @@ -749,8 +749,8 @@ void EntranceTrackerWindow::DrawElement() { nextTreeState = 2; } - uint8_t destToggle = CVarGetInteger(ENTRANCE_TRACKER_CVAR("SortBy"), 0); - uint8_t groupToggle = CVarGetInteger(ENTRANCE_TRACKER_CVAR("GroupBy"), 0); + uint8_t destToggle = CVarGetInteger(CVAR_TRACKER_ENTRANCE("SortBy"), 0); + uint8_t groupToggle = CVarGetInteger(CVAR_TRACKER_ENTRANCE("GroupBy"), 0); // Combine destToggle and groupToggle to get a range of 0-3 uint8_t groupType = destToggle + (groupToggle * 2); @@ -801,7 +801,7 @@ void EntranceTrackerWindow::DrawElement() { // However, if entrances are decoupled, then all transitions need to be displayed, so we proceed with the filtering if ((original->type == ENTRANCE_TYPE_DUNGEON || original->type == ENTRANCE_TYPE_GROTTO || original->type == ENTRANCE_TYPE_INTERIOR) && (original->oneExit != 1 && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_DECOUPLED_ENTRANCES) == RO_GENERIC_OFF) && - CVarGetInteger(ENTRANCE_TRACKER_CVAR("HideReverseEntrances"), 1) == 1) { + CVarGetInteger(CVAR_TRACKER_ENTRANCE("HideReverseEntrances"), 1) == 1) { continue; } @@ -812,8 +812,8 @@ void EntranceTrackerWindow::DrawElement() { bool isDiscovered = IsEntranceDiscovered(entrance.index); - bool showOriginal = (!destToggle ? CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowTo"), 0) : CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowFrom"), 0)) || isDiscovered; - bool showOverride = (!destToggle ? CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowFrom"), 0) : CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowTo"), 0)) || isDiscovered; + bool showOriginal = (!destToggle ? CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowTo"), 0) : CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowFrom"), 0)) || isDiscovered; + bool showOverride = (!destToggle ? CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowFrom"), 0) : CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowTo"), 0)) || isDiscovered; const char* origSrcAreaName = spoilerEntranceGroupNames[original->srcGroup].c_str(); const char* origTypeName = groupTypeNames[original->type].c_str(); @@ -826,7 +826,7 @@ void EntranceTrackerWindow::DrawElement() { const char* rplcDstName = showOverride ? override->destination.c_str() : ""; // Filter for entrances by group name, type, source/destination names, and meta tags - if ((!locationSearch.IsActive() && (showOriginal || showOverride || !CVarGetInteger(ENTRANCE_TRACKER_CVAR("CollapseUndiscovered"), 0))) || + if ((!locationSearch.IsActive() && (showOriginal || showOverride || !CVarGetInteger(CVAR_TRACKER_ENTRANCE("CollapseUndiscovered"), 0))) || ((showOriginal && (locationSearch.PassFilter(origSrcName) || locationSearch.PassFilter(origDstName) || locationSearch.PassFilter(origSrcAreaName) || locationSearch.PassFilter(origTypeName) || locationSearch.PassFilter(original->metaTag.c_str()))) || @@ -864,8 +864,8 @@ void EntranceTrackerWindow::DrawElement() { bool isDiscovered = IsEntranceDiscovered(entrance.index); - bool showOriginal = (!destToggle ? CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowTo"), 0) : CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowFrom"), 0)) || isDiscovered; - bool showOverride = (!destToggle ? CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowFrom"), 0) : CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowTo"), 0)) || isDiscovered; + bool showOriginal = (!destToggle ? CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowTo"), 0) : CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowFrom"), 0)) || isDiscovered; + bool showOverride = (!destToggle ? CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowFrom"), 0) : CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowTo"), 0)) || isDiscovered; const char* unknown = "???"; @@ -879,16 +879,16 @@ void EntranceTrackerWindow::DrawElement() { // Handle highlighting and auto scroll if ((original->index == lastEntranceIndex || (override->reverseIndex == lastEntranceIndex && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_DECOUPLED_ENTRANCES) == RO_GENERIC_OFF)) && - CVarGetInteger(ENTRANCE_TRACKER_CVAR("HighlightPrevious"), 0)) { + CVarGetInteger(CVAR_TRACKER_ENTRANCE("HighlightPrevious"), 0)) { color = COLOR_ORANGE; } else if (LinkIsInArea(original) != -1) { - if (CVarGetInteger(ENTRANCE_TRACKER_CVAR("HighlightAvailable"), 0)) { + if (CVarGetInteger(CVAR_TRACKER_ENTRANCE("HighlightAvailable"), 0)) { color = COLOR_GREEN; } if (doAreaScroll) { doAreaScroll = false; - if (CVarGetInteger(ENTRANCE_TRACKER_CVAR("AutoScroll"), 0)) { + if (CVarGetInteger(CVAR_TRACKER_ENTRANCE("AutoScroll"), 0)) { ImGui::SetScrollHereY(0.0f); } } diff --git a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp index e38af9fa312..5ae80b5e738 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp @@ -413,17 +413,17 @@ void DrawItemCount(ItemTrackerItem item, bool hideMax) { if (!GameInteractor::IsSaveLoaded()) { return; } - int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36); - int textSize = CVarGetInteger(ITEM_TRACKER_CVAR("TextSize"), 13); + int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36); + int textSize = CVarGetInteger(CVAR_TRACKER_ITEM("TextSize"), 13); ItemTrackerNumbers currentAndMax = GetItemCurrentAndMax(item); ImVec2 p = ImGui::GetCursorScreenPos(); - int32_t trackerNumberDisplayMode = CVarGetInteger(ITEM_TRACKER_CVAR("ItemCountType"), ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY); - int32_t trackerKeyNumberDisplayMode = CVarGetInteger(ITEM_TRACKER_CVAR("KeyCounts"), KEYS_COLLECTED_MAX); + int32_t trackerNumberDisplayMode = CVarGetInteger(CVAR_TRACKER_ITEM("ItemCountType"), ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY); + int32_t trackerKeyNumberDisplayMode = CVarGetInteger(CVAR_TRACKER_ITEM("KeyCounts"), KEYS_COLLECTED_MAX); float textScalingFactor = static_cast(iconSize) / 36.0f; uint32_t actualItemId = INV_CONTENT(item.id); bool hasItem = actualItemId != ITEM_NONE; - if (CVarGetInteger(ITEM_TRACKER_CVAR("HookshotIdentifier"), 0)) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("HookshotIdentifier"), 0)) { if ((actualItemId == ITEM_HOOKSHOT || actualItemId == ITEM_LONGSHOT) && hasItem) { // Calculate the scaled position for the text @@ -469,7 +469,7 @@ void DrawItemCount(ItemTrackerItem item, bool hideMax) { ImU32 currentColor = IM_COL_WHITE; ImU32 maxColor = item.id == QUEST_SKULL_TOKEN ? IM_COL_RED : IM_COL_GREEN; - bool shouldAlignToLeft = CVarGetInteger(ITEM_TRACKER_CVAR("ItemCountAlignLeft"), 0) && + bool shouldAlignToLeft = CVarGetInteger(CVAR_TRACKER_ITEM("ItemCountAlignLeft"), 0) && trackerNumberDisplayMode != ITEM_TRACKER_NUMBER_CAPACITY && trackerNumberDisplayMode != ITEM_TRACKER_NUMBER_AMMO; @@ -529,7 +529,7 @@ void DrawItemCount(ItemTrackerItem item, bool hideMax) { uint8_t piecesTotal = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT_PIECES_TOTAL); ImU32 currentColor = gSaveContext.triforcePiecesCollected >= piecesRequired ? IM_COL_GREEN : IM_COL_WHITE; ImU32 maxColor = IM_COL_GREEN; - int32_t trackerTriforcePieceNumberDisplayMode = CVarGetInteger(ITEM_TRACKER_CVAR("TriforcePieceCounts"), TRIFORCE_PIECE_COLLECTED_REQUIRED_MAX); + int32_t trackerTriforcePieceNumberDisplayMode = CVarGetInteger(CVAR_TRACKER_ITEM("TriforcePieceCounts"), TRIFORCE_PIECE_COLLECTED_REQUIRED_MAX); currentString += std::to_string(gSaveContext.triforcePiecesCollected); currentString += "/"; @@ -559,7 +559,7 @@ void DrawItemCount(ItemTrackerItem item, bool hideMax) { void DrawEquip(ItemTrackerItem item) { bool hasEquip = HasEquipment(item); - int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36); + int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36); ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasEquip && IsValidSaveFile() ? item.name : item.nameFaded), ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1)); @@ -568,7 +568,7 @@ void DrawEquip(ItemTrackerItem item) { void DrawQuest(ItemTrackerItem item) { bool hasQuestItem = HasQuestItem(item); - int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36); + int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36); ImGui::BeginGroup(); ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasQuestItem && IsValidSaveFile() ? item.name : item.nameFaded), ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1)); @@ -585,7 +585,7 @@ void DrawQuest(ItemTrackerItem item) { void DrawItem(ItemTrackerItem item) { uint32_t actualItemId = GameInteractor::IsSaveLoaded() ? INV_CONTENT(item.id) : ITEM_NONE; - int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36); + int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36); bool hasItem = actualItemId != ITEM_NONE; std::string itemName = ""; @@ -661,7 +661,7 @@ void DrawBottle(ItemTrackerItem item) { item = actualItemTrackerItemMap[actualItemId]; } - int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36); + int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36); ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasItem && IsValidSaveFile() ? item.name : item.nameFaded), ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1)); @@ -672,7 +672,7 @@ void DrawDungeonItem(ItemTrackerItem item) { uint32_t itemId = item.id; ImU32 dungeonColor = IM_COL_WHITE; uint32_t bitMask = 1 << (item.id - ITEM_KEY_BOSS); // Bitset starts at ITEM_KEY_BOSS == 0. the rest are sequential - int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36); + int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36); bool hasItem = GameInteractor::IsSaveLoaded() ? (bitMask & gSaveContext.inventory.dungeonItems[item.data]) : false; bool hasSmallKey = GameInteractor::IsSaveLoaded() ? ((gSaveContext.inventory.dungeonKeys[item.data]) >= 0) : false; ImGui::BeginGroup(); @@ -718,7 +718,7 @@ void DrawDungeonItem(ItemTrackerItem item) { } void DrawSong(ItemTrackerItem item) { - int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36); + int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36); ImVec2 p = ImGui::GetCursorScreenPos(); bool hasSong = HasSong(item); ImGui::SetCursorScreenPos(ImVec2(p.x + 6, p.y)); @@ -729,8 +729,8 @@ void DrawSong(ItemTrackerItem item) { void DrawNotes(bool resizeable = false) { ImGui::BeginGroup(); - int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36); - int iconSpacing = CVarGetInteger(ITEM_TRACKER_CVAR("IconSpacing"), 12); + int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36); + int iconSpacing = CVarGetInteger(CVAR_TRACKER_ITEM("IconSpacing"), 12); struct ItemTrackerNotes { static int TrackerNotesResizeCallback(ImGuiInputTextCallbackData* data) { @@ -775,11 +775,11 @@ void BeginFloatingWindows(std::string UniqueName, ImGuiWindowFlags flags = 0) { windowFlags |= ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoResize; } - if (CVarGetInteger(ITEM_TRACKER_CVAR("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_FLOATING) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_FLOATING) { ImGui::SetNextWindowViewport(ImGui::GetMainViewport()->ID); windowFlags |= ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoScrollbar; - if (!CVarGetInteger(ITEM_TRACKER_CVAR("Draggable"), 0)) { + if (!CVarGetInteger(CVAR_TRACKER_ITEM("Draggable"), 0)) { windowFlags |= ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoMove; } } @@ -800,9 +800,9 @@ void EndFloatingWindows() { * Takes in a vector of ItemTrackerItem and draws them in rows of N items */ void DrawItemsInRows(std::vector items, int columns = 6) { - int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36); - int iconSpacing = CVarGetInteger(ITEM_TRACKER_CVAR("IconSpacing"), 12); - int topPadding = (CVarGetInteger(ITEM_TRACKER_CVAR("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_WINDOW) ? 20 : 0; + int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36); + int iconSpacing = CVarGetInteger(CVAR_TRACKER_ITEM("IconSpacing"), 12); + int topPadding = (CVarGetInteger(CVAR_TRACKER_ITEM("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_WINDOW) ? 20 : 0; for (int i = 0; i < items.size(); i++) { int row = i / columns; @@ -817,8 +817,8 @@ void DrawItemsInRows(std::vector items, int columns = 6) { * Takes in a vector of ItemTrackerItem and draws them evenly spread across a circle */ void DrawItemsInACircle(std::vector items) { - int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36); - int iconSpacing = CVarGetInteger(ITEM_TRACKER_CVAR("IconSpacing"), 12); + int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36); + int iconSpacing = CVarGetInteger(CVAR_TRACKER_ITEM("IconSpacing"), 12); ImVec2 max = ImGui::GetWindowContentRegionMax(); float radius = (iconSize + iconSpacing) * 2; @@ -827,7 +827,7 @@ void DrawItemsInACircle(std::vector items) { float angle = (float)i / items.size() * 2.0f * M_PI; float x = (radius / 2.0f) * cos(angle) + max.x / 2.0f; float y = (radius / 2.0f) * sin(angle) + max.y / 2.0f; - ImGui::SetCursorPos(ImVec2(x - (CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36) - 8) / 2.0f, y + 4)); + ImGui::SetCursorPos(ImVec2(x - (CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36) - 8) / 2.0f, y + 4)); items[i].drawFunc(items[i]); } } @@ -838,8 +838,8 @@ void DrawItemsInACircle(std::vector items) { * to then call DrawItemsInRows */ std::vector GetDungeonItemsVector(std::vector dungeons, int columns = 6) { - int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36); - int iconSpacing = CVarGetInteger(ITEM_TRACKER_CVAR("IconSpacing"), 12); + int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36); + int iconSpacing = CVarGetInteger(CVAR_TRACKER_ITEM("IconSpacing"), 12); std::vector dungeonItems = {}; int rowCount = 0; @@ -894,8 +894,8 @@ void UpdateVectors() { dungeonRewards.insert(dungeonRewards.end(), dungeonRewardMedallions.begin(), dungeonRewardMedallions.end()); dungeonItems.clear(); - if (CVarGetInteger(ITEM_TRACKER_CVAR("DungeonItems.Layout"), 1) && CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) { - if (CVarGetInteger(ITEM_TRACKER_CVAR("DungeonItems.DisplayMaps"), 1)) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DungeonItems.Layout"), 1) && CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DungeonItems.DisplayMaps"), 1)) { dungeonItems = GetDungeonItemsVector(itemTrackerDungeonsWithMapsHorizontal, 12); // Manually adding Thieves Hideout to an open spot so we don't get an additional row for one item dungeonItems[23] = ITEM_TRACKER_ITEM(ITEM_KEY_SMALL, SCENE_THIEVES_HIDEOUT, DrawDungeonItem); @@ -905,7 +905,7 @@ void UpdateVectors() { dungeonItems[15] = ITEM_TRACKER_ITEM(ITEM_KEY_SMALL, SCENE_THIEVES_HIDEOUT, DrawDungeonItem); } } else { - if (CVarGetInteger(ITEM_TRACKER_CVAR("DungeonItems.DisplayMaps"), 1)) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DungeonItems.DisplayMaps"), 1)) { dungeonItems = GetDungeonItemsVector(itemTrackerDungeonsWithMapsCompact); // Manually adding Thieves Hideout to an open spot so we don't get an additional row for one item dungeonItems[35] = ITEM_TRACKER_ITEM(ITEM_KEY_SMALL, SCENE_THIEVES_HIDEOUT, DrawDungeonItem); @@ -915,37 +915,37 @@ void UpdateVectors() { } mainWindowItems.clear(); - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Inventory"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Inventory"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) { mainWindowItems.insert(mainWindowItems.end(), inventoryItems.begin(), inventoryItems.end()); } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Equipment"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Equipment"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) { mainWindowItems.insert(mainWindowItems.end(), equipmentItems.begin(), equipmentItems.end()); } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) { mainWindowItems.insert(mainWindowItems.end(), miscItems.begin(), miscItems.end()); } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) { mainWindowItems.insert(mainWindowItems.end(), dungeonRewardStones.begin(), dungeonRewardStones.end()); mainWindowItems.insert(mainWindowItems.end(), dungeonRewardMedallions.begin(), dungeonRewardMedallions.end()); } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Songs"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) { - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW && - CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) != SECTION_DISPLAY_MAIN_WINDOW) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Songs"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW && + CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) != SECTION_DISPLAY_MAIN_WINDOW) { mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem)); mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem)); mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem)); } mainWindowItems.insert(mainWindowItems.end(), songItems.begin(), songItems.end()); } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) { mainWindowItems.insert(mainWindowItems.end(), dungeonItems.begin(), dungeonItems.end()); } // if we're adding greg to the misc window, // and misc isn't on the main window, // and it doesn't already have greg, add him - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MISC_WINDOW && - CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) != SECTION_DISPLAY_MAIN_WINDOW && + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MISC_WINDOW && + CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) != SECTION_DISPLAY_MAIN_WINDOW && std::none_of(miscItems.begin(), miscItems.end(), [](ItemTrackerItem item){return item.id == ITEM_RUPEE_GREEN;})) { miscItems.insert(miscItems.end(), gregItems.begin(), gregItems.end()); @@ -960,7 +960,7 @@ void UpdateVectors() { } // if we're adding greg to the main window - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) { // insert empty items until we're on a new row for greg while (mainWindowItems.size() % 6) { mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem)); @@ -971,9 +971,9 @@ void UpdateVectors() { } // If we're adding triforce pieces to the main window - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.TriforcePieces"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.TriforcePieces"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) { // If Greg isn't on the main window, add empty items to place the triforce pieces on a new row. - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) != SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) != SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) { while (mainWindowItems.size() % 6) { mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem)); } @@ -1009,56 +1009,56 @@ void ItemTrackerLoadFile() { void ItemTrackerWindow::DrawElement() { UpdateVectors(); - int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36); - int iconSpacing = CVarGetInteger(ITEM_TRACKER_CVAR("IconSpacing"), 12); - int comboButton1Mask = buttonMap[CVarGetInteger(ITEM_TRACKER_CVAR("ComboButton1"), TRACKER_COMBO_BUTTON_L)]; - int comboButton2Mask = buttonMap[CVarGetInteger(ITEM_TRACKER_CVAR("ComboButton2"), TRACKER_COMBO_BUTTON_R)]; + int iconSize = CVarGetInteger(CVAR_TRACKER_ITEM("IconSize"), 36); + int iconSpacing = CVarGetInteger(CVAR_TRACKER_ITEM("IconSpacing"), 12); + int comboButton1Mask = buttonMap[CVarGetInteger(CVAR_TRACKER_ITEM("ComboButton1"), TRACKER_COMBO_BUTTON_L)]; + int comboButton2Mask = buttonMap[CVarGetInteger(CVAR_TRACKER_ITEM("ComboButton2"), TRACKER_COMBO_BUTTON_R)]; OSContPad* buttonsPressed = LUS::Context::GetInstance()->GetControlDeck()->GetPads(); bool comboButtonsHeld = buttonsPressed != nullptr && buttonsPressed[0].button & comboButton1Mask && buttonsPressed[0].button & comboButton2Mask; - bool isPaused = CVarGetInteger(ITEM_TRACKER_CVAR("ShowOnlyPaused"), 0) == 0 || gPlayState != nullptr && gPlayState->pauseCtx.state > 0; + bool isPaused = CVarGetInteger(CVAR_TRACKER_ITEM("ShowOnlyPaused"), 0) == 0 || gPlayState != nullptr && gPlayState->pauseCtx.state > 0; - if (CVarGetInteger(ITEM_TRACKER_CVAR("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_WINDOW || isPaused && (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS ? CVarGetInteger(WINDOW_CVAR("ItemTracker"), 0) : comboButtonsHeld)) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_WINDOW || isPaused && (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS ? CVarGetInteger(CVAR_WINDOW("ItemTracker"), 0) : comboButtonsHeld)) { if ( - (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Inventory"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) || - (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Equipment"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) || - (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) || - (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) || - (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Songs"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) || - (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) || - (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) || - (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.TriforcePieces"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) || - (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Notes"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) + (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Inventory"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) || + (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Equipment"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) || + (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) || + (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) || + (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Songs"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) || + (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) || + (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) || + (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.TriforcePieces"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) || + (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Notes"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) ) { BeginFloatingWindows("Item Tracker##main window"); DrawItemsInRows(mainWindowItems, 6); - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Notes"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW && CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Notes"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW && CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) { DrawNotes(); } EndFloatingWindows(); } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Inventory"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Inventory"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) { BeginFloatingWindows("Inventory Items Tracker"); DrawItemsInRows(inventoryItems); EndFloatingWindows(); } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Equipment"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Equipment"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) { BeginFloatingWindows("Equipment Items Tracker"); DrawItemsInRows(equipmentItems, 3); EndFloatingWindows(); } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) { BeginFloatingWindows("Misc Items Tracker"); DrawItemsInRows(miscItems, 4); EndFloatingWindows(); } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) { BeginFloatingWindows("Dungeon Rewards Tracker"); - if (CVarGetInteger(ITEM_TRACKER_CVAR("DungeonRewardsLayout"), 0)) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DungeonRewardsLayout"), 0)) { ImGui::BeginGroup(); DrawItemsInACircle(dungeonRewardMedallions); ImGui::EndGroup(); @@ -1071,16 +1071,16 @@ void ItemTrackerWindow::DrawElement() { EndFloatingWindows(); } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Songs"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Songs"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) { BeginFloatingWindows("Songs Tracker"); DrawItemsInRows(songItems); EndFloatingWindows(); } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) { BeginFloatingWindows("Dungeon Items Tracker"); - if (CVarGetInteger(ITEM_TRACKER_CVAR("DungeonItems.Layout"), 1)) { - if (CVarGetInteger(ITEM_TRACKER_CVAR("DungeonItems.DisplayMaps"), 1)) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DungeonItems.Layout"), 1)) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DungeonItems.DisplayMaps"), 1)) { DrawItemsInRows(dungeonItems, 12); } else { DrawItemsInRows(dungeonItems, 8); @@ -1091,19 +1091,19 @@ void ItemTrackerWindow::DrawElement() { EndFloatingWindows(); } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_SEPARATE) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_SEPARATE) { BeginFloatingWindows("Greg Tracker"); DrawItemsInRows(gregItems); EndFloatingWindows(); } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.TriforcePieces"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.TriforcePieces"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) { BeginFloatingWindows("Triforce Piece Tracker"); DrawItemsInRows(triforcePieces); EndFloatingWindows(); } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Notes"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE && CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Notes"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE && CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) { ImGui::SetNextWindowSize(ImVec2(400,300), ImGuiCond_FirstUseEver); BeginFloatingWindows("Personal Notes", ImGuiWindowFlags_NoFocusOnAppearing); DrawNotes(true); @@ -1140,50 +1140,50 @@ void ItemTrackerSettingsWindow::DrawElement() { ImGui::SameLine(); ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x); if (ImGui::ColorEdit4("BG Color##gItemTrackerBgColor", (float*)&ChromaKeyBackground, ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaBar | ImGuiColorEditFlags_NoLabel)) { - CVarSetFloat(ITEM_TRACKER_CVAR("BgColorR"), ChromaKeyBackground.x); - CVarSetFloat(ITEM_TRACKER_CVAR("BgColorG"), ChromaKeyBackground.y); - CVarSetFloat(ITEM_TRACKER_CVAR("BgColorB"), ChromaKeyBackground.z); - CVarSetFloat(ITEM_TRACKER_CVAR("BgColorA"), ChromaKeyBackground.w); + CVarSetFloat(CVAR_TRACKER_ITEM("BgColorR"), ChromaKeyBackground.x); + CVarSetFloat(CVAR_TRACKER_ITEM("BgColorG"), ChromaKeyBackground.y); + CVarSetFloat(CVAR_TRACKER_ITEM("BgColorB"), ChromaKeyBackground.z); + CVarSetFloat(CVAR_TRACKER_ITEM("BgColorA"), ChromaKeyBackground.w); LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } ImGui::PopItemWidth(); - if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Window Type", ITEM_TRACKER_CVAR("WindowType"), windowTypes, TRACKER_WINDOW_FLOATING)) { + if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Window Type", CVAR_TRACKER_ITEM("WindowType"), windowTypes, TRACKER_WINDOW_FLOATING)) { shouldUpdateVectors = true; } - if (CVarGetInteger(ITEM_TRACKER_CVAR("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_FLOATING) { - if (UIWidgets::PaddedEnhancementCheckbox("Enable Dragging", ITEM_TRACKER_CVAR("Draggable"))) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_FLOATING) { + if (UIWidgets::PaddedEnhancementCheckbox("Enable Dragging", CVAR_TRACKER_ITEM("Draggable"))) { shouldUpdateVectors = true; } - if (UIWidgets::PaddedEnhancementCheckbox("Only enable while paused", ITEM_TRACKER_CVAR("ShowOnlyPaused"))) { + if (UIWidgets::PaddedEnhancementCheckbox("Only enable while paused", CVAR_TRACKER_ITEM("ShowOnlyPaused"))) { shouldUpdateVectors = true; } - if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Display Mode", ITEM_TRACKER_CVAR("DisplayType.Main"), displayModes, TRACKER_DISPLAY_ALWAYS)) { + if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Display Mode", CVAR_TRACKER_ITEM("DisplayType.Main"), displayModes, TRACKER_DISPLAY_ALWAYS)) { shouldUpdateVectors = true; } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) { - if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 1", ITEM_TRACKER_CVAR("ComboButton1"), buttons, TRACKER_COMBO_BUTTON_L)) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) { + if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 1", CVAR_TRACKER_ITEM("ComboButton1"), buttons, TRACKER_COMBO_BUTTON_L)) { shouldUpdateVectors = true; } - if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 2", ITEM_TRACKER_CVAR("ComboButton2"), buttons, TRACKER_COMBO_BUTTON_R)) { + if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 2", CVAR_TRACKER_ITEM("ComboButton2"), buttons, TRACKER_COMBO_BUTTON_R)) { shouldUpdateVectors = true; } } } UIWidgets::PaddedSeparator(); - UIWidgets::EnhancementSliderInt("Icon size : %dpx", "##ITEMTRACKERICONSIZE", ITEM_TRACKER_CVAR("IconSize"), 25, 128, "", 36); - UIWidgets::EnhancementSliderInt("Icon margins : %dpx", "##ITEMTRACKERSPACING", ITEM_TRACKER_CVAR("IconSpacing"), -5, 50, "", 12); - UIWidgets::EnhancementSliderInt("Text size : %dpx", "##ITEMTRACKERTEXTSIZE", ITEM_TRACKER_CVAR("TextSize"), 1, 30, "", 13); + UIWidgets::EnhancementSliderInt("Icon size : %dpx", "##ITEMTRACKERICONSIZE", CVAR_TRACKER_ITEM("IconSize"), 25, 128, "", 36); + UIWidgets::EnhancementSliderInt("Icon margins : %dpx", "##ITEMTRACKERSPACING", CVAR_TRACKER_ITEM("IconSpacing"), -5, 50, "", 12); + UIWidgets::EnhancementSliderInt("Text size : %dpx", "##ITEMTRACKERTEXTSIZE", CVAR_TRACKER_ITEM("TextSize"), 1, 30, "", 13); UIWidgets::Spacer(0); ImGui::Text("Ammo/Capacity Tracking"); - UIWidgets::EnhancementCombobox(ITEM_TRACKER_CVAR("ItemCountType"), itemTrackerCapacityTrackOptions, ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY); + UIWidgets::EnhancementCombobox(CVAR_TRACKER_ITEM("ItemCountType"), itemTrackerCapacityTrackOptions, ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY); UIWidgets::InsertHelpHoverText("Customize what the numbers under each item are tracking." "\n\nNote: items without capacity upgrades will track ammo even in capacity mode"); - if (CVarGetInteger(ITEM_TRACKER_CVAR("ItemCountType"), ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY) == ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY || CVarGetInteger(ITEM_TRACKER_CVAR("ItemCountType"), ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY) == ITEM_TRACKER_NUMBER_CURRENT_AMMO_ONLY) { - if (UIWidgets::PaddedEnhancementCheckbox("Align count to left side", ITEM_TRACKER_CVAR("ItemCountAlignLeft"))) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("ItemCountType"), ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY) == ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY || CVarGetInteger(CVAR_TRACKER_ITEM("ItemCountType"), ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY) == ITEM_TRACKER_NUMBER_CURRENT_AMMO_ONLY) { + if (UIWidgets::PaddedEnhancementCheckbox("Align count to left side", CVAR_TRACKER_ITEM("ItemCountAlignLeft"))) { shouldUpdateVectors = true; } } @@ -1191,64 +1191,64 @@ void ItemTrackerSettingsWindow::DrawElement() { UIWidgets::Spacer(0); ImGui::Text("Key Count Tracking"); - UIWidgets::EnhancementCombobox(ITEM_TRACKER_CVAR("KeyCounts"), itemTrackerKeyTrackOptions, KEYS_COLLECTED_MAX); + UIWidgets::EnhancementCombobox(CVAR_TRACKER_ITEM("KeyCounts"), itemTrackerKeyTrackOptions, KEYS_COLLECTED_MAX); UIWidgets::InsertHelpHoverText("Customize what numbers are shown for key tracking."); UIWidgets::Spacer(0); ImGui::Text("Triforce Piece Count Tracking"); - UIWidgets::EnhancementCombobox(ITEM_TRACKER_CVAR("TriforcePieceCounts"), itemTrackerTriforcePieceTrackOptions, TRIFORCE_PIECE_COLLECTED_REQUIRED_MAX); + UIWidgets::EnhancementCombobox(CVAR_TRACKER_ITEM("TriforcePieceCounts"), itemTrackerTriforcePieceTrackOptions, TRIFORCE_PIECE_COLLECTED_REQUIRED_MAX); UIWidgets::InsertHelpHoverText("Customize what numbers are shown for triforce piece tracking."); ImGui::TableNextColumn(); - if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Inventory", ITEM_TRACKER_CVAR("DisplayType.Inventory"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) { + if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Inventory", CVAR_TRACKER_ITEM("DisplayType.Inventory"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) { shouldUpdateVectors = true; } - if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Equipment", ITEM_TRACKER_CVAR("DisplayType.Equipment"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) { + if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Equipment", CVAR_TRACKER_ITEM("DisplayType.Equipment"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) { shouldUpdateVectors = true; } - if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Misc", ITEM_TRACKER_CVAR("DisplayType.Misc"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) { + if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Misc", CVAR_TRACKER_ITEM("DisplayType.Misc"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) { shouldUpdateVectors = true; } - if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Dungeon Rewards", ITEM_TRACKER_CVAR("DisplayType.DungeonRewards"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) { + if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Dungeon Rewards", CVAR_TRACKER_ITEM("DisplayType.DungeonRewards"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) { shouldUpdateVectors = true; } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) { - if (UIWidgets::PaddedEnhancementCheckbox("Circle display", ITEM_TRACKER_CVAR("DungeonRewardsLayout"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, false)) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) { + if (UIWidgets::PaddedEnhancementCheckbox("Circle display", CVAR_TRACKER_ITEM("DungeonRewardsLayout"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, false)) { shouldUpdateVectors = true; } } - if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Songs", ITEM_TRACKER_CVAR("DisplayType.Songs"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) { + if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Songs", CVAR_TRACKER_ITEM("DisplayType.Songs"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) { shouldUpdateVectors = true; } - if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Dungeon Items", ITEM_TRACKER_CVAR("DisplayType.DungeonItems"), displayTypes, SECTION_DISPLAY_HIDDEN)) { + if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Dungeon Items", CVAR_TRACKER_ITEM("DisplayType.DungeonItems"), displayTypes, SECTION_DISPLAY_HIDDEN)) { shouldUpdateVectors = true; } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) != SECTION_DISPLAY_HIDDEN) { - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) { - if (UIWidgets::PaddedEnhancementCheckbox("Horizontal display", ITEM_TRACKER_CVAR("DungeonItems.Layout"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true)) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) != SECTION_DISPLAY_HIDDEN) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) { + if (UIWidgets::PaddedEnhancementCheckbox("Horizontal display", CVAR_TRACKER_ITEM("DungeonItems.Layout"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true)) { shouldUpdateVectors = true; } } - if (UIWidgets::PaddedEnhancementCheckbox("Maps and compasses", ITEM_TRACKER_CVAR("DungeonItems.DisplayMaps"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true)) { + if (UIWidgets::PaddedEnhancementCheckbox("Maps and compasses", CVAR_TRACKER_ITEM("DungeonItems.DisplayMaps"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true)) { shouldUpdateVectors = true; } } - if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Greg", ITEM_TRACKER_CVAR("DisplayType.Greg"), extendedDisplayTypes, SECTION_DISPLAY_EXTENDED_HIDDEN)) { + if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Greg", CVAR_TRACKER_ITEM("DisplayType.Greg"), extendedDisplayTypes, SECTION_DISPLAY_EXTENDED_HIDDEN)) { shouldUpdateVectors = true; } - if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Triforce Pieces", ITEM_TRACKER_CVAR("DisplayType.TriforcePieces"), displayTypes, SECTION_DISPLAY_HIDDEN)) { + if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Triforce Pieces", CVAR_TRACKER_ITEM("DisplayType.TriforcePieces"), displayTypes, SECTION_DISPLAY_HIDDEN)) { shouldUpdateVectors = true; } - if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) { - if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Personal notes", ITEM_TRACKER_CVAR("DisplayType.Notes"), displayTypes, SECTION_DISPLAY_HIDDEN)) { + if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) { + if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Personal notes", CVAR_TRACKER_ITEM("DisplayType.Notes"), displayTypes, SECTION_DISPLAY_HIDDEN)) { shouldUpdateVectors = true; } } - UIWidgets::EnhancementCheckbox("Show Hookshot Identifiers", ITEM_TRACKER_CVAR("HookshotIdentifier")); + UIWidgets::EnhancementCheckbox("Show Hookshot Identifiers", CVAR_TRACKER_ITEM("HookshotIdentifier")); UIWidgets::InsertHelpHoverText("Shows an 'H' or an 'L' to more easiely distinguish between Hookshot and Longshot."); UIWidgets::Spacer(0); @@ -1260,10 +1260,10 @@ void ItemTrackerSettingsWindow::DrawElement() { } void ItemTrackerWindow::InitElement() { - float trackerBgR = CVarGetFloat(ITEM_TRACKER_CVAR("BgColorR"), 0); - float trackerBgG = CVarGetFloat(ITEM_TRACKER_CVAR("BgColorG"), 0); - float trackerBgB = CVarGetFloat(ITEM_TRACKER_CVAR("BgColorB"), 0); - float trackerBgA = CVarGetFloat(ITEM_TRACKER_CVAR("BgColorA"), 1); + float trackerBgR = CVarGetFloat(CVAR_TRACKER_ITEM("BgColorR"), 0); + float trackerBgG = CVarGetFloat(CVAR_TRACKER_ITEM("BgColorG"), 0); + float trackerBgB = CVarGetFloat(CVAR_TRACKER_ITEM("BgColorB"), 0); + float trackerBgA = CVarGetFloat(CVAR_TRACKER_ITEM("BgColorA"), 1); ChromaKeyBackground = { trackerBgR, trackerBgG, diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index c91fd68d4a2..e8c88fc614c 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1148,8 +1148,8 @@ extern "C" void InitOTR() { srand(now); #ifdef ENABLE_REMOTE_CONTROL SDLNet_Init(); - if (CVarGetInteger(REMOTE_CVAR("Enabled"), 0)) { - switch (CVarGetInteger(REMOTE_CVAR("Scheme"), GI_SCHEME_SAIL)) { + if (CVarGetInteger(CVAR_REMOTE("Enabled"), 0)) { + switch (CVarGetInteger(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL)) { case GI_SCHEME_SAIL: GameInteractorSail::Instance->Enable(); break; @@ -1174,8 +1174,8 @@ extern "C" void DeinitOTR() { SaveManager_ThreadPoolWait(); OTRAudio_Exit(); #ifdef ENABLE_REMOTE_CONTROL - if (CVarGetInteger(REMOTE_CVAR("Enabled"), 0)) { - switch (CVarGetInteger(REMOTE_CVAR("Scheme"), GI_SCHEME_SAIL)) { + if (CVarGetInteger(CVAR_REMOTE("Enabled"), 0)) { + switch (CVarGetInteger(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL)) { case GI_SCHEME_SAIL: GameInteractorSail::Instance->Disable(); break; @@ -1246,7 +1246,7 @@ extern "C" void Graph_StartFrame() { switch (dwScancode) { case KbScancode::LUS_KB_F5: { - if (CVarGetInteger(CHEAT_CVAR("SaveStatesEnabled"), 0) == 0) { + if (CVarGetInteger(CVAR_CHEAT("SaveStatesEnabled"), 0) == 0) { LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()-> TextDrawNotification(6.0f, true, "Save states not enabled. Check Cheats Menu."); return; @@ -1268,7 +1268,7 @@ extern "C" void Graph_StartFrame() { break; } case KbScancode::LUS_KB_F6: { - if (CVarGetInteger(CHEAT_CVAR("SaveStatesEnabled"), 0) == 0) { + if (CVarGetInteger(CVAR_CHEAT("SaveStatesEnabled"), 0) == 0) { LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()-> TextDrawNotification(6.0f, true, "Save states not enabled. Check Cheats Menu."); return; @@ -1283,7 +1283,7 @@ extern "C" void Graph_StartFrame() { break; } case KbScancode::LUS_KB_F7: { - if (CVarGetInteger(CHEAT_CVAR("SaveStatesEnabled"), 0) == 0) { + if (CVarGetInteger(CVAR_CHEAT("SaveStatesEnabled"), 0) == 0) { LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()-> TextDrawNotification(6.0f, true, "Save states not enabled. Check Cheats Menu."); return; @@ -2535,12 +2535,12 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) { RandomizerInf randoInf = (RandomizerInf)((textId - (TEXT_SHOP_ITEM_RANDOM + NUM_SHOP_ITEMS)) + RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1); messageEntry = OTRGlobals::Instance->gRandomizer->GetMerchantMessage(randoInf, TEXT_SHOP_ITEM_RANDOM_CONFIRM); } - } else if (CVarGetInteger(RANDO_ENHANCEMENT_CVAR("RandomizeRupeeNames"), 1) && + } else if (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("RandomizeRupeeNames"), 1) && (textId == TEXT_BLUE_RUPEE || textId == TEXT_RED_RUPEE || textId == TEXT_PURPLE_RUPEE || textId == TEXT_HUGE_RUPEE)) { messageEntry = Randomizer::GetRupeeMessage(textId); // In rando, replace Navi's general overworld hints with rando-related gameplay tips - } else if (CVarGetInteger(RANDO_ENHANCEMENT_CVAR("RandoRelevantNavi"), 1) && textId >= 0x0140 && textId <= 0x015F) { + } else if (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("RandoRelevantNavi"), 1) && textId >= 0x0140 && textId <= 0x015F) { u16 naviTextId = Random(0, NUM_NAVI_MESSAGES); messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::NaviRandoMessageTableID, naviTextId); } else if (Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS) && textId == TEXT_BEAN_SALESMAN) { diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index f34b2fee5d6..49b41ce867a 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -65,23 +65,21 @@ class OTRGlobals uint32_t IsGameMasterQuest(); #endif -#define RANDO_ENHANCEMENT_CVAR(var) "gRandoEnhancements." var -#define RANDOMIZER_SEED_CVAR(var) "gRandoSettings." var -#define COSMETIC_CVAR(var) "gCosmetics." var -#define AUDIO_CVAR(var) "gAudioEditor." var -#define REPL_SEQ_CVAR(var) AUDIO_CVAR("ReplacedSequences." var) -#define EXCL_SEQ_CVAR(var) AUDIO_CVAR("Excluded." var) -#define CHEAT_CVAR(var) "gCheats." var -#define ENHANCEMENT_CVAR(var) "gEnhancements." var -#define SETTING_CVAR(var) "gSettings." var -#define WINDOW_CVAR(var) "gOpenWindows." var -#define TRACKER_CVAR(var) "gTrackers." var -#define ITEM_TRACKER_CVAR(var) TRACKER_CVAR("ItemTracker." var) -#define CHECK_TRACKER_CVAR(var) TRACKER_CVAR("CheckTracker." var) -#define ENTRANCE_TRACKER_CVAR(var) TRACKER_CVAR("EntranceTracker." var) -#define DEV_TOOLS_CVAR(var) "gDeveloperTools." var -#define GENERAL_CVAR(var) "gGeneral." var -#define REMOTE_CVAR(var) "gRemote." var +#define CVAR_RANDOMIZER_ENHANCEMENT(var) "gRandoEnhancements." var +#define CVAR_RANDOMIZER_SETTING(var) "gRandoSettings." var +#define CVAR_COSMETIC(var) "gCosmetics." var +#define CVAR_AUDIO(var) "gAudioEditor." var +#define CVAR_CHEAT(var) "gCheats." var +#define CVAR_ENHANCEMENT(var) "gEnhancements." var +#define CVAR_SETTING(var) "gSettings." var +#define CVAR_WINDOW(var) "gOpenWindows." var +#define CVAR_TRACKER(var) "gTrackers." var +#define CVAR_TRACKER_ITEM(var) CVAR_TRACKER("ItemTracker." var) +#define CVAR_TRACKER_CHECK(var) CVAR_TRACKER("CheckTracker." var) +#define CVAR_TRACKER_ENTRANCE(var) CVAR_TRACKER("EntranceTracker." var) +#define CVAR_DEVELOPER_TOOLS(var) "gDeveloperTools." var +#define CVAR_GENERAL(var) "gGeneral." var +#define CVAR_REMOTE(var) "gRemote." var #ifndef __cplusplus void InitOTR(void); diff --git a/soh/soh/SaveManager.cpp b/soh/soh/SaveManager.cpp index 07a37c02ab8..eadfb75de8a 100644 --- a/soh/soh/SaveManager.cpp +++ b/soh/soh/SaveManager.cpp @@ -628,10 +628,10 @@ void SaveManager::InitFileDebug() { //don't apply gDebugSaveFileMode on the title screen if (gSaveContext.fileNum != 0xFF) { - if (CVarGetInteger("gDebugSaveFileMode", 1) == 2) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugSaveFileMode"), 1) == 2) { InitFileMaxed(); return; - } else if (CVarGetInteger("gDebugSaveFileMode", 1) == 0) { + } else if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugSaveFileMode"), 1) == 0) { return; } } diff --git a/soh/soh/SohGui.cpp b/soh/soh/SohGui.cpp index d10532ee311..28366a6687d 100644 --- a/soh/soh/SohGui.cpp +++ b/soh/soh/SohGui.cpp @@ -165,41 +165,41 @@ namespace SohGui { SPDLOG_ERROR("Could not find input editor window"); } - mAudioEditorWindow = std::make_shared(WINDOW_CVAR("AudioEditor"), "Audio Editor"); + mAudioEditorWindow = std::make_shared(CVAR_WINDOW("AudioEditor"), "Audio Editor"); gui->AddGuiWindow(mAudioEditorWindow); - mInputViewer = std::make_shared(WINDOW_CVAR("InputViewer"), "Input Viewer"); + mInputViewer = std::make_shared(CVAR_WINDOW("InputViewer"), "Input Viewer"); gui->AddGuiWindow(mInputViewer); - mInputViewerSettings = std::make_shared(WINDOW_CVAR("InputViewerSettings"), "Input Viewer Settings"); + mInputViewerSettings = std::make_shared(CVAR_WINDOW("InputViewerSettings"), "Input Viewer Settings"); gui->AddGuiWindow(mInputViewerSettings); - mCosmeticsEditorWindow = std::make_shared(WINDOW_CVAR("CosmeticsEditor"), "Cosmetics Editor"); + mCosmeticsEditorWindow = std::make_shared(CVAR_WINDOW("CosmeticsEditor"), "Cosmetics Editor"); gui->AddGuiWindow(mCosmeticsEditorWindow); - mActorViewerWindow = std::make_shared(WINDOW_CVAR("ActorViewer"), "Actor Viewer"); + mActorViewerWindow = std::make_shared(CVAR_WINDOW("ActorViewer"), "Actor Viewer"); gui->AddGuiWindow(mActorViewerWindow); - mColViewerWindow = std::make_shared(WINDOW_CVAR("CollisionViewer"), "Collision Viewer"); + mColViewerWindow = std::make_shared(CVAR_WINDOW("CollisionViewer"), "Collision Viewer"); gui->AddGuiWindow(mColViewerWindow); - mSaveEditorWindow = std::make_shared(WINDOW_CVAR("SaveEditor"), "Save Editor"); + mSaveEditorWindow = std::make_shared(CVAR_WINDOW("SaveEditor"), "Save Editor"); gui->AddGuiWindow(mSaveEditorWindow); - mDLViewerWindow = std::make_shared(WINDOW_CVAR("DLViewer"), "Display List Viewer"); + mDLViewerWindow = std::make_shared(CVAR_WINDOW("DLViewer"), "Display List Viewer"); gui->AddGuiWindow(mDLViewerWindow); - mValueViewerWindow = std::make_shared(WINDOW_CVAR("ValueViewer"), "Value Viewer"); + mValueViewerWindow = std::make_shared(CVAR_WINDOW("ValueViewer"), "Value Viewer"); gui->AddGuiWindow(mValueViewerWindow); - mMessageViewerWindow = std::make_shared(WINDOW_CVAR("MessageViewer"), "Message Viewer"); + mMessageViewerWindow = std::make_shared(CVAR_WINDOW("MessageViewer"), "Message Viewer"); gui->AddGuiWindow(mMessageViewerWindow); - mGameplayStatsWindow = std::make_shared(WINDOW_CVAR("GameplayStats"), "Gameplay Stats"); + mGameplayStatsWindow = std::make_shared(CVAR_WINDOW("GameplayStats"), "Gameplay Stats"); gui->AddGuiWindow(mGameplayStatsWindow); - mCheckTrackerWindow = std::make_shared(WINDOW_CVAR("CheckTracker"), "Check Tracker"); + mCheckTrackerWindow = std::make_shared(CVAR_WINDOW("CheckTracker"), "Check Tracker"); gui->AddGuiWindow(mCheckTrackerWindow); - mCheckTrackerSettingsWindow = std::make_shared(WINDOW_CVAR("CheckTrackerSettings"), "Check Tracker Settings"); + mCheckTrackerSettingsWindow = std::make_shared(CVAR_WINDOW("CheckTrackerSettings"), "Check Tracker Settings"); gui->AddGuiWindow(mCheckTrackerSettingsWindow); - mEntranceTrackerWindow = std::make_shared(WINDOW_CVAR("EntranceTracker"),"Entrance Tracker"); + mEntranceTrackerWindow = std::make_shared(CVAR_WINDOW("EntranceTracker"),"Entrance Tracker"); gui->AddGuiWindow(mEntranceTrackerWindow); - mItemTrackerWindow = std::make_shared(WINDOW_CVAR("ItemTracker"), "Item Tracker"); + mItemTrackerWindow = std::make_shared(CVAR_WINDOW("ItemTracker"), "Item Tracker"); gui->AddGuiWindow(mItemTrackerWindow); - mItemTrackerSettingsWindow = std::make_shared(WINDOW_CVAR("ItemTrackerSettings"), "Item Tracker Settings"); + mItemTrackerSettingsWindow = std::make_shared(CVAR_WINDOW("ItemTrackerSettings"), "Item Tracker Settings"); gui->AddGuiWindow(mItemTrackerSettingsWindow); - mRandomizerSettingsWindow = std::make_shared(WINDOW_CVAR("RandomizerSettings"), "Randomizer Settings"); + mRandomizerSettingsWindow = std::make_shared(CVAR_WINDOW("RandomizerSettings"), "Randomizer Settings"); gui->AddGuiWindow(mRandomizerSettingsWindow); - mAdvancedResolutionSettingsWindow = std::make_shared(WINDOW_CVAR("AdvancedResolutionEditor"), "Advanced Resolution Settings"); + mAdvancedResolutionSettingsWindow = std::make_shared(CVAR_WINDOW("AdvancedResolutionEditor"), "Advanced Resolution Settings"); gui->AddGuiWindow(mAdvancedResolutionSettingsWindow); mModalWindow = std::make_shared("gOpenWindows.modalWindowEnabled", "Modal Window"); gui->AddGuiWindow(mModalWindow); diff --git a/soh/soh/SohMenuBar.cpp b/soh/soh/SohMenuBar.cpp index be75a612763..2169e3d02bf 100644 --- a/soh/soh/SohMenuBar.cpp +++ b/soh/soh/SohMenuBar.cpp @@ -248,12 +248,12 @@ void DrawSettingsMenu() { ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f); ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f)); if (mInputViewer) { - if (ImGui::Button(GetWindowButtonText("Input Viewer", CVarGetInteger(WINDOW_CVAR("InputViewer"), 0)).c_str(), ImVec2 (-1.0f, 0.0f))) { + if (ImGui::Button(GetWindowButtonText("Input Viewer", CVarGetInteger(CVAR_WINDOW("InputViewer"), 0)).c_str(), ImVec2 (-1.0f, 0.0f))) { mInputViewer->ToggleVisibility(); } } if (mInputViewerSettings) { - if (ImGui::Button(GetWindowButtonText("Input Viewer Settings", CVarGetInteger(WINDOW_CVAR("InputViewerSettings"), 0)).c_str(), ImVec2 (-1.0f, 0.0f))) { + if (ImGui::Button(GetWindowButtonText("Input Viewer Settings", CVarGetInteger(CVAR_WINDOW("InputViewerSettings"), 0)).c_str(), ImVec2 (-1.0f, 0.0f))) { mInputViewerSettings->ToggleVisibility(); } } @@ -287,7 +287,7 @@ void DrawSettingsMenu() { ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f); ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f)); UIWidgets::Spacer(0); - if (ImGui::Button(GetWindowButtonText("Advanced Resolution", CVarGetInteger(WINDOW_CVAR("AdvancedResolutionEditor"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { + if (ImGui::Button(GetWindowButtonText("Advanced Resolution", CVarGetInteger(CVAR_WINDOW("AdvancedResolutionEditor"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { mAdvancedResolutionSettingsWindow->ToggleVisibility(); } ImGui::PopStyleColor(1); @@ -547,7 +547,7 @@ extern std::shared_ptr mGameplayStatsWindow; void DrawEnhancementsMenu() { if (ImGui::BeginMenu("Enhancements")) { - ImGui::BeginDisabled(CVarGetInteger(SETTING_CVAR("DisableChanges"), 0)); + ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0)); DrawPresetSelector(PRESET_TYPE_ENHANCEMENTS); @@ -1395,19 +1395,19 @@ void DrawEnhancementsMenu() { ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f)); if (mCosmeticsEditorWindow) { - if (ImGui::Button(GetWindowButtonText("Cosmetics Editor", CVarGetInteger(WINDOW_CVAR("CosmeticsEditor"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { + if (ImGui::Button(GetWindowButtonText("Cosmetics Editor", CVarGetInteger(CVAR_WINDOW("CosmeticsEditor"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { mCosmeticsEditorWindow->ToggleVisibility(); } } if (mAudioEditorWindow) { - if (ImGui::Button(GetWindowButtonText("Audio Editor", CVarGetInteger(WINDOW_CVAR("AudioEditor"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { + if (ImGui::Button(GetWindowButtonText("Audio Editor", CVarGetInteger(CVAR_WINDOW("AudioEditor"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { mAudioEditorWindow->ToggleVisibility(); } } if (mGameplayStatsWindow) { - if (ImGui::Button(GetWindowButtonText("Gameplay Stats", CVarGetInteger(WINDOW_CVAR("GameplayStats"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { + if (ImGui::Button(GetWindowButtonText("Gameplay Stats", CVarGetInteger(CVAR_WINDOW("GameplayStats"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { mGameplayStatsWindow->ToggleVisibility(); } } @@ -1430,7 +1430,7 @@ void DrawEnhancementsMenu() { void DrawCheatsMenu() { if (ImGui::BeginMenu("Cheats")) { - ImGui::BeginDisabled(CVarGetInteger(SETTING_CVAR("DisableChanges"), 0)); + ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0)); ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 8.0f); ImGui::BeginTable("##cheatsMenu", 2, ImGuiTableFlags_SizingFixedFit); ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthStretch); @@ -1440,32 +1440,32 @@ void DrawCheatsMenu() { ImGui::Text("Inventory:"); UIWidgets::PaddedSeparator(); - UIWidgets::PaddedEnhancementCheckbox("Super Tunic", CHEAT_CVAR("SuperTunic"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Super Tunic", CVAR_CHEAT("SuperTunic"), true, false); UIWidgets::Tooltip("Makes every tunic have the effects of every other tunic"); - UIWidgets::PaddedEnhancementCheckbox("Easy ISG", CHEAT_CVAR("EasyISG"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Easy ISG", CVAR_CHEAT("EasyISG"), true, false); UIWidgets::Tooltip("Passive Infinite Sword Glitch\nIt makes your sword's swing effect and hitbox stay active indefinitely"); - UIWidgets::PaddedEnhancementCheckbox("Easy QPA", CHEAT_CVAR("EasyQPA"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Easy QPA", CVAR_CHEAT("EasyQPA"), true, false); UIWidgets::Tooltip("Gives you the glitched damage value of the quick put away glitch."); - UIWidgets::PaddedEnhancementCheckbox("Timeless Equipment", CHEAT_CVAR("TimelessEquipment"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Timeless Equipment", CVAR_CHEAT("TimelessEquipment"), true, false); UIWidgets::Tooltip("Allows any item to be equipped, regardless of age\nAlso allows Child to use Adult strength upgrades"); - UIWidgets::PaddedEnhancementCheckbox("Unrestricted Items", CHEAT_CVAR("NoRestrictItems"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Unrestricted Items", CVAR_CHEAT("NoRestrictItems"), true, false); UIWidgets::Tooltip("Allows you to use any item at any location"); - UIWidgets::PaddedEnhancementCheckbox("Fireproof Deku Shield", CHEAT_CVAR("FireproofDekuShield"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Fireproof Deku Shield", CVAR_CHEAT("FireproofDekuShield"), true, false); UIWidgets::Tooltip("Prevents the Deku Shield from burning on contact with fire"); - UIWidgets::PaddedEnhancementCheckbox("Shield with Two-Handed Weapons", CHEAT_CVAR("ShieldTwoHanded"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Shield with Two-Handed Weapons", CVAR_CHEAT("ShieldTwoHanded"), true, false); UIWidgets::Tooltip("This allows you to put up your shield with any two-handed weapon in hand except for Deku Sticks"); UIWidgets::Spacer(2.0f); ImGui::Text("Deku Sticks:"); - UIWidgets::EnhancementCombobox(CHEAT_CVAR("DekuStick"), DekuStickCheat, DEKU_STICK_NORMAL); + UIWidgets::EnhancementCombobox(CVAR_CHEAT("DekuStick"), DekuStickCheat, DEKU_STICK_NORMAL); UIWidgets::Spacer(2.0f); - UIWidgets::EnhancementSliderFloat("Bomb Timer Multiplier: %.2fx", "##gBombTimerMultiplier", CHEAT_CVAR("BombTimerMultiplier"), 0.1f, 5.0f, "", 1.0f, false); - UIWidgets::PaddedEnhancementCheckbox("Hookshot Everything", CHEAT_CVAR("HookshotEverything"), true, false); + UIWidgets::EnhancementSliderFloat("Bomb Timer Multiplier: %.2fx", "##gBombTimerMultiplier", CVAR_CHEAT("BombTimerMultiplier"), 0.1f, 5.0f, "", 1.0f, false); + UIWidgets::PaddedEnhancementCheckbox("Hookshot Everything", CVAR_CHEAT("HookshotEverything"), true, false); UIWidgets::Tooltip("Makes every surface in the game hookshot-able"); UIWidgets::Spacer(0); - UIWidgets::EnhancementSliderFloat("Hookshot Reach Multiplier: %.2fx", "##gCheatHookshotReachMultiplier", CHEAT_CVAR("HookshotReachMultiplier"), 1.0f, 5.0f, "", 1.0f, false); + UIWidgets::EnhancementSliderFloat("Hookshot Reach Multiplier: %.2fx", "##gCheatHookshotReachMultiplier", CVAR_CHEAT("HookshotReachMultiplier"), 1.0f, 5.0f, "", 1.0f, false); UIWidgets::Spacer(2.0f); if (ImGui::Button("Change Age")) { - CVarSetInteger(GENERAL_CVAR("SwitchAge"), 1); + CVarSetInteger(CVAR_GENERAL("SwitchAge"), 1); } UIWidgets::Tooltip("Switches Link's age and reloads the area."); UIWidgets::Spacer(2.0f); @@ -1478,12 +1478,12 @@ void DrawCheatsMenu() { UIWidgets::Spacer(2.0f); if (ImGui::BeginMenu("Infinite...")) { - UIWidgets::EnhancementCheckbox("Money", CHEAT_CVAR("InfiniteMoney")); - UIWidgets::PaddedEnhancementCheckbox("Health", CHEAT_CVAR("InfiniteHealth"), true, false); - UIWidgets::PaddedEnhancementCheckbox("Ammo", CHEAT_CVAR("InfiniteAmmo"), true, false); - UIWidgets::PaddedEnhancementCheckbox("Magic", CHEAT_CVAR("InfiniteMagic"), true, false); - UIWidgets::PaddedEnhancementCheckbox("Nayru's Love", CHEAT_CVAR("InfiniteNayru"), true, false); - UIWidgets::PaddedEnhancementCheckbox("Epona Boost", CHEAT_CVAR("InfiniteEponaBoost"), true, false); + UIWidgets::EnhancementCheckbox("Money", CVAR_CHEAT("InfiniteMoney")); + UIWidgets::PaddedEnhancementCheckbox("Health", CVAR_CHEAT("InfiniteHealth"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Ammo", CVAR_CHEAT("InfiniteAmmo"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Magic", CVAR_CHEAT("InfiniteMagic"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Nayru's Love", CVAR_CHEAT("InfiniteNayru"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Epona Boost", CVAR_CHEAT("InfiniteEponaBoost"), true, false); ImGui::EndMenu(); } @@ -1501,13 +1501,13 @@ void DrawCheatsMenu() { UIWidgets::PaddedText("they WILL break across transitions and", true, false); UIWidgets::PaddedText("load zones (like doors). Support for", true, false); UIWidgets::PaddedText("related issues will not be provided.", true, false); - if (UIWidgets::PaddedEnhancementCheckbox("I promise I have read the warning", CHEAT_CVAR("SaveStatePromise"), true, + if (UIWidgets::PaddedEnhancementCheckbox("I promise I have read the warning", CVAR_CHEAT("SaveStatePromise"), true, false)) { - CVarSetInteger(CHEAT_CVAR("SaveStatesEnabled"), 0); + CVarSetInteger(CVAR_CHEAT("SaveStatesEnabled"), 0); LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } - if (CVarGetInteger(CHEAT_CVAR("SaveStatePromise"), 0) == 1) { - UIWidgets::PaddedEnhancementCheckbox("I understand, enable save states", CHEAT_CVAR("SaveStatesEnabled"), true, + if (CVarGetInteger(CVAR_CHEAT("SaveStatePromise"), 0) == 1) { + UIWidgets::PaddedEnhancementCheckbox("I understand, enable save states", CVAR_CHEAT("SaveStatesEnabled"), true, false); UIWidgets::Tooltip("F5 to save, F6 to change slots, F7 to load"); } @@ -1519,44 +1519,44 @@ void DrawCheatsMenu() { ImGui::Text("Behavior:"); UIWidgets::PaddedSeparator(); - UIWidgets::PaddedEnhancementCheckbox("No Clip", CHEAT_CVAR("NoClip"), true, false); + UIWidgets::PaddedEnhancementCheckbox("No Clip", CVAR_CHEAT("NoClip"), true, false); UIWidgets::Tooltip("Allows you to walk through walls"); - UIWidgets::PaddedEnhancementCheckbox("Climb Everything", CHEAT_CVAR("ClimbEverything"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Climb Everything", CVAR_CHEAT("ClimbEverything"), true, false); UIWidgets::Tooltip("Makes every surface in the game climbable"); - UIWidgets::PaddedEnhancementCheckbox("Moon Jump on L", CHEAT_CVAR("MoonJumpOnL"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Moon Jump on L", CVAR_CHEAT("MoonJumpOnL"), true, false); UIWidgets::Tooltip("Holding L makes you float into the air"); - UIWidgets::PaddedEnhancementCheckbox("Easy Frame Advancing", CHEAT_CVAR("EasyPauseBuffer"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Easy Frame Advancing", CVAR_CHEAT("EasyPauseBuffer"), true, false); UIWidgets::Tooltip("Continue holding START button when unpausing to only advance a single frame and then re-pause"); - const bool bEasyFrameAdvanceEnabled = CVarGetInteger(CHEAT_CVAR("EasyPauseBuffer"), 0); - UIWidgets::PaddedEnhancementCheckbox("Easy Input Buffering", CHEAT_CVAR("EasyInputBuffer"), true, false, bEasyFrameAdvanceEnabled, "Forced enabled when Easy Frame Advancing is enabled", UIWidgets::CheckboxGraphics::Checkmark); + const bool bEasyFrameAdvanceEnabled = CVarGetInteger(CVAR_CHEAT("EasyPauseBuffer"), 0); + UIWidgets::PaddedEnhancementCheckbox("Easy Input Buffering", CVAR_CHEAT("EasyInputBuffer"), true, false, bEasyFrameAdvanceEnabled, "Forced enabled when Easy Frame Advancing is enabled", UIWidgets::CheckboxGraphics::Checkmark); UIWidgets::Tooltip("Inputs that are held down while the Subscreen is closing will be pressed when the game is resumed"); - UIWidgets::PaddedEnhancementCheckbox("Drops Don't Despawn", CHEAT_CVAR("DropsDontDie"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Drops Don't Despawn", CVAR_CHEAT("DropsDontDie"), true, false); UIWidgets::Tooltip("Drops from enemies, grass, etc. don't disappear after a set amount of time"); - UIWidgets::PaddedEnhancementCheckbox("Fish Don't despawn", CHEAT_CVAR("NoFishDespawn"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Fish Don't despawn", CVAR_CHEAT("NoFishDespawn"), true, false); UIWidgets::Tooltip("Prevents fish from automatically despawning after a while when dropped"); - UIWidgets::PaddedEnhancementCheckbox("Bugs Don't despawn", CHEAT_CVAR("NoBugsDespawn"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Bugs Don't despawn", CVAR_CHEAT("NoBugsDespawn"), true, false); UIWidgets::Tooltip("Prevents bugs from automatically despawning after a while when dropped"); - UIWidgets::PaddedEnhancementCheckbox("Freeze Time", CHEAT_CVAR("FreezeTime"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Freeze Time", CVAR_CHEAT("FreezeTime"), true, false); UIWidgets::Tooltip("Freezes the time of day"); - UIWidgets::PaddedEnhancementCheckbox("Time Sync", CHEAT_CVAR("TimeSync"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Time Sync", CVAR_CHEAT("TimeSync"), true, false); UIWidgets::Tooltip("This syncs the ingame time with the real world time"); - UIWidgets::PaddedEnhancementCheckbox("No ReDead/Gibdo Freeze", CHEAT_CVAR("NoRedeadFreeze"), true, false); + UIWidgets::PaddedEnhancementCheckbox("No ReDead/Gibdo Freeze", CVAR_CHEAT("NoRedeadFreeze"), true, false); UIWidgets::Tooltip("Prevents ReDeads and Gibdos from being able to freeze you with their scream"); - UIWidgets::PaddedEnhancementCheckbox("Keese/Guay don't target you", CHEAT_CVAR("NoKeeseGuayTarget"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Keese/Guay don't target you", CVAR_CHEAT("NoKeeseGuayTarget"), true, false); UIWidgets::Tooltip("Keese and Guay no longer target you and simply ignore you as if you were wearing the skull mask"); { - static int32_t betaQuestEnabled = CVarGetInteger(CHEAT_CVAR("EnableBetaQuest"), 0); + static int32_t betaQuestEnabled = CVarGetInteger(CVAR_CHEAT("EnableBetaQuest"), 0); static int32_t lastBetaQuestEnabled = betaQuestEnabled; - static int32_t betaQuestWorld = CVarGetInteger(CHEAT_CVAR("BetaQuestWorld"), 0xFFEF); + static int32_t betaQuestWorld = CVarGetInteger(CVAR_CHEAT("BetaQuestWorld"), 0xFFEF); static int32_t lastBetaQuestWorld = betaQuestWorld; if (!isBetaQuestEnabled) { UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f); } - UIWidgets::PaddedEnhancementCheckbox("Enable Beta Quest", CHEAT_CVAR("EnableBetaQuest"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Enable Beta Quest", CVAR_CHEAT("EnableBetaQuest"), true, false); UIWidgets::Tooltip("Turns on OoT Beta Quest. *WARNING* This will reset your game."); - betaQuestEnabled = CVarGetInteger(CHEAT_CVAR("EnableBetaQuest"), 0); + betaQuestEnabled = CVarGetInteger(CVAR_CHEAT("EnableBetaQuest"), 0); if (betaQuestEnabled) { if (betaQuestEnabled != lastBetaQuestEnabled) { betaQuestWorld = 0; @@ -1588,15 +1588,15 @@ void DrawCheatsMenu() { } else { lastBetaQuestWorld = betaQuestWorld = 0xFFEF; - CVarClear(CHEAT_CVAR("BetaQuestWorld")); + CVarClear(CVAR_CHEAT("BetaQuestWorld")); } if (betaQuestEnabled != lastBetaQuestEnabled || betaQuestWorld != lastBetaQuestWorld) { // Reset the game if the beta quest state or world changed because beta quest happens on redirecting the title screen cutscene. lastBetaQuestEnabled = betaQuestEnabled; lastBetaQuestWorld = betaQuestWorld; - CVarSetInteger(CHEAT_CVAR("EnableBetaQuest"), betaQuestEnabled); - CVarSetInteger(CHEAT_CVAR("BetaQuestWorld"), betaQuestWorld); + CVarSetInteger(CVAR_CHEAT("EnableBetaQuest"), betaQuestEnabled); + CVarSetInteger(CVAR_CHEAT("BetaQuestWorld"), betaQuestWorld); std::reinterpret_pointer_cast(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->Dispatch("reset"); LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); @@ -1624,15 +1624,15 @@ extern std::shared_ptr mMessageViewerWindow; void DrawDeveloperToolsMenu() { if (ImGui::BeginMenu("Developer Tools")) { - ImGui::BeginDisabled(CVarGetInteger(SETTING_CVAR("DisableChanges"), 0)); + ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0)); - UIWidgets::EnhancementCheckbox("OoT Debug Mode", DEV_TOOLS_CVAR("DebugEnabled")); + UIWidgets::EnhancementCheckbox("OoT Debug Mode", CVAR_DEVELOPER_TOOLS("DebugEnabled")); UIWidgets::Tooltip("Enables Debug Mode, allowing you to select maps with L + R + Z, noclip with L + D-pad Right, and open the debug menu with L on the pause screen"); - if (CVarGetInteger(DEV_TOOLS_CVAR("DebugEnabled"), 0)) { - UIWidgets::EnhancementCheckbox("OoT Registry Editor", DEV_TOOLS_CVAR("RegEditEnabled")); + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) { + UIWidgets::EnhancementCheckbox("OoT Registry Editor", CVAR_DEVELOPER_TOOLS("RegEditEnabled")); UIWidgets::Tooltip("Enables the registry editor"); ImGui::Text("Debug Save File Mode:"); - UIWidgets::EnhancementCombobox(DEV_TOOLS_CVAR("DebugSaveFileMode"), DebugSaveFileModes, 1); + UIWidgets::EnhancementCombobox(CVAR_DEVELOPER_TOOLS("DebugSaveFileMode"), DebugSaveFileModes, 1); UIWidgets::Tooltip( "Changes the behaviour of debug file select creation (creating a save file on slot 1 with debug mode on)\n" "- Off: The debug save file will be a normal savefile\n" @@ -1640,17 +1640,17 @@ void DrawDeveloperToolsMenu() { "- Maxed: The debug save file will be a save file with all of the items & upgrades" ); } - UIWidgets::PaddedEnhancementCheckbox("OoT Skulltula Debug", DEV_TOOLS_CVAR("SkulltulaDebugEnabled"), true, false); + UIWidgets::PaddedEnhancementCheckbox("OoT Skulltula Debug", CVAR_DEVELOPER_TOOLS("SkulltulaDebugEnabled"), true, false); UIWidgets::Tooltip("Enables Skulltula Debug, when moving the cursor in the menu above various map icons (boss key, compass, map screen locations, etc) will set the GS bits in that area.\nUSE WITH CAUTION AS IT DOES NOT UPDATE THE GS COUNT."); - UIWidgets::PaddedEnhancementCheckbox("Fast File Select", DEV_TOOLS_CVAR("SkipLogoTitle"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Fast File Select", CVAR_DEVELOPER_TOOLS("SkipLogoTitle"), true, false); UIWidgets::Tooltip("Load the game to the selected menu or file\n\"Zelda Map Select\" require debug mode else you will fallback to File choose menu\nUsing a file number that don't have save will create a save file only if you toggle on \"Create a new save if none ?\" else it will bring you to the File choose menu"); - if (CVarGetInteger(DEV_TOOLS_CVAR("SkipLogoTitle"), 0)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("SkipLogoTitle"), 0)) { ImGui::Text("Loading:"); - UIWidgets::EnhancementCombobox(DEV_TOOLS_CVAR("SaveFileID"), FastFileSelect, 0); + UIWidgets::EnhancementCombobox(CVAR_DEVELOPER_TOOLS("SaveFileID"), FastFileSelect, 0); }; - UIWidgets::PaddedEnhancementCheckbox("Better Debug Warp Screen", DEV_TOOLS_CVAR("BetterDebugWarpScreen"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Better Debug Warp Screen", CVAR_DEVELOPER_TOOLS("BetterDebugWarpScreen"), true, false); UIWidgets::Tooltip("Optimized debug warp screen, with the added ability to chose entrances and time of day"); - UIWidgets::PaddedEnhancementCheckbox("Debug Warp Screen Translation", DEV_TOOLS_CVAR("DebugWarpScreenTranslation"), true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true); + UIWidgets::PaddedEnhancementCheckbox("Debug Warp Screen Translation", CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true); UIWidgets::Tooltip("Translate the Debug Warp Screen based on the game language"); if (gPlayState != NULL) { UIWidgets::PaddedSeparator(); @@ -1661,12 +1661,12 @@ void DrawDeveloperToolsMenu() { ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f); ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f)); if (ImGui::Button("Advance 1", ImVec2(ImGui::GetContentRegionAvail().x / 2.0f, 0.0f))) { - CVarSetInteger(GENERAL_CVAR("FrameAdvance"), 1); + CVarSetInteger(CVAR_GENERAL("FrameAdvance"), 1); } ImGui::SameLine(); ImGui::Button("Advance (Hold)"); if (ImGui::IsItemActive()) { - CVarSetInteger(GENERAL_CVAR("FrameAdvance"), 1); + CVarSetInteger(CVAR_GENERAL("FrameAdvance"), 1); } ImGui::PopStyleVar(3); ImGui::PopStyleColor(1); @@ -1692,37 +1692,37 @@ void DrawDeveloperToolsMenu() { } UIWidgets::Spacer(0); if (mSaveEditorWindow) { - if (ImGui::Button(GetWindowButtonText("Save Editor", CVarGetInteger(WINDOW_CVAR("SaveEditor"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { + if (ImGui::Button(GetWindowButtonText("Save Editor", CVarGetInteger(CVAR_WINDOW("SaveEditor"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { mSaveEditorWindow->ToggleVisibility(); } } UIWidgets::Spacer(0); if (mColViewerWindow) { - if (ImGui::Button(GetWindowButtonText("Collision Viewer", CVarGetInteger(WINDOW_CVAR("CollisionViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { + if (ImGui::Button(GetWindowButtonText("Collision Viewer", CVarGetInteger(CVAR_WINDOW("CollisionViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { mColViewerWindow->ToggleVisibility(); } } UIWidgets::Spacer(0); if (mActorViewerWindow) { - if (ImGui::Button(GetWindowButtonText("Actor Viewer", CVarGetInteger(WINDOW_CVAR("ActorViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { + if (ImGui::Button(GetWindowButtonText("Actor Viewer", CVarGetInteger(CVAR_WINDOW("ActorViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { mActorViewerWindow->ToggleVisibility(); } } UIWidgets::Spacer(0); if (mDLViewerWindow) { - if (ImGui::Button(GetWindowButtonText("Display List Viewer", CVarGetInteger(WINDOW_CVAR("DLViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { + if (ImGui::Button(GetWindowButtonText("Display List Viewer", CVarGetInteger(CVAR_WINDOW("DLViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { mDLViewerWindow->ToggleVisibility(); } } UIWidgets::Spacer(0); if (mValueViewerWindow) { - if (ImGui::Button(GetWindowButtonText("Value Viewer", CVarGetInteger(WINDOW_CVAR("ValueViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { + if (ImGui::Button(GetWindowButtonText("Value Viewer", CVarGetInteger(CVAR_WINDOW("ValueViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { mValueViewerWindow->ToggleVisibility(); } } UIWidgets::Spacer(0); if (mMessageViewerWindow) { - if (ImGui::Button(GetWindowButtonText("Message Viewer", CVarGetInteger(WINDOW_CVAR("MessageViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { + if (ImGui::Button(GetWindowButtonText("Message Viewer", CVarGetInteger(CVAR_WINDOW("MessageViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) { mMessageViewerWindow->ToggleVisibility(); } } @@ -1752,27 +1752,27 @@ bool isStringEmpty(std::string str) { #ifdef ENABLE_REMOTE_CONTROL void DrawRemoteControlMenu() { if (ImGui::BeginMenu("Network")) { - static std::string ip = CVarGetString(REMOTE_CVAR("IP"), "127.0.0.1"); - static uint16_t port = CVarGetInteger(REMOTE_CVAR("Port"), 43384); - bool isFormValid = !isStringEmpty(CVarGetString(REMOTE_CVAR("IP"), "127.0.0.1")) && port > 1024 && port < 65535; + static std::string ip = CVarGetString(CVAR_REMOTE("IP"), "127.0.0.1"); + static uint16_t port = CVarGetInteger(CVAR_REMOTE("Port"), 43384); + bool isFormValid = !isStringEmpty(CVarGetString(CVAR_REMOTE("IP"), "127.0.0.1")) && port > 1024 && port < 65535; const char* remoteOptions[2] = { "Sail", "Crowd Control"}; ImGui::BeginDisabled(GameInteractor::Instance->isRemoteInteractorEnabled); ImGui::Text("Remote Interaction Scheme"); - if (UIWidgets::EnhancementCombobox(REMOTE_CVAR("Scheme"), remoteOptions, GI_SCHEME_SAIL)) { - switch (CVarGetInteger(REMOTE_CVAR("Scheme"), GI_SCHEME_SAIL)) { + if (UIWidgets::EnhancementCombobox(CVAR_REMOTE("Scheme"), remoteOptions, GI_SCHEME_SAIL)) { + switch (CVarGetInteger(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL)) { case GI_SCHEME_SAIL: case GI_SCHEME_CROWD_CONTROL: - CVarSetString(REMOTE_CVAR("IP"), "127.0.0.1"); - CVarSetInteger(REMOTE_CVAR("Port"), 43384); + CVarSetString(CVAR_REMOTE("IP"), "127.0.0.1"); + CVarSetInteger(CVAR_REMOTE("Port"), 43384); ip = "127.0.0.1"; port = 43384; break; } LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } - switch (CVarGetInteger(REMOTE_CVAR("Scheme"), GI_SCHEME_SAIL)) { + switch (CVarGetInteger(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL)) { case GI_SCHEME_SAIL: UIWidgets::InsertHelpHoverText( "Sail is a networking protocol designed to facilitate remote " @@ -1805,14 +1805,14 @@ void DrawRemoteControlMenu() { ImGui::Text("Remote IP & Port"); if (ImGui::InputText("##gRemote.IP", (char*)ip.c_str(), ip.capacity() + 1)) { - CVarSetString(REMOTE_CVAR("IP"), ip.c_str()); + CVarSetString(CVAR_REMOTE("IP"), ip.c_str()); LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } ImGui::SameLine(); ImGui::PushItemWidth(ImGui::GetFontSize() * 5); if (ImGui::InputScalar("##gRemote.Port", ImGuiDataType_U16, &port)) { - CVarSetInteger(REMOTE_CVAR("Port"), port); + CVarSetInteger(CVAR_REMOTE("Port"), port); LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); } @@ -1825,9 +1825,9 @@ void DrawRemoteControlMenu() { const char* buttonLabel = GameInteractor::Instance->isRemoteInteractorEnabled ? "Disable" : "Enable"; if (ImGui::Button(buttonLabel, ImVec2(-1.0f, 0.0f))) { if (GameInteractor::Instance->isRemoteInteractorEnabled) { - CVarSetInteger(REMOTE_CVAR("Enabled"), 0); + CVarSetInteger(CVAR_REMOTE("Enabled"), 0); LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); - switch (CVarGetInteger(REMOTE_CVAR("Scheme"), GI_SCHEME_SAIL)) { + switch (CVarGetInteger(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL)) { case GI_SCHEME_SAIL: GameInteractorSail::Instance->Disable(); break; @@ -1836,9 +1836,9 @@ void DrawRemoteControlMenu() { break; } } else { - CVarSetInteger(REMOTE_CVAR("Enabled"), 1); + CVarSetInteger(CVAR_REMOTE("Enabled"), 1); LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick(); - switch (CVarGetInteger(REMOTE_CVAR("Scheme"), GI_SCHEME_SAIL)) { + switch (CVarGetInteger(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL)) { case GI_SCHEME_SAIL: GameInteractorSail::Instance->Enable(); break; @@ -1884,39 +1884,39 @@ void DrawRandomizerMenu() { static ImVec2 buttonSize(200.0f, 0.0f); #endif if (mRandomizerSettingsWindow) { - if (ImGui::Button(GetWindowButtonText("Randomizer Settings", CVarGetInteger(WINDOW_CVAR("RandomizerSettings"), 0)).c_str(), buttonSize)) { + if (ImGui::Button(GetWindowButtonText("Randomizer Settings", CVarGetInteger(CVAR_WINDOW("RandomizerSettings"), 0)).c_str(), buttonSize)) { mRandomizerSettingsWindow->ToggleVisibility(); } } UIWidgets::Spacer(0); if (mItemTrackerWindow) { - if (ImGui::Button(GetWindowButtonText("Item Tracker", CVarGetInteger(WINDOW_CVAR("ItemTracker"), 0)).c_str(), buttonSize)) { + if (ImGui::Button(GetWindowButtonText("Item Tracker", CVarGetInteger(CVAR_WINDOW("ItemTracker"), 0)).c_str(), buttonSize)) { mItemTrackerWindow->ToggleVisibility(); } } UIWidgets::Spacer(0); if (mItemTrackerSettingsWindow) { - if (ImGui::Button(GetWindowButtonText("Item Tracker Settings", CVarGetInteger(WINDOW_CVAR("ItemTrackerSettings"), 0)).c_str(), buttonSize)) { + if (ImGui::Button(GetWindowButtonText("Item Tracker Settings", CVarGetInteger(CVAR_WINDOW("ItemTrackerSettings"), 0)).c_str(), buttonSize)) { mItemTrackerSettingsWindow->ToggleVisibility(); } } UIWidgets::Spacer(0); if (mEntranceTrackerWindow) { - if (ImGui::Button(GetWindowButtonText("Entrance Tracker", CVarGetInteger(WINDOW_CVAR("EntranceTracker"), 0)).c_str(), buttonSize)) { + if (ImGui::Button(GetWindowButtonText("Entrance Tracker", CVarGetInteger(CVAR_WINDOW("EntranceTracker"), 0)).c_str(), buttonSize)) { mEntranceTrackerWindow->ToggleVisibility(); } } UIWidgets::Spacer(0); if (mCheckTrackerWindow) { - if (ImGui::Button(GetWindowButtonText("Check Tracker", CVarGetInteger(WINDOW_CVAR("CheckTracker"), 0)).c_str(), buttonSize)) { + if (ImGui::Button(GetWindowButtonText("Check Tracker", CVarGetInteger(CVAR_WINDOW("CheckTracker"), 0)).c_str(), buttonSize)) { mCheckTrackerWindow->ToggleVisibility(); } } UIWidgets::Spacer(0); if (mCheckTrackerSettingsWindow) { - if (ImGui::Button(GetWindowButtonText("Check Tracker Settings", CVarGetInteger(WINDOW_CVAR("CheckTrackerSettings"), 0)).c_str(), buttonSize)) { + if (ImGui::Button(GetWindowButtonText("Check Tracker Settings", CVarGetInteger(CVAR_WINDOW("CheckTrackerSettings"), 0)).c_str(), buttonSize)) { mCheckTrackerSettingsWindow->ToggleVisibility(); } } @@ -1927,11 +1927,11 @@ void DrawRandomizerMenu() { if (ImGui::BeginMenu("Rando Enhancements")) { - UIWidgets::EnhancementCheckbox("Rando-Relevant Navi Hints", RANDO_ENHANCEMENT_CVAR("RandoRelevantNavi"), false, "", UIWidgets::CheckboxGraphics::Cross, true); + UIWidgets::EnhancementCheckbox("Rando-Relevant Navi Hints", CVAR_RANDOMIZER_ENHANCEMENT("RandoRelevantNavi"), false, "", UIWidgets::CheckboxGraphics::Cross, true); UIWidgets::Tooltip( "Replace Navi's overworld quest hints with rando-related gameplay hints." ); - UIWidgets::PaddedEnhancementCheckbox("Random Rupee Names", RANDO_ENHANCEMENT_CVAR("RandomizeRupeeNames"), true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true); + UIWidgets::PaddedEnhancementCheckbox("Random Rupee Names", CVAR_RANDOMIZER_ENHANCEMENT("RandomizeRupeeNames"), true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true); UIWidgets::Tooltip( "When obtaining rupees, randomize what the rupee is called in the textbox." ); @@ -1957,13 +1957,13 @@ void DrawRandomizerMenu() { "This setting is disabled because a savefile is loaded without any key\n" "shuffle settings set to \"Any Dungeon\", \"Overworld\" or \"Anywhere\""; - UIWidgets::PaddedEnhancementCheckbox("Key Colors Match Dungeon", RANDO_ENHANCEMENT_CVAR("MatchKeyColors"), true, false, + UIWidgets::PaddedEnhancementCheckbox("Key Colors Match Dungeon", CVAR_RANDOMIZER_ENHANCEMENT("MatchKeyColors"), true, false, disableKeyColors, disableKeyColorsText, UIWidgets::CheckboxGraphics::Cross, true); UIWidgets::Tooltip( "Matches the color of small keys and boss keys to the dungeon they belong to. " "This helps identify keys from afar and adds a little bit of flair.\n\nThis only " "applies to seeds with keys and boss keys shuffled to Any Dungeon, Overworld, or Anywhere."); - UIWidgets::PaddedEnhancementCheckbox("Quest Item Fanfares", RANDO_ENHANCEMENT_CVAR("QuestItemFanfares"), true, false); + UIWidgets::PaddedEnhancementCheckbox("Quest Item Fanfares", CVAR_RANDOMIZER_ENHANCEMENT("QuestItemFanfares"), true, false); UIWidgets::Tooltip( "Play unique fanfares when obtaining quest items " "(medallions/stones/songs). Note that these fanfares are longer than usual." diff --git a/soh/src/code/code_800EC960.c b/soh/src/code/code_800EC960.c index b8e18c633a1..c7238cb39ba 100644 --- a/soh/src/code/code_800EC960.c +++ b/soh/src/code/code_800EC960.c @@ -4025,7 +4025,7 @@ void Audio_PlayFanfare_Rando(GetItemEntry getItem) { temp1 = NA_BGM_SMALL_ITEM_GET | 0x900; } // If the setting is toggled on and we get special quest items (longer fanfares): - if (CVarGetInteger(RANDO_ENHANCEMENT_CVAR("QuestItemFanfares"), 0) != 0) { + if (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("QuestItemFanfares"), 0) != 0) { // If we get a medallion, play the "get a medallion" fanfare if ((itemId >= ITEM_MEDALLION_FOREST) && (itemId <= ITEM_MEDALLION_LIGHT)) { temp1 = NA_BGM_MEDALLION_GET | 0x900; diff --git a/soh/src/code/game.c b/soh/src/code/game.c index d7c2e525614..5fca89dbdc8 100644 --- a/soh/src/code/game.c +++ b/soh/src/code/game.c @@ -93,7 +93,7 @@ void func_800C4344(GameState* gameState) { HREG(95) = CHECK_BTN_ALL(selectedInput->press.button, hReg82); } - if (CVarGetInteger("gRegEditEnabled", 0) || gIsCtrlr2Valid) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("RegEditEnabled"), 0) || gIsCtrlr2Valid) { func_8006390C(&gameState->input[1]); } @@ -162,7 +162,7 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) { } sLastButtonPressed = gameState->input[0].press.button | gameState->input[0].cur.button; - if (R_DISABLE_INPUT_DISPLAY == 0 && CVarGetInteger("gDebugEnabled", 0)) { + if (R_DISABLE_INPUT_DISPLAY == 0 && CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) { GameState_DrawInputDisplay(sLastButtonPressed, &newDList); } diff --git a/soh/src/code/graph.c b/soh/src/code/graph.c index d273e76439c..d72a302777f 100644 --- a/soh/src/code/graph.c +++ b/soh/src/code/graph.c @@ -424,7 +424,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { sGraphUpdateTime = time; } - if (CVarGetInteger("gDebugEnabled", 0)) + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) { if (CHECK_BTN_ALL(gameState->input[0].press.button, BTN_Z) && CHECK_BTN_ALL(gameState->input[0].cur.button, BTN_L | BTN_R)) { diff --git a/soh/src/code/z_bgcheck.c b/soh/src/code/z_bgcheck.c index 2af8ef9ab88..2a385f9662e 100644 --- a/soh/src/code/z_bgcheck.c +++ b/soh/src/code/z_bgcheck.c @@ -1902,7 +1902,7 @@ s32 BgCheck_CheckWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResul s32 bgId2; f32 nx, ny, nz; // unit normal of polygon - if (CVarGetInteger(CHEAT_CVAR("NoClip"), 0) && actor != NULL && actor->id == ACTOR_PLAYER) { + if (CVarGetInteger(CVAR_CHEAT("NoClip"), 0) && actor != NULL && actor->id == ACTOR_PLAYER) { return false; } @@ -4025,7 +4025,7 @@ u32 func_80041D94(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) { * SurfaceType Get Wall Flags */ s32 func_80041DB8(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) { - if (CVarGetInteger(CHEAT_CVAR("ClimbEverything"), 0) != 0) { + if (CVarGetInteger(CVAR_CHEAT("ClimbEverything"), 0) != 0) { return (1 << 3) | D_80119D90[func_80041D94(colCtx, poly, bgId)]; } else { return D_80119D90[func_80041D94(colCtx, poly, bgId)]; @@ -4122,7 +4122,7 @@ u32 SurfaceType_GetEcho(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) * SurfaceType Is Hookshot Surface */ u32 SurfaceType_IsHookshotSurface(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) { - return CVarGetInteger(CHEAT_CVAR("HookshotEverything"), 0) || SurfaceType_GetData(colCtx, poly, bgId, 1) >> 17 & 1; + return CVarGetInteger(CVAR_CHEAT("HookshotEverything"), 0) || SurfaceType_GetData(colCtx, poly, bgId, 1) >> 17 & 1; } /** diff --git a/soh/src/code/z_camera.c b/soh/src/code/z_camera.c index 90634ea312c..3f3c55f65d0 100644 --- a/soh/src/code/z_camera.c +++ b/soh/src/code/z_camera.c @@ -7619,7 +7619,7 @@ Vec3s Camera_Update(Camera* camera) { } // enable/disable debug cam - if (CVarGetInteger("gDebugEnabled", 0) && CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_START)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_START)) { gDbgCamEnabled ^= 1; if (gDbgCamEnabled) { DbgCamera_Enable(&D_8015BD80, camera); @@ -7702,7 +7702,7 @@ Vec3s Camera_Update(Camera* camera) { } if (camera->timer != -1 && CHECK_BTN_ALL(D_8015BD7C->state.input[0].press.button, BTN_DRIGHT) && - CVarGetInteger("gDebugEnabled", 0)) { + CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) { camera->timer = 0; } diff --git a/soh/src/code/z_common_data.c b/soh/src/code/z_common_data.c index 49168988000..31a25841dd7 100644 --- a/soh/src/code/z_common_data.c +++ b/soh/src/code/z_common_data.c @@ -8,7 +8,7 @@ void SaveContext_Init(void) { gSaveContext.seqId = (u8)NA_BGM_DISABLED; gSaveContext.natureAmbienceId = NATURE_ID_DISABLED; gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX; - gSaveContext.nextCutsceneIndex = CVarGetInteger(CHEAT_CVAR("BetaQuestWorld"), 0xFFEF); + gSaveContext.nextCutsceneIndex = CVarGetInteger(CVAR_CHEAT("BetaQuestWorld"), 0xFFEF); gSaveContext.cutsceneTrigger = 0; gSaveContext.chamberCutsceneNum = 0; gSaveContext.nextDayTime = 0xFFFF; diff --git a/soh/src/code/z_debug.c b/soh/src/code/z_debug.c index 267846eb427..1a814d745a7 100644 --- a/soh/src/code/z_debug.c +++ b/soh/src/code/z_debug.c @@ -133,7 +133,7 @@ void func_8006390C(Input* input) { InputCombo* input_combo; s32 i; - if (!CVarGetInteger("gDebugEnabled", 0)) + if (!CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) return; regGroup = (gGameInfo->regGroup * REG_PAGES + gGameInfo->regPage) * REG_PER_PAGE - REG_PER_PAGE; @@ -216,7 +216,7 @@ void func_80063C04(GfxPrint* printer) { s32 pad; char name[3]; - if (!CVarGetInteger("gDebugEnabled", 0)) + if (!CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) return; // set up register name string @@ -243,7 +243,7 @@ void func_80063D7C(GraphicsContext* gfxCtx) { GfxPrint printer; Gfx* tempRet; - if (!CVarGetInteger("gDebugEnabled", 0) || GameInteractor_NoUIActive()) { + if (!CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) || GameInteractor_NoUIActive()) { return; } diff --git a/soh/src/code/z_demo.c b/soh/src/code/z_demo.c index 9c0dd9b05d1..21ac5eae70f 100644 --- a/soh/src/code/z_demo.c +++ b/soh/src/code/z_demo.c @@ -154,14 +154,14 @@ void func_80064558(PlayState* play, CutsceneContext* csCtx) { void func_800645A0(PlayState* play, CutsceneContext* csCtx) { Input* input = &play->state.input[0]; - if (CVarGetInteger("gDebugEnabled", 0) && CHECK_BTN_ALL(input->press.button, BTN_DLEFT) && + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && CHECK_BTN_ALL(input->press.button, BTN_DLEFT) && (csCtx->state == CS_STATE_IDLE) && (gSaveContext.sceneSetupIndex >= 4)) { D_8015FCC8 = 0; gSaveContext.cutsceneIndex = 0xFFFD; gSaveContext.cutsceneTrigger = 1; } - if (CVarGetInteger("gDebugEnabled", 0) && CHECK_BTN_ALL(input->press.button, BTN_DUP) && + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && CHECK_BTN_ALL(input->press.button, BTN_DUP) && (csCtx->state == CS_STATE_IDLE) && (gSaveContext.sceneSetupIndex >= 4) && !gDbgCamEnabled) { D_8015FCC8 = 1; gSaveContext.cutsceneIndex = 0xFFFD; @@ -499,7 +499,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB // cmd->base == 33: Zelda escaping with impa cutscene bool randoCsSkip = (IS_RANDO && (cmd->base == 8 || cmd->base == 24 || cmd->base == 33)); bool debugCsSkip = (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START) && - (gSaveContext.fileNum != 0xFEDC) && CVarGetInteger("gDebugEnabled", 0)); + (gSaveContext.fileNum != 0xFEDC) && CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)); if ((gSaveContext.gameMode != 0) && (gSaveContext.gameMode != 3) && (play->sceneNum != SCENE_HYRULE_FIELD) && (csCtx->frames > 20) && @@ -1643,7 +1643,7 @@ void Cutscene_ProcessCommands(PlayState* play, CutsceneContext* csCtx, u8* cutsc return; } - if (CVarGetInteger("gDebugEnabled", 0) && CHECK_BTN_ALL(play->state.input[0].press.button, BTN_DRIGHT)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && CHECK_BTN_ALL(play->state.input[0].press.button, BTN_DRIGHT)) { csCtx->state = CS_STATE_UNSKIPPABLE_INIT; return; } diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c index e89bd86c05d..136df2ef087 100644 --- a/soh/src/code/z_en_item00.c +++ b/soh/src/code/z_en_item00.c @@ -792,7 +792,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) { if (this->unk_15A > 0) { this->unk_15A--; - if (CVarGetInteger(CHEAT_CVAR("DropsDontDie"), 0) && (this->unk_154 <= 0)) { + if (CVarGetInteger(CVAR_CHEAT("DropsDontDie"), 0) && (this->unk_154 <= 0)) { this->unk_15A++; } } diff --git a/soh/src/code/z_frame_advance.c b/soh/src/code/z_frame_advance.c index e48bd0c3502..6fcd76ae765 100644 --- a/soh/src/code/z_frame_advance.c +++ b/soh/src/code/z_frame_advance.c @@ -18,10 +18,10 @@ s32 FrameAdvance_Update(FrameAdvanceContext* frameAdvCtx, Input* input) { frameAdvCtx->enabled = !frameAdvCtx->enabled; } - if (!frameAdvCtx->enabled || CVarGetInteger("gFrameAdvance", 0) || (CHECK_BTN_ALL(input->cur.button, BTN_Z) && + if (!frameAdvCtx->enabled || CVarGetInteger(CVAR_GENERAL("FrameAdvance"), 0) || (CHECK_BTN_ALL(input->cur.button, BTN_Z) && (CHECK_BTN_ALL(input->press.button, BTN_R) || (CHECK_BTN_ALL(input->cur.button, BTN_R) && (++frameAdvCtx->timer >= 9))))) { - CVarClear("gFrameAdvance"); + CVarClear(CVAR_GENERAL("FrameAdvance")); frameAdvCtx->timer = 0; return true; } diff --git a/soh/src/code/z_kaleido_setup.c b/soh/src/code/z_kaleido_setup.c index 825adf237f1..e2feccf3c86 100644 --- a/soh/src/code/z_kaleido_setup.c +++ b/soh/src/code/z_kaleido_setup.c @@ -18,7 +18,7 @@ void KaleidoSetup_Update(PlayState* play) { play->shootingGalleryStatus <= 1 && gSaveContext.magicState != MAGIC_STATE_STEP_CAPACITY && gSaveContext.magicState != MAGIC_STATE_FILL && (play->sceneNum != SCENE_BOMBCHU_BOWLING_ALLEY || !Flags_GetSwitch(play, 0x38))) { - u8 easyPauseBufferEnabled = CVarGetInteger(CHEAT_CVAR("EasyPauseBuffer"), 0); + u8 easyPauseBufferEnabled = CVarGetInteger(CVAR_CHEAT("EasyPauseBuffer"), 0); u8 easyPauseBufferTimer = CVarGetInteger("gCheatEasyPauseBufferTimer", 0); // If start is not seen as pressed on the 2nd to last frame then we should end the easy frame advance flow diff --git a/soh/src/code/z_map_exp.c b/soh/src/code/z_map_exp.c index 16d4434c927..60ac73cda03 100644 --- a/soh/src/code/z_map_exp.c +++ b/soh/src/code/z_map_exp.c @@ -735,7 +735,7 @@ void Minimap_Draw(PlayState* play) { // If any of these CVars are enabled, disable toggling the minimap with L, unless gEnableMapToggle is set bool enableMapToggle = - !(CVarGetInteger("gDebugEnabled", 0) || CVarGetInteger(CHEAT_CVAR("MoonJumpOnL"), 0) || CVarGetInteger("gTurboOnL", 0)) || + !(CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) || CVarGetInteger(CVAR_CHEAT("MoonJumpOnL"), 0) || CVarGetInteger("gTurboOnL", 0)) || CVarGetInteger("gEnableMapToggle", 0); if (play->pauseCtx.state < 4) { diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index fa1c6191867..fa4c6c01bcb 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -1655,11 +1655,11 @@ void Message_OpenText(PlayState* play, u16 textId) { //font->msgLength, __FILE__, __LINE__); } else if (CVarGetInteger("gAskToEquip", 0) && - (((LINK_IS_ADULT || CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0)) && + (((LINK_IS_ADULT || CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0)) && // 0C = Biggoron, 4B = Giant's, 4E = Mirror Shield, 50-51 = Tunics (textId == 0x0C || textId == 0x4B || textId == 0x4E || textId == 0x50 || textId == 0x51)) || - ((!LINK_IS_ADULT || CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0)) && + ((!LINK_IS_ADULT || CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0)) && // 4C = Deku Shield, A4 = Kokiri Sword (textId == 0x4C || textId == 0xA4)) || // 4D == Hylian Shield @@ -3007,7 +3007,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) { * the last value being saved in a static variable. */ void Message_DrawDebugVariableChanged(s16* var, GraphicsContext* gfxCtx) { - if (!CVarGetInteger("gDebugEnabled", 0)) { return; } + if (!CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) { return; } static s16 sVarLastValue = 0; static s16 sFillTimer = 0; diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index e642cb30f64..e9788f7f80e 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -1539,7 +1539,7 @@ void Inventory_SwapAgeEquipment(void) { // When using enhancements, set swordless flag if player doesn't have kokiri sword or hasn't equipped a sword yet. // Then set the child equips button items to item none to ensure kokiri sword is not equipped - if ((CVarGetInteger(GENERAL_CVAR("SwitchAge"), 0) || CVarGetInteger("gSwitchTimeline", 0)) && (CHECK_OWNED_EQUIP(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_KOKIRI) == 0 || Flags_GetInfTable(INFTABLE_SWORDLESS))) { + if ((CVarGetInteger(CVAR_GENERAL("SwitchAge"), 0) || CVarGetInteger("gSwitchTimeline", 0)) && (CHECK_OWNED_EQUIP(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_KOKIRI) == 0 || Flags_GetInfTable(INFTABLE_SWORDLESS))) { Flags_SetInfTable(INFTABLE_SWORDLESS); gSaveContext.childEquips.buttonItems[0] = ITEM_NONE; } @@ -1554,7 +1554,7 @@ void Inventory_SwapAgeEquipment(void) { gSaveContext.adultEquips.equipment = gSaveContext.equips.equipment; // Switching age using enhancements separated out to make vanilla flow clear - if (CVarGetInteger(GENERAL_CVAR("SwitchAge"), 0) || CVarGetInteger("gSwitchTimeline", 0)) { + if (CVarGetInteger(CVAR_GENERAL("SwitchAge"), 0) || CVarGetInteger("gSwitchTimeline", 0)) { for (i = 0; i < ARRAY_COUNT(gSaveContext.equips.buttonItems); i++) { gSaveContext.equips.buttonItems[i] = gSaveContext.childEquips.buttonItems[i]; @@ -1629,7 +1629,7 @@ void Inventory_SwapAgeEquipment(void) { (EQUIP_VALUE_BOOTS_KOKIRI << (EQUIP_TYPE_BOOTS * 4)); } - if ((CVarGetInteger(GENERAL_CVAR("SwitchAge"), 0) || CVarGetInteger("gSwitchTimeline", 0)) && + if ((CVarGetInteger(CVAR_GENERAL("SwitchAge"), 0) || CVarGetInteger("gSwitchTimeline", 0)) && (gSaveContext.equips.buttonItems[0] == ITEM_NONE)) { Flags_SetInfTable(INFTABLE_SWORDLESS); if (gSaveContext.childEquips.equipment == 0) { @@ -5720,7 +5720,7 @@ void Interface_Draw(PlayState* play) { if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0)) { if (gSaveContext.minigameState != 1) { // Carrots rendering if the action corresponds to riding a horse - if (interfaceCtx->unk_1EE == 8 && !CVarGetInteger(CHEAT_CVAR("InfiniteEponaBoost"), 0)) { + if (interfaceCtx->unk_1EE == 8 && !CVarGetInteger(CVAR_CHEAT("InfiniteEponaBoost"), 0)) { // Load Carrot Icon gDPLoadTextureBlock(OVERLAY_DISP++, gCarrotIconTex, G_IM_FMT_RGBA, G_IM_SIZ_32b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, @@ -6534,11 +6534,11 @@ void Interface_Update(PlayState* play) { D_80125A58 = Player_GetEnvironmentalHazard(play); if (D_80125A58 == 1) { - if (CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC) == EQUIP_VALUE_TUNIC_GORON || CVarGetInteger(CHEAT_CVAR("SuperTunic"), 0) != 0) { + if (CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC) == EQUIP_VALUE_TUNIC_GORON || CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) != 0) { D_80125A58 = 0; } } else if ((Player_GetEnvironmentalHazard(play) >= 2) && (Player_GetEnvironmentalHazard(play) < 5)) { - if (CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC) == EQUIP_VALUE_TUNIC_ZORA || CVarGetInteger(CHEAT_CVAR("SuperTunic"), 0) != 0) { + if (CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC) == EQUIP_VALUE_TUNIC_ZORA || CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) != 0) { D_80125A58 = 0; } } diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index 09bafb53b9d..9bc72380e68 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -675,7 +675,7 @@ void Play_Init(GameState* thisx) { Fault_AddClient(&D_801614B8, ZeldaArena_Display, NULL, NULL); // In order to keep bunny hood equipped on first load, we need to pre-set the age reqs for the item and slot - if ((CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA && CVarGetInteger("gAdultBunnyHood", 0)) || CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0)) { + if ((CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA && CVarGetInteger("gAdultBunnyHood", 0)) || CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0)) { gItemAgeReqs[ITEM_MASK_BUNNY] = AGE_REQ_NONE; if(INV_CONTENT(ITEM_TRADE_CHILD) == ITEM_MASK_BUNNY) gSlotAgeReqs[SLOT_TRADE_CHILD] = AGE_REQ_NONE; @@ -1846,7 +1846,7 @@ void Play_Main(GameState* thisx) { LOG_NUM("1", 1); } - if (CVarGetInteger(CHEAT_CVAR("TimeSync"), 0)) { + if (CVarGetInteger(CVAR_CHEAT("TimeSync"), 0)) { const int maxRealDaySeconds = 86400; const int maxInGameDayTicks = 65536; diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index afec990c807..90b721f3c89 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -597,7 +597,7 @@ s32 Player_ActionToModelGroup(Player* this, s32 actionParam) { void Player_SetModelsForHoldingShield(Player* this) { if ((this->stateFlags1 & PLAYER_STATE1_SHIELDING) && ((this->itemAction < 0) || (this->itemAction == this->heldItemAction))) { - if ((CVarGetInteger(CHEAT_CVAR("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK) || + if ((CVarGetInteger(CVAR_CHEAT("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK) || !Player_HoldsTwoHandedWeapon(this)) && !Player_IsChildWithHylianShield(this)) { this->rightHandType = PLAYER_MODELTYPE_RH_SHIELD; if (LINK_IS_CHILD && (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && (this->currentShield == PLAYER_SHIELD_MIRROR)) { @@ -793,7 +793,7 @@ s32 Player_GetStrength(void) { return PLAYER_STR_NONE; } - if (CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0) || LINK_IS_ADULT) { + if (CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0) || LINK_IS_ADULT) { return strengthUpgrade; } else if (strengthUpgrade != 0) { return PLAYER_STR_BRACELET; @@ -953,9 +953,9 @@ s32 Player_GetEnvironmentalHazard(PlayState* play) { triggerEntry = &sTextTriggers[var]; if ((triggerEntry->flag != 0) && !(gSaveContext.textTriggerFlags & triggerEntry->flag) && - (((var == 0) && (this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CHEAT_CVAR("SuperTunic"), 0) == 0 && CVarGetInteger("gDisableTunicWarningText", 0) == 0)) || + (((var == 0) && (this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0 && CVarGetInteger("gDisableTunicWarningText", 0) == 0)) || (((var == 1) || (var == 3)) && (this->currentBoots == PLAYER_BOOTS_IRON) && - (this->currentTunic != PLAYER_TUNIC_ZORA && CVarGetInteger(CHEAT_CVAR("SuperTunic"), 0) == 0 && CVarGetInteger("gDisableTunicWarningText", 0) == 0)))) { + (this->currentTunic != PLAYER_TUNIC_ZORA && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0 && CVarGetInteger("gDisableTunicWarningText", 0) == 0)))) { Message_StartTextbox(play, triggerEntry->textId, NULL); gSaveContext.textTriggerFlags |= triggerEntry->flag; } @@ -1914,7 +1914,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve if (func_8002DD78(this) != 0) { Matrix_Translate(500.0f, 300.0f, 0.0f, MTXMODE_APPLY); Player_DrawHookshotReticle( - play, this, ((this->heldItemAction == PLAYER_IA_HOOKSHOT) ? 38600.0f : 77600.0f) * CVarGetFloat(CHEAT_CVAR("HookshotReachMultiplier"), 1.0f)); + play, this, ((this->heldItemAction == PLAYER_IA_HOOKSHOT) ? 38600.0f : 77600.0f) * CVarGetFloat(CVAR_CHEAT("HookshotReachMultiplier"), 1.0f)); } } } else if (CVarGetInteger("gBowReticle", 0) && ( diff --git a/soh/src/code/z_room.c b/soh/src/code/z_room.c index f0188c42d00..3b60850405f 100644 --- a/soh/src/code/z_room.c +++ b/soh/src/code/z_room.c @@ -412,7 +412,7 @@ BgImage* func_80096A74(PolygonType1* polygon1, PlayState* play) { camera = GET_ACTIVE_CAM(play); camId = camera->camDataIdx; - if (camId == -1 && (CVarGetInteger(CHEAT_CVAR("NoRestrictItems"), 0) || CVarGetInteger("gCrowdControl", 0))) { + if (camId == -1 && (CVarGetInteger(CVAR_CHEAT("NoRestrictItems"), 0) || CVarGetInteger("gCrowdControl", 0))) { // This prevents a crash when using items that change the // camera (such as din's fire), voiding out or dying on // scenes with prerendered backgrounds. diff --git a/soh/src/code/z_sram.c b/soh/src/code/z_sram.c index 90a7eacf72b..5b67eba1d8a 100644 --- a/soh/src/code/z_sram.c +++ b/soh/src/code/z_sram.c @@ -221,7 +221,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) { u16* ptr; u16 checksum; - if (fileChooseCtx->buttonIndex != 0 || !CVarGetInteger("gDebugEnabled", 0)) { + if (fileChooseCtx->buttonIndex != 0 || !CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) { Sram_InitNewSave(); } else { Sram_InitDebugSave(); @@ -232,7 +232,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) { gSaveContext.dayTime = 0x6AAB; gSaveContext.cutsceneIndex = 0xFFF1; - if ((fileChooseCtx->buttonIndex == 0 && CVarGetInteger("gDebugEnabled", 0)) || CVarGetInteger("gNaviSkipCutscene", 0)) { + if ((fileChooseCtx->buttonIndex == 0 && CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) || CVarGetInteger("gNaviSkipCutscene", 0)) { gSaveContext.cutsceneIndex = 0; } diff --git a/soh/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/soh/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index ab6747c5e93..bb521ede92c 100644 --- a/soh/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/soh/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -85,7 +85,7 @@ void ArmsHook_Wait(ArmsHook* this, PlayState* play) { if (this->actor.parent == NULL) { Player* player = GET_PLAYER(play); // get correct timer length for hookshot or longshot - s32 length = ((player->heldItemAction == PLAYER_IA_HOOKSHOT) ? 13 : 26) * CVarGetFloat(CHEAT_CVAR("HookshotReachMultiplier"), 1.0f); + s32 length = ((player->heldItemAction == PLAYER_IA_HOOKSHOT) ? 13 : 26) * CVarGetFloat(CVAR_CHEAT("HookshotReachMultiplier"), 1.0f); ArmsHook_SetupAction(this, ArmsHook_Shoot); func_8002D9A4(&this->actor, 20.0f); diff --git a/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c index 686d83134a8..baa1db8f59a 100644 --- a/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -110,8 +110,8 @@ void EnBom_Init(Actor* thisx, PlayState* play) { Actor_SetScale(thisx, 0.01f); } - if (CVarGetFloat(CHEAT_CVAR("BombTimerMultiplier"), 1.0f) != 1.0f) { - this->timer = (s32)(70 * CVarGetFloat(CHEAT_CVAR("BombTimerMultiplier"), 1.0f)); + if (CVarGetFloat(CVAR_CHEAT("BombTimerMultiplier"), 1.0f) != 1.0f) { + this->timer = (s32)(70 * CVarGetFloat(CVAR_CHEAT("BombTimerMultiplier"), 1.0f)); // Do the sound and scale immediately if GameInteractor hasn't already. if (!GameInteractor_GetRandomBombFuseTimerActive()) { Audio_PlayActorSound2(thisx, NA_SE_PL_TAKE_OUT_SHIELD); @@ -267,7 +267,7 @@ void EnBom_Update(Actor* thisx, PlayState* play2) { } // With random bomb fuse timer or gBombTimerMultiplier, sound effect and scaling is already done on init. - if (this->timer == 67 && !GameInteractor_GetRandomBombFuseTimerActive() && CVarGetFloat(CHEAT_CVAR("BombTimerMultiplier"), 1.0f) == 1.0f) { + if (this->timer == 67 && !GameInteractor_GetRandomBombFuseTimerActive() && CVarGetFloat(CVAR_CHEAT("BombTimerMultiplier"), 1.0f) == 1.0f) { Audio_PlayActorSound2(thisx, NA_SE_PL_TAKE_OUT_SHIELD); Actor_SetScale(thisx, 0.01f); } @@ -281,7 +281,7 @@ void EnBom_Update(Actor* thisx, PlayState* play2) { Actor_UpdateBgCheckInfo(play, thisx, 5.0f, 10.0f, 15.0f, 0x1F); if (thisx->params == BOMB_BODY) { - float timerMultiplier = CVarGetFloat(CHEAT_CVAR("BombTimerMultiplier"), 1.0f); + float timerMultiplier = CVarGetFloat(CVAR_CHEAT("BombTimerMultiplier"), 1.0f); if (this->timer < (timerMultiplier == 1.0f ? 63 : (s32)(70 * timerMultiplier - 7))) { dustAccel.y = 0.2f; diff --git a/soh/src/overlays/actors/ovl_En_Crow/z_en_crow.c b/soh/src/overlays/actors/ovl_En_Crow/z_en_crow.c index 5350bfe581f..b1b9672203e 100644 --- a/soh/src/overlays/actors/ovl_En_Crow/z_en_crow.c +++ b/soh/src/overlays/actors/ovl_En_Crow/z_en_crow.c @@ -283,7 +283,7 @@ void EnCrow_FlyIdle(EnCrow* this, PlayState* play) { } if ((this->timer == 0) && (this->actor.xzDistToPlayer < 300.0f) && !(player->stateFlags1 & PLAYER_STATE1_ON_HORSE) && (this->actor.yDistToWater < -40.0f) && (Player_GetMask(play) != PLAYER_MASK_SKULL) && - !CVarGetInteger(CHEAT_CVAR("NoKeeseGuayTarget"), 0)) { + !CVarGetInteger(CVAR_CHEAT("NoKeeseGuayTarget"), 0)) { EnCrow_SetupDiveAttack(this); } } @@ -321,7 +321,7 @@ void EnCrow_DiveAttack(EnCrow* this, PlayState* play) { if ((this->timer == 0) || (Player_GetMask(play) == PLAYER_MASK_SKULL) || (this->collider.base.atFlags & AT_HIT) || (this->actor.bgCheckFlags & 9) || (player->stateFlags1 & PLAYER_STATE1_ON_HORSE) || (this->actor.yDistToWater > -40.0f) || - CVarGetInteger(CHEAT_CVAR("NoKeeseGuayTarget"), 0)) { + CVarGetInteger(CVAR_CHEAT("NoKeeseGuayTarget"), 0)) { if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; Audio_PlayActorSound2(&this->actor, NA_SE_EN_KAICHO_ATTACK); diff --git a/soh/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c b/soh/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c index e51896f245a..3f8fd104cce 100644 --- a/soh/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c +++ b/soh/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c @@ -416,7 +416,7 @@ void EnFirefly_FlyIdle(EnFirefly* this, PlayState* play) { } if ((this->timer == 0) && (this->actor.xzDistToPlayer < 200.0f) && (Player_GetMask(play) != PLAYER_MASK_SKULL) && - !CVarGetInteger(CHEAT_CVAR("NoKeeseGuayTarget"), 0)) { + !CVarGetInteger(CVAR_CHEAT("NoKeeseGuayTarget"), 0)) { EnFirefly_SetupDiveAttack(this); } } @@ -495,7 +495,7 @@ void EnFirefly_DiveAttack(EnFirefly* this, PlayState* play) { Math_ScaledStepToS(&this->actor.shape.rot.x, this->targetPitch, 0x100); } if ((this->timer == 0) || (Player_GetMask(play) == PLAYER_MASK_SKULL) || - CVarGetInteger(CHEAT_CVAR("NoKeeseGuayTarget"), 0)) { + CVarGetInteger(CVAR_CHEAT("NoKeeseGuayTarget"), 0)) { EnFirefly_SetupFlyAway(this); } } diff --git a/soh/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/soh/src/overlays/actors/ovl_En_Fish/z_en_fish.c index 0b9a383cae9..4061c218f99 100644 --- a/soh/src/overlays/actors/ovl_En_Fish/z_en_fish.c +++ b/soh/src/overlays/actors/ovl_En_Fish/z_en_fish.c @@ -679,7 +679,7 @@ void EnFish_UpdateCutscene(EnFish* this, PlayState* play) { // Update functions and Draw void EnFish_OrdinaryUpdate(EnFish* this, PlayState* play) { - if (this->timer > 0 && CVarGetInteger(CHEAT_CVAR("NoFishDespawn"), 0) == 0) { + if (this->timer > 0 && CVarGetInteger(CVAR_CHEAT("NoFishDespawn"), 0) == 0) { this->timer--; } diff --git a/soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c index 379ff8a2e2a..de3770988ae 100644 --- a/soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -3312,7 +3312,7 @@ void EnHorse_CheckBoost(EnHorse* thisx, PlayState* play2) { this->stateFlags |= ENHORSE_BOOST; this->stateFlags |= ENHORSE_FIRST_BOOST_REGEN; this->stateFlags |= ENHORSE_FLAG_8; - if (!CVarGetInteger(CHEAT_CVAR("InfiniteEponaBoost"), 0)) { this->numBoosts--; } + if (!CVarGetInteger(CVAR_CHEAT("InfiniteEponaBoost"), 0)) { this->numBoosts--; } this->boostTimer = 0; if (this->numBoosts == 0) { this->boostRegenTime = 140; diff --git a/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c index 0d36917077f..4cfa96e3e93 100644 --- a/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -213,7 +213,7 @@ void EnInsect_Init(Actor* thisx, PlayState* play2) { // For bugs that aren't linked to a soil patch, we remove the "short lived" flag to prevent them from despawning // And exit early to not increment the "bugs dropped count" - if (CVarGetInteger(CHEAT_CVAR("NoBugsDespawn"), 0) && this->soilActor == NULL) { + if (CVarGetInteger(CVAR_CHEAT("NoBugsDespawn"), 0) && this->soilActor == NULL) { this->unk_314 &= ~4; return; } diff --git a/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c index bd9eb288b67..793c73865be 100644 --- a/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -338,7 +338,7 @@ void func_80AE2C1C(EnRd* this, PlayState* play) { PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_CLIMBING_LADDER)) && !(player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY)) { if (this->unk_306 == 0) { - if (!(this->unk_312 & PLAYER_STATE2_GRABBED_BY_ENEMY) && !CVarGetInteger(CHEAT_CVAR("NoRedeadFreeze"), 0)) { + if (!(this->unk_312 & PLAYER_STATE2_GRABBED_BY_ENEMY) && !CVarGetInteger(CVAR_CHEAT("NoRedeadFreeze"), 0)) { player->actor.freezeTimer = 40; func_8008EEAC(play, &this->actor); GET_PLAYER(play)->unk_684 = &this->actor; @@ -570,7 +570,7 @@ void func_80AE3834(EnRd* this, PlayState* play) { s16 temp_v0 = this->actor.yawTowardsPlayer - this->actor.shape.rot.y - this->unk_30E - this->unk_310; if (ABS(temp_v0) < 0x2008) { - if (!(this->unk_312 & 0x80) && !CVarGetInteger(CHEAT_CVAR("NoRedeadFreeze"), 0)) { + if (!(this->unk_312 & 0x80) && !CVarGetInteger(CVAR_CHEAT("NoRedeadFreeze"), 0)) { player->actor.freezeTimer = 60; func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96); func_8008EEAC(play, &this->actor); diff --git a/soh/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c b/soh/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c index c05ca317a49..5012dff2b43 100644 --- a/soh/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c +++ b/soh/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c @@ -42,7 +42,7 @@ void EnRiverSound_Init(Actor* thisx, PlayState* play) { } else if (this->actor.params == RS_SARIAS_SONG) { // Always have leading music in rando if ( - CVarGetInteger(AUDIO_CVAR("LostWoodsConsistentVolume"), 0) || + CVarGetInteger(CVAR_AUDIO("LostWoodsConsistentVolume"), 0) || ((!CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) || CHECK_QUEST_ITEM(QUEST_SONG_SARIA)) && !IS_RANDO) ) { Actor_Kill(&this->actor); diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 2a69a1adaca..834d9fb9612 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -2073,7 +2073,7 @@ void Player_InitExplosiveIA(PlayState* play, Player* this) { this->actor.world.pos.y, this->actor.world.pos.z, 0, this->actor.shape.rot.y, 0, 0); if (spawnedActor != NULL) { if ((explosiveType != 0) && (play->bombchuBowlingStatus != 0)) { - if (!CVarGetInteger(CHEAT_CVAR("InfiniteAmmo"), 0)) { + if (!CVarGetInteger(CVAR_CHEAT("InfiniteAmmo"), 0)) { play->bombchuBowlingStatus--; } if (play->bombchuBowlingStatus == 0) { @@ -2493,10 +2493,10 @@ LinkAnimationHeader* func_808346C4(PlayState* play, Player* this) { if (this->unk_870 < 0.5f) { return D_808543A4[Player_HoldsTwoHandedWeapon(this) && - !(CVarGetInteger(CHEAT_CVAR("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK))]; + !(CVarGetInteger(CVAR_CHEAT("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK))]; } else { return D_808543AC[Player_HoldsTwoHandedWeapon(this) && - !(CVarGetInteger(CHEAT_CVAR("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK))]; + !(CVarGetInteger(CVAR_CHEAT("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK))]; } } @@ -2748,11 +2748,11 @@ s32 func_808350A4(PlayState* play, Player* this) { func_80834380(play, this, &item, &arrowType); if (gSaveContext.minigameState == 1) { - if (!CVarGetInteger(CHEAT_CVAR("InfiniteAmmo"), 0)) { + if (!CVarGetInteger(CVAR_CHEAT("InfiniteAmmo"), 0)) { play->interfaceCtx.hbaAmmo--; } } else if (play->shootingGalleryStatus != 0) { - if (!CVarGetInteger(CHEAT_CVAR("InfiniteAmmo"), 0)) { + if (!CVarGetInteger(CVAR_CHEAT("InfiniteAmmo"), 0)) { play->shootingGalleryStatus--; } } else { @@ -4225,7 +4225,7 @@ s32 func_8083816C(s32 arg0) { } void func_8083819C(Player* this, PlayState* play) { - if (this->currentShield == PLAYER_SHIELD_DEKU && (CVarGetInteger(CHEAT_CVAR("FireproofDekuShield"), 0) == 0)) { + if (this->currentShield == PLAYER_SHIELD_DEKU && (CVarGetInteger(CVAR_CHEAT("FireproofDekuShield"), 0) == 0)) { Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_SHIELD, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 1, true); Inventory_DeleteEquipment(play, EQUIP_TYPE_SHIELD); @@ -4338,18 +4338,18 @@ s32 func_808382DC(Player* this, PlayState* play) { if (this->unk_870 < 0.5f) { anim = D_808543BC[Player_HoldsTwoHandedWeapon(this) && - !(CVarGetInteger(CHEAT_CVAR("ShieldTwoHanded"), 0) && + !(CVarGetInteger(CVAR_CHEAT("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK))]; } else { anim = D_808543B4[Player_HoldsTwoHandedWeapon(this) && - !(CVarGetInteger(CHEAT_CVAR("ShieldTwoHanded"), 0) && + !(CVarGetInteger(CVAR_CHEAT("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK))]; } LinkAnimation_PlayOnce(play, &this->upperSkelAnime, anim); } else { Player_AnimPlayOnce(play, this, D_808543C4[Player_HoldsTwoHandedWeapon(this) && - !(CVarGetInteger(CHEAT_CVAR("ShieldTwoHanded"), 0) && + !(CVarGetInteger(CVAR_CHEAT("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK))]); } } @@ -4406,7 +4406,7 @@ s32 func_808382DC(Player* this, PlayState* play) { ((sp48 >= 0) && SurfaceType_IsWallDamage(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId) && (this->floorTypeTimer >= D_808544F4[sp48])) || - ((sp48 >= 0) && ((this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CHEAT_CVAR("SuperTunic"), 0) == 0) || + ((sp48 >= 0) && ((this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0) || (this->floorTypeTimer >= D_808544F4[sp48])))) { this->floorTypeTimer = 0; this->actor.colChkInfo.damage = 4; @@ -5225,7 +5225,7 @@ s32 func_8083A6AC(Player* this, PlayState* play) { if (BgCheck_EntityLineTest1(&play->colCtx, &this->actor.world.pos, &sp74, &sp68, &sp84, true, false, false, true, &sp80) && - ((ABS(sp84->normal.y) < 600) || (CVarGetInteger(CHEAT_CVAR("ClimbEverything"), 0) != 0))) { + ((ABS(sp84->normal.y) < 600) || (CVarGetInteger(CVAR_CHEAT("ClimbEverything"), 0) != 0))) { f32 nx = COLPOLY_GET_NORMAL(sp84->normal.x); f32 ny = COLPOLY_GET_NORMAL(sp84->normal.y); f32 nz = COLPOLY_GET_NORMAL(sp84->normal.z); @@ -8504,7 +8504,7 @@ void func_80842A28(PlayState* play, Player* this) { } void func_80842A88(PlayState* play, Player* this) { - if (CVarGetInteger(CHEAT_CVAR("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) { + if (CVarGetInteger(CVAR_CHEAT("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) { Inventory_ChangeAmmo(ITEM_STICK, -1); Player_UseItem(play, this, ITEM_NONE); } @@ -8512,7 +8512,7 @@ void func_80842A88(PlayState* play, Player* this) { s32 func_80842AC4(PlayState* play, Player* this) { if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && (this->unk_85C > 0.5f)) { - if (AMMO(ITEM_STICK) != 0 && CVarGetInteger(CHEAT_CVAR("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) { + if (AMMO(ITEM_STICK) != 0 && CVarGetInteger(CVAR_CHEAT("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) { EffectSsStick_Spawn(play, &this->bodyPartsPos[PLAYER_BODYPART_R_HAND], this->actor.shape.rot.y + 0x8000); this->unk_85C = 0.5f; @@ -8949,7 +8949,7 @@ static AnimSfxEntry D_808545F0[] = { }; void Player_Action_80843CEC(Player* this, PlayState* play) { - if (this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CHEAT_CVAR("SuperTunic"), 0) == 0) { + if (this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0) { if ((play->roomCtx.curRoom.behaviorType2 == ROOM_BEHAVIOR_TYPE2_3) || (sFloorType == 9) || ((func_80838144(sFloorType) >= 0) && !SurfaceType_IsWallDamage(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId))) { @@ -10654,7 +10654,7 @@ void Player_ProcessSceneCollision(PlayState* play, Player* this) { sTouchedWallFlags = func_80041DB8(&play->colCtx, this->actor.wallPoly, this->actor.wallBgId); // conflicts arise from these two being enabled at once, and with ClimbEverything on, FixVineFall is redundant anyway - if (CVarGetInteger("gFixVineFall", 0) && !CVarGetInteger(CHEAT_CVAR("ClimbEverything"), 0)) { + if (CVarGetInteger("gFixVineFall", 0) && !CVarGetInteger(CVAR_CHEAT("ClimbEverything"), 0)) { /* This fixes the "started climbing a wall and then immediately fell off" bug. * The main idea is if a climbing wall is detected, double-check that it will * still be valid once climbing begins by doing a second raycast with a small @@ -10723,7 +10723,7 @@ void Player_ProcessSceneCollision(PlayState* play, Player* this) { if ((this->actor.bgCheckFlags & 0x200) && (sShapeYawToTouchedWall < 0x3000)) { CollisionPoly* wallPoly = this->actor.wallPoly; - if ((ABS(wallPoly->normal.y) < 600) || (CVarGetInteger(CHEAT_CVAR("ClimbEverything"), 0) != 0)) { + if ((ABS(wallPoly->normal.y) < 600) || (CVarGetInteger(CVAR_CHEAT("ClimbEverything"), 0) != 0)) { f32 sp8C = COLPOLY_GET_NORMAL(wallPoly->normal.x); f32 sp88 = COLPOLY_GET_NORMAL(wallPoly->normal.y); f32 sp84 = COLPOLY_GET_NORMAL(wallPoly->normal.z); @@ -10914,7 +10914,7 @@ void Player_UpdateCamAndSeqModes(PlayState* play, Player* this) { seqMode = SEQ_MODE_STILL; } - if (play->actorCtx.targetCtx.bgmEnemy != NULL && !CVarGetInteger(AUDIO_CVAR("EnemyBGMDisable"), 0)) { + if (play->actorCtx.targetCtx.bgmEnemy != NULL && !CVarGetInteger(CVAR_AUDIO("EnemyBGMDisable"), 0)) { seqMode = SEQ_MODE_ENEMY; Audio_SetBgmEnemyVolume(sqrtf(play->actorCtx.targetCtx.bgmEnemy->xyzDistToPlayerSq)); } @@ -10934,7 +10934,7 @@ static Color_RGBA8 D_808547C0 = { 255, 50, 0, 0 }; void func_80848A04(PlayState* play, Player* this) { f32 temp; - if (CVarGetInteger(CHEAT_CVAR("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE) { + if (CVarGetInteger(CVAR_CHEAT("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE) { f32 temp2 = 1.0f; // Secondary temporary variable to use with the alleged draw flame function this->unk_860 = 200; // Keeps the stick's flame lit this->unk_85C = 1.0f; // Ensures the stick is the proper length @@ -10942,20 +10942,20 @@ void func_80848A04(PlayState* play, Player* this) { 0, 8); // I believe this draws the flame effect } - if (this->unk_85C == 0.0f && CVarGetInteger(CHEAT_CVAR("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) { + if (this->unk_85C == 0.0f && CVarGetInteger(CVAR_CHEAT("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) { Player_UseItem(play, this, 0xFF); return; } temp = 1.0f; - if (DECR(this->unk_860) == 0 && CVarGetInteger(CHEAT_CVAR("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) { + if (DECR(this->unk_860) == 0 && CVarGetInteger(CVAR_CHEAT("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) { Inventory_ChangeAmmo(ITEM_STICK, -1); this->unk_860 = 1; temp = 0.0f; this->unk_85C = temp; } else if (this->unk_860 > 200) { temp = (210 - this->unk_860) / 10.0f; - } else if (this->unk_860 < 20 && CVarGetInteger(CHEAT_CVAR("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) { + } else if (this->unk_860 < 20 && CVarGetInteger(CVAR_CHEAT("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) { temp = this->unk_860 / 20.0f; this->unk_85C = temp; } @@ -11001,7 +11001,7 @@ void Player_UpdateBodyBurn(PlayState* play, Player* this) { s32 sp58; s32 sp54; - if (this->currentTunic == PLAYER_TUNIC_GORON || CVarGetInteger(CHEAT_CVAR("SuperTunic"), 0) != 0) { + if (this->currentTunic == PLAYER_TUNIC_GORON || CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) != 0) { sp54 = 20; } else { sp54 = (s32)(this->linearVelocity * 0.4f) + 1; @@ -11256,7 +11256,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { func_808473D4(play, this); func_80836BEC(this, play); - if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && ((this->unk_860 != 0) || CVarGetInteger(CHEAT_CVAR("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE)) { + if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && ((this->unk_860 != 0) || CVarGetInteger(CVAR_CHEAT("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE)) { func_80848A04(play, this); } else if ((this->heldItemAction == PLAYER_IA_FISHING_POLE) && (this->unk_860 < 0)) { this->unk_860++; @@ -14374,7 +14374,7 @@ void Player_Action_8084FBF4(Player* this, PlayState* play) { s32 func_8084FCAC(Player* this, PlayState* play) { sControlInput = &play->state.input[0]; - if (CVarGetInteger("gDebugEnabled", 0) && + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && ((CHECK_BTN_ALL(sControlInput->cur.button, BTN_A | BTN_L | BTN_R) && CHECK_BTN_ALL(sControlInput->press.button, BTN_B)) || (CHECK_BTN_ALL(sControlInput->cur.button, BTN_L) && CHECK_BTN_ALL(sControlInput->press.button, BTN_DRIGHT)))) { diff --git a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c index 155462c3383..327c1dd11cf 100644 --- a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c +++ b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c @@ -1025,7 +1025,7 @@ void FileChoose_UpdateRandomizer() { return; } - if (!SpoilerFileExists(CVarGetString("gSpoilerLog", "")) && !CVarGetInteger(RANDOMIZER_SEED_CVAR("DontGenerateSpoiler"), 0)) { + if (!SpoilerFileExists(CVarGetString("gSpoilerLog", "")) && !CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0)) { CVarSetString("gSpoilerLog", ""); fileSelectSpoilerFileLoaded = false; } @@ -1053,7 +1053,7 @@ void FileChoose_UpdateRandomizer() { Randomizer_LoadEntranceOverrides(fileLoc, silent); fileSelectSpoilerFileLoaded = true; - if (SpoilerFileExists(CVarGetString("gSpoilerLog", "")) && CVarGetInteger(RANDOMIZER_SEED_CVAR("DontGenerateSpoiler"), 0)) { + if (SpoilerFileExists(CVarGetString("gSpoilerLog", "")) && CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0)) { remove(fileLoc); } } @@ -2945,7 +2945,7 @@ void FileChoose_LoadGame(GameState* thisx) { gSaveContext.fileNum = this->buttonIndex; gSaveContext.gameMode = 0; - if ((this->buttonIndex == FS_BTN_SELECT_FILE_1 && CVarGetInteger("gDebugEnabled", 0)) || this->buttonIndex == 0xFF) { + if ((this->buttonIndex == FS_BTN_SELECT_FILE_1 && CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) || this->buttonIndex == 0xFF) { if (this->buttonIndex == 0xFF) { Sram_InitDebugSave(); } else { @@ -3286,15 +3286,15 @@ void FileChoose_Main(GameState* thisx) { gSaveContext.skyboxTime += 0x10; } - if (CVarGetInteger(DEV_TOOLS_CVAR("SkipLogoTitle"), 0) && CVarGetInteger(DEV_TOOLS_CVAR("SaveFileID"), FASTFILE_1) <= FASTFILE_3 && !isFastFileIdIncompatible) { - if (Save_Exist(CVarGetInteger(DEV_TOOLS_CVAR("SaveFileID"), FASTFILE_1)) && FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(CVarGetInteger(DEV_TOOLS_CVAR("SaveFileID"), FASTFILE_1)))) { - this->buttonIndex = CVarGetInteger(DEV_TOOLS_CVAR("SaveFileID"), FASTFILE_1); + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("SkipLogoTitle"), 0) && CVarGetInteger(CVAR_DEVELOPER_TOOLS("SaveFileID"), FASTFILE_1) <= FASTFILE_3 && !isFastFileIdIncompatible) { + if (Save_Exist(CVarGetInteger(CVAR_DEVELOPER_TOOLS("SaveFileID"), FASTFILE_1)) && FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(CVarGetInteger(CVAR_DEVELOPER_TOOLS("SaveFileID"), FASTFILE_1)))) { + this->buttonIndex = CVarGetInteger(CVAR_DEVELOPER_TOOLS("SaveFileID"), FASTFILE_1); this->menuMode = FS_MENU_MODE_SELECT; this->selectMode = SM_LOAD_GAME; } else { isFastFileIdIncompatible = 1; } - } else if (CVarGetInteger(DEV_TOOLS_CVAR("SkipLogoTitle"), 0) && CVarGetInteger(DEV_TOOLS_CVAR("SaveFileID"), FASTFILE_1) == FASTFILE_MAP_SELECT) { + } else if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("SkipLogoTitle"), 0) && CVarGetInteger(CVAR_DEVELOPER_TOOLS("SaveFileID"), FASTFILE_1) == FASTFILE_MAP_SELECT) { this->buttonIndex = 0xFF; this->menuMode = FS_MENU_MODE_SELECT; this->selectMode = SM_LOAD_GAME; diff --git a/soh/src/overlays/gamestates/ovl_select/z_select.c b/soh/src/overlays/gamestates/ovl_select/z_select.c index dbc7e17969c..65c23b68547 100644 --- a/soh/src/overlays/gamestates/ovl_select/z_select.c +++ b/soh/src/overlays/gamestates/ovl_select/z_select.c @@ -1078,7 +1078,7 @@ void Select_PrintMenu(SelectContext* this, GfxPrint* printer) { GfxPrint_SetColor(printer, 200, 200, 55, 255); } - if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) { switch (gSaveContext.language) { case LANGUAGE_ENG: default: @@ -1105,7 +1105,7 @@ void Select_PrintMenu(SelectContext* this, GfxPrint* printer) { GfxPrint_SetColor(printer, 155, 55, 150, 255); // Small position hack of the OPT=X text since german Link's Age overlap if translated - if (CVarGetInteger("gDebugWarpScreenTranslation", 1) && gSaveContext.language == LANGUAGE_GER) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1) && gSaveContext.language == LANGUAGE_GER) { GfxPrint_SetPos(printer, 26, 26); } else { GfxPrint_SetPos(printer, 20, 26); @@ -1134,7 +1134,7 @@ void Better_Select_PrintMenu(SelectContext* this, GfxPrint* printer) { GfxPrint_SetColor(printer, 175, 175, 175, 255); } - if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) { switch (gSaveContext.language) { case LANGUAGE_ENG: default: @@ -1160,7 +1160,7 @@ void Better_Select_PrintMenu(SelectContext* this, GfxPrint* printer) { GfxPrint_SetColor(printer, 205, 100, 200, 255); GfxPrint_SetPos(printer, 3, 26); - if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) { switch (gSaveContext.language) { case LANGUAGE_ENG: default: @@ -1200,7 +1200,7 @@ void Select_PrintLoadingMessage(SelectContext* this, GfxPrint* printer) { GfxPrint_SetPos(printer, 10, 15); GfxPrint_SetColor(printer, 255, 255, 255, 255); randomMsg = Rand_ZeroOne() * ARRAY_COUNT(sLoadingMessages); - if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) { switch (gSaveContext.language) { case LANGUAGE_ENG: default: @@ -1231,7 +1231,7 @@ static BetterSceneSelectAgeLabels sBetterAgeLabels[] = { void Select_PrintAgeSetting(SelectContext* this, GfxPrint* printer, s32 age) { GfxPrint_SetPos(printer, 4, 26); GfxPrint_SetColor(printer, 255, 255, 55, 255); - if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) { switch (gSaveContext.language) { case LANGUAGE_ENG: default: @@ -1252,7 +1252,7 @@ void Select_PrintAgeSetting(SelectContext* this, GfxPrint* printer, s32 age) { void Better_Select_PrintAgeSetting(SelectContext* this, GfxPrint* printer, s32 age) { GfxPrint_SetPos(printer, 25, 25); GfxPrint_SetColor(printer, 100, 100, 100, 255); - if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) { switch (gSaveContext.language) { case LANGUAGE_ENG: case LANGUAGE_FRA: @@ -1268,7 +1268,7 @@ void Better_Select_PrintAgeSetting(SelectContext* this, GfxPrint* printer, s32 a } GfxPrint_SetColor(printer, 55, 200, 50, 255); - if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) { switch (gSaveContext.language) { case LANGUAGE_ENG: default: @@ -1304,7 +1304,7 @@ void Select_PrintCutsceneSetting(SelectContext* this, GfxPrint* printer, u16 csI }; char* label; - int lang = CVarGetInteger("gDebugWarpScreenTranslation", 1) ? gSaveContext.language + 1 : 0; + int lang = CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1) ? gSaveContext.language + 1 : 0; GfxPrint_SetPos(printer, 4, 25); GfxPrint_SetColor(printer, 255, 255, 55, 255); @@ -1367,7 +1367,7 @@ void Better_Select_PrintTimeSetting(SelectContext* this, GfxPrint* printer) { GfxPrint_SetColor(printer, 100, 100, 100, 255); if (gSaveContext.dayTime > 0xC000 || gSaveContext.dayTime < 0x4555) { - if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) { switch (gSaveContext.language) { case LANGUAGE_ENG: default: @@ -1384,7 +1384,7 @@ void Better_Select_PrintTimeSetting(SelectContext* this, GfxPrint* printer) { label = "Night"; } } else { - if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) { switch (gSaveContext.language) { case LANGUAGE_ENG: default: @@ -1401,7 +1401,7 @@ void Better_Select_PrintTimeSetting(SelectContext* this, GfxPrint* printer) { label = "Day"; } } - if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) { switch (gSaveContext.language) { case LANGUAGE_ENG: default: @@ -1436,7 +1436,7 @@ void Better_Select_PrintMQSetting(SelectContext* this, GfxPrint* printer) { GfxPrint_Printf(printer, "MQ:"); } - if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) { switch (gSaveContext.language) { case LANGUAGE_ENG: default: @@ -1533,7 +1533,7 @@ void Select_Draw(SelectContext* this) { void Select_Main(GameState* thisx) { SelectContext* this = (SelectContext*)thisx; - if (this->isBetterWarp != CVarGetInteger("gBetterDebugWarpScreen", 0)) { + if (this->isBetterWarp != CVarGetInteger(CVAR_DEVELOPER_TOOLS("BetterDebugWarpScreen"), 0)) { Select_SwitchBetterWarpMode(this, !this->isBetterWarp); } @@ -1639,5 +1639,5 @@ void Select_Init(GameState* thisx) { CVarClear("gBetterDebugWarpScreenMQMode"); CVarClear("gBetterDebugWarpScreenMQModeScene"); - Select_SwitchBetterWarpMode(this, CVarGetInteger("gBetterDebugWarpScreen", 0)); + Select_SwitchBetterWarpMode(this, CVarGetInteger(CVAR_DEVELOPER_TOOLS("BetterDebugWarpScreen"), 0)); } diff --git a/soh/src/overlays/gamestates/ovl_title/z_title.c b/soh/src/overlays/gamestates/ovl_title/z_title.c index b4f9a6744e6..59afae8a5e8 100644 --- a/soh/src/overlays/gamestates/ovl_title/z_title.c +++ b/soh/src/overlays/gamestates/ovl_title/z_title.c @@ -245,13 +245,13 @@ void Title_Main(GameState* thisx) { POLY_OPA_DISP = gfx; } - if (this->exit || CVarGetInteger(DEV_TOOLS_CVAR("SkipLogoTitle"), 0)) { + if (this->exit || CVarGetInteger(CVAR_DEVELOPER_TOOLS("SkipLogoTitle"), 0)) { gSaveContext.seqId = (u8)NA_BGM_DISABLED; gSaveContext.natureAmbienceId = 0xFF; gSaveContext.gameMode = 1; this->state.running = false; - if (gLoadFileSelect || CVarGetInteger(DEV_TOOLS_CVAR("SkipLogoTitle"), 0)) + if (gLoadFileSelect || CVarGetInteger(CVAR_DEVELOPER_TOOLS("SkipLogoTitle"), 0)) SET_NEXT_GAMESTATE(&this->state, FileChoose_Init, FileChooseContext); else SET_NEXT_GAMESTATE(&this->state, Opening_Init, OpeningContext); diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index 17de25ee4cf..d9d03d7cc82 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -756,7 +756,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) { for (rowStart = 0, j = 0, temp = 0, i = 0; i < 4; i++, rowStart += 4, j += 16) { gSPVertex(POLY_KAL_DISP++, &pauseCtx->equipVtx[j], 16, 0); - bool drawGreyItems = !CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0); + bool drawGreyItems = !CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0); if (LINK_AGE_IN_YEARS == YEARS_CHILD) { point = CUR_UPG_VALUE(sChildUpgrades[i]); if ((point != 0) && (CUR_UPG_VALUE(sChildUpgrades[i]) != 0)) { diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c index 68185ef306b..1060131abd9 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c @@ -340,7 +340,7 @@ void KaleidoScope_HandleItemCycles(PlayState* play) { gSlotAgeReqs[SLOT_TRADE_CHILD] = ( ((CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA) && CVarGetInteger("gAdultBunnyHood", 0)) || - CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0) + CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0) ) && INV_CONTENT(ITEM_TRADE_CHILD) == ITEM_MASK_BUNNY ? AGE_REQ_NONE @@ -349,7 +349,7 @@ void KaleidoScope_HandleItemCycles(PlayState* play) { //also update the age requirement for the bunny hood itself gItemAgeReqs[ITEM_MASK_BUNNY] = ((CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA) && CVarGetInteger("gAdultBunnyHood", 0)) || - CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0) + CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0) ? AGE_REQ_NONE : AGE_REQ_CHILD; diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h index 583cbe942f4..6c5fe7ba809 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h @@ -20,9 +20,9 @@ extern u8 gAreaGsFlags[]; #define AGE_REQ_CHILD LINK_AGE_CHILD #define AGE_REQ_NONE 9 -#define CHECK_AGE_REQ_EQUIP(i, j) (CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0) || (gEquipAgeReqs[i][j] == AGE_REQ_NONE) || (gEquipAgeReqs[i][j] == ((void)0, gSaveContext.linkAge))) -#define CHECK_AGE_REQ_SLOT(slotIndex) (CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0) || (gSlotAgeReqs[slotIndex] == AGE_REQ_NONE) || gSlotAgeReqs[slotIndex] == ((void)0, gSaveContext.linkAge)) -#define CHECK_AGE_REQ_ITEM(itemIndex) (CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0) || (gItemAgeReqs[itemIndex] == AGE_REQ_NONE) || (gItemAgeReqs[itemIndex] == gSaveContext.linkAge)) +#define CHECK_AGE_REQ_EQUIP(i, j) (CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0) || (gEquipAgeReqs[i][j] == AGE_REQ_NONE) || (gEquipAgeReqs[i][j] == ((void)0, gSaveContext.linkAge))) +#define CHECK_AGE_REQ_SLOT(slotIndex) (CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0) || (gSlotAgeReqs[slotIndex] == AGE_REQ_NONE) || gSlotAgeReqs[slotIndex] == ((void)0, gSaveContext.linkAge)) +#define CHECK_AGE_REQ_ITEM(itemIndex) (CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0) || (gItemAgeReqs[itemIndex] == AGE_REQ_NONE) || (gItemAgeReqs[itemIndex] == gSaveContext.linkAge)) void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx); s32 KaleidoScope_UpdateQuestStatusPoint(PauseContext* pauseCtx, s32 point); diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c index 45f64437219..12fa4d19e75 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c @@ -1084,7 +1084,7 @@ void KaleidoScope_HandlePageToggles(PauseContext* pauseCtx, Input* input) { PageLeft_BTN = BTN_L; } - if (CVarGetInteger("gDebugEnabled", 0) && (pauseCtx->debugState == 0) && CHECK_BTN_ALL(input->press.button, Debug_BTN)) { + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && (pauseCtx->debugState == 0) && CHECK_BTN_ALL(input->press.button, Debug_BTN)) { pauseCtx->debugState = 1; return; } @@ -1963,7 +1963,7 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) { POLY_KAL_DISP = KaleidoScope_QuadTextureIA4(POLY_KAL_DISP, pauseCtx->nameSegment, 128, 16, 0); } - if (pauseCtx->pageIndex == PAUSE_MAP && CVarGetInteger(DEV_TOOLS_CVAR("SkulltulaDebugEnabled"), 0) != 0) { + if (pauseCtx->pageIndex == PAUSE_MAP && CVarGetInteger(CVAR_DEVELOPER_TOOLS("SkulltulaDebugEnabled"), 0) != 0) { if (YREG(7) != 0) { osSyncPrintf(VT_FGCOL(YELLOW)); osSyncPrintf("キンスタ数(%d) Get_KIN_STA=%x (%x) (%x)\n", YREG(6), GET_GS_FLAGS(YREG(6)), @@ -3994,7 +3994,7 @@ void KaleidoScope_Update(PlayState* play) // Boss Rush skips past the "Save?" window when pressing B while paused. if (CHECK_BTN_ALL(input->press.button, BTN_START) || (CHECK_BTN_ALL(input->press.button, BTN_B) && IS_BOSS_RUSH)) { - if (CVarGetInteger(CHEAT_CVAR("EasyPauseBuffer"), 0) || CVarGetInteger(CHEAT_CVAR("EasyInputBuffer"), 0)) { + if (CVarGetInteger(CVAR_CHEAT("EasyPauseBuffer"), 0) || CVarGetInteger(CVAR_CHEAT("EasyInputBuffer"), 0)) { // Easy pause buffer is 13 frames, 12 for kaledio to end, and one more to advance a single frame CVarSetInteger("gCheatEasyPauseBufferTimer", 13); }