mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-14 21:03:10 -04: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:
@@ -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;
|
||||
|
||||
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ void ArmsHook_Wait(ArmsHook* this, PlayState* play) {
|
||||
if (this->actor.parent == NULL) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
// get correct timer length for hookshot or longshot
|
||||
s32 length = ((player->heldItemAction == PLAYER_IA_HOOKSHOT) ? 13 : 26) * CVarGetFloat(CHEAT_CVAR("HookshotReachMultiplier"), 1.0f);
|
||||
s32 length = ((player->heldItemAction == PLAYER_IA_HOOKSHOT) ? 13 : 26) * CVarGetFloat(CVAR_CHEAT("HookshotReachMultiplier"), 1.0f);
|
||||
|
||||
ArmsHook_SetupAction(this, ArmsHook_Shoot);
|
||||
func_8002D9A4(&this->actor, 20.0f);
|
||||
|
||||
@@ -110,8 +110,8 @@ void EnBom_Init(Actor* thisx, PlayState* play) {
|
||||
Actor_SetScale(thisx, 0.01f);
|
||||
}
|
||||
|
||||
if (CVarGetFloat(CHEAT_CVAR("BombTimerMultiplier"), 1.0f) != 1.0f) {
|
||||
this->timer = (s32)(70 * CVarGetFloat(CHEAT_CVAR("BombTimerMultiplier"), 1.0f));
|
||||
if (CVarGetFloat(CVAR_CHEAT("BombTimerMultiplier"), 1.0f) != 1.0f) {
|
||||
this->timer = (s32)(70 * CVarGetFloat(CVAR_CHEAT("BombTimerMultiplier"), 1.0f));
|
||||
// Do the sound and scale immediately if GameInteractor hasn't already.
|
||||
if (!GameInteractor_GetRandomBombFuseTimerActive()) {
|
||||
Audio_PlayActorSound2(thisx, NA_SE_PL_TAKE_OUT_SHIELD);
|
||||
@@ -267,7 +267,7 @@ void EnBom_Update(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
|
||||
// With random bomb fuse timer or gBombTimerMultiplier, sound effect and scaling is already done on init.
|
||||
if (this->timer == 67 && !GameInteractor_GetRandomBombFuseTimerActive() && CVarGetFloat(CHEAT_CVAR("BombTimerMultiplier"), 1.0f) == 1.0f) {
|
||||
if (this->timer == 67 && !GameInteractor_GetRandomBombFuseTimerActive() && CVarGetFloat(CVAR_CHEAT("BombTimerMultiplier"), 1.0f) == 1.0f) {
|
||||
Audio_PlayActorSound2(thisx, NA_SE_PL_TAKE_OUT_SHIELD);
|
||||
Actor_SetScale(thisx, 0.01f);
|
||||
}
|
||||
@@ -281,7 +281,7 @@ void EnBom_Update(Actor* thisx, PlayState* play2) {
|
||||
Actor_UpdateBgCheckInfo(play, thisx, 5.0f, 10.0f, 15.0f, 0x1F);
|
||||
|
||||
if (thisx->params == BOMB_BODY) {
|
||||
float timerMultiplier = CVarGetFloat(CHEAT_CVAR("BombTimerMultiplier"), 1.0f);
|
||||
float timerMultiplier = CVarGetFloat(CVAR_CHEAT("BombTimerMultiplier"), 1.0f);
|
||||
if (this->timer < (timerMultiplier == 1.0f ? 63 : (s32)(70 * timerMultiplier - 7))) {
|
||||
dustAccel.y = 0.2f;
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ void EnCrow_FlyIdle(EnCrow* this, PlayState* play) {
|
||||
}
|
||||
if ((this->timer == 0) && (this->actor.xzDistToPlayer < 300.0f) && !(player->stateFlags1 & PLAYER_STATE1_ON_HORSE) &&
|
||||
(this->actor.yDistToWater < -40.0f) && (Player_GetMask(play) != PLAYER_MASK_SKULL) &&
|
||||
!CVarGetInteger(CHEAT_CVAR("NoKeeseGuayTarget"), 0)) {
|
||||
!CVarGetInteger(CVAR_CHEAT("NoKeeseGuayTarget"), 0)) {
|
||||
EnCrow_SetupDiveAttack(this);
|
||||
}
|
||||
}
|
||||
@@ -321,7 +321,7 @@ void EnCrow_DiveAttack(EnCrow* this, PlayState* play) {
|
||||
if ((this->timer == 0) || (Player_GetMask(play) == PLAYER_MASK_SKULL) ||
|
||||
(this->collider.base.atFlags & AT_HIT) || (this->actor.bgCheckFlags & 9) ||
|
||||
(player->stateFlags1 & PLAYER_STATE1_ON_HORSE) || (this->actor.yDistToWater > -40.0f) ||
|
||||
CVarGetInteger(CHEAT_CVAR("NoKeeseGuayTarget"), 0)) {
|
||||
CVarGetInteger(CVAR_CHEAT("NoKeeseGuayTarget"), 0)) {
|
||||
if (this->collider.base.atFlags & AT_HIT) {
|
||||
this->collider.base.atFlags &= ~AT_HIT;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_KAICHO_ATTACK);
|
||||
|
||||
@@ -416,7 +416,7 @@ void EnFirefly_FlyIdle(EnFirefly* this, PlayState* play) {
|
||||
}
|
||||
if ((this->timer == 0) && (this->actor.xzDistToPlayer < 200.0f) &&
|
||||
(Player_GetMask(play) != PLAYER_MASK_SKULL) &&
|
||||
!CVarGetInteger(CHEAT_CVAR("NoKeeseGuayTarget"), 0)) {
|
||||
!CVarGetInteger(CVAR_CHEAT("NoKeeseGuayTarget"), 0)) {
|
||||
EnFirefly_SetupDiveAttack(this);
|
||||
}
|
||||
}
|
||||
@@ -495,7 +495,7 @@ void EnFirefly_DiveAttack(EnFirefly* this, PlayState* play) {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, this->targetPitch, 0x100);
|
||||
}
|
||||
if ((this->timer == 0) || (Player_GetMask(play) == PLAYER_MASK_SKULL) ||
|
||||
CVarGetInteger(CHEAT_CVAR("NoKeeseGuayTarget"), 0)) {
|
||||
CVarGetInteger(CVAR_CHEAT("NoKeeseGuayTarget"), 0)) {
|
||||
EnFirefly_SetupFlyAway(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -679,7 +679,7 @@ void EnFish_UpdateCutscene(EnFish* this, PlayState* play) {
|
||||
// Update functions and Draw
|
||||
|
||||
void EnFish_OrdinaryUpdate(EnFish* this, PlayState* play) {
|
||||
if (this->timer > 0 && CVarGetInteger(CHEAT_CVAR("NoFishDespawn"), 0) == 0) {
|
||||
if (this->timer > 0 && CVarGetInteger(CVAR_CHEAT("NoFishDespawn"), 0) == 0) {
|
||||
this->timer--;
|
||||
}
|
||||
|
||||
|
||||
@@ -3312,7 +3312,7 @@ void EnHorse_CheckBoost(EnHorse* thisx, PlayState* play2) {
|
||||
this->stateFlags |= ENHORSE_BOOST;
|
||||
this->stateFlags |= ENHORSE_FIRST_BOOST_REGEN;
|
||||
this->stateFlags |= ENHORSE_FLAG_8;
|
||||
if (!CVarGetInteger(CHEAT_CVAR("InfiniteEponaBoost"), 0)) { this->numBoosts--; }
|
||||
if (!CVarGetInteger(CVAR_CHEAT("InfiniteEponaBoost"), 0)) { this->numBoosts--; }
|
||||
this->boostTimer = 0;
|
||||
if (this->numBoosts == 0) {
|
||||
this->boostRegenTime = 140;
|
||||
|
||||
@@ -213,7 +213,7 @@ void EnInsect_Init(Actor* thisx, PlayState* play2) {
|
||||
|
||||
// For bugs that aren't linked to a soil patch, we remove the "short lived" flag to prevent them from despawning
|
||||
// And exit early to not increment the "bugs dropped count"
|
||||
if (CVarGetInteger(CHEAT_CVAR("NoBugsDespawn"), 0) && this->soilActor == NULL) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("NoBugsDespawn"), 0) && this->soilActor == NULL) {
|
||||
this->unk_314 &= ~4;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ void func_80AE2C1C(EnRd* this, PlayState* play) {
|
||||
PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_CLIMBING_LADDER)) &&
|
||||
!(player->stateFlags2 & PLAYER_STATE2_GRABBED_BY_ENEMY)) {
|
||||
if (this->unk_306 == 0) {
|
||||
if (!(this->unk_312 & PLAYER_STATE2_GRABBED_BY_ENEMY) && !CVarGetInteger(CHEAT_CVAR("NoRedeadFreeze"), 0)) {
|
||||
if (!(this->unk_312 & PLAYER_STATE2_GRABBED_BY_ENEMY) && !CVarGetInteger(CVAR_CHEAT("NoRedeadFreeze"), 0)) {
|
||||
player->actor.freezeTimer = 40;
|
||||
func_8008EEAC(play, &this->actor);
|
||||
GET_PLAYER(play)->unk_684 = &this->actor;
|
||||
@@ -570,7 +570,7 @@ void func_80AE3834(EnRd* this, PlayState* play) {
|
||||
s16 temp_v0 = this->actor.yawTowardsPlayer - this->actor.shape.rot.y - this->unk_30E - this->unk_310;
|
||||
|
||||
if (ABS(temp_v0) < 0x2008) {
|
||||
if (!(this->unk_312 & 0x80) && !CVarGetInteger(CHEAT_CVAR("NoRedeadFreeze"), 0)) {
|
||||
if (!(this->unk_312 & 0x80) && !CVarGetInteger(CVAR_CHEAT("NoRedeadFreeze"), 0)) {
|
||||
player->actor.freezeTimer = 60;
|
||||
func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96);
|
||||
func_8008EEAC(play, &this->actor);
|
||||
|
||||
@@ -42,7 +42,7 @@ void EnRiverSound_Init(Actor* thisx, PlayState* play) {
|
||||
} else if (this->actor.params == RS_SARIAS_SONG) {
|
||||
// Always have leading music in rando
|
||||
if (
|
||||
CVarGetInteger(AUDIO_CVAR("LostWoodsConsistentVolume"), 0) ||
|
||||
CVarGetInteger(CVAR_AUDIO("LostWoodsConsistentVolume"), 0) ||
|
||||
((!CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) || CHECK_QUEST_ITEM(QUEST_SONG_SARIA)) && !IS_RANDO)
|
||||
) {
|
||||
Actor_Kill(&this->actor);
|
||||
|
||||
@@ -2073,7 +2073,7 @@ void Player_InitExplosiveIA(PlayState* play, Player* this) {
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, this->actor.shape.rot.y, 0, 0);
|
||||
if (spawnedActor != NULL) {
|
||||
if ((explosiveType != 0) && (play->bombchuBowlingStatus != 0)) {
|
||||
if (!CVarGetInteger(CHEAT_CVAR("InfiniteAmmo"), 0)) {
|
||||
if (!CVarGetInteger(CVAR_CHEAT("InfiniteAmmo"), 0)) {
|
||||
play->bombchuBowlingStatus--;
|
||||
}
|
||||
if (play->bombchuBowlingStatus == 0) {
|
||||
@@ -2493,10 +2493,10 @@ LinkAnimationHeader* func_808346C4(PlayState* play, Player* this) {
|
||||
|
||||
if (this->unk_870 < 0.5f) {
|
||||
return D_808543A4[Player_HoldsTwoHandedWeapon(this) &&
|
||||
!(CVarGetInteger(CHEAT_CVAR("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK))];
|
||||
!(CVarGetInteger(CVAR_CHEAT("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK))];
|
||||
} else {
|
||||
return D_808543AC[Player_HoldsTwoHandedWeapon(this) &&
|
||||
!(CVarGetInteger(CHEAT_CVAR("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK))];
|
||||
!(CVarGetInteger(CVAR_CHEAT("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK))];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2748,11 +2748,11 @@ s32 func_808350A4(PlayState* play, Player* this) {
|
||||
func_80834380(play, this, &item, &arrowType);
|
||||
|
||||
if (gSaveContext.minigameState == 1) {
|
||||
if (!CVarGetInteger(CHEAT_CVAR("InfiniteAmmo"), 0)) {
|
||||
if (!CVarGetInteger(CVAR_CHEAT("InfiniteAmmo"), 0)) {
|
||||
play->interfaceCtx.hbaAmmo--;
|
||||
}
|
||||
} else if (play->shootingGalleryStatus != 0) {
|
||||
if (!CVarGetInteger(CHEAT_CVAR("InfiniteAmmo"), 0)) {
|
||||
if (!CVarGetInteger(CVAR_CHEAT("InfiniteAmmo"), 0)) {
|
||||
play->shootingGalleryStatus--;
|
||||
}
|
||||
} else {
|
||||
@@ -4225,7 +4225,7 @@ s32 func_8083816C(s32 arg0) {
|
||||
}
|
||||
|
||||
void func_8083819C(Player* this, PlayState* play) {
|
||||
if (this->currentShield == PLAYER_SHIELD_DEKU && (CVarGetInteger(CHEAT_CVAR("FireproofDekuShield"), 0) == 0)) {
|
||||
if (this->currentShield == PLAYER_SHIELD_DEKU && (CVarGetInteger(CVAR_CHEAT("FireproofDekuShield"), 0) == 0)) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_SHIELD, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, 0, 0, 0, 1, true);
|
||||
Inventory_DeleteEquipment(play, EQUIP_TYPE_SHIELD);
|
||||
@@ -4338,18 +4338,18 @@ s32 func_808382DC(Player* this, PlayState* play) {
|
||||
|
||||
if (this->unk_870 < 0.5f) {
|
||||
anim = D_808543BC[Player_HoldsTwoHandedWeapon(this) &&
|
||||
!(CVarGetInteger(CHEAT_CVAR("ShieldTwoHanded"), 0) &&
|
||||
!(CVarGetInteger(CVAR_CHEAT("ShieldTwoHanded"), 0) &&
|
||||
(this->heldItemAction != PLAYER_IA_DEKU_STICK))];
|
||||
} else {
|
||||
anim = D_808543B4[Player_HoldsTwoHandedWeapon(this) &&
|
||||
!(CVarGetInteger(CHEAT_CVAR("ShieldTwoHanded"), 0) &&
|
||||
!(CVarGetInteger(CVAR_CHEAT("ShieldTwoHanded"), 0) &&
|
||||
(this->heldItemAction != PLAYER_IA_DEKU_STICK))];
|
||||
}
|
||||
LinkAnimation_PlayOnce(play, &this->upperSkelAnime, anim);
|
||||
} else {
|
||||
Player_AnimPlayOnce(play, this,
|
||||
D_808543C4[Player_HoldsTwoHandedWeapon(this) &&
|
||||
!(CVarGetInteger(CHEAT_CVAR("ShieldTwoHanded"), 0) &&
|
||||
!(CVarGetInteger(CVAR_CHEAT("ShieldTwoHanded"), 0) &&
|
||||
(this->heldItemAction != PLAYER_IA_DEKU_STICK))]);
|
||||
}
|
||||
}
|
||||
@@ -4406,7 +4406,7 @@ s32 func_808382DC(Player* this, PlayState* play) {
|
||||
((sp48 >= 0) &&
|
||||
SurfaceType_IsWallDamage(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId) &&
|
||||
(this->floorTypeTimer >= D_808544F4[sp48])) ||
|
||||
((sp48 >= 0) && ((this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CHEAT_CVAR("SuperTunic"), 0) == 0) ||
|
||||
((sp48 >= 0) && ((this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0) ||
|
||||
(this->floorTypeTimer >= D_808544F4[sp48])))) {
|
||||
this->floorTypeTimer = 0;
|
||||
this->actor.colChkInfo.damage = 4;
|
||||
@@ -5225,7 +5225,7 @@ s32 func_8083A6AC(Player* this, PlayState* play) {
|
||||
|
||||
if (BgCheck_EntityLineTest1(&play->colCtx, &this->actor.world.pos, &sp74, &sp68, &sp84, true, false, false,
|
||||
true, &sp80) &&
|
||||
((ABS(sp84->normal.y) < 600) || (CVarGetInteger(CHEAT_CVAR("ClimbEverything"), 0) != 0))) {
|
||||
((ABS(sp84->normal.y) < 600) || (CVarGetInteger(CVAR_CHEAT("ClimbEverything"), 0) != 0))) {
|
||||
f32 nx = COLPOLY_GET_NORMAL(sp84->normal.x);
|
||||
f32 ny = COLPOLY_GET_NORMAL(sp84->normal.y);
|
||||
f32 nz = COLPOLY_GET_NORMAL(sp84->normal.z);
|
||||
@@ -8504,7 +8504,7 @@ void func_80842A28(PlayState* play, Player* this) {
|
||||
}
|
||||
|
||||
void func_80842A88(PlayState* play, Player* this) {
|
||||
if (CVarGetInteger(CHEAT_CVAR("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
|
||||
Inventory_ChangeAmmo(ITEM_STICK, -1);
|
||||
Player_UseItem(play, this, ITEM_NONE);
|
||||
}
|
||||
@@ -8512,7 +8512,7 @@ void func_80842A88(PlayState* play, Player* this) {
|
||||
|
||||
s32 func_80842AC4(PlayState* play, Player* this) {
|
||||
if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && (this->unk_85C > 0.5f)) {
|
||||
if (AMMO(ITEM_STICK) != 0 && CVarGetInteger(CHEAT_CVAR("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
|
||||
if (AMMO(ITEM_STICK) != 0 && CVarGetInteger(CVAR_CHEAT("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
|
||||
EffectSsStick_Spawn(play, &this->bodyPartsPos[PLAYER_BODYPART_R_HAND],
|
||||
this->actor.shape.rot.y + 0x8000);
|
||||
this->unk_85C = 0.5f;
|
||||
@@ -8949,7 +8949,7 @@ static AnimSfxEntry D_808545F0[] = {
|
||||
};
|
||||
|
||||
void Player_Action_80843CEC(Player* this, PlayState* play) {
|
||||
if (this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CHEAT_CVAR("SuperTunic"), 0) == 0) {
|
||||
if (this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0) {
|
||||
if ((play->roomCtx.curRoom.behaviorType2 == ROOM_BEHAVIOR_TYPE2_3) || (sFloorType == 9) ||
|
||||
((func_80838144(sFloorType) >= 0) &&
|
||||
!SurfaceType_IsWallDamage(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId))) {
|
||||
@@ -10654,7 +10654,7 @@ void Player_ProcessSceneCollision(PlayState* play, Player* this) {
|
||||
sTouchedWallFlags = func_80041DB8(&play->colCtx, this->actor.wallPoly, this->actor.wallBgId);
|
||||
|
||||
// conflicts arise from these two being enabled at once, and with ClimbEverything on, FixVineFall is redundant anyway
|
||||
if (CVarGetInteger("gFixVineFall", 0) && !CVarGetInteger(CHEAT_CVAR("ClimbEverything"), 0)) {
|
||||
if (CVarGetInteger("gFixVineFall", 0) && !CVarGetInteger(CVAR_CHEAT("ClimbEverything"), 0)) {
|
||||
/* This fixes the "started climbing a wall and then immediately fell off" bug.
|
||||
* The main idea is if a climbing wall is detected, double-check that it will
|
||||
* still be valid once climbing begins by doing a second raycast with a small
|
||||
@@ -10723,7 +10723,7 @@ void Player_ProcessSceneCollision(PlayState* play, Player* this) {
|
||||
if ((this->actor.bgCheckFlags & 0x200) && (sShapeYawToTouchedWall < 0x3000)) {
|
||||
CollisionPoly* wallPoly = this->actor.wallPoly;
|
||||
|
||||
if ((ABS(wallPoly->normal.y) < 600) || (CVarGetInteger(CHEAT_CVAR("ClimbEverything"), 0) != 0)) {
|
||||
if ((ABS(wallPoly->normal.y) < 600) || (CVarGetInteger(CVAR_CHEAT("ClimbEverything"), 0) != 0)) {
|
||||
f32 sp8C = COLPOLY_GET_NORMAL(wallPoly->normal.x);
|
||||
f32 sp88 = COLPOLY_GET_NORMAL(wallPoly->normal.y);
|
||||
f32 sp84 = COLPOLY_GET_NORMAL(wallPoly->normal.z);
|
||||
@@ -10914,7 +10914,7 @@ void Player_UpdateCamAndSeqModes(PlayState* play, Player* this) {
|
||||
seqMode = SEQ_MODE_STILL;
|
||||
}
|
||||
|
||||
if (play->actorCtx.targetCtx.bgmEnemy != NULL && !CVarGetInteger(AUDIO_CVAR("EnemyBGMDisable"), 0)) {
|
||||
if (play->actorCtx.targetCtx.bgmEnemy != NULL && !CVarGetInteger(CVAR_AUDIO("EnemyBGMDisable"), 0)) {
|
||||
seqMode = SEQ_MODE_ENEMY;
|
||||
Audio_SetBgmEnemyVolume(sqrtf(play->actorCtx.targetCtx.bgmEnemy->xyzDistToPlayerSq));
|
||||
}
|
||||
@@ -10934,7 +10934,7 @@ static Color_RGBA8 D_808547C0 = { 255, 50, 0, 0 };
|
||||
void func_80848A04(PlayState* play, Player* this) {
|
||||
f32 temp;
|
||||
|
||||
if (CVarGetInteger(CHEAT_CVAR("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE) {
|
||||
f32 temp2 = 1.0f; // Secondary temporary variable to use with the alleged draw flame function
|
||||
this->unk_860 = 200; // Keeps the stick's flame lit
|
||||
this->unk_85C = 1.0f; // Ensures the stick is the proper length
|
||||
@@ -10942,20 +10942,20 @@ void func_80848A04(PlayState* play, Player* this) {
|
||||
0, 8); // I believe this draws the flame effect
|
||||
}
|
||||
|
||||
if (this->unk_85C == 0.0f && CVarGetInteger(CHEAT_CVAR("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
|
||||
if (this->unk_85C == 0.0f && CVarGetInteger(CVAR_CHEAT("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
|
||||
Player_UseItem(play, this, 0xFF);
|
||||
return;
|
||||
}
|
||||
|
||||
temp = 1.0f;
|
||||
if (DECR(this->unk_860) == 0 && CVarGetInteger(CHEAT_CVAR("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
|
||||
if (DECR(this->unk_860) == 0 && CVarGetInteger(CVAR_CHEAT("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
|
||||
Inventory_ChangeAmmo(ITEM_STICK, -1);
|
||||
this->unk_860 = 1;
|
||||
temp = 0.0f;
|
||||
this->unk_85C = temp;
|
||||
} else if (this->unk_860 > 200) {
|
||||
temp = (210 - this->unk_860) / 10.0f;
|
||||
} else if (this->unk_860 < 20 && CVarGetInteger(CHEAT_CVAR("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
|
||||
} else if (this->unk_860 < 20 && CVarGetInteger(CVAR_CHEAT("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
|
||||
temp = this->unk_860 / 20.0f;
|
||||
this->unk_85C = temp;
|
||||
}
|
||||
@@ -11001,7 +11001,7 @@ void Player_UpdateBodyBurn(PlayState* play, Player* this) {
|
||||
s32 sp58;
|
||||
s32 sp54;
|
||||
|
||||
if (this->currentTunic == PLAYER_TUNIC_GORON || CVarGetInteger(CHEAT_CVAR("SuperTunic"), 0) != 0) {
|
||||
if (this->currentTunic == PLAYER_TUNIC_GORON || CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) != 0) {
|
||||
sp54 = 20;
|
||||
} else {
|
||||
sp54 = (s32)(this->linearVelocity * 0.4f) + 1;
|
||||
@@ -11256,7 +11256,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
|
||||
func_808473D4(play, this);
|
||||
func_80836BEC(this, play);
|
||||
|
||||
if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && ((this->unk_860 != 0) || CVarGetInteger(CHEAT_CVAR("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE)) {
|
||||
if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && ((this->unk_860 != 0) || CVarGetInteger(CVAR_CHEAT("DekuStick"), DEKU_STICK_NORMAL) == DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE)) {
|
||||
func_80848A04(play, this);
|
||||
} else if ((this->heldItemAction == PLAYER_IA_FISHING_POLE) && (this->unk_860 < 0)) {
|
||||
this->unk_860++;
|
||||
@@ -14374,7 +14374,7 @@ void Player_Action_8084FBF4(Player* this, PlayState* play) {
|
||||
s32 func_8084FCAC(Player* this, PlayState* play) {
|
||||
sControlInput = &play->state.input[0];
|
||||
|
||||
if (CVarGetInteger("gDebugEnabled", 0) &&
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) &&
|
||||
((CHECK_BTN_ALL(sControlInput->cur.button, BTN_A | BTN_L | BTN_R) &&
|
||||
CHECK_BTN_ALL(sControlInput->press.button, BTN_B)) ||
|
||||
(CHECK_BTN_ALL(sControlInput->cur.button, BTN_L) && CHECK_BTN_ALL(sControlInput->press.button, BTN_DRIGHT)))) {
|
||||
|
||||
@@ -1025,7 +1025,7 @@ void FileChoose_UpdateRandomizer() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!SpoilerFileExists(CVarGetString("gSpoilerLog", "")) && !CVarGetInteger(RANDOMIZER_SEED_CVAR("DontGenerateSpoiler"), 0)) {
|
||||
if (!SpoilerFileExists(CVarGetString("gSpoilerLog", "")) && !CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0)) {
|
||||
CVarSetString("gSpoilerLog", "");
|
||||
fileSelectSpoilerFileLoaded = false;
|
||||
}
|
||||
@@ -1053,7 +1053,7 @@ void FileChoose_UpdateRandomizer() {
|
||||
Randomizer_LoadEntranceOverrides(fileLoc, silent);
|
||||
fileSelectSpoilerFileLoaded = true;
|
||||
|
||||
if (SpoilerFileExists(CVarGetString("gSpoilerLog", "")) && CVarGetInteger(RANDOMIZER_SEED_CVAR("DontGenerateSpoiler"), 0)) {
|
||||
if (SpoilerFileExists(CVarGetString("gSpoilerLog", "")) && CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0)) {
|
||||
remove(fileLoc);
|
||||
}
|
||||
}
|
||||
@@ -2945,7 +2945,7 @@ void FileChoose_LoadGame(GameState* thisx) {
|
||||
gSaveContext.fileNum = this->buttonIndex;
|
||||
gSaveContext.gameMode = 0;
|
||||
|
||||
if ((this->buttonIndex == FS_BTN_SELECT_FILE_1 && CVarGetInteger("gDebugEnabled", 0)) || this->buttonIndex == 0xFF) {
|
||||
if ((this->buttonIndex == FS_BTN_SELECT_FILE_1 && CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) || this->buttonIndex == 0xFF) {
|
||||
if (this->buttonIndex == 0xFF) {
|
||||
Sram_InitDebugSave();
|
||||
} else {
|
||||
@@ -3286,15 +3286,15 @@ void FileChoose_Main(GameState* thisx) {
|
||||
gSaveContext.skyboxTime += 0x10;
|
||||
}
|
||||
|
||||
if (CVarGetInteger(DEV_TOOLS_CVAR("SkipLogoTitle"), 0) && CVarGetInteger(DEV_TOOLS_CVAR("SaveFileID"), FASTFILE_1) <= FASTFILE_3 && !isFastFileIdIncompatible) {
|
||||
if (Save_Exist(CVarGetInteger(DEV_TOOLS_CVAR("SaveFileID"), FASTFILE_1)) && FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(CVarGetInteger(DEV_TOOLS_CVAR("SaveFileID"), FASTFILE_1)))) {
|
||||
this->buttonIndex = CVarGetInteger(DEV_TOOLS_CVAR("SaveFileID"), FASTFILE_1);
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("SkipLogoTitle"), 0) && CVarGetInteger(CVAR_DEVELOPER_TOOLS("SaveFileID"), FASTFILE_1) <= FASTFILE_3 && !isFastFileIdIncompatible) {
|
||||
if (Save_Exist(CVarGetInteger(CVAR_DEVELOPER_TOOLS("SaveFileID"), FASTFILE_1)) && FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(CVarGetInteger(CVAR_DEVELOPER_TOOLS("SaveFileID"), FASTFILE_1)))) {
|
||||
this->buttonIndex = CVarGetInteger(CVAR_DEVELOPER_TOOLS("SaveFileID"), FASTFILE_1);
|
||||
this->menuMode = FS_MENU_MODE_SELECT;
|
||||
this->selectMode = SM_LOAD_GAME;
|
||||
} else {
|
||||
isFastFileIdIncompatible = 1;
|
||||
}
|
||||
} else if (CVarGetInteger(DEV_TOOLS_CVAR("SkipLogoTitle"), 0) && CVarGetInteger(DEV_TOOLS_CVAR("SaveFileID"), FASTFILE_1) == FASTFILE_MAP_SELECT) {
|
||||
} else if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("SkipLogoTitle"), 0) && CVarGetInteger(CVAR_DEVELOPER_TOOLS("SaveFileID"), FASTFILE_1) == FASTFILE_MAP_SELECT) {
|
||||
this->buttonIndex = 0xFF;
|
||||
this->menuMode = FS_MENU_MODE_SELECT;
|
||||
this->selectMode = SM_LOAD_GAME;
|
||||
|
||||
@@ -1078,7 +1078,7 @@ void Select_PrintMenu(SelectContext* this, GfxPrint* printer) {
|
||||
GfxPrint_SetColor(printer, 200, 200, 55, 255);
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) {
|
||||
switch (gSaveContext.language) {
|
||||
case LANGUAGE_ENG:
|
||||
default:
|
||||
@@ -1105,7 +1105,7 @@ void Select_PrintMenu(SelectContext* this, GfxPrint* printer) {
|
||||
GfxPrint_SetColor(printer, 155, 55, 150, 255);
|
||||
|
||||
// Small position hack of the OPT=X text since german Link's Age overlap if translated
|
||||
if (CVarGetInteger("gDebugWarpScreenTranslation", 1) && gSaveContext.language == LANGUAGE_GER) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1) && gSaveContext.language == LANGUAGE_GER) {
|
||||
GfxPrint_SetPos(printer, 26, 26);
|
||||
} else {
|
||||
GfxPrint_SetPos(printer, 20, 26);
|
||||
@@ -1134,7 +1134,7 @@ void Better_Select_PrintMenu(SelectContext* this, GfxPrint* printer) {
|
||||
GfxPrint_SetColor(printer, 175, 175, 175, 255);
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) {
|
||||
switch (gSaveContext.language) {
|
||||
case LANGUAGE_ENG:
|
||||
default:
|
||||
@@ -1160,7 +1160,7 @@ void Better_Select_PrintMenu(SelectContext* this, GfxPrint* printer) {
|
||||
GfxPrint_SetColor(printer, 205, 100, 200, 255);
|
||||
GfxPrint_SetPos(printer, 3, 26);
|
||||
|
||||
if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) {
|
||||
switch (gSaveContext.language) {
|
||||
case LANGUAGE_ENG:
|
||||
default:
|
||||
@@ -1200,7 +1200,7 @@ void Select_PrintLoadingMessage(SelectContext* this, GfxPrint* printer) {
|
||||
GfxPrint_SetPos(printer, 10, 15);
|
||||
GfxPrint_SetColor(printer, 255, 255, 255, 255);
|
||||
randomMsg = Rand_ZeroOne() * ARRAY_COUNT(sLoadingMessages);
|
||||
if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) {
|
||||
switch (gSaveContext.language) {
|
||||
case LANGUAGE_ENG:
|
||||
default:
|
||||
@@ -1231,7 +1231,7 @@ static BetterSceneSelectAgeLabels sBetterAgeLabels[] = {
|
||||
void Select_PrintAgeSetting(SelectContext* this, GfxPrint* printer, s32 age) {
|
||||
GfxPrint_SetPos(printer, 4, 26);
|
||||
GfxPrint_SetColor(printer, 255, 255, 55, 255);
|
||||
if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) {
|
||||
switch (gSaveContext.language) {
|
||||
case LANGUAGE_ENG:
|
||||
default:
|
||||
@@ -1252,7 +1252,7 @@ void Select_PrintAgeSetting(SelectContext* this, GfxPrint* printer, s32 age) {
|
||||
void Better_Select_PrintAgeSetting(SelectContext* this, GfxPrint* printer, s32 age) {
|
||||
GfxPrint_SetPos(printer, 25, 25);
|
||||
GfxPrint_SetColor(printer, 100, 100, 100, 255);
|
||||
if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) {
|
||||
switch (gSaveContext.language) {
|
||||
case LANGUAGE_ENG:
|
||||
case LANGUAGE_FRA:
|
||||
@@ -1268,7 +1268,7 @@ void Better_Select_PrintAgeSetting(SelectContext* this, GfxPrint* printer, s32 a
|
||||
}
|
||||
|
||||
GfxPrint_SetColor(printer, 55, 200, 50, 255);
|
||||
if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) {
|
||||
switch (gSaveContext.language) {
|
||||
case LANGUAGE_ENG:
|
||||
default:
|
||||
@@ -1304,7 +1304,7 @@ void Select_PrintCutsceneSetting(SelectContext* this, GfxPrint* printer, u16 csI
|
||||
};
|
||||
|
||||
char* label;
|
||||
int lang = CVarGetInteger("gDebugWarpScreenTranslation", 1) ? gSaveContext.language + 1 : 0;
|
||||
int lang = CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1) ? gSaveContext.language + 1 : 0;
|
||||
|
||||
GfxPrint_SetPos(printer, 4, 25);
|
||||
GfxPrint_SetColor(printer, 255, 255, 55, 255);
|
||||
@@ -1367,7 +1367,7 @@ void Better_Select_PrintTimeSetting(SelectContext* this, GfxPrint* printer) {
|
||||
GfxPrint_SetColor(printer, 100, 100, 100, 255);
|
||||
|
||||
if (gSaveContext.dayTime > 0xC000 || gSaveContext.dayTime < 0x4555) {
|
||||
if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) {
|
||||
switch (gSaveContext.language) {
|
||||
case LANGUAGE_ENG:
|
||||
default:
|
||||
@@ -1384,7 +1384,7 @@ void Better_Select_PrintTimeSetting(SelectContext* this, GfxPrint* printer) {
|
||||
label = "Night";
|
||||
}
|
||||
} else {
|
||||
if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) {
|
||||
switch (gSaveContext.language) {
|
||||
case LANGUAGE_ENG:
|
||||
default:
|
||||
@@ -1401,7 +1401,7 @@ void Better_Select_PrintTimeSetting(SelectContext* this, GfxPrint* printer) {
|
||||
label = "Day";
|
||||
}
|
||||
}
|
||||
if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) {
|
||||
switch (gSaveContext.language) {
|
||||
case LANGUAGE_ENG:
|
||||
default:
|
||||
@@ -1436,7 +1436,7 @@ void Better_Select_PrintMQSetting(SelectContext* this, GfxPrint* printer) {
|
||||
GfxPrint_Printf(printer, "MQ:");
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gDebugWarpScreenTranslation", 1)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"), 1)) {
|
||||
switch (gSaveContext.language) {
|
||||
case LANGUAGE_ENG:
|
||||
default:
|
||||
@@ -1533,7 +1533,7 @@ void Select_Draw(SelectContext* this) {
|
||||
void Select_Main(GameState* thisx) {
|
||||
SelectContext* this = (SelectContext*)thisx;
|
||||
|
||||
if (this->isBetterWarp != CVarGetInteger("gBetterDebugWarpScreen", 0)) {
|
||||
if (this->isBetterWarp != CVarGetInteger(CVAR_DEVELOPER_TOOLS("BetterDebugWarpScreen"), 0)) {
|
||||
Select_SwitchBetterWarpMode(this, !this->isBetterWarp);
|
||||
}
|
||||
|
||||
@@ -1639,5 +1639,5 @@ void Select_Init(GameState* thisx) {
|
||||
|
||||
CVarClear("gBetterDebugWarpScreenMQMode");
|
||||
CVarClear("gBetterDebugWarpScreenMQModeScene");
|
||||
Select_SwitchBetterWarpMode(this, CVarGetInteger("gBetterDebugWarpScreen", 0));
|
||||
Select_SwitchBetterWarpMode(this, CVarGetInteger(CVAR_DEVELOPER_TOOLS("BetterDebugWarpScreen"), 0));
|
||||
}
|
||||
|
||||
@@ -245,13 +245,13 @@ void Title_Main(GameState* thisx) {
|
||||
POLY_OPA_DISP = gfx;
|
||||
}
|
||||
|
||||
if (this->exit || CVarGetInteger(DEV_TOOLS_CVAR("SkipLogoTitle"), 0)) {
|
||||
if (this->exit || CVarGetInteger(CVAR_DEVELOPER_TOOLS("SkipLogoTitle"), 0)) {
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = 0xFF;
|
||||
gSaveContext.gameMode = 1;
|
||||
this->state.running = false;
|
||||
|
||||
if (gLoadFileSelect || CVarGetInteger(DEV_TOOLS_CVAR("SkipLogoTitle"), 0))
|
||||
if (gLoadFileSelect || CVarGetInteger(CVAR_DEVELOPER_TOOLS("SkipLogoTitle"), 0))
|
||||
SET_NEXT_GAMESTATE(&this->state, FileChoose_Init, FileChooseContext);
|
||||
else
|
||||
SET_NEXT_GAMESTATE(&this->state, Opening_Init, OpeningContext);
|
||||
|
||||
@@ -756,7 +756,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
||||
|
||||
for (rowStart = 0, j = 0, temp = 0, i = 0; i < 4; i++, rowStart += 4, j += 16) {
|
||||
gSPVertex(POLY_KAL_DISP++, &pauseCtx->equipVtx[j], 16, 0);
|
||||
bool drawGreyItems = !CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0);
|
||||
bool drawGreyItems = !CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0);
|
||||
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
|
||||
point = CUR_UPG_VALUE(sChildUpgrades[i]);
|
||||
if ((point != 0) && (CUR_UPG_VALUE(sChildUpgrades[i]) != 0)) {
|
||||
|
||||
@@ -340,7 +340,7 @@ void KaleidoScope_HandleItemCycles(PlayState* play) {
|
||||
gSlotAgeReqs[SLOT_TRADE_CHILD] =
|
||||
(
|
||||
((CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA) && CVarGetInteger("gAdultBunnyHood", 0)) ||
|
||||
CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0)
|
||||
CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0)
|
||||
) &&
|
||||
INV_CONTENT(ITEM_TRADE_CHILD) == ITEM_MASK_BUNNY
|
||||
? AGE_REQ_NONE
|
||||
@@ -349,7 +349,7 @@ void KaleidoScope_HandleItemCycles(PlayState* play) {
|
||||
//also update the age requirement for the bunny hood itself
|
||||
gItemAgeReqs[ITEM_MASK_BUNNY] =
|
||||
((CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA) && CVarGetInteger("gAdultBunnyHood", 0)) ||
|
||||
CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0)
|
||||
CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0)
|
||||
? AGE_REQ_NONE
|
||||
: AGE_REQ_CHILD;
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ extern u8 gAreaGsFlags[];
|
||||
#define AGE_REQ_CHILD LINK_AGE_CHILD
|
||||
#define AGE_REQ_NONE 9
|
||||
|
||||
#define CHECK_AGE_REQ_EQUIP(i, j) (CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0) || (gEquipAgeReqs[i][j] == AGE_REQ_NONE) || (gEquipAgeReqs[i][j] == ((void)0, gSaveContext.linkAge)))
|
||||
#define CHECK_AGE_REQ_SLOT(slotIndex) (CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0) || (gSlotAgeReqs[slotIndex] == AGE_REQ_NONE) || gSlotAgeReqs[slotIndex] == ((void)0, gSaveContext.linkAge))
|
||||
#define CHECK_AGE_REQ_ITEM(itemIndex) (CVarGetInteger(CHEAT_CVAR("TimelessEquipment"), 0) || (gItemAgeReqs[itemIndex] == AGE_REQ_NONE) || (gItemAgeReqs[itemIndex] == gSaveContext.linkAge))
|
||||
#define CHECK_AGE_REQ_EQUIP(i, j) (CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0) || (gEquipAgeReqs[i][j] == AGE_REQ_NONE) || (gEquipAgeReqs[i][j] == ((void)0, gSaveContext.linkAge)))
|
||||
#define CHECK_AGE_REQ_SLOT(slotIndex) (CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0) || (gSlotAgeReqs[slotIndex] == AGE_REQ_NONE) || gSlotAgeReqs[slotIndex] == ((void)0, gSaveContext.linkAge))
|
||||
#define CHECK_AGE_REQ_ITEM(itemIndex) (CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0) || (gItemAgeReqs[itemIndex] == AGE_REQ_NONE) || (gItemAgeReqs[itemIndex] == gSaveContext.linkAge))
|
||||
|
||||
void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx);
|
||||
s32 KaleidoScope_UpdateQuestStatusPoint(PauseContext* pauseCtx, s32 point);
|
||||
|
||||
@@ -1084,7 +1084,7 @@ void KaleidoScope_HandlePageToggles(PauseContext* pauseCtx, Input* input) {
|
||||
PageLeft_BTN = BTN_L;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gDebugEnabled", 0) && (pauseCtx->debugState == 0) && CHECK_BTN_ALL(input->press.button, Debug_BTN)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && (pauseCtx->debugState == 0) && CHECK_BTN_ALL(input->press.button, Debug_BTN)) {
|
||||
pauseCtx->debugState = 1;
|
||||
return;
|
||||
}
|
||||
@@ -1963,7 +1963,7 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
||||
POLY_KAL_DISP = KaleidoScope_QuadTextureIA4(POLY_KAL_DISP, pauseCtx->nameSegment, 128, 16, 0);
|
||||
}
|
||||
|
||||
if (pauseCtx->pageIndex == PAUSE_MAP && CVarGetInteger(DEV_TOOLS_CVAR("SkulltulaDebugEnabled"), 0) != 0) {
|
||||
if (pauseCtx->pageIndex == PAUSE_MAP && CVarGetInteger(CVAR_DEVELOPER_TOOLS("SkulltulaDebugEnabled"), 0) != 0) {
|
||||
if (YREG(7) != 0) {
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
osSyncPrintf("キンスタ数(%d) Get_KIN_STA=%x (%x) (%x)\n", YREG(6), GET_GS_FLAGS(YREG(6)),
|
||||
@@ -3994,7 +3994,7 @@ void KaleidoScope_Update(PlayState* play)
|
||||
// Boss Rush skips past the "Save?" window when pressing B while paused.
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_START) ||
|
||||
(CHECK_BTN_ALL(input->press.button, BTN_B) && IS_BOSS_RUSH)) {
|
||||
if (CVarGetInteger(CHEAT_CVAR("EasyPauseBuffer"), 0) || CVarGetInteger(CHEAT_CVAR("EasyInputBuffer"), 0)) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("EasyPauseBuffer"), 0) || CVarGetInteger(CVAR_CHEAT("EasyInputBuffer"), 0)) {
|
||||
// Easy pause buffer is 13 frames, 12 for kaledio to end, and one more to advance a single frame
|
||||
CVarSetInteger("gCheatEasyPauseBufferTimer", 13);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user