All MenuBar enhancement CVars done. (#4064)

This commit is contained in:
Malkierian 2024-04-25 17:31:28 -07:00 committed by GitHub
commit 56d8dd6d8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
123 changed files with 1203 additions and 1200 deletions

View file

@ -205,7 +205,7 @@ u8 Inventory_DeleteEquipment(PlayState* play, s16 equipment) {
if (equipment == EQUIP_TYPE_TUNIC) {
gSaveContext.equips.equipment |= EQUIP_VALUE_TUNIC_KOKIRI << (EQUIP_TYPE_TUNIC * 4);
// non-vanilla: remove goron and zora tunics from item buttons if assignable tunics is on
if (CVarGetInteger("gAssignableTunicsAndBoots", 0) && equipValue != EQUIP_VALUE_TUNIC_KOKIRI) {
if (CVarGetInteger(CVAR_ENHANCEMENT("AssignableTunicsAndBoots"), 0) && equipValue != EQUIP_VALUE_TUNIC_KOKIRI) {
ItemID item = (equipValue == EQUIP_VALUE_TUNIC_GORON ? ITEM_TUNIC_GORON : ITEM_TUNIC_ZORA);
for (int i = 1; i < ARRAY_COUNT(gSaveContext.equips.buttonItems); i++) {
if (gSaveContext.equips.buttonItems[i] == item) {

View file

@ -1608,7 +1608,7 @@ void func_800ED458(s32 arg0) {
if (D_80130F3C != 0 && sOcarinaDropInputTimer != 0) {
sOcarinaDropInputTimer--;
if (!CVarGetInteger("gDpadNoDropOcarinaInput", 0)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("DpadNoDropOcarinaInput"), 0)) {
return;
}
}
@ -2067,15 +2067,15 @@ void Audio_OcaMemoryGameStart(u8 minigameRound) {
u8 i;
// #region SOH [Enhancement]
if (CVarGetInteger("gCustomizeOcarinaGame", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("CustomizeOcarinaGame"), 0)) {
u8 startingNotes = 3;
u8 roundOneCount = CVarGetInteger("gOcarinaGameRoundOneNotes", 5);
u8 roundTwoCount = CVarGetInteger("gOcarinaGameRoundTwoNotes", 6);
u8 roundThreeCount = CVarGetInteger("gOcarinaGameRoundThreeNotes", 8);
u8 roundOneCount = CVarGetInteger(CVAR_ENHANCEMENT("OcarinaGame.RoundOneNotes"), 5);
u8 roundTwoCount = CVarGetInteger(CVAR_ENHANCEMENT("OcarinaGame.RoundTwoNotes"), 6);
u8 roundThreeCount = CVarGetInteger(CVAR_ENHANCEMENT("OcarinaGame.RoundThreeNotes"), 8);
u8 modMinigameNoteCnts[] = { roundOneCount, roundTwoCount, roundThreeCount };
startingNotes = CVarGetInteger("gOcarinaGameStartingNotes", 3);
startingNotes = CVarGetInteger(CVAR_ENHANCEMENT("OcarinaGame.StartingNotes"), 3);
if (minigameRound > 2) {
minigameRound = 2;
@ -2118,9 +2118,9 @@ s32 Audio_OcaMemoryGameGenNote(void) {
}
// #region SOH [Enhancement]
if (CVarGetInteger("gCustomizeOcarinaGame", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("CustomizeOcarinaGame"), 0)) {
int noteSpeed = 0x2D;
noteSpeed = noteSpeed / CVarGetInteger("gOcarinaGameNoteSpeed", 1);
noteSpeed = noteSpeed / CVarGetInteger(CVAR_ENHANCEMENT("OcarinaGame.NoteSpeed"), 1);
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].noteIdx = rndNote;
sOcarinaSongs[OCARINA_SONG_MEMORY_GAME][sOcaMinigameAppendPos].unk_02 = noteSpeed;

View file

@ -6,7 +6,7 @@ s32 sShrinkWindowVal = 0;
s32 sShrinkWindowCurrentVal = 0;
void ShrinkWindow_SetVal(s32 value) {
if (CVarGetInteger("gDisableBlackBars", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("DisableBlackBars"), 0)) {
sShrinkWindowVal = 0;
return;
}
@ -21,7 +21,7 @@ u32 ShrinkWindow_GetVal(void) {
}
void ShrinkWindow_SetCurrentVal(s32 currentVal) {
if (CVarGetInteger("gDisableBlackBars", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("DisableBlackBars"), 0)) {
sShrinkWindowCurrentVal = 0;
return;
}

View file

@ -1228,7 +1228,7 @@ void Actor_Init(Actor* actor, PlayState* play) {
actor->uncullZoneForward = 1000.0f;
actor->uncullZoneScale = 350.0f;
actor->uncullZoneDownward = 700.0f;
if (CVarGetInteger("gDisableDrawDistance", 0) != 0 && actor->id != ACTOR_EN_TORCH2 && actor->id != ACTOR_EN_BLKOBJ // Extra check for Dark Link and his room
if (CVarGetInteger(CVAR_ENHANCEMENT("DisableDrawDistance"), 0) != 0 && actor->id != ACTOR_EN_TORCH2 && actor->id != ACTOR_EN_BLKOBJ // Extra check for Dark Link and his room
&& actor->id != ACTOR_EN_HORSE // Check for Epona, else if we call her she will spawn at the other side of the map + we can hear her during the title screen sequence
&& actor->id != ACTOR_EN_HORSE_GANON && actor->id != ACTOR_EN_HORSE_ZELDA // check for Zelda's and Ganondorf's horses that will always be scene during cinematic whith camera paning
&& (play->sceneNum != SCENE_DODONGOS_CAVERN && actor->id != ACTOR_EN_ZF)) { // Check for DC and Lizalfos for the case where the miniboss music would still play under certains conditions and changing room
@ -2350,7 +2350,7 @@ void Actor_DrawFaroresWindPointer(PlayState* play) {
D_8015BC14 = 60;
D_8015BC18 = 1.0f;
} else if (D_8015BC14) {
D_8015BC14-= CVarGetInteger("gFastFarores", 0) ? 5 : 1;
D_8015BC14-= CVarGetInteger(CVAR_ENHANCEMENT("FastFarores"), 0) ? 5 : 1;
} else if (D_8015BC18 > 0.0f) {
static Vec3f effectVel = { 0.0f, -0.05f, 0.0f };
static Vec3f effectAccel = { 0.0f, -0.025f, 0.0f };
@ -2898,7 +2898,7 @@ s32 func_800314B0(PlayState* play, Actor* actor) {
s32 func_800314D4(PlayState* play, Actor* actor, Vec3f* arg2, f32 arg3) {
f32 var;
if (CVarGetInteger("gDisableDrawDistance", 0) != 0 && actor->id != ACTOR_EN_TORCH2 && actor->id != ACTOR_EN_BLKOBJ // Extra check for Dark Link and his room
if (CVarGetInteger(CVAR_ENHANCEMENT("DisableDrawDistance"), 0) != 0 && actor->id != ACTOR_EN_TORCH2 && actor->id != ACTOR_EN_BLKOBJ // Extra check for Dark Link and his room
&& actor->id != ACTOR_EN_HORSE // Check for Epona, else if we call her she will spawn at the other side of the map + we can hear her during the title screen sequence
&& actor->id != ACTOR_EN_HORSE_GANON && actor->id != ACTOR_EN_HORSE_ZELDA // check for Zelda's and Ganondorf's horses that will always be scene during cinematic whith camera paning
&& (play->sceneNum != SCENE_DODONGOS_CAVERN && actor->id != ACTOR_EN_ZF)) { // Check for DC and Lizalfos for the case where the miniboss music would still play under certains conditions and changing room
@ -3192,7 +3192,7 @@ int gMapLoading = 0;
Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ,
s16 rotX, s16 rotY, s16 rotZ, s16 params, s16 canRandomize) {
uint8_t tryRandomizeEnemy = CVarGetInteger("gRandomizedEnemies", 0) && gSaveContext.fileNum >= 0 && gSaveContext.fileNum <= 2 && canRandomize;
uint8_t tryRandomizeEnemy = CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && gSaveContext.fileNum >= 0 && gSaveContext.fileNum <= 2 && canRandomize;
if (tryRandomizeEnemy) {
if (!GetRandomizedEnemy(play, &actorId, &posX, &posY, &posZ, &rotX, &rotY, &rotZ, &params)) {
@ -3221,7 +3221,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
objBankIndex = Object_GetIndex(&gPlayState->objectCtx, dbEntry->objectId);
if (objBankIndex < 0 && (!gMapLoading || CVarGetInteger("gRandomizedEnemies", 0))) {
if (objBankIndex < 0 && (!gMapLoading || CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0))) {
objBankIndex = 0;
}
@ -3299,7 +3299,7 @@ Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, PlayState* play
// Gohma (z_boss_goma.c), the Stalchildren spawner (z_en_encount1.c) and the falling platform spawning Stalfos in
// Forest Temple (z_bg_mori_bigst.c) that normally rely on this behaviour are changed when
// Enemy Rando is on so they still work properly even without assigning a parent.
if (CVarGetInteger("gRandomizedEnemies", 0) && (spawnedActor->id == ACTOR_EN_FLOORMAS || spawnedActor->id == ACTOR_EN_PEEHAT)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && (spawnedActor->id == ACTOR_EN_FLOORMAS || spawnedActor->id == ACTOR_EN_PEEHAT)) {
return spawnedActor;
}

View file

@ -1239,7 +1239,7 @@ f32 Camera_LERPClampDist(Camera* camera, f32 dist, f32 min, f32 max) {
camera->rUpdateRateInv = Camera_LERPCeilF(rUpdateRateInvTarget, camera->rUpdateRateInv, PCT(OREG(25)), 0.1f);
return Camera_LERPCeilF(distTarget, camera->dist, 1.0f / camera->rUpdateRateInv,
CVarGetInteger("gFixCameraDrift", 0) ? 0.0f : 0.2f);
CVarGetInteger(CVAR_ENHANCEMENT("FixCameraDrift"), 0) ? 0.0f : 0.2f);
}
f32 Camera_ClampDist(Camera* camera, f32 dist, f32 minDist, f32 maxDist, s16 timer) {
@ -1262,7 +1262,7 @@ f32 Camera_ClampDist(Camera* camera, f32 dist, f32 minDist, f32 maxDist, s16 tim
camera->rUpdateRateInv = Camera_LERPCeilF(rUpdateRateInvTarget, camera->rUpdateRateInv, PCT(OREG(25)), 0.1f);
return Camera_LERPCeilF(distTarget, camera->dist, 1.0f / camera->rUpdateRateInv,
CVarGetInteger("gFixCameraDrift", 0) ? 0.0f : 0.2f);
CVarGetInteger(CVAR_ENHANCEMENT("FixCameraDrift"), 0) ? 0.0f : 0.2f);
}
s16 Camera_CalcDefaultPitch(Camera* camera, s16 arg1, s16 arg2, s16 arg3) {
@ -1710,7 +1710,7 @@ s32 Camera_Normal1(Camera* camera) {
Camera_Vec3fVecSphGeoAdd(eyeNext, at, &eyeAdjustment);
if ((camera->status == CAM_STAT_ACTIVE) && (!(norm1->interfaceFlags & 0x10))) {
anim->swingYawTarget = BINANG_ROT180(camera->playerPosRot.rot.y);
if (!CVarGetInteger("gFixCameraSwing", 0)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("FixCameraSwing"), 0)) {
if (anim->startSwingTimer > 0) {
func_80046E20(camera, &eyeAdjustment, norm1->distMin, norm1->unk_0C, &sp98, &anim->swing);
} else {
@ -1749,7 +1749,7 @@ s32 Camera_Normal1(Camera* camera) {
}
// crit wiggle
if(!CVarGetInteger("gDisableCritWiggle",0)) {
if(!CVarGetInteger(CVAR_ENHANCEMENT("DisableCritWiggle"),0)) {
if (gSaveContext.health <= 16 && ((camera->play->state.frames % 256) == 0)) {
wiggleAdj = Rand_ZeroOne() * 10000.0f;
camera->inputDir.y = wiggleAdj + camera->inputDir.y;
@ -4726,7 +4726,7 @@ s32 Camera_Unique1(Camera* camera) {
anim->timer--;
}
sp8C.yaw = Camera_LERPFloorS(anim->yawTarget, eyeNextAtOffset.yaw, 0.5f, CVarGetInteger("gFixHangingLedgeSwingRate", 0) ? 0xA : 0x2710);
sp8C.yaw = Camera_LERPFloorS(anim->yawTarget, eyeNextAtOffset.yaw, 0.5f, CVarGetInteger(CVAR_ENHANCEMENT("FixHangingLedgeSwingRate"), 0) ? 0xA : 0x2710);
Camera_Vec3fVecSphGeoAdd(eyeNext, at, &sp8C);
*eye = *eyeNext;
Camera_BGCheck(camera, at, eye);

View file

@ -3047,7 +3047,7 @@ void CollisionCheck_ApplyDamage(PlayState* play, CollisionCheckContext* colChkCt
collider->actor->colChkInfo.damage += damage;
}
if (CVarGetInteger("gIvanCoopModeEnabled", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("IvanCoopModeEnabled"), 0)) {
collider->actor->colChkInfo.damage *= GET_PLAYER(play)->ivanDamageMultiplier;
}
}
@ -3667,7 +3667,7 @@ u8 CollisionCheck_GetSwordDamage(s32 dmgFlags, PlayState* play) {
damage = 8;
}
if (CVarGetInteger("gIvanCoopModeEnabled", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("IvanCoopModeEnabled"), 0)) {
damage *= GET_PLAYER(play)->ivanDamageMultiplier;
}

View file

@ -430,8 +430,8 @@ void Regs_InitDataImpl(void) {
WREG(28) = 0;
R_OW_MINIMAP_X = 238;
R_OW_MINIMAP_Y = 164;
if (!CVarGetInteger("gEnhancements.RememberMapToggleState", 0)) {
R_MINIMAP_DISABLED = CVarGetInteger("gMinimalUI", 0);
if (!CVarGetInteger(CVAR_ENHANCEMENT("RememberMapToggleState"), 0)) {
R_MINIMAP_DISABLED = CVarGetInteger(CVAR_ENHANCEMENT("MinimalUI"), 0);
}
WREG(32) = 122;
WREG(33) = 60;

View file

@ -512,9 +512,9 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
}
bool playCutscene = false;
if (!CVarGetInteger("gCreditsFix", 1) && (cmd->startFrame == csCtx->frames)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("CreditsFix"), 1) && (cmd->startFrame == csCtx->frames)) {
playCutscene = true;
} else if (CVarGetInteger("gCreditsFix", 1)) {
} else if (CVarGetInteger(CVAR_ENHANCEMENT("CreditsFix"), 1)) {
u16 delay = 0;
// HACK: Align visual timing with audio during credits sequence
@ -616,7 +616,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
play->transitionType = TRANS_TYPE_INSTANT;
break;
case 8:
if (CVarGetInteger("gBetterFW", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("BetterFarore"), 0)) {
FaroresWindData tempFW = gSaveContext.backupFW;
gSaveContext.backupFW = gSaveContext.fw;
gSaveContext.fw = tempFW;

View file

@ -333,7 +333,7 @@ void EnItem00_SetupAction(EnItem00* this, EnItem00ActionFunc actionFunc) {
void EnItem00_SetObjectDependency(EnItem00* this, PlayState* play, s16 objectIndex) {
// Remove object dependency for Enemy Randomizer and Crowd Control to allow Like-likes to
// drop equipment correctly in rooms where Like-likes normally don't spawn.
if (CVarGetInteger("gRandomizedEnemies", 0) || CVarGetInteger("gCrowdControl", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || CVarGetInteger("gCrowdControl", 0)) {
this->actor.objBankIndex = 0;
} else {
this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, objectIndex);
@ -781,7 +781,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
(this->actor.params >= ITEM00_ARROWS_SMALL && this->actor.params <= ITEM00_SMALL_KEY) ||
this->actor.params == ITEM00_BOMBS_A || this->actor.params == ITEM00_ARROWS_SINGLE ||
this->actor.params == ITEM00_BOMBS_SPECIAL || this->actor.params == ITEM00_BOMBCHU) {
if (CVarGetInteger("gNewDrops", 0) ||
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) ||
// Keys in randomizer need to always rotate for their GID replacement
(IS_RANDO && this->actor.params == ITEM00_SMALL_KEY)) {
this->actor.shape.rot.y += 960;
@ -1008,35 +1008,35 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
if (!(this->unk_156 & this->unk_158)) {
switch (this->actor.params) {
case ITEM00_RUPEE_GREEN:
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 25.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_RUPEE_GREEN);
break;
}
case ITEM00_RUPEE_BLUE:
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 25.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_RUPEE_BLUE);
break;
}
case ITEM00_RUPEE_RED:
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 25.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_RUPEE_RED);
break;
}
case ITEM00_RUPEE_ORANGE:
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 17.5f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_RUPEE_GOLD);
break;
}
case ITEM00_RUPEE_PURPLE:
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 17.5f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_RUPEE_PURPLE);
@ -1046,7 +1046,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
}
break;
case ITEM00_HEART_PIECE:
if (CVarGetInteger("gNewDrops", 0) && !IS_RANDO) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) && !IS_RANDO) {
mtxScale = 21.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_HEART_PIECE);
@ -1059,7 +1059,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
break;
case ITEM00_HEART:
// Only change despawn-able recovery hearts
if (CVarGetInteger("gNewDrops", 0) && this->unk_15A >= 0) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) && this->unk_15A >= 0) {
mtxScale = 16.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_HEART);
@ -1085,7 +1085,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
case ITEM00_BOMBS_A:
case ITEM00_BOMBS_B:
case ITEM00_BOMBS_SPECIAL:
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 8.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_BOMB);
@ -1093,70 +1093,70 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
}
case ITEM00_ARROWS_SINGLE:
case ITEM00_ARROWS_SMALL:
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 7.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_ARROWS_SMALL);
break;
}
case ITEM00_ARROWS_MEDIUM:
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 7.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_ARROWS_MEDIUM);
break;
}
case ITEM00_ARROWS_LARGE:
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 7.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_ARROWS_LARGE);
break;
}
case ITEM00_NUTS:
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 9.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_NUTS);
break;
}
case ITEM00_STICK:
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 7.5f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_STICK);
break;
}
case ITEM00_MAGIC_LARGE:
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 8.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_MAGIC_LARGE);
break;
}
case ITEM00_MAGIC_SMALL:
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 8.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_MAGIC_SMALL);
break;
}
case ITEM00_SEEDS:
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 7.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_SEEDS);
break;
}
case ITEM00_BOMBCHU:
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 9.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_BOMBCHU);
break;
}
case ITEM00_SMALL_KEY:
if (CVarGetInteger("gNewDrops", 0) && !IS_RANDO) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) && !IS_RANDO) {
mtxScale = 8.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_KEY_SMALL);
@ -1523,7 +1523,7 @@ s16 func_8001F404(s16 dropId) {
if (LINK_IS_ADULT) {
if (dropId == ITEM00_SEEDS) {
dropId = ITEM00_ARROWS_SMALL;
} else if ((dropId == ITEM00_STICK) && !(CVarGetInteger("gTreeStickDrops", 0))) {
} else if ((dropId == ITEM00_STICK) && !(CVarGetInteger(CVAR_ENHANCEMENT("TreesDropSticks"), 0))) {
dropId = ITEM00_RUPEE_GREEN;
}
} else {
@ -1532,7 +1532,7 @@ s16 func_8001F404(s16 dropId) {
}
}
if ((CVarGetInteger("gBombchuDrops", 0) ||
if ((CVarGetInteger(CVAR_ENHANCEMENT("BombchuDrops"), 0) ||
(IS_RANDO && Randomizer_GetSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1)) &&
(dropId == ITEM00_BOMBS_A || dropId == ITEM00_BOMBS_B || dropId == ITEM00_BOMBS_SPECIAL)) {
dropId = EnItem00_ConvertBombDropToBombchu(dropId);
@ -1566,7 +1566,7 @@ EnItem00* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, s16 params) {
params &= 0x3FFF;
if ((params & 0x00FF) == ITEM00_HEART && CVarGetInteger("gNoHeartDrops", 0)) { return NULL; }
if ((params & 0x00FF) == ITEM00_HEART && CVarGetInteger(CVAR_ENHANCEMENT("NoHeartDrops"), 0)) { return NULL; }
if (((params & 0x00FF) == ITEM00_FLEXIBLE) && !param4000) {
// TODO: Prevent the cast to EnItem00 here since this is a different actor (En_Elf)
@ -1611,7 +1611,7 @@ EnItem00* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s16 params) {
params &= 0x3FFF;
if ((params & 0x00FF) == ITEM00_HEART && CVarGetInteger("gNoHeartDrops", 0)) { return NULL; }
if ((params & 0x00FF) == ITEM00_HEART && CVarGetInteger(CVAR_ENHANCEMENT("NoHeartDrops"), 0)) { return NULL; }
if (((params & 0x00FF) == ITEM00_FLEXIBLE) && !param4000) {
// TODO: Prevent the cast to EnItem00 here since this is a different actor (En_Elf)
@ -1648,7 +1648,7 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP
param8000 = params & 0x8000;
params &= 0x7FFF;
if (CVarGetInteger("gNoRandomDrops", 0)) { return; }
if (CVarGetInteger(CVAR_ENHANCEMENT("NoRandomDrops"), 0)) { return; }
if (fromActor != NULL) {
if (fromActor->dropFlag) {
@ -1691,11 +1691,11 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP
EffectSsDeadSound_SpawnStationary(play, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true,
DEADSOUND_REPEAT_MODE_OFF, 40);
return;
} else if (gSaveContext.health <= 0x30 && !CVarGetInteger("gNoHeartDrops", 0)) { // 3 hearts or less
} else if (gSaveContext.health <= 0x30 && !CVarGetInteger(CVAR_ENHANCEMENT("NoHeartDrops"), 0)) { // 3 hearts or less
params = 0xB * 0x10;
dropTableIndex = 0x0;
dropId = ITEM00_HEART;
} else if (gSaveContext.health <= 0x50 && !CVarGetInteger("gNoHeartDrops", 0)) { // 5 hearts or less
} else if (gSaveContext.health <= 0x50 && !CVarGetInteger(CVAR_ENHANCEMENT("NoHeartDrops"), 0)) { // 5 hearts or less
params = 0xA * 0x10;
dropTableIndex = 0x0;
dropId = ITEM00_HEART;
@ -1728,7 +1728,7 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP
}
}
if (dropId != 0xFF && (!CVarGetInteger("gNoHeartDrops", 0) || dropId != ITEM00_HEART)) {
if (dropId != 0xFF && (!CVarGetInteger(CVAR_ENHANCEMENT("NoHeartDrops"), 0) || dropId != ITEM00_HEART)) {
dropQuantity = sDropQuantities[params + dropTableIndex];
while (dropQuantity > 0) {
if (!param8000) {
@ -1753,7 +1753,7 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP
}
}
} else {
if (CVarGetInteger("gBushDropFix", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("BushDropFix"), 0)) {
Item_DropCollectible(play, spawnPos, dropId | 0x8000);
} else {
Item_DropCollectible(play, spawnPos, params | 0x8000);

View file

@ -67,7 +67,7 @@ u16 sReactionTextIds[][PLAYER_MASK_MAX] = {
u16 Text_GetFaceReaction(PlayState* play, u32 reactionSet) {
u8 currentMask = Player_GetMask(play);
if (CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA && currentMask == PLAYER_MASK_BUNNY) {
if (CVarGetInteger(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA && currentMask == PLAYER_MASK_BUNNY) {
return 0;
} else {
return sReactionTextIds[reactionSet][currentMask];

View file

@ -131,7 +131,7 @@ void SkelCurve_DrawLimb(PlayState* play, s32 limbIndex, SkelAnimeCurve* skelCurv
Matrix_TranslateRotateZYX(&pos, &rot);
Matrix_Scale(scale.x, scale.y, scale.z, MTXMODE_APPLY);
if (CVarGetInteger("gDisableLOD", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("DisableLOD"), 0)) {
lod = 0;
}

View file

@ -602,7 +602,7 @@ void HealthMeter_Draw(PlayState* play) {
{
Mtx* matrix = Graph_Alloc(gfxCtx, sizeof(Mtx));
if (CVarGetInteger("gNoHUDHeartAnimation", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NoHUDHeartAnimation"), 0)) {
Matrix_SetTranslateScaleMtx2(matrix,
HeartsScale, // Scale X
HeartsScale, // Scale Y
@ -646,7 +646,7 @@ void HealthMeter_HandleCriticalAlarm(PlayState* play) {
if (interfaceCtx->unk_22A <= 0) {
interfaceCtx->unk_22A = 0;
interfaceCtx->unk_22C = 0;
if (CVarGetInteger("gLowHpAlarm", 0) == 0 && !Player_InCsMode(play) && (play->pauseCtx.state == 0) &&
if (CVarGetInteger(CVAR_ENHANCEMENT("LowHpAlarm"), 0) == 0 && !Player_InCsMode(play) && (play->pauseCtx.state == 0) &&
(play->pauseCtx.debugState == 0) && HealthMeter_IsCritical() && !Play_InCsMode(play)) {
func_80078884(NA_SE_SY_HITPOINT_ALARM);
}

View file

@ -918,14 +918,14 @@ void Minimap_Draw(PlayState* play) {
// or hide them entirely if the fix is applied
if (gMapData->owEntranceIconPosY[sEntranceIconMapIndex] == 0) {
entranceY = 0;
entranceX = CVarGetInteger("gFixDungeonMinimapIcon", 0) ? -9999 : OTRGetRectDimensionFromLeftEdge(0);
entranceX = CVarGetInteger(CVAR_ENHANCEMENT("FixDungeonMinimapIcon"), 0) ? -9999 : OTRGetRectDimensionFromLeftEdge(0);
}
//! @bug UB: sEntranceIconMapIndex can be up to 23 and is accessing owEntranceFlag which is size 20
if ((gMapData->owEntranceFlag[sEntranceIconMapIndex] == 0xFFFF) ||
((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) &&
((gSaveContext.infTable[26] & gBitFlags[gMapData->owEntranceFlag[mapIndex]]) ||
CVarGetInteger("gAlwaysShowDungeonMinimapIcon", 0)))) {
CVarGetInteger(CVAR_ENHANCEMENT("AlwaysShowDungeonMinimapIcon"), 0)))) {
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b,
iconSize, iconSize, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
@ -952,7 +952,7 @@ void Minimap_Draw(PlayState* play) {
// Ice Cavern entrance icon
if ((play->sceneNum == SCENE_ZORAS_FOUNTAIN) && ((gSaveContext.infTable[26] & gBitFlags[9]) ||
CVarGetInteger("gAlwaysShowDungeonMinimapIcon", 0))) {
CVarGetInteger(CVAR_ENHANCEMENT("AlwaysShowDungeonMinimapIcon"), 0))) {
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, iconSize,
iconSize, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);

View file

@ -150,7 +150,7 @@ void Message_UpdateOcarinaGame(PlayState* play) {
u8 Message_ShouldAdvance(PlayState* play) {
Input* input = &play->state.input[0];
bool isB_Held = CVarGetInteger("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
bool isB_Held = CVarGetInteger(CVAR_ENHANCEMENT("SkipText"), 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
: CHECK_BTN_ALL(input->press.button, BTN_B);
if (CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
@ -162,7 +162,7 @@ u8 Message_ShouldAdvance(PlayState* play) {
u8 Message_ShouldAdvanceSilent(PlayState* play) {
Input* input = &play->state.input[0];
bool isB_Held = CVarGetInteger("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
bool isB_Held = CVarGetInteger(CVAR_ENHANCEMENT("SkipText"), 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
: CHECK_BTN_ALL(input->press.button, BTN_B);
return CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP);
@ -291,7 +291,7 @@ void Message_FindMessage(PlayState* play, u16 textId) {
const char* seg;
u16 bufferId = textId;
// Use the better owl message if better owl is enabled
if (CVarGetInteger("gBetterOwl", 0) != 0 && (bufferId == 0x2066 || bufferId == 0x607B ||
if (CVarGetInteger(CVAR_ENHANCEMENT("BetterOwl"), 0) != 0 && (bufferId == 0x2066 || bufferId == 0x607B ||
bufferId == 0x10C2 || bufferId == 0x10C6 || bufferId == 0x206A))
{
bufferId = 0x71B3;
@ -873,7 +873,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
Message_SetTextColor(msgCtx, msgCtx->msgBufDecoded[++i] & 0xF);
break;
case ' ':
msgCtx->textPosX += CVarGetInteger("gTextSpacing", 6);
msgCtx->textPosX += CVarGetInteger(CVAR_ENHANCEMENT("TextSpacing"), 6);
break;
case MESSAGE_BOX_BREAK:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
@ -1032,7 +1032,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
msgCtx->textDelay = msgCtx->msgBufDecoded[++i];
break;
case MESSAGE_UNSKIPPABLE:
msgCtx->textUnskippable = CVarGetInteger("gSkipText", 0) != 1;
msgCtx->textUnskippable = CVarGetInteger(CVAR_ENHANCEMENT("SkipText"), 0) != 1;
break;
case MESSAGE_TWO_CHOICE:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_2_CHOICE;
@ -1116,7 +1116,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
}
}
if (msgCtx->textDelayTimer == 0) {
msgCtx->textDrawPos = i + CVarGetInteger("gTextSpeed", 2);
msgCtx->textDrawPos = i + CVarGetInteger(CVAR_ENHANCEMENT("TextSpeed"), 2);
msgCtx->textDelayTimer = msgCtx->textDelay;
} else {
msgCtx->textDelayTimer--;
@ -1189,7 +1189,7 @@ void Message_Decode(PlayState* play) {
phi_s1 = temp_s2 = msgCtx->msgBufDecoded[decodedBufPos] = font->msgBuf[msgCtx->msgBufPos];
// Don't require input for credits textboxes in randomizer
if (CVarGetInteger("gNoInputForCredits", 0) && (
if (CVarGetInteger(CVAR_ENHANCEMENT("NoInputForCredits"), 0) && (
msgCtx->textId == 0x706F ||
msgCtx->textId == 0x7091 ||
msgCtx->textId == 0x7092 ||
@ -1654,7 +1654,7 @@ void Message_OpenText(PlayState* play, u16 textId) {
//DmaMgr_SendRequest1(font->msgBuf, (uintptr_t)(_staff_message_data_staticSegmentRomStart + 4 + font->msgOffset),
//font->msgLength, __FILE__, __LINE__);
} else if (CVarGetInteger("gAskToEquip", 0) &&
} else if (CVarGetInteger(CVAR_ENHANCEMENT("AskToEquip"), 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 ||
@ -2155,7 +2155,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
0);
bool isB_Held = CVarGetInteger("gSkipText", 0) != 0 ? CHECK_BTN_ALL(play->state.input[0].cur.button, BTN_B)
bool isB_Held = CVarGetInteger(CVAR_ENHANCEMENT("SkipText"), 0) != 0 ? CHECK_BTN_ALL(play->state.input[0].cur.button, BTN_B)
: CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B);
switch (msgCtx->msgMode) {
@ -2436,7 +2436,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
}
break;
case MSGMODE_SETUP_DISPLAY_SONG_PLAYED:
if (CVarGetInteger("gFastOcarinaPlayback", 0) == 0 ||
if (CVarGetInteger(CVAR_ENHANCEMENT("FastOcarinaPlayback"), 0) == 0 ||
play->msgCtx.lastPlayedSong == OCARINA_SONG_TIME ||
play->msgCtx.lastPlayedSong == OCARINA_SONG_STORMS ||
play->msgCtx.lastPlayedSong == OCARINA_SONG_SUNS) {
@ -2491,7 +2491,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
Message_Decode(play);
msgCtx->msgMode = MSGMODE_DISPLAY_SONG_PLAYED_TEXT;
if (CVarGetInteger("gFastOcarinaPlayback", 0) == 0 || play->msgCtx.lastPlayedSong == OCARINA_SONG_TIME
if (CVarGetInteger(CVAR_ENHANCEMENT("FastOcarinaPlayback"), 0) == 0 || play->msgCtx.lastPlayedSong == OCARINA_SONG_TIME
|| play->msgCtx.lastPlayedSong == OCARINA_SONG_STORMS ||
play->msgCtx.lastPlayedSong == OCARINA_SONG_SUNS) {
msgCtx->stateTimer = 20;
@ -3148,7 +3148,7 @@ void Message_Update(PlayState* play) {
GameInteractor_ExecuteOnDialogMessage();
bool isB_Held = CVarGetInteger("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B) && !sTextboxSkipped
bool isB_Held = CVarGetInteger(CVAR_ENHANCEMENT("SkipText"), 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B) && !sTextboxSkipped
: CHECK_BTN_ALL(input->press.button, BTN_B);
switch (msgCtx->msgMode) {
@ -3367,7 +3367,7 @@ void Message_Update(PlayState* play) {
}
if ((s32)(gSaveContext.inventory.questItems & 0xF0000000) == 0x40000000) {
gSaveContext.inventory.questItems ^= 0x40000000;
if (!CVarGetInteger("gHurtContainer", 0)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("HurtContainer"), 0)) {
gSaveContext.healthCapacity += 0x10;
gSaveContext.health += 0x10;
} else {

View file

@ -80,7 +80,7 @@ Vec3f* OLib_VecSphToVec3f(Vec3f* dest, VecSph* sph) {
f32 sinYaw;
f32 cosYaw;
if (CVarGetInteger("gFixCameraDrift", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("FixCameraDrift"), 0)) {
cosPitch = Math_AccurateCosS(sph->pitch);
cosYaw = Math_AccurateCosS(sph->yaw);
sinPitch = Math_AccurateSinS(sph->pitch);

View file

@ -72,7 +72,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
// #region SOH [Enhancement]
//the default is 90, lower values necessary to prevent camera swing as animation speeds up
s16 camCrawlTemp = CVarGetInteger("gCrawlSpeed", 1);
s16 camCrawlTemp = CVarGetInteger(CVAR_ENHANCEMENT("CrawlSpeed"), 1);
s16 camCrawlTimer = D_8012042C / camCrawlTemp;
// #endregion
@ -336,7 +336,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
case 9601:
Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
if (CVarGetInteger("gCrawlSpeed", 1) > 1) {
if (CVarGetInteger(CVAR_ENHANCEMENT("CrawlSpeed"), 1) > 1) {
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, camCrawlTimer, D_80120308, D_80120398);
} else {
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120398);
@ -344,7 +344,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
break;
case 9602:
// #region SOH [Enhancement]
if (CVarGetInteger("gCrawlSpeed", 1) > 1) {
if (CVarGetInteger(CVAR_ENHANCEMENT("CrawlSpeed"), 1) > 1) {
Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
Play_CameraChangeSetting(play, MAIN_CAM, mainCam->prevSetting);
OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, camCrawlTimer, D_80120308, D_80120434);

View file

@ -1170,7 +1170,7 @@ void func_80083108(PlayState* play) {
if (interfaceCtx->restrictions.tradeItems != 0) {
for (i = 1; i < ARRAY_COUNT(gSaveContext.equips.buttonItems); i++) {
if ((CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA)
if ((CVarGetInteger(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA)
&& (gSaveContext.equips.buttonItems[i] >= ITEM_MASK_KEATON)
&& (gSaveContext.equips.buttonItems[i] <= ITEM_MASK_TRUTH)) {
gSaveContext.buttonStatus[BUTTON_STATUS_INDEX(i)] = BTN_ENABLED;
@ -1401,7 +1401,7 @@ void Interface_SetSceneRestrictions(PlayState* play) {
interfaceCtx->restrictions.farores, interfaceCtx->restrictions.dinsNayrus,
interfaceCtx->restrictions.all);
osSyncPrintf(VT_RST);
if (CVarGetInteger("gBetterFW", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("BetterFarore"), 0)) {
if (currentScene == SCENE_GERUDO_TRAINING_GROUND || currentScene == SCENE_INSIDE_GANONS_CASTLE) {
interfaceCtx->restrictions.farores = 0;
}
@ -2278,7 +2278,7 @@ u8 Item_Give(PlayState* play, u8 item) {
gSaveContext.sohStats.heartPieces++;
return Return_Item(item, MOD_NONE, ITEM_NONE);
} else if (item == ITEM_HEART_CONTAINER) {
if (!CVarGetInteger("gHurtContainer", 0)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("HurtContainer"), 0)) {
gSaveContext.healthCapacity += 0x10;
gSaveContext.health += 0x10;
} else {
@ -2379,7 +2379,7 @@ u8 Item_Give(PlayState* play, u8 item) {
}
return Return_Item(item, MOD_NONE, ITEM_NONE);
} else if ((item >= ITEM_WEIRD_EGG) && (item <= ITEM_CLAIM_CHECK)) {
if ((item == ITEM_SAW) && CVarGetInteger("gDekuNutUpgradeFix", 0) == 0) {
if ((item == ITEM_SAW) && CVarGetInteger(CVAR_ENHANCEMENT("DekuNutUpgradeFix"), 0) == 0) {
Flags_SetItemGetInf(ITEMGETINF_OBTAINED_NUT_UPGRADE_FROM_STAGE);
}
@ -2905,7 +2905,7 @@ void Inventory_UpdateBottleItem(PlayState* play, u8 item, u8 button) {
item = ITEM_MILK_HALF;
}
if (CVarGetInteger("gRestoreRBAValues",0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("RestoreRBAValues"),0)) {
byteSwapInventory();
gSaveContext.inventory.items[gSaveContext.equips.cButtonSlots[button - 1]] = item;
byteSwapInventory();
@ -3016,7 +3016,7 @@ void Interface_SetNaviCall(PlayState* play, u16 naviCallState) {
if (((naviCallState == 0x1D) || (naviCallState == 0x1E)) && !interfaceCtx->naviCalling &&
(play->csCtx.state == CS_STATE_IDLE)) {
if (!CVarGetInteger("gDisableNaviCallAudio", 0)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("DisableNaviCallAudio"), 0)) {
// clang-format off
if (naviCallState == 0x1E) { Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8); }
@ -4132,7 +4132,7 @@ void Interface_DrawItemButtons(PlayState* play) {
const s16 C_Right_BTN_Pos_ori[] = { C_RIGHT_BUTTON_X+X_Margins_CR, C_RIGHT_BUTTON_Y+Y_Margins_CR };
const s16 C_Up_BTN_Pos_ori[] = { C_UP_BUTTON_X+X_Margins_CU, C_UP_BUTTON_Y+Y_Margins_CU };
const s16 C_Down_BTN_Pos_ori[] = { C_DOWN_BUTTON_X+X_Margins_CD, C_DOWN_BUTTON_Y+Y_Margins_CD };
s16 LabelX_Navi=7 + !!CVarGetInteger("gNaviTextFix", 0);
s16 LabelX_Navi=7 + !!CVarGetInteger(CVAR_ENHANCEMENT("NaviTextFix"), 0);
s16 LabelY_Navi=4;
s16 C_Left_BTN_Pos[2]; //(X,Y)
s16 C_Right_BTN_Pos[2];
@ -5119,7 +5119,7 @@ void Interface_Draw(PlayState* play) {
s16 svar4;
s16 svar5;
s16 svar6;
bool fullUi = !CVarGetInteger("gMinimalUI", 0) || !R_MINIMAP_DISABLED || play->pauseCtx.state != 0;
bool fullUi = !CVarGetInteger(CVAR_ENHANCEMENT("MinimalUI"), 0) || !R_MINIMAP_DISABLED || play->pauseCtx.state != 0;
if (GameInteractor_NoUIActive()) {
return;
@ -5143,7 +5143,7 @@ void Interface_Draw(PlayState* play) {
if (fullUi) {
// Rupee Icon
if (CVarGetInteger("gDynamicWalletIcon", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("DynamicWalletIcon"), 0)) {
switch (CUR_UPG_VALUE(UPG_WALLET)) {
case 0:
if (CVarGetInteger("gCosmetics.Consumable_GreenRupee.Changed", 0)) {
@ -5346,7 +5346,7 @@ void Interface_Draw(PlayState* play) {
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 0);
}
if (CVarGetInteger("gDrawLineupTick", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("DrawLineupTick"), 0)) {
Interface_DrawLineupTick(play);
}
@ -5366,7 +5366,7 @@ void Interface_Draw(PlayState* play) {
}
// Render enemy health bar after Z-target to leverage set variables
if (CVarGetInteger("gEnemyHealthBar", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("EnemyHealthBar"), 0)) {
Interface_DrawEnemyHealthBar(&play->actorCtx.targetCtx, play);
}
}

View file

@ -675,7 +675,7 @@ void Play_Init(GameState* thisx) {
Fault_AddClient(&D_801614B8, ZeldaArena_Display, NULL, NULL);
// In order to keep bunny hood equipped on first load, we need to pre-set the age reqs for the item and slot
if ((CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA && CVarGetInteger("gAdultBunnyHood", 0)) || CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0)) {
if ((CVarGetInteger(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA && CVarGetInteger(CVAR_ENHANCEMENT("AdultBunnyHood"), 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;
@ -762,7 +762,7 @@ void Play_Init(GameState* thisx) {
}
#endif
if (CVarGetInteger("gIvanCoopModeEnabled", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("IvanCoopModeEnabled"), 0)) {
Actor_Spawn(&play->actorCtx, play, gEnPartnerId, GET_PLAYER(play)->actor.world.pos.x,
GET_PLAYER(play)->actor.world.pos.y + Player_GetHeight(GET_PLAYER(play)) + 5.0f,
GET_PLAYER(play)->actor.world.pos.z, 0, 0, 0, 1, true);
@ -1216,7 +1216,7 @@ void Play_Update(PlayState* play) {
gSaveContext.sohStats.sceneTimer++;
gSaveContext.sohStats.roomTimer++;
if (CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA && Player_GetMask(play) == PLAYER_MASK_BUNNY) {
if (CVarGetInteger(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA && Player_GetMask(play) == PLAYER_MASK_BUNNY) {
gSaveContext.sohStats.count[COUNT_TIME_BUNNY_HOOD]++;
}
}
@ -2364,7 +2364,7 @@ void Play_PerformSave(PlayState* play) {
IS_RANDO &&
gSaveContext.triforcePiecesCollected == Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED) &&
Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT);
if (CVarGetInteger("gAutosave", AUTOSAVE_OFF) != AUTOSAVE_OFF || triforceHuntCompleted) {
if (CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) != AUTOSAVE_OFF || triforceHuntCompleted) {
Overlay_DisplayText(3.0f, "Game Saved");
}
}

View file

@ -600,9 +600,9 @@ void Player_SetModelsForHoldingShield(Player* this) {
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)) {
if (LINK_IS_CHILD && (CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) && (this->currentShield == PLAYER_SHIELD_MIRROR)) {
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][0];
} else if (LINK_IS_ADULT && (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && (this->currentShield == PLAYER_SHIELD_DEKU)) {
} else if (LINK_IS_ADULT && (CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) && (this->currentShield == PLAYER_SHIELD_DEKU)) {
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][1];
} else {
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][gSaveContext.linkAge];
@ -613,7 +613,7 @@ void Player_SetModelsForHoldingShield(Player* this) {
this->sheathType = PLAYER_MODELTYPE_SHEATH_17;
}
this->sheathDLists = &sPlayerDListGroups[this->sheathType][gSaveContext.linkAge];
if ((CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && LINK_IS_CHILD &&
if ((CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) && LINK_IS_CHILD &&
gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI) {
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
}
@ -628,7 +628,7 @@ void Player_SetModels(Player* this, s32 modelGroup) {
this->leftHandType = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_LEFT_HAND];
this->leftHandDLists = &sPlayerDListGroups[this->leftHandType][gSaveContext.linkAge];
if (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) {
if (LINK_IS_CHILD &&
(this->leftHandType == PLAYER_MODELTYPE_LH_HAMMER ||
((this->leftHandType == PLAYER_MODELTYPE_LH_SWORD || this->leftHandType == PLAYER_MODELTYPE_LH_BGS) &&
@ -649,7 +649,7 @@ void Player_SetModels(Player* this, s32 modelGroup) {
this->rightHandType = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_RIGHT_HAND];
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][gSaveContext.linkAge];
if (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) {
if (LINK_IS_CHILD &&
(this->rightHandType == PLAYER_MODELTYPE_RH_HOOKSHOT ||
(this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD && this->currentShield == PLAYER_SHIELD_MIRROR))) {
@ -660,7 +660,7 @@ void Player_SetModels(Player* this, s32 modelGroup) {
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][1];
}
}
if ((CVarGetInteger("gBowSlingShotAmmoFix", 0) || CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && this->rightHandType == 11) { // If holding Bow/Slingshot
if ((CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), 0) || CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) && this->rightHandType == 11) { // If holding Bow/Slingshot
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][Player_HoldsSlingshot(this)];
}
@ -668,7 +668,7 @@ void Player_SetModels(Player* this, s32 modelGroup) {
this->sheathType = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_SHEATH];
this->sheathDLists = &sPlayerDListGroups[this->sheathType][gSaveContext.linkAge];
if (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) {
if (LINK_IS_CHILD &&
(this->currentShield == PLAYER_SHIELD_HYLIAN || this->currentShield == PLAYER_SHIELD_MIRROR) &&
((gSaveContext.equips.buttonItems[0] == ITEM_SWORD_MASTER) ||
@ -789,7 +789,7 @@ s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 y
s32 Player_GetStrength(void) {
s32 strengthUpgrade = CUR_UPG_VALUE(UPG_STRENGTH);
if (CVarGetInteger("gToggleStrength", 0) && CVarGetInteger("gStrengthDisabled", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("ToggleStrength"), 0) && CVarGetInteger(CVAR_ENHANCEMENT("StrengthDisabled"), 0)) {
return PLAYER_STR_NONE;
}
@ -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(CVAR_CHEAT("SuperTunic"), 0) == 0 && CVarGetInteger("gDisableTunicWarningText", 0) == 0)) ||
(((var == 0) && (this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0 && CVarGetInteger(CVAR_ENHANCEMENT("DisableTunicWarningText"), 0) == 0)) ||
(((var == 1) || (var == 3)) && (this->currentBoots == PLAYER_BOOTS_IRON) &&
(this->currentTunic != PLAYER_TUNIC_ZORA && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0 && CVarGetInteger("gDisableTunicWarningText", 0) == 0)))) {
(this->currentTunic != PLAYER_TUNIC_ZORA && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0 && CVarGetInteger(CVAR_ENHANCEMENT("DisableTunicWarningText"), 0) == 0)))) {
Message_StartTextbox(play, triggerEntry->textId, NULL);
gSaveContext.textTriggerFlags |= triggerEntry->flag;
}
@ -1090,7 +1090,7 @@ void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dL
SkelAnime_DrawFlexLod(play, skeleton, jointTable, dListCount, overrideLimbDraw, postLimbDraw, data, lod);
if (((CVarGetInteger("gFPSGauntlets", 0) && LINK_IS_ADULT) || (overrideLimbDraw != Player_OverrideLimbDrawGameplayFirstPerson)) &&
if (((CVarGetInteger(CVAR_ENHANCEMENT("FirstPersonGauntlets"), 0) && LINK_IS_ADULT) || (overrideLimbDraw != Player_OverrideLimbDrawGameplayFirstPerson)) &&
(overrideLimbDraw != Player_OverrideLimbDrawGameplayCrawling) &&
(gSaveContext.gameMode != 3)) {
if (LINK_IS_ADULT) {
@ -1243,7 +1243,7 @@ void func_8008F87C(PlayState* play, Player* this, SkelAnime* skelAnime, Vec3f* p
s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
Player* this = (Player*)thisx;
if (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0) && CVarGetInteger("gEnhancements.ScaleAdultEquimentAsChild", 0) && LINK_IS_CHILD) {
if (CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0) && CVarGetInteger(CVAR_ENHANCEMENT("ScaleAdultEquimentAsChild"), 0) && LINK_IS_CHILD) {
if (limbIndex == PLAYER_LIMB_L_HAND) {
if ((gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI && sLeftHandType == PLAYER_MODELTYPE_LH_SWORD) ||
(sLeftHandType == PLAYER_MODELTYPE_LH_BGS) || (sLeftHandType == PLAYER_MODELTYPE_LH_HAMMER)) {
@ -1396,7 +1396,7 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)) {
dLists += PLAYER_SHIELD_MAX * 4;
}
} else if (!CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
} else if (!CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) {
if (!LINK_IS_ADULT && ((this->sheathType == PLAYER_MODELTYPE_SHEATH_16) || (this->sheathType == PLAYER_MODELTYPE_SHEATH_17)) &&
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)) {
dLists = &sSheathWithSwordDLs[PLAYER_SHIELD_MAX * 4];
@ -1438,7 +1438,7 @@ s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, G
*dList = sFirstPersonLeftForearmDLs[gSaveContext.linkAge];
} else if (limbIndex == PLAYER_LIMB_L_HAND) {
s32 handOutDlIndex = gSaveContext.linkAge;
if ((CVarGetInteger("gBowSlingShotAmmoFix", 0) || CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && LINK_IS_ADULT && Player_HoldsSlingshot(this)) {
if ((CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), 0) || CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) && LINK_IS_ADULT && Player_HoldsSlingshot(this)) {
handOutDlIndex = 1;
}
*dList = sFirstPersonLeftHandDLs[handOutDlIndex];
@ -1448,7 +1448,7 @@ s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, G
*dList = sFirstPersonForearmDLs[gSaveContext.linkAge];
} else if (limbIndex == PLAYER_LIMB_R_HAND) {
s32 firstPersonWeaponIndex = gSaveContext.linkAge;
if (CVarGetInteger("gBowSlingShotAmmoFix", 0) || CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), 0) || CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) {
if (Player_HoldsBow(this)) {
firstPersonWeaponIndex = 0;
} else if (Player_HoldsSlingshot(this)) {
@ -1682,7 +1682,7 @@ void Player_DrawHookshotReticle(PlayState* play, Player* this, f32 hookshotRange
gSPTexture(WORLD_OVERLAY_DISP++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, gLinkAdultHookshotReticleTex, G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD);
if (SurfaceType_IsHookshotSurface(&play->colCtx, colPoly, bgId) && CVarGetInteger("gHookshotableReticle", false)) {
if (SurfaceType_IsHookshotSurface(&play->colCtx, colPoly, bgId) && CVarGetInteger(CVAR_ENHANCEMENT("HookshotableReticle"), false)) {
const Color_RGBA8 defaultColor = { .r = 0, .g = 255, .b = 0, .a = 255 };
const Color_RGBA8 color = CVarGetColor("gCosmetics.HookshotReticle_Target.Value", defaultColor);
gDPSetPrimColor(WORLD_OVERLAY_DISP++, 0, 0, color.r, color.g, color.b, color.a);
@ -1848,7 +1848,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
Matrix_Get(&this->shieldMf);
} else if ((this->rightHandType == PLAYER_MODELTYPE_RH_BOW_SLINGSHOT) || (this->rightHandType == PLAYER_MODELTYPE_RH_BOW_SLINGSHOT_2)) {
s32 stringModelToUse = gSaveContext.linkAge;
if (CVarGetInteger("gBowSlingShotAmmoFix", 0) || CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), 0) || CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) {
stringModelToUse = Player_HoldsSlingshot(this);
}
BowStringData* stringData = &sBowStringData[stringModelToUse];
@ -1917,7 +1917,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
play, this, ((this->heldItemAction == PLAYER_IA_HOOKSHOT) ? 38600.0f : 77600.0f) * CVarGetFloat(CVAR_CHEAT("HookshotReachMultiplier"), 1.0f));
}
}
} else if (CVarGetInteger("gBowReticle", 0) && (
} else if (CVarGetInteger(CVAR_ENHANCEMENT("BowReticle"), 0) && (
(this->heldItemAction == PLAYER_IA_BOW_FIRE) ||
(this->heldItemAction == PLAYER_IA_BOW_ICE) ||
(this->heldItemAction == PLAYER_IA_BOW_LIGHT) ||
@ -2038,7 +2038,7 @@ s32 Player_OverrideLimbDrawPause(PlayState* play, s32 limbIndex, Gfx** dList, Ve
type = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_SHEATH];
if ((type == PLAYER_MODELTYPE_SHEATH_18) || (type == PLAYER_MODELTYPE_SHEATH_19)) {
dListOffset = playerSwordAndShield[1] * ptrSize;
} else if (type == PLAYER_MODELTYPE_SHEATH_16 && CVarGetInteger("gPauseLiveLink", 0)) {
} else if (type == PLAYER_MODELTYPE_SHEATH_16 && CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLink"), 0)) {
//if (playerSwordAndShield[0] == 1)
//dListOffset = 4;
}
@ -2122,7 +2122,7 @@ void Player_DrawPauseImpl(PlayState* play, void* seg04, void* seg06, SkelAnime*
playerSwordAndShield[0] = sword;
playerSwordAndShield[1] = shield;
Matrix_SetTranslateRotateYXZ(pos->x - ((CVarGetInteger("gPauseLiveLink", 0) && LINK_AGE_IN_YEARS == YEARS_ADULT) ? 25 : 0),
Matrix_SetTranslateRotateYXZ(pos->x - ((CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLink"), 0) && LINK_AGE_IN_YEARS == YEARS_ADULT) ? 25 : 0),
pos->y - (CVarGetInteger("gPauseTriforce", 0) ? 16 : 0), pos->z, rot);
Matrix_Scale(scale * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1), scale, scale, MTXMODE_APPLY);
@ -2176,8 +2176,8 @@ void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f*
Vec3s* srcTable;
s32 i;
bool canswitchrnd = false;
s16 SelectedMode = CVarGetInteger("gPauseLiveLink", 0);
MinFrameCount = CVarGetInteger("gMinFrameCount", 200);
s16 SelectedMode = CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLink"), 0);
MinFrameCount = CVarGetInteger(CVAR_ENHANCEMENT("MinFrameCount"), 200);
gSegments[4] = VIRTUAL_TO_PHYSICAL(segment + 0x3800);
gSegments[6] = VIRTUAL_TO_PHYSICAL(segment + 0x8800);
@ -2202,7 +2202,7 @@ void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f*
};
s16 AnimArraySize = ARRAY_COUNT(PauseMenuAnimSet);
if (CVarGetInteger("gPauseLiveLink", 0) || CVarGetInteger("gPauseTriforce", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLink"), 0) || CVarGetInteger("gPauseTriforce", 0)) {
uintptr_t anim = 0; // Initialise anim
if (CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) >= EQUIP_VALUE_SWORD_BIGGORON) {

View file

@ -78,7 +78,7 @@ void SkelAnime_DrawLod(PlayState* play, void** skeleton, Vec3s* jointTable,
Vec3f pos;
Vec3s rot;
if (CVarGetInteger("gDisableLOD", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("DisableLOD"), 0)) {
lod = 0;
}
@ -195,7 +195,7 @@ void SkelAnime_DrawFlexLod(PlayState* play, void** skeleton, Vec3s* jointTable,
Vec3s rot;
Mtx* mtx = Graph_Alloc(play->state.gfxCtx, dListCount * sizeof(Mtx));
if (CVarGetInteger("gDisableLOD", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("DisableLOD"), 0)) {
lod = 0;
}
@ -870,7 +870,7 @@ AnimationEntry* AnimationContext_AddEntry(AnimationContext* animationCtx, Animat
*/
void AnimationContext_SetLoadFrame(PlayState* play, LinkAnimationHeader* animation, s32 frame, s32 limbCount,
Vec3s* frameTable) {
if (CVarGetInteger("gN64WeirdFrames", 0) && frame < 0) {
if (CVarGetInteger(CVAR_ENHANCEMENT("N64WeirdFrames"), 0) && frame < 0) {
Vec3s* src = (Vec3s*)getN64WeirdFrame((sizeof(Vec3s) * limbCount + 2) * frame);
memcpy(frameTable, src, sizeof(Vec3s) * limbCount + 2);
return;

View file

@ -125,7 +125,7 @@ void Sram_OpenSave() {
default:
// Use the saved entrance value with remember save location, except when in grottos/fairy fountains
if (CVarGetInteger("gRememberSaveLocation", 0) && gSaveContext.savedSceneNum != SCENE_FAIRYS_FOUNTAIN &&
if (CVarGetInteger(CVAR_ENHANCEMENT("RememberSaveLocation"), 0) && gSaveContext.savedSceneNum != SCENE_FAIRYS_FOUNTAIN &&
gSaveContext.savedSceneNum != SCENE_GROTTOS) {
break;
}
@ -142,7 +142,7 @@ void Sram_OpenSave() {
osSyncPrintf(VT_RST);
if (gSaveContext.health < 0x30) {
gSaveContext.health = CVarGetInteger("gFullHealthSpawn", 0) ? gSaveContext.healthCapacity : 0x30;
gSaveContext.health = CVarGetInteger(CVAR_ENHANCEMENT("FullHealthSpawn"), 0) ? gSaveContext.healthCapacity : 0x30;
}
if (gSaveContext.scarecrowLongSongSet) {