mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-13 18:17:19 -07:00
CVar Macro Cleanup (#4062)
* Standardized CVar macros to have `CVAR_` at the front instead of the end. Removed excluded and replaced sequence macros. * Missed a few developer CVars outside of `SohMenuBar.cpp` * 1 more.
This commit is contained in:
parent
e2622af004
commit
33aef87907
55 changed files with 1290 additions and 1292 deletions
|
@ -4025,7 +4025,7 @@ void Audio_PlayFanfare_Rando(GetItemEntry getItem) {
|
|||
temp1 = NA_BGM_SMALL_ITEM_GET | 0x900;
|
||||
}
|
||||
// If the setting is toggled on and we get special quest items (longer fanfares):
|
||||
if (CVarGetInteger(RANDO_ENHANCEMENT_CVAR("QuestItemFanfares"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("QuestItemFanfares"), 0) != 0) {
|
||||
// If we get a medallion, play the "get a medallion" fanfare
|
||||
if ((itemId >= ITEM_MEDALLION_FOREST) && (itemId <= ITEM_MEDALLION_LIGHT)) {
|
||||
temp1 = NA_BGM_MEDALLION_GET | 0x900;
|
||||
|
|
|
@ -93,7 +93,7 @@ void func_800C4344(GameState* gameState) {
|
|||
HREG(95) = CHECK_BTN_ALL(selectedInput->press.button, hReg82);
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gRegEditEnabled", 0) || gIsCtrlr2Valid) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("RegEditEnabled"), 0) || gIsCtrlr2Valid) {
|
||||
func_8006390C(&gameState->input[1]);
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
|
||||
sLastButtonPressed = gameState->input[0].press.button | gameState->input[0].cur.button;
|
||||
if (R_DISABLE_INPUT_DISPLAY == 0 && CVarGetInteger("gDebugEnabled", 0)) {
|
||||
if (R_DISABLE_INPUT_DISPLAY == 0 && CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) {
|
||||
GameState_DrawInputDisplay(sLastButtonPressed, &newDList);
|
||||
}
|
||||
|
||||
|
|
|
@ -424,7 +424,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
|||
sGraphUpdateTime = time;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gDebugEnabled", 0))
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0))
|
||||
{
|
||||
if (CHECK_BTN_ALL(gameState->input[0].press.button, BTN_Z) &&
|
||||
CHECK_BTN_ALL(gameState->input[0].cur.button, BTN_L | BTN_R)) {
|
||||
|
|
|
@ -1902,7 +1902,7 @@ s32 BgCheck_CheckWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResul
|
|||
s32 bgId2;
|
||||
f32 nx, ny, nz; // unit normal of polygon
|
||||
|
||||
if (CVarGetInteger(CHEAT_CVAR("NoClip"), 0) && actor != NULL && actor->id == ACTOR_PLAYER) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("NoClip"), 0) && actor != NULL && actor->id == ACTOR_PLAYER) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -4025,7 +4025,7 @@ u32 func_80041D94(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
|
|||
* SurfaceType Get Wall Flags
|
||||
*/
|
||||
s32 func_80041DB8(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
|
||||
if (CVarGetInteger(CHEAT_CVAR("ClimbEverything"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("ClimbEverything"), 0) != 0) {
|
||||
return (1 << 3) | D_80119D90[func_80041D94(colCtx, poly, bgId)];
|
||||
} else {
|
||||
return D_80119D90[func_80041D94(colCtx, poly, bgId)];
|
||||
|
@ -4122,7 +4122,7 @@ u32 SurfaceType_GetEcho(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId)
|
|||
* SurfaceType Is Hookshot Surface
|
||||
*/
|
||||
u32 SurfaceType_IsHookshotSurface(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
|
||||
return CVarGetInteger(CHEAT_CVAR("HookshotEverything"), 0) || SurfaceType_GetData(colCtx, poly, bgId, 1) >> 17 & 1;
|
||||
return CVarGetInteger(CVAR_CHEAT("HookshotEverything"), 0) || SurfaceType_GetData(colCtx, poly, bgId, 1) >> 17 & 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -7619,7 +7619,7 @@ Vec3s Camera_Update(Camera* camera) {
|
|||
}
|
||||
|
||||
// enable/disable debug cam
|
||||
if (CVarGetInteger("gDebugEnabled", 0) && CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_START)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_START)) {
|
||||
gDbgCamEnabled ^= 1;
|
||||
if (gDbgCamEnabled) {
|
||||
DbgCamera_Enable(&D_8015BD80, camera);
|
||||
|
@ -7702,7 +7702,7 @@ Vec3s Camera_Update(Camera* camera) {
|
|||
}
|
||||
|
||||
if (camera->timer != -1 && CHECK_BTN_ALL(D_8015BD7C->state.input[0].press.button, BTN_DRIGHT) &&
|
||||
CVarGetInteger("gDebugEnabled", 0)) {
|
||||
CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) {
|
||||
camera->timer = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ void SaveContext_Init(void) {
|
|||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = NATURE_ID_DISABLED;
|
||||
gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX;
|
||||
gSaveContext.nextCutsceneIndex = CVarGetInteger(CHEAT_CVAR("BetaQuestWorld"), 0xFFEF);
|
||||
gSaveContext.nextCutsceneIndex = CVarGetInteger(CVAR_CHEAT("BetaQuestWorld"), 0xFFEF);
|
||||
gSaveContext.cutsceneTrigger = 0;
|
||||
gSaveContext.chamberCutsceneNum = 0;
|
||||
gSaveContext.nextDayTime = 0xFFFF;
|
||||
|
|
|
@ -133,7 +133,7 @@ void func_8006390C(Input* input) {
|
|||
InputCombo* input_combo;
|
||||
s32 i;
|
||||
|
||||
if (!CVarGetInteger("gDebugEnabled", 0))
|
||||
if (!CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0))
|
||||
return;
|
||||
|
||||
regGroup = (gGameInfo->regGroup * REG_PAGES + gGameInfo->regPage) * REG_PER_PAGE - REG_PER_PAGE;
|
||||
|
@ -216,7 +216,7 @@ void func_80063C04(GfxPrint* printer) {
|
|||
s32 pad;
|
||||
char name[3];
|
||||
|
||||
if (!CVarGetInteger("gDebugEnabled", 0))
|
||||
if (!CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0))
|
||||
return;
|
||||
|
||||
// set up register name string
|
||||
|
@ -243,7 +243,7 @@ void func_80063D7C(GraphicsContext* gfxCtx) {
|
|||
GfxPrint printer;
|
||||
Gfx* tempRet;
|
||||
|
||||
if (!CVarGetInteger("gDebugEnabled", 0) || GameInteractor_NoUIActive()) {
|
||||
if (!CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) || GameInteractor_NoUIActive()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -154,14 +154,14 @@ void func_80064558(PlayState* play, CutsceneContext* csCtx) {
|
|||
void func_800645A0(PlayState* play, CutsceneContext* csCtx) {
|
||||
Input* input = &play->state.input[0];
|
||||
|
||||
if (CVarGetInteger("gDebugEnabled", 0) && CHECK_BTN_ALL(input->press.button, BTN_DLEFT) &&
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && CHECK_BTN_ALL(input->press.button, BTN_DLEFT) &&
|
||||
(csCtx->state == CS_STATE_IDLE) && (gSaveContext.sceneSetupIndex >= 4)) {
|
||||
D_8015FCC8 = 0;
|
||||
gSaveContext.cutsceneIndex = 0xFFFD;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gDebugEnabled", 0) && CHECK_BTN_ALL(input->press.button, BTN_DUP) &&
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && CHECK_BTN_ALL(input->press.button, BTN_DUP) &&
|
||||
(csCtx->state == CS_STATE_IDLE) && (gSaveContext.sceneSetupIndex >= 4) && !gDbgCamEnabled) {
|
||||
D_8015FCC8 = 1;
|
||||
gSaveContext.cutsceneIndex = 0xFFFD;
|
||||
|
@ -499,7 +499,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||
// cmd->base == 33: Zelda escaping with impa cutscene
|
||||
bool randoCsSkip = (IS_RANDO && (cmd->base == 8 || cmd->base == 24 || cmd->base == 33));
|
||||
bool debugCsSkip = (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START) &&
|
||||
(gSaveContext.fileNum != 0xFEDC) && CVarGetInteger("gDebugEnabled", 0));
|
||||
(gSaveContext.fileNum != 0xFEDC) && CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0));
|
||||
|
||||
if ((gSaveContext.gameMode != 0) && (gSaveContext.gameMode != 3) && (play->sceneNum != SCENE_HYRULE_FIELD) &&
|
||||
(csCtx->frames > 20) &&
|
||||
|
@ -1643,7 +1643,7 @@ void Cutscene_ProcessCommands(PlayState* play, CutsceneContext* csCtx, u8* cutsc
|
|||
return;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gDebugEnabled", 0) && CHECK_BTN_ALL(play->state.input[0].press.button, BTN_DRIGHT)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && CHECK_BTN_ALL(play->state.input[0].press.button, BTN_DRIGHT)) {
|
||||
csCtx->state = CS_STATE_UNSKIPPABLE_INIT;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -792,7 +792,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (this->unk_15A > 0) {
|
||||
this->unk_15A--;
|
||||
if (CVarGetInteger(CHEAT_CVAR("DropsDontDie"), 0) && (this->unk_154 <= 0)) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("DropsDontDie"), 0) && (this->unk_154 <= 0)) {
|
||||
this->unk_15A++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,10 +18,10 @@ s32 FrameAdvance_Update(FrameAdvanceContext* frameAdvCtx, Input* input) {
|
|||
frameAdvCtx->enabled = !frameAdvCtx->enabled;
|
||||
}
|
||||
|
||||
if (!frameAdvCtx->enabled || CVarGetInteger("gFrameAdvance", 0) || (CHECK_BTN_ALL(input->cur.button, BTN_Z) &&
|
||||
if (!frameAdvCtx->enabled || CVarGetInteger(CVAR_GENERAL("FrameAdvance"), 0) || (CHECK_BTN_ALL(input->cur.button, BTN_Z) &&
|
||||
(CHECK_BTN_ALL(input->press.button, BTN_R) ||
|
||||
(CHECK_BTN_ALL(input->cur.button, BTN_R) && (++frameAdvCtx->timer >= 9))))) {
|
||||
CVarClear("gFrameAdvance");
|
||||
CVarClear(CVAR_GENERAL("FrameAdvance"));
|
||||
frameAdvCtx->timer = 0;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ void KaleidoSetup_Update(PlayState* play) {
|
|||
play->shootingGalleryStatus <= 1 && gSaveContext.magicState != MAGIC_STATE_STEP_CAPACITY && gSaveContext.magicState != MAGIC_STATE_FILL &&
|
||||
(play->sceneNum != SCENE_BOMBCHU_BOWLING_ALLEY || !Flags_GetSwitch(play, 0x38))) {
|
||||
|
||||
u8 easyPauseBufferEnabled = CVarGetInteger(CHEAT_CVAR("EasyPauseBuffer"), 0);
|
||||
u8 easyPauseBufferEnabled = CVarGetInteger(CVAR_CHEAT("EasyPauseBuffer"), 0);
|
||||
u8 easyPauseBufferTimer = CVarGetInteger("gCheatEasyPauseBufferTimer", 0);
|
||||
|
||||
// If start is not seen as pressed on the 2nd to last frame then we should end the easy frame advance flow
|
||||
|
|
|
@ -735,7 +735,7 @@ void Minimap_Draw(PlayState* play) {
|
|||
|
||||
// If any of these CVars are enabled, disable toggling the minimap with L, unless gEnableMapToggle is set
|
||||
bool enableMapToggle =
|
||||
!(CVarGetInteger("gDebugEnabled", 0) || CVarGetInteger(CHEAT_CVAR("MoonJumpOnL"), 0) || CVarGetInteger("gTurboOnL", 0)) ||
|
||||
!(CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) || CVarGetInteger(CVAR_CHEAT("MoonJumpOnL"), 0) || CVarGetInteger("gTurboOnL", 0)) ||
|
||||
CVarGetInteger("gEnableMapToggle", 0);
|
||||
|
||||
if (play->pauseCtx.state < 4) {
|
||||
|
|
|
@ -1655,11 +1655,11 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
|||
//font->msgLength, __FILE__, __LINE__);
|
||||
|
||||
} else if (CVarGetInteger("gAskToEquip", 0) &&
|
||||
(((LINK_IS_ADULT || CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0)) &&
|
||||
(((LINK_IS_ADULT || CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0)) &&
|
||||
// 0C = Biggoron, 4B = Giant's, 4E = Mirror Shield, 50-51 = Tunics
|
||||
(textId == 0x0C || textId == 0x4B || textId == 0x4E ||
|
||||
textId == 0x50 || textId == 0x51)) ||
|
||||
((!LINK_IS_ADULT || CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0)) &&
|
||||
((!LINK_IS_ADULT || CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0)) &&
|
||||
// 4C = Deku Shield, A4 = Kokiri Sword
|
||||
(textId == 0x4C || textId == 0xA4)) ||
|
||||
// 4D == Hylian Shield
|
||||
|
@ -3007,7 +3007,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
* the last value being saved in a static variable.
|
||||
*/
|
||||
void Message_DrawDebugVariableChanged(s16* var, GraphicsContext* gfxCtx) {
|
||||
if (!CVarGetInteger("gDebugEnabled", 0)) { return; }
|
||||
if (!CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) { return; }
|
||||
|
||||
static s16 sVarLastValue = 0;
|
||||
static s16 sFillTimer = 0;
|
||||
|
|
|
@ -1539,7 +1539,7 @@ void Inventory_SwapAgeEquipment(void) {
|
|||
|
||||
// When using enhancements, set swordless flag if player doesn't have kokiri sword or hasn't equipped a sword yet.
|
||||
// Then set the child equips button items to item none to ensure kokiri sword is not equipped
|
||||
if ((CVarGetInteger(GENERAL_CVAR("SwitchAge"), 0) || CVarGetInteger("gSwitchTimeline", 0)) && (CHECK_OWNED_EQUIP(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_KOKIRI) == 0 || Flags_GetInfTable(INFTABLE_SWORDLESS))) {
|
||||
if ((CVarGetInteger(CVAR_GENERAL("SwitchAge"), 0) || CVarGetInteger("gSwitchTimeline", 0)) && (CHECK_OWNED_EQUIP(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_KOKIRI) == 0 || Flags_GetInfTable(INFTABLE_SWORDLESS))) {
|
||||
Flags_SetInfTable(INFTABLE_SWORDLESS);
|
||||
gSaveContext.childEquips.buttonItems[0] = ITEM_NONE;
|
||||
}
|
||||
|
@ -1554,7 +1554,7 @@ void Inventory_SwapAgeEquipment(void) {
|
|||
|
||||
gSaveContext.adultEquips.equipment = gSaveContext.equips.equipment;
|
||||
// Switching age using enhancements separated out to make vanilla flow clear
|
||||
if (CVarGetInteger(GENERAL_CVAR("SwitchAge"), 0) || CVarGetInteger("gSwitchTimeline", 0)) {
|
||||
if (CVarGetInteger(CVAR_GENERAL("SwitchAge"), 0) || CVarGetInteger("gSwitchTimeline", 0)) {
|
||||
for (i = 0; i < ARRAY_COUNT(gSaveContext.equips.buttonItems); i++) {
|
||||
gSaveContext.equips.buttonItems[i] = gSaveContext.childEquips.buttonItems[i];
|
||||
|
||||
|
@ -1629,7 +1629,7 @@ void Inventory_SwapAgeEquipment(void) {
|
|||
(EQUIP_VALUE_BOOTS_KOKIRI << (EQUIP_TYPE_BOOTS * 4));
|
||||
}
|
||||
|
||||
if ((CVarGetInteger(GENERAL_CVAR("SwitchAge"), 0) || CVarGetInteger("gSwitchTimeline", 0)) &&
|
||||
if ((CVarGetInteger(CVAR_GENERAL("SwitchAge"), 0) || CVarGetInteger("gSwitchTimeline", 0)) &&
|
||||
(gSaveContext.equips.buttonItems[0] == ITEM_NONE)) {
|
||||
Flags_SetInfTable(INFTABLE_SWORDLESS);
|
||||
if (gSaveContext.childEquips.equipment == 0) {
|
||||
|
@ -5720,7 +5720,7 @@ void Interface_Draw(PlayState* play) {
|
|||
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0)) {
|
||||
if (gSaveContext.minigameState != 1) {
|
||||
// Carrots rendering if the action corresponds to riding a horse
|
||||
if (interfaceCtx->unk_1EE == 8 && !CVarGetInteger(CHEAT_CVAR("InfiniteEponaBoost"), 0)) {
|
||||
if (interfaceCtx->unk_1EE == 8 && !CVarGetInteger(CVAR_CHEAT("InfiniteEponaBoost"), 0)) {
|
||||
// Load Carrot Icon
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gCarrotIconTex, G_IM_FMT_RGBA, G_IM_SIZ_32b, 16, 16, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||
|
@ -6534,11 +6534,11 @@ void Interface_Update(PlayState* play) {
|
|||
D_80125A58 = Player_GetEnvironmentalHazard(play);
|
||||
|
||||
if (D_80125A58 == 1) {
|
||||
if (CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC) == EQUIP_VALUE_TUNIC_GORON || CVarGetInteger(CHEAT_CVAR("SuperTunic"), 0) != 0) {
|
||||
if (CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC) == EQUIP_VALUE_TUNIC_GORON || CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) != 0) {
|
||||
D_80125A58 = 0;
|
||||
}
|
||||
} else if ((Player_GetEnvironmentalHazard(play) >= 2) && (Player_GetEnvironmentalHazard(play) < 5)) {
|
||||
if (CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC) == EQUIP_VALUE_TUNIC_ZORA || CVarGetInteger(CHEAT_CVAR("SuperTunic"), 0) != 0) {
|
||||
if (CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC) == EQUIP_VALUE_TUNIC_ZORA || CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) != 0) {
|
||||
D_80125A58 = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -675,7 +675,7 @@ void Play_Init(GameState* thisx) {
|
|||
|
||||
Fault_AddClient(&D_801614B8, ZeldaArena_Display, NULL, NULL);
|
||||
// In order to keep bunny hood equipped on first load, we need to pre-set the age reqs for the item and slot
|
||||
if ((CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA && CVarGetInteger("gAdultBunnyHood", 0)) || CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0)) {
|
||||
if ((CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA && CVarGetInteger("gAdultBunnyHood", 0)) || CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0)) {
|
||||
gItemAgeReqs[ITEM_MASK_BUNNY] = AGE_REQ_NONE;
|
||||
if(INV_CONTENT(ITEM_TRADE_CHILD) == ITEM_MASK_BUNNY)
|
||||
gSlotAgeReqs[SLOT_TRADE_CHILD] = AGE_REQ_NONE;
|
||||
|
@ -1846,7 +1846,7 @@ void Play_Main(GameState* thisx) {
|
|||
LOG_NUM("1", 1);
|
||||
}
|
||||
|
||||
if (CVarGetInteger(CHEAT_CVAR("TimeSync"), 0)) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("TimeSync"), 0)) {
|
||||
const int maxRealDaySeconds = 86400;
|
||||
const int maxInGameDayTicks = 65536;
|
||||
|
||||
|
|
|
@ -597,7 +597,7 @@ s32 Player_ActionToModelGroup(Player* this, s32 actionParam) {
|
|||
void Player_SetModelsForHoldingShield(Player* this) {
|
||||
if ((this->stateFlags1 & PLAYER_STATE1_SHIELDING) &&
|
||||
((this->itemAction < 0) || (this->itemAction == this->heldItemAction))) {
|
||||
if ((CVarGetInteger(CHEAT_CVAR("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK) ||
|
||||
if ((CVarGetInteger(CVAR_CHEAT("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK) ||
|
||||
!Player_HoldsTwoHandedWeapon(this)) && !Player_IsChildWithHylianShield(this)) {
|
||||
this->rightHandType = PLAYER_MODELTYPE_RH_SHIELD;
|
||||
if (LINK_IS_CHILD && (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && (this->currentShield == PLAYER_SHIELD_MIRROR)) {
|
||||
|
@ -793,7 +793,7 @@ s32 Player_GetStrength(void) {
|
|||
return PLAYER_STR_NONE;
|
||||
}
|
||||
|
||||
if (CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0) || LINK_IS_ADULT) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0) || LINK_IS_ADULT) {
|
||||
return strengthUpgrade;
|
||||
} else if (strengthUpgrade != 0) {
|
||||
return PLAYER_STR_BRACELET;
|
||||
|
@ -953,9 +953,9 @@ s32 Player_GetEnvironmentalHazard(PlayState* play) {
|
|||
triggerEntry = &sTextTriggers[var];
|
||||
|
||||
if ((triggerEntry->flag != 0) && !(gSaveContext.textTriggerFlags & triggerEntry->flag) &&
|
||||
(((var == 0) && (this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CHEAT_CVAR("SuperTunic"), 0) == 0 && CVarGetInteger("gDisableTunicWarningText", 0) == 0)) ||
|
||||
(((var == 0) && (this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0 && CVarGetInteger("gDisableTunicWarningText", 0) == 0)) ||
|
||||
(((var == 1) || (var == 3)) && (this->currentBoots == PLAYER_BOOTS_IRON) &&
|
||||
(this->currentTunic != PLAYER_TUNIC_ZORA && CVarGetInteger(CHEAT_CVAR("SuperTunic"), 0) == 0 && CVarGetInteger("gDisableTunicWarningText", 0) == 0)))) {
|
||||
(this->currentTunic != PLAYER_TUNIC_ZORA && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0 && CVarGetInteger("gDisableTunicWarningText", 0) == 0)))) {
|
||||
Message_StartTextbox(play, triggerEntry->textId, NULL);
|
||||
gSaveContext.textTriggerFlags |= triggerEntry->flag;
|
||||
}
|
||||
|
@ -1914,7 +1914,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
|||
if (func_8002DD78(this) != 0) {
|
||||
Matrix_Translate(500.0f, 300.0f, 0.0f, MTXMODE_APPLY);
|
||||
Player_DrawHookshotReticle(
|
||||
play, this, ((this->heldItemAction == PLAYER_IA_HOOKSHOT) ? 38600.0f : 77600.0f) * CVarGetFloat(CHEAT_CVAR("HookshotReachMultiplier"), 1.0f));
|
||||
play, this, ((this->heldItemAction == PLAYER_IA_HOOKSHOT) ? 38600.0f : 77600.0f) * CVarGetFloat(CVAR_CHEAT("HookshotReachMultiplier"), 1.0f));
|
||||
}
|
||||
}
|
||||
} else if (CVarGetInteger("gBowReticle", 0) && (
|
||||
|
|
|
@ -412,7 +412,7 @@ BgImage* func_80096A74(PolygonType1* polygon1, PlayState* play) {
|
|||
|
||||
camera = GET_ACTIVE_CAM(play);
|
||||
camId = camera->camDataIdx;
|
||||
if (camId == -1 && (CVarGetInteger(CHEAT_CVAR("NoRestrictItems"), 0) || CVarGetInteger("gCrowdControl", 0))) {
|
||||
if (camId == -1 && (CVarGetInteger(CVAR_CHEAT("NoRestrictItems"), 0) || CVarGetInteger("gCrowdControl", 0))) {
|
||||
// This prevents a crash when using items that change the
|
||||
// camera (such as din's fire), voiding out or dying on
|
||||
// scenes with prerendered backgrounds.
|
||||
|
|
|
@ -221,7 +221,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
|||
u16* ptr;
|
||||
u16 checksum;
|
||||
|
||||
if (fileChooseCtx->buttonIndex != 0 || !CVarGetInteger("gDebugEnabled", 0)) {
|
||||
if (fileChooseCtx->buttonIndex != 0 || !CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) {
|
||||
Sram_InitNewSave();
|
||||
} else {
|
||||
Sram_InitDebugSave();
|
||||
|
@ -232,7 +232,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
|||
gSaveContext.dayTime = 0x6AAB;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
|
||||
if ((fileChooseCtx->buttonIndex == 0 && CVarGetInteger("gDebugEnabled", 0)) || CVarGetInteger("gNaviSkipCutscene", 0)) {
|
||||
if ((fileChooseCtx->buttonIndex == 0 && CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) || CVarGetInteger("gNaviSkipCutscene", 0)) {
|
||||
gSaveContext.cutsceneIndex = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue