Step 3 of CVar macro/sectionalizing: Dev Tools, Cheats, Audio Editor, Remote (#4030)

* Swapped Audio Editor CVars.

* Swapped Cheat CVars.

* Swapped Developer Tools CVars. Also a couple General CVars.

* Added REMOTE_CVAR.
Swapped Remote CVars.

* Missed an include.
This commit is contained in:
Malkierian 2024-04-20 11:56:32 -07:00 committed by GitHub
parent 694a876a70
commit e2622af004
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
37 changed files with 235 additions and 229 deletions

View File

@ -5,6 +5,7 @@
#include <Utils/StringHelper.h>
#include <libultraship/bridge.h>
#include <libultraship/classes.h>
#include <soh/OTRGlobals.h>
#include <locale>
#include <filesystem>
@ -330,11 +331,13 @@ AudioCollection::AudioCollection() {
}
std::string AudioCollection::GetCvarKey(std::string sfxKey) {
return "gAudioEditor.ReplacedSequences." + sfxKey + ".value";
auto prefix = AUDIO_CVAR("ReplacedSequences.");
return prefix + sfxKey + ".value";
}
std::string AudioCollection::GetCvarLockKey(std::string sfxKey) {
return "gAudioEditor.ReplacedSequences." + sfxKey + ".locked";
auto prefix = std::string(AUDIO_CVAR("ReplacedSequences."));
return prefix + sfxKey + ".locked";
}
void AudioCollection::AddToCollection(char* otrPath, uint16_t seqNum) {
@ -362,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("gAudioEditor.ReplacedSequences.NA_BGM_FIELD_LOGIC.value", NA_BGM_FIELD_LOGIC) != NA_BGM_FIELD_LOGIC) {
if (CVarGetInteger(AUDIO_CVAR("ReplacedSequences.NA_BGM_FIELD_LOGIC.value"), NA_BGM_FIELD_LOGIC) != NA_BGM_FIELD_LOGIC) {
seqId = NA_BGM_FIELD_LOGIC;
}
}
@ -381,7 +384,7 @@ uint16_t AudioCollection::GetReplacementSequence(uint16_t seqId) {
}
void AudioCollection::RemoveFromShufflePool(SequenceInfo* seqInfo) {
const std::string cvarKey = "gAudioEditor.Excluded." + seqInfo->sfxKey;
const std::string cvarKey = std::string(AUDIO_CVAR("Excluded.")) + seqInfo->sfxKey;
excludedSequences.insert(seqInfo);
includedSequences.erase(seqInfo);
CVarSetInteger(cvarKey.c_str(), 1);
@ -389,7 +392,7 @@ void AudioCollection::RemoveFromShufflePool(SequenceInfo* seqInfo) {
}
void AudioCollection::AddToShufflePool(SequenceInfo* seqInfo) {
const std::string cvarKey = "gAudioEditor.Excluded." + seqInfo->sfxKey;
const std::string cvarKey = std::string(AUDIO_CVAR("Excluded.")) + seqInfo->sfxKey;
includedSequences.insert(seqInfo);
excludedSequences.erase(seqInfo);
CVarClear(cvarKey.c_str());
@ -401,7 +404,7 @@ void AudioCollection::InitializeShufflePool() {
for (auto& [seqId, seqInfo] : sequenceMap) {
if (!seqInfo.canBeUsedAsReplacement) continue;
const std::string cvarKey = "gAudioEditor.Excluded." + seqInfo.sfxKey;
const std::string cvarKey = std::string(AUDIO_CVAR("Excluded.")) + seqInfo.sfxKey;
if (CVarGetInteger(cvarKey.c_str(), 0)) {
excludedSequences.insert(&seqInfo);
} else {

View File

@ -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("gAudioEditor.Playing", 0) == sequenceId) {
if (CVarGetInteger(AUDIO_CVAR("Playing"), 0) == sequenceId) {
if (ImGui::Button(stopButton.c_str())) {
func_800F5C2C();
CVarSetInteger("gAudioEditor.Playing", 0);
CVarSetInteger(AUDIO_CVAR("Playing"), 0);
}
UIWidgets::Tooltip("Stop Preview");
} else {
if (ImGui::Button(previewButton.c_str())) {
if (CVarGetInteger("gAudioEditor.Playing", 0) != 0) {
if (CVarGetInteger(AUDIO_CVAR("Playing"), 0) != 0) {
func_800F5C2C();
CVarSetInteger("gAudioEditor.Playing", 0);
CVarSetInteger(AUDIO_CVAR("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("gAudioEditor.Playing", sequenceId);
CVarSetInteger(AUDIO_CVAR("Playing"), sequenceId);
}
}
}
@ -411,7 +411,7 @@ void DrawTypeChip(SeqType type) {
void AudioEditorRegisterOnSceneInitHook() {
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneInit>([](int16_t sceneNum) {
if (CVarGetInteger("gAudioEditor.RandomizeAllOnNewScene", 0)) {
if (CVarGetInteger(AUDIO_CVAR("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", "gEnemyBGMDisable");
UIWidgets::EnhancementCheckbox("Disable Enemy Proximity Music", AUDIO_CVAR("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", "gLostWoodsConsistentVolume");
UIWidgets::EnhancementCheckbox("Disable Leading Music in Lost Woods", AUDIO_CVAR("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", "gSeqNameOverlay");
UIWidgets::EnhancementCheckbox("Display Sequence Name on Overlay", AUDIO_CVAR("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",
"gSeqNameOverlayDuration", 1, 10, "", 5);
AUDIO_CVAR("SeqNameOverlayDuration"), 1, 10, "", 5);
ImGui::PopItemWidth();
ImGui::NewLine();
ImGui::PopItemWidth();
UIWidgets::EnhancementSliderFloat("Link's voice pitch multiplier: %.1f %%", "##linkVoiceFreqMultiplier",
"gLinkVoiceFreqMultiplier", 0.4, 2.5, "", 1.0, true, true);
AUDIO_CVAR("LinkVoiceFreqMultiplier"), 0.4, 2.5, "", 1.0, true, true);
ImGui::SameLine();
const std::string resetButton = "Reset##linkVoiceFreqMultiplier";
if (ImGui::Button(resetButton.c_str())) {
CVarSetFloat("gLinkVoiceFreqMultiplier", 1.0f);
CVarSetFloat(AUDIO_CVAR("LinkVoiceFreqMultiplier"), 1.0f);
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
}
ImGui::NewLine();
UIWidgets::EnhancementCheckbox("Randomize All Music and Sound Effects on New Scene", "gAudioEditor.RandomizeAllOnNewScene");
UIWidgets::EnhancementCheckbox("Randomize All Music and Sound Effects on New Scene", AUDIO_CVAR("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", "gExperimentalOctaveDrop");
UIWidgets::EnhancementCheckbox("Lower Octaves of Unplayable High Notes", AUDIO_CVAR("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 "

View File

@ -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("gDisableChangingSettings", 0));
ImGui::BeginDisabled(CVarGetInteger(SETTING_CVAR("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)) {

View File

@ -13,6 +13,7 @@
#include <libultraship/libultraship.h>
#include "soh/UIWidgets.hpp"
#include "soh/OTRGlobals.h"
extern "C" {
#include <z64.h>
@ -1344,7 +1345,7 @@ void Reset_Option_Double(const char* Button_Title, const char* name) {
}
}
void DrawSillyTab() {
ImGui::BeginDisabled(CVarGetInteger("gDisableChangingSettings", 0));
ImGui::BeginDisabled(CVarGetInteger(SETTING_CVAR("DisableChanges"), 0));
if (CVarGetInteger("gLetItSnow", 0)) {
if (UIWidgets::EnhancementCheckbox("Let It Snow", "gLetItSnow")) {
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();

View File

@ -8,6 +8,7 @@
#include <tuple>
#include <type_traits>
#include <libultraship/libultraship.h>
#include "soh/OTRGlobals.h"
// MARK: - Remote
@ -16,7 +17,7 @@ void GameInteractor::EnableRemoteInteractor() {
return;
}
if (SDLNet_ResolveHost(&remoteIP, CVarGetString("gRemote.IP", "127.0.0.1"), CVarGetInteger("gRemote.Port", 43384)) == -1) {
if (SDLNet_ResolveHost(&remoteIP, CVarGetString(REMOTE_CVAR("IP"), "127.0.0.1"), CVarGetInteger(REMOTE_CVAR("Port"), 43384)) == -1) {
SPDLOG_ERROR("[GameInteractor] SDLNet_ResolveHost: {}", SDLNet_GetError());
}

View File

@ -66,7 +66,7 @@ void ReloadSceneTogglingLinkAge() {
void RegisterInfiniteMoney() {
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
if (!GameInteractor::IsSaveLoaded(true)) return;
if (CVarGetInteger("gInfiniteMoney", 0) != 0) {
if (CVarGetInteger(CHEAT_CVAR("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<GameInteractor::OnGameFrameUpdate>([]() {
if (!GameInteractor::IsSaveLoaded(true)) return;
if (CVarGetInteger("gInfiniteHealth", 0) != 0) {
if (CVarGetInteger(CHEAT_CVAR("InfiniteHealth"), 0) != 0) {
if (gSaveContext.health < gSaveContext.healthCapacity) {
gSaveContext.health = gSaveContext.healthCapacity;
}
@ -88,7 +88,7 @@ void RegisterInfiniteHealth() {
void RegisterInfiniteAmmo() {
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
if (!GameInteractor::IsSaveLoaded(true)) return;
if (CVarGetInteger("gInfiniteAmmo", 0) != 0) {
if (CVarGetInteger(CHEAT_CVAR("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<GameInteractor::OnGameFrameUpdate>([]() {
if (!GameInteractor::IsSaveLoaded(true)) return;
if (CVarGetInteger("gInfiniteMagic", 0) != 0) {
if (CVarGetInteger(CHEAT_CVAR("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<GameInteractor::OnGameFrameUpdate>([]() {
if (!GameInteractor::IsSaveLoaded(true)) return;
if (CVarGetInteger("gInfiniteNayru", 0) != 0) {
if (CVarGetInteger(CHEAT_CVAR("InfiniteNayru"), 0) != 0) {
gSaveContext.nayrusLoveTimer = 0x44B;
}
});
@ -146,7 +146,7 @@ void RegisterMoonJumpOnL() {
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
if (!GameInteractor::IsSaveLoaded(true)) return;
if (CVarGetInteger("gMoonJumpOnL", 0) != 0) {
if (CVarGetInteger(CHEAT_CVAR("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<GameInteractor::OnGameFrameUpdate>([]() {
if (!GameInteractor::IsSaveLoaded(true)) return;
if (CVarGetInteger("gEzISG", 0) != 0) {
if (CVarGetInteger(CHEAT_CVAR("EasyISG"), 0) != 0) {
Player* player = GET_PLAYER(gPlayState);
player->meleeWeaponState = 1;
}
@ -173,7 +173,7 @@ void RegisterEzQPA() {
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
if (!GameInteractor::IsSaveLoaded(true)) return;
if (CVarGetInteger("gEzQPA", 0) != 0) {
if (CVarGetInteger(CHEAT_CVAR("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<GameInteractor::OnGameFrameUpdate>([]() {
if (!GameInteractor::IsSaveLoaded(true)) return;
if (CVarGetInteger("gNoRestrictItems", 0) != 0) {
if (CVarGetInteger(CHEAT_CVAR("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<GameInteractor::OnGameFrameUpdate>([]() {
if (CVarGetInteger("gFreezeTime", 0) != 0) {
if (CVarGetInteger(CHEAT_CVAR("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("gSwitchAge");
CVarClear(GENERAL_CVAR("SwitchAge"));
warped = false;
return;
}
@ -224,7 +224,7 @@ void RegisterSwitchAge() {
static RoomContext* roomCtx;
static s32 roomNum;
if (CVarGetInteger("gSwitchAge", 0) && !warped) {
if (CVarGetInteger(GENERAL_CVAR("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("gSwitchAge");
CVarClear(GENERAL_CVAR("SwitchAge"));
}
});
}

View File

@ -298,51 +298,51 @@ const std::vector<const char*> cheatCvars = {
"gCustomizeShootingGallery",
"gCustomizeBombchuBowling",
"gCustomizeFishing",
"gInfiniteAmmo",
"gInfiniteEpona",
"gInfiniteHealth",
"gInfiniteMagic",
"gInfiniteMoney",
"gInfiniteNayru",
"gNoClip",
"gClimbEverything",
"gHookshotEverything",
"gCheatHookshotReachMultiplier",
"gMoonJumpOnL",
"gSuperTunic",
"gEzISG",
"gEzQPA",
"gTimelessEquipment",
"gCheatEasyPauseBufferEnabled",
"gCheatEasyInputBufferingEnabled",
"gNoRestrictItems",
"gFreezeTime",
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"),
"gPrevTime",
"gDropsDontDie",
"gFireproofDekuShield",
"gShieldTwoHanded",
"gTimeSync",
CHEAT_CVAR("DropsDontDie"),
CHEAT_CVAR("FireproofDekuShield"),
CHEAT_CVAR("ShieldTwoHanded"),
CHEAT_CVAR("TimeSync"),
"gDebugEnabled",
"gSkulltulaDebugEnabled",
"gSkipLogoTitle",
"gSaveFileID",
"gEnableBetaQuest",
DEV_TOOLS_CVAR("SkulltulaDebugEnabled"),
DEV_TOOLS_CVAR("SkipLogoTitle"),
DEV_TOOLS_CVAR("SaveFileID"),
CHEAT_CVAR("EnableBetaQuest"),
"gBetterDebugWarpScreen",
"gSwitchAge",
GENERAL_CVAR("SwitchAge"),
"gSwitchTimeline",
"gNoRedeadFreeze",
"gNoKeeseGuayTarget",
"gBombTimerMultiplier",
"gNoFishDespawn",
"gNoBugsDespawn",
CHEAT_CVAR("NoRedeadFreeze"),
CHEAT_CVAR("NoKeeseGuayTarget"),
CHEAT_CVAR("BombTimerMultiplier"),
CHEAT_CVAR("NoFishDespawn"),
CHEAT_CVAR("NoBugsDespawn"),
"gWalkModifierDoesntChangeJump",
"gStatsEnabled",
"gSaveStatesEnabled",
"gSaveStatePromise",
CHEAT_CVAR("SaveStatesEnabled"),
CHEAT_CVAR("SaveStatePromise"),
"gRegEditEnabled",
"gPreset0",
"gPreset1",
"gDekuStickCheat",
CHEAT_CVAR("DekuStick"),
"gDebugWarpScreenTranslation",
"gDebugSaveFileMode",
"gCosmetics.Link_BodyScale.Changed",
@ -899,7 +899,7 @@ const std::vector<PresetEntry> spockRacePresetEntries = {
PRESET_ENTRY_S32("gChildMinimumWeightFish", 3),
PRESET_ENTRY_S32("gGoronPot", 1),
PRESET_ENTRY_S32("gForgeTime", 0),
PRESET_ENTRY_S32("gCheatEasyPauseBufferEnabled", 1),
PRESET_ENTRY_S32(CHEAT_CVAR("EasyPauseBuffer"), 1),
PRESET_ENTRY_S32("gDampeAllNight", 1),
PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("10GSHint"), 1),
PRESET_ENTRY_S32(RANDOMIZER_SEED_CVAR("20GSHint"), 1),
@ -947,7 +947,7 @@ const std::vector<PresetEntry> spockRaceNoLogicPresetEntries = {
PRESET_ENTRY_S32("gAdultBunnyHood", 1),
PRESET_ENTRY_S32("gAdultMinimumWeightFish", 6),
PRESET_ENTRY_S32("gAssignableTunicsAndBoots", 1),
PRESET_ENTRY_S32("gCheatEasyPauseBufferEnabled", 1),
PRESET_ENTRY_S32(CHEAT_CVAR("EasyPauseBuffer"), 1),
PRESET_ENTRY_S32("gChildMinimumWeightFish", 3),
PRESET_ENTRY_S32("gClimbSpeed", 4),
PRESET_ENTRY_S32("gCosmetics.Goron_NeckLength", 1000),

View File

@ -3149,7 +3149,7 @@ void RandomizerSettingsWindow::DrawElement() {
UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
}
ImGui::BeginDisabled(CVarGetInteger("gDisableChangingSettings", 0));
ImGui::BeginDisabled(CVarGetInteger(SETTING_CVAR("DisableChanges"), 0));
DrawPresetSelector(PRESET_TYPE_RANDOMIZER);
ImGui::EndDisabled();
@ -3192,7 +3192,7 @@ void RandomizerSettingsWindow::DrawElement() {
UIWidgets::PaddedSeparator();
ImGui::BeginDisabled(CVarGetInteger("gDisableChangingSettings", 0));
ImGui::BeginDisabled(CVarGetInteger(SETTING_CVAR("DisableChanges"), 0));
ImGuiWindow* window = ImGui::GetCurrentWindow();
static ImVec2 cellPadding(8.0f, 8.0f);

View File

@ -1148,8 +1148,8 @@ extern "C" void InitOTR() {
srand(now);
#ifdef ENABLE_REMOTE_CONTROL
SDLNet_Init();
if (CVarGetInteger("gRemote.Enabled", 0)) {
switch (CVarGetInteger("gRemote.Scheme", GI_SCHEME_SAIL)) {
if (CVarGetInteger(REMOTE_CVAR("Enabled"), 0)) {
switch (CVarGetInteger(REMOTE_CVAR("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("gRemote.Enabled", 0)) {
switch (CVarGetInteger("gRemote.Scheme", GI_SCHEME_SAIL)) {
if (CVarGetInteger(REMOTE_CVAR("Enabled"), 0)) {
switch (CVarGetInteger(REMOTE_CVAR("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("gSaveStatesEnabled", 0) == 0) {
if (CVarGetInteger(CHEAT_CVAR("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("gSaveStatesEnabled", 0) == 0) {
if (CVarGetInteger(CHEAT_CVAR("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("gSaveStatesEnabled", 0) == 0) {
if (CVarGetInteger(CHEAT_CVAR("SaveStatesEnabled"), 0) == 0) {
LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->
TextDrawNotification(6.0f, true, "Save states not enabled. Check Cheats Menu.");
return;

View File

@ -81,6 +81,7 @@ uint32_t IsGameMasterQuest();
#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
#ifndef __cplusplus
void InitOTR(void);

View File

@ -547,7 +547,7 @@ extern std::shared_ptr<GameplayStatsWindow> mGameplayStatsWindow;
void DrawEnhancementsMenu() {
if (ImGui::BeginMenu("Enhancements"))
{
ImGui::BeginDisabled(CVarGetInteger("gDisableChangingSettings", 0));
ImGui::BeginDisabled(CVarGetInteger(SETTING_CVAR("DisableChanges"), 0));
DrawPresetSelector(PRESET_TYPE_ENHANCEMENTS);
@ -1430,7 +1430,7 @@ void DrawEnhancementsMenu() {
void DrawCheatsMenu() {
if (ImGui::BeginMenu("Cheats"))
{
ImGui::BeginDisabled(CVarGetInteger("gDisableChangingSettings", 0));
ImGui::BeginDisabled(CVarGetInteger(SETTING_CVAR("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", "gSuperTunic", true, false);
UIWidgets::PaddedEnhancementCheckbox("Super Tunic", CHEAT_CVAR("SuperTunic"), true, false);
UIWidgets::Tooltip("Makes every tunic have the effects of every other tunic");
UIWidgets::PaddedEnhancementCheckbox("Easy ISG", "gEzISG", true, false);
UIWidgets::PaddedEnhancementCheckbox("Easy ISG", CHEAT_CVAR("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", "gEzQPA", true, false);
UIWidgets::PaddedEnhancementCheckbox("Easy QPA", CHEAT_CVAR("EasyQPA"), true, false);
UIWidgets::Tooltip("Gives you the glitched damage value of the quick put away glitch.");
UIWidgets::PaddedEnhancementCheckbox("Timeless Equipment", "gTimelessEquipment", true, false);
UIWidgets::PaddedEnhancementCheckbox("Timeless Equipment", CHEAT_CVAR("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", "gNoRestrictItems", true, false);
UIWidgets::PaddedEnhancementCheckbox("Unrestricted Items", CHEAT_CVAR("NoRestrictItems"), true, false);
UIWidgets::Tooltip("Allows you to use any item at any location");
UIWidgets::PaddedEnhancementCheckbox("Fireproof Deku Shield", "gFireproofDekuShield", true, false);
UIWidgets::PaddedEnhancementCheckbox("Fireproof Deku Shield", CHEAT_CVAR("FireproofDekuShield"), true, false);
UIWidgets::Tooltip("Prevents the Deku Shield from burning on contact with fire");
UIWidgets::PaddedEnhancementCheckbox("Shield with Two-Handed Weapons", "gShieldTwoHanded", true, false);
UIWidgets::PaddedEnhancementCheckbox("Shield with Two-Handed Weapons", CHEAT_CVAR("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("gDekuStickCheat", DekuStickCheat, DEKU_STICK_NORMAL);
UIWidgets::EnhancementCombobox(CHEAT_CVAR("DekuStick"), DekuStickCheat, DEKU_STICK_NORMAL);
UIWidgets::Spacer(2.0f);
UIWidgets::EnhancementSliderFloat("Bomb Timer Multiplier: %.2fx", "##gBombTimerMultiplier", "gBombTimerMultiplier", 0.1f, 5.0f, "", 1.0f, false);
UIWidgets::PaddedEnhancementCheckbox("Hookshot Everything", "gHookshotEverything", true, false);
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::Tooltip("Makes every surface in the game hookshot-able");
UIWidgets::Spacer(0);
UIWidgets::EnhancementSliderFloat("Hookshot Reach Multiplier: %.2fx", "##gCheatHookshotReachMultiplier", "gCheatHookshotReachMultiplier", 1.0f, 5.0f, "", 1.0f, false);
UIWidgets::EnhancementSliderFloat("Hookshot Reach Multiplier: %.2fx", "##gCheatHookshotReachMultiplier", CHEAT_CVAR("HookshotReachMultiplier"), 1.0f, 5.0f, "", 1.0f, false);
UIWidgets::Spacer(2.0f);
if (ImGui::Button("Change Age")) {
CVarSetInteger("gSwitchAge", 1);
CVarSetInteger(GENERAL_CVAR("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", "gInfiniteMoney");
UIWidgets::PaddedEnhancementCheckbox("Health", "gInfiniteHealth", true, false);
UIWidgets::PaddedEnhancementCheckbox("Ammo", "gInfiniteAmmo", true, false);
UIWidgets::PaddedEnhancementCheckbox("Magic", "gInfiniteMagic", true, false);
UIWidgets::PaddedEnhancementCheckbox("Nayru's Love", "gInfiniteNayru", true, false);
UIWidgets::PaddedEnhancementCheckbox("Epona Boost", "gInfiniteEpona", true, false);
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);
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", "gSaveStatePromise", true,
if (UIWidgets::PaddedEnhancementCheckbox("I promise I have read the warning", CHEAT_CVAR("SaveStatePromise"), true,
false)) {
CVarSetInteger("gSaveStatesEnabled", 0);
CVarSetInteger(CHEAT_CVAR("SaveStatesEnabled"), 0);
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
}
if (CVarGetInteger("gSaveStatePromise", 0) == 1) {
UIWidgets::PaddedEnhancementCheckbox("I understand, enable save states", "gSaveStatesEnabled", true,
if (CVarGetInteger(CHEAT_CVAR("SaveStatePromise"), 0) == 1) {
UIWidgets::PaddedEnhancementCheckbox("I understand, enable save states", CHEAT_CVAR("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", "gNoClip", true, false);
UIWidgets::PaddedEnhancementCheckbox("No Clip", CHEAT_CVAR("NoClip"), true, false);
UIWidgets::Tooltip("Allows you to walk through walls");
UIWidgets::PaddedEnhancementCheckbox("Climb Everything", "gClimbEverything", true, false);
UIWidgets::PaddedEnhancementCheckbox("Climb Everything", CHEAT_CVAR("ClimbEverything"), true, false);
UIWidgets::Tooltip("Makes every surface in the game climbable");
UIWidgets::PaddedEnhancementCheckbox("Moon Jump on L", "gMoonJumpOnL", true, false);
UIWidgets::PaddedEnhancementCheckbox("Moon Jump on L", CHEAT_CVAR("MoonJumpOnL"), true, false);
UIWidgets::Tooltip("Holding L makes you float into the air");
UIWidgets::PaddedEnhancementCheckbox("Easy Frame Advancing", "gCheatEasyPauseBufferEnabled", true, false);
UIWidgets::PaddedEnhancementCheckbox("Easy Frame Advancing", CHEAT_CVAR("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("gCheatEasyPauseBufferEnabled", 0);
UIWidgets::PaddedEnhancementCheckbox("Easy Input Buffering", "gCheatEasyInputBufferingEnabled", true, false, bEasyFrameAdvanceEnabled, "Forced enabled when Easy Frame Advancing is enabled", UIWidgets::CheckboxGraphics::Checkmark);
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);
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", "gDropsDontDie", true, false);
UIWidgets::PaddedEnhancementCheckbox("Drops Don't Despawn", CHEAT_CVAR("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", "gNoFishDespawn", true, false);
UIWidgets::PaddedEnhancementCheckbox("Fish Don't despawn", CHEAT_CVAR("NoFishDespawn"), true, false);
UIWidgets::Tooltip("Prevents fish from automatically despawning after a while when dropped");
UIWidgets::PaddedEnhancementCheckbox("Bugs Don't despawn", "gNoBugsDespawn", true, false);
UIWidgets::PaddedEnhancementCheckbox("Bugs Don't despawn", CHEAT_CVAR("NoBugsDespawn"), true, false);
UIWidgets::Tooltip("Prevents bugs from automatically despawning after a while when dropped");
UIWidgets::PaddedEnhancementCheckbox("Freeze Time", "gFreezeTime", true, false);
UIWidgets::PaddedEnhancementCheckbox("Freeze Time", CHEAT_CVAR("FreezeTime"), true, false);
UIWidgets::Tooltip("Freezes the time of day");
UIWidgets::PaddedEnhancementCheckbox("Time Sync", "gTimeSync", true, false);
UIWidgets::PaddedEnhancementCheckbox("Time Sync", CHEAT_CVAR("TimeSync"), true, false);
UIWidgets::Tooltip("This syncs the ingame time with the real world time");
UIWidgets::PaddedEnhancementCheckbox("No ReDead/Gibdo Freeze", "gNoRedeadFreeze", true, false);
UIWidgets::PaddedEnhancementCheckbox("No ReDead/Gibdo Freeze", CHEAT_CVAR("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", "gNoKeeseGuayTarget", true, false);
UIWidgets::PaddedEnhancementCheckbox("Keese/Guay don't target you", CHEAT_CVAR("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("gEnableBetaQuest", 0);
static int32_t betaQuestEnabled = CVarGetInteger(CHEAT_CVAR("EnableBetaQuest"), 0);
static int32_t lastBetaQuestEnabled = betaQuestEnabled;
static int32_t betaQuestWorld = CVarGetInteger("gBetaQuestWorld", 0xFFEF);
static int32_t betaQuestWorld = CVarGetInteger(CHEAT_CVAR("BetaQuestWorld"), 0xFFEF);
static int32_t lastBetaQuestWorld = betaQuestWorld;
if (!isBetaQuestEnabled) {
UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
}
UIWidgets::PaddedEnhancementCheckbox("Enable Beta Quest", "gEnableBetaQuest", true, false);
UIWidgets::PaddedEnhancementCheckbox("Enable Beta Quest", CHEAT_CVAR("EnableBetaQuest"), true, false);
UIWidgets::Tooltip("Turns on OoT Beta Quest. *WARNING* This will reset your game.");
betaQuestEnabled = CVarGetInteger("gEnableBetaQuest", 0);
betaQuestEnabled = CVarGetInteger(CHEAT_CVAR("EnableBetaQuest"), 0);
if (betaQuestEnabled) {
if (betaQuestEnabled != lastBetaQuestEnabled) {
betaQuestWorld = 0;
@ -1588,15 +1588,15 @@ void DrawCheatsMenu() {
}
else {
lastBetaQuestWorld = betaQuestWorld = 0xFFEF;
CVarClear("gBetaQuestWorld");
CVarClear(CHEAT_CVAR("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("gEnableBetaQuest", betaQuestEnabled);
CVarSetInteger("gBetaQuestWorld", betaQuestWorld);
CVarSetInteger(CHEAT_CVAR("EnableBetaQuest"), betaQuestEnabled);
CVarSetInteger(CHEAT_CVAR("BetaQuestWorld"), betaQuestWorld);
std::reinterpret_pointer_cast<LUS::ConsoleWindow>(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->Dispatch("reset");
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
@ -1624,15 +1624,15 @@ extern std::shared_ptr<MessageViewer> mMessageViewerWindow;
void DrawDeveloperToolsMenu() {
if (ImGui::BeginMenu("Developer Tools")) {
ImGui::BeginDisabled(CVarGetInteger("gDisableChangingSettings", 0));
ImGui::BeginDisabled(CVarGetInteger(SETTING_CVAR("DisableChanges"), 0));
UIWidgets::EnhancementCheckbox("OoT Debug Mode", "gDebugEnabled");
UIWidgets::EnhancementCheckbox("OoT Debug Mode", DEV_TOOLS_CVAR("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("gDebugEnabled", 0)) {
UIWidgets::EnhancementCheckbox("OoT Registry Editor", "gRegEditEnabled");
if (CVarGetInteger(DEV_TOOLS_CVAR("DebugEnabled"), 0)) {
UIWidgets::EnhancementCheckbox("OoT Registry Editor", DEV_TOOLS_CVAR("RegEditEnabled"));
UIWidgets::Tooltip("Enables the registry editor");
ImGui::Text("Debug Save File Mode:");
UIWidgets::EnhancementCombobox("gDebugSaveFileMode", DebugSaveFileModes, 1);
UIWidgets::EnhancementCombobox(DEV_TOOLS_CVAR("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", "gSkulltulaDebugEnabled", true, false);
UIWidgets::PaddedEnhancementCheckbox("OoT Skulltula Debug", DEV_TOOLS_CVAR("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", "gSkipLogoTitle", true, false);
UIWidgets::PaddedEnhancementCheckbox("Fast File Select", DEV_TOOLS_CVAR("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("gSkipLogoTitle", 0)) {
if (CVarGetInteger(DEV_TOOLS_CVAR("SkipLogoTitle"), 0)) {
ImGui::Text("Loading:");
UIWidgets::EnhancementCombobox("gSaveFileID", FastFileSelect, 0);
UIWidgets::EnhancementCombobox(DEV_TOOLS_CVAR("SaveFileID"), FastFileSelect, 0);
};
UIWidgets::PaddedEnhancementCheckbox("Better Debug Warp Screen", "gBetterDebugWarpScreen", true, false);
UIWidgets::PaddedEnhancementCheckbox("Better Debug Warp Screen", DEV_TOOLS_CVAR("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", "gDebugWarpScreenTranslation", true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true);
UIWidgets::PaddedEnhancementCheckbox("Debug Warp Screen Translation", DEV_TOOLS_CVAR("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("gFrameAdvance", 1);
CVarSetInteger(GENERAL_CVAR("FrameAdvance"), 1);
}
ImGui::SameLine();
ImGui::Button("Advance (Hold)");
if (ImGui::IsItemActive()) {
CVarSetInteger("gFrameAdvance", 1);
CVarSetInteger(GENERAL_CVAR("FrameAdvance"), 1);
}
ImGui::PopStyleVar(3);
ImGui::PopStyleColor(1);
@ -1752,27 +1752,27 @@ bool isStringEmpty(std::string str) {
#ifdef ENABLE_REMOTE_CONTROL
void DrawRemoteControlMenu() {
if (ImGui::BeginMenu("Network")) {
static std::string ip = CVarGetString("gRemote.IP", "127.0.0.1");
static uint16_t port = CVarGetInteger("gRemote.Port", 43384);
bool isFormValid = !isStringEmpty(CVarGetString("gRemote.IP", "127.0.0.1")) && port > 1024 && port < 65535;
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;
const char* remoteOptions[2] = { "Sail", "Crowd Control"};
ImGui::BeginDisabled(GameInteractor::Instance->isRemoteInteractorEnabled);
ImGui::Text("Remote Interaction Scheme");
if (UIWidgets::EnhancementCombobox("gRemote.Scheme", remoteOptions, GI_SCHEME_SAIL)) {
switch (CVarGetInteger("gRemote.Scheme", GI_SCHEME_SAIL)) {
if (UIWidgets::EnhancementCombobox(REMOTE_CVAR("Scheme"), remoteOptions, GI_SCHEME_SAIL)) {
switch (CVarGetInteger(REMOTE_CVAR("Scheme"), GI_SCHEME_SAIL)) {
case GI_SCHEME_SAIL:
case GI_SCHEME_CROWD_CONTROL:
CVarSetString("gRemote.IP", "127.0.0.1");
CVarSetInteger("gRemote.Port", 43384);
CVarSetString(REMOTE_CVAR("IP"), "127.0.0.1");
CVarSetInteger(REMOTE_CVAR("Port"), 43384);
ip = "127.0.0.1";
port = 43384;
break;
}
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
}
switch (CVarGetInteger("gRemote.Scheme", GI_SCHEME_SAIL)) {
switch (CVarGetInteger(REMOTE_CVAR("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("gRemote.IP", ip.c_str());
CVarSetString(REMOTE_CVAR("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("gRemote.Port", port);
CVarSetInteger(REMOTE_CVAR("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("gRemote.Enabled", 0);
CVarSetInteger(REMOTE_CVAR("Enabled"), 0);
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
switch (CVarGetInteger("gRemote.Scheme", GI_SCHEME_SAIL)) {
switch (CVarGetInteger(REMOTE_CVAR("Scheme"), GI_SCHEME_SAIL)) {
case GI_SCHEME_SAIL:
GameInteractorSail::Instance->Disable();
break;
@ -1836,9 +1836,9 @@ void DrawRemoteControlMenu() {
break;
}
} else {
CVarSetInteger("gRemote.Enabled", 1);
CVarSetInteger(REMOTE_CVAR("Enabled"), 1);
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
switch (CVarGetInteger("gRemote.Scheme", GI_SCHEME_SAIL)) {
switch (CVarGetInteger(REMOTE_CVAR("Scheme"), GI_SCHEME_SAIL)) {
case GI_SCHEME_SAIL:
GameInteractorSail::Instance->Enable();
break;

View File

@ -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("gNoClip", 0) && actor != NULL && actor->id == ACTOR_PLAYER) {
if (CVarGetInteger(CHEAT_CVAR("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("gClimbEverything", 0) != 0) {
if (CVarGetInteger(CHEAT_CVAR("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("gHookshotEverything", 0) || SurfaceType_GetData(colCtx, poly, bgId, 1) >> 17 & 1;
return CVarGetInteger(CHEAT_CVAR("HookshotEverything"), 0) || SurfaceType_GetData(colCtx, poly, bgId, 1) >> 17 & 1;
}
/**

View File

@ -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("gBetaQuestWorld", 0xFFEF);
gSaveContext.nextCutsceneIndex = CVarGetInteger(CHEAT_CVAR("BetaQuestWorld"), 0xFFEF);
gSaveContext.cutsceneTrigger = 0;
gSaveContext.chamberCutsceneNum = 0;
gSaveContext.nextDayTime = 0xFFFF;

View File

@ -792,7 +792,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
if (this->unk_15A > 0) {
this->unk_15A--;
if (CVarGetInteger("gDropsDontDie", 0) && (this->unk_154 <= 0)) {
if (CVarGetInteger(CHEAT_CVAR("DropsDontDie"), 0) && (this->unk_154 <= 0)) {
this->unk_15A++;
}
}

View File

@ -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("gCheatEasyPauseBufferEnabled", 0);
u8 easyPauseBufferEnabled = CVarGetInteger(CHEAT_CVAR("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

View File

@ -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("gMoonJumpOnL", 0) || CVarGetInteger("gTurboOnL", 0)) ||
!(CVarGetInteger("gDebugEnabled", 0) || CVarGetInteger(CHEAT_CVAR("MoonJumpOnL"), 0) || CVarGetInteger("gTurboOnL", 0)) ||
CVarGetInteger("gEnableMapToggle", 0);
if (play->pauseCtx.state < 4) {

View File

@ -1655,11 +1655,11 @@ void Message_OpenText(PlayState* play, u16 textId) {
//font->msgLength, __FILE__, __LINE__);
} else if (CVarGetInteger("gAskToEquip", 0) &&
(((LINK_IS_ADULT || CVarGetInteger("gTimelessEquipment", 0)) &&
(((LINK_IS_ADULT || CVarGetInteger(CHEAT_CVAR("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("gTimelessEquipment", 0)) &&
((!LINK_IS_ADULT || CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0)) &&
// 4C = Deku Shield, A4 = Kokiri Sword
(textId == 0x4C || textId == 0xA4)) ||
// 4D == Hylian Shield

View File

@ -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("gSwitchAge", 0) || CVarGetInteger("gSwitchTimeline", 0)) && (CHECK_OWNED_EQUIP(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_KOKIRI) == 0 || Flags_GetInfTable(INFTABLE_SWORDLESS))) {
if ((CVarGetInteger(GENERAL_CVAR("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("gSwitchAge", 0) || CVarGetInteger("gSwitchTimeline", 0)) {
if (CVarGetInteger(GENERAL_CVAR("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("gSwitchAge", 0) || CVarGetInteger("gSwitchTimeline", 0)) &&
if ((CVarGetInteger(GENERAL_CVAR("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("gInfiniteEpona", 0)) {
if (interfaceCtx->unk_1EE == 8 && !CVarGetInteger(CHEAT_CVAR("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("gSuperTunic", 0) != 0) {
if (CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC) == EQUIP_VALUE_TUNIC_GORON || CVarGetInteger(CHEAT_CVAR("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("gSuperTunic", 0) != 0) {
if (CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC) == EQUIP_VALUE_TUNIC_ZORA || CVarGetInteger(CHEAT_CVAR("SuperTunic"), 0) != 0) {
D_80125A58 = 0;
}
}

View File

@ -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("gTimelessEquipment", 0)) {
if ((CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA && CVarGetInteger("gAdultBunnyHood", 0)) || CVarGetInteger(CHEAT_CVAR("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("gTimeSync", 0)) {
if (CVarGetInteger(CHEAT_CVAR("TimeSync"), 0)) {
const int maxRealDaySeconds = 86400;
const int maxInGameDayTicks = 65536;

View File

@ -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("gShieldTwoHanded", 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK) ||
if ((CVarGetInteger(CHEAT_CVAR("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("gTimelessEquipment", 0) || LINK_IS_ADULT) {
if (CVarGetInteger(CHEAT_CVAR("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("gSuperTunic", 0) == 0 && CVarGetInteger("gDisableTunicWarningText", 0) == 0)) ||
(((var == 0) && (this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CHEAT_CVAR("SuperTunic"), 0) == 0 && CVarGetInteger("gDisableTunicWarningText", 0) == 0)) ||
(((var == 1) || (var == 3)) && (this->currentBoots == PLAYER_BOOTS_IRON) &&
(this->currentTunic != PLAYER_TUNIC_ZORA && CVarGetInteger("gSuperTunic", 0) == 0 && CVarGetInteger("gDisableTunicWarningText", 0) == 0)))) {
(this->currentTunic != PLAYER_TUNIC_ZORA && CVarGetInteger(CHEAT_CVAR("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("gCheatHookshotReachMultiplier", 1.0f));
play, this, ((this->heldItemAction == PLAYER_IA_HOOKSHOT) ? 38600.0f : 77600.0f) * CVarGetFloat(CHEAT_CVAR("HookshotReachMultiplier"), 1.0f));
}
}
} else if (CVarGetInteger("gBowReticle", 0) && (

View File

@ -412,7 +412,7 @@ BgImage* func_80096A74(PolygonType1* polygon1, PlayState* play) {
camera = GET_ACTIVE_CAM(play);
camId = camera->camDataIdx;
if (camId == -1 && (CVarGetInteger("gNoRestrictItems", 0) || CVarGetInteger("gCrowdControl", 0))) {
if (camId == -1 && (CVarGetInteger(CHEAT_CVAR("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.

View File

@ -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("gCheatHookshotReachMultiplier", 1.0f);
s32 length = ((player->heldItemAction == PLAYER_IA_HOOKSHOT) ? 13 : 26) * CVarGetFloat(CHEAT_CVAR("HookshotReachMultiplier"), 1.0f);
ArmsHook_SetupAction(this, ArmsHook_Shoot);
func_8002D9A4(&this->actor, 20.0f);

View File

@ -110,8 +110,8 @@ void EnBom_Init(Actor* thisx, PlayState* play) {
Actor_SetScale(thisx, 0.01f);
}
if (CVarGetFloat("gBombTimerMultiplier", 1.0f) != 1.0f) {
this->timer = (s32)(70 * CVarGetFloat("gBombTimerMultiplier", 1.0f));
if (CVarGetFloat(CHEAT_CVAR("BombTimerMultiplier"), 1.0f) != 1.0f) {
this->timer = (s32)(70 * CVarGetFloat(CHEAT_CVAR("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("gBombTimerMultiplier", 1.0f) == 1.0f) {
if (this->timer == 67 && !GameInteractor_GetRandomBombFuseTimerActive() && CVarGetFloat(CHEAT_CVAR("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("gBombTimerMultiplier", 1.0f);
float timerMultiplier = CVarGetFloat(CHEAT_CVAR("BombTimerMultiplier"), 1.0f);
if (this->timer < (timerMultiplier == 1.0f ? 63 : (s32)(70 * timerMultiplier - 7))) {
dustAccel.y = 0.2f;

View File

@ -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("gNoKeeseGuayTarget", 0)) {
!CVarGetInteger(CHEAT_CVAR("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("gNoKeeseGuayTarget", 0)) {
CVarGetInteger(CHEAT_CVAR("NoKeeseGuayTarget"), 0)) {
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_KAICHO_ATTACK);

View File

@ -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("gNoKeeseGuayTarget", 0)) {
!CVarGetInteger(CHEAT_CVAR("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("gNoKeeseGuayTarget", 0)) {
CVarGetInteger(CHEAT_CVAR("NoKeeseGuayTarget"), 0)) {
EnFirefly_SetupFlyAway(this);
}
}

View File

@ -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("gNoFishDespawn", 0) == 0) {
if (this->timer > 0 && CVarGetInteger(CHEAT_CVAR("NoFishDespawn"), 0) == 0) {
this->timer--;
}

View File

@ -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("gInfiniteEpona", 0)) { this->numBoosts--; }
if (!CVarGetInteger(CHEAT_CVAR("InfiniteEponaBoost"), 0)) { this->numBoosts--; }
this->boostTimer = 0;
if (this->numBoosts == 0) {
this->boostRegenTime = 140;

View File

@ -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("gNoBugsDespawn", 0) && this->soilActor == NULL) {
if (CVarGetInteger(CHEAT_CVAR("NoBugsDespawn"), 0) && this->soilActor == NULL) {
this->unk_314 &= ~4;
return;
}

View File

@ -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("gNoRedeadFreeze", 0)) {
if (!(this->unk_312 & PLAYER_STATE2_GRABBED_BY_ENEMY) && !CVarGetInteger(CHEAT_CVAR("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("gNoRedeadFreeze", 0)) {
if (!(this->unk_312 & 0x80) && !CVarGetInteger(CHEAT_CVAR("NoRedeadFreeze"), 0)) {
player->actor.freezeTimer = 60;
func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96);
func_8008EEAC(play, &this->actor);

View File

@ -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("gLostWoodsConsistentVolume", 0) ||
CVarGetInteger(AUDIO_CVAR("LostWoodsConsistentVolume"), 0) ||
((!CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) || CHECK_QUEST_ITEM(QUEST_SONG_SARIA)) && !IS_RANDO)
) {
Actor_Kill(&this->actor);

View File

@ -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("gInfiniteAmmo", 0)) {
if (!CVarGetInteger(CHEAT_CVAR("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("gShieldTwoHanded", 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK))];
!(CVarGetInteger(CHEAT_CVAR("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK))];
} else {
return D_808543AC[Player_HoldsTwoHandedWeapon(this) &&
!(CVarGetInteger("gShieldTwoHanded", 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK))];
!(CVarGetInteger(CHEAT_CVAR("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("gInfiniteAmmo", 0)) {
if (!CVarGetInteger(CHEAT_CVAR("InfiniteAmmo"), 0)) {
play->interfaceCtx.hbaAmmo--;
}
} else if (play->shootingGalleryStatus != 0) {
if (!CVarGetInteger("gInfiniteAmmo", 0)) {
if (!CVarGetInteger(CHEAT_CVAR("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("gFireproofDekuShield", 0) == 0)) {
if (this->currentShield == PLAYER_SHIELD_DEKU && (CVarGetInteger(CHEAT_CVAR("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("gShieldTwoHanded", 0) &&
!(CVarGetInteger(CHEAT_CVAR("ShieldTwoHanded"), 0) &&
(this->heldItemAction != PLAYER_IA_DEKU_STICK))];
} else {
anim = D_808543B4[Player_HoldsTwoHandedWeapon(this) &&
!(CVarGetInteger("gShieldTwoHanded", 0) &&
!(CVarGetInteger(CHEAT_CVAR("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("gShieldTwoHanded", 0) &&
!(CVarGetInteger(CHEAT_CVAR("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("gSuperTunic", 0) == 0) ||
((sp48 >= 0) && ((this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CHEAT_CVAR("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("gClimbEverything", 0) != 0))) {
((ABS(sp84->normal.y) < 600) || (CVarGetInteger(CHEAT_CVAR("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("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
if (CVarGetInteger(CHEAT_CVAR("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("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
if (AMMO(ITEM_STICK) != 0 && CVarGetInteger(CHEAT_CVAR("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("gSuperTunic", 0) == 0) {
if (this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CHEAT_CVAR("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("gClimbEverything", 0)) {
if (CVarGetInteger("gFixVineFall", 0) && !CVarGetInteger(CHEAT_CVAR("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("gClimbEverything", 0) != 0)) {
if ((ABS(wallPoly->normal.y) < 600) || (CVarGetInteger(CHEAT_CVAR("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("gEnemyBGMDisable", 0)) {
if (play->actorCtx.targetCtx.bgmEnemy != NULL && !CVarGetInteger(AUDIO_CVAR("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("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE) {
if (CVarGetInteger(CHEAT_CVAR("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("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
if (this->unk_85C == 0.0f && CVarGetInteger(CHEAT_CVAR("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
Player_UseItem(play, this, 0xFF);
return;
}
temp = 1.0f;
if (DECR(this->unk_860) == 0 && CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
if (DECR(this->unk_860) == 0 && CVarGetInteger(CHEAT_CVAR("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("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
} else if (this->unk_860 < 20 && CVarGetInteger(CHEAT_CVAR("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("gSuperTunic", 0) != 0) {
if (this->currentTunic == PLAYER_TUNIC_GORON || CVarGetInteger(CHEAT_CVAR("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("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE)) {
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)) {
func_80848A04(play, this);
} else if ((this->heldItemAction == PLAYER_IA_FISHING_POLE) && (this->unk_860 < 0)) {
this->unk_860++;

View File

@ -3286,15 +3286,15 @@ void FileChoose_Main(GameState* thisx) {
gSaveContext.skyboxTime += 0x10;
}
if (CVarGetInteger("gSkipLogoTitle", 0) && CVarGetInteger("gSaveFileID", FASTFILE_1) <= FASTFILE_3 && !isFastFileIdIncompatible) {
if (Save_Exist(CVarGetInteger("gSaveFileID", FASTFILE_1)) && FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(CVarGetInteger("gSaveFileID", FASTFILE_1)))) {
this->buttonIndex = CVarGetInteger("gSaveFileID", FASTFILE_1);
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);
this->menuMode = FS_MENU_MODE_SELECT;
this->selectMode = SM_LOAD_GAME;
} else {
isFastFileIdIncompatible = 1;
}
} else if (CVarGetInteger("gSkipLogoTitle", 0) && CVarGetInteger("gSaveFileID", FASTFILE_1) == FASTFILE_MAP_SELECT) {
} else if (CVarGetInteger(DEV_TOOLS_CVAR("SkipLogoTitle"), 0) && CVarGetInteger(DEV_TOOLS_CVAR("SaveFileID"), FASTFILE_1) == FASTFILE_MAP_SELECT) {
this->buttonIndex = 0xFF;
this->menuMode = FS_MENU_MODE_SELECT;
this->selectMode = SM_LOAD_GAME;

View File

@ -245,13 +245,13 @@ void Title_Main(GameState* thisx) {
POLY_OPA_DISP = gfx;
}
if (this->exit || CVarGetInteger("gSkipLogoTitle", 0)) {
if (this->exit || CVarGetInteger(DEV_TOOLS_CVAR("SkipLogoTitle"), 0)) {
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
gSaveContext.natureAmbienceId = 0xFF;
gSaveContext.gameMode = 1;
this->state.running = false;
if (gLoadFileSelect || CVarGetInteger("gSkipLogoTitle", 0))
if (gLoadFileSelect || CVarGetInteger(DEV_TOOLS_CVAR("SkipLogoTitle"), 0))
SET_NEXT_GAMESTATE(&this->state, FileChoose_Init, FileChooseContext);
else
SET_NEXT_GAMESTATE(&this->state, Opening_Init, OpeningContext);

View File

@ -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("gTimelessEquipment", 0);
bool drawGreyItems = !CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0);
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
point = CUR_UPG_VALUE(sChildUpgrades[i]);
if ((point != 0) && (CUR_UPG_VALUE(sChildUpgrades[i]) != 0)) {

View File

@ -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("gTimelessEquipment", 0)
CVarGetInteger(CHEAT_CVAR("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("gTimelessEquipment", 0)
CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0)
? AGE_REQ_NONE
: AGE_REQ_CHILD;

View File

@ -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("gTimelessEquipment", 0) || (gEquipAgeReqs[i][j] == AGE_REQ_NONE) || (gEquipAgeReqs[i][j] == ((void)0, gSaveContext.linkAge)))
#define CHECK_AGE_REQ_SLOT(slotIndex) (CVarGetInteger("gTimelessEquipment", 0) || (gSlotAgeReqs[slotIndex] == AGE_REQ_NONE) || gSlotAgeReqs[slotIndex] == ((void)0, gSaveContext.linkAge))
#define CHECK_AGE_REQ_ITEM(itemIndex) (CVarGetInteger("gTimelessEquipment", 0) || (gItemAgeReqs[itemIndex] == AGE_REQ_NONE) || (gItemAgeReqs[itemIndex] == gSaveContext.linkAge))
#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))
void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx);
s32 KaleidoScope_UpdateQuestStatusPoint(PauseContext* pauseCtx, s32 point);

View File

@ -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("gSkulltulaDebugEnabled", 0) != 0) {
if (pauseCtx->pageIndex == PAUSE_MAP && CVarGetInteger(DEV_TOOLS_CVAR("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("gCheatEasyPauseBufferEnabled", 0) || CVarGetInteger("gCheatEasyInputBufferingEnabled", 0)) {
if (CVarGetInteger(CHEAT_CVAR("EasyPauseBuffer"), 0) || CVarGetInteger(CHEAT_CVAR("EasyInputBuffer"), 0)) {
// Easy pause buffer is 13 frames, 12 for kaledio to end, and one more to advance a single frame
CVarSetInteger("gCheatEasyPauseBufferTimer", 13);
}