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
37 changed files with 235 additions and 229 deletions
+3 -3
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;
}
/**
+1 -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;
+1 -1
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++;
}
}
+1 -1
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
+1 -1
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) {
+2 -2
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
+6 -6
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;
}
}
+2 -2
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;
+5 -5
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) && (
+1 -1
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.
@@ -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);
@@ -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;
@@ -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);
@@ -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);
}
}
@@ -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--;
}
@@ -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;
@@ -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;
}
+2 -2
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);
@@ -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);
@@ -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++;
@@ -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;
@@ -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);
@@ -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)) {
@@ -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;
@@ -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);
@@ -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);
}