Merge branch 'develop' into fix-text-speed

This commit is contained in:
JordanLongstaff 2024-04-26 13:30:06 -04:00
commit dae9adeaaa
149 changed files with 2519 additions and 2475 deletions

View File

@ -1 +1 @@
libusb-dev libusb-1.0-0-dev libsdl2-dev libsdl2-net-dev libpng-dev libglew-dev libzip-dev zipcmp zipmerge ziptool ninja-build
libusb-dev libusb-1.0-0-dev libsdl2-dev libsdl2-net-dev libpng-dev libglew-dev libzip-dev zipcmp zipmerge ziptool nlohmann-json3-dev ninja-build

View File

@ -190,6 +190,21 @@ jobs:
cmake ..
make
sudo make install
- name: Install latest nlohmann
if: ${{ (matrix.os == 'ubuntu-20.04' && !vars.LINUX_COMPATIBILITY_RUNNER) }}
run: |
sudo apt-get remove nlohmann-json3-dev
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
if [ ! -d "json-3.11.3" ]; then
wget https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.tar.gz
tar -xzvf v3.11.3.tar.gz
fi
cd json-3.11.3
mkdir build
cd build
cmake ..
make
sudo make install
- name: Install latest SDL_net
if: ${{ (matrix.os == 'ubuntu-20.04' && !vars.LINUX_COMPATIBILITY_RUNNER) || (matrix.os == 'ubuntu-22.04' && !vars.LINUX_PERFORMANCE_RUNNER) }}
run: |
@ -247,6 +262,17 @@ jobs:
cmake -H.. -B. -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake
make
make install
cd ../..
wget https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.tar.gz
tar -xzvf v3.11.3.tar.gz
cd json-3.11.3
mkdir build
cd build
cmake -H.. -B. -DJSON_BuildTests=OFF -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake
make
make install
cd ../..
- name: Fix dubious ownership error
if: ${{ vars.LINUX_RUNNER }}
run: git config --global --add safe.directory '*'
@ -300,6 +326,17 @@ jobs:
cmake -H.. -B. -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/WiiU.cmake
make
make install
cd ../..
wget https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.tar.gz
tar -xzvf v3.11.3.tar.gz
cd json-3.11.3
mkdir build
cd build
cmake -H.. -B. -DJSON_BuildTests=OFF -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/WiiU.cmake
make
make install
cd ../..
- uses: actions/checkout@v3
with:
submodules: true

View File

@ -1 +1 @@
libsdl2 +universal libsdl2_net +universal libpng +universal glew +universal libzip +universal
libsdl2 +universal libsdl2_net +universal libpng +universal glew +universal libzip +universal nlohmann-json +universal

View File

@ -1,3 +1,6 @@
# todo:
# nlohmann
name: test-builds-on-distros
on:
workflow_dispatch: # by request

View File

@ -20,7 +20,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(VCPKG_TARGET_TRIPLET x64-windows-static)
vcpkg_bootstrap()
vcpkg_install_packages(zlib bzip2 libzip libpng sdl2 sdl2-net glew glfw3)
vcpkg_install_packages(zlib bzip2 libzip libpng sdl2 sdl2-net glew glfw3 nlohmann-json)
if (CMAKE_C_COMPILER_LAUNCHER MATCHES "ccache|sccache")
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded)

@ -1 +1 @@
Subproject commit e93bd2be062b13106fdb29d98cf4ada4d7ad6827
Subproject commit 467434c5666e11a3a7b756ff04401cd54da5c3f2

@ -1 +1 @@
Subproject commit 81f04fdcedeb5186b56b105fb0cc5cb0a478ae90
Subproject commit 85f6de497f6d375390cc3b4ba55eae5ef9c1b153

File diff suppressed because it is too large Load Diff

View File

@ -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);

View File

@ -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.");

View File

@ -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;

View File

@ -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);
}

View File

