Merge branch 'develop' of github.com:Malkierian/Shipwright into dev-to-rando-5-5

This commit is contained in:
Malkierian
2024-05-05 22:05:10 -07:00
339 changed files with 7337 additions and 10809 deletions
+1
View File
@@ -4,6 +4,7 @@ const char gBuildVersion[] = "@PROJECT_BUILD_NAME@ (@CMAKE_PROJECT_VERSION_MAJOR
const u16 gBuildVersionMajor = @CMAKE_PROJECT_VERSION_MAJOR@;
const u16 gBuildVersionMinor = @CMAKE_PROJECT_VERSION_MINOR@;
const u16 gBuildVersionPatch = @CMAKE_PROJECT_VERSION_PATCH@;
const char gBuildTeam[] = "@PROJECT_TEAM@";
const char gBuildDate[] = __DATE__ " " __TIME__;
const char gBuildMakeOption[] = "";
-14
View File
@@ -1,14 +0,0 @@
#define VER_FILEVERSION @CMAKE_PROJECT_VERSION_MAJOR@, @CMAKE_PROJECT_VERSION_MINOR@, @CMAKE_PROJECT_VERSION_PATCH@, 0
#define VER_FILEVERSION_STR "@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@.@CMAKE_PROJECT_VERSION_PATCH@\0"
#define VER_PRODUCTVERSION @CMAKE_PROJECT_VERSION_MAJOR@, @CMAKE_PROJECT_VERSION_MINOR@, @CMAKE_PROJECT_VERSION_PATCH@, 0
#define VER_PRODUCTVERSION_str "@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@.@CMAKE_PROJECT_VERSION_PATCH@\0"
#define VER_COMPANYNAME_STR "@PROJECT_TEAM@\0"
#define VER_PRODUCTNAME_STR "Ship of Harkinian\0"
#define VER_INTERNALNAME_STR "@PROJECT_NAME@\0"
#define VER_ORIGINALFILENAME_STR "@PROJECT_NAME@.exe\0"
#define VER_FILEDESCRIPTION_STR "Ship of Harkinian - @PROJECT_BUILD_NAME@\0"
+4 -4
View File
@@ -109,10 +109,10 @@ void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, SchedCon
Audio_InitSound();
osSendMesgPtr(&audioMgr->unk_C8, NULL, OS_MESG_BLOCK);
Audio_SetGameVolume(SEQ_PLAYER_BGM_MAIN, CVarGetFloat("gMainMusicVolume", 1.0f));
Audio_SetGameVolume(SEQ_PLAYER_BGM_SUB, CVarGetFloat("gSubMusicVolume", 1.0f));
Audio_SetGameVolume(SEQ_PLAYER_FANFARE, CVarGetFloat("gFanfareVolume", 1.0f));
Audio_SetGameVolume(SEQ_PLAYER_SFX, CVarGetFloat("gSFXMusicVolume", 1.0f));
Audio_SetGameVolume(SEQ_PLAYER_BGM_MAIN, CVarGetFloat(CVAR_SETTING("Volume.MainMusic"), 1.0f));
Audio_SetGameVolume(SEQ_PLAYER_BGM_SUB, CVarGetFloat(CVAR_SETTING("Volume.SubMusic"), 1.0f));
Audio_SetGameVolume(SEQ_PLAYER_FANFARE, CVarGetFloat(CVAR_SETTING("Volume.Fanfare"), 1.0f));
Audio_SetGameVolume(SEQ_PLAYER_SFX, CVarGetFloat(CVAR_SETTING("Volume.SFX"), 1.0f));
// Removed due to crash
//IrqMgr_AddClient(audioMgr->irqMgr, &irqClient, &audioMgr->unk_74);
+2 -2
View File
@@ -632,7 +632,7 @@ s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) {
// Keep track of the previous sequence/scene so we don't repeat notifications
static uint16_t previousSeqId = UINT16_MAX;
static int16_t previousSceneNum = INT16_MAX;
if (CVarGetInteger("gSeqNameOverlay", 0) &&
if (CVarGetInteger(CVAR_AUDIO("SeqNameOverlay"), 0) &&
playerIdx == SEQ_PLAYER_BGM_MAIN &&
(seqId != previousSeqId || (gPlayState != NULL && gPlayState->sceneNum != previousSceneNum))) {
@@ -642,7 +642,7 @@ s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) {
}
const char* sequenceName = AudioCollection_GetSequenceName(seqId);
if (sequenceName != NULL) {
Overlay_DisplayText_Seconds(CVarGetInteger("gSeqNameOverlayDuration", 5), sequenceName);
Overlay_DisplayText_Seconds(CVarGetInteger(CVAR_AUDIO("SeqNameOverlayDuration"), 5), sequenceName);
}
}
}
+2 -2
View File
@@ -94,7 +94,7 @@ void Audio_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* attrs) {
vel = 0.0f > vel ? 0.0f : vel;
vel = 1.0f < vel ? 1.0f : vel;
float master_vol = CVarGetFloat("gGameMasterVolume", 1.0f);
float master_vol = CVarGetFloat(CVAR_SETTING("Volume.Master"), 1.0f);
sub->targetVolLeft = (s32)((vel * volLeft) * (0x1000 - 0.001f)) * master_vol;
sub->targetVolRight = (s32)((vel * volRight) * (0x1000 - 0.001f)) * master_vol;
@@ -120,7 +120,7 @@ void Audio_NoteSetResamplingRate(NoteSubEu* noteSubEu, f32 resamplingRateInput)
} else {
noteSubEu->bitField1.hasTwoParts = true;
if (3.99996f < resamplingRateInput) {
if (CVarGetInteger("gExperimentalOctaveDrop", 0)) {
if (CVarGetInteger(CVAR_AUDIO("ExperimentalOctaveDrop"), 0)) {
resamplingRate = resamplingRateInput * 0.25;
} else {
resamplingRate = 1.99998f;
+1 -1
View File
@@ -653,7 +653,7 @@ Acmd* AudioSynth_DoOneAudioUpdate(s16* aiBuf, s32 aiBufLen, Acmd* cmd, s32 updat
}
updateIndex = aiBufLen * 2;
if (CVarGetInteger("gMirroredWorld", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
aInterleave(cmd++, DMEM_TEMP, DMEM_RIGHT_CH, DMEM_LEFT_CH, updateIndex);
} else {
aInterleave(cmd++, DMEM_TEMP, DMEM_LEFT_CH, DMEM_RIGHT_CH, updateIndex);
+1 -1
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) {
+21 -21
View File
@@ -1259,11 +1259,11 @@ void Audio_PlayFanfare_Rando(GetItemEntry getItem);
// Function originally not called, so repurposing for control mapping
void Audio_OcaUpdateBtnMap(bool customControls, bool dpad, bool rStick) {
if (customControls) {
sOcarinaD5BtnMap = CVarGetInteger("gOcarinaD5BtnMap", BTN_CUP);
sOcarinaB4BtnMap = CVarGetInteger("gOcarinaB4BtnMap", BTN_CLEFT);
sOcarinaA4BtnMap = CVarGetInteger("gOcarinaA4BtnMap", BTN_CRIGHT);
sOcarinaF4BtnMap = CVarGetInteger("gOcarinaF4BtnMap", BTN_CDOWN);
sOcarinaD4BtnMap = CVarGetInteger("gOcarinaD4BtnMap", BTN_A);
sOcarinaD5BtnMap = CVarGetInteger(CVAR_SETTING("CustomOcarina.D5Button"), BTN_CUP);
sOcarinaB4BtnMap = CVarGetInteger(CVAR_SETTING("CustomOcarina.B4Button"), BTN_CLEFT);
sOcarinaA4BtnMap = CVarGetInteger(CVAR_SETTING("CustomOcarina.A4Button"), BTN_CRIGHT);
sOcarinaF4BtnMap = CVarGetInteger(CVAR_SETTING("CustomOcarina.F4Button"), BTN_CDOWN);
sOcarinaD4BtnMap = CVarGetInteger(CVAR_SETTING("CustomOcarina.D4Button"), BTN_A);
} else {
sOcarinaD5BtnMap = BTN_CUP;
sOcarinaB4BtnMap = BTN_CLEFT;
@@ -1540,8 +1540,8 @@ void func_800ED200(void) {
u8 k;
u32 disableSongBtnMap;
if (CVarGetInteger("gCustomOcarinaControls", 0)) {
disableSongBtnMap = CVarGetInteger("gOcarinaDisableBtnMap", BTN_L);
if (CVarGetInteger(CVAR_SETTING("CustomOcarina.Enabled"), 0)) {
disableSongBtnMap = CVarGetInteger(CVAR_SETTING("CustomOcarina.DisableButton"), BTN_L);
} else {
disableSongBtnMap = BTN_L;
}
@@ -1602,13 +1602,13 @@ void func_800ED200(void) {
void func_800ED458(s32 arg0) {
u32 phi_v1_2;
bool customControls = CVarGetInteger("gCustomOcarinaControls", 0);
bool dpad = CVarGetInteger("gDpadOcarina", 0);
bool rStick = CVarGetInteger("gRStickOcarina", 0);
bool customControls = CVarGetInteger(CVAR_SETTING("CustomOcarina.Enabled"), 0);
bool dpad = CVarGetInteger(CVAR_SETTING("OcarinaControl.Dpad"), 0);
bool rStick = CVarGetInteger(CVAR_SETTING("OcarinaControl.RStick"), 0);
if (D_80130F3C != 0 && sOcarinaDropInputTimer != 0) {
sOcarinaDropInputTimer--;
if (!CVarGetInteger("gDpadNoDropOcarinaInput", 0)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("DpadNoDropOcarinaInput"), 0)) {
return;
}
}
@@ -1650,7 +1650,7 @@ void func_800ED458(s32 arg0) {
u32 noteSharpBtnMap;
if (customControls) {
noteSharpBtnMap = CVarGetInteger("gOcarinaSharpBtnMap", BTN_R);
noteSharpBtnMap = CVarGetInteger(CVAR_SETTING("CustomOcarina.SharpButton"), BTN_R);
} else {
noteSharpBtnMap = BTN_R;
}
@@ -1661,7 +1661,7 @@ void func_800ED458(s32 arg0) {
u32 noteFlatBtnMap;
if (customControls) {
noteFlatBtnMap = CVarGetInteger("gOcarinaFlatBtnMap", BTN_Z);
noteFlatBtnMap = CVarGetInteger(CVAR_SETTING("CustomOcarina.FlatButton"), BTN_Z);
} else {
noteFlatBtnMap = BTN_Z;
}
@@ -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;
@@ -4025,7 +4025,7 @@ void Audio_PlayFanfare_Rando(GetItemEntry getItem) {
temp1 = NA_BGM_SMALL_ITEM_GET | 0x900;
}
// If the setting is toggled on and we get special quest items (longer fanfares):
if (CVarGetInteger("gRandoQuestItemFanfares", 0) != 0) {
if (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("QuestItemFanfares"), 0) != 0) {
// If we get a medallion, play the "get a medallion" fanfare
if ((itemId >= ITEM_MEDALLION_FOREST) && (itemId <= ITEM_MEDALLION_LIGHT)) {
temp1 = NA_BGM_MEDALLION_GET | 0x900;
+6 -6
View File
@@ -14,7 +14,7 @@ FaultClient sGameFaultClient;
u16 sLastButtonPressed;
// Forward declared, because this in a C++ header.
int gfx_create_framebuffer(uint32_t width, uint32_t height);
int gfx_create_framebuffer(uint32_t width, uint32_t height, uint32_t native_width, uint32_t native_height, uint8_t resize);
void gfx_texture_cache_clear();
@@ -93,7 +93,7 @@ void func_800C4344(GameState* gameState) {
HREG(95) = CHECK_BTN_ALL(selectedInput->press.button, hReg82);
}
if (CVarGetInteger("gRegEditEnabled", 0) || gIsCtrlr2Valid) {
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("RegEditEnabled"), 0) || gIsCtrlr2Valid) {
func_8006390C(&gameState->input[1]);
}
@@ -162,7 +162,7 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) {
}
sLastButtonPressed = gameState->input[0].press.button | gameState->input[0].cur.button;
if (R_DISABLE_INPUT_DISPLAY == 0 && CVarGetInteger("gDebugEnabled", 0)) {
if (R_DISABLE_INPUT_DISPLAY == 0 && CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) {
GameState_DrawInputDisplay(sLastButtonPressed, &newDList);
}
@@ -247,7 +247,7 @@ void GameState_Update(GameState* gameState) {
if (fbTest == -1)
{
fbTest = gfx_create_framebuffer(64, 112);
fbTest = gfx_create_framebuffer(64, 112, SCREEN_WIDTH, SCREEN_HEIGHT, true);
//fbTest = gfx_create_framebuffer(256, 512);
}
@@ -329,7 +329,7 @@ void GameState_Update(GameState* gameState) {
func_800C49F4(gfxCtx);
}
gSaveContext.language = CVarGetInteger("gLanguages", LANGUAGE_ENG);
gSaveContext.language = CVarGetInteger(CVAR_SETTING("Languages"), LANGUAGE_ENG);
GameInteractor_ExecuteOnGameFrameUpdate();
gameState->frames++;
@@ -467,7 +467,7 @@ void GameState_Destroy(GameState* gameState) {
// Performing clear skeletons before unload resources fixes an actor heap corruption crash due to the skeleton patching system.
ResourceMgr_ClearSkeletons();
if (CVarGetInteger("gAltAssets", 0)) {
if (CVarGetInteger(CVAR_ALT_ASSETS, 0)) {
ResourceUnloadDirectory("alt/*");
gfx_texture_cache_clear();
}
+3 -3
View File
@@ -141,7 +141,7 @@ static const ALIGN_ASSET(2) char rGfxPrintFontDataAlt[] = drGfxPrintFontDataAlt;
// https://github.com/HarbourMasters/Shipwright/issues/2762
typedef enum {hardcoded, otrDefault, otrAlt} font_texture_t;
font_texture_t GfxPrint_TextureToUse() {
if (CVarGetInteger("gAltAssets", 0) && ResourceMgr_FileExists(rGfxPrintFontDataAlt)) {
if (CVarGetInteger(CVAR_ALT_ASSETS, 0) && ResourceMgr_FileExists(rGfxPrintFontDataAlt)) {
// If we have alt assets enabled, and we have alt prefixed font texture, use that
return otrAlt;
} else if (ResourceMgr_FileExists(rGfxPrintFontData)) {
@@ -214,7 +214,7 @@ void GfxPrint_SetColor(GfxPrint* this, u32 r, u32 g, u32 b, u32 a) {
}
void GfxPrint_SetPosPx(GfxPrint* this, s32 x, s32 y) {
this->posX = this->baseX + (x * 4) + CVarGetInteger("gGfxPrintCharStartOffset", 0);
this->posX = this->baseX + (x * 4) + CVarGetInteger(CVAR_DEVELOPER_TOOLS("GfxPrintChar.StartOffset"), 0);
this->posY = this->baseY + (y * 4);
}
@@ -272,7 +272,7 @@ void GfxPrint_PrintCharImpl(GfxPrint* this, u8 c) {
(u16)(c >> 3) * 256, 1 << 10, 1 << 10);
}
this->posX += CVarGetInteger("gGfxPrintCharSpacing", 32);
this->posX += CVarGetInteger(CVAR_DEVELOPER_TOOLS("GfxPrintChar.Spacing"), 32);
}
void GfxPrint_PrintStringWithSize(GfxPrint* this, const void* buffer, u32 charSize, u32 charCount) {
+2 -2
View File
@@ -290,7 +290,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
OPEN_DISPS(gfxCtx);
if (CVarGetInteger("gValueViewer.EnablePrinting", 0)) {
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("ValueViewerEnablePrinting"), 0)) {
Gfx* gfx;
Gfx* polyOpa;
GfxPrint printer;
@@ -424,7 +424,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
sGraphUpdateTime = time;
}
if (CVarGetInteger("gDebugEnabled", 0))
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0))
{
if (CHECK_BTN_ALL(gameState->input[0].press.button, BTN_Z) &&
CHECK_BTN_ALL(gameState->input[0].cur.button, BTN_L | BTN_R)) {
+2 -2
View File
@@ -287,8 +287,8 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) {
// When 3 frames are left on easy pause buffer, re-apply the last held inputs to the prev inputs
// to compute the pressed difference. This makes it so previously held inputs are continued as "held",
// but new inputs when unpausing are "pressed" out of the pause menu.
if (CVarGetInteger("gCheatEasyPauseBufferTimer", 0) == 3) {
input->prev.button = CVarGetInteger("gCheatEasyPauseBufferLastInputs", 0);
if (CVarGetInteger(CVAR_GENERAL("CheatEasyPauseBufferTimer"), 0) == 3) {
input->prev.button = CVarGetInteger(CVAR_GENERAL("CheatEasyPauseBufferLastInputs"), 0);
}
buttonDiff = input->prev.button ^ input->cur.button;
+2 -2
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;
}
+36 -36
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;
}
@@ -1082,10 +1082,10 @@ void TitleCard_InitPlaceName(PlayState* play, TitleCardContext* titleCtx, void*
void TitleCard_Update(PlayState* play, TitleCardContext* titleCtx) {
const Color_RGB8 TitleCard_Colors_ori = {255,255,255};
Color_RGB8 TitleCard_Colors = {255,255,255};
if (titleCtx->isBossCard && CVarGetInteger("gHudColors", 1) == 2) {//Bosses cards.
TitleCard_Colors = CVarGetColor24("gCCTC_B_U_Prim", TitleCard_Colors_ori);
} else if (!titleCtx->isBossCard && CVarGetInteger("gHudColors", 1) == 2) {
TitleCard_Colors = CVarGetColor24("gCCTC_OW_U_Prim", TitleCard_Colors_ori);
if (titleCtx->isBossCard && CVarGetInteger(CVAR_COSMETIC("HUD.TitleCard.Boss.Changed"), 1) == 2) {
TitleCard_Colors = CVarGetColor24(CVAR_COSMETIC("HUD.TitleCard.Boss.Value"), TitleCard_Colors_ori);
} else if (!titleCtx->isBossCard && CVarGetInteger(CVAR_COSMETIC("HUD.TitleCard.Map.Changed"), 1) == 2) {
TitleCard_Colors = CVarGetColor24(CVAR_COSMETIC("HUD.TitleCard.Map.Value"), TitleCard_Colors_ori);
} else {
TitleCard_Colors = TitleCard_Colors_ori;
}
@@ -1119,20 +1119,20 @@ 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;
if (TitleCard_PosType_Checker != 0) {
TitleCard_PosY = TitleCard_PosY_Modifier;
if (TitleCard_PosType_Checker == 1) {//Anchor Left
if (TitleCard_Margin_Checker != 0) {TitleCard_MarginX = CVarGetInteger("gHUDMargin_L", 0)*-1;};
if (TitleCard_Margin_Checker != 0) {TitleCard_MarginX = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.L"), 0)*-1;};
TitleCard_PosX = OTRGetDimensionFromLeftEdge(TitleCard_PosX_Modifier+TitleCard_MarginX)-11;
} else if (TitleCard_PosType_Checker == 2) {//Anchor Right
if (TitleCard_Margin_Checker != 0) {TitleCard_MarginX = CVarGetInteger("gHUDMargin_R", 0);};
if (TitleCard_Margin_Checker != 0) {TitleCard_MarginX = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.R"), 0);};
TitleCard_PosX = OTRGetDimensionFromRightEdge(TitleCard_PosX_Modifier+TitleCard_MarginX);
} else if (TitleCard_PosType_Checker == 3) {//Anchor None
TitleCard_PosX = TitleCard_PosX_Modifier;
@@ -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
@@ -2213,7 +2213,7 @@ void Player_PlaySfx(Actor* actor, u16 sfxId) {
if (actor->id != ACTOR_PLAYER || sfxId < NA_SE_VO_LI_SWORD_N || sfxId > NA_SE_VO_LI_ELECTRIC_SHOCK_LV_KID) {
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &D_801333E0 , &D_801333E0, &D_801333E8);
} else {
freqMultiplier = CVarGetFloat("gLinkVoiceFreqMultiplier", 1.0);
freqMultiplier = CVarGetFloat(CVAR_AUDIO("LinkVoiceFreqMultiplier"), 1.0);
if (freqMultiplier <= 0) {
freqMultiplier = 1;
}
@@ -2349,7 +2349,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 };
@@ -2897,7 +2897,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
@@ -2910,7 +2910,7 @@ s32 func_800314D4(PlayState* play, Actor* actor, Vec3f* arg2, f32 arg3) {
// #region SoH [Widescreen support]
// Doors will cull quite noticeably on wider screens. For these actors the zone is increased
f32 limit = 1.0f;
if (((actor->id == ACTOR_EN_DOOR) || (actor->id == ACTOR_DOOR_SHUTTER)) && CVarGetInteger("gIncreaseDoorUncullZones", 1)) {
if (((actor->id == ACTOR_EN_DOOR) || (actor->id == ACTOR_DOOR_SHUTTER)) && CVarGetInteger(CVAR_GENERAL("IncreaseDoorUncullZones"), 1)) {
limit = 2.0f;
}
@@ -3191,7 +3191,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)) {
@@ -3220,7 +3220,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;
}
@@ -3298,7 +3298,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;
}
+3 -3
View File
@@ -1902,7 +1902,7 @@ s32 BgCheck_CheckWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResul
s32 bgId2;
f32 nx, ny, nz; // unit normal of polygon
if (CVarGetInteger("gNoClip", 0) && actor != NULL && actor->id == ACTOR_PLAYER) {
if (CVarGetInteger(CVAR_CHEAT("NoClip"), 0) && actor != NULL && actor->id == ACTOR_PLAYER) {
return false;
}
@@ -4025,7 +4025,7 @@ u32 func_80041D94(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
* SurfaceType Get Wall Flags
*/
s32 func_80041DB8(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
if (CVarGetInteger("gClimbEverything", 0) != 0) {
if (CVarGetInteger(CVAR_CHEAT("ClimbEverything"), 0) != 0) {
return (1 << 3) | D_80119D90[func_80041D94(colCtx, poly, bgId)];
} else {
return D_80119D90[func_80041D94(colCtx, poly, bgId)];
@@ -4122,7 +4122,7 @@ u32 SurfaceType_GetEcho(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId)
* SurfaceType Is Hookshot Surface
*/
u32 SurfaceType_IsHookshotSurface(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
return CVarGetInteger("gHookshotEverything", 0) || SurfaceType_GetData(colCtx, poly, bgId, 1) >> 17 & 1;
return CVarGetInteger(CVAR_CHEAT("HookshotEverything"), 0) || SurfaceType_GetData(colCtx, poly, bgId, 1) >> 17 & 1;
}
/**
+23 -23
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) {
@@ -1485,12 +1485,12 @@ s32 Camera_Free(Camera* camera) {
camera->animState = 0;
f32 newCamX = -D_8015BD7C->state.input[0].cur.right_stick_x * 10.0f * (CVarGetFloat("gThirdPersonCameraSensitivityX", 1.0f));
f32 newCamY = D_8015BD7C->state.input[0].cur.right_stick_y * 10.0f * (CVarGetFloat("gThirdPersonCameraSensitivityY", 1.0f));
bool invertXAxis = (CVarGetInteger("gInvertXAxis", 0) && !CVarGetInteger("gMirroredWorld", 0)) || (!CVarGetInteger("gInvertXAxis", 0) && CVarGetInteger("gMirroredWorld", 0));
f32 newCamX = -D_8015BD7C->state.input[0].cur.right_stick_x * 10.0f * (CVarGetFloat(CVAR_SETTING("FreeLook.CameraSensitivity.X"), 1.0f));
f32 newCamY = D_8015BD7C->state.input[0].cur.right_stick_y * 10.0f * (CVarGetFloat(CVAR_SETTING("FreeLook.CameraSensitivity.Y"), 1.0f));
bool invertXAxis = (CVarGetInteger(CVAR_SETTING("FreeLook.InvertXAxis"), 0) && !CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) || (!CVarGetInteger(CVAR_SETTING("FreeLook.InvertXAxis"), 0) && CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0));
camera->play->camX += newCamX * (invertXAxis ? -1 : 1);
camera->play->camY += newCamY * (CVarGetInteger("gInvertYAxis", 1) ? 1 : -1);
camera->play->camY += newCamY * (CVarGetInteger(CVAR_SETTING("FreeLook.InvertYAxis"), 1) ? 1 : -1);
if (camera->play->camY > 0x32A4) {
camera->play->camY = 0x32A4;
@@ -1499,8 +1499,8 @@ s32 Camera_Free(Camera* camera) {
camera->play->camY = -0x228C;
}
f32 distTarget = CVarGetInteger("gFreeCameraDistMax", para1->distTarget);
f32 speedScaler = CVarGetInteger("gFreeCameraTransitionSpeed", 25);
f32 distTarget = CVarGetInteger(CVAR_SETTING("FreeLook.MaxCameraDistance"), para1->distTarget);
f32 speedScaler = CVarGetInteger(CVAR_SETTING("FreeLook.TransitionSpeed"), 25);
f32 distDiff = ABS(distTarget - camera->dist);
if (distDiff > 0)
camera->dist = Camera_LERPCeilF(distTarget, camera->dist, speedScaler / (distDiff + speedScaler), 0.0f);
@@ -1524,7 +1524,7 @@ s32 Camera_Free(Camera* camera) {
}
s32 Camera_Normal1(Camera* camera) {
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
if (CVarGetInteger(CVAR_SETTING("FreeLook.Enabled"), 0) && SetCameraManual(camera) == 1) {
Camera_Free(camera);
return 1;
}
@@ -1679,7 +1679,7 @@ s32 Camera_Normal1(Camera* camera) {
if (anim->startSwingTimer <= 0) {
// idle camera re-center
if (CVarGetInteger("gA11yDisableIdleCam", 0)) {
if (CVarGetInteger(CVAR_SETTING("A11yDisableIdleCam"), 0)) {
return 1;
}
eyeAdjustment.pitch = atEyeNextGeo.pitch;
@@ -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;
@@ -1770,7 +1770,7 @@ s32 Camera_Normal1(Camera* camera) {
}
s32 Camera_Normal2(Camera* camera) {
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
if (CVarGetInteger(CVAR_SETTING("FreeLook.Enabled"), 0) && SetCameraManual(camera) == 1) {
Camera_Free(camera);
return 1;
}
@@ -1941,7 +1941,7 @@ s32 Camera_Normal2(Camera* camera) {
// riding epona
s32 Camera_Normal3(Camera* camera) {
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
if (CVarGetInteger(CVAR_SETTING("FreeLook.Enabled"), 0) && SetCameraManual(camera) == 1) {
Camera_Free(camera);
return 1;
}
@@ -2305,7 +2305,7 @@ s32 Camera_Parallel0(Camera* camera) {
* Generic jump, jumping off ledges
*/
s32 Camera_Jump1(Camera* camera) {
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
if (CVarGetInteger(CVAR_SETTING("FreeLook.Enabled"), 0) && SetCameraManual(camera) == 1) {
Camera_Free(camera);
return 1;
}
@@ -2455,7 +2455,7 @@ s32 Camera_Jump1(Camera* camera) {
// Climbing ladders/vines
s32 Camera_Jump2(Camera* camera) {
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
if (CVarGetInteger(CVAR_SETTING("FreeLook.Enabled"), 0) && SetCameraManual(camera) == 1) {
Camera_Free(camera);
return 1;
}
@@ -2642,7 +2642,7 @@ s32 Camera_Jump2(Camera* camera) {
// swimming
s32 Camera_Jump3(Camera* camera) {
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
if (CVarGetInteger(CVAR_SETTING("FreeLook.Enabled"), 0) && SetCameraManual(camera) == 1) {
Camera_Free(camera);
return 1;
}
@@ -3104,7 +3104,7 @@ s32 Camera_Battle3(Camera* camera) {
* setting value.
*/
s32 Camera_Battle4(Camera* camera) {
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
if (CVarGetInteger(CVAR_SETTING("FreeLook.Enabled"), 0) && SetCameraManual(camera) == 1) {
Camera_Free(camera);
return 1;
}
@@ -4639,7 +4639,7 @@ s32 Camera_Data4(Camera* camera) {
* Hanging off of a ledge
*/
s32 Camera_Unique1(Camera* camera) {
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
if (CVarGetInteger(CVAR_SETTING("FreeLook.Enabled"), 0) && SetCameraManual(camera) == 1) {
Camera_Free(camera);
return 1;
}
@@ -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);
@@ -7619,7 +7619,7 @@ Vec3s Camera_Update(Camera* camera) {
}
// enable/disable debug cam
if (CVarGetInteger("gDebugEnabled", 0) && CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_START)) {
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_START)) {
gDbgCamEnabled ^= 1;
if (gDbgCamEnabled) {
DbgCamera_Enable(&D_8015BD80, camera);
@@ -7702,7 +7702,7 @@ Vec3s Camera_Update(Camera* camera) {
}
if (camera->timer != -1 && CHECK_BTN_ALL(D_8015BD7C->state.input[0].press.button, BTN_DRIGHT) &&
CVarGetInteger("gDebugEnabled", 0)) {
CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) {
camera->timer = 0;
}
@@ -7890,7 +7890,7 @@ s32 Camera_ChangeModeFlags(Camera* camera, s16 mode, u8 flags) {
}
// Clear free look if an action is performed that would move the camera (targeting, first person, talking)
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1 &&
if (CVarGetInteger(CVAR_SETTING("FreeLook.Enabled"), 0) && SetCameraManual(camera) == 1 &&
((mode >= CAM_MODE_TARGET && mode <= CAM_MODE_BATTLE) ||
(mode >= CAM_MODE_FIRSTPERSON && mode <= CAM_MODE_CLIMBZ) || mode == CAM_MODE_HANGZ ||
mode == CAM_MODE_FOLLOWBOOMERANG)) {
+2 -2
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;
}
+1 -1
View File
@@ -8,7 +8,7 @@ void SaveContext_Init(void) {
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
gSaveContext.natureAmbienceId = NATURE_ID_DISABLED;
gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX;
gSaveContext.nextCutsceneIndex = CVarGetInteger("gBetaQuestWorld", 0xFFEF);
gSaveContext.nextCutsceneIndex = CVarGetInteger(CVAR_CHEAT("BetaQuestWorld"), 0xFFEF);
gSaveContext.cutsceneTrigger = 0;
gSaveContext.chamberCutsceneNum = 0;
gSaveContext.nextDayTime = 0xFFFF;
+2 -2
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;
+3 -3
View File
@@ -133,7 +133,7 @@ void func_8006390C(Input* input) {
InputCombo* input_combo;
s32 i;
if (!CVarGetInteger("gDebugEnabled", 0))
if (!CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0))
return;
regGroup = (gGameInfo->regGroup * REG_PAGES + gGameInfo->regPage) * REG_PER_PAGE - REG_PER_PAGE;
@@ -216,7 +216,7 @@ void func_80063C04(GfxPrint* printer) {
s32 pad;
char name[3];
if (!CVarGetInteger("gDebugEnabled", 0))
if (!CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0))
return;
// set up register name string
@@ -243,7 +243,7 @@ void func_80063D7C(GraphicsContext* gfxCtx) {
GfxPrint printer;
Gfx* tempRet;
if (!CVarGetInteger("gDebugEnabled", 0) || GameInteractor_NoUIActive()) {
if (!CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) || GameInteractor_NoUIActive()) {
return;
}
+7 -7
View File
@@ -155,14 +155,14 @@ void func_80064558(PlayState* play, CutsceneContext* csCtx) {
void func_800645A0(PlayState* play, CutsceneContext* csCtx) {
Input* input = &play->state.input[0];
if (CVarGetInteger("gDebugEnabled", 0) && CHECK_BTN_ALL(input->press.button, BTN_DLEFT) &&
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && CHECK_BTN_ALL(input->press.button, BTN_DLEFT) &&
(csCtx->state == CS_STATE_IDLE) && (gSaveContext.sceneSetupIndex >= 4)) {
D_8015FCC8 = 0;
gSaveContext.cutsceneIndex = 0xFFFD;
gSaveContext.cutsceneTrigger = 1;
}
if (CVarGetInteger("gDebugEnabled", 0) && CHECK_BTN_ALL(input->press.button, BTN_DUP) &&
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && CHECK_BTN_ALL(input->press.button, BTN_DUP) &&
(csCtx->state == CS_STATE_IDLE) && (gSaveContext.sceneSetupIndex >= 4) && !gDbgCamEnabled) {
D_8015FCC8 = 1;
gSaveContext.cutsceneIndex = 0xFFFD;
@@ -506,7 +506,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
}
bool debugCsSkip = (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START) &&
(gSaveContext.fileNum != 0xFEDC) && CVarGetInteger("gDebugEnabled", 0));
(gSaveContext.fileNum != 0xFEDC) && CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0));
if ((gSaveContext.gameMode != 0) && (gSaveContext.gameMode != 3) && (play->sceneNum != SCENE_HYRULE_FIELD) &&
(csCtx->frames > 20) &&
@@ -519,9 +519,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
@@ -623,7 +623,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;
@@ -1701,7 +1701,7 @@ void Cutscene_ProcessCommands(PlayState* play, CutsceneContext* csCtx, u8* cutsc
return;
}
if (CVarGetInteger("gDebugEnabled", 0) && CHECK_BTN_ALL(play->state.input[0].press.button, BTN_DRIGHT)) {
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) && CHECK_BTN_ALL(play->state.input[0].press.button, BTN_DRIGHT)) {
csCtx->state = CS_STATE_UNSKIPPABLE_INIT;
return;
}
+3 -3
View File
@@ -764,13 +764,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);
+16 -16
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);
}
}
+41 -40
View File
@@ -3,6 +3,7 @@
#include "objects/gameplay_keep/gameplay_keep.h"
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
#include "textures/icon_item_static/icon_item_static.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS 0
@@ -334,7 +335,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(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL) == GI_SCHEME_CROWD_CONTROL && CVarGetInteger(CVAR_REMOTE("Enabled"), 0))) {
this->actor.objBankIndex = 0;
} else {
this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, objectIndex);
@@ -782,7 +783,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
this->actor.params == ITEM00_BOMBS_SPECIAL ||
(this->actor.params >= ITEM00_BOMBCHU && this->actor.params <= ITEM00_SOH_GIVE_ITEM_ENTRY_GI)
) {
if (CVarGetInteger("gNewDrops", 0) || (this->actor.params >= ITEM00_SOH_DUMMY && this->actor.params <= ITEM00_SOH_GIVE_ITEM_ENTRY_GI)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) || (this->actor.params >= ITEM00_SOH_DUMMY && this->actor.params <= ITEM00_SOH_GIVE_ITEM_ENTRY_GI)) {
this->actor.shape.rot.y += 960;
} else {
this->actor.shape.rot.y = 0;
@@ -791,7 +792,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
if (this->unk_15A > 0) {
this->unk_15A--;
if (CVarGetInteger("gDropsDontDie", 0) && (this->unk_154 <= 0)) {
if (CVarGetInteger(CVAR_CHEAT("DropsDontDie"), 0) && (this->unk_154 <= 0)) {
this->unk_15A++;
}
}
@@ -1006,35 +1007,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);
@@ -1044,7 +1045,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
}
break;
case ITEM00_HEART_PIECE:
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 21.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_HEART_PIECE);
@@ -1057,7 +1058,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);
@@ -1083,7 +1084,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);
@@ -1091,70 +1092,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)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
mtxScale = 8.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_KEY_SMALL);
@@ -1314,24 +1315,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;
}
@@ -1491,7 +1492,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 {
@@ -1500,7 +1501,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);
@@ -1534,7 +1535,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)
@@ -1579,7 +1580,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)
@@ -1616,7 +1617,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) {
@@ -1659,11 +1660,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;
@@ -1696,7 +1697,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) {
@@ -1721,7 +1722,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);
+1 -1
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];
+1 -1
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;
}
+2 -2
View File
@@ -18,10 +18,10 @@ s32 FrameAdvance_Update(FrameAdvanceContext* frameAdvCtx, Input* input) {
frameAdvCtx->enabled = !frameAdvCtx->enabled;
}
if (!frameAdvCtx->enabled || CVarGetInteger("gFrameAdvance", 0) || (CHECK_BTN_ALL(input->cur.button, BTN_Z) &&
if (!frameAdvCtx->enabled || CVarGetInteger(CVAR_GENERAL("FrameAdvance"), 0) || (CHECK_BTN_ALL(input->cur.button, BTN_Z) &&
(CHECK_BTN_ALL(input->press.button, BTN_R) ||
(CHECK_BTN_ALL(input->cur.button, BTN_R) && (++frameAdvCtx->timer >= 9))))) {
CVarClear("gFrameAdvance");
CVarClear(CVAR_GENERAL("FrameAdvance"));
frameAdvCtx->timer = 0;
return true;
}
+6 -6
View File
@@ -18,13 +18,13 @@ void KaleidoSetup_Update(PlayState* play) {
play->shootingGalleryStatus <= 1 && gSaveContext.magicState != MAGIC_STATE_STEP_CAPACITY && gSaveContext.magicState != MAGIC_STATE_FILL &&
(play->sceneNum != SCENE_BOMBCHU_BOWLING_ALLEY || !Flags_GetSwitch(play, 0x38))) {
u8 easyPauseBufferEnabled = CVarGetInteger("gCheatEasyPauseBufferEnabled", 0);
u8 easyPauseBufferTimer = CVarGetInteger("gCheatEasyPauseBufferTimer", 0);
u8 easyPauseBufferEnabled = CVarGetInteger(CVAR_CHEAT("EasyPauseBuffer"), 0);
u8 easyPauseBufferTimer = CVarGetInteger(CVAR_GENERAL("CheatEasyPauseBufferTimer"), 0);
// If start is not seen as pressed on the 2nd to last frame then we should end the easy frame advance flow
if (easyPauseBufferEnabled && easyPauseBufferTimer == 2 &&
!CHECK_BTN_ALL(input->press.button, BTN_START)) {
CVarSetInteger("gCheatEasyPauseBufferTimer", 0);
CVarSetInteger(CVAR_GENERAL("CheatEasyPauseBufferTimer"), 0);
}
if (CHECK_BTN_ALL(input->cur.button, BTN_L) && CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
@@ -34,14 +34,14 @@ void KaleidoSetup_Update(PlayState* play) {
} else if ((CHECK_BTN_ALL(input->press.button, BTN_START) && (!easyPauseBufferEnabled || !easyPauseBufferTimer)) ||
(easyPauseBufferEnabled && easyPauseBufferTimer == 1)) { // Force Kaleido open when easy pause buffer reaches 0
// Remember last held buttons for pause buffer cheat (minus start so easy frame advance works)
CVarSetInteger("gCheatEasyPauseBufferLastInputs", input->cur.button & ~(BTN_START));
CVarSetInteger(CVAR_GENERAL("CheatEasyPauseBufferLastInputs"), input->cur.button & ~(BTN_START));
gSaveContext.unk_13EE = gSaveContext.unk_13EA;
if (CHECK_BTN_ALL(input->cur.button, BTN_L))
CVarSetInteger("gPauseTriforce", 1);
CVarSetInteger(CVAR_GENERAL("PauseTriforce"), 1);
else
CVarSetInteger("gPauseTriforce", 0);
CVarSetInteger(CVAR_GENERAL("PauseTriforce"), 0);
WREG(16) = -175;
+3 -3
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 {
+1 -1
View File
@@ -201,7 +201,7 @@ void func_80077D10(f32* arg0, s16* arg1, Input* input) {
f32 relX = input->rel.stick_x;
f32 relY = input->rel.stick_y;
if (CVarGetInteger("gMirroredWorld", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
relX = -input->rel.stick_x;
}
+48 -48
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;
@@ -176,26 +176,26 @@ void HealthMeter_Update(PlayState* play) {
s16 gFactor;
s16 bFactor;
Top_LM_Margin = CVarGetInteger("gHUDMargin_T", 0);
Left_LM_Margin = CVarGetInteger("gHUDMargin_L", 0);
Right_LM_Margin = CVarGetInteger("gHUDMargin_R", 0);
Bottom_LM_Margin = CVarGetInteger("gHUDMargin_B", 0);
Top_LM_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.T"), 0);
Left_LM_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.L"), 0);
Right_LM_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.R"), 0);
Bottom_LM_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.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("HUD.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("HUD.HeartsCount.PosType"), 0) != 0) {
if (CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosType"), 0) == 1) {//Anchor Left
return OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosX"), 0)+X_Margins+70.0f);
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.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("HUD.HeartsCount.PosX"), 0)+X_Margins+70.0f);
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosType"), 0) == 3) {//Anchor None
return CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosX"), 0)+70.0f;;
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.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("HUD.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("HUD.HeartsCount.PosType"), 0) != 0) {
HeartsScale = CVarGetFloat(CVAR_COSMETIC("HUD.HeartsCount.Scale"), 0.7f);
return CVarGetInteger(CVAR_COSMETIC("HUD.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("HUD.HeartsCount.PosType"), 0) != 0) {
HeartsScale = CVarGetFloat(CVAR_COSMETIC("HUD.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("HUD.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("HUD.HeartsCount.PosType"), 0) != 0) {
offsetY = CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosY"), 0)+Y_Margins+(HeartsScale*15);
if (CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosType"), 0) == 1) {//Anchor Left
offsetX = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosX"), 0)+X_Margins+70.0f);
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.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("HUD.HeartsCount.PosX"), 0)+X_Margins+70.0f);
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosType"), 0) == 3) {//Anchor None
offsetX = CVarGetInteger(CVAR_COSMETIC("HUD.HeartsCount.PosX"), 0)+70.0f;
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.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("HUD.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);
}
+96 -96
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("HUD.Minimap.UseMargins"), 0) != 0) {
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 0) {X_Margins_Minimap = Right_MM_Margin;};
Y_Margins_Minimap = Bottom_MM_Margin;
} else {
X_Margins_Minimap = 0;
@@ -652,32 +652,32 @@ void Minimap_DrawCompassIcons(PlayState* play) {
tempX = player->actor.world.pos.x;
tempZ = player->actor.world.pos.z;
tempX /= R_COMPASS_SCALE_X * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1);
tempX /= R_COMPASS_SCALE_X * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1);
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;};
s16 tempXOffset = R_COMPASS_OFFSET_X + (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? mirrorOffset : 0);
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) != 0) {
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 1) {//Anchor Left
if (CVarGetInteger(CVAR_COSMETIC("HUD.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("HUD.Minimap.PosX"), 0)*10)) / 10.0f),
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 2) {//Anchor Right
if (CVarGetInteger(CVAR_COSMETIC("HUD.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("HUD.Minimap.PosX"), 0)*10)) / 10.0f),
(R_COMPASS_OFFSET_Y +((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.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("HUD.Minimap.PosX"), 0)*10) / 10.0f),
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("HUD.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);
}
Matrix_Scale(0.4f, 0.4f, 0.4f, MTXMODE_APPLY);
Matrix_RotateX(-1.6f, MTXMODE_APPLY);
tempX = ((0x7FFF - player->actor.shape.rot.y) / 0x400) * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1);
tempX = ((0x7FFF - player->actor.shape.rot.y) / 0x400) * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1);
Matrix_RotateY(tempX / 10.0f, MTXMODE_APPLY);
gSPMatrix(OVERLAY_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@@ -688,30 +688,30 @@ void Minimap_DrawCompassIcons(PlayState* play) {
//Player map entry (red arrow)
tempX = sPlayerInitialPosX;
tempZ = sPlayerInitialPosZ;
tempX /= R_COMPASS_SCALE_X * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1);
tempX /= R_COMPASS_SCALE_X * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 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("HUD.Minimap.PosType"), 0) != 0) {
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 1) {//Anchor Left
if (CVarGetInteger(CVAR_COSMETIC("HUD.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("HUD.Minimap.PosX"), 0)*10)) / 10.0f),
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 2) {//Anchor Right
if (CVarGetInteger(CVAR_COSMETIC("HUD.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("HUD.Minimap.PosX"), 0)*10)) / 10.0f),
(R_COMPASS_OFFSET_Y +((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.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("HUD.Minimap.PosX"), 0)*10) / 10.0f),
(R_COMPASS_OFFSET_Y - tempZ + ((CVarGetInteger(CVAR_COSMETIC("HUD.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);
}
Matrix_Scale(VREG(9) / 100.0f, VREG(9) / 100.0f, VREG(9) / 100.0f, MTXMODE_APPLY);
Matrix_RotateX(VREG(52) / 10.0f, MTXMODE_APPLY);
Matrix_RotateY((sPlayerInitialDirection * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1)) / 10.0f, MTXMODE_APPLY);
Matrix_RotateY((sPlayerInitialDirection * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1)) / 10.0f, MTXMODE_APPLY);
gSPMatrix(OVERLAY_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@@ -727,23 +727,23 @@ 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);
// If any of these CVars are enabled, disable toggling the minimap with L, unless gEnableMapToggle is set
bool enableMapToggle =
!(CVarGetInteger("gDebugEnabled", 0) || CVarGetInteger("gMoonJumpOnL", 0) || CVarGetInteger("gTurboOnL", 0)) ||
CVarGetInteger("gEnableMapToggle", 0);
!(CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) || CVarGetInteger(CVAR_CHEAT("MoonJumpOnL"), 0)) ||
CVarGetInteger(CVAR_DEVELOPER_TOOLS("EnableMapToggle"), 0);
if (play->pauseCtx.state < 4) {
//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("HUD.Minimap.UseMargins"), 0) != 0) {
if (CVarGetInteger(CVAR_COSMETIC("HUD.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("HUD.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);
@@ -769,28 +769,28 @@ void Minimap_Draw(PlayState* play) {
if (CHECK_DUNGEON_ITEM(DUNGEON_MAP, mapIndex)) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, minimapColor.r, minimapColor.g, minimapColor.b, interfaceCtx->minimapAlpha);
u8 mirrorMode = CVarGetInteger("gMirroredWorld", 0) ? G_TX_MIRROR : G_TX_NOMIRROR;
u8 mirrorMode = CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? G_TX_MIRROR : G_TX_NOMIRROR;
gDPLoadTextureBlock_4b(OVERLAY_DISP++, interfaceCtx->mapSegmentName[0], G_IM_FMT_I, 96, 85, 0,
mirrorMode | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
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("HUD.Minimap.PosType"), 0) != 0) {
dgnMiniMapY = R_DGN_MINIMAP_Y+CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0)+Y_Margins_Minimap;
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 1) {//Anchor Left
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
dgnMiniMapX = OTRGetDimensionFromLeftEdge(R_DGN_MINIMAP_X+CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0)+X_Margins_Minimap);
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 2) {//Anchor Right
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
dgnMiniMapX = OTRGetDimensionFromRightEdge(R_DGN_MINIMAP_X+CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0)+X_Margins_Minimap);
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 3) {//Anchor None
dgnMiniMapX = CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0);
}
}
s32 sValue = 0;
if (CVarGetInteger("gMirroredWorld", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
// Flip the minimap on the x-axis (s-axis) by setting s to the textures mirror boundary
sValue = 96 << 5;
}
@@ -839,13 +839,13 @@ 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("HUD.Minimap.PosType"), 0) != 4) { // Not Hidden
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, minimapColor.r, minimapColor.g, minimapColor.b, interfaceCtx->minimapAlpha);
u8 mirrorMode = CVarGetInteger("gMirroredWorld", 0) ? G_TX_MIRROR : G_TX_NOMIRROR;
u8 mirrorMode = CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? G_TX_MIRROR : G_TX_NOMIRROR;
gDPLoadTextureBlock_4b(OVERLAY_DISP++, interfaceCtx->mapSegmentName[0], G_IM_FMT_IA,
gMapData->owMinimapWidth[mapIndex], gMapData->owMinimapHeight[mapIndex], 0,
mirrorMode | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
@@ -853,21 +853,21 @@ 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("HUD.Minimap.PosType"), 0) != 0) {
oWMiniMapY = R_OW_MINIMAP_Y+CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0)+Y_Margins_Minimap;
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 1) {//Anchor Left
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
oWMiniMapX = OTRGetDimensionFromLeftEdge(R_OW_MINIMAP_X+CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0)+X_Margins_Minimap);
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 2) {//Anchor Right
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
oWMiniMapX = OTRGetDimensionFromRightEdge(R_OW_MINIMAP_X+CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0)+X_Margins_Minimap);
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 3) {//Anchor None
oWMiniMapX = CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0);
}
}
s32 sValue = 0;
if (CVarGetInteger("gMirroredWorld", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
// Flip the minimap on the x-axis (s-axis) by setting s to the textures mirror boundary
sValue = gMapData->owMinimapWidth[mapIndex] << 5;
}
@@ -890,7 +890,7 @@ void Minimap_Draw(PlayState* play) {
// Then duplicate that and right-align the texture (extra 2 pixels are due to the texture being a 6px left-aligned in a 8px tex)
s16 distFromCenter = (R_OW_MINIMAP_X + (gMapData->owMinimapWidth[mapIndex] / 2)) - (origX + (iconSize / 2));
s16 mirrorOffset = distFromCenter * 2 + (iconSize / 2) - 2;
s16 newX = origX + (CVarGetInteger("gMirroredWorld", 0) ? mirrorOffset : 0);
s16 newX = origX + (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? mirrorOffset : 0);
// The game authentically uses larger negative values for the entrance icon Y pos value. Normally only the first 12 bits
// would be read when the final value is passed into `gSPTextureRectangle`, but our cosmetic hud placements requires using
@@ -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("HUD.Minimap.PosType"), 0) != 0) {
entranceY = newY + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0) + Y_Margins_Minimap;
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 1) { // Anchor Left
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
entranceX = OTRGetRectDimensionFromLeftEdge(newX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0));
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 2) { // Anchor Right
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
entranceX = OTRGetRectDimensionFromRightEdge(newX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0));
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 3) { // Anchor None
entranceX = newX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.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);
@@ -934,25 +934,25 @@ void Minimap_Draw(PlayState* play) {
}
}
s16 origX = CVarGetInteger("gMirroredWorld", 0) ? 256 : 270;
s16 origX = CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 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("HUD.Minimap.PosType"), 0) != 0) {
entranceY = 154 + Y_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0);
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 1) {//Anchor Left
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
entranceX = OTRGetRectDimensionFromLeftEdge(origX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0));
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 2) {//Anchor Right
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
entranceX = OTRGetRectDimensionFromRightEdge(origX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0));
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 3) {//Anchor None
entranceX = origX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("HUD.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);
@@ -992,10 +992,10 @@ void Map_Update(PlayState* play) {
s16 floor;
s16 i;
Top_MM_Margin = CVarGetInteger("gHUDMargin_T", 0);
Left_MM_Margin = CVarGetInteger("gHUDMargin_L", 0);
Right_MM_Margin = CVarGetInteger("gHUDMargin_R", 0);
Bottom_MM_Margin = CVarGetInteger("gHUDMargin_B", 0);
Top_MM_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.T"), 0);
Left_MM_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.L"), 0);
Right_MM_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.R"), 0);
Bottom_MM_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.B"), 0);
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0)) {
switch (play->sceneNum) {
+19 -19
View File
@@ -113,15 +113,15 @@ void MapMark_DrawForDungeon(PlayState* play) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->minimapAlpha);
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, interfaceCtx->minimapAlpha);
s32 Top_MC_Margin = CVarGetInteger("gHUDMargin_T", 0);
s32 Left_MC_Margin = CVarGetInteger("gHUDMargin_L", 0);
s32 Right_MC_Margin = CVarGetInteger("gHUDMargin_R", 0);
s32 Bottom_MC_Margin = CVarGetInteger("gHUDMargin_B", 0);
s32 Top_MC_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.T"), 0);
s32 Left_MC_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.L"), 0);
s32 Right_MC_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.R"), 0);
s32 Bottom_MC_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.B"), 0);
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("HUD.Minimap.UseMargins"), 0) != 0) {
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 0) {X_Margins_Minimap_ic = Right_MC_Margin;};
Y_Margins_Minimap_ic = Bottom_MC_Margin;
} else {
X_Margins_Minimap_ic = 0;
@@ -141,29 +141,29 @@ void MapMark_DrawForDungeon(PlayState* play) {
// The original mark point X originates from the left edge of the map
// For mirror mode, we compute the new mark point X by subtracting it from the right side of the
// dungeon map and the textures width
s16 markPointX = CVarGetInteger("gMirroredWorld", 0) ? 96 - markPoint->x - width : markPoint->x;
s16 markPointX = CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? 96 - markPoint->x - width : markPoint->x;
//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("HUD.Minimap.PosType"), 0) != 0) {
rectTop = (markPoint->y + Y_Margins_Minimap_ic + 140 + CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosY"), 0));
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 1) {//Anchor Left
if (CVarGetInteger(CVAR_COSMETIC("HUD.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("HUD.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("HUD.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("HUD.Minimap.PosType"), 0) == 2) {//Anchor Right
if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap_ic = Right_MC_Margin;};
rectLeft = OTRGetRectDimensionFromRightEdge(markPointX+CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0)+204+X_Margins_Minimap_ic);
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 3) {//Anchor None
rectLeft = markPointX+CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0)+204+X_Margins_Minimap_ic;
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosType"), 0) == 4) {//Hidden
rectLeft = -9999;
}
} else {
+46 -46
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);
@@ -187,7 +187,7 @@ void Message_HandleChoiceSelection(PlayState* play, u8 numChoices) {
static s16 sAnalogStickHeld = false;
MessageContext* msgCtx = &play->msgCtx;
Input* input = &play->state.input[0];
bool dpad = CVarGetInteger("gDpadText", 0);
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
if ((input->rel.stick_y >= 30 && !sAnalogStickHeld) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) {
sAnalogStickHeld = true;
@@ -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 };
@@ -873,7 +873,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
Message_SetTextColor(msgCtx, msgCtx->msgBufDecoded[++i] & 0xF);
break;
case ' ':
msgCtx->textPosX += CVarGetInteger("gTextSpacing", 6);
msgCtx->textPosX += CVarGetInteger(CVAR_ENHANCEMENT("TextSpacing"), 6);
break;
case MESSAGE_BOX_BREAK:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
@@ -1032,7 +1032,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
msgCtx->textDelay = msgCtx->msgBufDecoded[++i];
break;
case MESSAGE_UNSKIPPABLE:
msgCtx->textUnskippable = CVarGetInteger("gSkipText", 0) != 1;
msgCtx->textUnskippable = CVarGetInteger(CVAR_ENHANCEMENT("SkipText"), 0) != 1;
break;
case MESSAGE_TWO_CHOICE:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_2_CHOICE;
@@ -1116,7 +1116,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
}
}
if (msgCtx->textDelayTimer == 0) {
msgCtx->textDrawPos = i + CVarGetInteger("gTextSpeed", 2);
msgCtx->textDrawPos = i + CVarGetInteger(CVAR_ENHANCEMENT("TextSpeed"), 2);
msgCtx->textDelayTimer = msgCtx->textDelay;
} else {
msgCtx->textDelayTimer--;
@@ -1189,7 +1189,7 @@ void Message_Decode(PlayState* play) {
phi_s1 = temp_s2 = msgCtx->msgBufDecoded[decodedBufPos] = font->msgBuf[msgCtx->msgBufPos];
// Don't require input for credits textboxes in randomizer
if (CVarGetInteger("gNoInputForCredits", 0) && (
if (CVarGetInteger(CVAR_ENHANCEMENT("NoInputForCredits"), 0) && (
msgCtx->textId == 0x706F ||
msgCtx->textId == 0x7091 ||
msgCtx->textId == 0x7092 ||
@@ -1654,12 +1654,12 @@ 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) &&
(((LINK_IS_ADULT || CVarGetInteger("gTimelessEquipment", 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 ||
textId == 0x50 || textId == 0x51)) ||
((!LINK_IS_ADULT || CVarGetInteger("gTimelessEquipment", 0)) &&
((!LINK_IS_ADULT || CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0)) &&
// 4C = Deku Shield, A4 = Kokiri Sword
(textId == 0x4C || textId == 0xA4)) ||
// 4D == Hylian Shield
@@ -2018,14 +2018,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 };
@@ -2039,8 +2039,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;
@@ -2056,8 +2056,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;
@@ -2073,8 +2073,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;
@@ -2090,8 +2090,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;
@@ -2107,8 +2107,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;
@@ -2155,7 +2155,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
0);
bool isB_Held = CVarGetInteger("gSkipText", 0) != 0 ? CHECK_BTN_ALL(play->state.input[0].cur.button, BTN_B)
bool isB_Held = CVarGetInteger(CVAR_ENHANCEMENT("SkipText"), 0) != 0 ? CHECK_BTN_ALL(play->state.input[0].cur.button, BTN_B)
: CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B);
switch (msgCtx->msgMode) {
@@ -2436,7 +2436,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
}
break;
case MSGMODE_SETUP_DISPLAY_SONG_PLAYED:
if (CVarGetInteger("gFastOcarinaPlayback", 0) == 0 ||
if (CVarGetInteger(CVAR_ENHANCEMENT("FastOcarinaPlayback"), 0) == 0 ||
play->msgCtx.lastPlayedSong == OCARINA_SONG_TIME ||
play->msgCtx.lastPlayedSong == OCARINA_SONG_STORMS ||
play->msgCtx.lastPlayedSong == OCARINA_SONG_SUNS) {
@@ -2491,7 +2491,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
Message_Decode(play);
msgCtx->msgMode = MSGMODE_DISPLAY_SONG_PLAYED_TEXT;
if (CVarGetInteger("gFastOcarinaPlayback", 0) == 0 || play->msgCtx.lastPlayedSong == OCARINA_SONG_TIME
if (CVarGetInteger(CVAR_ENHANCEMENT("FastOcarinaPlayback"), 0) == 0 || play->msgCtx.lastPlayedSong == OCARINA_SONG_TIME
|| play->msgCtx.lastPlayedSong == OCARINA_SONG_STORMS ||
play->msgCtx.lastPlayedSong == OCARINA_SONG_SUNS) {
msgCtx->stateTimer = 20;
@@ -3022,7 +3022,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
* the last value being saved in a static variable.
*/
void Message_DrawDebugVariableChanged(s16* var, GraphicsContext* gfxCtx) {
if (!CVarGetInteger("gDebugEnabled", 0)) { return; }
if (!CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) { return; }
static s16 sVarLastValue = 0;
static s16 sFillTimer = 0;
@@ -3163,7 +3163,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) {
@@ -3382,7 +3382,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 {
+1 -1
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);
+3 -3
View File
@@ -73,7 +73,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
@@ -337,7 +337,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);
@@ -345,7 +345,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);
+568 -569
View File
File diff suppressed because it is too large Load Diff
+15 -21
View File
@@ -498,12 +498,6 @@ void Play_Init(GameState* thisx) {
gTrnsnUnkState = 0;
play->transitionMode = TRANS_MODE_OFF;
if (CVarGetInteger("gSceneTransitions", 255)!= 255){
play->transitionMode = CVarGetInteger("gSceneTransitions", 0);
gSaveContext.nextTransitionType = CVarGetInteger("gSceneTransitions", 0);
play->transitionType = CVarGetInteger("gSceneTransitions", 0);
}
FrameAdvance_Init(&play->frameAdvCtx);
Rand_Seed((u32)osGetTime());
Matrix_Init(&play->state);
@@ -546,7 +540,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("gTimelessEquipment", 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;
@@ -633,7 +627,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);
@@ -671,7 +665,7 @@ void Play_Update(PlayState* play) {
HREG(82) = 0;
}
if (CVarGetInteger("gFreeCamera", 0) && Player_InCsMode(play)) {
if (CVarGetInteger(CVAR_SETTING("FreeLook.Enabled"), 0) && Player_InCsMode(play)) {
play->manualCamera = false;
}
@@ -1087,7 +1081,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]++;
}
}
@@ -1376,7 +1370,7 @@ void Play_Draw(PlayState* play) {
// Flip the projections and invert culling for the OPA and XLU display buffers
// These manage the world and effects
if (CVarGetInteger("gMirroredWorld", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
gSPSetExtraGeometryMode(POLY_OPA_DISP++, G_EX_INVERT_CULLING);
gSPSetExtraGeometryMode(POLY_XLU_DISP++, G_EX_INVERT_CULLING);
gSPMatrix(POLY_OPA_DISP++, play->view.projectionFlippedPtr, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
@@ -1610,7 +1604,7 @@ void Play_Draw(PlayState* play) {
GameInteractor_ExecuteOnPlayDrawEnd();
// Reset the inverted culling
if (CVarGetInteger("gMirroredWorld", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
gSPClearExtraGeometryMode(POLY_OPA_DISP++, G_EX_INVERT_CULLING);
gSPClearExtraGeometryMode(POLY_XLU_DISP++, G_EX_INVERT_CULLING);
}
@@ -1658,11 +1652,11 @@ void Play_Main(GameState* thisx) {
PlayState* play = (PlayState*)thisx;
// Decrease the easy pause buffer timer every frame
if (CVarGetInteger("gCheatEasyPauseBufferTimer", 0) > 0) {
CVarSetInteger("gCheatEasyPauseBufferTimer", CVarGetInteger("gCheatEasyPauseBufferTimer", 0) - 1);
if (CVarGetInteger(CVAR_GENERAL("CheatEasyPauseBufferTimer"), 0) > 0) {
CVarSetInteger(CVAR_GENERAL("CheatEasyPauseBufferTimer"), CVarGetInteger(CVAR_GENERAL("CheatEasyPauseBufferTimer"), 0) - 1);
}
if (play->envCtx.unk_EE[2] == 0 && CVarGetInteger("gLetItSnow", 0)) {
if (play->envCtx.unk_EE[2] == 0 && CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
play->envCtx.unk_EE[3] = 64;
Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_OBJECT_KANKYO, 0, 0, 0, 0, 0, 0, 3, 0);
}
@@ -1708,7 +1702,7 @@ void Play_Main(GameState* thisx) {
LOG_NUM("1", 1);
}
if (CVarGetInteger("gTimeSync", 0)) {
if (CVarGetInteger(CVAR_CHEAT("TimeSync"), 0)) {
const int maxRealDaySeconds = 86400;
const int maxInGameDayTicks = 65536;
@@ -1839,11 +1833,11 @@ void Play_InitScene(PlayState* play, s32 spawn)
}
void Play_SpawnScene(PlayState* play, s32 sceneNum, s32 spawn) {
uint8_t mqMode = CVarGetInteger("gBetterDebugWarpScreenMQMode", WARP_MODE_OVERRIDE_OFF);
int16_t mqModeScene = CVarGetInteger("gBetterDebugWarpScreenMQModeScene", -1);
uint8_t mqMode = CVarGetInteger(CVAR_GENERAL("BetterDebugWarpScreenMQMode"), WARP_MODE_OVERRIDE_OFF);
int16_t mqModeScene = CVarGetInteger(CVAR_GENERAL("BetterDebugWarpScreenMQModeScene"), -1);
if (mqMode != WARP_MODE_OVERRIDE_OFF && sceneNum != mqModeScene) {
CVarClear("gBetterDebugWarpScreenMQMode");
CVarClear("gBetterDebugWarpScreenMQModeScene");
CVarClear(CVAR_GENERAL("BetterDebugWarpScreenMQMode"));
CVarClear(CVAR_GENERAL("BetterDebugWarpScreenMQModeScene"));
}
OTRPlay_SpawnScene(play, sceneNum, spawn);
@@ -2226,7 +2220,7 @@ void Play_PerformSave(PlayState* play) {
IS_RANDO &&
gSaveContext.triforcePiecesCollected == (Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED) + 1) &&
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");
}
}
+48 -48
View File
@@ -597,12 +597,12 @@ s32 Player_ActionToModelGroup(Player* this, s32 actionParam) {
void Player_SetModelsForHoldingShield(Player* this) {
if ((this->stateFlags1 & PLAYER_STATE1_SHIELDING) &&
((this->itemAction < 0) || (this->itemAction == this->heldItemAction))) {
if ((CVarGetInteger("gShieldTwoHanded", 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK) ||
if ((CVarGetInteger(CVAR_CHEAT("ShieldTwoHanded"), 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK) ||
!Player_HoldsTwoHandedWeapon(this)) && !Player_IsChildWithHylianShield(this)) {
this->rightHandType = PLAYER_MODELTYPE_RH_SHIELD;
if (LINK_IS_CHILD && (CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && (this->currentShield == PLAYER_SHIELD_MIRROR)) {
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,11 +789,11 @@ 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;
}
if (CVarGetInteger("gTimelessEquipment", 0) || LINK_IS_ADULT) {
if (CVarGetInteger(CVAR_CHEAT("TimelessEquipment"), 0) || LINK_IS_ADULT) {
return strengthUpgrade;
} else if (strengthUpgrade != 0) {
return PLAYER_STR_BRACELET;
@@ -953,9 +953,9 @@ s32 Player_GetEnvironmentalHazard(PlayState* play) {
triggerEntry = &sTextTriggers[var];
if ((triggerEntry->flag != 0) && !(gSaveContext.textTriggerFlags & triggerEntry->flag) &&
(((var == 0) && (this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger("gSuperTunic", 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("gSuperTunic", 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)) {
@@ -1558,7 +1558,7 @@ void func_800906D4(PlayState* play, Player* this, Vec3f* newTipPos) {
void Player_DrawGetItemIceTrap(PlayState* play, Player* this, Vec3f* refPos, s32 drawIdPlusOne, f32 height) {
OPEN_DISPS(play->state.gfxCtx);
if (CVarGetInteger("gLetItSnow", 0)) {
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
@@ -1686,13 +1686,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);
@@ -1852,7 +1852,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];
@@ -1918,10 +1918,10 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
if (func_8002DD78(this) != 0) {
Matrix_Translate(500.0f, 300.0f, 0.0f, MTXMODE_APPLY);
Player_DrawHookshotReticle(
play, this, ((this->heldItemAction == PLAYER_IA_HOOKSHOT) ? 38600.0f : 77600.0f) * CVarGetFloat("gCheatHookshotReachMultiplier", 1.0f));
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) ||
@@ -2042,7 +2042,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;
}
@@ -2126,9 +2126,9 @@ 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),
pos->y - (CVarGetInteger("gPauseTriforce", 0) ? 16 : 0), pos->z, rot);
Matrix_Scale(scale * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1), scale, scale, MTXMODE_APPLY);
Matrix_SetTranslateRotateYXZ(pos->x - ((CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLink"), 0) && LINK_AGE_IN_YEARS == YEARS_ADULT) ? 25 : 0),
pos->y - (CVarGetInteger(CVAR_GENERAL("PauseTriforce"), 0) ? 16 : 0), pos->z, rot);
Matrix_Scale(scale * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1), scale, scale, MTXMODE_APPLY);
gSPSegment(POLY_OPA_DISP++, 0x04, seg04);
gSPSegment(POLY_OPA_DISP++, 0x06, seg06);
@@ -2146,11 +2146,11 @@ void Player_DrawPauseImpl(PlayState* play, void* seg04, void* seg06, SkelAnime*
Player_DrawImpl(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, 0, tunic, boots, 0,
Player_OverrideLimbDrawPause, NULL, &playerSwordAndShield);
if (CVarGetInteger("gPauseTriforce", 0)) {
if (CVarGetInteger(CVAR_GENERAL("PauseTriforce"), 0)) {
Matrix_SetTranslateRotateYXZ(pos->x - (LINK_AGE_IN_YEARS == YEARS_ADULT ? 25 : 0),
pos->y + 280 + (LINK_AGE_IN_YEARS == YEARS_ADULT ? 48 : 0), pos->z, rot);
Matrix_Scale(scale * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1), scale * 1, scale * 1, MTXMODE_APPLY);
Matrix_Scale(scale * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1), scale * 1, scale * 1, MTXMODE_APPLY);
Gfx* ohNo = POLY_XLU_DISP;
POLY_XLU_DISP = POLY_OPA_DISP;
@@ -2180,8 +2180,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);
@@ -2206,7 +2206,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(CVAR_GENERAL("PauseTriforce"), 0)) {
uintptr_t anim = 0; // Initialise anim
if (CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) >= EQUIP_VALUE_SWORD_BIGGORON) {
@@ -2363,7 +2363,7 @@ void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f*
//anim = gPlayerAnim_link_wait_itemD2_20f; // Use for biggoron sword?
if (CVarGetInteger("gPauseTriforce", 0)) {
if (CVarGetInteger(CVAR_GENERAL("PauseTriforce"), 0)) {
anim = gPlayerAnim_link_magic_kaze2;
sword = 0;
shield = 0;
+3 -2
View File
@@ -5,6 +5,7 @@
#include "global.h"
#include "vt.h"
#include "soh/Enhancements/randomizer/randomizer_entrance.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include <string.h>
#include <assert.h>
@@ -275,7 +276,7 @@ void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 hei
bg->b.imageFmt = fmt;
bg->b.imageSiz = siz;
bg->b.imagePal = 0;
bg->b.imageFlip = CVarGetInteger("gMirroredWorld", 0) ? G_BG_FLAG_FLIPS : 0;
bg->b.imageFlip = CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? G_BG_FLAG_FLIPS : 0;
// When an alt resource exists for the background, we need to unload the original asset
// to clear the cache so the alt asset will be loaded instead
@@ -412,7 +413,7 @@ BgImage* func_80096A74(PolygonType1* polygon1, PlayState* play) {
camera = GET_ACTIVE_CAM(play);
camId = camera->camDataIdx;
if (camId == -1 && (CVarGetInteger("gNoRestrictItems", 0) || CVarGetInteger("gCrowdControl", 0))) {
if (camId == -1 && (CVarGetInteger(CVAR_CHEAT("NoRestrictItems"), 0) || (CVarGetInteger(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL) == GI_SCHEME_CROWD_CONTROL && CVarGetInteger(CVAR_REMOTE("Enabled"), 0)))) {
// This prevents a crash when using items that change the
// camera (such as din's fire), voiding out or dying on
// scenes with prerendered backgrounds.
+3 -3
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;
+4 -4
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) {
@@ -221,7 +221,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
u16* ptr;
u16 checksum;
if (fileChooseCtx->buttonIndex != 0 || !CVarGetInteger("gDebugEnabled", 0)) {
if (fileChooseCtx->buttonIndex != 0 || !CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) {
Sram_InitNewSave();
} else {
Sram_InitDebugSave();
@@ -232,7 +232,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
gSaveContext.dayTime = 0x6AAB;
gSaveContext.cutsceneIndex = 0xFFF1;
if ((fileChooseCtx->buttonIndex == 0 && CVarGetInteger("gDebugEnabled", 0)) || CVarGetInteger("gNaviSkipCutscene", 0)) {
if ((fileChooseCtx->buttonIndex == 0 && CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0))) {
gSaveContext.cutsceneIndex = 0;
}
+2 -2
View File
@@ -432,7 +432,7 @@ s32 func_800AAA9C(View* view) {
}
osSyncPrintf("\n");
}
if (CVarGetInteger("gMirroredWorld", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
MtxF flipF;
SkinMatrix_Clear(&flipF);
flipF.xx = -1.0;
@@ -553,7 +553,7 @@ s32 func_800AB2C4(View* view) {
(f32)gScreenHeight * 0.5f, -30, view->zFar, view->scale);
// This is for z-targeting
if (CVarGetInteger("gMirroredWorld", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
MtxF flipF;
SkinMatrix_Clear(&flipF);
flipF.xx = -1.0;
@@ -85,7 +85,7 @@ void ArmsHook_Wait(ArmsHook* this, PlayState* play) {
if (this->actor.parent == NULL) {
Player* player = GET_PLAYER(play);
// get correct timer length for hookshot or longshot
s32 length = ((player->heldItemAction == PLAYER_IA_HOOKSHOT) ? 13 : 26) * CVarGetFloat("gCheatHookshotReachMultiplier", 1.0f);
s32 length = ((player->heldItemAction == PLAYER_IA_HOOKSHOT) ? 13 : 26) * CVarGetFloat(CVAR_CHEAT("HookshotReachMultiplier"), 1.0f);
ArmsHook_SetupAction(this, ArmsHook_Shoot);
func_8002D9A4(&this->actor, 20.0f);
@@ -258,7 +258,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
sp60.y = this->unk_1F4.y - (this->unk_1E8.y - this->unk_1F4.y);
sp60.z = this->unk_1F4.z - (this->unk_1E8.z - this->unk_1F4.z);
u16 buttonsToCheck = BTN_A | BTN_B | BTN_R | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN;
if (CVarGetInteger("gDpadEquips", 0) != 0) {
if (CVarGetInteger(CVAR_SETTING("DpadEquips"), 0) != 0) {
buttonsToCheck |= BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT;
}
if (BgCheck_EntityLineTest1(&play->colCtx, &sp60, &this->unk_1E8, &sp78, &poly, true, true, true, true,
@@ -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;
@@ -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)) {
@@ -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)) {
@@ -107,7 +107,7 @@ void BgBreakwall_Init(Actor* thisx, PlayState* play) {
s32 wallType = ((this->dyna.actor.params >> 13) & 3) & 0xFF;
// Initialize this with the mud wall, so it can't be affected by toggling while the actor is loaded
blueFireArrowsEnabledOnMudwallLoad = CVarGetInteger("gBlueFireArrows", 0) || (IS_RANDO && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
blueFireArrowsEnabledOnMudwallLoad = CVarGetInteger(CVAR_ENHANCEMENT("BlueFireArrows"), 0) || (IS_RANDO && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, DPM_UNK);
@@ -69,7 +69,7 @@ void func_8087B7E8(BgHaka* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (this->dyna.unk_150 != 0.0f) {
if (play->sceneNum == SCENE_GRAVEYARD && !LINK_IS_ADULT && IS_DAY && !CVarGetInteger("gDayGravePull", 0)) {
if (play->sceneNum == SCENE_GRAVEYARD && !LINK_IS_ADULT && IS_DAY && !CVarGetInteger(CVAR_ENHANCEMENT("DayGravePull"), 0)) {
this->dyna.unk_150 = 0.0f;
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
if (!Play_InCsMode(play)) {
@@ -211,9 +211,9 @@ void BgHakaGate_StatueTurn(BgHakaGate* this, PlayState* play) {
if (turnFinished) {
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
this->vRotYDeg10 = (this->vRotYDeg10 + turnAngle) % 3600;
this->vTurnRateDeg10 = CVarGetInteger("gFasterBlockPush", 0) * 2;
this->vTurnRateDeg10 = CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 2;
this->vTurnAngleDeg10 = 0;
this->vTimer = 5 - ((CVarGetInteger("gFasterBlockPush", 0) * 3) / 5);
this->vTimer = 5 - ((CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 3) / 5);
this->actionFunc = BgHakaGate_StatueIdle;
this->dyna.unk_150 = 0.0f;
}
@@ -181,7 +181,7 @@ void BgHakaTubo_DropCollectible(BgHakaTubo* this, PlayState* play) {
func_80078884(NA_SE_SY_ERROR);
} else {
// Random rewards
if (CVarGetInteger("gNoRandomDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NoRandomDrops"), 0)) {
collectibleParams = -1;
} else if(rnd < 0.4f) {
collectibleParams = ITEM00_BOMBS_A;
@@ -196,7 +196,7 @@ void BgHakaTubo_DropCollectible(BgHakaTubo* this, PlayState* play) {
}
} else if (Flags_GetCollectible(play, this->dyna.actor.params) != 0) {
// If small key already collected, drop recovery heart instead
if (CVarGetInteger("gNoHeartDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NoHeartDrops"), 0)) {
collectibleParams = -1;
}
else {
@@ -320,7 +320,7 @@ void BgHeavyBlock_Wait(BgHeavyBlock* this, PlayState* play) {
if (Actor_HasParent(&this->dyna.actor, play)) {
this->timer = 0;
if (!CVarGetInteger("gFasterHeavyBlockLift", 0)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 0)) {
switch (this->dyna.actor.params & 0xFF) {
case HEAVYBLOCK_BREAKABLE:
OnePointCutscene_Init(play, 4020, 270, &this->dyna.actor, MAIN_CAM);
@@ -369,7 +369,7 @@ void BgHeavyBlock_LiftedUp(BgHeavyBlock* this, PlayState* play) {
this->timer++;
if (!CVarGetInteger("gFasterHeavyBlockLift", 0)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 0)) {
Player_SetCsActionWithHaltedActors(play, &player->actor, 8);
}
@@ -409,7 +409,7 @@ void BgHeavyBlock_Fly(BgHeavyBlock* this, PlayState* play) {
Quake_SetCountdown(quakeIndex, 30);
// We don't want this arbitrarily long quake with the enhancement enabled
if (!CVarGetInteger("gFasterHeavyBlockLift", 0)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("FasterHeavyBlockLift"), 0)) {
quakeIndex = Quake_Add(GET_ACTIVE_CAM(play), 2);
Quake_SetSpeed(quakeIndex, 12000);
Quake_SetQuakeValues(quakeIndex, 5, 0, 0, 0);
@@ -137,9 +137,9 @@ void func_8088B268(BgHidanRock* this, PlayState* play) {
}
}
this->dyna.actor.speedXZ = this->dyna.actor.speedXZ + (CVarGetInteger("gFasterBlockPush", 0) * 0.3) + 0.5f;
this->dyna.actor.speedXZ = this->dyna.actor.speedXZ + (CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 0.3) + 0.5f;
this->dyna.actor.speedXZ =
CLAMP_MAX(this->dyna.actor.speedXZ, 2.0f + (CVarGetInteger("gFasterBlockPush", 0) * 0.5));
CLAMP_MAX(this->dyna.actor.speedXZ, 2.0f + (CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 0.5));
if (D_8088BFC0 > 0.0f) {
temp_v1 = Math_StepToF(&D_8088BFC0, 20.0f, this->dyna.actor.speedXZ);
@@ -157,7 +157,7 @@ void func_8088B268(BgHidanRock* this, PlayState* play) {
this->dyna.actor.home.pos.z = this->dyna.actor.world.pos.z;
D_8088BFC0 = 0.0f;
this->dyna.actor.speedXZ = 0.0f;
this->timer = 5 - ((CVarGetInteger("gFasterBlockPush", 0) * 3) / 5);
this->timer = 5 - ((CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 3) / 5);
}
func_8002F974(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
@@ -105,7 +105,7 @@ void func_80890740(BgIceShelter* this, PlayState* play) {
s32 type = (this->dyna.actor.params >> 8) & 7;
// Initialize this with the red ice, so it can't be affected by toggling while the actor is loaded
blueFireArrowsEnabledOnRedIceLoad = CVarGetInteger("gBlueFireArrows", 0) || (IS_RANDO && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
blueFireArrowsEnabledOnRedIceLoad = CVarGetInteger(CVAR_ENHANCEMENT("BlueFireArrows"), 0) || (IS_RANDO && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
Collider_InitCylinder(play, &this->cylinder1);
// If "Blue Fire Arrows" is enabled, set up a collider on the red ice that responds to them
@@ -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);
@@ -443,7 +443,7 @@ void func_80896950(BgJyaCobra* this, PlayState* play) {
if (this->dyna.unk_150 > 0.001f) {
this->unk_168++;
if (this->unk_168 >= (15 - CVarGetInteger("gFasterBlockPush", 0) * 2)) {
if (this->unk_168 >= (15 - CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 2)) {
func_808969F8(this, play);
}
} else {
@@ -478,7 +478,7 @@ void func_808969F8(BgJyaCobra* this, PlayState* play) {
this->unk_174.z = player->actor.world.pos.z - this->dyna.actor.world.pos.z;
this->unk_170 = 0;
this->unk_172 = true;
this->unk_16E = CVarGetInteger("gFasterBlockPush", 0) * 20;
this->unk_16E = CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 20;
}
void func_80896ABC(BgJyaCobra* this, PlayState* play) {
@@ -99,7 +99,7 @@ void BgJyaLift_DelayMove(BgJyaLift* this, PlayState* play) {
// The cutscene of the platform lowering will show the central room in an unloaded state if
// Link is not standing on the platform as it lowers. Therefore check for the Sunlight arrows
// enhancement and if it's enabled, check that Link is on the platform. Otherwise skip it.
if (!(CVarGetInteger("gSunlightArrows", 0) || Randomizer_GetSettingValue(RSK_SUNLIGHT_ARROWS)) ||
if (!(CVarGetInteger(CVAR_ENHANCEMENT("SunlightArrows"), 0) || Randomizer_GetSettingValue(RSK_SUNLIGHT_ARROWS)) ||
(GET_PLAYER(play)->actor.world.pos.x > -19.0f &&
GET_PLAYER(play)->actor.world.pos.x < 139.0f &&
GET_PLAYER(play)->actor.world.pos.z > -1172.0f &&
@@ -6,6 +6,7 @@
#include "z_bg_mori_bigst.h"
#include "objects/object_mori_objects/object_mori_objects.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED
@@ -221,8 +222,8 @@ 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))))) &&
!Player_InCsMode(play)) {
(Flags_GetTempClear(play, this->dyna.actor.room) && (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) ||
((CVarGetInteger(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL) == GI_SCHEME_CROWD_CONTROL && CVarGetInteger(CVAR_REMOTE("Enabled"), 0)))))) && !Player_InCsMode(play)) {
Flags_SetSwitch(play, (this->dyna.actor.params >> 8) & 0x3F);
BgMoriBigst_SetupDone(this, play);
}
@@ -94,7 +94,7 @@ void BgMoriKaitenkabe_Wait(BgMoriKaitenkabe* this, PlayState* play) {
if (this->dyna.unk_150 > 0.001f) {
this->timer++;
if ((this->timer > (28 - CVarGetInteger("gFasterBlockPush", 0) * 4)) && !Player_InCsMode(play)) {
if ((this->timer > (28 - CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 4)) && !Player_InCsMode(play)) {
BgMoriKaitenkabe_SetupRotate(this);
Player_SetCsActionWithHaltedActors(play, &this->dyna.actor, 8);
Math_Vec3f_Copy(&this->lockedPlayerPos, &player->actor.world.pos);
@@ -118,7 +118,7 @@ void BgMoriKaitenkabe_Wait(BgMoriKaitenkabe* this, PlayState* play) {
void BgMoriKaitenkabe_SetupRotate(BgMoriKaitenkabe* this) {
this->actionFunc = BgMoriKaitenkabe_Rotate;
this->rotSpeed = CVarGetInteger("gFasterBlockPush", 0) * 0.1f;
this->rotSpeed = CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 0.1f;
this->rotYdeg = 0.0f;
}
@@ -387,8 +387,8 @@ void BgPoEvent_BlockPush(BgPoEvent* this, PlayState* play) {
s32 blockStop;
Player* player = GET_PLAYER(play);
this->dyna.actor.speedXZ = this->dyna.actor.speedXZ + (CVarGetInteger("gFasterBlockPush", 0) * 0.3) + 0.5f;
this->dyna.actor.speedXZ = CLAMP_MAX(this->dyna.actor.speedXZ, 2.0f + (CVarGetInteger("gFasterBlockPush", 0) * 0.5));
this->dyna.actor.speedXZ = this->dyna.actor.speedXZ + (CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 0.3) + 0.5f;
this->dyna.actor.speedXZ = CLAMP_MAX(this->dyna.actor.speedXZ, 2.0f + (CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 0.5));
blockStop = Math_StepToF(&sBgPoEventblockPushDist, 20.0f, this->dyna.actor.speedXZ);
displacement = this->direction * sBgPoEventblockPushDist;
this->dyna.actor.world.pos.x = (Math_SinS(this->dyna.unk_158) * displacement) + this->dyna.actor.home.pos.x;
@@ -403,7 +403,7 @@ void BgPoEvent_BlockPush(BgPoEvent* this, PlayState* play) {
this->dyna.actor.home.pos.z = this->dyna.actor.world.pos.z;
sBgPoEventblockPushDist = 0.0f;
this->dyna.actor.speedXZ = 0.0f;
this->direction = 5 - ((CVarGetInteger("gFasterBlockPush", 0) * 3) / 5);
this->direction = 5 - ((CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 3) / 5);
sBgPoEventBlocksAtRest++;
this->actionFunc = BgPoEvent_BlockIdle;
if (this->type == 1) {
@@ -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;
}
@@ -251,7 +251,7 @@ void BgSpot06Objects_GateSpawnBubbles(BgSpot06Objects* this, PlayState* play) {
void BgSpot06Objects_GateWaitForSwitch(BgSpot06Objects* this, PlayState* play) {
s32 i;
if ((CVarGetInteger("gWaterTempleGateFix", 0) == 0 || LINK_IS_ADULT) && Flags_GetSwitch(play, this->switchFlag)) {
if (Flags_GetSwitch(play, this->switchFlag)) {
this->timer = 100;
this->dyna.actor.world.pos.y += 3.0f;
this->actionFunc = BgSpot06Objects_GateWaitToOpen;
@@ -260,9 +260,9 @@ void func_808B4194(BgSpot15Rrbox* this, PlayState* play) {
s32 approxFResult;
Actor* actor = &this->dyna.actor;
this->unk_174 = this->unk_174 + ((CVarGetInteger("gFasterBlockPush", 0) / 2) * 0.5) + 0.5f;
this->unk_174 = this->unk_174 + ((CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) / 2) * 0.5) + 0.5f;
this->unk_174 = CLAMP_MAX(this->unk_174, 2.0f + (CVarGetInteger("gFasterBlockPush", 0) * 0.5));
this->unk_174 = CLAMP_MAX(this->unk_174, 2.0f + (CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 0.5));
approxFResult = Math_StepToF(&this->unk_178, 20.0f, this->unk_174);
@@ -294,7 +294,7 @@ void func_808B4194(BgSpot15Rrbox* this, PlayState* play) {
this->dyna.unk_150 = 0.0f;
this->unk_178 = 0.0f;
this->unk_174 = 0.0f;
this->unk_168 = 10 - ((CVarGetInteger("gFasterBlockPush", 0) * 3) / 2);
this->unk_168 = 10 - ((CVarGetInteger(CVAR_ENHANCEMENT("FasterBlockPush"), 0) * 3) / 2);
func_808B4084(this, play);
}
Audio_PlayActorSound2(actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
@@ -297,7 +297,7 @@ void func_808B7F74(BgSpot18Basket* this) {
shapeRotY = this->dyna.actor.shape.rot.y;
this->actionFunc = func_808B7FC0;
if ((shapeRotY < -0x2E93) || (shapeRotY >= 0x7C19) || CVarGetInteger("gGoronPot", 0)) {
if ((shapeRotY < -0x2E93) || (shapeRotY >= 0x7C19) || CVarGetInteger(CVAR_ENHANCEMENT("GoronPot"), 0)) {
this->unk_218 = 2;
} else if (shapeRotY < 0x26C2) {
this->unk_218 = 1;
@@ -1240,7 +1240,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
static Color_RGBA8 bloodPrimColor = { 0, 120, 0, 255 };
static Color_RGBA8 bloodEnvColor = { 0, 120, 0, 255 };
if(CVarGetInteger("gRedGanonBlood", 0)) {
if(CVarGetInteger(CVAR_ENHANCEMENT("RedGanonBlood"), 0)) {
bloodPrimColor.r = 120;
bloodPrimColor.g = 0;
@@ -1486,7 +1486,7 @@ void func_8090109C(BossGanon2* this, PlayState* play) {
static Color_RGBA8 sPrimColor = { 0, 120, 0, 255 };
static Color_RGBA8 sEnvColor = { 0, 120, 0, 255 };
if(CVarGetInteger("gRedGanonBlood", 0)) {
if(CVarGetInteger(CVAR_ENHANCEMENT("RedGanonBlood"), 0)) {
sPrimColor.r = 120;
sPrimColor.g = 0;
@@ -445,7 +445,7 @@ void BossGoma_SetupCeilingIdle(BossGoma* this) {
void BossGoma_SetupFallJump(BossGoma* this) {
// When in Enemy Randomizer, reset the state of the spawned Gohma Larva because it's not done
// by the (non-existent) Larva themselves.
if (CVarGetInteger("gRandomizedEnemies", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
this->childrenGohmaState[0] = this->childrenGohmaState[1] = this->childrenGohmaState[2] = 0;
}
Animation_Change(&this->skelanime, &gGohmaLandAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -5.0f);
@@ -1559,14 +1559,14 @@ void BossGoma_CeilingIdle(BossGoma* this, PlayState* play) {
if (this->framesUntilNextAction == 0) {
Actor* nearbyEnTest = NULL;
if (CVarGetInteger("gRandomizedEnemies", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
nearbyEnTest = Actor_FindNearby(play, &this->actor, -1, ACTORCAT_ENEMY, 8000.0f);
}
if (this->childrenGohmaState[0] == 0 && this->childrenGohmaState[1] == 0 && this->childrenGohmaState[2] == 0) {
// if no child gohma has been spawned
BossGoma_SetupCeilingPrepareSpawnGohmas(this);
} else if ((this->childrenGohmaState[0] < 0 && this->childrenGohmaState[1] < 0 && this->childrenGohmaState[2] < 0) ||
(nearbyEnTest == NULL && CVarGetInteger("gRandomizedEnemies", 0))) {
(nearbyEnTest == NULL && CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0))) {
// In authentic gameplay, check if all baby Ghomas are dead. In Enemy Randomizer, check if there's no enemies alive.
BossGoma_SetupFallJump(this);
} else {
@@ -360,7 +360,7 @@ void BossSst_HeadSetupLurk(BossSst* this) {
}
void BossSst_HeadLurk(BossSst* this, PlayState* play) {
if (CVarGetInteger("gQuickBongoKill", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("QuickBongoKill"), 0)) {
this->colliderCyl.base.acFlags |= AC_ON;
}
@@ -371,7 +371,7 @@ void BossSst_HeadLurk(BossSst* this, PlayState* play) {
void BossSst_HeadSetupIntro(BossSst* this, PlayState* play) {
//Make sure to restore original behavior if the quick kill didn't happen
if (CVarGetInteger("gQuickBongoKill", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("QuickBongoKill"), 0)) {
this->colliderCyl.base.acFlags &= ~AC_ON;
}
@@ -2665,7 +2665,7 @@ void BossSst_UpdateHead(Actor* thisx, PlayState* play) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base);
}
if ((this->actionFunc != BossSst_HeadLurk || CVarGetInteger("gQuickBongoKill", 0)) && (this->actionFunc != BossSst_HeadIntro)) {
if ((this->actionFunc != BossSst_HeadLurk || CVarGetInteger(CVAR_ENHANCEMENT("QuickBongoKill"), 0)) && (this->actionFunc != BossSst_HeadIntro)) {
if (this->colliderCyl.base.acFlags & AC_ON) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCyl.base);
}
@@ -181,7 +181,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;
}
}
+1 -1
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) {
@@ -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;
@@ -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 };
}
@@ -6,6 +6,7 @@
#include "z_en_blkobj.h"
#include "objects/object_blkobj/object_blkobj.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#define FLAGS (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_DRAW_WHILE_CULLED)
@@ -104,8 +105,11 @@ 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(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL) == GI_SCHEME_CROWD_CONTROL && CVarGetInteger(CVAR_REMOTE("Enabled"), 0)) &&
Actor_Find(&play->actorCtx, ACTOR_EN_TORCH2, ACTORCAT_BOSS) == NULL) ||
((CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || (CVarGetInteger(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL) == GI_SCHEME_CROWD_CONTROL && CVarGetInteger(CVAR_REMOTE("Enabled"), 0))) &&
Flags_GetTempClear(play, this->dyna.actor.room));
if (roomCleared) {
Flags_SetClear(play, this->dyna.actor.room);
this->timer++;
@@ -110,8 +110,8 @@ void EnBom_Init(Actor* thisx, PlayState* play) {
Actor_SetScale(thisx, 0.01f);
}
if (CVarGetFloat("gBombTimerMultiplier", 1.0f) != 1.0f) {
this->timer = (s32)(70 * CVarGetFloat("gBombTimerMultiplier", 1.0f));
if (CVarGetFloat(CVAR_CHEAT("BombTimerMultiplier"), 1.0f) != 1.0f) {
this->timer = (s32)(70 * CVarGetFloat(CVAR_CHEAT("BombTimerMultiplier"), 1.0f));
// Do the sound and scale immediately if GameInteractor hasn't already.
if (!GameInteractor_GetRandomBombFuseTimerActive()) {
Audio_PlayActorSound2(thisx, NA_SE_PL_TAKE_OUT_SHIELD);
@@ -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 {
@@ -267,7 +267,7 @@ void EnBom_Update(Actor* thisx, PlayState* play2) {
}
// With random bomb fuse timer or gBombTimerMultiplier, sound effect and scaling is already done on init.
if (this->timer == 67 && !GameInteractor_GetRandomBombFuseTimerActive() && CVarGetFloat("gBombTimerMultiplier", 1.0f) == 1.0f) {
if (this->timer == 67 && !GameInteractor_GetRandomBombFuseTimerActive() && CVarGetFloat(CVAR_CHEAT("BombTimerMultiplier"), 1.0f) == 1.0f) {
Audio_PlayActorSound2(thisx, NA_SE_PL_TAKE_OUT_SHIELD);
Actor_SetScale(thisx, 0.01f);
}
@@ -281,7 +281,7 @@ void EnBom_Update(Actor* thisx, PlayState* play2) {
Actor_UpdateBgCheckInfo(play, thisx, 5.0f, 10.0f, 15.0f, 0x1F);
if (thisx->params == BOMB_BODY) {
float timerMultiplier = CVarGetFloat("gBombTimerMultiplier", 1.0f);
float timerMultiplier = CVarGetFloat(CVAR_CHEAT("BombTimerMultiplier"), 1.0f);
if (this->timer < (timerMultiplier == 1.0f ? 63 : (s32)(70 * timerMultiplier - 7))) {
dustAccel.y = 0.2f;
@@ -397,7 +397,7 @@ void EnBom_Draw(Actor* thisx, PlayState* play) {
if (thisx->params == BOMB_BODY) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
if (!CVarGetInteger("gDisableBombBillboarding", 0)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("DisableBombBillboarding"), 0)) {
Matrix_ReplaceRotation(&play->billboardMtxF);
}
func_8002EBCC(thisx, play, 0);
@@ -69,7 +69,7 @@ void EnBomBowlMan_Init(Actor* thisx, PlayState* play2) {
Actor_SetScale(&this->actor, 0.013f);
for (i = 0; i < 2; i++) {
if(CVarGetInteger("gCustomizeBombchuBowling", 0) && CVarGetInteger(i == 0 ? "gBombchuBowlingNoSmallCucco" : "gBombchuBowlingNoBigCucco", 0)) {
if(CVarGetInteger(CVAR_ENHANCEMENT("CustomizeBombchuBowling"), 0) && CVarGetInteger(i == 0 ? CVAR_ENHANCEMENT("BombchuBowlingNoSmallCucco") : CVAR_ENHANCEMENT("BombchuBowlingNoBigCucco"), 0)) {
continue;
}
@@ -327,8 +327,8 @@ void EnBomBowlMan_HandlePlayChoice(EnBomBowlMan* this, PlayState* play) {
Rupees_ChangeBy(-30);
this->minigamePlayStatus = 1;
this->wallStatus[0] = this->wallStatus[1] = 0;
if(CVarGetInteger("gCustomizeBombchuBowling", 0)) {
play->bombchuBowlingStatus = CVarGetInteger("gBombchuBowlingAmmunition", 10);
if(CVarGetInteger(CVAR_ENHANCEMENT("CustomizeBombchuBowling"), 0)) {
play->bombchuBowlingStatus = CVarGetInteger(CVAR_ENHANCEMENT("BombchuBowlingAmmo"), 10);
}
else {
play->bombchuBowlingStatus = 10;
@@ -139,7 +139,7 @@ void EnBomChu_UpdateFloorPoly(EnBomChu* this, CollisionPoly* floorPoly, PlayStat
f32 normDotUp;
MtxF mf;
if (CVarGetInteger("gBombchusOOB", 0) && floorPoly == NULL) {
if (CVarGetInteger(CVAR_ENHANCEMENT("BombchusOOB"), 0) && floorPoly == NULL) {
EnBomChu_Explode(this, play);
return;
}
@@ -491,7 +491,7 @@ void EnBomChu_Draw(Actor* thisx, PlayState* play) {
f32 colorIntensity;
s32 blinkHalfPeriod;
s32 blinkTime;
Color_RGB8 BombchuCol = CVarGetColor24("gBombTrailCol", BombchuColorOriginal);
Color_RGB8 BombchuCol = CVarGetColor24(CVAR_COSMETIC("Trails.Bombchu.Value"), BombchuColorOriginal);
OPEN_DISPS(play->state.gfxCtx);
@@ -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 {
@@ -577,8 +577,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)) ||
@@ -673,7 +673,7 @@ void EnBox_UpdateSizeAndTexture(EnBox* this, PlayState* play) {
}
}
if (CVarGetInteger("gLetItSnow", 0) && hasChristmasChestTexturesAvailable && hasCreatedRandoChestTextures && !hasCustomChestDLs) {
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0) && hasChristmasChestTexturesAvailable && hasCreatedRandoChestTextures && !hasCustomChestDLs) {
if (this->dyna.actor.scale.x == 0.01f) {
this->boxBodyDL = gChristmasRedTreasureChestChestFrontDL;
this->boxLidDL = gChristmasRedTreasureChestChestSideAndLidDL;
@@ -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(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL) == GI_SCHEME_CROWD_CONTROL && CVarGetInteger(CVAR_REMOTE("Enabled"), 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) &&
@@ -283,7 +283,7 @@ void EnCrow_FlyIdle(EnCrow* this, PlayState* play) {
}
if ((this->timer == 0) && (this->actor.xzDistToPlayer < 300.0f) && !(player->stateFlags1 & PLAYER_STATE1_ON_HORSE) &&
(this->actor.yDistToWater < -40.0f) && (Player_GetMask(play) != PLAYER_MASK_SKULL) &&
!CVarGetInteger("gNoKeeseGuayTarget", 0)) {
!CVarGetInteger(CVAR_CHEAT("NoKeeseGuayTarget"), 0)) {
EnCrow_SetupDiveAttack(this);
}
}
@@ -321,7 +321,7 @@ void EnCrow_DiveAttack(EnCrow* this, PlayState* play) {
if ((this->timer == 0) || (Player_GetMask(play) == PLAYER_MASK_SKULL) ||
(this->collider.base.atFlags & AT_HIT) || (this->actor.bgCheckFlags & 9) ||
(player->stateFlags1 & PLAYER_STATE1_ON_HORSE) || (this->actor.yDistToWater > -40.0f) ||
CVarGetInteger("gNoKeeseGuayTarget", 0)) {
CVarGetInteger(CVAR_CHEAT("NoKeeseGuayTarget"), 0)) {
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_KAICHO_ATTACK);
@@ -364,7 +364,7 @@ void EnCrow_Die(EnCrow* this, PlayState* play) {
} else {
Item_DropCollectible(play, &this->actor.world.pos, ITEM00_RUPEE_RED);
}
if (!CVarGetInteger("gRandomizedEnemies", 0)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0)) {
EnCrow_SetupRespawn(this);
} else {
Actor_Kill(this);
@@ -373,7 +373,7 @@ void EnDog_FollowPlayer(EnDog* this, PlayState* play) {
return;
}
if (CVarGetInteger("gDogFollowsEverywhere", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("DogFollowsEverywhere"), 0)) {
// If the dog is too far away it's usually because they are stuck in a hole or on a different floor, this gives them a push
if (this->actor.xyzDistToPlayerSq > 250000.0f) {
Player* player = GET_PLAYER(play);
@@ -394,7 +394,7 @@ void EnDog_FollowPlayer(EnDog* this, PlayState* play) {
}
if (this->actor.xzDistToPlayer > 400.0f) {
if (CVarGetInteger("gDogFollowsEverywhere", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("DogFollowsEverywhere"), 0)) {
// Instead of stopping following when the dog gets too far, just speed them up.
speed = this->actor.xzDistToPlayer / 25.0f;
} else {
@@ -419,7 +419,7 @@ void EnDog_FollowPlayer(EnDog* this, PlayState* play) {
Math_ApproachF(&this->actor.speedXZ, speed, 0.6f, 1.0f);
if (!(this->actor.xzDistToPlayer > 400.0f) || CVarGetInteger("gDogFollowsEverywhere", 0)) {
if (!(this->actor.xzDistToPlayer > 400.0f) || CVarGetInteger(CVAR_ENHANCEMENT("DogFollowsEverywhere"), 0)) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 10, 1000, 1);
this->actor.shape.rot = this->actor.world.rot;
}
@@ -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);
@@ -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);
+3 -3
View File
@@ -277,7 +277,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 {
@@ -299,7 +299,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 {
@@ -496,7 +496,7 @@ void func_809FE890(EnDu* this, PlayState* play) {
if (csAction->action == 7 || csAction->action == 8) {
this->unk_1E6 = 0;
// #region SOH[Enhancement]
if (CVarGetInteger("gEnhancements.FixDaruniaDanceSpeed", 1)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("FixDaruniaDanceSpeed"), 1)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfoFix, ENDU_ANIM_7);
// #endregion
} else {
@@ -631,15 +631,15 @@ void func_80A0329C(EnElf* this, PlayState* play) {
if ((heightDiff > 0.0f) && (heightDiff < 60.0f)) {
if (!func_80A01F90(&this->actor.world.pos, &refActor->actor.world.pos, 10.0f)) {
if (CVarGetInteger("gFairyEffect", 0) && !(this->fairyFlags & FAIRY_FLAG_BIG))
if (CVarGetInteger(CVAR_ENHANCEMENT("FairyEffect"), 0) && !(this->fairyFlags & FAIRY_FLAG_BIG))
{
if (CVarGetInteger("gFairyPercentRestore", 0))
if (CVarGetInteger(CVAR_ENHANCEMENT("FairyPercentRestore"), 0))
{
Health_ChangeBy(play, (gSaveContext.healthCapacity * CVarGetInteger("gFairyHealth", 100) / 100 + 15) / 16 * 16);
Health_ChangeBy(play, (gSaveContext.healthCapacity * CVarGetInteger(CVAR_ENHANCEMENT("FairyHealth"), 100) / 100 + 15) / 16 * 16);
}
else
{
Health_ChangeBy(play, CVarGetInteger("gFairyHealth", 8) * 16);
Health_ChangeBy(play, CVarGetInteger(CVAR_ENHANCEMENT("FairyHealth"), 8) * 16);
}
}
else
@@ -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);
@@ -169,7 +169,7 @@ void EnEncount1_SpawnLeevers(EnEncount1* this, PlayState* play) {
break;
}
}
int32_t modifiedSpawnRate = CVarGetInteger("gEnhancements.LeeverSpawnRate", 0);
int32_t modifiedSpawnRate = CVarGetInteger(CVAR_ENHANCEMENT("LeeverSpawnRate"), 0);
if (modifiedSpawnRate) {
this->timer = 20 * modifiedSpawnRate;
}
@@ -248,9 +248,9 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, PlayState* play) {
// been spawned and/or killed.
int8_t enemyCount = play->actorCtx.actorLists[ACTORCAT_ENEMY].length;
if ((this->curNumSpawn < this->maxCurSpawns && this->totalNumSpawn < this->maxTotalSpawns) ||
(CVarGetInteger("gRandomizedEnemies", 0) && enemyCount < 15)) {
(CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && enemyCount < 15)) {
while ((this->curNumSpawn < this->maxCurSpawns && this->totalNumSpawn < this->maxTotalSpawns) ||
(CVarGetInteger("gRandomizedEnemies", 0) && enemyCount < 15)) {
(CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && enemyCount < 15)) {
if (play->sceneNum == SCENE_HYRULE_FIELD) {
if ((player->floorSfxOffset == 0) || (player->actor.floorBgId != BGCHECK_SCENE) ||
!(player->actor.bgCheckFlags & 1) || (player->stateFlags1 & PLAYER_STATE1_IN_WATER)) {
@@ -282,7 +282,7 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, PlayState* play) {
break;
}
if ((player->actor.yDistToWater != BGCHECK_Y_MIN) &&
(floorY < (player->actor.world.pos.y + player->actor.yDistToWater*(CVarGetInteger("gEnemySpawnsOverWaterboxes", 0) ? 1 : -1)))) {
(floorY < (player->actor.world.pos.y + player->actor.yDistToWater*(CVarGetInteger(CVAR_ENHANCEMENT("EnemySpawnsOverWaterboxes"), 0) ? 1 : -1)))) {
break;
}
spawnPos.y = floorY;
@@ -388,7 +388,7 @@ void EnExRuppy_Draw(Actor* thisx, PlayState* play) {
if (!this->invisible) {
OPEN_DISPS(play->state.gfxCtx);
if (CVarGetInteger("gNewDrops", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
// purple/gold rupees need less scaling
f32 mtxScale = this->colorIdx >= 3 ? 17.5f : 25.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
@@ -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;
}
@@ -416,7 +416,7 @@ void EnFirefly_FlyIdle(EnFirefly* this, PlayState* play) {
}
if ((this->timer == 0) && (this->actor.xzDistToPlayer < 200.0f) &&
(Player_GetMask(play) != PLAYER_MASK_SKULL) &&
!CVarGetInteger("gNoKeeseGuayTarget", 0)) {
!CVarGetInteger(CVAR_CHEAT("NoKeeseGuayTarget"), 0)) {
EnFirefly_SetupDiveAttack(this);
}
}
@@ -495,7 +495,7 @@ void EnFirefly_DiveAttack(EnFirefly* this, PlayState* play) {
Math_ScaledStepToS(&this->actor.shape.rot.x, this->targetPitch, 0x100);
}
if ((this->timer == 0) || (Player_GetMask(play) == PLAYER_MASK_SKULL) ||
CVarGetInteger("gNoKeeseGuayTarget", 0)) {
CVarGetInteger(CVAR_CHEAT("NoKeeseGuayTarget"), 0)) {
EnFirefly_SetupFlyAway(this);
}
}
@@ -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;
@@ -681,7 +681,7 @@ void EnFish_UpdateCutscene(EnFish* this, PlayState* play) {
// Update functions and Draw
void EnFish_OrdinaryUpdate(EnFish* this, PlayState* play) {
if (this->timer > 0 && CVarGetInteger("gNoFishDespawn", 0) == 0) {
if (this->timer > 0 && CVarGetInteger(CVAR_CHEAT("NoFishDespawn"), 0) == 0) {
this->timer--;
}
@@ -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;
}
@@ -245,7 +245,7 @@ s32 EnGe3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
rot->x += this->headRot.y;
default:
if (CVarGetInteger("gGerudoWarriorClothingFix", 0)) {
if (CVarGetInteger(CVAR_ENHANCEMENT("GerudoWarriorClothingFix"), 0)) {
// This is a hack to fix the color-changing clothes this Gerudo has on N64 versions
OPEN_DISPS(play->state.gfxCtx);
switch (limbIndex) {
@@ -493,7 +493,7 @@ s32 EnGirlA_CanBuy_DekuNuts(PlayState* play, EnGirlA* this) {
if (gSaveContext.rupees < this->basePrice) {
return CANBUY_RESULT_NEED_RUPEES;
}
if ((Item_CheckObtainability(ITEM_NUT) == ITEM_NONE) && !CVarGetInteger("gFastDrops", 0)) {
if ((Item_CheckObtainability(ITEM_NUT) == ITEM_NONE) && !CVarGetInteger(CVAR_ENHANCEMENT("FastDrops"), 0)) {
return CANBUY_RESULT_SUCCESS_FANFARE;
}
return CANBUY_RESULT_SUCCESS;
@@ -506,7 +506,7 @@ s32 EnGirlA_CanBuy_DekuSticks(PlayState* play, EnGirlA* this) {
if (gSaveContext.rupees < this->basePrice) {
return CANBUY_RESULT_NEED_RUPEES;
}
if ((Item_CheckObtainability(ITEM_STICK) == ITEM_NONE) && !CVarGetInteger("gFastDrops", 0)) {
if ((Item_CheckObtainability(ITEM_STICK) == ITEM_NONE) && !CVarGetInteger(CVAR_ENHANCEMENT("FastDrops"), 0)) {
return CANBUY_RESULT_SUCCESS_FANFARE;
}
return CANBUY_RESULT_SUCCESS;
@@ -705,7 +705,7 @@ s32 EnGirlA_CanBuy_DekuSeeds(PlayState* play, EnGirlA* this) {
if (gSaveContext.rupees < this->basePrice) {
return CANBUY_RESULT_NEED_RUPEES;
}
if ((Item_CheckObtainability(ITEM_SEEDS) == ITEM_NONE) && !CVarGetInteger("gFastDrops", 0)) {
if ((Item_CheckObtainability(ITEM_SEEDS) == ITEM_NONE) && !CVarGetInteger(CVAR_ENHANCEMENT("FastDrops"), 0)) {
return CANBUY_RESULT_SUCCESS_FANFARE;
}
return CANBUY_RESULT_SUCCESS;
@@ -1316,7 +1316,7 @@ void EnGo2_RollingAnimation(EnGo2* this, PlayState* play) {
}
void EnGo2_WakeUp(EnGo2* this, PlayState* play) {
if (CVarGetInteger("gUnfixGoronSpin", 0)) {
if (CVarGetInteger(CVAR_COSMETIC("UnfixGoronSpin"), 0)) {
// Trick SkelAnime into thinking the current animation is changing so that it morphs between the same position,
// making the goron do a spin
this->skelAnime.animation = NULL;
@@ -2039,7 +2039,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);
+2 -2
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);
@@ -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;
@@ -3042,7 +3042,7 @@ void EnHorse_StickDirection(Vec2f* curStick, f32* stickMag, s16* angle) {
void EnHorse_UpdateStick(EnHorse* this, PlayState* play) {
this->lastStick = this->curStick;
this->curStick.x = play->state.input[0].rel.stick_x * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1);
this->curStick.x = play->state.input[0].rel.stick_x * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1);
this->curStick.y = play->state.input[0].rel.stick_y;
}
@@ -3312,7 +3312,7 @@ void EnHorse_CheckBoost(EnHorse* thisx, PlayState* play2) {
this->stateFlags |= ENHORSE_BOOST;
this->stateFlags |= ENHORSE_FIRST_BOOST_REGEN;
this->stateFlags |= ENHORSE_FLAG_8;
if (!CVarGetInteger("gInfiniteEpona", 0)) { this->numBoosts--; }
if (!CVarGetInteger(CVAR_CHEAT("InfiniteEponaBoost"), 0)) { this->numBoosts--; }
this->boostTimer = 0;
if (this->numBoosts == 0) {
this->boostRegenTime = 140;
+1 -1
View File
@@ -439,7 +439,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;
}
+9 -6
View File
@@ -233,7 +233,8 @@ 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(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL) == GI_SCHEME_CROWD_CONTROL && CVarGetInteger(CVAR_REMOTE("Enabled"), 0));
if (this->switchFlags != 0xFF) {
// In vanilla gameplay, Iron Knuckles are despawned based on specific flags in specific scenarios.
@@ -303,7 +304,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 +664,8 @@ 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(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL) == GI_SCHEME_CROWD_CONTROL && CVarGetInteger(CVAR_REMOTE("Enabled"), 0))) {
Flags_SetSwitch(play, this->switchFlags);
}
Actor_Kill(&this->actor);
@@ -810,8 +812,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);
@@ -1466,7 +1468,8 @@ 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(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL) == GI_SCHEME_CROWD_CONTROL && CVarGetInteger(CVAR_REMOTE("Enabled"), 0)))
&& (thisx->params == 2 || thisx->params == 3)) {
this->skelAnime.playSpeed = 1.0f;
}
}
@@ -213,7 +213,7 @@ void EnInsect_Init(Actor* thisx, PlayState* play2) {
// For bugs that aren't linked to a soil patch, we remove the "short lived" flag to prevent them from despawning
// And exit early to not increment the "bugs dropped count"
if (CVarGetInteger("gNoBugsDespawn", 0) && this->soilActor == NULL) {
if (CVarGetInteger(CVAR_CHEAT("NoBugsDespawn"), 0) && this->soilActor == NULL) {
this->unk_314 &= ~4;
return;
}
@@ -127,7 +127,7 @@ void func_80A90264(EnKakasi2* this, PlayState* play) {
bool hasTwoOcarinaButtons = !IS_RANDO || ocarinaButtonCount >= 2;
bool skipScarecrow = hasTwoOcarinaButtons && 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) &&
+4 -4
View File
@@ -1084,7 +1084,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;
@@ -1353,9 +1353,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;
@@ -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) {
+2 -2
View File
@@ -302,7 +302,7 @@ s32 EnKz_FollowPath(EnKz* this, PlayState* play) {
pathDiffZ = pointPos->z - this->actor.world.pos.z;
Math_SmoothStepToS(&this->actor.world.rot.y, (Math_FAtan2F(pathDiffX, pathDiffZ) * (0x8000 / M_PI)), 0xA, 0x3E8, 1);
if ((SQ(pathDiffX) + SQ(pathDiffZ)) < 10.0f * CVarGetInteger("gMweepSpeed", 1)) {
if ((SQ(pathDiffX) + SQ(pathDiffZ)) < 10.0f * CVarGetInteger(CVAR_ENHANCEMENT("MweepSpeed"), 1)) {
this->waypoint++;
if (this->waypoint >= path->count) {
this->waypoint = 0;
@@ -397,7 +397,7 @@ void EnKz_SetupMweep(EnKz* this, PlayState* play) {
initPos.z += 260.0f;
Play_CameraSetAtEye(play, this->cutsceneCamera, &pos, &initPos);
Player_SetCsActionWithHaltedActors(play, &this->actor, 8);
this->actor.speedXZ = 0.1f * CVarGetInteger("gMweepSpeed", 1);
this->actor.speedXZ = 0.1f * CVarGetInteger(CVAR_ENHANCEMENT("MweepSpeed"), 1);
this->actionFunc = EnKz_Mweep;
}

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