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:
Malkierian 2024-04-21 08:25:06 -07:00 committed by GitHub
parent e2622af004
commit 33aef87907
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
55 changed files with 1290 additions and 1292 deletions

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(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;
}
}