mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-19 13:00:11 -07:00
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:
parent
694a876a70
commit
e2622af004
37 changed files with 235 additions and 229 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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) && (
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue