mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-22 08:08:53 -05:00
All MenuBar enhancement CVars done. (#4064)
This commit is contained in:
parent
a4fb67745a
commit
56d8dd6d8b
@ -1248,7 +1248,7 @@ void Draw_Placements(){
|
||||
ImGui::EndTable();
|
||||
}
|
||||
}
|
||||
if (CVarGetInteger("gVisualAgony",0) && ImGui::CollapsingHeader("Visual stone of agony position")) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("VisualAgony"),0) && ImGui::CollapsingHeader("Visual stone of agony position")) {
|
||||
if (ImGui::BeginTable("tabledvisualstoneofagony", 1, FlagsTable)) {
|
||||
ImGui::TableSetupColumn("Visual stone of agony settings", FlagsCell, TablesCellsWidth);
|
||||
Table_InitHeader(false);
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <libultraship/bridge.h>
|
||||
#include <string>
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
extern "C" {
|
||||
#include <libultraship/libultra.h>
|
||||
@ -81,7 +82,7 @@ void PatchDekuStickTextureOverflow() {
|
||||
const char* dlist = gLinkChildLinkDekuStickDL;
|
||||
int start = 5;
|
||||
|
||||
if (!CVarGetInteger("gFixTexturesOOB", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("FixTexturesOOB"), 0)) {
|
||||
// Unpatch the other texture fix
|
||||
for (size_t i = 0; i < 7; i++) {
|
||||
int instruction = start + (i == 0 ? 0 : i + 1);
|
||||
@ -121,7 +122,7 @@ void PatchFreezardTextureOverflow() {
|
||||
char patchNameBuf[24];
|
||||
|
||||
// Patch using custom overflowed texture
|
||||
if (!CVarGetInteger("gFixTexturesOOB", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("FixTexturesOOB"), 0)) {
|
||||
// Unpatch the other texture fix
|
||||
for (size_t i = 0; i < 7; i++) {
|
||||
int instruction = start + (i == 0 ? 0 : i + 1);
|
||||
@ -163,7 +164,7 @@ void PatchIronKnuckleTextureOverflow() {
|
||||
// Until this is solved, Iron Knuckle will be hardcoded to always display with the "authentic" texture fix
|
||||
|
||||
// Patch using custom overflowed texture
|
||||
// if (!CVarGetInteger("gFixTexturesOOB", 0)) {
|
||||
// if (!CVarGetInteger(CVAR_ENHANCEMENT("FixTexturesOOB"), 0)) {
|
||||
// Unpatch the other texture fix
|
||||
for (size_t i = 0; i < 7; i++) {
|
||||
int instruction = start + (i == 0 ? 0 : i + 1);
|
||||
|
@ -471,7 +471,7 @@ static bool FWHandler(std::shared_ptr<LUS::Console> Console, const std::vector<s
|
||||
return 0;
|
||||
break;
|
||||
case 2: //backup
|
||||
if (CVarGetInteger("gBetterFW", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("BetterFarore"), 0)) {
|
||||
gSaveContext.fw = gSaveContext.backupFW;
|
||||
gSaveContext.fw.set = 1;
|
||||
INFO_MESSAGE("[SOH] Backup FW data copied! Reload scene to take effect.");
|
||||
|
@ -121,7 +121,7 @@ void FindMessage(PlayState* play, const uint16_t textId, const uint8_t language)
|
||||
Font* font;
|
||||
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;
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "soh/Enhancements/randomizer/3drando/random.hpp"
|
||||
#include "soh/Enhancements/enhancementTypes.h"
|
||||
#include "variables.h"
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
extern "C" {
|
||||
#include <z64.h>
|
||||
@ -233,7 +234,7 @@ extern "C" uint8_t GetRandomizedEnemy(PlayState* play, int16_t *actorId, f32 *po
|
||||
}
|
||||
|
||||
EnemyEntry GetRandomizedEnemyEntry(uint32_t seed) {
|
||||
if (CVarGetInteger("gRandomizedEnemies", ENEMY_RANDOMIZER_OFF) == ENEMY_RANDOMIZER_RANDOM_SEEDED) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), ENEMY_RANDOMIZER_OFF) == ENEMY_RANDOMIZER_RANDOM_SEEDED) {
|
||||
uint32_t finalSeed = seed + (IS_RANDO ? gSaveContext.finalSeed : gSaveContext.sohStats.fileCreatedAt);
|
||||
Random_Init(finalSeed);
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ extern "C" {
|
||||
#include <libultraship/bridge.h>
|
||||
#include <libultraship/libultraship.h>
|
||||
#include "soh/Enhancements/enhancementTypes.h"
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
extern "C" {
|
||||
#include <z64.h>
|
||||
@ -538,7 +539,7 @@ void DrawGameplayStatsCountsTab() {
|
||||
GameplayStatsRow("Sword Swings:", formatIntGameplayStat(gSaveContext.sohStats.count[COUNT_SWORD_SWINGS]));
|
||||
GameplayStatsRow("Steps Taken:", formatIntGameplayStat(gSaveContext.sohStats.count[COUNT_STEPS]));
|
||||
// If using MM Bunny Hood enhancement, show how long it's been equipped (not counting pause time)
|
||||
if (CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA || gSaveContext.sohStats.count[COUNT_TIME_BUNNY_HOOD] > 0) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA || gSaveContext.sohStats.count[COUNT_TIME_BUNNY_HOOD] > 0) {
|
||||
GameplayStatsRow("Bunny Hood Time:", formatTimestampGameplayStat(gSaveContext.sohStats.count[COUNT_TIME_BUNNY_HOOD] / 2));
|
||||
}
|
||||
GameplayStatsRow("Rolls:", formatIntGameplayStat(gSaveContext.sohStats.count[COUNT_ROLLS]));
|
||||
|
@ -253,7 +253,7 @@ void RegisterOcarinaTimeTravel() {
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnOcarinaSongAction>([]() {
|
||||
if (!GameInteractor::IsSaveLoaded(true)) {
|
||||
CVarClear("gTimeTravel");
|
||||
CVarClear(CVAR_ENHANCEMENT("TimeTravel"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -267,7 +267,7 @@ void RegisterOcarinaTimeTravel() {
|
||||
uint8_t hasOcarinaOfTime = (INV_CONTENT(ITEM_OCARINA_TIME) == ITEM_OCARINA_TIME);
|
||||
// If TimeTravel + Player have the Ocarina of Time + Have Master Sword + is in proper range
|
||||
// TODO: Once Swordless Adult is fixed: Remove the Master Sword check
|
||||
if (((CVarGetInteger("gTimeTravel", 0) == 1 && hasOcarinaOfTime) || CVarGetInteger("gTimeTravel", 0) == 2) && hasMasterSword &&
|
||||
if (((CVarGetInteger(CVAR_ENHANCEMENT("TimeTravel"), 0) == 1 && hasOcarinaOfTime) || CVarGetInteger(CVAR_ENHANCEMENT("TimeTravel"), 0) == 2) && hasMasterSword &&
|
||||
gPlayState->msgCtx.lastPlayedSong == OCARINA_SONG_TIME && !nearbyTimeBlockEmpty && !nearbyTimeBlock &&
|
||||
!nearbyOcarinaSpot && !nearbyFrogs) {
|
||||
|
||||
@ -289,13 +289,13 @@ void AutoSave(GetItemEntry itemEntry) {
|
||||
// Don't autosave immediately after buying items from shops to prevent getting them for free!
|
||||
// Don't autosave in the Chamber of Sages since resuming from that map breaks the game
|
||||
// Don't autosave during the Ganon fight when picking up the Master Sword
|
||||
if ((CVarGetInteger("gAutosave", AUTOSAVE_OFF) != AUTOSAVE_OFF) && (gPlayState != NULL) && (gSaveContext.pendingSale == ITEM_NONE) &&
|
||||
if ((CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) != AUTOSAVE_OFF) && (gPlayState != NULL) && (gSaveContext.pendingSale == ITEM_NONE) &&
|
||||
(gPlayState->gameplayFrames > 60 && gSaveContext.cutsceneIndex < 0xFFF0) && (gPlayState->sceneNum != SCENE_GANON_BOSS) && (gPlayState->sceneNum != SCENE_CHAMBER_OF_THE_SAGES)) {
|
||||
if (((CVarGetInteger("gAutosave", AUTOSAVE_OFF) == AUTOSAVE_LOCATION_AND_ALL_ITEMS) || (CVarGetInteger("gAutosave", AUTOSAVE_OFF) == AUTOSAVE_ALL_ITEMS)) && (item != ITEM_NONE)) {
|
||||
if (((CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) == AUTOSAVE_LOCATION_AND_ALL_ITEMS) || (CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) == AUTOSAVE_ALL_ITEMS)) && (item != ITEM_NONE)) {
|
||||
// Autosave for all items
|
||||
performSave = true;
|
||||
|
||||
} else if (((CVarGetInteger("gAutosave", AUTOSAVE_OFF) == AUTOSAVE_LOCATION_AND_MAJOR_ITEMS) || (CVarGetInteger("gAutosave", AUTOSAVE_OFF) == AUTOSAVE_MAJOR_ITEMS)) && (item != ITEM_NONE)) {
|
||||
} else if (((CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) == AUTOSAVE_LOCATION_AND_MAJOR_ITEMS) || (CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) == AUTOSAVE_MAJOR_ITEMS)) && (item != ITEM_NONE)) {
|
||||
// Autosave for major items
|
||||
if (itemEntry.modIndex == 0) {
|
||||
switch (item) {
|
||||
@ -335,7 +335,7 @@ void AutoSave(GetItemEntry itemEntry) {
|
||||
case ITEM_BOMBCHU:
|
||||
case ITEM_BOMBCHUS_5:
|
||||
case ITEM_BOMBCHUS_20:
|
||||
if (!CVarGetInteger("gBombchuDrops", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("BombchuDrops"), 0)) {
|
||||
performSave = true;
|
||||
}
|
||||
break;
|
||||
@ -346,9 +346,9 @@ void AutoSave(GetItemEntry itemEntry) {
|
||||
} else if (itemEntry.modIndex == 1 && item != RG_ICE_TRAP) {
|
||||
performSave = true;
|
||||
}
|
||||
} else if (CVarGetInteger("gAutosave", AUTOSAVE_OFF) == AUTOSAVE_LOCATION_AND_MAJOR_ITEMS ||
|
||||
CVarGetInteger("gAutosave", AUTOSAVE_OFF) == AUTOSAVE_LOCATION_AND_ALL_ITEMS ||
|
||||
CVarGetInteger("gAutosave", AUTOSAVE_OFF) == AUTOSAVE_LOCATION) {
|
||||
} else if (CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) == AUTOSAVE_LOCATION_AND_MAJOR_ITEMS ||
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) == AUTOSAVE_LOCATION_AND_ALL_ITEMS ||
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("Autosave"), AUTOSAVE_OFF) == AUTOSAVE_LOCATION) {
|
||||
performSave = true;
|
||||
}
|
||||
if (performSave) {
|
||||
@ -366,13 +366,13 @@ void RegisterAutoSave() {
|
||||
|
||||
void RegisterRupeeDash() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayerUpdate>([]() {
|
||||
if (!CVarGetInteger("gRupeeDash", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("RupeeDash"), 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialize Timer
|
||||
static uint16_t rupeeDashTimer = 0;
|
||||
uint16_t rdmTime = CVarGetInteger("gDashInterval", 5) * 20;
|
||||
uint16_t rdmTime = CVarGetInteger(CVAR_ENHANCEMENT("RupeeDashInterval"), 5) * 20;
|
||||
|
||||
// Did time change by DashInterval?
|
||||
if (rupeeDashTimer >= rdmTime) {
|
||||
@ -394,7 +394,7 @@ void RegisterShadowTag() {
|
||||
static uint16_t delayTimer = 60;
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayerUpdate>([]() {
|
||||
if (!CVarGetInteger("gShadowTag", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("ShadowTag"), 0)) {
|
||||
return;
|
||||
}
|
||||
if (gPlayState->sceneNum == SCENE_FOREST_TEMPLE && // Forest Temple Scene
|
||||
@ -425,7 +425,7 @@ static bool hasAffectedHealth = false;
|
||||
void UpdatePermanentHeartLossState() {
|
||||
if (!GameInteractor::IsSaveLoaded()) return;
|
||||
|
||||
if (!CVarGetInteger("gPermanentHeartLoss", 0) && hasAffectedHealth) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("PermanentHeartLoss"), 0) && hasAffectedHealth) {
|
||||
uint8_t heartContainers = gSaveContext.sohStats.heartContainers; // each worth 16 health
|
||||
uint8_t heartPieces = gSaveContext.sohStats.heartPieces; // each worth 4 health, but only in groups of 4
|
||||
uint8_t startingHealth = 16 * 3;
|
||||
@ -445,7 +445,7 @@ void RegisterPermanentHeartLoss() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayerUpdate>([]() {
|
||||
if (!CVarGetInteger("gPermanentHeartLoss", 0) || !GameInteractor::IsSaveLoaded()) return;
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("PermanentHeartLoss"), 0) || !GameInteractor::IsSaveLoaded()) return;
|
||||
|
||||
if (gSaveContext.healthCapacity > 16 && gSaveContext.healthCapacity - gSaveContext.health >= 16) {
|
||||
gSaveContext.healthCapacity -= 16;
|
||||
@ -457,7 +457,7 @@ void RegisterPermanentHeartLoss() {
|
||||
|
||||
void RegisterDeleteFileOnDeath() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
||||
if (!CVarGetInteger("gDeleteFileOnDeath", 0) || !GameInteractor::IsSaveLoaded() || &gPlayState->gameOverCtx == NULL || &gPlayState->pauseCtx == NULL) return;
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("DeleteFileOnDeath"), 0) || !GameInteractor::IsSaveLoaded() || &gPlayState->gameOverCtx == NULL || &gPlayState->pauseCtx == NULL) return;
|
||||
|
||||
if (gPlayState->gameOverCtx.state == GAMEOVER_DEATH_MENU && gPlayState->pauseCtx.state == 9) {
|
||||
SaveManager::Instance->DeleteZeldaFile(gSaveContext.fileNum);
|
||||
@ -478,7 +478,7 @@ using DayTimeGoldSkulltulasList = std::vector<DayTimeGoldSkulltulas>;
|
||||
|
||||
void RegisterDaytimeGoldSkultullas() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneSpawnActors>([]() {
|
||||
if (!CVarGetInteger("gNightGSAlwaysSpawn", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("NightGSAlwaysSpawn"), 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -524,7 +524,7 @@ void RegisterDaytimeGoldSkultullas() {
|
||||
}
|
||||
|
||||
bool IsHyperBossesActive() {
|
||||
return CVarGetInteger("gHyperBosses", 0) ||
|
||||
return CVarGetInteger(CVAR_ENHANCEMENT("HyperBosses"), 0) ||
|
||||
(IS_BOSS_RUSH && gSaveContext.bossRushOptions[BR_OPTIONS_HYPERBOSSES] == BR_CHOICE_HYPERBOSSES_YES);
|
||||
}
|
||||
|
||||
@ -592,7 +592,7 @@ void UpdateHyperEnemiesState() {
|
||||
actorUpdateHookId = 0;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gHyperEnemies", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("HyperEnemies"), 0)) {
|
||||
actorUpdateHookId = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorUpdate>([](void* refActor) {
|
||||
// Run the update function a second time to make enemies and minibosses move and act twice as fast.
|
||||
|
||||
@ -604,7 +604,7 @@ void UpdateHyperEnemiesState() {
|
||||
bool isExcludedEnemy = actor->id == ACTOR_EN_FIRE_ROCK || actor->id == ACTOR_EN_ENCOUNT2;
|
||||
|
||||
// Don't apply during cutscenes because it causes weird behaviour and/or crashes on some cutscenes.
|
||||
if (CVarGetInteger("gHyperEnemies", 0) && isEnemy && !isExcludedEnemy &&
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("HyperEnemies"), 0) && isEnemy && !isExcludedEnemy &&
|
||||
!Player_InBlockingCsMode(gPlayState, player)) {
|
||||
GameInteractor::RawAction::UpdateActor(actor);
|
||||
}
|
||||
@ -614,7 +614,7 @@ void UpdateHyperEnemiesState() {
|
||||
|
||||
void RegisterBonkDamage() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayerBonk>([]() {
|
||||
uint8_t bonkOption = CVarGetInteger("gBonkDamageMul", BONK_DAMAGE_NONE);
|
||||
uint8_t bonkOption = CVarGetInteger(CVAR_ENHANCEMENT("BonkDamageMult"), BONK_DAMAGE_NONE);
|
||||
if (bonkOption == BONK_DAMAGE_NONE) {
|
||||
return;
|
||||
}
|
||||
@ -660,7 +660,7 @@ void UpdateDirtPathFixState(int32_t sceneNum) {
|
||||
case SCENE_HYRULE_FIELD:
|
||||
case SCENE_KOKIRI_FOREST:
|
||||
case SCENE_HYRULE_CASTLE:
|
||||
CVarSetInteger("gZFightingMode", CVarGetInteger("gSceneSpecificDirtPathFix", ZFIGHT_FIX_DISABLED));
|
||||
CVarSetInteger("gZFightingMode", CVarGetInteger(CVAR_ENHANCEMENT("SceneSpecificDirtPathFix"), ZFIGHT_FIX_DISABLED));
|
||||
return;
|
||||
default:
|
||||
CVarClear("gZFightingMode");
|
||||
@ -677,7 +677,7 @@ void UpdateMirrorModeState(int32_t sceneNum) {
|
||||
static bool prevMirroredWorld = false;
|
||||
bool nextMirroredWorld = false;
|
||||
|
||||
int16_t mirroredMode = CVarGetInteger("gMirroredWorldMode", MIRRORED_WORLD_OFF);
|
||||
int16_t mirroredMode = CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorldMode"), MIRRORED_WORLD_OFF);
|
||||
int16_t inDungeon = (sceneNum >= SCENE_DEKU_TREE && sceneNum <= SCENE_INSIDE_GANONS_CASTLE_COLLAPSE && sceneNum != SCENE_THIEVES_HIDEOUT) ||
|
||||
(sceneNum >= SCENE_DEKU_TREE_BOSS && sceneNum <= SCENE_GANONS_TOWER_COLLAPSE_EXTERIOR) ||
|
||||
(sceneNum == SCENE_GANON_BOSS);
|
||||
@ -718,7 +718,7 @@ void RegisterMirrorModeHandler() {
|
||||
}
|
||||
|
||||
void UpdatePatchHand() {
|
||||
if ((CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && LINK_IS_CHILD) {
|
||||
if ((CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) && LINK_IS_CHILD) {
|
||||
ResourceMgr_PatchGfxByName(gLinkAdultLeftHandHoldingHammerNearDL, "childHammer1", 92, gsSPDisplayListOTRFilePath(gLinkChildLeftFistNearDL));
|
||||
ResourceMgr_PatchGfxByName(gLinkAdultLeftHandHoldingHammerNearDL, "childHammer2", 93, gsSPEndDisplayList());
|
||||
ResourceMgr_PatchGfxByName(gLinkAdultRightHandHoldingHookshotNearDL, "childHookshot1", 84, gsSPDisplayListOTRFilePath(gLinkChildRightHandClosedNearDL));
|
||||
@ -746,7 +746,7 @@ void UpdatePatchHand() {
|
||||
ResourceMgr_UnpatchGfxByName(gLinkAdultHandHoldingBrokenGiantsKnifeDL, "childBrokenGiantsKnife1");
|
||||
ResourceMgr_UnpatchGfxByName(gLinkAdultHandHoldingBrokenGiantsKnifeDL, "childBrokenGiantsKnife2");
|
||||
}
|
||||
if ((CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && LINK_IS_ADULT) {
|
||||
if ((CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) && LINK_IS_ADULT) {
|
||||
ResourceMgr_PatchGfxByName(gLinkChildLeftFistAndKokiriSwordNearDL, "adultKokiriSword", 13, gsSPDisplayListOTRFilePath(gLinkAdultLeftHandClosedNearDL));
|
||||
ResourceMgr_PatchGfxByName(gLinkChildRightHandHoldingSlingshotNearDL, "adultSlingshot", 13, gsSPDisplayListOTRFilePath(gLinkAdultRightHandClosedNearDL));
|
||||
ResourceMgr_PatchGfxByName(gLinkChildLeftFistAndBoomerangNearDL, "adultBoomerang", 50, gsSPDisplayListOTRFilePath(gLinkAdultLeftHandClosedNearDL));
|
||||
@ -767,7 +767,7 @@ void RegisterPatchHandHandler() {
|
||||
|
||||
void RegisterResetNaviTimer() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneInit>([](int32_t sceneNum) {
|
||||
if (CVarGetInteger("gEnhancements.ResetNaviTimer", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("ResetNaviTimer"), 0)) {
|
||||
gSaveContext.naviTimer = 0;
|
||||
}
|
||||
});
|
||||
@ -1021,16 +1021,16 @@ typedef enum {
|
||||
} AltTrapType;
|
||||
|
||||
const char* altTrapTypeCvars[] = {
|
||||
"gAddTraps.Ice",
|
||||
"gAddTraps.Burn",
|
||||
"gAddTraps.Shock",
|
||||
"gAddTraps.Knock",
|
||||
"gAddTraps.Speed",
|
||||
"gAddTraps.Bomb",
|
||||
"gAddTraps.Void",
|
||||
"gAddTraps.Ammo",
|
||||
"gAddTraps.Kill",
|
||||
"gAddTraps.Tele"
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Ice"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Burn"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Shock"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Knockback"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Speed"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Bomb"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Void"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Ammo"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Kill"),
|
||||
CVAR_ENHANCEMENT("ExtraTraps.Teleport")
|
||||
};
|
||||
|
||||
std::vector<AltTrapType> getEnabledAddTraps () {
|
||||
@ -1052,7 +1052,7 @@ void RegisterAltTrapTypes() {
|
||||
static int eventTimer = -1;
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnItemReceive>([](GetItemEntry itemEntry) {
|
||||
if (!CVarGetInteger("gAddTraps.enabled", 0) || itemEntry.modIndex != MOD_RANDOMIZER || itemEntry.getItemId != RG_ICE_TRAP) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("ExtraTraps.Enabled"), 0) || itemEntry.modIndex != MOD_RANDOMIZER || itemEntry.getItemId != RG_ICE_TRAP) {
|
||||
return;
|
||||
}
|
||||
roll = RandomElement(getEnabledAddTraps());
|
||||
@ -1195,7 +1195,7 @@ void UpdateHurtContainerModeState(bool newState) {
|
||||
|
||||
void RegisterHurtContainerModeHandler() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnLoadGame>([](int32_t fileNum) {
|
||||
UpdateHurtContainerModeState(CVarGetInteger("gHurtContainer", 0));
|
||||
UpdateHurtContainerModeState(CVarGetInteger(CVAR_ENHANCEMENT("HurtContainer"), 0));
|
||||
});
|
||||
}
|
||||
|
||||
@ -1214,7 +1214,7 @@ void RegisterRandomizedEnemySizes() {
|
||||
actor->id == ACTOR_BOSS_FD2 || actor->id == ACTOR_EN_DH;
|
||||
|
||||
// Only apply to enemies and bosses.
|
||||
if (!CVarGetInteger("gRandomizedEnemySizes", 0) || (actor->category != ACTORCAT_ENEMY && actor->category != ACTORCAT_BOSS) || excludedEnemy) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemySizes"), 0) || (actor->category != ACTORCAT_ENEMY && actor->category != ACTORCAT_BOSS) || excludedEnemy) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1237,7 +1237,7 @@ void RegisterRandomizedEnemySizes() {
|
||||
|
||||
Actor_SetScale(actor, actor->scale.z * randomScale);
|
||||
|
||||
if (CVarGetInteger("gEnemySizeScalesHealth", 0) && (actor->category == ACTORCAT_ENEMY)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("EnemySizeScalesHealth"), 0) && (actor->category == ACTORCAT_ENEMY)) {
|
||||
// Scale the health based on a smaller factor than randomScale
|
||||
float healthScalingFactor = 0.8f; // Adjust this factor as needed
|
||||
float scaledHealth = actor->colChkInfo.health * (randomScale * healthScalingFactor);
|
||||
@ -1254,7 +1254,7 @@ void RegisterOpenAllHours() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorInit>([](void* refActor) {
|
||||
Actor* actor = static_cast<Actor*>(refActor);
|
||||
|
||||
if (CVarGetInteger("gEnhancements.OpenAllHours", 0) && (actor->id == ACTOR_EN_DOOR)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("OpenAllHours"), 0) && (actor->id == ACTOR_EN_DOOR)) {
|
||||
switch (actor->params) {
|
||||
case 4753: // Night Market Bazaar
|
||||
case 1678: // Night Potion Shop
|
||||
@ -1281,7 +1281,7 @@ void RegisterOpenAllHours() {
|
||||
void PatchToTMedallions() {
|
||||
// TODO: Refactor the DemoEffect_UpdateJewelAdult and DemoEffect_UpdateJewelChild from z_demo_effect
|
||||
// effects to take effect in there
|
||||
if (CVarGetInteger("gToTMedallionsColors", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("ToTMedallionsColors"), 0)) {
|
||||
ResourceMgr_PatchGfxByName(tokinoma_room_0DL_007A70, "ToTMedallions_StartGrayscale", 7, gsSPGrayscale(true));
|
||||
ResourceMgr_PatchGfxByName(tokinoma_room_0DL_007FD0, "ToTMedallions_2_StartGrayscale", 7, gsSPGrayscale(true));
|
||||
|
||||
@ -1347,13 +1347,13 @@ void PatchToTMedallions() {
|
||||
|
||||
void RegisterToTMedallions() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnItemReceive>([](GetItemEntry _unused) {
|
||||
if (!CVarGetInteger("gToTMedallionsColors", 0) || !gPlayState || gPlayState->sceneNum != SCENE_TEMPLE_OF_TIME) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("ToTMedallionsColors"), 0) || !gPlayState || gPlayState->sceneNum != SCENE_TEMPLE_OF_TIME) {
|
||||
return;
|
||||
}
|
||||
PatchToTMedallions();
|
||||
});
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneInit>([](int16_t sceneNum) {
|
||||
if (!CVarGetInteger("gToTMedallionsColors", 0) || sceneNum != SCENE_TEMPLE_OF_TIME) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("ToTMedallionsColors"), 0) || sceneNum != SCENE_TEMPLE_OF_TIME) {
|
||||
return;
|
||||
}
|
||||
PatchToTMedallions();
|
||||
@ -1364,7 +1364,7 @@ void RegisterToTMedallions() {
|
||||
void RegisterFloorSwitchesHook() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorInit>([](void* refActor) {
|
||||
Actor* actor = static_cast<Actor*>(refActor);
|
||||
if (actor->id != ACTOR_OBJ_SWITCH || !CVarGetInteger("gEnhancements.FixFloorSwitches", 0)) {
|
||||
if (actor->id != ACTOR_OBJ_SWITCH || !CVarGetInteger(CVAR_ENHANCEMENT("FixFloorSwitches"), 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1380,7 +1380,7 @@ void RegisterFloorSwitchesHook() {
|
||||
void RegisterPauseMenuHooks() {
|
||||
static bool pauseWarpHooksRegistered = false;
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([&]() {
|
||||
if (!GameInteractor::IsSaveLoaded() || !CVarGetInteger("gPauseWarp", 0)) {
|
||||
if (!GameInteractor::IsSaveLoaded() || !CVarGetInteger(CVAR_ENHANCEMENT("PauseWarp"), 0)) {
|
||||
pauseWarpHooksRegistered = false;
|
||||
return;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -459,7 +459,7 @@ bool HasItemBeenCollected(RandomizerCheck rc) {
|
||||
case SpoilerCollectionCheckType::SPOILER_CHK_GRAVEDIGGER:
|
||||
// Gravedigger has a fix in place that means one of two save locations. Check both.
|
||||
return (gSaveContext.itemGetInf[1] & 0x1000) || // vanilla flag
|
||||
((IS_RANDO || CVarGetInteger("gGravediggingTourFix", 0)) &&
|
||||
((IS_RANDO || CVarGetInteger(CVAR_ENHANCEMENT("GravediggingTourFix"), 0)) &&
|
||||
gSaveContext.sceneFlags[scene].collect & (1 << flag) || (gPlayState->actorCtx.flags.collect & (1 << flag))); // rando/fix flag
|
||||
default:
|
||||
return false;
|
||||
|
@ -394,7 +394,7 @@ void Entrance_SetSavewarpEntrance(void) {
|
||||
gSaveContext.entranceIndex = ENTR_THIEVES_HIDEOUT_0; // Gerudo Fortress -> Thieve's Hideout spawn 0
|
||||
} else if (scene == SCENE_LINKS_HOUSE) {
|
||||
gSaveContext.entranceIndex = Entrance_OverrideNextIndex(ENTR_LINKS_HOUSE_0);
|
||||
} else if (CVarGetInteger("gRememberSaveLocation", 0) && scene != SCENE_FAIRYS_FOUNTAIN && scene != SCENE_GROTTOS &&
|
||||
} else if (CVarGetInteger(CVAR_ENHANCEMENT("RememberSaveLocation"), 0) && scene != SCENE_FAIRYS_FOUNTAIN && scene != SCENE_GROTTOS &&
|
||||
gSaveContext.entranceIndex != ENTR_LOAD_OPENING) {
|
||||
// Use the saved entrance value with remember save location, except when in grottos/fairy fountains or if
|
||||
// the entrance index is -1 (new save)
|
||||
|
@ -2597,7 +2597,7 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
||||
}
|
||||
}
|
||||
if (textId == TEXT_GS_NO_FREEZE || textId == TEXT_GS_FREEZE) {
|
||||
if (CVarGetInteger("gInjectItemCounts", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("InjectItemCounts"), 0) != 0) {
|
||||
// The freeze text cannot be manually dismissed and must be auto-dismissed.
|
||||
// This is fine and even wanted when skull tokens are not shuffled, but when
|
||||
// when they are shuffled we don't want to be able to manually dismiss the box.
|
||||
@ -2605,7 +2605,7 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
||||
// animation until the text box auto-dismisses.
|
||||
// RANDOTODO: Implement a way to determine if an item came from a skulltula and
|
||||
// inject the auto-dismiss control code if it did.
|
||||
if (CVarGetInteger("gSkulltulaFreeze", 0) != 0 &&
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("SkulltulaFreeze"), 0) != 0 &&
|
||||
!(IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_TOKENS) != RO_TOKENSANITY_OFF)) {
|
||||
textId = TEXT_GS_NO_FREEZE;
|
||||
} else {
|
||||
@ -2618,18 +2618,18 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
||||
messageEntry.Replace("{{gsCount}}", std::to_string(gsCount));
|
||||
}
|
||||
}
|
||||
if (textId == TEXT_HEART_CONTAINER && CVarGetInteger("gInjectItemCounts", 0)) {
|
||||
if (textId == TEXT_HEART_CONTAINER && CVarGetInteger(CVAR_ENHANCEMENT("InjectItemCounts"), 0)) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, TEXT_HEART_CONTAINER);
|
||||
messageEntry.Replace("{{heartContainerCount}}", std::to_string(gSaveContext.sohStats.heartContainers + 1));
|
||||
}
|
||||
if (textId == TEXT_HEART_PIECE && CVarGetInteger("gInjectItemCounts", 0)) {
|
||||
if (textId == TEXT_HEART_PIECE && CVarGetInteger(CVAR_ENHANCEMENT("InjectItemCounts"), 0)) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, TEXT_HEART_PIECE);
|
||||
messageEntry.Replace("{{heartPieceCount}}", std::to_string(gSaveContext.sohStats.heartPieces + 1));
|
||||
}
|
||||
if (textId == TEXT_MARKET_GUARD_NIGHT && CVarGetInteger("gMarketSneak", 0) && play->sceneNum == SCENE_MARKET_ENTRANCE_NIGHT) {
|
||||
if (textId == TEXT_MARKET_GUARD_NIGHT && CVarGetInteger(CVAR_ENHANCEMENT("MarketSneak"), 0) && play->sceneNum == SCENE_MARKET_ENTRANCE_NIGHT) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, TEXT_MARKET_GUARD_NIGHT);
|
||||
}
|
||||
if (textId == TEXT_FISHERMAN_LEAVE && CVarGetInteger("gQuitFishingAtDoor", 0)) {
|
||||
if (textId == TEXT_FISHERMAN_LEAVE && CVarGetInteger(CVAR_ENHANCEMENT("QuitFishingAtDoor"), 0)) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, TEXT_FISHERMAN_LEAVE);
|
||||
}
|
||||
font->charTexBuf[0] = (messageEntry.GetTextBoxType() << 4) | messageEntry.GetTextBoxPosition();
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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, ¶ms)) {
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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];
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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 {
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -106,7 +106,7 @@ void BgBreakwall_Init(Actor* thisx, PlayState* play) {
|
||||
s32 wallType = ((this->dyna.actor.params >> 13) & 3) & 0xFF;
|
||||
|
||||
// Initialize this with the mud wall, so it can't be affected by toggling while the actor is loaded
|
||||
blueFireArrowsEnabledOnMudwallLoad = CVarGetInteger("gBlueFireArrows", 0) || (IS_RANDO && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
|
||||
blueFireArrowsEnabledOnMudwallLoad = CVarGetInteger(CVAR_ENHANCEMENT("BlueFireArrows"), 0) || (IS_RANDO && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyActor_Init(&this->dyna, DPM_UNK);
|
||||
|
@ -69,7 +69,7 @@ void func_8087B7E8(BgHaka* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
if (play->sceneNum == SCENE_GRAVEYARD && !LINK_IS_ADULT && IS_DAY && !CVarGetInteger("gDayGravePull", 0)) {
|
||||
if (play->sceneNum == SCENE_GRAVEYARD && !LINK_IS_ADULT && IS_DAY && !CVarGetInteger(CVAR_ENHANCEMENT("DayGravePull"), 0)) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
if (!Play_InCsMode(play)) {
|
||||
|
@ -211,9 +211,9 @@ void BgHakaGate_StatueTurn(BgHakaGate* this, PlayState* play) {
|
||||
if (turnFinished) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
|
||||
this->vRotYDeg10 = (this->vRotYDeg10 + turnAngle) % 3600;
|
||||
this->vTurnRateDeg10 = CVarGetInteger("gFasterBlockPush", 0) * 2;
|
||||
this->vTurnRateDeg10 = CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 2;
|
||||
this->vTurnAngleDeg10 = 0;
|
||||
this->vTimer = 5 - ((CVarGetInteger("gFasterBlockPush", 0) * 3) / 5);
|
||||
this->vTimer = 5 - ((CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 3) / 5);
|
||||
this->actionFunc = BgHakaGate_StatueIdle;
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ void BgHakaTubo_DropCollectible(BgHakaTubo* this, PlayState* play) {
|
||||
func_80078884(NA_SE_SY_ERROR);
|
||||
} else {
|
||||
// Random rewards
|
||||
if (CVarGetInteger("gNoRandomDrops", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("NoRandomDrops"), 0)) {
|
||||
collectibleParams = -1;
|
||||
} else if(rnd < 0.4f) {
|
||||
collectibleParams = ITEM00_BOMBS_A;
|
||||
@ -196,7 +196,7 @@ void BgHakaTubo_DropCollectible(BgHakaTubo* this, PlayState* play) {
|
||||
}
|
||||
} else if (Flags_GetCollectible(play, this->dyna.actor.params) != 0) {
|
||||
// If small key already collected, drop recovery heart instead
|
||||
if (CVarGetInteger("gNoHeartDrops", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("NoHeartDrops"), 0)) {
|
||||
collectibleParams = -1;
|
||||
}
|
||||
else {
|
||||
|
@ -320,7 +320,7 @@ void BgHeavyBlock_Wait(BgHeavyBlock* this, PlayState* play) {
|
||||
if (Actor_HasParent(&this->dyna.actor, play)) {
|
||||
this->timer = 0;
|
||||
|
||||
if (!CVarGetInteger("gFasterHeavyBlockLift", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 0)) {
|
||||
switch (this->dyna.actor.params & 0xFF) {
|
||||
case HEAVYBLOCK_BREAKABLE:
|
||||
OnePointCutscene_Init(play, 4020, 270, &this->dyna.actor, MAIN_CAM);
|
||||
@ -369,7 +369,7 @@ void BgHeavyBlock_LiftedUp(BgHeavyBlock* this, PlayState* play) {
|
||||
|
||||
this->timer++;
|
||||
|
||||
if (!CVarGetInteger("gFasterHeavyBlockLift", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 0)) {
|
||||
func_8002DF54(play, &player->actor, 8);
|
||||
}
|
||||
|
||||
@ -409,7 +409,7 @@ void BgHeavyBlock_Fly(BgHeavyBlock* this, PlayState* play) {
|
||||
Quake_SetCountdown(quakeIndex, 30);
|
||||
|
||||
// We don't want this arbitrarily long quake with the enhancement enabled
|
||||
if (!CVarGetInteger("gFasterHeavyBlockLift", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 0)) {
|
||||
quakeIndex = Quake_Add(GET_ACTIVE_CAM(play), 2);
|
||||
Quake_SetSpeed(quakeIndex, 12000);
|
||||
Quake_SetQuakeValues(quakeIndex, 5, 0, 0, 0);
|
||||
|
@ -137,9 +137,9 @@ void func_8088B268(BgHidanRock* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
this->dyna.actor.speedXZ = this->dyna.actor.speedXZ + (CVarGetInteger("gFasterBlockPush", 0) * 0.3) + 0.5f;
|
||||
this->dyna.actor.speedXZ = this->dyna.actor.speedXZ + (CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 0.3) + 0.5f;
|
||||
this->dyna.actor.speedXZ =
|
||||
CLAMP_MAX(this->dyna.actor.speedXZ, 2.0f + (CVarGetInteger("gFasterBlockPush", 0) * 0.5));
|
||||
CLAMP_MAX(this->dyna.actor.speedXZ, 2.0f + (CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 0.5));
|
||||
|
||||
if (D_8088BFC0 > 0.0f) {
|
||||
temp_v1 = Math_StepToF(&D_8088BFC0, 20.0f, this->dyna.actor.speedXZ);
|
||||
@ -157,7 +157,7 @@ void func_8088B268(BgHidanRock* this, PlayState* play) {
|
||||
this->dyna.actor.home.pos.z = this->dyna.actor.world.pos.z;
|
||||
D_8088BFC0 = 0.0f;
|
||||
this->dyna.actor.speedXZ = 0.0f;
|
||||
this->timer = 5 - ((CVarGetInteger("gFasterBlockPush", 0) * 3) / 5);
|
||||
this->timer = 5 - ((CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 3) / 5);
|
||||
}
|
||||
|
||||
func_8002F974(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
|
||||
|
@ -105,7 +105,7 @@ void func_80890740(BgIceShelter* this, PlayState* play) {
|
||||
s32 type = (this->dyna.actor.params >> 8) & 7;
|
||||
|
||||
// Initialize this with the red ice, so it can't be affected by toggling while the actor is loaded
|
||||
blueFireArrowsEnabledOnRedIceLoad = CVarGetInteger("gBlueFireArrows", 0) || (IS_RANDO && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
|
||||
blueFireArrowsEnabledOnRedIceLoad = CVarGetInteger(CVAR_ENHANCEMENT("BlueFireArrows"), 0) || (IS_RANDO && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
|
||||
|
||||
Collider_InitCylinder(play, &this->cylinder1);
|
||||
// If "Blue Fire Arrows" is enabled, set up a collider on the red ice that responds to them
|
||||
|
@ -443,7 +443,7 @@ void func_80896950(BgJyaCobra* this, PlayState* play) {
|
||||
|
||||
if (this->dyna.unk_150 > 0.001f) {
|
||||
this->unk_168++;
|
||||
if (this->unk_168 >= (15 - CVarGetInteger("gFasterBlockPush", 0) * 2)) {
|
||||
if (this->unk_168 >= (15 - CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 2)) {
|
||||
func_808969F8(this, play);
|
||||
}
|
||||
} else {
|
||||
@ -478,7 +478,7 @@ void func_808969F8(BgJyaCobra* this, PlayState* play) {
|
||||
this->unk_174.z = player->actor.world.pos.z - this->dyna.actor.world.pos.z;
|
||||
this->unk_170 = 0;
|
||||
this->unk_172 = true;
|
||||
this->unk_16E = CVarGetInteger("gFasterBlockPush", 0) * 20;
|
||||
this->unk_16E = CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 20;
|
||||
}
|
||||
|
||||
void func_80896ABC(BgJyaCobra* this, PlayState* play) {
|
||||
|
@ -99,7 +99,7 @@ void BgJyaLift_DelayMove(BgJyaLift* this, PlayState* play) {
|
||||
// The cutscene of the platform lowering will show the central room in an unloaded state if
|
||||
// Link is not standing on the platform as it lowers. Therefore check for the Sunlight arrows
|
||||
// enhancement and if it's enabled, check that Link is on the platform. Otherwise skip it.
|
||||
if (!(CVarGetInteger("gSunlightArrows", 0) || Randomizer_GetSettingValue(RSK_SUNLIGHT_ARROWS)) ||
|
||||
if (!(CVarGetInteger(CVAR_ENHANCEMENT("SunlightArrows"), 0) || Randomizer_GetSettingValue(RSK_SUNLIGHT_ARROWS)) ||
|
||||
(GET_PLAYER(play)->actor.world.pos.x > -19.0f &&
|
||||
GET_PLAYER(play)->actor.world.pos.x < 139.0f &&
|
||||
GET_PLAYER(play)->actor.world.pos.z > -1172.0f &&
|
||||
|
@ -216,7 +216,7 @@ void BgMoriBigst_SetupStalfosPairFight(BgMoriBigst* this, PlayState* play) {
|
||||
void BgMoriBigst_StalfosPairFight(BgMoriBigst* this, PlayState* play) {
|
||||
if ((this->dyna.actor.home.rot.z == 0 ||
|
||||
// Check if all enemies are defeated instead of the regular stalfos when enemy randomizer or crowd control is on.
|
||||
(Flags_GetTempClear(play, this->dyna.actor.room) && (CVarGetInteger("gRandomizedEnemies", 0) || (CVarGetInteger("gCrowdControl", 0))))) &&
|
||||
(Flags_GetTempClear(play, this->dyna.actor.room) && (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || (CVarGetInteger("gCrowdControl", 0))))) &&
|
||||
!Player_InCsMode(play)) {
|
||||
Flags_SetSwitch(play, (this->dyna.actor.params >> 8) & 0x3F);
|
||||
BgMoriBigst_SetupDone(this, play);
|
||||
|
@ -94,7 +94,7 @@ void BgMoriKaitenkabe_Wait(BgMoriKaitenkabe* this, PlayState* play) {
|
||||
|
||||
if (this->dyna.unk_150 > 0.001f) {
|
||||
this->timer++;
|
||||
if ((this->timer > (28 - CVarGetInteger("gFasterBlockPush", 0) * 4)) && !Player_InCsMode(play)) {
|
||||
if ((this->timer > (28 - CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 4)) && !Player_InCsMode(play)) {
|
||||
BgMoriKaitenkabe_SetupRotate(this);
|
||||
func_8002DF54(play, &this->dyna.actor, 8);
|
||||
Math_Vec3f_Copy(&this->lockedPlayerPos, &player->actor.world.pos);
|
||||
@ -118,7 +118,7 @@ void BgMoriKaitenkabe_Wait(BgMoriKaitenkabe* this, PlayState* play) {
|
||||
|
||||
void BgMoriKaitenkabe_SetupRotate(BgMoriKaitenkabe* this) {
|
||||
this->actionFunc = BgMoriKaitenkabe_Rotate;
|
||||
this->rotSpeed = CVarGetInteger("gFasterBlockPush", 0) * 0.1f;
|
||||
this->rotSpeed = CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 0.1f;
|
||||
this->rotYdeg = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -387,8 +387,8 @@ void BgPoEvent_BlockPush(BgPoEvent* this, PlayState* play) {
|
||||
s32 blockStop;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
this->dyna.actor.speedXZ = this->dyna.actor.speedXZ + (CVarGetInteger("gFasterBlockPush", 0) * 0.3) + 0.5f;
|
||||
this->dyna.actor.speedXZ = CLAMP_MAX(this->dyna.actor.speedXZ, 2.0f + (CVarGetInteger("gFasterBlockPush", 0) * 0.5));
|
||||
this->dyna.actor.speedXZ = this->dyna.actor.speedXZ + (CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 0.3) + 0.5f;
|
||||
this->dyna.actor.speedXZ = CLAMP_MAX(this->dyna.actor.speedXZ, 2.0f + (CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 0.5));
|
||||
blockStop = Math_StepToF(&sBgPoEventblockPushDist, 20.0f, this->dyna.actor.speedXZ);
|
||||
displacement = this->direction * sBgPoEventblockPushDist;
|
||||
this->dyna.actor.world.pos.x = (Math_SinS(this->dyna.unk_158) * displacement) + this->dyna.actor.home.pos.x;
|
||||
@ -403,7 +403,7 @@ void BgPoEvent_BlockPush(BgPoEvent* this, PlayState* play) {
|
||||
this->dyna.actor.home.pos.z = this->dyna.actor.world.pos.z;
|
||||
sBgPoEventblockPushDist = 0.0f;
|
||||
this->dyna.actor.speedXZ = 0.0f;
|
||||
this->direction = 5 - ((CVarGetInteger("gFasterBlockPush", 0) * 3) / 5);
|
||||
this->direction = 5 - ((CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 3) / 5);
|
||||
sBgPoEventBlocksAtRest++;
|
||||
this->actionFunc = BgPoEvent_BlockIdle;
|
||||
if (this->type == 1) {
|
||||
|
@ -260,9 +260,9 @@ void func_808B4194(BgSpot15Rrbox* this, PlayState* play) {
|
||||
s32 approxFResult;
|
||||
Actor* actor = &this->dyna.actor;
|
||||
|
||||
this->unk_174 = this->unk_174 + ((CVarGetInteger("gFasterBlockPush", 0) / 2) * 0.5) + 0.5f;
|
||||
this->unk_174 = this->unk_174 + ((CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) / 2) * 0.5) + 0.5f;
|
||||
|
||||
this->unk_174 = CLAMP_MAX(this->unk_174, 2.0f + (CVarGetInteger("gFasterBlockPush", 0) * 0.5));
|
||||
this->unk_174 = CLAMP_MAX(this->unk_174, 2.0f + (CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 0.5));
|
||||
|
||||
approxFResult = Math_StepToF(&this->unk_178, 20.0f, this->unk_174);
|
||||
|
||||
@ -294,7 +294,7 @@ void func_808B4194(BgSpot15Rrbox* this, PlayState* play) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
this->unk_178 = 0.0f;
|
||||
this->unk_174 = 0.0f;
|
||||
this->unk_168 = 10 - ((CVarGetInteger("gFasterBlockPush", 0) * 3) / 2);
|
||||
this->unk_168 = 10 - ((CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 3) / 2);
|
||||
func_808B4084(this, play);
|
||||
}
|
||||
Audio_PlayActorSound2(actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
|
||||
|
@ -297,7 +297,7 @@ void func_808B7F74(BgSpot18Basket* this) {
|
||||
shapeRotY = this->dyna.actor.shape.rot.y;
|
||||
this->actionFunc = func_808B7FC0;
|
||||
|
||||
if ((shapeRotY < -0x2E93) || (shapeRotY >= 0x7C19) || CVarGetInteger("gGoronPot", 0)) {
|
||||
if ((shapeRotY < -0x2E93) || (shapeRotY >= 0x7C19) || CVarGetInteger(CVAR_ENHANCEMENT("GoronPot"), 0)) {
|
||||
this->unk_218 = 2;
|
||||
} else if (shapeRotY < 0x26C2) {
|
||||
this->unk_218 = 1;
|
||||
|
@ -1240,7 +1240,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
|
||||
static Color_RGBA8 bloodPrimColor = { 0, 120, 0, 255 };
|
||||
static Color_RGBA8 bloodEnvColor = { 0, 120, 0, 255 };
|
||||
|
||||
if(CVarGetInteger("gRedGanonBlood", 0)) {
|
||||
if(CVarGetInteger(CVAR_ENHANCEMENT("RedGanonBlood"), 0)) {
|
||||
bloodPrimColor.r = 120;
|
||||
bloodPrimColor.g = 0;
|
||||
|
||||
|
@ -1486,7 +1486,7 @@ void func_8090109C(BossGanon2* this, PlayState* play) {
|
||||
static Color_RGBA8 sPrimColor = { 0, 120, 0, 255 };
|
||||
static Color_RGBA8 sEnvColor = { 0, 120, 0, 255 };
|
||||
|
||||
if(CVarGetInteger("gRedGanonBlood", 0)) {
|
||||
if(CVarGetInteger(CVAR_ENHANCEMENT("RedGanonBlood"), 0)) {
|
||||
sPrimColor.r = 120;
|
||||
sPrimColor.g = 0;
|
||||
|
||||
|
@ -445,7 +445,7 @@ void BossGoma_SetupCeilingIdle(BossGoma* this) {
|
||||
void BossGoma_SetupFallJump(BossGoma* this) {
|
||||
// When in Enemy Randomizer, reset the state of the spawned Gohma Larva because it's not done
|
||||
// by the (non-existent) Larva themselves.
|
||||
if (CVarGetInteger("gRandomizedEnemies", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
|
||||
this->childrenGohmaState[0] = this->childrenGohmaState[1] = this->childrenGohmaState[2] = 0;
|
||||
}
|
||||
Animation_Change(&this->skelanime, &gGohmaLandAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -5.0f);
|
||||
@ -1559,14 +1559,14 @@ void BossGoma_CeilingIdle(BossGoma* this, PlayState* play) {
|
||||
|
||||
if (this->framesUntilNextAction == 0) {
|
||||
Actor* nearbyEnTest = NULL;
|
||||
if (CVarGetInteger("gRandomizedEnemies", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
|
||||
nearbyEnTest = Actor_FindNearby(play, &this->actor, -1, ACTORCAT_ENEMY, 8000.0f);
|
||||
}
|
||||
if (this->childrenGohmaState[0] == 0 && this->childrenGohmaState[1] == 0 && this->childrenGohmaState[2] == 0) {
|
||||
// if no child gohma has been spawned
|
||||
BossGoma_SetupCeilingPrepareSpawnGohmas(this);
|
||||
} else if ((this->childrenGohmaState[0] < 0 && this->childrenGohmaState[1] < 0 && this->childrenGohmaState[2] < 0) ||
|
||||
(nearbyEnTest == NULL && CVarGetInteger("gRandomizedEnemies", 0))) {
|
||||
(nearbyEnTest == NULL && CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0))) {
|
||||
// In authentic gameplay, check if all baby Ghomas are dead. In Enemy Randomizer, check if there's no enemies alive.
|
||||
BossGoma_SetupFallJump(this);
|
||||
} else {
|
||||
|
@ -360,7 +360,7 @@ void BossSst_HeadSetupLurk(BossSst* this) {
|
||||
}
|
||||
|
||||
void BossSst_HeadLurk(BossSst* this, PlayState* play) {
|
||||
if (CVarGetInteger("gQuickBongoKill", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("QuickBongoKill"), 0)) {
|
||||
this->colliderCyl.base.acFlags |= AC_ON;
|
||||
}
|
||||
|
||||
@ -371,7 +371,7 @@ void BossSst_HeadLurk(BossSst* this, PlayState* play) {
|
||||
|
||||
void BossSst_HeadSetupIntro(BossSst* this, PlayState* play) {
|
||||
//Make sure to restore original behavior if the quick kill didn't happen
|
||||
if (CVarGetInteger("gQuickBongoKill", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("QuickBongoKill"), 0)) {
|
||||
this->colliderCyl.base.acFlags &= ~AC_ON;
|
||||
}
|
||||
|
||||
@ -2665,7 +2665,7 @@ void BossSst_UpdateHead(Actor* thisx, PlayState* play) {
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base);
|
||||
}
|
||||
|
||||
if ((this->actionFunc != BossSst_HeadLurk || CVarGetInteger("gQuickBongoKill", 0)) && (this->actionFunc != BossSst_HeadIntro)) {
|
||||
if ((this->actionFunc != BossSst_HeadLurk || CVarGetInteger(CVAR_ENHANCEMENT("QuickBongoKill"), 0)) && (this->actionFunc != BossSst_HeadIntro)) {
|
||||
if (this->colliderCyl.base.acFlags & AC_ON) {
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCyl.base);
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ void DoorAna_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
this->actionFunc(this, play);
|
||||
// Changes the grottos facing angle based on camera angle
|
||||
if (!CVarGetInteger("gDisableGrottoRotation", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("DisableGrottoRotation"), 0)) {
|
||||
this->actor.shape.rot.y = Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x8000;
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ void ElfMsg_Destroy(Actor* thisx, PlayState* play) {
|
||||
|
||||
s32 ElfMsg_GetMessageId(ElfMsg* this) {
|
||||
// Negative message ID forces link to talk to Navi
|
||||
if (this->actor.params & 0x8000 || CVarGetInteger("gNoForcedNavi", 0) != 0) {
|
||||
if (this->actor.params & 0x8000 || CVarGetInteger(CVAR_ENHANCEMENT("NoForcedNavi"), 0) != 0) {
|
||||
return (this->actor.params & 0xFF) + 0x100;
|
||||
} else {
|
||||
return -((this->actor.params & 0xFF) + 0x100);
|
||||
|
@ -670,7 +670,7 @@ void EnAm_Statue(EnAm* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
f32 temp158f = this->dyna.unk_158;
|
||||
s16 moveDir = 0;
|
||||
s32 blockSpeed = CVarGetInteger("gFasterBlockPush", 0);
|
||||
s32 blockSpeed = CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0);
|
||||
|
||||
if (this->unk_258 == 0) {
|
||||
if (this->dyna.unk_150 != 0.0f) {
|
||||
|
@ -116,7 +116,7 @@ void func_809B27D8(EnAnubiceFire* this, PlayState* play) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_IT_SHIELD_REFLECT_SW);
|
||||
this->cylinder.base.atFlags &= 0xFFE9;
|
||||
this->cylinder.base.atFlags |= 8;
|
||||
this->cylinder.info.toucher.dmgFlags = CVarGetInteger("gAnubisFix", 0) ? 0x800 : 2;
|
||||
this->cylinder.info.toucher.dmgFlags = CVarGetInteger(CVAR_ENHANCEMENT("AnubixFix"), 0) ? 0x800 : 2;
|
||||
this->unk_15A = 30;
|
||||
this->actor.params = 1;
|
||||
this->actor.velocity.x *= -1.0f;
|
||||
|
@ -104,8 +104,8 @@ void EnBlkobj_DarkLinkFight(EnBlkobj* this, PlayState* play) {
|
||||
// Check for if Dark Link is defeated in authentic gameplay.
|
||||
// Check for if all enemies are defeated with enemy randomizer or crowd control on.
|
||||
uint8_t roomCleared =
|
||||
(!CVarGetInteger("gRandomizedEnemies", 0) && !CVarGetInteger("gCrowdControl", 0) && Actor_Find(&play->actorCtx, ACTOR_EN_TORCH2, ACTORCAT_BOSS) == NULL) ||
|
||||
((CVarGetInteger("gRandomizedEnemies", 0) || CVarGetInteger("gCrowdControl", 0)) && Flags_GetTempClear(play, this->dyna.actor.room));
|
||||
(!CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && !CVarGetInteger("gCrowdControl", 0) && Actor_Find(&play->actorCtx, ACTOR_EN_TORCH2, ACTORCAT_BOSS) == NULL) ||
|
||||
((CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || CVarGetInteger("gCrowdControl", 0)) && Flags_GetTempClear(play, this->dyna.actor.room));
|
||||
if (roomCleared) {
|
||||
Flags_SetClear(play, this->dyna.actor.room);
|
||||
this->timer++;
|
||||
|
@ -125,7 +125,7 @@ void EnBom_Init(Actor* thisx, PlayState* play) {
|
||||
Collider_SetCylinder(play, &this->bombCollider, thisx, &sCylinderInit);
|
||||
Collider_SetJntSph(play, &this->explosionCollider, thisx, &sJntSphInit, &this->explosionColliderItems[0]);
|
||||
this->explosionColliderItems[0].info.toucher.damage += (thisx->shape.rot.z & 0xFF00) >> 8;
|
||||
if (CVarGetInteger("gNutsExplodeBombs", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("NutsExplodeBombs"), 0)) {
|
||||
this->bombCollider.info.bumper.dmgFlags |= 1;
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ void EnBom_Explode(EnBom* this, PlayState* play) {
|
||||
func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96);
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gStaticExplosionRadius", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("StaticExplosionRadius"), 0)) {
|
||||
//72 is the maximum radius of an OoT bomb explosion
|
||||
this->explosionCollider.elements[0].dim.worldSphere.radius = 72;
|
||||
} else {
|
||||
@ -397,7 +397,7 @@ void EnBom_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
if (thisx->params == BOMB_BODY) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
if (!CVarGetInteger("gDisableBombBillboarding", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("DisableBombBillboarding"), 0)) {
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
}
|
||||
func_8002EBCC(thisx, play, 0);
|
||||
|
@ -69,7 +69,7 @@ void EnBomBowlMan_Init(Actor* thisx, PlayState* play2) {
|
||||
Actor_SetScale(&this->actor, 0.013f);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
if(CVarGetInteger("gCustomizeBombchuBowling", 0) && CVarGetInteger(i == 0 ? "gBombchuBowlingNoSmallCucco" : "gBombchuBowlingNoBigCucco", 0)) {
|
||||
if(CVarGetInteger(CVAR_ENHANCEMENT("CustomizeBombchuBowling"), 0) && CVarGetInteger(i == 0 ? CVAR_ENHANCEMENT("BombchuBowlingNoSmallCucco") : CVAR_ENHANCEMENT("BombchuBowlingNoBigCucco"), 0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -327,8 +327,8 @@ void EnBomBowlMan_HandlePlayChoice(EnBomBowlMan* this, PlayState* play) {
|
||||
Rupees_ChangeBy(-30);
|
||||
this->minigamePlayStatus = 1;
|
||||
this->wallStatus[0] = this->wallStatus[1] = 0;
|
||||
if(CVarGetInteger("gCustomizeBombchuBowling", 0)) {
|
||||
play->bombchuBowlingStatus = CVarGetInteger("gBombchuBowlingAmmunition", 10);
|
||||
if(CVarGetInteger(CVAR_ENHANCEMENT("CustomizeBombchuBowling"), 0)) {
|
||||
play->bombchuBowlingStatus = CVarGetInteger(CVAR_ENHANCEMENT("BombchuBowlingAmmo"), 10);
|
||||
}
|
||||
else {
|
||||
play->bombchuBowlingStatus = 10;
|
||||
|
@ -139,7 +139,7 @@ void EnBomChu_UpdateFloorPoly(EnBomChu* this, CollisionPoly* floorPoly, PlayStat
|
||||
f32 normDotUp;
|
||||
MtxF mf;
|
||||
|
||||
if (CVarGetInteger("gBombchusOOB", 0) && floorPoly == NULL) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("BombchusOOB"), 0) && floorPoly == NULL) {
|
||||
EnBomChu_Explode(this, play);
|
||||
return;
|
||||
}
|
||||
|
@ -629,7 +629,7 @@ void EnBox_Update(Actor* thisx, PlayState* play) {
|
||||
if (((!IS_RANDO && ((this->dyna.actor.params >> 5 & 0x7F) == 0x7C)) ||
|
||||
(IS_RANDO && this->getItemEntry.getItemId == RG_ICE_TRAP)) &&
|
||||
this->actionFunc == EnBox_Open && this->skelanime.curFrame > 45 && this->iceSmokeTimer < 100) {
|
||||
if (!CVarGetInteger("gAddTraps.enabled", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("ExtraTraps.Enabled"), 0)) {
|
||||
EnBox_SpawnIceSmoke(this, play);
|
||||
}
|
||||
}
|
||||
@ -637,8 +637,8 @@ void EnBox_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
void EnBox_UpdateSizeAndTexture(EnBox* this, PlayState* play) {
|
||||
EnBox_CreateExtraChestTextures();
|
||||
int csmc = CVarGetInteger("gChestSizeAndTextureMatchesContents", CSMC_DISABLED);
|
||||
int requiresStoneAgony = CVarGetInteger("gChestSizeDependsStoneOfAgony", 0);
|
||||
int csmc = CVarGetInteger(CVAR_ENHANCEMENT("ChestSizeAndTextureMatchContents"), CSMC_DISABLED);
|
||||
int requiresStoneAgony = CVarGetInteger(CVAR_ENHANCEMENT("ChestSizeDependsStoneOfAgony"), 0);
|
||||
GetItemCategory getItemCategory;
|
||||
|
||||
int isVanilla = csmc == CSMC_DISABLED || (requiresStoneAgony && !CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY)) ||
|
||||
|
@ -262,7 +262,7 @@ void EnClearTag_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
// Change Arwing to regular enemy instead of boss with enemy randomizer and crowd control.
|
||||
// This way Arwings will be considered for "clear enemy" rooms properly.
|
||||
if (CVarGetInteger("gRandomizedEnemies", 0) || CVarGetInteger("gCrowdControl", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || CVarGetInteger("gCrowdControl", 0)) {
|
||||
Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_ENEMY);
|
||||
}
|
||||
|
||||
@ -478,7 +478,7 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) {
|
||||
|
||||
// Introduce a range requirement in Enemy Rando so Arwings don't shoot the player from
|
||||
// across the map. Especially noticeable in big maps like Lake Hylia and Hyrule Field.
|
||||
uint8_t enemyRandoShootLaser = !CVarGetInteger("gRandomizedEnemies", 0) || this->actor.xzDistToPlayer < 1000.0f;
|
||||
uint8_t enemyRandoShootLaser = !CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || this->actor.xzDistToPlayer < 1000.0f;
|
||||
|
||||
// Check if the Arwing should fire its laser.
|
||||
if ((this->frameCounter % 4) == 0 && (Rand_ZeroOne() < 0.75f) &&
|
||||
|
@ -123,7 +123,7 @@ void EnCow_Init(Actor* thisx, PlayState* play) {
|
||||
func_809DEE9C(this);
|
||||
this->actionFunc = func_809DF96C;
|
||||
if (play->sceneNum == SCENE_LINKS_HOUSE) {
|
||||
if (!LINK_IS_ADULT && !CVarGetInteger("gCowOfTime", 0)) {
|
||||
if (!LINK_IS_ADULT && !CVarGetInteger(CVAR_ENHANCEMENT("CowOfTime"), 0)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
@ -364,7 +364,7 @@ void EnCrow_Die(EnCrow* this, PlayState* play) {
|
||||
} else {
|
||||
Item_DropCollectible(play, &this->actor.world.pos, ITEM00_RUPEE_RED);
|
||||
}
|
||||
if (!CVarGetInteger("gRandomizedEnemies", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
|
||||
EnCrow_SetupRespawn(this);
|
||||
} else {
|
||||
Actor_Kill(this);
|
||||
|
@ -373,7 +373,7 @@ void EnDog_FollowPlayer(EnDog* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gDogFollowsEverywhere", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("DogFollowsEverywhere"), 0)) {
|
||||
// If the dog is too far away it's usually because they are stuck in a hole or on a different floor, this gives them a push
|
||||
if (this->actor.xyzDistToPlayerSq > 250000.0f) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
@ -394,7 +394,7 @@ void EnDog_FollowPlayer(EnDog* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->actor.xzDistToPlayer > 400.0f) {
|
||||
if (CVarGetInteger("gDogFollowsEverywhere", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("DogFollowsEverywhere"), 0)) {
|
||||
// Instead of stopping following when the dog gets too far, just speed them up.
|
||||
speed = this->actor.xzDistToPlayer / 25.0f;
|
||||
} else {
|
||||
@ -419,7 +419,7 @@ void EnDog_FollowPlayer(EnDog* this, PlayState* play) {
|
||||
|
||||
Math_ApproachF(&this->actor.speedXZ, speed, 0.6f, 1.0f);
|
||||
|
||||
if (!(this->actor.xzDistToPlayer > 400.0f) || CVarGetInteger("gDogFollowsEverywhere", 0)) {
|
||||
if (!(this->actor.xzDistToPlayer > 400.0f) || CVarGetInteger(CVAR_ENHANCEMENT("DogFollowsEverywhere"), 0)) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 10, 1000, 1);
|
||||
this->actor.shape.rot = this->actor.world.rot;
|
||||
}
|
||||
|
@ -349,11 +349,11 @@ void EnDoor_Draw(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
if (this->lockTimer != 0) {
|
||||
if (CVarGetInteger("gShowDoorLocksOnBothSides", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("ShowDoorLocksOnBothSides"), 0)) {
|
||||
Matrix_Push();
|
||||
}
|
||||
Actor_DrawDoorLock(play, this->lockTimer, DOORLOCK_NORMAL);
|
||||
if (CVarGetInteger("gShowDoorLocksOnBothSides", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("ShowDoorLocksOnBothSides"), 0)) {
|
||||
Matrix_Pop();
|
||||
Matrix_RotateZYX(0, 0x8000, 0, MTXMODE_APPLY);
|
||||
Actor_DrawDoorLock(play, this->lockTimer, DOORLOCK_NORMAL);
|
||||
|
@ -276,7 +276,7 @@ void func_809FE040(EnDu* this) {
|
||||
this->unk_1E6 = 0;
|
||||
}
|
||||
// #region SOH[Enhancement]
|
||||
if (CVarGetInteger("gEnhancements.FixDaruniaDanceSpeed", 1)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("FixDaruniaDanceSpeed"), 1)) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfoFix, animationIndices[this->unk_1E6]);
|
||||
// #endregion
|
||||
} else {
|
||||
@ -298,7 +298,7 @@ void func_809FE104(EnDu* this) {
|
||||
this->unk_1E6++;
|
||||
if (this->unk_1E6 < 4) {
|
||||
// #region SOH[Enhancement]
|
||||
if (CVarGetInteger("gEnhancements.FixDaruniaDanceSpeed", 1) && this->unk_1E6 <= 1) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("FixDaruniaDanceSpeed"), 1) && this->unk_1E6 <= 1) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfoFix, animationIndices[this->unk_1E6]);
|
||||
// #endregion
|
||||
} else {
|
||||
@ -498,7 +498,7 @@ void func_809FE890(EnDu* this, PlayState* play) {
|
||||
if (csAction->action == 7 || csAction->action == 8) {
|
||||
this->unk_1E6 = 0;
|
||||
// #region SOH[Enhancement]
|
||||
if (CVarGetInteger("gEnhancements.FixDaruniaDanceSpeed", 1)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("FixDaruniaDanceSpeed"), 1)) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfoFix, ENDU_ANIM_7);
|
||||
// #endregion
|
||||
} else {
|
||||
|
@ -631,15 +631,15 @@ void func_80A0329C(EnElf* this, PlayState* play) {
|
||||
|
||||
if ((heightDiff > 0.0f) && (heightDiff < 60.0f)) {
|
||||
if (!func_80A01F90(&this->actor.world.pos, &refActor->actor.world.pos, 10.0f)) {
|
||||
if (CVarGetInteger("gFairyEffect", 0) && !(this->fairyFlags & FAIRY_FLAG_BIG))
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("FairyEffect"), 0) && !(this->fairyFlags & FAIRY_FLAG_BIG))
|
||||
{
|
||||
if (CVarGetInteger("gFairyPercentRestore", 0))
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("FairyPercentRestore"), 0))
|
||||
{
|
||||
Health_ChangeBy(play, (gSaveContext.healthCapacity * CVarGetInteger("gFairyHealth", 100) / 100 + 15) / 16 * 16);
|
||||
Health_ChangeBy(play, (gSaveContext.healthCapacity * CVarGetInteger(CVAR_ENHANCEMENT("FairyHealth"), 100) / 100 + 15) / 16 * 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
Health_ChangeBy(play, CVarGetInteger("gFairyHealth", 8) * 16);
|
||||
Health_ChangeBy(play, CVarGetInteger(CVAR_ENHANCEMENT("FairyHealth"), 8) * 16);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -169,7 +169,7 @@ void EnEncount1_SpawnLeevers(EnEncount1* this, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
int32_t modifiedSpawnRate = CVarGetInteger("gEnhancements.LeeverSpawnRate", 0);
|
||||
int32_t modifiedSpawnRate = CVarGetInteger(CVAR_ENHANCEMENT("LeeverSpawnRate"), 0);
|
||||
if (modifiedSpawnRate) {
|
||||
this->timer = 20 * modifiedSpawnRate;
|
||||
}
|
||||
@ -248,9 +248,9 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, PlayState* play) {
|
||||
// been spawned and/or killed.
|
||||
int8_t enemyCount = play->actorCtx.actorLists[ACTORCAT_ENEMY].length;
|
||||
if ((this->curNumSpawn < this->maxCurSpawns && this->totalNumSpawn < this->maxTotalSpawns) ||
|
||||
(CVarGetInteger("gRandomizedEnemies", 0) && enemyCount < 15)) {
|
||||
(CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && enemyCount < 15)) {
|
||||
while ((this->curNumSpawn < this->maxCurSpawns && this->totalNumSpawn < this->maxTotalSpawns) ||
|
||||
(CVarGetInteger("gRandomizedEnemies", 0) && enemyCount < 15)) {
|
||||
(CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && enemyCount < 15)) {
|
||||
if (play->sceneNum == SCENE_HYRULE_FIELD) {
|
||||
if ((player->floorSfxOffset == 0) || (player->actor.floorBgId != BGCHECK_SCENE) ||
|
||||
!(player->actor.bgCheckFlags & 1) || (player->stateFlags1 & PLAYER_STATE1_IN_WATER)) {
|
||||
@ -282,7 +282,7 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
if ((player->actor.yDistToWater != BGCHECK_Y_MIN) &&
|
||||
(floorY < (player->actor.world.pos.y + player->actor.yDistToWater*(CVarGetInteger("gEnemySpawnsOverWaterboxes", 0) ? 1 : -1)))) {
|
||||
(floorY < (player->actor.world.pos.y + player->actor.yDistToWater*(CVarGetInteger(CVAR_ENHANCEMENT("EnemySpawnsOverWaterboxes"), 0) ? 1 : -1)))) {
|
||||
break;
|
||||
}
|
||||
spawnPos.y = floorY;
|
||||
|
@ -388,7 +388,7 @@ void EnExRuppy_Draw(Actor* thisx, PlayState* play) {
|
||||
if (!this->invisible) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
|
||||
// purple/gold rupees need less scaling
|
||||
f32 mtxScale = this->colorIdx >= 3 ? 17.5f : 25.0f;
|
||||
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
|
||||
|
@ -212,7 +212,7 @@ void EnGSwitch_SilverRupeeTracker(EnGSwitch* this, PlayState* play) {
|
||||
static s8 majorScale[] = { 0, 2, 4, 5, 7, 9, 11, 13, 15, 17 };
|
||||
|
||||
if (this->noteIndex < sCollectedCount) {
|
||||
if (sCollectedCount < (CVarGetInteger("gSilverRupeeJingleExtend", 0) ? 10 : 5)) {
|
||||
if (sCollectedCount < (CVarGetInteger(CVAR_ENHANCEMENT("SilverRupeeJingleExtend"), 0) ? 10 : 5)) {
|
||||
// "sound?"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 音? ☆☆☆☆☆ %d\n" VT_RST, this->noteIndex);
|
||||
Audio_PlaySoundTransposed(&D_801333D4, NA_SE_EV_FIVE_COUNT_LUPY, majorScale[this->noteIndex]);
|
||||
@ -480,7 +480,7 @@ void EnGSwitch_DrawRupee(Actor* thisx, PlayState* play) {
|
||||
if (!this->broken) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
|
||||
// purple/gold/silver rupees need less scaling
|
||||
f32 mtxScale = this->colorIdx >= 3 ? 17.5f : 25.0f;
|
||||
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
|
||||
|
@ -252,7 +252,7 @@ s32 EnGe3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
||||
rot->x += this->headRot.y;
|
||||
|
||||
default:
|
||||
if (CVarGetInteger("gGerudoWarriorClothingFix", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("GerudoWarriorClothingFix"), 0)) {
|
||||
// This is a hack to fix the color-changing clothes this Gerudo has on N64 versions
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
switch (limbIndex) {
|
||||
|
@ -493,7 +493,7 @@ s32 EnGirlA_CanBuy_DekuNuts(PlayState* play, EnGirlA* this) {
|
||||
if (gSaveContext.rupees < this->basePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
if ((Item_CheckObtainability(ITEM_NUT) == ITEM_NONE) && !CVarGetInteger("gFastDrops", 0)) {
|
||||
if ((Item_CheckObtainability(ITEM_NUT) == ITEM_NONE) && !CVarGetInteger(CVAR_ENHANCEMENT("FastDrops"), 0)) {
|
||||
return CANBUY_RESULT_SUCCESS_FANFARE;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS;
|
||||
@ -506,7 +506,7 @@ s32 EnGirlA_CanBuy_DekuSticks(PlayState* play, EnGirlA* this) {
|
||||
if (gSaveContext.rupees < this->basePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
if ((Item_CheckObtainability(ITEM_STICK) == ITEM_NONE) && !CVarGetInteger("gFastDrops", 0)) {
|
||||
if ((Item_CheckObtainability(ITEM_STICK) == ITEM_NONE) && !CVarGetInteger(CVAR_ENHANCEMENT("FastDrops"), 0)) {
|
||||
return CANBUY_RESULT_SUCCESS_FANFARE;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS;
|
||||
@ -705,7 +705,7 @@ s32 EnGirlA_CanBuy_DekuSeeds(PlayState* play, EnGirlA* this) {
|
||||
if (gSaveContext.rupees < this->basePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
if ((Item_CheckObtainability(ITEM_SEEDS) == ITEM_NONE) && !CVarGetInteger("gFastDrops", 0)) {
|
||||
if ((Item_CheckObtainability(ITEM_SEEDS) == ITEM_NONE) && !CVarGetInteger(CVAR_ENHANCEMENT("FastDrops"), 0)) {
|
||||
return CANBUY_RESULT_SUCCESS_FANFARE;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS;
|
||||
|
@ -98,7 +98,7 @@ u16 EnGo_GetTextID(PlayState* play, Actor* thisx) {
|
||||
if (!IS_RANDO && gSaveContext.bgsFlag) {
|
||||
return 0x305E;
|
||||
} else if (INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_CLAIM_CHECK) {
|
||||
if (Environment_GetBgsDayCount() >= CVarGetInteger("gForgeTime", 3)) {
|
||||
if (Environment_GetBgsDayCount() >= CVarGetInteger(CVAR_ENHANCEMENT("ForgeTime"), 3)) {
|
||||
return 0x305E;
|
||||
} else {
|
||||
return 0x305D;
|
||||
|
@ -1082,7 +1082,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
|
||||
if (func_8002F368(play) == EXCH_ITEM_CLAIM_CHECK) {
|
||||
if (IS_RANDO && Flags_GetTreasure(play, 0x1F)) {
|
||||
textId = 0x3003;
|
||||
} else if (Environment_GetBgsDayCount() >= CVarGetInteger("gForgeTime", 3)) {
|
||||
} else if (Environment_GetBgsDayCount() >= CVarGetInteger(CVAR_ENHANCEMENT("ForgeTime"), 3)) {
|
||||
textId = 0x305E;
|
||||
} else {
|
||||
textId = 0x305D;
|
||||
@ -1091,7 +1091,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
|
||||
} else {
|
||||
if (IS_RANDO && Flags_GetTreasure(play, 0x1F)) {
|
||||
textId = 0x305E;
|
||||
} else if (Environment_GetBgsDayCount() >= CVarGetInteger("gForgeTime", 3)) {
|
||||
} else if (Environment_GetBgsDayCount() >= CVarGetInteger(CVAR_ENHANCEMENT("ForgeTime"), 3)) {
|
||||
textId = 0x3002;
|
||||
} else {
|
||||
textId = 0x305D;
|
||||
|
@ -337,9 +337,9 @@ void func_80A56B40(EnHeishi4* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
// Only allow sneaking when not wearing a mask as that triggers different dialogue. MM Bunny hood disables
|
||||
// these interactions, so bunny hood is fine in that case.
|
||||
if (CVarGetInteger("gMarketSneak", 0) &&
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MarketSneak"), 0) &&
|
||||
(player->currentMask == PLAYER_MASK_NONE ||
|
||||
(player->currentMask == PLAYER_MASK_BUNNY && CVarGetInteger("gMMBunnyHood", 0)))) {
|
||||
(player->currentMask == PLAYER_MASK_BUNNY && CVarGetInteger(CVAR_ENHANCEMENT("MMBunnyHood"), 0)))) {
|
||||
this->actionFunc = EnHeishi4_MarketSneak;
|
||||
} else {
|
||||
this->actionFunc = func_80A56614;
|
||||
|
@ -438,7 +438,7 @@ u16 func_80A6F810(PlayState* play, Actor* thisx) {
|
||||
|
||||
if (followingDog != 0) {
|
||||
this->unk_215 = false;
|
||||
return ((followingDog == 1) || (CVarGetInteger("gAllDogsRichard", 0))) ? 0x709F : 0x709E;
|
||||
return ((followingDog == 1) || (CVarGetInteger(CVAR_ENHANCEMENT("AllDogsRichard"), 0))) ? 0x709F : 0x709E;
|
||||
} else {
|
||||
return 0x709D;
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ void func_80A74398(Actor* thisx, PlayState* play) {
|
||||
Effect_Add(play, &this->blureIdx, EFFECT_BLURE1, 0, 0, &blureInit);
|
||||
func_80A74714(this);
|
||||
|
||||
uint8_t enemyRandoCCActive = CVarGetInteger("gRandomizedEnemies", 0) || CVarGetInteger("gCrowdControl", 0);
|
||||
uint8_t enemyRandoCCActive = CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || CVarGetInteger("gCrowdControl", 0);
|
||||
|
||||
if (this->switchFlags != 0xFF) {
|
||||
// In vanilla gameplay, Iron Knuckles are despawned based on specific flags in specific scenarios.
|
||||
@ -303,7 +303,7 @@ void func_80A747C0(EnIk* this, PlayState* play) {
|
||||
this->skelAnime.playSpeed = 1.0f;
|
||||
// Disable miniboss music with Enemy Randomizer because the music would keep
|
||||
// playing if the enemy was never defeated, which is common with Enemy Randomizer.
|
||||
if (!CVarGetInteger("gRandomizedEnemies", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
|
||||
func_800F5ACC(NA_BGM_MINI_BOSS);
|
||||
}
|
||||
}
|
||||
@ -663,7 +663,7 @@ void func_80A75A38(EnIk* this, PlayState* play) {
|
||||
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xB0);
|
||||
// Don't set flag when Enemy Rando or CrowdControl are on.
|
||||
// Instead Iron Knuckles rely on the "clear room" flag.
|
||||
if (this->switchFlags != 0xFF && !CVarGetInteger("gRandomizedEnemies", 0) && !CVarGetInteger("gCrowdControl", 0)) {
|
||||
if (this->switchFlags != 0xFF && !CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && !CVarGetInteger("gCrowdControl", 0)) {
|
||||
Flags_SetSwitch(play, this->switchFlags);
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
@ -1484,7 +1484,7 @@ void EnIk_Init(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
// Immediately trigger Iron Knuckle for Enemy Rando and Crowd Control
|
||||
if ((CVarGetInteger("gRandomizedEnemies", 0) || CVarGetInteger("gCrowdControl", 0)) && (thisx->params == 2 || thisx->params == 3)) {
|
||||
if ((CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || CVarGetInteger("gCrowdControl", 0)) && (thisx->params == 2 || thisx->params == 3)) {
|
||||
this->skelAnime.playSpeed = 1.0f;
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ void func_80A90264(EnKakasi2* this, PlayState* play) {
|
||||
this->unk_194++;
|
||||
|
||||
bool skipScarecrow = play->msgCtx.msgMode == MSGMODE_OCARINA_PLAYING &&
|
||||
((CVarGetInteger("gSkipScarecrow", 0) && gSaveContext.scarecrowSpawnSongSet) ||
|
||||
((CVarGetInteger(CVAR_ENHANCEMENT("InstantScarecrow"), 0) && gSaveContext.scarecrowSpawnSongSet) ||
|
||||
(IS_RANDO && Randomizer_GetSettingValue(RSK_SKIP_SCARECROWS_SONG)));
|
||||
|
||||
if ((BREG(1) != 0) || skipScarecrow && (this->actor.xzDistToPlayer < this->maxSpawnDistance.x) &&
|
||||
|
@ -1095,7 +1095,7 @@ void func_80A98DB4(EnKo* this, PlayState* play) {
|
||||
dist = this->actor.xzDistToPlayer;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gDisableKokiriDrawDistance", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("DisableKokiriDrawDistance"), 0) != 0) {
|
||||
this->appearDist = 32767.0f;
|
||||
Math_SmoothStepToF(&this->modelAlpha, (this->appearDist < dist) ? 0.0f : 255.0f, 0.3f, 40.0f, 1.0f);
|
||||
f32 test = this->appearDist;
|
||||
|
@ -137,9 +137,9 @@ void EnKusa_DropCollectible(EnKusa* this, PlayState* play) {
|
||||
Item_DropCollectibleRandom(play, NULL, &this->actor.world.pos, dropParams << 4);
|
||||
break;
|
||||
case ENKUSA_TYPE_1:
|
||||
if (CVarGetInteger("gNoRandomDrops", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("NoRandomDrops"), 0)) {
|
||||
}
|
||||
else if (CVarGetInteger("gNoHeartDrops", 0)) {
|
||||
else if (CVarGetInteger(CVAR_ENHANCEMENT("NoHeartDrops"), 0)) {
|
||||
Item_DropCollectible(play, &this->actor.world.pos, ITEM00_SEEDS);
|
||||
}
|
||||
else if (Rand_ZeroOne() < 0.5f) {
|
||||
|
@ -301,7 +301,7 @@ s32 EnKz_FollowPath(EnKz* this, PlayState* play) {
|
||||
pathDiffZ = pointPos->z - this->actor.world.pos.z;
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, (Math_FAtan2F(pathDiffX, pathDiffZ) * (0x8000 / M_PI)), 0xA, 0x3E8, 1);
|
||||
|
||||
if ((SQ(pathDiffX) + SQ(pathDiffZ)) < 10.0f * CVarGetInteger("gMweepSpeed", 1)) {
|
||||
if ((SQ(pathDiffX) + SQ(pathDiffZ)) < 10.0f * CVarGetInteger(CVAR_ENHANCEMENT("MweepSpeed"), 1)) {
|
||||
this->waypoint++;
|
||||
if (this->waypoint >= path->count) {
|
||||
this->waypoint = 0;
|
||||
@ -415,7 +415,7 @@ void EnKz_SetupMweep(EnKz* this, PlayState* play) {
|
||||
initPos.z += 260.0f;
|
||||
Play_CameraSetAtEye(play, this->cutsceneCamera, &pos, &initPos);
|
||||
func_8002DF54(play, &this->actor, 8);
|
||||
this->actor.speedXZ = 0.1f * CVarGetInteger("gMweepSpeed", 1);
|
||||
this->actor.speedXZ = 0.1f * CVarGetInteger(CVAR_ENHANCEMENT("MweepSpeed"), 1);
|
||||
this->actionFunc = EnKz_Mweep;
|
||||
}
|
||||
|
||||
|
@ -512,7 +512,7 @@ void EnMb_SetupClubAttack(EnMb* this) {
|
||||
|
||||
// Rotate Club Moblin towards player in Enemy Randomizer because they're
|
||||
// borderline useless otherwise in most scenarios.
|
||||
if (CVarGetInteger("gRandomizedEnemies", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 100.0f, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 3, 100.0f, 0);
|
||||
}
|
||||
@ -717,7 +717,7 @@ void EnMb_ClubWaitAfterAttack(EnMb* this, PlayState* play) {
|
||||
|
||||
// Rotate Club Moblin towards player in Enemy Randomizer because they're
|
||||
// borderline useless otherwise in most scenarios.
|
||||
if (CVarGetInteger("gRandomizedEnemies", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 100.0f, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 3, 100.0f, 0);
|
||||
}
|
||||
@ -844,7 +844,7 @@ void EnMb_ClubAttack(EnMb* this, PlayState* play) {
|
||||
|
||||
// Rotate Club Moblin towards player in Enemy Randomizer because they're
|
||||
// borderline useless otherwise in most scenarios.
|
||||
if (!CVarGetInteger("gRandomizedEnemies", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, relYawTarget[this->attack - 1] + this->actor.world.rot.y, 1, 0x2EE, 0);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 100.0f, 0);
|
||||
@ -891,7 +891,7 @@ void EnMb_ClubAttack(EnMb* this, PlayState* play) {
|
||||
// Disable camera shake when the Moblin attacks with Enemy Randomizer enabled.
|
||||
// This camera shake gets very annoying as these Moblins can spawn in many rooms,
|
||||
// and also often (initially) out of reach for the player.
|
||||
if (!CVarGetInteger("gRandomizedEnemies", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
|
||||
Camera_AddQuake(&play->mainCamera, 2, 0x19, 5);
|
||||
}
|
||||
func_800358DC(&this->actor, &effSpawnPos, &this->actor.world.rot, flamesParams, 20, flamesUnused, play,
|
||||
@ -1267,7 +1267,7 @@ void EnMb_ClubWaitPlayerNear(EnMb* this, PlayState* play) {
|
||||
|
||||
// Rotate Club Moblin towards player in Enemy Randomizer because they're
|
||||
// borderline useless otherwise in most scenarios.
|
||||
if (CVarGetInteger("gRandomizedEnemies", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 100.0f, 0);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 3, 100.0f, 0);
|
||||
}
|
||||
@ -1278,7 +1278,7 @@ void EnMb_ClubWaitPlayerNear(EnMb* this, PlayState* play) {
|
||||
// Add a height check to the Moblin's Club attack when Enemy Randomizer is on.
|
||||
// Without the height check, the Moblin will attack (and play the sound effect) a lot even though
|
||||
// the Moblin is very far away from the player in vertical rooms (like the first room in Deku Tree).
|
||||
s8 enemyRando = CVarGetInteger("gRandomizedEnemies", 0);
|
||||
s8 enemyRando = CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0);
|
||||
if (!enemyRando || (enemyRando && this->actor.yDistToPlayer <= 100.0f && this->actor.yDistToPlayer >= -100.0f)) {
|
||||
EnMb_SetupClubAttack(this);
|
||||
}
|
||||
|
@ -638,7 +638,7 @@ void func_80AAB5A4(EnMd* this, PlayState* play) {
|
||||
f32 temp;
|
||||
|
||||
if (play->sceneNum != SCENE_MIDOS_HOUSE) {
|
||||
if (CVarGetInteger("gDisableKokiriDrawDistance", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("DisableKokiriDrawDistance"), 0) != 0) {
|
||||
temp = (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_MIDO_AFTER_DEKU_TREES_DEATH) &&
|
||||
(play->sceneNum == SCENE_KOKIRI_FOREST))
|
||||
? 100.0f
|
||||
|
@ -666,7 +666,7 @@ void func_80AB6D08(EnNiw* this, PlayState* play) {
|
||||
}
|
||||
|
||||
this->path = 1;
|
||||
this->timer5 = 80 * CVarGetInteger("gCuccoStayDurationMultiplier", 1);
|
||||
this->timer5 = 80 * CVarGetInteger(CVAR_ENHANCEMENT("CuccoStayDurationMult"), 1);
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.velocity.y = 4.0f;
|
||||
} else {
|
||||
|
@ -75,7 +75,7 @@ void EnNutsball_Init(Actor* thisx, PlayState* play) {
|
||||
ActorShape_Init(&this->actor.shape, 400.0f, ActorShadow_DrawCircle, 13.0f);
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
if (CVarGetInteger("gRandomizedEnemies", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
|
||||
this->objBankIndex = 0;
|
||||
} else {
|
||||
this->objBankIndex = Object_GetIndex(&play->objectCtx, sObjectIDs[this->actor.params]);
|
||||
@ -176,7 +176,7 @@ void EnNutsball_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (CVarGetInteger("gNewDrops", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) != 0) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 6),
|
||||
|
@ -506,7 +506,7 @@ void EnOkuta_ProjectileFly(EnOkuta* this, PlayState* play) {
|
||||
pos.x = this->actor.world.pos.x;
|
||||
pos.y = this->actor.world.pos.y + 11.0f;
|
||||
pos.z = this->actor.world.pos.z;
|
||||
if (CVarGetInteger("gNewDrops", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) != 0) {
|
||||
static s16 sEffectScales[] = {
|
||||
145, 135, 115, 85, 75, 53, 45, 40, 35,
|
||||
};
|
||||
@ -763,7 +763,7 @@ void EnOkuta_Draw(Actor* thisx, PlayState* play) {
|
||||
} else {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (CVarGetInteger("gNewDrops", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) != 0) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 6),
|
||||
|
@ -373,7 +373,7 @@ void func_80ACA7E0(EnOwl* this, PlayState* play) {
|
||||
void EnOwl_ConfirmKokiriMessage(EnOwl* this, PlayState* play) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(play)) {
|
||||
// swap the order of the responses if better owl is enabled
|
||||
uint8_t index = CVarGetInteger("gBetterOwl", 0) == 0 ? play->msgCtx.choiceIndex : (1 - play->msgCtx.choiceIndex);
|
||||
uint8_t index = CVarGetInteger(CVAR_ENHANCEMENT("BetterOwl"), 0) == 0 ? play->msgCtx.choiceIndex : (1 - play->msgCtx.choiceIndex);
|
||||
switch (index) {
|
||||
case OWL_REPEAT:
|
||||
Message_ContinueTextbox(play, 0x2065);
|
||||
@ -402,7 +402,7 @@ void EnOwl_WaitOutsideKokiri(EnOwl* this, PlayState* play) {
|
||||
void func_80ACA998(EnOwl* this, PlayState* play) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(play)) {
|
||||
// swap the order of the responses if better owl is enabled
|
||||
uint8_t index = CVarGetInteger("gBetterOwl", 0) == 0 ? play->msgCtx.choiceIndex : (1 - play->msgCtx.choiceIndex);
|
||||
uint8_t index = CVarGetInteger(CVAR_ENHANCEMENT("BetterOwl"), 0) == 0 ? play->msgCtx.choiceIndex : (1 - play->msgCtx.choiceIndex);
|
||||
switch (index) {
|
||||
case OWL_REPEAT:
|
||||
Message_ContinueTextbox(play, 0x2069);
|
||||
@ -448,7 +448,7 @@ void EnOwl_WaitHyruleCastle(EnOwl* this, PlayState* play) {
|
||||
void func_80ACAB88(EnOwl* this, PlayState* play) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(play)) {
|
||||
// swap the order of the responses if better owl is enabled
|
||||
uint8_t index = CVarGetInteger("gBetterOwl", 0) == 0 ? play->msgCtx.choiceIndex : (1 - play->msgCtx.choiceIndex);
|
||||
uint8_t index = CVarGetInteger(CVAR_ENHANCEMENT("BetterOwl"), 0) == 0 ? play->msgCtx.choiceIndex : (1 - play->msgCtx.choiceIndex);
|
||||
switch (index) {
|
||||
case OWL_REPEAT:
|
||||
// obtained zelda's letter
|
||||
@ -491,7 +491,7 @@ void EnOwl_WaitKakariko(EnOwl* this, PlayState* play) {
|
||||
void func_80ACAD34(EnOwl* this, PlayState* play) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(play)) {
|
||||
// swap the order of the responses if better owl is enabled
|
||||
uint8_t index = CVarGetInteger("gBetterOwl", 0) == 0 ? play->msgCtx.choiceIndex : (1 - play->msgCtx.choiceIndex);
|
||||
uint8_t index = CVarGetInteger(CVAR_ENHANCEMENT("BetterOwl"), 0) == 0 ? play->msgCtx.choiceIndex : (1 - play->msgCtx.choiceIndex);
|
||||
switch (index) {
|
||||
case OWL_REPEAT:
|
||||
Message_ContinueTextbox(play, 0x206F);
|
||||
@ -529,7 +529,7 @@ void EnOwl_WaitGerudo(EnOwl* this, PlayState* play) {
|
||||
void func_80ACAEB8(EnOwl* this, PlayState* play) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(play)) {
|
||||
// swap the order of the responses if better owl is enabled
|
||||
uint8_t index = CVarGetInteger("gBetterOwl", 0) == 0 ? play->msgCtx.choiceIndex : (1 - play->msgCtx.choiceIndex);
|
||||
uint8_t index = CVarGetInteger(CVAR_ENHANCEMENT("BetterOwl"), 0) == 0 ? play->msgCtx.choiceIndex : (1 - play->msgCtx.choiceIndex);
|
||||
switch (index) {
|
||||
case OWL_REPEAT:
|
||||
Message_ContinueTextbox(play, 0x2071);
|
||||
@ -651,7 +651,7 @@ void EnOwl_WaitDeathMountainShortcut(EnOwl* this, PlayState* play) {
|
||||
void func_80ACB344(EnOwl* this, PlayState* play) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(play)) {
|
||||
// swap the order of the responses if better owl is enabled
|
||||
uint8_t index = CVarGetInteger("gBetterOwl", 0) == 0 ? play->msgCtx.choiceIndex : (1 - play->msgCtx.choiceIndex);
|
||||
uint8_t index = CVarGetInteger(CVAR_ENHANCEMENT("BetterOwl"), 0) == 0 ? play->msgCtx.choiceIndex : (1 - play->msgCtx.choiceIndex);
|
||||
switch (index) {
|
||||
case OWL_REPEAT:
|
||||
Message_ContinueTextbox(play, 0x607A);
|
||||
@ -676,7 +676,7 @@ void func_80ACB3E0(EnOwl* this, PlayState* play) {
|
||||
void func_80ACB440(EnOwl* this, PlayState* play) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(play)) {
|
||||
// swap the order of the responses if better owl is enabled
|
||||
uint8_t index = CVarGetInteger("gBetterOwl", 0) == 0 ? play->msgCtx.choiceIndex : (1 - play->msgCtx.choiceIndex);
|
||||
uint8_t index = CVarGetInteger(CVAR_ENHANCEMENT("BetterOwl"), 0) == 0 ? play->msgCtx.choiceIndex : (1 - play->msgCtx.choiceIndex);
|
||||
switch (index) {
|
||||
case OWL_REPEAT:
|
||||
Message_ContinueTextbox(play, 0x10C1);
|
||||
@ -713,7 +713,7 @@ void EnOwl_WaitLWPreSaria(EnOwl* this, PlayState* play) {
|
||||
void func_80ACB5C4(EnOwl* this, PlayState* play) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(play)) {
|
||||
// swap the order of the responses if better owl is enabled
|
||||
uint8_t index = CVarGetInteger("gBetterOwl", 0) == 0 ? play->msgCtx.choiceIndex : (1 - play->msgCtx.choiceIndex);
|
||||
uint8_t index = CVarGetInteger(CVAR_ENHANCEMENT("BetterOwl"), 0) == 0 ? play->msgCtx.choiceIndex : (1 - play->msgCtx.choiceIndex);
|
||||
switch (index) {
|
||||
case OWL_REPEAT:
|
||||
Message_ContinueTextbox(play, 0x10C5);
|
||||
|
@ -328,7 +328,7 @@ void EnPeehat_Ground_SetStateGround(EnPeehat* this) {
|
||||
void EnPeehat_Ground_StateGround(EnPeehat* this, PlayState* play) {
|
||||
// Keep the peahat as the version that doesn't spawn extra enemies and can actually be killed
|
||||
// when Enemy Randomizer is on.
|
||||
if (IS_DAY || CVarGetInteger("gRandomizedEnemies", 0)) {
|
||||
if (IS_DAY || CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
|
||||
this->actor.flags |= ACTOR_FLAG_TARGETABLE;
|
||||
if (this->riseDelayTimer == 0) {
|
||||
if (this->actor.xzDistToPlayer < this->xzDistToRise) {
|
||||
|
@ -254,7 +254,7 @@ void func_80AE2744(EnRd* this, PlayState* play) {
|
||||
// Add a height check to redeads/gibdos freeze when Enemy Randomizer is on.
|
||||
// Without the height check, redeads/gibdos can freeze the player from insane distances in
|
||||
// vertical rooms (like the first room in Deku Tree), making these rooms nearly unplayable.
|
||||
s8 enemyRandoCCActive = CVarGetInteger("gRandomizedEnemies", 0) || CVarGetInteger("gCrowdControl", 0);
|
||||
s8 enemyRandoCCActive = CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || CVarGetInteger("gCrowdControl", 0);
|
||||
if (!enemyRandoCCActive || (enemyRandoCCActive && this->actor.yDistToPlayer <= 100.0f && this->actor.yDistToPlayer >= -100.0f)) {
|
||||
if ((this->actor.params != 2) && (this->unk_305 == 0)) {
|
||||
func_80AE37BC(this);
|
||||
@ -668,7 +668,7 @@ void func_80AE3C98(EnRd* this, PlayState* play) {
|
||||
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
if (this->unk_30C == 0) {
|
||||
s8 enemyRandoCCActive = CVarGetInteger("gRandomizedEnemies", 0) || CVarGetInteger("gCrowdControl", 0);
|
||||
s8 enemyRandoCCActive = CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || CVarGetInteger("gCrowdControl", 0);
|
||||
// Don't set this flag in Enemy Rando as it can overlap with other objects using the same flag.
|
||||
if (!Flags_GetSwitch(play, this->unk_312 & 0x7F) && !enemyRandoCCActive) {
|
||||
Flags_SetSwitch(play, this->unk_312 & 0x7F);
|
||||
|
@ -750,7 +750,7 @@ void EnSa_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->actionFunc != func_80AF68E4) {
|
||||
if (CVarGetInteger("gDisableKokiriDrawDistance", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("DisableKokiriDrawDistance"), 0) != 0) {
|
||||
this->alpha = func_80034DD4(&this->actor, play, this->alpha, 32767);
|
||||
}
|
||||
else {
|
||||
|
@ -111,7 +111,7 @@ void func_80AFB768(EnSi* this, PlayState* play) {
|
||||
} else {
|
||||
Item_Give(play, giveItemId);
|
||||
}
|
||||
if ((!CVarGetInteger("gSkulltulaFreeze", 0) || giveItemId != ITEM_SKULL_TOKEN) &&
|
||||
if ((!CVarGetInteger(CVAR_ENHANCEMENT("SkulltulaFreeze"), 0) || giveItemId != ITEM_SKULL_TOKEN) &&
|
||||
getItemId != RG_ICE_TRAP) {
|
||||
player->actor.freezeTimer = 20;
|
||||
}
|
||||
@ -181,7 +181,7 @@ void func_80AFB950(EnSi* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (Message_GetState(&play->msgCtx) != TEXT_STATE_CLOSING &&
|
||||
(!CVarGetInteger("gSkulltulaFreeze", 0) || getItemId == RG_ICE_TRAP || giveItemId != ITEM_SKULL_TOKEN)) {
|
||||
(!CVarGetInteger(CVAR_ENHANCEMENT("SkulltulaFreeze"), 0) || getItemId == RG_ICE_TRAP || giveItemId != ITEM_SKULL_TOKEN)) {
|
||||
player->actor.freezeTimer = 10;
|
||||
} else {
|
||||
SET_GS_FLAGS((this->actor.params & 0x1F00) >> 8, this->actor.params & 0xFF);
|
||||
|
@ -192,7 +192,7 @@ void EnSkb_Destroy(Actor* thisx, PlayState* play) {
|
||||
|
||||
void func_80AFCD60(EnSkb* this) {
|
||||
// Don't despawn stallchildren during daytime when enemy randomizer is enabled.
|
||||
if (IS_DAY && !CVarGetInteger("gRandomizedEnemies", 0)) {
|
||||
if (IS_DAY && !CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
|
||||
func_80AFCF48(this);
|
||||
} else if (Actor_IsFacingPlayer(&this->actor, 0x11C7) &&
|
||||
(this->actor.xzDistToPlayer < (60.0f + (this->actor.params * 6.0f)))) {
|
||||
@ -290,7 +290,7 @@ void EnSkb_Advance(EnSkb* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
// Don't despawn stallchildren during daytime or when a stalchildren walks too far away from his "home" when enemy randomizer is enabled.
|
||||
if ((Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) > 800.0f || IS_DAY) && !CVarGetInteger("gRandomizedEnemies", 0)) {
|
||||
if ((Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) > 800.0f || IS_DAY) && !CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
|
||||
func_80AFCF48(this);
|
||||
} else if (Actor_IsFacingPlayer(&this->actor, 0x11C7) &&
|
||||
(this->actor.xzDistToPlayer < (60.0f + (this->actor.params * 6.0f)))) {
|
||||
|
@ -1413,7 +1413,7 @@ void EnSkj_StartOcarinaMinigame(EnSkj* this, PlayState* play) {
|
||||
|
||||
if (dialogState == TEXT_STATE_CLOSING) {
|
||||
// #region SOH [Enhancement]
|
||||
if (CVarGetInteger("gInstantOcarinaGameWin", 0) && CVarGetInteger("gCustomizeOcarinaGame", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("InstantOcarinaGameWin"), 0) && CVarGetInteger(CVAR_ENHANCEMENT("CustomizeOcarinaGame"), 0)) {
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_0F;
|
||||
this->songFailTimer = 160;
|
||||
this->actionFunc = EnSkj_WaitForPlayback;
|
||||
@ -1475,8 +1475,8 @@ void EnSkj_WaitForPlayback(EnSkj* this, PlayState* play) {
|
||||
case MSGMODE_MEMORY_GAME_PLAYER_PLAYING:
|
||||
if (this->songFailTimer != 0) {
|
||||
// #region SOH [Enhancement]
|
||||
if (CVarGetInteger("gOcarinaUnlimitedFailTime", 0) == 1 &&
|
||||
CVarGetInteger("gCustomizeOcarinaGame", 0) == 1) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("OcarinaUnlimitedFailTime"), 0) == 1 &&
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("CustomizeOcarinaGame"), 0) == 1) {
|
||||
// don't decrement timer
|
||||
// #endregion
|
||||
} else {
|
||||
|
@ -354,7 +354,7 @@ s32 func_80B0C9F0(EnSw* this, PlayState* play) {
|
||||
}
|
||||
Enemy_StartFinishingBlow(play, &this->actor);
|
||||
if (((this->actor.params & 0xE000) >> 0xD) != 0) {
|
||||
if (CVarGetInteger("gGsCutscene", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("GSCutscene"), 0)) {
|
||||
OnePointCutscene_Init(play, 2200, 90, &this->actor, MAIN_CAM);
|
||||
}
|
||||
this->skelAnime.playSpeed = 8.0f;
|
||||
@ -571,7 +571,7 @@ void func_80B0D590(EnSw* this, PlayState* play) {
|
||||
this->collider.elements[0].info.ocElemFlags = 1;
|
||||
}
|
||||
|
||||
Math_ApproachF(&this->actor.scale.x, !IS_DAY || CVarGetInteger("gNightGSAlwaysSpawn", 0) ? 0.02f : 0.0f, 0.2f, 0.01f);
|
||||
Math_ApproachF(&this->actor.scale.x, !IS_DAY || CVarGetInteger(CVAR_ENHANCEMENT("NightGSAlwaysSpawn"), 0) ? 0.02f : 0.0f, 0.2f, 0.01f);
|
||||
Actor_SetScale(&this->actor, this->actor.scale.x);
|
||||
}
|
||||
|
||||
|
@ -111,8 +111,8 @@ void EnSyatekiItm_Idle(EnSyatekiItm* this, PlayState* play) {
|
||||
player->actor.world.rot.x = player->actor.shape.rot.x = player->actor.world.rot.z = player->actor.shape.rot.z =
|
||||
0;
|
||||
s32 ammunition = 15;
|
||||
if(CVarGetInteger("gCustomizeShootingGallery", 0)) {
|
||||
ammunition = CVarGetInteger(LINK_IS_ADULT ? "gAdultShootingGalleryAmmunition" : "gChildShootingGalleryAmmunition", 15);
|
||||
if(CVarGetInteger(CVAR_ENHANCEMENT("CustomizeShootingGallery"), 0)) {
|
||||
ammunition = CVarGetInteger(LINK_IS_ADULT ? CVAR_ENHANCEMENT("ShootingGalleryAmmoAdult") : CVAR_ENHANCEMENT("ShootingGalleryAmmoChild"), 15);
|
||||
}
|
||||
func_8008EF44(play, ammunition);
|
||||
this->roundNum = this->hitCount = 0;
|
||||
@ -132,7 +132,7 @@ void EnSyatekiItm_StartRound(EnSyatekiItm* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (this->unkTimer == 0) {
|
||||
if (LINK_IS_ADULT && !(CVarGetInteger("gCustomizeShootingGallery", 0) && CVarGetInteger("gConstantAdultGallery", 0))) {
|
||||
if (LINK_IS_ADULT && !(CVarGetInteger(CVAR_ENHANCEMENT("CustomizeShootingGallery"), 0) && CVarGetInteger(CVAR_ENHANCEMENT("ConstantAdultGallery"), 0))) {
|
||||
for (i = 0, j = 0; i < SYATEKI_ROUND_MAX; i++) {
|
||||
if (this->roundFlags[i]) {
|
||||
j++;
|
||||
|
@ -293,7 +293,7 @@ void EnSyatekiMan_StartGame(EnSyatekiMan* this, PlayState* play) {
|
||||
Message_CloseTextbox(play);
|
||||
gallery = ((EnSyatekiItm*)this->actor.parent);
|
||||
if (gallery->actor.update != NULL) {
|
||||
if(CVarGetInteger("gCustomizeShootingGallery", 0) && CVarGetInteger("gInstantShootingGalleryWin", 0)) {
|
||||
if(CVarGetInteger(CVAR_ENHANCEMENT("CustomizeShootingGallery"), 0) && CVarGetInteger(CVAR_ENHANCEMENT("InstantShootingGalleryWin"), 0)) {
|
||||
gallery->hitCount = 10;
|
||||
gallery->signal = ENSYATEKI_END;
|
||||
} else {
|
||||
@ -406,8 +406,8 @@ void EnSyatekiMan_EndGame(EnSyatekiMan* this, PlayState* play) {
|
||||
case SYATEKI_RESULT_ALMOST:
|
||||
this->timer = 20;
|
||||
s32 ammunition = 15;
|
||||
if(CVarGetInteger("gCustomizeShootingGallery", 0)) {
|
||||
ammunition = CVarGetInteger(LINK_IS_ADULT ? "gAdultShootingGalleryAmmunition" : "gChildShootingGalleryAmmunition", 15);
|
||||
if(CVarGetInteger(CVAR_ENHANCEMENT("CustomizeShootingGallery"), 0)) {
|
||||
ammunition = CVarGetInteger(LINK_IS_ADULT ? CVAR_ENHANCEMENT("ShootingGalleryAmmoAdult") : CVAR_ENHANCEMENT("ShootingGalleryAmmoChild"), 15);
|
||||
}
|
||||
func_8008EF44(play, ammunition);
|
||||
this->actionFunc = EnSyatekiMan_RestartGame;
|
||||
|
@ -408,7 +408,7 @@ s32 EnTk_ChooseReward(EnTk* this) {
|
||||
f32 luck;
|
||||
s32 reward;
|
||||
|
||||
if ((IS_RANDO || CVarGetInteger("gDampeWin", 0)) && !Flags_GetCollectible(gPlayState, COLLECTFLAG_GRAVEDIGGING_HEART_PIECE) && this->heartPieceSpawned == 0) {
|
||||
if ((IS_RANDO || CVarGetInteger(CVAR_ENHANCEMENT("DampeWin"), 0)) && !Flags_GetCollectible(gPlayState, COLLECTFLAG_GRAVEDIGGING_HEART_PIECE) && this->heartPieceSpawned == 0) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@ -502,7 +502,7 @@ void EnTk_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
|
||||
|
||||
if (CVarGetInteger("gDampeAllNight", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("DampeAllNight"), 0)) {
|
||||
if (!!LINK_IS_ADULT || play->sceneNum != SCENE_GRAVEYARD) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
@ -610,7 +610,7 @@ void EnTk_Dig(EnTk* this, PlayState* play) {
|
||||
|
||||
this->rewardTimer = 0;
|
||||
|
||||
if (this->validDigHere == 1 || IS_RANDO || CVarGetInteger("gDampeWin", 0)) {
|
||||
if (this->validDigHere == 1 || IS_RANDO || CVarGetInteger(CVAR_ENHANCEMENT("DampeWin"), 0)) {
|
||||
rewardOrigin.x = 0.0f;
|
||||
rewardOrigin.y = 0.0f;
|
||||
rewardOrigin.z = -40.0f;
|
||||
@ -625,15 +625,15 @@ void EnTk_Dig(EnTk* this, PlayState* play) {
|
||||
this->currentReward = EnTk_ChooseReward(this);
|
||||
|
||||
if (this->currentReward == 3) {
|
||||
if (IS_RANDO || CVarGetInteger("gDampeWin", 0)) {
|
||||
if (IS_RANDO || CVarGetInteger(CVAR_ENHANCEMENT("DampeWin"), 0)) {
|
||||
/*
|
||||
* Upgrade the purple rupee reward to the heart piece if this
|
||||
* is the first grand prize dig.
|
||||
*/
|
||||
if (!Flags_GetItemGetInf(ITEMGETINF_1C) && !(IS_RANDO || CVarGetInteger("gDampeWin", 0))) {
|
||||
if (!Flags_GetItemGetInf(ITEMGETINF_1C) && !(IS_RANDO || CVarGetInteger(CVAR_ENHANCEMENT("DampeWin"), 0))) {
|
||||
Flags_SetItemGetInf(ITEMGETINF_1C);
|
||||
this->currentReward = 4;
|
||||
} else if ((IS_RANDO || CVarGetInteger("gDampeWin", 0)) && !Flags_GetCollectible(gPlayState, COLLECTFLAG_GRAVEDIGGING_HEART_PIECE) && this->heartPieceSpawned == 0) {
|
||||
} else if ((IS_RANDO || CVarGetInteger(CVAR_ENHANCEMENT("DampeWin"), 0)) && !Flags_GetCollectible(gPlayState, COLLECTFLAG_GRAVEDIGGING_HEART_PIECE) && this->heartPieceSpawned == 0) {
|
||||
this->currentReward = 4;
|
||||
}
|
||||
}
|
||||
@ -646,7 +646,7 @@ void EnTk_Dig(EnTk* this, PlayState* play) {
|
||||
// If true, spawn the heart piece and set the vanilla itemGetInf flag and new temp clear flag.
|
||||
if (!heartPieceSpawned &&
|
||||
(!(gSaveContext.itemGetInf[1] & ITEMGETINFFLAG_GRAVEDIGGING_HEART_PIECE) ||
|
||||
CVarGetInteger("gGravediggingTourFix", 0) &&
|
||||
CVarGetInteger(CVAR_ENHANCEMENT("GravediggingTourFix"), 0) &&
|
||||
!Flags_GetCollectible(play, COLLECTFLAG_GRAVEDIGGING_HEART_PIECE))) {
|
||||
this->currentReward = 4;
|
||||
gSaveContext.itemGetInf[1] |= ITEMGETINFFLAG_GRAVEDIGGING_HEART_PIECE;
|
||||
@ -668,7 +668,7 @@ void EnTk_Dig(EnTk* this, PlayState* play) {
|
||||
|
||||
if (this->skelAnime.curFrame >= 32.0f && this->rewardTimer == 10) {
|
||||
/* Play a reward sound shortly after digging */
|
||||
if (!(IS_RANDO || CVarGetInteger("gDampeWin", 0)) && this->validDigHere == 0) {
|
||||
if (!(IS_RANDO || CVarGetInteger(CVAR_ENHANCEMENT("DampeWin"), 0)) && this->validDigHere == 0) {
|
||||
/* Bad dig spot */
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_SY_ERROR);
|
||||
} else if (this->currentReward == 4) {
|
||||
|
@ -128,7 +128,7 @@ void EnTorch2_Init(Actor* thisx, PlayState* play2) {
|
||||
|
||||
// Change Dark Link to regular enemy instead of boss with enemy randomizer and crowd control.
|
||||
// This way Dark Link will be considered for "clear enemy" rooms properly.
|
||||
if (CVarGetInteger("gRandomizedEnemies", 0) || CVarGetInteger("gCrowdControl", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || CVarGetInteger("gCrowdControl", 0)) {
|
||||
Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_ENEMY);
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
// Disable miniboss music with Enemy Randomizer because the music would keep
|
||||
// playing if the enemy was never defeated, which is common with Enemy Randomizer.
|
||||
if (!CVarGetInteger("gRandomizedEnemies", 0)) {
|
||||
if (!CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
|
||||
func_800F5ACC(NA_BGM_MINI_BOSS);
|
||||
}
|
||||
sActionState = ENTORCH2_ATTACK;
|
||||
|
@ -293,7 +293,7 @@ void func_80B20768(EnToryo* this, PlayState* play) {
|
||||
|
||||
// Animation Count should be no more than 1 to guarantee putaway is complete after giving the saw
|
||||
// As this is vanilla behavior, it only applies with the Fix toggle or Skip Text enabled.
|
||||
bool checkAnim = (CVarGetInteger("gFixSawSoftlock", 0) != 0 || CVarGetInteger("gSkipText", 0) != 0) ? play->animationCtx.animationCount <= 1 : true;
|
||||
bool checkAnim = (CVarGetInteger(CVAR_ENHANCEMENT("FixSawSoftlock"), 0) != 0 || CVarGetInteger(CVAR_ENHANCEMENT("SkipText"), 0) != 0) ? play->animationCtx.animationCount <= 1 : true;
|
||||
if (this->unk_1E4 == 3 && checkAnim) {
|
||||
Actor_ProcessTalkRequest(&this->actor, play);
|
||||
Message_ContinueTextbox(play, this->actor.textId);
|
||||
|
@ -246,7 +246,7 @@ void EnVali_SetupDivideAndDie(EnVali* this, PlayState* play) {
|
||||
|
||||
// Offset small jellyfish with Enemy Randomizer, otherwise it gets
|
||||
// stuck in a loop spawning more big jellyfish with seeded spawns.
|
||||
if (CVarGetInteger("gRandomizedEnemies", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
|
||||
this->actor.world.rot.y += rand() % 50;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user