@ -428,34 +428,34 @@ void GameInteractor::RawAction::SetCosmeticsColor(uint8_t cosmeticCategory, uint
switch (cosmeticCategory) {
case GI_COSMETICS_TUNICS:
CVarSetColor("gCosmetics.Link_KokiriTunic.Value", newColor);
CVarSetInteger("gCosmetics.Link_KokiriTunic.Changed", 1);
CVarSetColor("gCosmetics.Link_GoronTunic.Value", newColor);
CVarSetInteger("gCosmetics.Link_GoronTunic.Changed", 1);
CVarSetColor("gCosmetics.Link_ZoraTunic.Value", newColor);
CVarSetInteger("gCosmetics.Link_ZoraTunic.Changed", 1);
CVarSetColor(CVAR_COSMETIC("Link.KokiriTunic.Value"), newColor);
CVarSetInteger(CVAR_COSMETIC("Link.KokiriTunic.Changed"), 1);
CVarSetColor(CVAR_COSMETIC("Link.GoronTunic.Value"), newColor);
CVarSetInteger(CVAR_COSMETIC("Link.GoronTunic.Changed"), 1);
CVarSetColor(CVAR_COSMETIC("Link.ZoraTunic.Value"), newColor);
CVarSetInteger(CVAR_COSMETIC("Link.ZoraTunic.Changed"), 1);
break;
case GI_COSMETICS_NAVI:
CVarSetColor("gCosmetics.Navi_EnemyPrimary.Value", newColor);
CVarSetInteger("gCosmetics.Navi_EnemyPrimary.Changed", 1);
CVarSetColor("gCosmetics.Navi_EnemySecondary.Value", newColor);
CVarSetInteger("gCosmetics.Navi_EnemySecondary.Changed", 1);
CVarSetColor("gCosmetics.Navi_IdlePrimary.Value", newColor);
CVarSetInteger("gCosmetics.Navi_IdlePrimary.Changed", 1);
CVarSetColor("gCosmetics.Navi_IdleSecondary.Value", newColor);
CVarSetInteger("gCosmetics.Navi_IdleSecondary.Changed", 1);
CVarSetColor("gCosmetics.Navi_NPCPrimary.Value", newColor);
CVarSetInteger("gCosmetics.Navi_NPCPrimary.Changed", 1);
CVarSetColor("gCosmetics.Navi_NPCSecondary.Value", newColor);
CVarSetInteger("gCosmetics.Navi_NPCSecondary.Changed", 1);
CVarSetColor("gCosmetics.Navi_PropsPrimary.Value", newColor);
CVarSetInteger("gCosmetics.Navi_PropsPrimary.Changed", 1);
CVarSetColor("gCosmetics.Navi_PropsSecondary.Value", newColor);
CVarSetInteger("gCosmetics.Navi_PropsSecondary.Changed", 1);
CVarSetColor(CVAR_COSMETIC("Navi.EnemyPrimary.Value"), newColor);
CVarSetInteger(CVAR_COSMETIC("Navi.EnemyPrimary.Changed"), 1);
CVarSetColor(CVAR_COSMETIC("Navi.EnemySecondary.Value"), newColor);
CVarSetInteger(CVAR_COSMETIC("Navi.EnemySecondary.Changed"), 1);
CVarSetColor(CVAR_COSMETIC("Navi.IdlePrimary.Value"), newColor);
CVarSetInteger(CVAR_COSMETIC("Navi.IdlePrimary.Changed"), 1);
CVarSetColor(CVAR_COSMETIC("Navi.IdleSecondary.Value"), newColor);
CVarSetInteger(CVAR_COSMETIC("Navi.IdleSecondary.Changed"), 1);
CVarSetColor(CVAR_COSMETIC("Navi.NPCPrimary.Value"), newColor);
CVarSetInteger(CVAR_COSMETIC("Navi.NPCPrimary.Changed"), 1);
CVarSetColor(CVAR_COSMETIC("Navi.NPCSecondary.Value"), newColor);
CVarSetInteger(CVAR_COSMETIC("Navi.NPCSecondary.Changed"), 1);
CVarSetColor(CVAR_COSMETIC("Navi.PropsPrimary.Value"), newColor);
CVarSetInteger(CVAR_COSMETIC("Navi.PropsPrimary.Changed"), 1);
CVarSetColor(CVAR_COSMETIC("Navi.PropsSecondary.Value"), newColor);
CVarSetInteger(CVAR_COSMETIC("Navi.PropsSecondary.Changed"), 1);
break;
case GI_COSMETICS_HAIR:
CVarSetColor("gCosmetics.Link_Hair.Value", newColor);
CVarSetInteger("gCosmetics.Link_Hair.Changed", 1);
CVarSetColor(CVAR_COSMETIC("Link.Hair.Value"), newColor);
CVarSetInteger(CVAR_COSMETIC("Link.Hair.Changed"), 1);
break;
}
@ -465,18 +465,18 @@ void GameInteractor::RawAction::SetCosmeticsColor(uint8_t cosmeticCategory, uint
void GameInteractor::RawAction::RandomizeCosmeticsColors(bool excludeBiddingWarColors) {
const char* cvarsToLock[12] = {
"gCosmetics.Link_KokiriTunic.Locked",
"gCosmetics.Link_GoronTunic.Locked",
"gCosmetics.Link_ZoraTunic.Locked",
"gCosmetics.Navi_EnemyPrimary.Locked",
"gCosmetics.Navi_EnemySecondary.Locked",
"gCosmetics.Navi_IdlePrimary.Locked",
"gCosmetics.Navi_IdleSecondary.Locked",
"gCosmetics.Navi_NPCPrimary.Locked",
"gCosmetics.Navi_NPCSecondary.Locked",
"gCosmetics.Navi_PropsPrimary.Locked",
"gCosmetics.Navi_PropsSecondary.Locked",
"gCosmetics.Link_Hair.Locked"
CVAR_COSMETIC("Link.KokiriTunic.Locked"),
CVAR_COSMETIC("Link.GoronTunic.Locked"),
CVAR_COSMETIC("Link.ZoraTunic.Locked"),
CVAR_COSMETIC("Navi.EnemyPrimary.Locked"),
CVAR_COSMETIC("Navi.EnemySecondary.Locked"),
CVAR_COSMETIC("Navi.IdlePrimary.Locked"),
CVAR_COSMETIC("Navi.IdleSecondary.Locked"),
CVAR_COSMETIC("Navi.NPCPrimary.Locked"),
CVAR_COSMETIC("Navi.NPCSecondary.Locked"),
CVAR_COSMETIC("Navi.PropsPrimary.Locked"),
CVAR_COSMETIC("Navi.PropsSecondary.Locked"),
CVAR_COSMETIC("Link.Hair.Locked")
};
if (excludeBiddingWarColors) {

View File

@ -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]));

View File

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

View File

@ -5,6 +5,7 @@
#include "soh/frame_interpolation.h"
#include "soh/Enhancements/custom-message/CustomMessageInterfaceAddon.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/OTRGlobals.h"
extern "C" {
#include "z64.h"
@ -70,11 +71,11 @@ void DrawNameTag(PlayState* play, const NameTag* nameTag) {
Color_RGBA8 textboxColor = { 0, 0, 0, 80};
Color_RGBA8 textColor = { 255, 255, 255, 255 };
if (CVarGetInteger("gCosmetics.Hud_NameTagActorBackground.Changed", 0)) {
textboxColor = CVarGetColor("gCosmetics.Hud_NameTagActorBackground.Value", textboxColor);
if (CVarGetInteger(CVAR_COSMETIC("HUD.NameTagActorBackground.Changed"), 0)) {
textboxColor = CVarGetColor(CVAR_COSMETIC("HUD.NameTagActorBackground.Value"), textboxColor);
}
if (CVarGetInteger("gCosmetics.Hud_NameTagActorText.Changed", 0)) {
textColor = CVarGetColor("gCosmetics.Hud_NameTagActorText.Value", textColor);
if (CVarGetInteger(CVAR_COSMETIC("HUD.NameTagActorText.Changed"), 0)) {
textColor = CVarGetColor(CVAR_COSMETIC("HUD.NameTagActorText.Value"), textColor);
}
FrameInterpolation_RecordOpenChild(nameTag->actor, 10);

File diff suppressed because it is too large Load Diff

View File

@ -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;
@ -1516,7 +1516,7 @@ static std::set<std::string> rainbowCVars = {
int hue = 0;
void RainbowTick() {
float freqHue = hue * 2 * M_PI / (360 * CVarGetFloat("gCosmetics.RainbowSpeed", 0.6f));
float freqHue = hue * 2 * M_PI / (360 * CVarGetFloat(CVAR_COSMETIC("RainbowSpeed"), 0.6f));
for (auto& cvar : rainbowCVars) {
if (CVarGetInteger((cvar + "RBM").c_str(), 0) == 0) {
continue;

View File

@ -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)

View File

@ -2123,17 +2123,17 @@ Color_RGB8 GetColorForControllerLED() {
switch (CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC)) {
case EQUIP_VALUE_TUNIC_KOKIRI:
color = source == LED_SOURCE_TUNIC_COSMETICS
? CVarGetColor24("gCosmetics.Link_KokiriTunic.Value", kokiriColor)
? CVarGetColor24(CVAR_COSMETIC("Link.KokiriTunic.Value"), kokiriColor)
: kokiriColor;
break;
case EQUIP_VALUE_TUNIC_GORON:
color = source == LED_SOURCE_TUNIC_COSMETICS
? CVarGetColor24("gCosmetics.Link_GoronTunic.Value", goronColor)
? CVarGetColor24(CVAR_COSMETIC("Link.GoronTunic.Value"), goronColor)
: goronColor;
break;
case EQUIP_VALUE_TUNIC_ZORA:
color = source == LED_SOURCE_TUNIC_COSMETICS
? CVarGetColor24("gCosmetics.Link_ZoraTunic.Value", zoraColor)
? CVarGetColor24(CVAR_COSMETIC("Link.ZoraTunic.Value"), zoraColor)
: zoraColor;
break;
}
@ -2145,16 +2145,16 @@ Color_RGB8 GetColorForControllerLED() {
switch (category) {
case ACTORCAT_PLAYER:
if (source == LED_SOURCE_NAVI_COSMETICS &&
CVarGetInteger("gCosmetics.Navi_IdlePrimary.Changed", 0)) {
color = CVarGetColor24("gCosmetics.Navi_IdlePrimary.Value", defaultIdleColor.inner);
CVarGetInteger(CVAR_COSMETIC("Navi.IdlePrimary.Changed"), 0)) {
color = CVarGetColor24(CVAR_COSMETIC("Navi.IdlePrimary.Value"), defaultIdleColor.inner);
break;
}
color = LEDColorDefaultNaviColorList[category].inner;
break;
case ACTORCAT_NPC:
if (source == LED_SOURCE_NAVI_COSMETICS &&
CVarGetInteger("gCosmetics.Navi_NPCPrimary.Changed", 0)) {
color = CVarGetColor24("gCosmetics.Navi_NPCPrimary.Value", defaultNPCColor.inner);
CVarGetInteger(CVAR_COSMETIC("Navi.NPCPrimary.Changed"), 0)) {
color = CVarGetColor24(CVAR_COSMETIC("Navi.NPCPrimary.Value"), defaultNPCColor.inner);
break;
}
color = LEDColorDefaultNaviColorList[category].inner;
@ -2162,23 +2162,23 @@ Color_RGB8 GetColorForControllerLED() {
case ACTORCAT_ENEMY:
case ACTORCAT_BOSS:
if (source == LED_SOURCE_NAVI_COSMETICS &&
CVarGetInteger("gCosmetics.Navi_EnemyPrimary.Changed", 0)) {
color = CVarGetColor24("gCosmetics.Navi_EnemyPrimary.Value", defaultEnemyColor.inner);
CVarGetInteger(CVAR_COSMETIC("Navi.EnemyPrimary.Changed"), 0)) {
color = CVarGetColor24(CVAR_COSMETIC("Navi.EnemyPrimary.Value"), defaultEnemyColor.inner);
break;
}
color = LEDColorDefaultNaviColorList[category].inner;
break;
default:
if (source == LED_SOURCE_NAVI_COSMETICS &&
CVarGetInteger("gCosmetics.Navi_PropsPrimary.Changed", 0)) {
color = CVarGetColor24("gCosmetics.Navi_PropsPrimary.Value", defaultPropsColor.inner);
CVarGetInteger(CVAR_COSMETIC("Navi.PropsPrimary.Changed"), 0)) {
color = CVarGetColor24(CVAR_COSMETIC("Navi.PropsPrimary.Value"), defaultPropsColor.inner);
break;
}
color = LEDColorDefaultNaviColorList[category].inner;
}
} else { // No target actor.
if (source == LED_SOURCE_NAVI_COSMETICS && CVarGetInteger("gCosmetics.Navi_IdlePrimary.Changed", 0)) {
color = CVarGetColor24("gCosmetics.Navi_IdlePrimary.Value", defaultIdleColor.inner);
if (source == LED_SOURCE_NAVI_COSMETICS && CVarGetInteger(CVAR_COSMETIC("Navi.IdlePrimary.Changed"), 0)) {
color = CVarGetColor24(CVAR_COSMETIC("Navi.IdlePrimary.Value"), defaultIdleColor.inner);
} else {
color = LEDColorDefaultNaviColorList[ACTORCAT_PLAYER].inner;
}
@ -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

View File

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

View File

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

View File

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

View File

@ -353,50 +353,50 @@ void func_8002BE98(TargetContext* targetCtx, s32 actorCategory, PlayState* play)
}
void func_8002BF60(TargetContext* targetCtx, Actor* actor, s32 actorCategory, PlayState* play) {
if (CVarGetInteger("gCosmetics.Navi_IdlePrimary.Changed", 0)) {
sNaviColorList[ACTORCAT_PLAYER].inner = CVarGetColor("gCosmetics.Navi_IdlePrimary.Value", defaultIdlePrimaryColor);
if (CVarGetInteger(CVAR_COSMETIC("Navi.IdlePrimary.Changed"), 0)) {
sNaviColorList[ACTORCAT_PLAYER].inner = CVarGetColor(CVAR_COSMETIC("Navi.IdlePrimary.Value"), defaultIdlePrimaryColor);
} else {
sNaviColorList[ACTORCAT_PLAYER].inner = defaultIdlePrimaryColor;
}
if (CVarGetInteger("gCosmetics.Navi_IdleSecondary.Changed", 0)) {
sNaviColorList[ACTORCAT_PLAYER].outer = CVarGetColor("gCosmetics.Navi_IdleSecondary.Value", defaultIdleSecondaryColor);
if (CVarGetInteger(CVAR_COSMETIC("Navi.IdleSecondary.Changed"), 0)) {
sNaviColorList[ACTORCAT_PLAYER].outer = CVarGetColor(CVAR_COSMETIC("Navi.IdleSecondary.Value"), defaultIdleSecondaryColor);
} else {
sNaviColorList[ACTORCAT_PLAYER].outer = defaultIdleSecondaryColor;
}
if (CVarGetInteger("gCosmetics.Navi_NPCPrimary.Changed", 0)) {
sNaviColorList[ACTORCAT_NPC].inner = CVarGetColor("gCosmetics.Navi_NPCPrimary.Value", defaultNPCPrimaryColor);
if (CVarGetInteger(CVAR_COSMETIC("Navi.NPCPrimary.Changed"), 0)) {
sNaviColorList[ACTORCAT_NPC].inner = CVarGetColor(CVAR_COSMETIC("Navi.NPCPrimary.Value"), defaultNPCPrimaryColor);
} else {
sNaviColorList[ACTORCAT_NPC].inner = defaultNPCPrimaryColor;
}
if (CVarGetInteger("gCosmetics.Navi_NPCSecondary.Changed", 0)) {
sNaviColorList[ACTORCAT_NPC].outer = CVarGetColor("gCosmetics.Navi_NPCSecondary.Value", defaultNPCSecondaryColor);
if (CVarGetInteger(CVAR_COSMETIC("Navi.NPCSecondary.Changed"), 0)) {
sNaviColorList[ACTORCAT_NPC].outer = CVarGetColor(CVAR_COSMETIC("Navi.NPCSecondary.Value"), defaultNPCSecondaryColor);
} else {
sNaviColorList[ACTORCAT_NPC].outer = defaultNPCSecondaryColor;
}
if (CVarGetInteger("gCosmetics.Navi_EnemyPrimary.Changed", 0)) {
sNaviColorList[ACTORCAT_ENEMY].inner = CVarGetColor("gCosmetics.Navi_EnemyPrimary.Value", defaultEnemyPrimaryColor);
sNaviColorList[ACTORCAT_BOSS].inner = CVarGetColor("gCosmetics.Navi_EnemyPrimary.Value", defaultEnemyPrimaryColor);
if (CVarGetInteger(CVAR_COSMETIC("Navi.EnemyPrimary.Changed"), 0)) {
sNaviColorList[ACTORCAT_ENEMY].inner = CVarGetColor(CVAR_COSMETIC("Navi.EnemyPrimary.Value"), defaultEnemyPrimaryColor);
sNaviColorList[ACTORCAT_BOSS].inner = CVarGetColor(CVAR_COSMETIC("Navi.EnemyPrimary.Value"), defaultEnemyPrimaryColor);
} else {
sNaviColorList[ACTORCAT_ENEMY].inner = defaultEnemyPrimaryColor;
sNaviColorList[ACTORCAT_BOSS].inner = defaultEnemyPrimaryColor;
}
if (CVarGetInteger("gCosmetics.Navi_EnemySecondary.Changed", 0)) {
sNaviColorList[ACTORCAT_ENEMY].outer = CVarGetColor("gCosmetics.Navi_EnemySecondary.Value", defaultEnemySecondaryColor);
sNaviColorList[ACTORCAT_BOSS].outer = CVarGetColor("gCosmetics.Navi_EnemySecondary.Value", defaultEnemySecondaryColor);
if (CVarGetInteger(CVAR_COSMETIC("Navi.EnemySecondary.Changed"), 0)) {
sNaviColorList[ACTORCAT_ENEMY].outer = CVarGetColor(CVAR_COSMETIC("Navi.EnemySecondary.Value"), defaultEnemySecondaryColor);
sNaviColorList[ACTORCAT_BOSS].outer = CVarGetColor(CVAR_COSMETIC("Navi.EnemySecondary.Value"), defaultEnemySecondaryColor);
} else {
sNaviColorList[ACTORCAT_ENEMY].outer = defaultEnemySecondaryColor;
sNaviColorList[ACTORCAT_BOSS].outer = defaultEnemySecondaryColor;
}
if (CVarGetInteger("gCosmetics.Navi_PropsPrimary.Changed", 0)) {
sNaviColorList[ACTORCAT_PROP].inner = CVarGetColor("gCosmetics.Navi_PropsPrimary.Value", defaultPropsPrimaryColor);
if (CVarGetInteger(CVAR_COSMETIC("Navi.PropsPrimary.Changed"), 0)) {
sNaviColorList[ACTORCAT_PROP].inner = CVarGetColor(CVAR_COSMETIC("Navi.PropsPrimary.Value"), defaultPropsPrimaryColor);
} else {
sNaviColorList[ACTORCAT_PROP].inner = defaultPropsPrimaryColor;
}
if (CVarGetInteger("gCosmetics.Navi_PropsSecondary.Changed", 0)) {
sNaviColorList[ACTORCAT_PROP].outer = CVarGetColor("gCosmetics.Navi_PropsSecondary.Value", defaultPropsSecondaryColor);
if (CVarGetInteger(CVAR_COSMETIC("Navi.PropsSecondary.Changed"), 0)) {
sNaviColorList[ACTORCAT_PROP].outer = CVarGetColor(CVAR_COSMETIC("Navi.PropsSecondary.Value"), defaultPropsSecondaryColor);
} else {
sNaviColorList[ACTORCAT_PROP].outer = defaultPropsSecondaryColor;
}
@ -1119,10 +1119,10 @@ void TitleCard_Draw(PlayState* play, TitleCardContext* titleCtx) {
if (titleCtx->alpha != 0) {
width = titleCtx->width;
height = titleCtx->height;
s16 TitleCard_PosX_Modifier = (titleCtx->isBossCard ? CVarGetInteger("gTCBPosX", 0) : CVarGetInteger("gTCMPosX", 0));
s16 TitleCard_PosY_Modifier = (titleCtx->isBossCard ? CVarGetInteger("gTCBPosY", 0) : CVarGetInteger("gTCMPosY", 0));
s16 TitleCard_PosType_Checker = (titleCtx->isBossCard ? CVarGetInteger("gTCBPosType", 0) : CVarGetInteger("gTCMPosType", 0));
s16 TitleCard_Margin_Checker = (titleCtx->isBossCard ? CVarGetInteger("gTCBUseMargins", 0) : CVarGetInteger("gTCMUseMargins", 0));
s16 TitleCard_PosX_Modifier = (titleCtx->isBossCard ? CVarGetInteger(CVAR_COSMETIC("TitleCard.Boss.PosX"), 0) : CVarGetInteger(CVAR_COSMETIC("TitleCard.Map.PosX"), 0));
s16 TitleCard_PosY_Modifier = (titleCtx->isBossCard ? CVarGetInteger(CVAR_COSMETIC("TitleCard.Boss.PosY"), 0) : CVarGetInteger(CVAR_COSMETIC("TitleCard.Map.PosY"), 0));
s16 TitleCard_PosType_Checker = (titleCtx->isBossCard ? CVarGetInteger(CVAR_COSMETIC("TitleCard.Boss.PosType"), 0) : CVarGetInteger(CVAR_COSMETIC("TitleCard.Map.PosType"), 0));
s16 TitleCard_Margin_Checker = (titleCtx->isBossCard ? CVarGetInteger(CVAR_COSMETIC("TitleCard.Boss.UseMargins"), 0) : CVarGetInteger(CVAR_COSMETIC("TitleCard.Map.UseMargins"), 0));
s16 TitleCard_MarginX = 0;
s16 TitleCard_PosX = titleCtx->x;
s16 TitleCard_PosY = titleCtx->y;
@ -1228,7 +1228,7 @@ void Actor_Init(Actor* actor, PlayState* play) {
actor->uncullZoneForward = 1000.0f;
actor->uncullZoneScale = 350.0f;
actor->uncullZoneDownward = 700.0f;
if (CVarGetInteger("gDisableDrawDistance", 0) != 0 && actor->id != ACTOR_EN_TORCH2 && actor->id != ACTOR_EN_BLKOBJ // Extra check for Dark Link and his room
if (CVarGetInteger(CVAR_ENHANCEMENT("DisableDrawDistance"), 0) != 0 && actor->id != ACTOR_EN_TORCH2 && actor->id != ACTOR_EN_BLKOBJ // Extra check for Dark Link and his room
&& actor->id != ACTOR_EN_HORSE // Check for Epona, else if we call her she will spawn at the other side of the map + we can hear her during the title screen sequence
&& actor->id != ACTOR_EN_HORSE_GANON && actor->id != ACTOR_EN_HORSE_ZELDA // check for Zelda's and Ganondorf's horses that will always be scene during cinematic whith camera paning
&& (play->sceneNum != SCENE_DODONGOS_CAVERN && actor->id != ACTOR_EN_ZF)) { // Check for DC and Lizalfos for the case where the miniboss music would still play under certains conditions and changing room
@ -2350,7 +2350,7 @@ void Actor_DrawFaroresWindPointer(PlayState* play) {
D_8015BC14 = 60;
D_8015BC18 = 1.0f;
} else if (D_8015BC14) {
D_8015BC14-= CVarGetInteger("gFastFarores", 0) ? 5 : 1;
D_8015BC14-= CVarGetInteger(CVAR_ENHANCEMENT("FastFarores"), 0) ? 5 : 1;
} else if (D_8015BC18 > 0.0f) {
static Vec3f effectVel = { 0.0f, -0.05f, 0.0f };
static Vec3f effectAccel = { 0.0f, -0.025f, 0.0f };
@ -2898,7 +2898,7 @@ s32 func_800314B0(PlayState* play, Actor* actor) {
s32 func_800314D4(PlayState* play, Actor* actor, Vec3f* arg2, f32 arg3) {
f32 var;
if (CVarGetInteger("gDisableDrawDistance", 0) != 0 && actor->id != ACTOR_EN_TORCH2 && actor->id != ACTOR_EN_BLKOBJ // Extra check for Dark Link and his room
if (CVarGetInteger(CVAR_ENHANCEMENT("DisableDrawDistance"), 0) != 0 && actor->id != ACTOR_EN_TORCH2 && actor->id != ACTOR_EN_BLKOBJ // Extra check for Dark Link and his room
&& actor->id != ACTOR_EN_HORSE // Check for Epona, else if we call her she will spawn at the other side of the map + we can hear her during the title screen sequence
&& actor->id != ACTOR_EN_HORSE_GANON && actor->id != ACTOR_EN_HORSE_ZELDA // check for Zelda's and Ganondorf's horses that will always be scene during cinematic whith camera paning
&& (play->sceneNum != SCENE_DODONGOS_CAVERN && actor->id != ACTOR_EN_ZF)) { // Check for DC and Lizalfos for the case where the miniboss music would still play under certains conditions and changing room
@ -3192,7 +3192,7 @@ int gMapLoading = 0;
Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ,
s16 rotX, s16 rotY, s16 rotZ, s16 params, s16 canRandomize) {
uint8_t tryRandomizeEnemy = CVarGetInteger("gRandomizedEnemies", 0) && gSaveContext.fileNum >= 0 && gSaveContext.fileNum <= 2 && canRandomize;
uint8_t tryRandomizeEnemy = CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && gSaveContext.fileNum >= 0 && gSaveContext.fileNum <= 2 && canRandomize;
if (tryRandomizeEnemy) {
if (!GetRandomizedEnemy(play, &actorId, &posX, &posY, &posZ, &rotX, &rotY, &rotZ, &params)) {
@ -3221,7 +3221,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
objBankIndex = Object_GetIndex(&gPlayState->objectCtx, dbEntry->objectId);
if (objBankIndex < 0 && (!gMapLoading || CVarGetInteger("gRandomizedEnemies", 0))) {
if (objBankIndex < 0 && (!gMapLoading || CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0))) {
objBankIndex = 0;
}
@ -3299,7 +3299,7 @@ Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, PlayState* play
// Gohma (z_boss_goma.c), the Stalchildren spawner (z_en_encount1.c) and the falling platform spawning Stalfos in
// Forest Temple (z_bg_mori_bigst.c) that normally rely on this behaviour are changed when
// Enemy Rando is on so they still work properly even without assigning a parent.
if (CVarGetInteger("gRandomizedEnemies", 0) && (spawnedActor->id == ACTOR_EN_FLOORMAS || spawnedActor->id == ACTOR_EN_PEEHAT)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && (spawnedActor->id == ACTOR_EN_FLOORMAS || spawnedActor->id == ACTOR_EN_PEEHAT)) {
return spawnedActor;
}

View File

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

View File

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

View File

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

View File

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

View File

@ -761,13 +761,13 @@ void GetItem_DrawRecoveryHeart(PlayState* play, s16 drawId) {
1 * -(play->state.frames * 2), 32, 32));
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD);
if (CVarGetInteger("gCosmetics.Consumable_Hearts.Changed", 0)) {
Color_RGB8 color = CVarGetColor24("gCosmetics.Consumable_Hearts.Value", (Color_RGB8) { 255, 70, 50 });
if (CVarGetInteger(CVAR_COSMETIC("Consumable.Hearts.Changed"), 0)) {
Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("Consumable.Hearts.Value"), (Color_RGB8) { 255, 70, 50 });
gDPSetGrayscaleColor(POLY_XLU_DISP++, color.r, color.g, color.b, 255);
gSPGrayscale(POLY_XLU_DISP++, true);
}
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
if (CVarGetInteger("gCosmetics.Consumable_Hearts.Changed", 0)) {
if (CVarGetInteger(CVAR_COSMETIC("Consumable.Hearts.Changed"), 0)) {
gSPGrayscale(POLY_XLU_DISP++, false);
}
CLOSE_DISPS(play->state.gfxCtx);

View File

@ -208,8 +208,8 @@ s32 EffectBlure_Update(void* thisx) {
switch (this->trailType) { //there HAS to be a better way to do this.
case 2:
if (CVarGetInteger("gCosmetics.Trails_Boomerang.Changed", 0)) {
color = CVarGetColor("gCosmetics.Trails_Boomerang.Value", (Color_RGBA8){ 255, 255, 100, 255 });
if (CVarGetInteger(CVAR_COSMETIC("Trails.Boomerang.Changed"), 0)) {
color = CVarGetColor(CVAR_COSMETIC("Trails.Boomerang.Value"), (Color_RGBA8){ 255, 255, 100, 255 });
changed = 1;
} else if (changed) {
color = (Color_RGBA8){ 255, 255, 100, 255 };
@ -217,8 +217,8 @@ s32 EffectBlure_Update(void* thisx) {
}
break;
case 3:
if (CVarGetInteger("gCosmetics.Trails_Bombchu.Changed", 0)) {
color = CVarGetColor("gCosmetics.Trails_Bombchu.Value", (Color_RGBA8){ 250, 0, 0, 255 });
if (CVarGetInteger(CVAR_COSMETIC("Trails.Bombchu.Changed"), 0)) {
color = CVarGetColor(CVAR_COSMETIC("Trails.Bombchu.Value"), (Color_RGBA8){ 250, 0, 0, 255 });
this->p1StartColor.r = color.r;
this->p2StartColor.r = color.r * 0.8f;
this->p1EndColor.r = color.r * 0.6f;
@ -248,8 +248,8 @@ s32 EffectBlure_Update(void* thisx) {
}
break;
case 4:
if (CVarGetInteger("gCosmetics.Trails_KokiriSword.Changed", 0)) {
color = CVarGetColor("gCosmetics.Trails_KokiriSword.Value", (Color_RGBA8){ 255, 255, 255, 255 });
if (CVarGetInteger(CVAR_COSMETIC("Trails.KokiriSword.Changed"), 0)) {
color = CVarGetColor(CVAR_COSMETIC("Trails.KokiriSword.Value"), (Color_RGBA8){ 255, 255, 255, 255 });
changed = 1;
} else if (changed) {
color = (Color_RGBA8){ 255, 255, 255, 255 };
@ -257,8 +257,8 @@ s32 EffectBlure_Update(void* thisx) {
}
break;
case 5:
if (CVarGetInteger("gCosmetics.Trails_MasterSword.Changed", 0)) {
color = CVarGetColor("gCosmetics.Trails_MasterSword.Value", (Color_RGBA8){ 255, 255, 255, 255 });
if (CVarGetInteger(CVAR_COSMETIC("Trails.MasterSword.Changed"), 0)) {
color = CVarGetColor(CVAR_COSMETIC("Trails.MasterSword.Value"), (Color_RGBA8){ 255, 255, 255, 255 });
changed = 1;
} else if (changed) {
color = (Color_RGBA8){ 255, 255, 255, 255 };
@ -266,8 +266,8 @@ s32 EffectBlure_Update(void* thisx) {
}
break;
case 6:
if (CVarGetInteger("gCosmetics.Trails_BiggoronSword.Changed", 0)) {
color = CVarGetColor("gCosmetics.Trails_BiggoronSword.Value", (Color_RGBA8){ 255, 255, 255, 255 });
if (CVarGetInteger(CVAR_COSMETIC("Trails.BiggoronSword.Changed"), 0)) {
color = CVarGetColor(CVAR_COSMETIC("Trails.BiggoronSword.Value"), (Color_RGBA8){ 255, 255, 255, 255 });
changed = 1;
} else if (changed) {
color = (Color_RGBA8){ 255, 255, 255, 255 };
@ -275,8 +275,8 @@ s32 EffectBlure_Update(void* thisx) {
}
break;
case 7:
if (CVarGetInteger("gCosmetics.Trails_Stick.Changed", 0)) {
color = CVarGetColor("gCosmetics.Trails_Stick.Value", (Color_RGBA8){ 255, 255, 255, 255 });
if (CVarGetInteger(CVAR_COSMETIC("Trails.Stick.Changed"), 0)) {
color = CVarGetColor(CVAR_COSMETIC("Trails.Stick.Value"), (Color_RGBA8){ 255, 255, 255, 255 });
changed = 1;
} else if (changed) {
color = (Color_RGBA8){ 255, 255, 255, 255 };
@ -284,8 +284,8 @@ s32 EffectBlure_Update(void* thisx) {
}
break;
case 8:
if (CVarGetInteger("gCosmetics.Trails_Hammer.Changed", 0)) {
color = CVarGetColor("gCosmetics.Trails_Hammer.Value", (Color_RGBA8){ 255, 255, 255, 255 });
if (CVarGetInteger(CVAR_COSMETIC("Trails.Hammer.Changed"), 0)) {
color = CVarGetColor(CVAR_COSMETIC("Trails.Hammer.Value"), (Color_RGBA8){ 255, 255, 255, 255 });
changed = 1;
} else if (changed) {
color = (Color_RGBA8){ 255, 255, 255, 255 };
@ -317,8 +317,8 @@ s32 EffectBlure_Update(void* thisx) {
// Don't override boomerang and bombchu trail durations
if (this->trailType != 2 && this->trailType != 3) {
if (CVarGetInteger("gCosmetics.Trails_Duration.Changed", 0)) {
this->elemDuration = CVarGetInteger("gCosmetics.Trails_Duration.Value", 4);
if (CVarGetInteger(CVAR_COSMETIC("Trails.Duration.Changed"), 0)) {
this->elemDuration = CVarGetInteger(CVAR_COSMETIC("Trails.Duration.Value"), 4);
}
}

View File

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

View File

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

View File

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

View File

@ -1384,7 +1384,7 @@ void Environment_DrawSunAndMoon(PlayState* play) {
color = CLAMP_MIN(color, 0.0f);
scale = -15.0f * color + 25.0f;
scale *= CVarGetFloat("gCosmetics.Moon_Size", 1.0f);
scale *= CVarGetFloat(CVAR_COSMETIC("Moon.Size"), 1.0f);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
temp = -y / 80.0f;
@ -1396,8 +1396,8 @@ void Environment_DrawSunAndMoon(PlayState* play) {
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD);
Gfx_SetupDL_51Opa(play->state.gfxCtx);
gDPPipeSync(POLY_OPA_DISP++);
if (CVarGetInteger("gCosmetics.World_Moon.Changed", 0)) {
Color_RGB8 moonColor = CVarGetColor24("gCosmetics.World_Moon.Value", (Color_RGB8){ 0, 0, 240 });
if (CVarGetInteger(CVAR_COSMETIC("World.Moon.Changed"), 0)) {
Color_RGB8 moonColor = CVarGetColor24(CVAR_COSMETIC("World.Moon.Value"), (Color_RGB8){ 0, 0, 240 });
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, moonColor.r, moonColor.g, moonColor.b, alpha);
gDPSetEnvColor(POLY_OPA_DISP++, moonColor.r / 2, moonColor.g / 2, moonColor.b / 2, alpha);
} else {

View File

@ -120,20 +120,20 @@ s16 sHeartsDDEnv[2][3];
void HealthMeter_Init(PlayState* play) {
InterfaceContext* interfaceCtx = &play->interfaceCtx;
Color_RGB8 mainColor = {HEARTS_PRIM_R, HEARTS_PRIM_G, HEARTS_PRIM_B};
if (CVarGetInteger("gCosmetics.Consumable_Hearts.Changed", 0)) {
mainColor = CVarGetColor24("gCosmetics.Consumable_Hearts.Value", mainColor);
if (CVarGetInteger(CVAR_COSMETIC("Consumable.Hearts.Changed"), 0)) {
mainColor = CVarGetColor24(CVAR_COSMETIC("Consumable.Hearts.Value"), mainColor);
}
Color_RGB8 mainBorder = {HEARTS_ENV_R, HEARTS_ENV_G, HEARTS_ENV_B};
if (CVarGetInteger("gCosmetics.Consumable_HeartBorder.Changed", 0)) {
mainBorder = CVarGetColor24("gCosmetics.Consumable_HeartBorder.Value", mainBorder);
if (CVarGetInteger(CVAR_COSMETIC("Consumable.HeartBorder.Changed"), 0)) {
mainBorder = CVarGetColor24(CVAR_COSMETIC("Consumable.HeartBorder.Value"), mainBorder);
}
Color_RGB8 ddColor = {HEARTS_DD_ENV_R, HEARTS_DD_ENV_G, HEARTS_DD_ENV_B};
if (CVarGetInteger("gCosmetics.Consumable_DDHearts.Changed", 0)) {
ddColor = CVarGetColor24("gCosmetics.Consumable_DDHearts.Value", ddColor);
if (CVarGetInteger(CVAR_COSMETIC("Consumable.DDHearts.Changed"), 0)) {
ddColor = CVarGetColor24(CVAR_COSMETIC("Consumable.DDHearts.Value"), ddColor);
}
Color_RGB8 ddBorder = {HEARTS_DD_PRIM_R, HEARTS_DD_PRIM_G, HEARTS_DD_PRIM_B};
if (CVarGetInteger("gCosmetics.Consumable_DDHeartBorder.Changed", 0)) {
ddBorder = CVarGetColor24("gCosmetics.Consumable_DDHeartBorder.Value", ddBorder);
if (CVarGetInteger(CVAR_COSMETIC("Consumable.DDHeartBorder.Changed"), 0)) {
ddBorder = CVarGetColor24(CVAR_COSMETIC("Consumable.DDHeartBorder.Value"), ddBorder);
}
interfaceCtx->unk_228 = 0x140;
@ -182,20 +182,20 @@ void HealthMeter_Update(PlayState* play) {
Bottom_LM_Margin = CVarGetInteger("gHUDMargin_B", 0);
Color_RGB8 mainColor = {HEARTS_PRIM_R, HEARTS_PRIM_G, HEARTS_PRIM_B};
if (CVarGetInteger("gCosmetics.Consumable_Hearts.Changed", 0)) {
mainColor = CVarGetColor24("gCosmetics.Consumable_Hearts.Value", mainColor);
if (CVarGetInteger(CVAR_COSMETIC("Consumable.Hearts.Changed"), 0)) {
mainColor = CVarGetColor24(CVAR_COSMETIC("Consumable.Hearts.Value"), mainColor);
}
Color_RGB8 mainBorder = {HEARTS_ENV_R, HEARTS_ENV_G, HEARTS_ENV_B};
if (CVarGetInteger("gCosmetics.Consumable_HeartBorder.Changed", 0)) {
mainBorder = CVarGetColor24("gCosmetics.Consumable_HeartBorder.Value", mainBorder);
if (CVarGetInteger(CVAR_COSMETIC("Consumable.HeartBorder.Changed"), 0)) {
mainBorder = CVarGetColor24(CVAR_COSMETIC("Consumable.HeartBorder.Value"), mainBorder);
}
Color_RGB8 ddColor = {HEARTS_DD_ENV_R, HEARTS_DD_ENV_G, HEARTS_DD_ENV_B};
if (CVarGetInteger("gCosmetics.Consumable_DDHearts.Changed", 0)) {
ddColor = CVarGetColor24("gCosmetics.Consumable_DDHearts.Value", ddColor);
if (CVarGetInteger(CVAR_COSMETIC("Consumable.DDHearts.Changed"), 0)) {
ddColor = CVarGetColor24(CVAR_COSMETIC("Consumable.DDHearts.Value"), ddColor);
}
Color_RGB8 ddBorder = {HEARTS_DD_PRIM_R, HEARTS_DD_PRIM_G, HEARTS_DD_PRIM_B};
if (CVarGetInteger("gCosmetics.Consumable_DDHeartBorder.Changed", 0)) {
ddBorder = CVarGetColor24("gCosmetics.Consumable_DDHeartBorder.Value", ddBorder);
if (CVarGetInteger(CVAR_COSMETIC("Consumable.DDHeartBorder.Changed"), 0)) {
ddBorder = CVarGetColor24(CVAR_COSMETIC("Consumable.DDHeartBorder.Value"), ddBorder);
}
if (interfaceCtx->unk_200 != 0) {
@ -336,20 +336,20 @@ static void* sHeartDDTextures[] = {
s16 getHealthMeterXOffset() {
s16 X_Margins;
if (CVarGetInteger("gHeartsUseMargins", 0) != 0)
if (CVarGetInteger(CVAR_COSMETIC("Hearts.UseMargins"), 0) != 0)
X_Margins = Left_LM_Margin;
else
X_Margins = 0;
if (CVarGetInteger("gHeartsCountPosType", 0) != 0) {
if (CVarGetInteger("gHeartsCountPosType", 0) == 1) {//Anchor Left
return OTRGetDimensionFromLeftEdge(CVarGetInteger("gHeartsCountPosX", 0)+X_Margins+70.0f);
} else if (CVarGetInteger("gHeartsCountPosType", 0) == 2) {//Anchor Right
if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) != 0) {
if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) == 1) {//Anchor Left
return OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosX"), 0)+X_Margins+70.0f);
} else if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) == 2) {//Anchor Right
X_Margins = Right_LM_Margin;
return OTRGetDimensionFromRightEdge(CVarGetInteger("gHeartsCountPosX", 0)+X_Margins+70.0f);
} else if (CVarGetInteger("gHeartsCountPosType", 0) == 3) {//Anchor None
return CVarGetInteger("gHeartsCountPosX", 0)+70.0f;;
} else if (CVarGetInteger("gHeartsCountPosType", 0) == 4) {//Hidden
return OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosX"), 0)+X_Margins+70.0f);
} else if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) == 3) {//Anchor None
return CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosX"), 0)+70.0f;;
} else if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) == 4) {//Hidden
return -9999;
}
} else {
@ -359,15 +359,15 @@ s16 getHealthMeterXOffset() {
s16 getHealthMeterYOffset() {
s16 Y_Margins;
if (CVarGetInteger("gHeartsUseMargins", 0) != 0)
if (CVarGetInteger(CVAR_COSMETIC("Hearts.UseMargins"), 0) != 0)
Y_Margins = (Top_LM_Margin*-1);
else
Y_Margins = 0;
f32 HeartsScale = 0.7f;
if (CVarGetInteger("gHeartsCountPosType", 0) != 0) {
HeartsScale = CVarGetFloat("gHeartsCountScale", 0.7f);
return CVarGetInteger("gHeartsCountPosY", 0)+Y_Margins+(HeartsScale*15);
if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) != 0) {
HeartsScale = CVarGetFloat(CVAR_COSMETIC("HeartsCount.Scale"), 0.7f);
return CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosY"), 0)+Y_Margins+(HeartsScale*15);
} else {
return 0.0f+Y_Margins;
}
@ -397,8 +397,8 @@ void HealthMeter_Draw(PlayState* play) {
u8* curBgImgLoaded = NULL;
s32 ddHeartCountMinusOne = gSaveContext.isDoubleDefenseAcquired ? totalHeartCount - 1 : -1;
f32 HeartsScale = 0.7f;
if (CVarGetInteger("gHeartsCountPosType", 0) != 0) {
HeartsScale = CVarGetFloat("gHeartsCountScale", 0.7f);
if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) != 0) {
HeartsScale = CVarGetFloat(CVAR_COSMETIC("HeartsCount.Scale"), 0.7f);
}
static u32 epoch = 0;
epoch++;
@ -413,7 +413,7 @@ void HealthMeter_Draw(PlayState* play) {
/*
s16 X_Margins;
s16 Y_Margins;
if (CVarGetInteger("gHeartsUseMargins", 0) != 0) {
if (CVarGetInteger(CVAR_COSMETIC("Hearts.UseMargins"), 0) != 0) {
X_Margins = Left_LM_Margin;
Y_Margins = (Top_LM_Margin*-1);
} else {
@ -422,16 +422,16 @@ void HealthMeter_Draw(PlayState* play) {
}
s16 PosX_original = OTRGetDimensionFromLeftEdge(0.0f)+X_Margins;
s16 PosY_original = 0.0f+Y_Margins;
if (CVarGetInteger("gHeartsCountPosType", 0) != 0) {
offsetY = CVarGetInteger("gHeartsCountPosY", 0)+Y_Margins+(HeartsScale*15);
if (CVarGetInteger("gHeartsCountPosType", 0) == 1) {//Anchor Left
offsetX = OTRGetDimensionFromLeftEdge(CVarGetInteger("gHeartsCountPosX", 0)+X_Margins+70.0f);
} else if (CVarGetInteger("gHeartsCountPosType", 0) == 2) {//Anchor Right
if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) != 0) {
offsetY = CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosY"), 0)+Y_Margins+(HeartsScale*15);
if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) == 1) {//Anchor Left
offsetX = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosX"), 0)+X_Margins+70.0f);
} else if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) == 2) {//Anchor Right
X_Margins = Right_LM_Margin;
offsetX = OTRGetDimensionFromRightEdge(CVarGetInteger("gHeartsCountPosX", 0)+X_Margins+70.0f);
} else if (CVarGetInteger("gHeartsCountPosType", 0) == 3) {//Anchor None
offsetX = CVarGetInteger("gHeartsCountPosX", 0)+70.0f;
} else if (CVarGetInteger("gHeartsCountPosType", 0) == 4) {//Hidden
offsetX = OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosX"), 0)+X_Margins+70.0f);
} else if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) == 3) {//Anchor None
offsetX = CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosX"), 0)+70.0f;
} else if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) == 4) {//Hidden
offsetX = -9999;
}
} else {
@ -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
@ -626,7 +626,7 @@ void HealthMeter_Draw(PlayState* play) {
}
offsetX += 10.0f;
s32 lineLength = CVarGetInteger("gHeartsLineLength", 10);
s32 lineLength = CVarGetInteger(CVAR_COSMETIC("Hearts.LineLength"), 10);
if (lineLength != 0 && (i+1)%lineLength == 0) {
offsetX = PosX_anchor;
offsetY += 10.0f;
@ -646,7 +646,7 @@ void HealthMeter_HandleCriticalAlarm(PlayState* play) {
if (interfaceCtx->unk_22A <= 0) {
interfaceCtx->unk_22A = 0;
interfaceCtx->unk_22C = 0;
if (CVarGetInteger("gLowHpAlarm", 0) == 0 && !Player_InCsMode(play) && (play->pauseCtx.state == 0) &&
if (CVarGetInteger(CVAR_ENHANCEMENT("LowHpAlarm"), 0) == 0 && !Player_InCsMode(play) && (play->pauseCtx.state == 0) &&
(play->pauseCtx.debugState == 0) && HealthMeter_IsCritical() && !Play_InCsMode(play)) {
func_80078884(NA_SE_SY_HITPOINT_ALARM);
}

View File

@ -606,17 +606,17 @@ void Minimap_DrawCompassIcons(PlayState* play) {
Player* player = GET_PLAYER(play);
s16 tempX, tempZ;
Color_RGB8 lastEntranceColor = { 200, 0, 0 };
if (CVarGetInteger("gCosmetics.Hud_MinimapEntrance.Changed", 0)) {
lastEntranceColor = CVarGetColor24("gCosmetics.Hud_MinimapEntrance.Value", lastEntranceColor);
if (CVarGetInteger(CVAR_COSMETIC("HUD.MinimapEntrance.Changed"), 0)) {
lastEntranceColor = CVarGetColor24(CVAR_COSMETIC("HUD.MinimapEntrance.Value"), lastEntranceColor);
}
Color_RGB8 currentPositionColor = { 200, 255, 0 };
if (CVarGetInteger("gCosmetics.Hud_MinimapPosition.Changed", 0)) {
currentPositionColor = CVarGetColor24("gCosmetics.Hud_MinimapPosition.Value", currentPositionColor);
if (CVarGetInteger(CVAR_COSMETIC("HUD.MinimapPosition.Changed"), 0)) {
currentPositionColor = CVarGetColor24(CVAR_COSMETIC("HUD.MinimapPosition.Value"), currentPositionColor);
}
s16 X_Margins_Minimap;
s16 Y_Margins_Minimap;
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {
if (CVarGetInteger("gMinimapPosType", 0) == 0) {X_Margins_Minimap = Right_MM_Margin;};
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 0) {X_Margins_Minimap = Right_MM_Margin;};
Y_Margins_Minimap = Bottom_MM_Margin;
} else {
X_Margins_Minimap = 0;
@ -656,21 +656,21 @@ void Minimap_DrawCompassIcons(PlayState* play) {
tempZ /= R_COMPASS_SCALE_Y;
s16 tempXOffset = R_COMPASS_OFFSET_X + (CVarGetInteger("gMirroredWorld", 0) ? mirrorOffset : 0);
if (CVarGetInteger("gMinimapPosType", 0) != 0) {
if (CVarGetInteger("gMinimapPosType", 0) == 1) {//Anchor Left
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) != 0) {
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 1) {//Anchor Left
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
Matrix_Translate(
OTRGetDimensionFromLeftEdge((tempXOffset + (X_Margins_Minimap*10) + tempX + (CVarGetInteger("gMinimapPosX", 0)*10)) / 10.0f),
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
} else if (CVarGetInteger("gMinimapPosType", 0) == 2) {//Anchor Right
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
OTRGetDimensionFromLeftEdge((tempXOffset + (X_Margins_Minimap*10) + tempX + (CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)*10)) / 10.0f),
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 2) {//Anchor Right
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
Matrix_Translate(
OTRGetDimensionFromRightEdge((tempXOffset + (X_Margins_Minimap*10) + tempX + (CVarGetInteger("gMinimapPosX", 0)*10)) / 10.0f),
(R_COMPASS_OFFSET_Y +((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
} else if (CVarGetInteger("gMinimapPosType", 0) == 3) {//Anchor None
OTRGetDimensionFromRightEdge((tempXOffset + (X_Margins_Minimap*10) + tempX + (CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)*10)) / 10.0f),
(R_COMPASS_OFFSET_Y +((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 3) {//Anchor None
Matrix_Translate(
(tempXOffset + tempX + (CVarGetInteger("gMinimapPosX", 0)*10) / 10.0f),
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
(tempXOffset + tempX + (CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)*10) / 10.0f),
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
}
} else {
Matrix_Translate(OTRGetDimensionFromRightEdge((tempXOffset+(X_Margins_Minimap*10) + tempX) / 10.0f), (R_COMPASS_OFFSET_Y+((Y_Margins_Minimap*10)*-1) - tempZ) / 10.0f, 0.0f, MTXMODE_NEW);
@ -690,21 +690,21 @@ void Minimap_DrawCompassIcons(PlayState* play) {
tempZ = sPlayerInitialPosZ;
tempX /= R_COMPASS_SCALE_X * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1);
tempZ /= R_COMPASS_SCALE_Y;
if (CVarGetInteger("gMinimapPosType", 0) != 0) {
if (CVarGetInteger("gMinimapPosType", 0) == 1) {//Anchor Left
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) != 0) {
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 1) {//Anchor Left
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
Matrix_Translate(
OTRGetDimensionFromLeftEdge((tempXOffset + (X_Margins_Minimap*10) + tempX + (CVarGetInteger("gMinimapPosX", 0)*10)) / 10.0f),
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
} else if (CVarGetInteger("gMinimapPosType", 0) == 2) {//Anchor Right
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
OTRGetDimensionFromLeftEdge((tempXOffset + (X_Margins_Minimap*10) + tempX + (CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)*10)) / 10.0f),
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 2) {//Anchor Right
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
Matrix_Translate(
OTRGetDimensionFromRightEdge((tempXOffset + (X_Margins_Minimap*10) + tempX + (CVarGetInteger("gMinimapPosX", 0)*10)) / 10.0f),
(R_COMPASS_OFFSET_Y +((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
} else if (CVarGetInteger("gMinimapPosType", 0) == 3) {//Anchor None
OTRGetDimensionFromRightEdge((tempXOffset + (X_Margins_Minimap*10) + tempX + (CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)*10)) / 10.0f),
(R_COMPASS_OFFSET_Y +((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 3) {//Anchor None
Matrix_Translate(
(tempXOffset + tempX + (CVarGetInteger("gMinimapPosX", 0)*10) / 10.0f),
(R_COMPASS_OFFSET_Y - tempZ + ((CVarGetInteger("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
(tempXOffset + tempX + (CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)*10) / 10.0f),
(R_COMPASS_OFFSET_Y - tempZ + ((CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
}
} else {
Matrix_Translate(OTRGetDimensionFromRightEdge((tempXOffset+(X_Margins_Minimap*10) + tempX) / 10.0f), (R_COMPASS_OFFSET_Y+((Y_Margins_Minimap*10)*-1) - tempZ) / 10.0f, 0.0f, MTXMODE_NEW);
@ -727,8 +727,8 @@ void Minimap_Draw(PlayState* play) {
InterfaceContext* interfaceCtx = &play->interfaceCtx;
s32 mapIndex = gSaveContext.mapIndex;
Color_RGB8 minimapColor = {0, 255, 255};
if (CVarGetInteger("gCosmetics.Hud_Minimap.Changed", 0)) {
minimapColor = CVarGetColor24("gCosmetics.Hud_Minimap.Value", minimapColor);
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.Changed"), 0)) {
minimapColor = CVarGetColor24(CVAR_COSMETIC("HUD.Minimap.Value"), minimapColor);
}
OPEN_DISPS(play->state.gfxCtx);
@ -742,8 +742,8 @@ void Minimap_Draw(PlayState* play) {
//Minimap margins
s16 X_Margins_Minimap;
s16 Y_Margins_Minimap;
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {
if (CVarGetInteger("gMinimapPosType", 0) == 0) {X_Margins_Minimap = Right_MM_Margin;};
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 0) {X_Margins_Minimap = Right_MM_Margin;};
Y_Margins_Minimap = Bottom_MM_Margin;
} else {
X_Margins_Minimap = 0;
@ -761,7 +761,7 @@ void Minimap_Draw(PlayState* play) {
case SCENE_SHADOW_TEMPLE:
case SCENE_BOTTOM_OF_THE_WELL:
case SCENE_ICE_CAVERN:
if (!R_MINIMAP_DISABLED && CVarGetInteger("gMinimapPosType", 0) != 4) { // Not Hidden
if (!R_MINIMAP_DISABLED && CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) != 4) { // Not Hidden
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
gDPSetCombineLERP(OVERLAY_DISP++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, 0,
TEXEL0, 0, PRIMITIVE, 0);
@ -776,16 +776,16 @@ void Minimap_Draw(PlayState* play) {
s16 dgnMiniMapX = OTRGetRectDimensionFromRightEdge(R_DGN_MINIMAP_X + X_Margins_Minimap);
s16 dgnMiniMapY = R_DGN_MINIMAP_Y + Y_Margins_Minimap;
if (CVarGetInteger("gMinimapPosType", 0) != 0) {
dgnMiniMapY = R_DGN_MINIMAP_Y+CVarGetInteger("gMinimapPosY", 0)+Y_Margins_Minimap;
if (CVarGetInteger("gMinimapPosType", 0) == 1) {//Anchor Left
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
dgnMiniMapX = OTRGetDimensionFromLeftEdge(R_DGN_MINIMAP_X+CVarGetInteger("gMinimapPosX", 0)+X_Margins_Minimap);
} else if (CVarGetInteger("gMinimapPosType", 0) == 2) {//Anchor Right
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
dgnMiniMapX = OTRGetDimensionFromRightEdge(R_DGN_MINIMAP_X+CVarGetInteger("gMinimapPosX", 0)+X_Margins_Minimap);
} else if (CVarGetInteger("gMinimapPosType", 0) == 3) {//Anchor None
dgnMiniMapX = CVarGetInteger("gMinimapPosX", 0);
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) != 0) {
dgnMiniMapY = R_DGN_MINIMAP_Y+CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0)+Y_Margins_Minimap;
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 1) {//Anchor Left
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
dgnMiniMapX = OTRGetDimensionFromLeftEdge(R_DGN_MINIMAP_X+CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)+X_Margins_Minimap);
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 2) {//Anchor Right
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
dgnMiniMapX = OTRGetDimensionFromRightEdge(R_DGN_MINIMAP_X+CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)+X_Margins_Minimap);
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 3) {//Anchor None
dgnMiniMapX = CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0);
}
}
@ -839,7 +839,7 @@ void Minimap_Draw(PlayState* play) {
case SCENE_GORON_CITY:
case SCENE_LON_LON_RANCH:
case SCENE_OUTSIDE_GANONS_CASTLE:
if (!R_MINIMAP_DISABLED && CVarGetInteger("gMinimapPosType", 0) != 4) { // Not Hidden
if (!R_MINIMAP_DISABLED && CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) != 4) { // Not Hidden
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
@ -853,16 +853,16 @@ void Minimap_Draw(PlayState* play) {
s16 oWMiniMapX = OTRGetRectDimensionFromRightEdge(R_OW_MINIMAP_X + X_Margins_Minimap);
s16 oWMiniMapY = R_OW_MINIMAP_Y + Y_Margins_Minimap;
if (CVarGetInteger("gMinimapPosType", 0) != 0) {
oWMiniMapY = R_OW_MINIMAP_Y+CVarGetInteger("gMinimapPosY", 0)+Y_Margins_Minimap;
if (CVarGetInteger("gMinimapPosType", 0) == 1) {//Anchor Left
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
oWMiniMapX = OTRGetDimensionFromLeftEdge(R_OW_MINIMAP_X+CVarGetInteger("gMinimapPosX", 0)+X_Margins_Minimap);
} else if (CVarGetInteger("gMinimapPosType", 0) == 2) {//Anchor Right
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
oWMiniMapX = OTRGetDimensionFromRightEdge(R_OW_MINIMAP_X+CVarGetInteger("gMinimapPosX", 0)+X_Margins_Minimap);
} else if (CVarGetInteger("gMinimapPosType", 0) == 3) {//Anchor None
oWMiniMapX = CVarGetInteger("gMinimapPosX", 0);
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) != 0) {
oWMiniMapY = R_OW_MINIMAP_Y+CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0)+Y_Margins_Minimap;
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 1) {//Anchor Left
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
oWMiniMapX = OTRGetDimensionFromLeftEdge(R_OW_MINIMAP_X+CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)+X_Margins_Minimap);
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 2) {//Anchor Right
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
oWMiniMapX = OTRGetDimensionFromRightEdge(R_OW_MINIMAP_X+CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)+X_Margins_Minimap);
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 3) {//Anchor None
oWMiniMapX = CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0);
}
}
@ -901,16 +901,16 @@ void Minimap_Draw(PlayState* play) {
s16 entranceX = OTRGetRectDimensionFromRightEdge(newX + X_Margins_Minimap);
s16 entranceY = newY + Y_Margins_Minimap;
if (CVarGetInteger("gMinimapPosType", 0) != 0) {
entranceY = newY + CVarGetInteger("gMinimapPosY", 0) + Y_Margins_Minimap;
if (CVarGetInteger("gMinimapPosType", 0) == 1) { // Anchor Left
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
entranceX = OTRGetRectDimensionFromLeftEdge(newX + X_Margins_Minimap + CVarGetInteger("gMinimapPosX", 0));
} else if (CVarGetInteger("gMinimapPosType", 0) == 2) { // Anchor Right
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
entranceX = OTRGetRectDimensionFromRightEdge(newX + X_Margins_Minimap + CVarGetInteger("gMinimapPosX", 0));
} else if (CVarGetInteger("gMinimapPosType", 0) == 3) { // Anchor None
entranceX = newX + X_Margins_Minimap + CVarGetInteger("gMinimapPosX", 0);
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) != 0) {
entranceY = newY + CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0) + Y_Margins_Minimap;
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 1) { // Anchor Left
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
entranceX = OTRGetRectDimensionFromLeftEdge(newX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0));
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 2) { // Anchor Right
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
entranceX = OTRGetRectDimensionFromRightEdge(newX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0));
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 3) { // Anchor None
entranceX = newX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0);
}
}
@ -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);
@ -937,22 +937,22 @@ void Minimap_Draw(PlayState* play) {
s16 origX = CVarGetInteger("gMirroredWorld", 0) ? 256 : 270;
s16 entranceX = OTRGetRectDimensionFromRightEdge(origX + X_Margins_Minimap);
s16 entranceY = 154 + Y_Margins_Minimap;
if (CVarGetInteger("gMinimapPosType", 0) != 0) {
entranceY = 154 + Y_Margins_Minimap + CVarGetInteger("gMinimapPosY", 0);
if (CVarGetInteger("gMinimapPosType", 0) == 1) {//Anchor Left
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
entranceX = OTRGetRectDimensionFromLeftEdge(origX + X_Margins_Minimap + CVarGetInteger("gMinimapPosX", 0));
} else if (CVarGetInteger("gMinimapPosType", 0) == 2) {//Anchor Right
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
entranceX = OTRGetRectDimensionFromRightEdge(origX + X_Margins_Minimap + CVarGetInteger("gMinimapPosX", 0));
} else if (CVarGetInteger("gMinimapPosType", 0) == 3) {//Anchor None
entranceX = origX + X_Margins_Minimap + CVarGetInteger("gMinimapPosX", 0);
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) != 0) {
entranceY = 154 + Y_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0);
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 1) {//Anchor Left
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
entranceX = OTRGetRectDimensionFromLeftEdge(origX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0));
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 2) {//Anchor Right
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
entranceX = OTRGetRectDimensionFromRightEdge(origX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0));
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 3) {//Anchor None
entranceX = origX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0);
}
}
// Ice Cavern entrance icon
if ((play->sceneNum == SCENE_ZORAS_FOUNTAIN) && ((gSaveContext.infTable[26] & gBitFlags[9]) ||
CVarGetInteger("gAlwaysShowDungeonMinimapIcon", 0))) {
CVarGetInteger(CVAR_ENHANCEMENT("AlwaysShowDungeonMinimapIcon"), 0))) {
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, iconSize,
iconSize, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);

View File

@ -120,8 +120,8 @@ void MapMark_DrawForDungeon(PlayState* play) {
s32 X_Margins_Minimap_ic;
s32 Y_Margins_Minimap_ic;
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {
if (CVarGetInteger("gMinimapPosType", 0) == 0) {X_Margins_Minimap_ic = Right_MC_Margin;};
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 0) {X_Margins_Minimap_ic = Right_MC_Margin;};
Y_Margins_Minimap_ic = Bottom_MC_Margin;
} else {
X_Margins_Minimap_ic = 0;
@ -146,24 +146,24 @@ void MapMark_DrawForDungeon(PlayState* play) {
//Minimap chest / boss icon
const s32 PosX_Minimap_ori = GREG(94) + OTRGetRectDimensionFromRightEdge(markPointX+X_Margins_Minimap_ic) + 204;
const s32 PosY_Minimap_ori = GREG(95) + markPoint->y + Y_Margins_Minimap_ic + 140;
if (CVarGetInteger("gMinimapPosType", 0) != 0) {
rectTop = (markPoint->y + Y_Margins_Minimap_ic + 140 + CVarGetInteger("gMinimapPosY", 0));
if (CVarGetInteger("gMinimapPosType", 0) == 1) {//Anchor Left
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap_ic = Left_MC_Margin;};
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) != 0) {
rectTop = (markPoint->y + Y_Margins_Minimap_ic + 140 + CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0));
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 1) {//Anchor Left
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap_ic = Left_MC_Margin;};
if (play->sceneNum == SCENE_DEKU_TREE || play->sceneNum == SCENE_DODONGOS_CAVERN || play->sceneNum == SCENE_JABU_JABU ||
play->sceneNum == SCENE_FOREST_TEMPLE || play->sceneNum == SCENE_FIRE_TEMPLE || play->sceneNum == SCENE_WATER_TEMPLE ||
play->sceneNum == SCENE_SPIRIT_TEMPLE || play->sceneNum == SCENE_SHADOW_TEMPLE || play->sceneNum == SCENE_BOTTOM_OF_THE_WELL ||
play->sceneNum == SCENE_ICE_CAVERN) {
rectLeft = OTRGetRectDimensionFromLeftEdge(markPointX+CVarGetInteger("gMinimapPosX", 0)+204+X_Margins_Minimap_ic);
rectLeft = OTRGetRectDimensionFromLeftEdge(markPointX+CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)+204+X_Margins_Minimap_ic);
} else {
rectLeft = OTRGetRectDimensionFromLeftEdge(markPointX+CVarGetInteger("gMinimapPosX", 0)+204+X_Margins_Minimap_ic);
rectLeft = OTRGetRectDimensionFromLeftEdge(markPointX+CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)+204+X_Margins_Minimap_ic);
}
} else if (CVarGetInteger("gMinimapPosType", 0) == 2) {//Anchor Right
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap_ic = Right_MC_Margin;};
rectLeft = OTRGetRectDimensionFromRightEdge(markPointX+CVarGetInteger("gMinimapPosX", 0)+204+X_Margins_Minimap_ic);
} else if (CVarGetInteger("gMinimapPosType", 0) == 3) {//Anchor None
rectLeft = markPointX+CVarGetInteger("gMinimapPosX", 0)+204+X_Margins_Minimap_ic;
} else if (CVarGetInteger("gMinimapPosType", 0) == 4) {//Hidden
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 2) {//Anchor Right
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap_ic = Right_MC_Margin;};
rectLeft = OTRGetRectDimensionFromRightEdge(markPointX+CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)+204+X_Margins_Minimap_ic);
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 3) {//Anchor None
rectLeft = markPointX+CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)+204+X_Margins_Minimap_ic;
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 4) {//Hidden
rectLeft = -9999;
}
} else {

View File

@ -99,30 +99,30 @@ void Message_ResetOcarinaNoteState(void) {
sOcarinaNoteABtnEnv = (Color_RGB8){ 10, 10, 10 };
sOcarinaNoteCBtnPrim = (Color_RGB8){ 255, 255, 50 };
sOcarinaNoteCBtnEnv = (Color_RGB8){ 10, 10, 10 };
if (CVarGetInteger("gCosmetics.Hud_AButton.Changed", 0)) {
sOcarinaNoteABtnPrim = CVarGetColor24("gCosmetics.Hud_AButton.Value", sOcarinaNoteABtnPrim);
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
if (CVarGetInteger(CVAR_COSMETIC("HUD.AButton.Changed"), 0)) {
sOcarinaNoteABtnPrim = CVarGetColor24(CVAR_COSMETIC("HUD.AButton.Value"), sOcarinaNoteABtnPrim);
} else if (CVarGetInteger(CVAR_COSMETIC("DefaultColorScheme"), COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
sOcarinaNoteABtnPrim = (Color_RGB8){ 80, 255, 150 };
}
if (CVarGetInteger("gCosmetics.Hud_CButtons.Changed", 0)) {
sOcarinaNoteCBtnPrim = CVarGetColor24("gCosmetics.Hud_CButtons.Value", sOcarinaNoteCBtnPrim);
if (CVarGetInteger(CVAR_COSMETIC("HUD.CButtons.Changed"), 0)) {
sOcarinaNoteCBtnPrim = CVarGetColor24(CVAR_COSMETIC("HUD.CButtons.Value"), sOcarinaNoteCBtnPrim);
}
sOcarinaNoteCUpBtnPrim = sOcarinaNoteCBtnPrim;
sOcarinaNoteCDownBtnPrim = sOcarinaNoteCBtnPrim;
sOcarinaNoteCLeftBtnPrim = sOcarinaNoteCBtnPrim;
sOcarinaNoteCRightBtnPrim = sOcarinaNoteCBtnPrim;
if (CVarGetInteger("gCosmetics.Hud_CUpButton.Changed", 0)) {
sOcarinaNoteCUpBtnPrim = CVarGetColor24("gCosmetics.Hud_CUpButton.Value", sOcarinaNoteCUpBtnPrim);
if (CVarGetInteger(CVAR_COSMETIC("HUD.CUpButton.Changed"), 0)) {
sOcarinaNoteCUpBtnPrim = CVarGetColor24(CVAR_COSMETIC("HUD.CUpButton.Value"), sOcarinaNoteCUpBtnPrim);
}
if (CVarGetInteger("gCosmetics.Hud_CDownButton.Changed", 0)) {
sOcarinaNoteCDownBtnPrim = CVarGetColor24("gCosmetics.Hud_CDownButton.Value", sOcarinaNoteCDownBtnPrim);
if (CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.Changed"), 0)) {
sOcarinaNoteCDownBtnPrim = CVarGetColor24(CVAR_COSMETIC("HUD.CDownButton.Value"), sOcarinaNoteCDownBtnPrim);
}
if (CVarGetInteger("gCosmetics.Hud_CLeftButton.Changed", 0)) {
sOcarinaNoteCLeftBtnPrim = CVarGetColor24("gCosmetics.Hud_CLeftButton.Value", sOcarinaNoteCLeftBtnPrim);
if (CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.Changed"), 0)) {
sOcarinaNoteCLeftBtnPrim = CVarGetColor24(CVAR_COSMETIC("HUD.CLeftButton.Value"), sOcarinaNoteCLeftBtnPrim);
}
if (CVarGetInteger("gCosmetics.Hud_CRightButton.Changed", 0)) {
sOcarinaNoteCRightBtnPrim = CVarGetColor24("gCosmetics.Hud_CRightButton.Value", sOcarinaNoteCRightBtnPrim);
if (CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.Changed"), 0)) {
sOcarinaNoteCRightBtnPrim = CVarGetColor24(CVAR_COSMETIC("HUD.CRightButton.Value"), sOcarinaNoteCRightBtnPrim);
}
}
@ -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;
@ -463,14 +463,14 @@ void Message_DrawTextboxIcon(PlayState* play, Gfx** p, s16 x, s16 y) {
{ 0, 0, 0 },
{ 0, 130, 255 },
};
if (CVarGetInteger("gCosmetics.Hud_AButton.Changed", 0)) {
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_AButton.Value", (Color_RGB8){ 50, 130, 255 });
if (CVarGetInteger(CVAR_COSMETIC("HUD.AButton.Changed"), 0)) {
Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("HUD.AButton.Value"), (Color_RGB8){ 50, 130, 255 });
sIconPrimColors[0].r = color.r - 50;
sIconPrimColors[0].g = color.g - 50;
sIconPrimColors[0].b = color.b - 50;
sIconPrimColors[1] = color;
sIconEnvColors[1] = color;
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
} else if (CVarGetInteger(CVAR_COSMETIC("DefaultColorScheme"), COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
sIconPrimColors[0] = (Color_RGB8){ 0, 200, 80 };
sIconPrimColors[1] = (Color_RGB8){ 50, 255, 130 };
sIconEnvColors[1] = (Color_RGB8){ 50, 255, 130 };
@ -874,7 +874,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) {
@ -1033,7 +1033,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;
@ -1117,7 +1117,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
}
}
gTextSpeed = CVarGetInteger("gTextSpeed", 2);
gTextSpeed = CVarGetInteger(CVAR_ENHANCEMENT("TextSpeed"), 2);
if (msgCtx->textDelay == 0) {
msgCtx->textDrawPos = i + gTextSpeed;
} else if (msgCtx->textDelayTimer == 0) {
@ -1196,7 +1196,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 ||
@ -1661,7 +1661,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 ||
@ -2025,14 +2025,14 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
{ 10, 10, 10 },
{ 50, 50, 255 },
};
if (CVarGetInteger("gCosmetics.Hud_AButton.Changed", 0)) {
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_AButton.Value", (Color_RGB8){ 100, 200, 255 });
if (CVarGetInteger(CVAR_COSMETIC("HUD.AButton.Changed"), 0)) {
Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("HUD.AButton.Value"), (Color_RGB8){ 100, 200, 255 });
sOcarinaNoteAPrimColors[0].r = (color.r / 255.0f) * 95;
sOcarinaNoteAPrimColors[0].g = (color.g / 255.0f) * 95;
sOcarinaNoteAPrimColors[0].b = (color.b / 255.0f) * 95;
sOcarinaNoteAPrimColors[1] = color;
sOcarinaNoteAEnvColors[1] = color;
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
} else if (CVarGetInteger(CVAR_COSMETIC("DefaultColorScheme"), COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
sOcarinaNoteAPrimColors[0] = (Color_RGB8){ 80, 255, 150 };
sOcarinaNoteAPrimColors[1] = (Color_RGB8){ 100, 255, 200 };
sOcarinaNoteAEnvColors[1] = (Color_RGB8){ 50, 255, 50 };
@ -2046,8 +2046,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
{ 10, 10, 10 },
{ 110, 110, 50 },
};
if (CVarGetInteger("gCosmetics.Hud_CButtons.Changed", 0)) {
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_CButtons.Value", (Color_RGB8){ 100, 200, 255 });
if (CVarGetInteger(CVAR_COSMETIC("HUD.CButtons.Changed"), 0)) {
Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("HUD.CButtons.Value"), (Color_RGB8){ 100, 200, 255 });
sOcarinaNoteCPrimColors[0] = color;
sOcarinaNoteCPrimColors[1] = color;
sOcarinaNoteCEnvColors[1].r = (color.r / 255.0f) * 95;
@ -2063,8 +2063,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
{ 10, 10, 10 },
{ 110, 110, 50 },
};
if (CVarGetInteger("gCosmetics.Hud_CUpButton.Changed", 0)) {
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_CUpButton.Value", (Color_RGB8){ 100, 200, 255 });
if (CVarGetInteger(CVAR_COSMETIC("HUD.CUpButton.Changed"), 0)) {
Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("HUD.CUpButton.Value"), (Color_RGB8){ 100, 200, 255 });
sOcarinaNoteCUpPrimColors[0] = color;
sOcarinaNoteCUpPrimColors[1] = color;
sOcarinaNoteCUpEnvColors[1].r = (color.r / 255.0f) * 95;
@ -2080,8 +2080,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
{ 10, 10, 10 },
{ 110, 110, 50 },
};
if (CVarGetInteger("gCosmetics.Hud_CDownButton.Changed", 0)) {
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_CDownButton.Value", (Color_RGB8){ 100, 200, 255 });
if (CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.Changed"), 0)) {
Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("HUD.CDownButton.Value"), (Color_RGB8){ 100, 200, 255 });
sOcarinaNoteCDownPrimColors[0] = color;
sOcarinaNoteCDownPrimColors[1] = color;
sOcarinaNoteCDownEnvColors[1].r = (color.r / 255.0f) * 95;
@ -2097,8 +2097,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
{ 10, 10, 10 },
{ 110, 110, 50 },
};
if (CVarGetInteger("gCosmetics.Hud_CLeftButton.Changed", 0)) {
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_CLeftButton.Value", (Color_RGB8){ 100, 200, 255 });
if (CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.Changed"), 0)) {
Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("HUD.CLeftButton.Value"), (Color_RGB8){ 100, 200, 255 });
sOcarinaNoteCLeftPrimColors[0] = color;
sOcarinaNoteCLeftPrimColors[1] = color;
sOcarinaNoteCLeftEnvColors[1].r = (color.r / 255.0f) * 95;
@ -2114,8 +2114,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
{ 10, 10, 10 },
{ 110, 110, 50 },
};
if (CVarGetInteger("gCosmetics.Hud_CRightButton.Changed", 0)) {
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_CRightButton.Value", (Color_RGB8){ 100, 200, 255 });
if (CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.Changed"), 0)) {
Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("HUD.CRightButton.Value"), (Color_RGB8){ 100, 200, 255 });
sOcarinaNoteCRightPrimColors[0] = color;
sOcarinaNoteCRightPrimColors[1] = color;
sOcarinaNoteCRightEnvColors[1].r = (color.r / 255.0f) * 95;
@ -2162,7 +2162,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) {
@ -2443,7 +2443,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) {
@ -2498,7 +2498,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;
@ -3155,7 +3155,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) {
@ -3374,7 +3374,7 @@ void Message_Update(PlayState* play) {
}
if ((s32)(gSaveContext.inventory.questItems & 0xF0000000) == 0x40000000) {
gSaveContext.inventory.questItems ^= 0x40000000;
if (!CVarGetInteger("gHurtContainer", 0)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("HurtContainer"), 0)) {
gSaveContext.healthCapacity += 0x10;
gSaveContext.health += 0x10;
} else {

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -600,9 +600,9 @@ void Player_SetModelsForHoldingShield(Player* this) {
if ((CVarGetInteger(CVAR_CHEAT("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK) ||
!Player_HoldsTwoHandedWeapon(this)) && !Player_IsChildWithHylianShield(this)) {
this->rightHandType = PLAYER_MODELTYPE_RH_SHIELD;
if (LINK_IS_CHILD && (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && (this->currentShield == PLAYER_SHIELD_MIRROR)) {
if (LINK_IS_CHILD && (CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) && (this->currentShield == PLAYER_SHIELD_MIRROR)) {
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][0];
} else if (LINK_IS_ADULT && (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && (this->currentShield == PLAYER_SHIELD_DEKU)) {
} else if (LINK_IS_ADULT && (CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) && (this->currentShield == PLAYER_SHIELD_DEKU)) {
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][1];
} else {
this->rightHandDLists = &sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD][gSaveContext.linkAge];
@ -613,7 +613,7 @@ void Player_SetModelsForHoldingShield(Player* this) {
this->sheathType = PLAYER_MODELTYPE_SHEATH_17;
}
this->sheathDLists = &sPlayerDListGroups[this->sheathType][gSaveContext.linkAge];
if ((CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && LINK_IS_CHILD &&
if ((CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) && LINK_IS_CHILD &&
gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI) {
this->sheathDLists = &sPlayerDListGroups[this->sheathType][0];
}
@ -628,7 +628,7 @@ void Player_SetModels(Player* this, s32 modelGroup) {
this->leftHandType = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_LEFT_HAND];
this->leftHandDLists = &sPlayerDListGroups[this->leftHandType][gSaveContext.linkAge];
if (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) {
if (LINK_IS_CHILD &&
(this->leftHandType == PLAYER_MODELTYPE_LH_HAMMER ||
((this->leftHandType == PLAYER_MODELTYPE_LH_SWORD || this->leftHandType == PLAYER_MODELTYPE_LH_BGS) &&
@ -649,7 +649,7 @@ void Player_SetModels(Player* this, s32 modelGroup) {
this->rightHandType = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_RIGHT_HAND];
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][gSaveContext.linkAge];
if (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) {
if (LINK_IS_CHILD &&
(this->rightHandType == PLAYER_MODELTYPE_RH_HOOKSHOT ||
(this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD && this->currentShield == PLAYER_SHIELD_MIRROR))) {
@ -660,7 +660,7 @@ void Player_SetModels(Player* this, s32 modelGroup) {
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][1];
}
}
if ((CVarGetInteger("gBowSlingShotAmmoFix", 0) || CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && this->rightHandType == 11) { // If holding Bow/Slingshot
if ((CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), 0) || CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) && this->rightHandType == 11) { // If holding Bow/Slingshot
this->rightHandDLists = &sPlayerDListGroups[this->rightHandType][Player_HoldsSlingshot(this)];
}
@ -668,7 +668,7 @@ void Player_SetModels(Player* this, s32 modelGroup) {
this->sheathType = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_SHEATH];
this->sheathDLists = &sPlayerDListGroups[this->sheathType][gSaveContext.linkAge];
if (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) {
if (LINK_IS_CHILD &&
(this->currentShield == PLAYER_SHIELD_HYLIAN || this->currentShield == PLAYER_SHIELD_MIRROR) &&
((gSaveContext.equips.buttonItems[0] == ITEM_SWORD_MASTER) ||
@ -789,7 +789,7 @@ s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 y
s32 Player_GetStrength(void) {
s32 strengthUpgrade = CUR_UPG_VALUE(UPG_STRENGTH);
if (CVarGetInteger("gToggleStrength", 0) && CVarGetInteger("gStrengthDisabled", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("ToggleStrength"), 0) && CVarGetInteger(CVAR_ENHANCEMENT("StrengthDisabled"), 0)) {
return PLAYER_STR_NONE;
}
@ -953,9 +953,9 @@ s32 Player_GetEnvironmentalHazard(PlayState* play) {
triggerEntry = &sTextTriggers[var];
if ((triggerEntry->flag != 0) && !(gSaveContext.textTriggerFlags & triggerEntry->flag) &&
(((var == 0) && (this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0 && CVarGetInteger("gDisableTunicWarningText", 0) == 0)) ||
(((var == 0) && (this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0 && CVarGetInteger(CVAR_ENHANCEMENT("DisableTunicWarningText"), 0) == 0)) ||
(((var == 1) || (var == 3)) && (this->currentBoots == PLAYER_BOOTS_IRON) &&
(this->currentTunic != PLAYER_TUNIC_ZORA && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0 && CVarGetInteger("gDisableTunicWarningText", 0) == 0)))) {
(this->currentTunic != PLAYER_TUNIC_ZORA && CVarGetInteger(CVAR_CHEAT("SuperTunic"), 0) == 0 && CVarGetInteger(CVAR_ENHANCEMENT("DisableTunicWarningText"), 0) == 0)))) {
Message_StartTextbox(play, triggerEntry->textId, NULL);
gSaveContext.textTriggerFlags |= triggerEntry->flag;
}
@ -1068,14 +1068,14 @@ void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dL
Color_RGB8 sTemp;
color = &sTunicColors[tunic];
if (tunic == PLAYER_TUNIC_KOKIRI && CVarGetInteger("gCosmetics.Link_KokiriTunic.Changed", 0)) {
sTemp = CVarGetColor24("gCosmetics.Link_KokiriTunic.Value", sTunicColors[PLAYER_TUNIC_KOKIRI]);
if (tunic == PLAYER_TUNIC_KOKIRI && CVarGetInteger(CVAR_COSMETIC("Link.KokiriTunic.Changed"), 0)) {
sTemp = CVarGetColor24(CVAR_COSMETIC("Link.KokiriTunic.Value"), sTunicColors[PLAYER_TUNIC_KOKIRI]);
color = &sTemp;
} else if (tunic == PLAYER_TUNIC_GORON && CVarGetInteger("gCosmetics.Link_GoronTunic.Changed", 0)) {
sTemp = CVarGetColor24("gCosmetics.Link_GoronTunic.Value", sTunicColors[PLAYER_TUNIC_GORON]);
} else if (tunic == PLAYER_TUNIC_GORON && CVarGetInteger(CVAR_COSMETIC("Link.GoronTunic.Changed"), 0)) {
sTemp = CVarGetColor24(CVAR_COSMETIC("Link.GoronTunic.Value"), sTunicColors[PLAYER_TUNIC_GORON]);
color = &sTemp;
} else if (tunic == PLAYER_TUNIC_ZORA && CVarGetInteger("gCosmetics.Link_ZoraTunic.Changed", 0)) {
sTemp = CVarGetColor24("gCosmetics.Link_ZoraTunic.Value", sTunicColors[PLAYER_TUNIC_ZORA]);
} else if (tunic == PLAYER_TUNIC_ZORA && CVarGetInteger(CVAR_COSMETIC("Link.ZoraTunic.Changed"), 0)) {
sTemp = CVarGetColor24(CVAR_COSMETIC("Link.ZoraTunic.Value"), sTunicColors[PLAYER_TUNIC_ZORA]);
color = &sTemp;
}
@ -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) {
@ -1100,11 +1100,11 @@ void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dL
gDPPipeSync(POLY_OPA_DISP++);
color = &sGauntletColors[strengthUpgrade - 2];
if (strengthUpgrade == PLAYER_STR_SILVER_G && CVarGetInteger("gCosmetics.Gloves_SilverGauntlets.Changed", 0)) {
sTemp = CVarGetColor24("gCosmetics.Gloves_SilverGauntlets.Value", sGauntletColors[PLAYER_STR_SILVER_G - 2]);
if (strengthUpgrade == PLAYER_STR_SILVER_G && CVarGetInteger(CVAR_COSMETIC("Gloves.SilverGauntlets.Changed"), 0)) {
sTemp = CVarGetColor24(CVAR_COSMETIC("Gloves.SilverGauntlets.Value"), sGauntletColors[PLAYER_STR_SILVER_G - 2]);
color = &sTemp;
} else if (strengthUpgrade == PLAYER_STR_GOLD_G && CVarGetInteger("gCosmetics.Gloves_GoldenGauntlets.Changed", 0)) {
sTemp = CVarGetColor24("gCosmetics.Gloves_GoldenGauntlets.Value", sGauntletColors[PLAYER_STR_GOLD_G - 2]);
} else if (strengthUpgrade == PLAYER_STR_GOLD_G && CVarGetInteger(CVAR_COSMETIC("Gloves.GoldenGauntlets.Changed"), 0)) {
sTemp = CVarGetColor24(CVAR_COSMETIC("Gloves.GoldenGauntlets.Value"), sGauntletColors[PLAYER_STR_GOLD_G - 2]);
color = &sTemp;
}
gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 0);
@ -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)) {
@ -1310,8 +1310,8 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
}
if (limbIndex == PLAYER_LIMB_HEAD) {
if (CVarGetInteger("gCosmetics.Link_HeadScale.Changed", 0)) {
f32 scale = CVarGetFloat("gCosmetics.Link_HeadScale.Value", 1.0f);
if (CVarGetInteger(CVAR_COSMETIC("Link.HeadScale.Changed"), 0)) {
f32 scale = CVarGetFloat(CVAR_COSMETIC("Link.HeadScale.Value"), 1.0f);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
if (scale > 1.2f) {
Matrix_Translate(-((LINK_IS_ADULT ? 320.0f : 200.0f) * scale), 0.0f, 0.0f, MTXMODE_APPLY);
@ -1323,8 +1323,8 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
rot->y -= this->unk_6B8;
rot->z += this->unk_6B6;
} else if (limbIndex == PLAYER_LIMB_L_HAND) {
if (CVarGetInteger("gCosmetics.Link_SwordScale.Changed", 0)) {
f32 scale = CVarGetFloat("gCosmetics.Link_SwordScale.Value", 1.0f);
if (CVarGetInteger(CVAR_COSMETIC("Link.SwordScale.Changed"), 0)) {
f32 scale = CVarGetFloat(CVAR_COSMETIC("Link.SwordScale.Value"), 1.0f);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
Matrix_Translate(-((LINK_IS_ADULT ? 320.0f : 200.0f) * scale), 0.0f, 0.0f, MTXMODE_APPLY);
}
@ -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,13 +1682,13 @@ 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);
const Color_RGBA8 color = CVarGetColor(CVAR_COSMETIC("HookshotReticle.Target.Value"), defaultColor);
gDPSetPrimColor(WORLD_OVERLAY_DISP++, 0, 0, color.r, color.g, color.b, color.a);
} else {
const Color_RGBA8 defaultColor = { .r = 255, .g = 0, .b = 0, .a = 255 };
const Color_RGBA8 color = CVarGetColor("gCosmetics.HookshotReticle_NonTarget.Value", defaultColor);
const Color_RGBA8 color = CVarGetColor(CVAR_COSMETIC("HookshotReticle.NonTarget.Value"), defaultColor);
gDPSetPrimColor(WORLD_OVERLAY_DISP++, 0, 0, color.r, color.g, color.b, color.a);
}
gSPVertex(WORLD_OVERLAY_DISP++, (uintptr_t)gLinkAdultHookshotReticleVtx, 3, 0);
@ -1848,7 +1848,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
Matrix_Get(&this->shieldMf);
} else if ((this->rightHandType == PLAYER_MODELTYPE_RH_BOW_SLINGSHOT) || (this->rightHandType == PLAYER_MODELTYPE_RH_BOW_SLINGSHOT_2)) {
s32 stringModelToUse = gSaveContext.linkAge;
if (CVarGetInteger("gBowSlingShotAmmoFix", 0) || CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), 0) || CVarGetInteger(CVAR_ENHANCEMENT("EquimentAlwaysVisible"), 0)) {
stringModelToUse = Player_HoldsSlingshot(this);
}
BowStringData* stringData = &sBowStringData[stringModelToUse];
@ -1917,7 +1917,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
play, this, ((this->heldItemAction == PLAYER_IA_HOOKSHOT) ? 38600.0f : 77600.0f) * CVarGetFloat(CVAR_CHEAT("HookshotReachMultiplier"), 1.0f));
}
}
} else if (CVarGetInteger("gBowReticle", 0) && (
} else if (CVarGetInteger(CVAR_ENHANCEMENT("BowReticle"), 0) && (
(this->heldItemAction == PLAYER_IA_BOW_FIRE) ||
(this->heldItemAction == PLAYER_IA_BOW_ICE) ||
(this->heldItemAction == PLAYER_IA_BOW_LIGHT) ||
@ -2038,7 +2038,7 @@ s32 Player_OverrideLimbDrawPause(PlayState* play, s32 limbIndex, Gfx** dList, Ve
type = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_SHEATH];
if ((type == PLAYER_MODELTYPE_SHEATH_18) || (type == PLAYER_MODELTYPE_SHEATH_19)) {
dListOffset = playerSwordAndShield[1] * ptrSize;
} else if (type == PLAYER_MODELTYPE_SHEATH_16 && CVarGetInteger("gPauseLiveLink", 0)) {
} else if (type == PLAYER_MODELTYPE_SHEATH_16 && CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLink"), 0)) {
//if (playerSwordAndShield[0] == 1)
//dListOffset = 4;
}
@ -2122,7 +2122,7 @@ void Player_DrawPauseImpl(PlayState* play, void* seg04, void* seg06, SkelAnime*
playerSwordAndShield[0] = sword;
playerSwordAndShield[1] = shield;
Matrix_SetTranslateRotateYXZ(pos->x - ((CVarGetInteger("gPauseLiveLink", 0) && LINK_AGE_IN_YEARS == YEARS_ADULT) ? 25 : 0),
Matrix_SetTranslateRotateYXZ(pos->x - ((CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLink"), 0) && LINK_AGE_IN_YEARS == YEARS_ADULT) ? 25 : 0),
pos->y - (CVarGetInteger("gPauseTriforce", 0) ? 16 : 0), pos->z, rot);
Matrix_Scale(scale * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1), scale, scale, MTXMODE_APPLY);
@ -2176,8 +2176,8 @@ void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f*
Vec3s* srcTable;
s32 i;
bool canswitchrnd = false;
s16 SelectedMode = CVarGetInteger("gPauseLiveLink", 0);
MinFrameCount = CVarGetInteger("gMinFrameCount", 200);
s16 SelectedMode = CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLink"), 0);
MinFrameCount = CVarGetInteger(CVAR_ENHANCEMENT("MinFrameCount"), 200);
gSegments[4] = VIRTUAL_TO_PHYSICAL(segment + 0x3800);
gSegments[6] = VIRTUAL_TO_PHYSICAL(segment + 0x8800);
@ -2202,7 +2202,7 @@ void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f*
};
s16 AnimArraySize = ARRAY_COUNT(PauseMenuAnimSet);
if (CVarGetInteger("gPauseLiveLink", 0) || CVarGetInteger("gPauseTriforce", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLink"), 0) || CVarGetInteger("gPauseTriforce", 0)) {
uintptr_t anim = 0; // Initialise anim
if (CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) >= EQUIP_VALUE_SWORD_BIGGORON) {

View File

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

View File

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

View File

@ -196,12 +196,12 @@ void ArrowFire_Draw(Actor* thisx, PlayState* play2) {
Actor* tranform;
Color_RGB8 primaryColor = {255, 200, 0};
if (CVarGetInteger("gCosmetics.Arrows_FirePrimary.Changed", 0)) {
primaryColor = CVarGetColor24("gCosmetics.Arrows_FirePrimary.Value", primaryColor);
if (CVarGetInteger(CVAR_COSMETIC("Arrows.FirePrimary.Changed"), 0)) {
primaryColor = CVarGetColor24(CVAR_COSMETIC("Arrows.FirePrimary.Value"), primaryColor);
}
Color_RGB8 secondaryColor = {255, 0, 0};
if (CVarGetInteger("gCosmetics.Arrows_FireSecondary.Changed", 0)) {
secondaryColor = CVarGetColor24("gCosmetics.Arrows_FireSecondary.Value", secondaryColor);
if (CVarGetInteger(CVAR_COSMETIC("Arrows.FireSecondary.Changed"), 0)) {
secondaryColor = CVarGetColor24(CVAR_COSMETIC("Arrows.FireSecondary.Value"), secondaryColor);
}
stateFrames = play->state.frames;

View File

@ -197,12 +197,12 @@ void ArrowIce_Draw(Actor* thisx, PlayState* play) {
EnArrow* arrow = (EnArrow*)this->actor.parent;
Color_RGB8 primaryColor = {170, 255, 255};
if (CVarGetInteger("gCosmetics.Arrows_IcePrimary.Changed", 0)) {
primaryColor = CVarGetColor24("gCosmetics.Arrows_IcePrimary.Value", primaryColor);
if (CVarGetInteger(CVAR_COSMETIC("Arrows.IcePrimary.Changed"), 0)) {
primaryColor = CVarGetColor24(CVAR_COSMETIC("Arrows.IcePrimary.Value"), primaryColor);
}
Color_RGB8 secondaryColor = {0, 0, 255};
if (CVarGetInteger("gCosmetics.Arrows_IceSecondary.Changed", 0)) {
secondaryColor = CVarGetColor24("gCosmetics.Arrows_IceSecondary.Value", secondaryColor);
if (CVarGetInteger(CVAR_COSMETIC("Arrows.IceSecondary.Changed"), 0)) {
secondaryColor = CVarGetColor24(CVAR_COSMETIC("Arrows.IceSecondary.Value"), secondaryColor);
}
if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) {

View File

@ -195,12 +195,12 @@ void ArrowLight_Draw(Actor* thisx, PlayState* play) {
Actor* tranform;
Color_RGB8 primaryColor = {255, 255, 170};
if (CVarGetInteger("gCosmetics.Arrows_LightPrimary.Changed", 0)) {
primaryColor = CVarGetColor24("gCosmetics.Arrows_LightPrimary.Value", primaryColor);
if (CVarGetInteger(CVAR_COSMETIC("Arrows.LightPrimary.Changed"), 0)) {
primaryColor = CVarGetColor24(CVAR_COSMETIC("Arrows.LightPrimary.Value"), primaryColor);
}
Color_RGB8 secondaryColor = {255, 255, 0};
if (CVarGetInteger("gCosmetics.Arrows_LightSecondary.Changed", 0)) {
secondaryColor = CVarGetColor24("gCosmetics.Arrows_LightSecondary.Value", secondaryColor);
if (CVarGetInteger(CVAR_COSMETIC("Arrows.LightSecondary.Changed"), 0)) {
secondaryColor = CVarGetColor24(CVAR_COSMETIC("Arrows.LightSecondary.Value"), secondaryColor);
}
if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) {

View File

@ -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);

View File

@ -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)) {

View File

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

View File

@ -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 {

View File

@ -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);

View File

@ -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);

View File

@ -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
@ -461,8 +461,8 @@ void BgIceShelter_Draw(Actor* thisx, PlayState* play2) {
break;
}
if (CVarGetInteger("gCosmetics.World_RedIce.Changed", 0)) {
Color_RGB8 color = CVarGetColor24("gCosmetics.World_RedIce.Value", (Color_RGB8){ 255, 0, 0});
if (CVarGetInteger(CVAR_COSMETIC("World.RedIce.Changed"), 0)) {
Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("World.RedIce.Value"), (Color_RGB8){ 255, 0, 0});
gDPSetEnvColor(POLY_XLU_DISP++, color.r, color.g, color.b, this->alpha);
} else {
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, this->alpha);

View File

@ -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) {

View File

@ -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 &&

View File

@ -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);

View File

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

View File

@ -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) {

View File

@ -60,8 +60,8 @@ void func_808AAA50(BgSpot01Fusya* this, PlayState* play) {
f32 temp;
Actor* thisx = &this->actor;
if (CVarGetInteger("gCosmetics.Kak_Windmill_Speed.Changed", 0)) {
this->unk_158 = CVarGetFloat("gCosmetics.Kak_Windmill_Speed.Value", 100.0f);
if (CVarGetInteger(CVAR_COSMETIC("Kak.Windmill_Speed.Changed"), 0)) {
this->unk_158 = CVarGetFloat(CVAR_COSMETIC("Kak.Windmill_Speed.Value"), 100.0f);
} else {
this->unk_158 = 100.0f;
}

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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);
}

View File

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

View File

@ -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);

View File

@ -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) {

View File

@ -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;

View File

@ -84,46 +84,46 @@ void EnArrow_Init(Actor* thisx, PlayState* play) {
};
EnArrow* this = (EnArrow*)thisx;
if (CVarGetInteger("gCosmetics.Arrows_NormalPrimary.Changed", 0)) {
blureNormal.altEnvColor = CVarGetColor("gCosmetics.Arrows_NormalPrimary.Value", (Color_RGBA8){ 0, 150, 0, 0 });
if (CVarGetInteger(CVAR_COSMETIC("Arrows.NormalPrimary.Changed"), 0)) {
blureNormal.altEnvColor = CVarGetColor(CVAR_COSMETIC("Arrows.NormalPrimary.Value"), (Color_RGBA8){ 0, 150, 0, 0 });
} else {
blureNormal.altEnvColor = (Color_RGBA8){ 0, 150, 0, 0 };
}
if (CVarGetInteger("gCosmetics.Arrows_NormalSecondary.Changed", 0)) {
blureNormal.altPrimColor = CVarGetColor("gCosmetics.Arrows_NormalSecondary.Value", (Color_RGBA8){ 255, 255, 170, 255 });
if (CVarGetInteger(CVAR_COSMETIC("Arrows.NormalSecondary.Changed"), 0)) {
blureNormal.altPrimColor = CVarGetColor(CVAR_COSMETIC("Arrows.NormalSecondary.Value"), (Color_RGBA8){ 255, 255, 170, 255 });
} else {
blureNormal.altPrimColor = (Color_RGBA8){ 255, 255, 170, 255 };
}
if (CVarGetInteger("gCosmetics.Arrows_FirePrimary.Changed", 0)) {
blureFire.altEnvColor = CVarGetColor("gCosmetics.Arrows_FirePrimary.Value", (Color_RGBA8){ 255, 200, 0, 0 });
if (CVarGetInteger(CVAR_COSMETIC("Arrows.FirePrimary.Changed"), 0)) {
blureFire.altEnvColor = CVarGetColor(CVAR_COSMETIC("Arrows.FirePrimary.Value"), (Color_RGBA8){ 255, 200, 0, 0 });
} else {
blureFire.altEnvColor = (Color_RGBA8){ 255, 200, 0, 0 };
}
if (CVarGetInteger("gCosmetics.Arrows_FireSecondary.Changed", 0)) {
blureFire.altPrimColor = CVarGetColor("gCosmetics.Arrows_FireSecondary.Value", (Color_RGBA8){ 255, 0, 0, 255 });
if (CVarGetInteger(CVAR_COSMETIC("Arrows.FireSecondary.Changed"), 0)) {
blureFire.altPrimColor = CVarGetColor(CVAR_COSMETIC("Arrows.FireSecondary.Value"), (Color_RGBA8){ 255, 0, 0, 255 });
} else {
blureFire.altPrimColor = (Color_RGBA8){ 255, 0, 0, 255 };
}
if (CVarGetInteger("gCosmetics.Arrows_IcePrimary.Changed", 0)) {
blureIce.altEnvColor = CVarGetColor("gCosmetics.Arrows_IcePrimary.Value", (Color_RGBA8){ 0, 0, 255, 255 });
if (CVarGetInteger(CVAR_COSMETIC("Arrows.IcePrimary.Changed"), 0)) {
blureIce.altEnvColor = CVarGetColor(CVAR_COSMETIC("Arrows.IcePrimary.Value"), (Color_RGBA8){ 0, 0, 255, 255 });
} else {
blureIce.altEnvColor = (Color_RGBA8){ 0, 0, 255, 255 };
}
if (CVarGetInteger("gCosmetics.Arrows_IceSecondary.Changed", 0)) {
blureIce.altPrimColor = CVarGetColor("gCosmetics.Arrows_IceSecondary.Value", (Color_RGBA8){ 170, 255, 255, 0 });
if (CVarGetInteger(CVAR_COSMETIC("Arrows.IceSecondary.Changed"), 0)) {
blureIce.altPrimColor = CVarGetColor(CVAR_COSMETIC("Arrows.IceSecondary.Value"), (Color_RGBA8){ 170, 255, 255, 0 });
} else {
blureIce.altPrimColor = (Color_RGBA8){ 170, 255, 255, 0 };
}
if (CVarGetInteger("gCosmetics.Arrows_LightPrimary.Changed", 0)) {
blureLight.altEnvColor = CVarGetColor("gCosmetics.Arrows_LightPrimary.Value", (Color_RGBA8){ 255, 255, 0, 255 });
if (CVarGetInteger(CVAR_COSMETIC("Arrows.LightPrimary.Changed"), 0)) {
blureLight.altEnvColor = CVarGetColor(CVAR_COSMETIC("Arrows.LightPrimary.Value"), (Color_RGBA8){ 255, 255, 0, 255 });
} else {
blureLight.altEnvColor = (Color_RGBA8){ 255, 255, 0, 255 };
}
if (CVarGetInteger("gCosmetics.Arrows_LightSecondary.Changed", 0)) {
blureLight.altPrimColor = CVarGetColor("gCosmetics.Arrows_LightSecondary.Value", (Color_RGBA8){ 255, 255, 170, 0 });
if (CVarGetInteger(CVAR_COSMETIC("Arrows.LightSecondary.Changed"), 0)) {
blureLight.altPrimColor = CVarGetColor(CVAR_COSMETIC("Arrows.LightSecondary.Value"), (Color_RGBA8){ 255, 255, 170, 0 });
} else {
blureLight.altPrimColor = (Color_RGBA8){ 255, 255, 170, 0 };
}

View File

@ -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++;

View File

@ -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);

View File

@ -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;

View File

@ -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;
}
@ -515,8 +515,8 @@ void EnBomChu_Draw(Actor* thisx, PlayState* play) {
colorIntensity = blinkTime / (f32)blinkHalfPeriod;
if (CVarGetInteger("gCosmetics.Equipment_ChuBody.Changed", 0)) {
Color_RGB8 color = CVarGetColor24("gCosmetics.Equipment_ChuBody.Value", (Color_RGB8){ 209.0f, 34.0f, -35.0f });
if (CVarGetInteger(CVAR_COSMETIC("Equipment.ChuBody.Changed"), 0)) {
Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("Equipment.ChuBody.Value"), (Color_RGB8){ 209.0f, 34.0f, -35.0f });
gDPSetEnvColor(POLY_OPA_DISP++, (colorIntensity * color.r), (colorIntensity * color.g),
(colorIntensity * color.b), 255);
} else {

View File

@ -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)) ||

View File

@ -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) &&

View File

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

View File

@ -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);

View File

@ -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;
}
@ -500,11 +500,11 @@ void EnDog_Draw(Actor* thisx, PlayState* play) {
EnDog* this = (EnDog*)thisx;
Color_RGB8 colors[] = { { 255, 255, 200 }, { 150, 100, 50 } };
if (CVarGetInteger("gCosmetics.NPC_Dog1.Changed", 0)) {
colors[0] = CVarGetColor24("gCosmetics.NPC_Dog1.Value", colors[0]);
if (CVarGetInteger(CVAR_COSMETIC("NPC.Dog1.Changed"), 0)) {
colors[0] = CVarGetColor24(CVAR_COSMETIC("NPC.Dog1.Value"), colors[0]);
}
if (CVarGetInteger("gCosmetics.NPC_Dog2.Changed", 0)) {
colors[1] = CVarGetColor24("gCosmetics.NPC_Dog2.Value", colors[1]);
if (CVarGetInteger(CVAR_COSMETIC("NPC.Dog2.Changed"), 0)) {
colors[1] = CVarGetColor24(CVAR_COSMETIC("NPC.Dog2.Value"), colors[1]);
}
OPEN_DISPS(play->state.gfxCtx);

View File

@ -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);

View File

@ -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 {

View File

@ -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
@ -1486,7 +1486,7 @@ s32 EnElf_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
if (this->fairyFlags & FAIRY_FLAG_BIG) {
scale *= 2.0f;
}
scale *= CVarGetFloat("gCosmetics.Fairies_Size", 1.0f);
scale *= CVarGetFloat(CVAR_COSMETIC("Fairies.Size"), 1.0f);
scale *= (this->actor.scale.x * 124.99999f);
Matrix_MultVec3f(&zeroVec, &mtxMult);

View File

@ -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;

View File

@ -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);
@ -398,24 +398,24 @@ void EnExRuppy_Draw(Actor* thisx, PlayState* play) {
u8 shouldColor = 0;
switch (this->colorIdx) {
case 0:
rupeeColor = CVarGetColor24("gCosmetics.Consumable_GreenRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_GreenRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.GreenRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.GreenRupee.Changed"), 0);
break;
case 1:
rupeeColor = CVarGetColor24("gCosmetics.Consumable_BlueRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_BlueRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.BlueRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.BlueRupee.Changed"), 0);
break;
case 2:
rupeeColor = CVarGetColor24("gCosmetics.Consumable_RedRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_RedRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.RedRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.RedRupee.Changed"), 0);
break;
case 4: // orange rupee texture corresponds to the purple rupee (authentic bug)
rupeeColor = CVarGetColor24("gCosmetics.Consumable_PurpleRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_PurpleRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.PurpleRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.PurpleRupee.Changed"), 0);
break;
case 3: // pink rupee texture corresponds to the gold rupee (authentic bug)
rupeeColor = CVarGetColor24("gCosmetics.Consumable_GoldRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_GoldRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.GoldRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.GoldRupee.Changed"), 0);
break;
}

View File

@ -742,10 +742,10 @@ void EnFirefly_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
static Color_RGBA8 fireAuraEnvColor = { 255, 50, 0, 0 };
static Color_RGBA8 iceAuraPrimColor = { 100, 200, 255, 255 };
static Color_RGBA8 iceAuraEnvColor = { 0, 0, 255, 0 };
Color_RGBA8 customFireAuraPrimColor = CVarGetColor("gCosmetics.NPC_FireKeesePrimary.Value", fireAuraPrimColor);
Color_RGBA8 customFireAuraEnvColor = CVarGetColor("gCosmetics.NPC_FireKeeseSecondary.Value", fireAuraEnvColor);
Color_RGBA8 customIceAuraPrimColor = CVarGetColor("gCosmetics.NPC_IceKeesePrimary.Value", iceAuraPrimColor);
Color_RGBA8 customIceAuraEnvColor = CVarGetColor("gCosmetics.NPC_IceKeeseSecondary.Value", iceAuraEnvColor);
Color_RGBA8 customFireAuraPrimColor = CVarGetColor(CVAR_COSMETIC("NPC.FireKeesePrimary.Value"), fireAuraPrimColor);
Color_RGBA8 customFireAuraEnvColor = CVarGetColor(CVAR_COSMETIC("NPC.FireKeeseSecondary.Value"), fireAuraEnvColor);
Color_RGBA8 customIceAuraPrimColor = CVarGetColor(CVAR_COSMETIC("NPC.IceKeesePrimary.Value"), iceAuraPrimColor);
Color_RGBA8 customIceAuraEnvColor = CVarGetColor(CVAR_COSMETIC("NPC.IceKeeseSecondary.Value"), iceAuraEnvColor);
static Vec3f effVelocity = { 0.0f, 0.5f, 0.0f };
static Vec3f effAccel = { 0.0f, 0.5f, 0.0f };
static Vec3f limbSrc = { 0.0f, 0.0f, 0.0f };
@ -785,23 +785,23 @@ void EnFirefly_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
}
if (this->auraType == KEESE_AURA_FIRE) {
if (CVarGetInteger("gCosmetics.NPC_FireKeesePrimary.Changed", 0)) {
if (CVarGetInteger(CVAR_COSMETIC("NPC.FireKeesePrimary.Changed"), 0)) {
effPrimColor = &customFireAuraPrimColor;
} else {
effPrimColor = &fireAuraPrimColor;
}
if (CVarGetInteger("gCosmetics.NPC_FireKeeseSecondary.Changed", 0)) {
if (CVarGetInteger(CVAR_COSMETIC("NPC.FireKeeseSecondary.Changed"), 0)) {
effEnvColor = &customFireAuraEnvColor;
} else {
effEnvColor = &fireAuraEnvColor;
}
} else {
if (CVarGetInteger("gCosmetics.NPC_IceKeesePrimary.Changed", 0)) {
if (CVarGetInteger(CVAR_COSMETIC("NPC.IceKeesePrimary.Changed"), 0)) {
effPrimColor = &customIceAuraPrimColor;
} else {
effPrimColor = &iceAuraPrimColor;
}
if (CVarGetInteger("gCosmetics.NPC_IceKeeseSecondary.Changed", 0)) {
if (CVarGetInteger(CVAR_COSMETIC("NPC.IceKeeseSecondary.Changed"), 0)) {
effEnvColor = &customIceAuraEnvColor;
} else {
effEnvColor = &iceAuraEnvColor;

View File

@ -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);
@ -488,7 +488,7 @@ void EnGSwitch_DrawRupee(Actor* thisx, PlayState* play) {
if (this->type == ENGSWITCH_TARGET_RUPEE) {
GetItem_Draw(play, sRupeeTexturesNew[this->colorIdx]);
} else {
Color_RGB8 silverRupeeColor = CVarGetColor24("gCosmetics.Consumable_SilverRupee.Value", (Color_RGB8){ 255, 255, 255 });
Color_RGB8 silverRupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.SilverRupee.Value"), (Color_RGB8){ 255, 255, 255 });
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD);
@ -507,28 +507,28 @@ void EnGSwitch_DrawRupee(Actor* thisx, PlayState* play) {
u8 shouldColor = 0;
switch (this->colorIdx) {
case 0:
rupeeColor = CVarGetColor24("gCosmetics.Consumable_GreenRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_GreenRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.GreenRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.GreenRupee.Changed"), 0);
break;
case 1:
rupeeColor = CVarGetColor24("gCosmetics.Consumable_BlueRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_BlueRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.BlueRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.BlueRupee.Changed"), 0);
break;
case 2:
rupeeColor = CVarGetColor24("gCosmetics.Consumable_RedRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_RedRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.RedRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.RedRupee.Changed"), 0);
break;
case 4: // orange rupee texture corresponds to the purple rupee (authentic bug)
rupeeColor = CVarGetColor24("gCosmetics.Consumable_PurpleRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_PurpleRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.PurpleRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.PurpleRupee.Changed"), 0);
break;
case 3: // pink rupee texture corresponds to the gold rupee (authentic bug)
rupeeColor = CVarGetColor24("gCosmetics.Consumable_GoldRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_GoldRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.GoldRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.GoldRupee.Changed"), 0);
break;
case 5:
rupeeColor = CVarGetColor24("gCosmetics.Consumable_SilverRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_SilverRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.SilverRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.SilverRupee.Changed"), 0);
break;
}
@ -635,28 +635,28 @@ void EnGSwitch_DrawEffects(EnGSwitch* this, PlayState* play) {
u8 shouldColor = 0;
switch (effect->colorIdx) {
case 0:
rupeeColor = CVarGetColor24("gCosmetics.Consumable_GreenRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_GreenRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.GreenRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.GreenRupee.Changed"), 0);
break;
case 1:
rupeeColor = CVarGetColor24("gCosmetics.Consumable_BlueRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_BlueRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.BlueRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.BlueRupee.Changed"), 0);
break;
case 2:
rupeeColor = CVarGetColor24("gCosmetics.Consumable_RedRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_RedRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.RedRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.RedRupee.Changed"), 0);
break;
case 3:
rupeeColor = CVarGetColor24("gCosmetics.Consumable_PurpleRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_PurpleRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.PurpleRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.PurpleRupee.Changed"), 0);
break;
case 4:
rupeeColor = CVarGetColor24("gCosmetics.Consumable_GoldRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_GoldRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.GoldRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.GoldRupee.Changed"), 0);
break;
case 5:
rupeeColor = CVarGetColor24("gCosmetics.Consumable_SilverRupee.Value", (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger("gCosmetics.Consumable_SilverRupee.Changed", 0);
rupeeColor = CVarGetColor24(CVAR_COSMETIC("Consumable.SilverRupee.Value"), (Color_RGB8){ 255, 255, 255 });
shouldColor = CVarGetInteger(CVAR_COSMETIC("Consumable.SilverRupee.Changed"), 0);
break;
}

View File

@ -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) {

View File

@ -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;

View File

@ -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;

View File

@ -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;
@ -2134,7 +2134,7 @@ s32 EnGo2_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, V
f32 float1;
if (limb == 17) {
Matrix_Translate(2800.0f + CVarGetFloat("gCosmetics.Goron_NeckLength", 0.0f), 0.0f, 0.0f, MTXMODE_APPLY);
Matrix_Translate(2800.0f + CVarGetFloat(CVAR_COSMETIC("Goron.NeckLength"), 0.0f), 0.0f, 0.0f, MTXMODE_APPLY);
vec1 = this->interactInfo.headRot;
float1 = (vec1.y / (f32)0x8000) * M_PI;
Matrix_RotateX(float1, MTXMODE_APPLY);

View File

@ -594,8 +594,8 @@ void EnGs_Draw(Actor* thisx, PlayState* play) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->flashColor.r, this->flashColor.g, this->flashColor.b,
this->flashColor.a);
} else {
if (CVarGetInteger("gCosmetics.World_GossipStone.Changed", 0)) {
Color_RGB8 color = CVarGetColor24("gCosmetics.World_GossipStone.Value", (Color_RGB8){255, 255, 255});
if (CVarGetInteger(CVAR_COSMETIC("World.GossipStone.Changed"), 0)) {
Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("World.GossipStone.Value"), (Color_RGB8){255, 255, 255});
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, color.r, color.g, color.b, 255);
} else {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255);

View File

@ -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;

View File

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

View File

@ -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);
@ -810,8 +810,8 @@ Gfx* func_80A761B0(GraphicsContext* gfxCtx, u8 primR, u8 primG, u8 primB, u8 env
displayListHead = displayList;
gDPPipeSync(displayListHead++);
if (CVarGetInteger("gCosmetics.NPC_IronKnuckles.Changed", 0)) {
Color_RGB8 color = CVarGetColor24("gCosmetics.NPC_IronKnuckles.Value", (Color_RGB8){primR, primG, primB});
if (CVarGetInteger(CVAR_COSMETIC("NPC.IronKnuckles.Changed"), 0)) {
Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("NPC.IronKnuckles.Value"), (Color_RGB8){primR, primG, primB});
gDPSetPrimColor(displayListHead++, 0, 0, color.r, color.g, color.b, 255);
} else {
gDPSetPrimColor(displayListHead++, 0, 0, primR, primG, primB, 255);
@ -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;
}
}

View File

@ -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) &&

View File

@ -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;
@ -1379,9 +1379,9 @@ void EnKo_Draw(Actor* thisx, PlayState* play) {
Color_RGBA8 tunicColor = sModelInfo[ENKO_TYPE].tunicColor;
Color_RGBA8 bootsColor = sModelInfo[ENKO_TYPE].bootsColor;
if (CVarGetInteger("gCosmetics.NPC_Kokiri.Changed", 0)) {
tunicColor = CVarGetColor("gCosmetics.NPC_Kokiri.Value", sModelInfo[ENKO_TYPE].tunicColor);
bootsColor = CVarGetColor("gCosmetics.NPC_Kokiri.Value", sModelInfo[ENKO_TYPE].bootsColor);
if (CVarGetInteger(CVAR_COSMETIC("NPC.Kokiri.Changed"), 0)) {
tunicColor = CVarGetColor(CVAR_COSMETIC("NPC.Kokiri.Value"), sModelInfo[ENKO_TYPE].tunicColor);
bootsColor = CVarGetColor(CVAR_COSMETIC("NPC.Kokiri.Value"), sModelInfo[ENKO_TYPE].bootsColor);
}
this->actor.shape.shadowAlpha = this->modelAlpha;

View File

@ -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) {

Some files were not shown because too many files have changed in this diff Show More