mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-21 08:55:04 -05:00
Final Step of CVar macro/sectionalizing (#4107)
* p * Missed the prefix renames. * More missed ones. * Mostly finished cleanup. Removed a few CVars and some related functionality. * Bit more (prepping non-existent title card color editing). * Resolve gCrowdControl. * Final cleanup. * Universal constant, not acceleration... * Preset CVars.
This commit is contained in:
parent
b6fc54ad8b
commit
6443a986d9
@ -9,6 +9,7 @@
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <z64.h>
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
uint8_t gLoadFileSelect = 0, gSkipLogoTest = 0;
|
||||
|
||||
@ -21,13 +22,13 @@ static BootCommand sCommands[] = { { "--skiplogo", BootCommands_Command_SkipLogo
|
||||
void BootCommands_Init()
|
||||
{
|
||||
// Clears vars to prevent randomizer menu from being disabled
|
||||
CVarClear("gRandoGenerating"); // Clear when a crash happened during rando seed generation
|
||||
CVarClear("gNewSeedGenerated");
|
||||
CVarClear("gOnFileSelectNameEntry"); // Clear when soh is killed on the file name entry page
|
||||
CVarClear("gBetterDebugWarpScreenMQMode");
|
||||
CVarClear("gBetterDebugWarpScreenMQModeScene");
|
||||
CVarClear("gCheatEasyPauseBufferLastInputs");
|
||||
CVarClear("gCheatEasyPauseBufferTimer");
|
||||
CVarClear(CVAR_GENERAL("RandoGenerating")); // Clear when a crash happened during rando seed generation
|
||||
CVarClear(CVAR_GENERAL("NewSeedGenerated"));
|
||||
CVarClear(CVAR_GENERAL("OnFileSelectNameEntry")); // Clear when soh is killed on the file name entry page
|
||||
CVarClear(CVAR_GENERAL("BetterDebugWarpScreenMQMode"));
|
||||
CVarClear(CVAR_GENERAL("BetterDebugWarpScreenMQModeScene"));
|
||||
CVarClear(CVAR_GENERAL("CheatEasyPauseBufferLastInputs"));
|
||||
CVarClear(CVAR_GENERAL("CheatEasyPauseBufferTimer"));
|
||||
#if defined(__SWITCH__) || defined(__WIIU__)
|
||||
CVarRegisterInteger(CVAR_IMGUI_CONTROLLER_NAV, 1); // always enable controller nav on switch/wii u
|
||||
#endif
|
||||
|
@ -126,12 +126,12 @@ void InputViewer::DrawElement() {
|
||||
ImVec2 size = ImGui::GetContentRegionAvail();
|
||||
|
||||
#ifdef __WIIU__
|
||||
const float scale = CVarGetFloat("gInputViewer.Scale", 1.0f) * 2.0f;
|
||||
const float scale = CVarGetFloat(CVAR_INPUT_VIEWER("Scale"), 1.0f) * 2.0f;
|
||||
#else
|
||||
const float scale = CVarGetFloat("gInputViewer.Scale", 1.0f);
|
||||
const float scale = CVarGetFloat(CVAR_INPUT_VIEWER("Scale"), 1.0f);
|
||||
#endif
|
||||
const int showAnalogAngles = CVarGetInteger("gInputViewer.AnalogAngles.Enabled", 0);
|
||||
const int buttonOutlineMode = CVarGetInteger("gInputViewer.ButtonOutlineMode", BUTTON_OUTLINE_NOT_PRESSED);
|
||||
const int showAnalogAngles = CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Enabled"), 0);
|
||||
const int buttonOutlineMode = CVarGetInteger(CVAR_INPUT_VIEWER("ButtonOutlineMode"), BUTTON_OUTLINE_NOT_PRESSED);
|
||||
|
||||
ImVec2 bgSize = Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureSize("Input-Viewer-Background");
|
||||
ImVec2 scaledBGSize = ImVec2(bgSize.x * scale, bgSize.y * scale);
|
||||
@ -139,10 +139,10 @@ void InputViewer::DrawElement() {
|
||||
ImGui::SetNextWindowSize(ImVec2(
|
||||
scaledBGSize.x + 20,
|
||||
scaledBGSize.y +
|
||||
(showAnalogAngles ? ImGui::CalcTextSize("X").y : 0) * scale * CVarGetFloat("gInputViewer.AnalogAngles.Scale", 1.0f) + 20));
|
||||
(showAnalogAngles ? ImGui::CalcTextSize("X").y : 0) * scale * CVarGetFloat(CVAR_INPUT_VIEWER("AnalogAngles.Scale"), 1.0f) + 20));
|
||||
ImGui::SetNextWindowContentSize(
|
||||
ImVec2(scaledBGSize.x, scaledBGSize.y + (showAnalogAngles ? 15 : 0) * scale *
|
||||
CVarGetFloat("gInputViewer.AnalogAngles.Scale", 1.0f)));
|
||||
CVarGetFloat(CVAR_INPUT_VIEWER("AnalogAngles.Scale"), 1.0f)));
|
||||
ImGui::SetNextWindowPos(
|
||||
ImVec2(mainPos.x + size.x - scaledBGSize.x - 30, mainPos.y + size.y - scaledBGSize.y - 30),
|
||||
ImGuiCond_FirstUseEver);
|
||||
@ -156,7 +156,7 @@ void InputViewer::DrawElement() {
|
||||
ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoBackground |
|
||||
ImGuiWindowFlags_NoFocusOnAppearing;
|
||||
|
||||
if (!CVarGetInteger("gInputViewer.EnableDragging", 1)) {
|
||||
if (!CVarGetInteger(CVAR_INPUT_VIEWER("EnableDragging"), 1)) {
|
||||
windowFlags |= ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoMove;
|
||||
}
|
||||
|
||||
@ -164,7 +164,7 @@ void InputViewer::DrawElement() {
|
||||
ImGui::SetCursorPos(ImVec2(10, 10));
|
||||
const ImVec2 aPos = ImGui::GetCursorPos();
|
||||
|
||||
if (CVarGetInteger("gInputViewer.ShowBackground", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("ShowBackground"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
// Background
|
||||
ImGui::Image(
|
||||
@ -173,59 +173,59 @@ void InputViewer::DrawElement() {
|
||||
}
|
||||
|
||||
// A/B
|
||||
if (CVarGetInteger("gInputViewer.BBtn", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("BBtn"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("B-Btn", "B-Btn Outline", pads[0].button & BTN_B, scaledBGSize, buttonOutlineMode);
|
||||
}
|
||||
if (CVarGetInteger("gInputViewer.ABtn", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("ABtn"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("A-Btn", "A-Btn Outline", pads[0].button & BTN_A, scaledBGSize, buttonOutlineMode);
|
||||
}
|
||||
|
||||
// C buttons
|
||||
if (CVarGetInteger("gInputViewer.CUp", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("CUp"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("C-Up", "C-Up Outline", pads[0].button & BTN_CUP, scaledBGSize, buttonOutlineMode);
|
||||
}
|
||||
if (CVarGetInteger("gInputViewer.CLeft", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("CLeft"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("C-Left", "C-Left Outline", pads[0].button & BTN_CLEFT, scaledBGSize, buttonOutlineMode);
|
||||
}
|
||||
if (CVarGetInteger("gInputViewer.CRight", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("CRight"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("C-Right", "C-Right Outline", pads[0].button & BTN_CRIGHT, scaledBGSize,
|
||||
buttonOutlineMode);
|
||||
}
|
||||
if (CVarGetInteger("gInputViewer.CDown", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("CDown"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("C-Down", "C-Down Outline", pads[0].button & BTN_CDOWN, scaledBGSize, buttonOutlineMode);
|
||||
}
|
||||
|
||||
// L/R/Z
|
||||
if (CVarGetInteger("gInputViewer.LBtn", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("LBtn"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("L-Btn", "L-Btn Outline", pads[0].button & BTN_L, scaledBGSize, buttonOutlineMode);
|
||||
}
|
||||
if (CVarGetInteger("gInputViewer.RBtn", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("RBtn"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("R-Btn", "R-Btn Outline", pads[0].button & BTN_R, scaledBGSize, buttonOutlineMode);
|
||||
}
|
||||
if (CVarGetInteger("gInputViewer.ZBtn", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("ZBtn"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("Z-Btn", "Z-Btn Outline", pads[0].button & BTN_Z, scaledBGSize, buttonOutlineMode);
|
||||
}
|
||||
|
||||
// Start
|
||||
if (CVarGetInteger("gInputViewer.StartBtn", 1)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("StartBtn"), 1)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("Start-Btn", "Start-Btn Outline", pads[0].button & BTN_START, scaledBGSize,
|
||||
@ -233,7 +233,7 @@ void InputViewer::DrawElement() {
|
||||
}
|
||||
|
||||
// Dpad
|
||||
if (CVarGetInteger("gInputViewer.Dpad", 0)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("Dpad"), 0)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
ImGui::SetCursorPos(aPos);
|
||||
RenderButton("Dpad-Left", "Dpad-Left Outline", pads[0].button & BTN_DLEFT, scaledBGSize,
|
||||
@ -256,8 +256,8 @@ void InputViewer::DrawElement() {
|
||||
|
||||
// Analog Stick
|
||||
const int analogOutlineMode =
|
||||
CVarGetInteger("gInputViewer.AnalogStick.OutlineMode", STICK_MODE_ALWAYS_SHOWN);
|
||||
const float maxStickDistance = CVarGetInteger("gInputViewer.AnalogStick.Movement", 12);
|
||||
CVarGetInteger(CVAR_INPUT_VIEWER("AnalogStick.OutlineMode"), STICK_MODE_ALWAYS_SHOWN);
|
||||
const float maxStickDistance = CVarGetInteger(CVAR_INPUT_VIEWER("AnalogStick.Movement"), 12);
|
||||
if (analogOutlineMode == STICK_MODE_ALWAYS_SHOWN ||
|
||||
(analogOutlineMode == STICK_MODE_HIDDEN_IN_DEADZONE && !analogStickIsInDeadzone)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
@ -267,7 +267,7 @@ void InputViewer::DrawElement() {
|
||||
scaledBGSize, ImVec2(0, 0), ImVec2(1.0f, 1.0f), ImVec4(255, 255, 255, 255));
|
||||
}
|
||||
const int analogStickMode =
|
||||
CVarGetInteger("gInputViewer.AnalogStick.VisibilityMode", STICK_MODE_ALWAYS_SHOWN);
|
||||
CVarGetInteger(CVAR_INPUT_VIEWER("AnalogStick.VisibilityMode"), STICK_MODE_ALWAYS_SHOWN);
|
||||
if (analogStickMode == STICK_MODE_ALWAYS_SHOWN ||
|
||||
(analogStickMode == STICK_MODE_HIDDEN_IN_DEADZONE && !analogStickIsInDeadzone)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
@ -279,9 +279,9 @@ void InputViewer::DrawElement() {
|
||||
}
|
||||
|
||||
// Right Stick
|
||||
const float maxRightStickDistance = CVarGetInteger("gInputViewer.RightStick.Movement", 7);
|
||||
const float maxRightStickDistance = CVarGetInteger(CVAR_INPUT_VIEWER("RightStick.Movement"), 7);
|
||||
const int rightOutlineMode =
|
||||
CVarGetInteger("gInputViewer.RightStick.OutlineMode", STICK_MODE_ALWAYS_HIDDEN);
|
||||
CVarGetInteger(CVAR_INPUT_VIEWER("RightStick.OutlineMode"), STICK_MODE_ALWAYS_HIDDEN);
|
||||
if (rightOutlineMode == STICK_MODE_ALWAYS_SHOWN ||
|
||||
(rightOutlineMode == STICK_MODE_HIDDEN_IN_DEADZONE && !rightStickIsInDeadzone)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
@ -291,7 +291,7 @@ void InputViewer::DrawElement() {
|
||||
scaledBGSize, ImVec2(0, 0), ImVec2(1.0f, 1.0f), ImVec4(255, 255, 255, 255));
|
||||
}
|
||||
const int rightStickMode =
|
||||
CVarGetInteger("gInputViewer.RightStick.VisibilityMode", STICK_MODE_ALWAYS_HIDDEN);
|
||||
CVarGetInteger(CVAR_INPUT_VIEWER("RightStick.VisibilityMode"), STICK_MODE_ALWAYS_HIDDEN);
|
||||
if (rightStickMode == STICK_MODE_ALWAYS_SHOWN ||
|
||||
(rightStickMode == STICK_MODE_HIDDEN_IN_DEADZONE && !rightStickIsInDeadzone)) {
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
@ -304,36 +304,36 @@ void InputViewer::DrawElement() {
|
||||
|
||||
// Analog stick angle text
|
||||
if (showAnalogAngles) {
|
||||
ImGui::SetCursorPos(ImVec2(aPos.x + 10 + CVarGetInteger("gInputViewer.AnalogAngles.Offset", 0) * scale,
|
||||
ImGui::SetCursorPos(ImVec2(aPos.x + 10 + CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Offset"), 0) * scale,
|
||||
scaledBGSize.y + aPos.y + 10));
|
||||
// Scale font with input viewer scale
|
||||
float oldFontScale = ImGui::GetFont()->Scale;
|
||||
ImGui::GetFont()->Scale *= scale * CVarGetFloat("gInputViewer.AnalogAngles.Scale", 1.0f);
|
||||
ImGui::GetFont()->Scale *= scale * CVarGetFloat(CVAR_INPUT_VIEWER("AnalogAngles.Scale"), 1.0f);
|
||||
ImGui::PushFont(ImGui::GetFont());
|
||||
|
||||
// Calculate polar R coordinate from X and Y angles, squared to avoid sqrt
|
||||
const float rSquared = pads[0].stick_x * pads[0].stick_x + pads[0].stick_y * pads[0].stick_y;
|
||||
|
||||
// ESS range
|
||||
const int range1Min = CVarGetInteger("gInputViewer.AnalogAngles.Range1.Min", 8);
|
||||
const int range1Max = CVarGetInteger("gInputViewer.AnalogAngles.Range1.Max", 27);
|
||||
const int range1Min = CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range1.Min"), 8);
|
||||
const int range1Max = CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range1.Max"), 27);
|
||||
// Walking speed range
|
||||
const int range2Min = CVarGetInteger("gInputViewer.AnalogAngles.Range2.Min", 27);
|
||||
const int range2Max = CVarGetInteger("gInputViewer.AnalogAngles.Range2.Max", 62);
|
||||
const int range2Min = CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range2.Min"), 27);
|
||||
const int range2Max = CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range2.Max"), 62);
|
||||
|
||||
// Push color based on angle ranges
|
||||
if (CVarGetInteger("gInputViewer.AnalogAngles.Range1.Enabled", 0) &&
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range1.Enabled"), 0) &&
|
||||
(rSquared >= (range1Min * range1Min)) && (rSquared < (range1Max * range1Max))) {
|
||||
ImGui::PushStyleColor(
|
||||
ImGuiCol_Text,
|
||||
color2Vec(CVarGetColor("gInputViewer.AnalogAngles.Range1.Color", vec2Color(range1Color))));
|
||||
} else if (CVarGetInteger("gInputViewer.AnalogAngles.Range2.Enabled", 0) &&
|
||||
color2Vec(CVarGetColor(CVAR_INPUT_VIEWER("AnalogAngles.Range1.Color"), vec2Color(range1Color))));
|
||||
} else if (CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range2.Enabled"), 0) &&
|
||||
(rSquared >= (range2Min * range2Min)) && (rSquared < (range2Max * range2Max))) {
|
||||
ImGui::PushStyleColor(
|
||||
ImGuiCol_Text,
|
||||
color2Vec(CVarGetColor("gInputViewer.AnalogAngles.Range2.Color", vec2Color(range2Color))));
|
||||
color2Vec(CVarGetColor(CVAR_INPUT_VIEWER("AnalogAngles.Range2.Color"), vec2Color(range2Color))));
|
||||
} else {
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, color2Vec(CVarGetColor("gInputViewer.AnalogAngles.TextColor",
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, color2Vec(CVarGetColor(CVAR_INPUT_VIEWER("AnalogAngles.TextColor"),
|
||||
vec2Color(textColor))));
|
||||
}
|
||||
|
||||
@ -364,60 +364,60 @@ void InputViewerSettingsWindow::DrawElement() {
|
||||
if (ImGui::Begin("Input Viewer Settings", &mIsVisible)) {
|
||||
|
||||
// gInputViewer.Scale
|
||||
UIWidgets::EnhancementSliderFloat("Input Viewer Scale: %.2f", "##Input", "gInputViewer.Scale", 0.1f, 5.0f, "",
|
||||
UIWidgets::EnhancementSliderFloat("Input Viewer Scale: %.2f", "##Input", CVAR_INPUT_VIEWER("Scale"), 0.1f, 5.0f, "",
|
||||
1.0f, false, true);
|
||||
UIWidgets::Tooltip("Sets the on screen size of the input viewer");
|
||||
|
||||
// gInputViewer.EnableDragging
|
||||
UIWidgets::EnhancementCheckbox("Enable Dragging", "gInputViewer.EnableDragging", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Enable Dragging", CVAR_INPUT_VIEWER("EnableDragging"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
|
||||
UIWidgets::PaddedSeparator(true, true);
|
||||
|
||||
// gInputViewer.ShowBackground
|
||||
UIWidgets::EnhancementCheckbox("Show Background Layer", "gInputViewer.ShowBackground", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show Background Layer", CVAR_INPUT_VIEWER("ShowBackground"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
|
||||
UIWidgets::PaddedSeparator(true, true);
|
||||
|
||||
if (ImGui::CollapsingHeader("Buttons")) {
|
||||
// gInputViewer.ABtn
|
||||
UIWidgets::EnhancementCheckbox("Show A-Button Layers", "gInputViewer.ABtn", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show A-Button Layers", CVAR_INPUT_VIEWER("ABtn"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.BBtn
|
||||
UIWidgets::EnhancementCheckbox("Show B-Button Layers", "gInputViewer.BBtn", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show B-Button Layers", CVAR_INPUT_VIEWER("BBtn"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.CUp
|
||||
UIWidgets::EnhancementCheckbox("Show C-Up Layers", "gInputViewer.CUp", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show C-Up Layers", CVAR_INPUT_VIEWER("CUp"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.CRight
|
||||
UIWidgets::EnhancementCheckbox("Show C-Right Layers", "gInputViewer.CRight", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show C-Right Layers", CVAR_INPUT_VIEWER("CRight"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.CDown
|
||||
UIWidgets::EnhancementCheckbox("Show C-Down Layers", "gInputViewer.CDown", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show C-Down Layers", CVAR_INPUT_VIEWER("CDown"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.CLeft
|
||||
UIWidgets::EnhancementCheckbox("Show C-Left Layers", "gInputViewer.CLeft", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show C-Left Layers", CVAR_INPUT_VIEWER("CLeft"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.LBtn
|
||||
UIWidgets::EnhancementCheckbox("Show L-Button Layers", "gInputViewer.LBtn", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show L-Button Layers", CVAR_INPUT_VIEWER("LBtn"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.RBtn
|
||||
UIWidgets::EnhancementCheckbox("Show R-Button Layers", "gInputViewer.RBtn", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show R-Button Layers", CVAR_INPUT_VIEWER("RBtn"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.ZBtn
|
||||
UIWidgets::EnhancementCheckbox("Show Z-Button Layers", "gInputViewer.ZBtn", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show Z-Button Layers", CVAR_INPUT_VIEWER("ZBtn"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.StartBtn
|
||||
UIWidgets::EnhancementCheckbox("Show Start Button Layers", "gInputViewer.StartBtn", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show Start Button Layers", CVAR_INPUT_VIEWER("StartBtn"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
// gInputViewer.Dpad
|
||||
UIWidgets::EnhancementCheckbox("Show D-Pad Layers", "gInputViewer.Dpad", false, "",
|
||||
UIWidgets::EnhancementCheckbox("Show D-Pad Layers", CVAR_INPUT_VIEWER("Dpad"), false, "",
|
||||
UIWidgets::CheckboxGraphics::Checkmark, false);
|
||||
|
||||
// gInputViewer.ButtonOutlineMode
|
||||
UIWidgets::PaddedText("Button Outlines/Backgrounds", true, false);
|
||||
UIWidgets::EnhancementCombobox("gInputViewer.ButtonOutlineMode", buttonOutlineOptions,
|
||||
UIWidgets::EnhancementCombobox(CVAR_INPUT_VIEWER("ButtonOutlineMode"), buttonOutlineOptions,
|
||||
BUTTON_OUTLINE_NOT_PRESSED);
|
||||
UIWidgets::Tooltip(
|
||||
"Sets the desired visibility behavior for the button outline/background layers. Useful for "
|
||||
@ -429,21 +429,21 @@ void InputViewerSettingsWindow::DrawElement() {
|
||||
if (ImGui::CollapsingHeader("Analog Stick")) {
|
||||
// gInputViewer.AnalogStick.VisibilityMode
|
||||
UIWidgets::PaddedText("Analog Stick Visibility", true, false);
|
||||
UIWidgets::EnhancementCombobox("gInputViewer.AnalogStick.VisibilityMode", stickModeOptions,
|
||||
UIWidgets::EnhancementCombobox(CVAR_INPUT_VIEWER("AnalogStick.VisibilityMode"), stickModeOptions,
|
||||
STICK_MODE_ALWAYS_SHOWN);
|
||||
UIWidgets::Tooltip(
|
||||
"Determines the conditions under which the moving layer of the analog stick texture is visible.");
|
||||
|
||||
// gInputViewer.AnalogStick.OutlineMode
|
||||
UIWidgets::PaddedText("Analog Stick Outline/Background Visibility", true, false);
|
||||
UIWidgets::EnhancementCombobox("gInputViewer.AnalogStick.OutlineMode", stickModeOptions,
|
||||
UIWidgets::EnhancementCombobox(CVAR_INPUT_VIEWER("AnalogStick.OutlineMode"), stickModeOptions,
|
||||
STICK_MODE_ALWAYS_SHOWN);
|
||||
UIWidgets::Tooltip(
|
||||
"Determines the conditions under which the analog stick outline/background texture is visible.");
|
||||
|
||||
// gInputViewer.AnalogStick.Movement
|
||||
UIWidgets::EnhancementSliderInt("Analog Stick Movement: %dpx", "##AnalogMovement",
|
||||
"gInputViewer.AnalogStick.Movement", 0, 200, "", 12, true);
|
||||
CVAR_INPUT_VIEWER("AnalogStick.Movement"), 0, 200, "", 12, true);
|
||||
UIWidgets::Tooltip(
|
||||
"Sets the distance to move the analog stick in the input viewer. Useful for custom input viewers.");
|
||||
UIWidgets::PaddedSeparator(true, true);
|
||||
@ -452,21 +452,21 @@ void InputViewerSettingsWindow::DrawElement() {
|
||||
if (ImGui::CollapsingHeader("Additional (\"Right\") Stick")) {
|
||||
// gInputViewer.RightStick.VisibilityMode
|
||||
UIWidgets::PaddedText("Right Stick Visibility", true, false);
|
||||
UIWidgets::EnhancementCombobox("gInputViewer.RightStick.VisibilityMode", stickModeOptions,
|
||||
UIWidgets::EnhancementCombobox(CVAR_INPUT_VIEWER("RightStick.VisibilityMode"), stickModeOptions,
|
||||
STICK_MODE_HIDDEN_IN_DEADZONE);
|
||||
UIWidgets::Tooltip(
|
||||
"Determines the conditions under which the moving layer of the right stick texture is visible.");
|
||||
|
||||
// gInputViewer.RightStick.OutlineMode
|
||||
UIWidgets::PaddedText("Right Stick Outline/Background Visibility", true, false);
|
||||
UIWidgets::EnhancementCombobox("gInputViewer.RightStick.OutlineMode", stickModeOptions,
|
||||
UIWidgets::EnhancementCombobox(CVAR_INPUT_VIEWER("RightStick.OutlineMode"), stickModeOptions,
|
||||
STICK_MODE_HIDDEN_IN_DEADZONE);
|
||||
UIWidgets::Tooltip(
|
||||
"Determines the conditions under which the right stick outline/background texture is visible.");
|
||||
|
||||
// gInputViewer.RightStick.Movement
|
||||
UIWidgets::EnhancementSliderInt("Right Stick Movement: %dpx", "##RightMovement",
|
||||
"gInputViewer.RightStick.Movement", 0, 200, "", 7, true);
|
||||
CVAR_INPUT_VIEWER("RightStick.Movement"), 0, 200, "", 7, true);
|
||||
UIWidgets::Tooltip(
|
||||
"Sets the distance to move the right stick in the input viewer. Useful for custom input viewers.");
|
||||
UIWidgets::PaddedSeparator(true, true);
|
||||
@ -474,42 +474,42 @@ void InputViewerSettingsWindow::DrawElement() {
|
||||
|
||||
if (ImGui::CollapsingHeader("Analog Angle Values")) {
|
||||
// gAnalogAngles
|
||||
UIWidgets::EnhancementCheckbox("Show Analog Stick Angle Values", "gInputViewer.AnalogAngles.Enabled");
|
||||
UIWidgets::EnhancementCheckbox("Show Analog Stick Angle Values", CVAR_INPUT_VIEWER("AnalogAngles.Enabled"));
|
||||
UIWidgets::Tooltip("Displays analog stick angle values in the input viewer");
|
||||
if (CVarGetInteger("gInputViewer.AnalogAngles.Enabled", 0)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Enabled"), 0)) {
|
||||
// gInputViewer.AnalogAngles.TextColor
|
||||
if (ImGui::ColorEdit4("Text Color", (float*)&textColor)) {
|
||||
CVarSetColor("gInputViewer.AnalogAngles.TextColor", vec2Color(textColor));
|
||||
CVarSetColor(CVAR_INPUT_VIEWER("AnalogAngles.TextColor"), vec2Color(textColor));
|
||||
}
|
||||
// gAnalogAngleScale
|
||||
UIWidgets::EnhancementSliderFloat("Angle Text Scale: %.2f%%", "##AnalogAngleScale",
|
||||
"gInputViewer.AnalogAngles.Scale", 0.1f, 5.0f, "", 1.0f, true, true);
|
||||
CVAR_INPUT_VIEWER("AnalogAngles.Scale"), 0.1f, 5.0f, "", 1.0f, true, true);
|
||||
// gInputViewer.AnalogAngles.Offset
|
||||
UIWidgets::EnhancementSliderInt("Angle Text Offset: %dpx", "##AnalogAngleOffset",
|
||||
"gInputViewer.AnalogAngles.Offset", 0, 400, "", 0, true);
|
||||
CVAR_INPUT_VIEWER("AnalogAngles.Offset"), 0, 400, "", 0, true);
|
||||
UIWidgets::PaddedSeparator(true, true);
|
||||
// gInputViewer.AnalogAngles.Range1.Enabled
|
||||
UIWidgets::EnhancementCheckbox("Highlight ESS Position", "gInputViewer.AnalogAngles.Range1.Enabled");
|
||||
UIWidgets::EnhancementCheckbox("Highlight ESS Position", CVAR_INPUT_VIEWER("AnalogAngles.Range1.Enabled"));
|
||||
UIWidgets::Tooltip(
|
||||
"Highlights the angle value text when the analog stick is in ESS position (on flat ground)");
|
||||
if (CVarGetInteger("gInputViewer.AnalogAngles.Range1.Enabled", 0)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range1.Enabled"), 0)) {
|
||||
// gInputViewer.AnalogAngles.Range1.Color
|
||||
if (ImGui::ColorEdit4("ESS Color", (float*)&range1Color)) {
|
||||
CVarSetColor("gInputViewer.AnalogAngles.Range1.Color", vec2Color(range1Color));
|
||||
CVarSetColor(CVAR_INPUT_VIEWER("AnalogAngles.Range1.Color"), vec2Color(range1Color));
|
||||
}
|
||||
}
|
||||
|
||||
UIWidgets::PaddedSeparator(true, true);
|
||||
// gInputViewer.AnalogAngles.Range2.Enabled
|
||||
UIWidgets::EnhancementCheckbox("Highlight Walking Speed Angles",
|
||||
"gInputViewer.AnalogAngles.Range2.Enabled");
|
||||
CVAR_INPUT_VIEWER("AnalogAngles.Range2.Enabled"));
|
||||
UIWidgets::Tooltip("Highlights the angle value text when the analog stick is at an angle that would "
|
||||
"produce a walking speed (on flat ground)\n\n"
|
||||
"Useful for 1.0 Empty Jumpslash Quick Put Away");
|
||||
if (CVarGetInteger("gInputViewer.AnalogAngles.Range2.Enabled", 0)) {
|
||||
if (CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range2.Enabled"), 0)) {
|
||||
// gInputViewer.AnalogAngles.Range2.Color
|
||||
if (ImGui::ColorEdit4("Walking Speed Color", (float*)&range2Color)) {
|
||||
CVarSetColor("gInputViewer.AnalogAngles.Range2.Color", vec2Color(range2Color));
|
||||
CVarSetColor(CVAR_INPUT_VIEWER("AnalogAngles.Range2.Color"), vec2Color(range2Color));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include <libultraship/libultraship.h>
|
||||
|
||||
#define CVAR_INPUT_VIEWER(var) "gInputViewer." var
|
||||
|
||||
typedef enum {
|
||||
BUTTON_OUTLINE_ALWAYS_SHOWN,
|
||||
BUTTON_OUTLINE_NOT_PRESSED,
|
||||
|
@ -1070,15 +1070,15 @@ void SohInputEditorWindow::DrawLEDSection(uint8_t port) {
|
||||
"Original Navi Targeting Colors", "Cosmetics Navi Targeting Colors", "Custom"
|
||||
};
|
||||
UIWidgets::PaddedText("Source");
|
||||
UIWidgets::EnhancementCombobox("gLedColorSource", ledSources, LED_SOURCE_TUNIC_ORIGINAL);
|
||||
UIWidgets::EnhancementCombobox(CVAR_SETTING("LEDColorSource"), ledSources, LED_SOURCE_TUNIC_ORIGINAL);
|
||||
UIWidgets::Tooltip("Health\n- Red when health critical (13-20% depending on max health)\n- Yellow when "
|
||||
"health < 40%. Green otherwise.\n\n"
|
||||
"Tunics: colors will mirror currently equipped tunic, whether original or the current "
|
||||
"values in Cosmetics Editor.\n\n"
|
||||
"Custom: single, solid color");
|
||||
if (CVarGetInteger("gLedColorSource", 1) == LED_SOURCE_CUSTOM) {
|
||||
if (CVarGetInteger(CVAR_SETTING("LEDColorSource"), 1) == LED_SOURCE_CUSTOM) {
|
||||
UIWidgets::Spacer(3);
|
||||
auto port1Color = CVarGetColor24("gLedPort1Color", { 255, 255, 255 });
|
||||
auto port1Color = CVarGetColor24(CVAR_SETTING("LEDPort1Color"), { 255, 255, 255 });
|
||||
ImVec4 colorVec = { port1Color.r / 255.0f, port1Color.g / 255.0f, port1Color.b / 255.0f, 1.0f };
|
||||
if (ImGui::ColorEdit3("", (float*)&colorVec,
|
||||
ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel)) {
|
||||
@ -1087,18 +1087,18 @@ void SohInputEditorWindow::DrawLEDSection(uint8_t port) {
|
||||
color.g = colorVec.y * 255.0;
|
||||
color.b = colorVec.z * 255.0;
|
||||
|
||||
CVarSetColor24("gLedPort1Color", color);
|
||||
CVarSetColor24(CVAR_SETTING("LEDPort1Color"), color);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("Custom Color");
|
||||
}
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Brightness: %.1f %%", "##LED_Brightness", "gLedBrightness", 0.0f,
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Brightness: %.1f %%", "##LED_Brightness", CVAR_SETTING("LEDBrightness"), 0.0f,
|
||||
1.0f, "", 1.0f, true, true);
|
||||
UIWidgets::Tooltip("Sets the brightness of controller LEDs. 0% brightness = LEDs off.");
|
||||
UIWidgets::PaddedEnhancementCheckbox(
|
||||
"Critical Health Override", "gLedCriticalOverride", true, true,
|
||||
CVarGetInteger("gLedColorSource", LED_SOURCE_TUNIC_ORIGINAL) == LED_SOURCE_HEALTH,
|
||||
"Critical Health Override", CVAR_SETTING("LEDCriticalOverride"), true, true,
|
||||
CVarGetInteger(CVAR_SETTING("LEDColorSource"), LED_SOURCE_TUNIC_ORIGINAL) == LED_SOURCE_HEALTH,
|
||||
"Override redundant for health source.", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip("Shows red color when health is critical, otherwise displays according to color source.");
|
||||
}
|
||||
@ -1478,14 +1478,14 @@ void SohInputEditorWindow::addButtonName(N64ButtonMask mask, const char* name) {
|
||||
}
|
||||
|
||||
// Ocarina button maps
|
||||
static CustomButtonMap ocarinaD5 = {"D5", "gOcarinaD5BtnMap", BTN_CUP};
|
||||
static CustomButtonMap ocarinaB4 = {"B4", "gOcarinaB4BtnMap", BTN_CLEFT};
|
||||
static CustomButtonMap ocarinaA4 = {"A4", "gOcarinaA4BtnMap", BTN_CRIGHT};
|
||||
static CustomButtonMap ocarinaF4 = {"F4", "gOcarinaF4BtnMap", BTN_CDOWN};
|
||||
static CustomButtonMap ocarinaD4 = {"D4", "gOcarinaD4BtnMap", BTN_A};
|
||||
static CustomButtonMap ocarinaSongDisable = {"Disable songs", "gOcarinaDisableBtnMap", BTN_L};
|
||||
static CustomButtonMap ocarinaSharp = {"Pitch up", "gOcarinaSharpBtnMap", BTN_R};
|
||||
static CustomButtonMap ocarinaFlat = {"Pitch down", "gOcarinaFlatBtnMap", BTN_Z};
|
||||
static CustomButtonMap ocarinaD5 = {"D5", CVAR_SETTING("CustomOcarina.D5Button"), BTN_CUP};
|
||||
static CustomButtonMap ocarinaB4 = {"B4", CVAR_SETTING("CustomOcarina.B4Button"), BTN_CLEFT};
|
||||
static CustomButtonMap ocarinaA4 = {"A4", CVAR_SETTING("CustomOcarina.A4Button"), BTN_CRIGHT};
|
||||
static CustomButtonMap ocarinaF4 = {"F4", CVAR_SETTING("CustomOcarina.F4Button"), BTN_CDOWN};
|
||||
static CustomButtonMap ocarinaD4 = {"D4", CVAR_SETTING("CustomOcarina.D4Button"), BTN_A};
|
||||
static CustomButtonMap ocarinaSongDisable = {"Disable songs", CVAR_SETTING("CustomOcarina.DisableButton"), BTN_L};
|
||||
static CustomButtonMap ocarinaSharp = {"Pitch up", CVAR_SETTING("CustomOcarina.SharpButton"), BTN_R};
|
||||
static CustomButtonMap ocarinaFlat = {"Pitch down", CVAR_SETTING("CustomOcarina.FlatButton"), BTN_Z};
|
||||
|
||||
// Draw a button mapping setting consisting of a padded label and button dropdown.
|
||||
// excludedButtons indicates which buttons are unavailable to choose from.
|
||||
@ -1534,13 +1534,13 @@ void SohInputEditorWindow::DrawOcarinaControlPanel() {
|
||||
|
||||
ImVec2 cursor = ImGui::GetCursorPos();
|
||||
ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5));
|
||||
UIWidgets::EnhancementCheckbox("Customize Ocarina Controls", "gCustomOcarinaControls");
|
||||
UIWidgets::EnhancementCheckbox("Customize Ocarina Controls", CVAR_SETTING("CustomOcarina.Enabled"));
|
||||
|
||||
if (CVarGetInteger("gCustomOcarinaControls", 0) == 1) {
|
||||
if (CVarGetInteger(CVAR_SETTING("CustomOcarina.Enabled"), 0) == 1) {
|
||||
if (ImGui::BeginTable("tableCustomMainOcarinaControls", 2, ImGuiTableFlags_SizingStretchProp)) {
|
||||
float labelWidth;
|
||||
N64ButtonMask disableMask = BTN_B;
|
||||
if (CVarGetInteger("gDpadOcarina", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("OcarinaControl.Dpad"), 0)) {
|
||||
disableMask |= BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT;
|
||||
}
|
||||
|
||||
@ -1583,9 +1583,9 @@ void SohInputEditorWindow::DrawOcarinaControlPanel() {
|
||||
ImGui::TableSetupColumn("Right stick", PANEL_TABLE_COLUMN_FLAGS);
|
||||
TableHelper::InitHeader(false);
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 5);
|
||||
UIWidgets::EnhancementCheckbox("Play with D-pad", "gDpadOcarina");
|
||||
UIWidgets::EnhancementCheckbox("Play with D-pad", CVAR_SETTING("OcarinaControl.Dpad"));
|
||||
TableHelper::NextCol();
|
||||
UIWidgets::EnhancementCheckbox("Play with camera stick", "gRStickOcarina");
|
||||
UIWidgets::EnhancementCheckbox("Play with camera stick", CVAR_SETTING("OcarinaControl.RStick"));
|
||||
UIWidgets::Spacer(0);
|
||||
ImGui::EndTable();
|
||||
}
|
||||
@ -1598,35 +1598,35 @@ void SohInputEditorWindow::DrawCameraControlPanel() {
|
||||
ImVec2 cursor = ImGui::GetCursorPos();
|
||||
ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5));
|
||||
Ship::GuiWindow::BeginGroupPanel("Aiming/First-Person Camera", ImGui::GetContentRegionAvail());
|
||||
UIWidgets::PaddedEnhancementCheckbox("Right Stick Aiming", "gRightStickAiming");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Right Stick Aiming", CVAR_SETTING("Controls.RightStickAim"));
|
||||
UIWidgets::Tooltip("Allows for aiming with the right stick in:\n-First-Person/C-Up view\n-Weapon Aiming");
|
||||
if (CVarGetInteger("gRightStickAiming", 0)) {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Allow moving while in first person mode", "gMoveWhileFirstPerson");
|
||||
if (CVarGetInteger(CVAR_SETTING("Controls.RightStickAim"), 0)) {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Allow moving while in first person mode", CVAR_SETTING("MoveInFirstPerson"));
|
||||
UIWidgets::Tooltip("Changes the left stick to move the player while in first person mode");
|
||||
}
|
||||
UIWidgets::PaddedEnhancementCheckbox("Invert Aiming X Axis", "gInvertAimingXAxis");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Invert Aiming X Axis", CVAR_SETTING("Controls.InvertAimingXAxis"));
|
||||
UIWidgets::Tooltip("Inverts the Camera X Axis in:\n-First-Person/C-Up view\n-Weapon Aiming");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Invert Aiming Y Axis", "gInvertAimingYAxis", true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Invert Aiming Y Axis", CVAR_SETTING("Controls.InvertAimingYAxis"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip("Inverts the Camera Y Axis in:\n-First-Person/C-Up view\n-Weapon Aiming");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Invert Shield Aiming Y Axis", "gInvertShieldAimingYAxis", true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Invert Shield Aiming Y Axis", CVAR_SETTING("Controls.InvertShieldAimingYAxis"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip("Inverts the Shield Aiming Y Axis");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Invert Shield Aiming X Axis", "gInvertShieldAimingXAxis");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Invert Shield Aiming X Axis", CVAR_SETTING("Controls.InvertShieldAimingYAxis"));
|
||||
UIWidgets::Tooltip("Inverts the Shield Aiming X Axis");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Invert Z-Weapon Aiming Y Axis", "gInvertZAimingYAxis", true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Invert Z-Weapon Aiming Y Axis", CVAR_SETTING("Controls.InvertZAimingYAxis"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip("Inverts the Camera Y Axis in:\n-Z-Weapon Aiming");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Disable Auto-Centering in First-Person View", "gDisableAutoCenterViewFirstPerson");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Disable Auto-Centering in First-Person View", CVAR_SETTING("DisableFirstPersonAutoCenterView"));
|
||||
UIWidgets::Tooltip("Prevents the C-Up view from auto-centering, allowing for Gyro Aiming");
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Enable Custom Aiming/First-Person sensitivity", "gEnableFirstPersonSensitivity", true, false)) {
|
||||
if (!CVarGetInteger("gEnableFirstPersonSensitivity", 0)) {
|
||||
CVarClear("gFirstPersonCameraSensitivityX");
|
||||
CVarClear("gFirstPersonCameraSensitivityY");
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Enable Custom Aiming/First-Person sensitivity", CVAR_SETTING("FirstPersonCameraSensitivity.Enabled"), true, false)) {
|
||||
if (!CVarGetInteger(CVAR_SETTING("FirstPersonCameraSensitivity.Enabled"), 0)) {
|
||||
CVarClear(CVAR_SETTING("FirstPersonCameraSensitivity.X"));
|
||||
CVarClear(CVAR_SETTING("FirstPersonCameraSensitivity.Y"));
|
||||
}
|
||||
}
|
||||
if (CVarGetInteger("gEnableFirstPersonSensitivity", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("FirstPersonCameraSensitivity.Enabled"), 0)) {
|
||||
UIWidgets::EnhancementSliderFloat("Aiming/First-Person Horizontal Sensitivity: %.0f %%", "##FirstPersonSensitivity Horizontal",
|
||||
"gFirstPersonCameraSensitivityX", 0.01f, 5.0f, "", 1.0f, true);
|
||||
CVAR_SETTING("FirstPersonCameraSensitivity.X"), 0.01f, 5.0f, "", 1.0f, true);
|
||||
UIWidgets::EnhancementSliderFloat("Aiming/First-Person Vertical Sensitivity: %.0f %%", "##FirstPersonSensitivity Vertical",
|
||||
"gFirstPersonCameraSensitivityY", 0.01f, 5.0f, "", 1.0f, true);
|
||||
CVAR_SETTING("FirstPersonCameraSensitivity.Y"), 0.01f, 5.0f, "", 1.0f, true);
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
Ship::GuiWindow::EndGroupPanel(0);
|
||||
@ -1636,22 +1636,22 @@ void SohInputEditorWindow::DrawCameraControlPanel() {
|
||||
ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5));
|
||||
Ship::GuiWindow::BeginGroupPanel("Third-Person Camera", ImGui::GetContentRegionAvail());
|
||||
|
||||
UIWidgets::PaddedEnhancementCheckbox("Free Camera", "gFreeCamera");
|
||||
UIWidgets::Tooltip("Enables free camera control\nNote: You must remap C buttons off of the right stick in the "
|
||||
UIWidgets::PaddedEnhancementCheckbox("Free Look", CVAR_SETTING("FreeLook.Enabled"));
|
||||
UIWidgets::Tooltip("Enables free look camera control\nNote: You must remap C buttons off of the right stick in the "
|
||||
"controller config menu, and map the camera stick to the right stick.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Invert Camera X Axis", "gInvertXAxis");
|
||||
UIWidgets::Tooltip("Inverts the Camera X Axis in:\n-Free camera");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Invert Camera Y Axis", "gInvertYAxis", true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip("Inverts the Camera Y Axis in:\n-Free camera");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Invert Camera X Axis", CVAR_SETTING("FreeLook.InvertXAxis"));
|
||||
UIWidgets::Tooltip("Inverts the Camera X Axis in:\n-Free look");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Invert Camera Y Axis", CVAR_SETTING("FreeLook.InvertYAxis"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip("Inverts the Camera Y Axis in:\n-Free look");
|
||||
UIWidgets::Spacer(0);
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Third-Person Horizontal Sensitivity: %.0f %%", "##ThirdPersonSensitivity Horizontal",
|
||||
"gThirdPersonCameraSensitivityX", 0.01f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
CVAR_SETTING("FreeLook.CameraSensitivity.X"), 0.01f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Third-Person Vertical Sensitivity: %.0f %%", "##ThirdPersonSensitivity Vertical",
|
||||
"gThirdPersonCameraSensitivityY", 0.01f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
CVAR_SETTING("FreeLook.CameraSensitivity.Y"), 0.01f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
UIWidgets::PaddedEnhancementSliderInt("Camera Distance: %d", "##CamDist",
|
||||
"gFreeCameraDistMax", 100, 900, "", 185, true, false, true);
|
||||
CVAR_SETTING("FreeLook.MaxCameraDistance"), 100, 900, "", 185, true, false, true);
|
||||
UIWidgets::PaddedEnhancementSliderInt("Camera Transition Speed: %d", "##CamTranSpeed",
|
||||
"gFreeCameraTransitionSpeed", 0, 900, "", 25, true, false, true);
|
||||
CVAR_SETTING("FreeLook.TransitionSpeed"), 0, 900, "", 25, true, false, true);
|
||||
Ship::GuiWindow::EndGroupPanel(0);
|
||||
}
|
||||
|
||||
@ -1659,13 +1659,13 @@ void SohInputEditorWindow::DrawDpadControlPanel() {
|
||||
ImVec2 cursor = ImGui::GetCursorPos();
|
||||
ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5));
|
||||
Ship::GuiWindow::BeginGroupPanel("D-Pad Options", ImGui::GetContentRegionAvail());
|
||||
UIWidgets::PaddedEnhancementCheckbox("D-pad Support on Pause Screen", "gDpadPause");
|
||||
UIWidgets::PaddedEnhancementCheckbox("D-pad Support on Pause Screen", CVAR_SETTING("DPadOnPause"));
|
||||
UIWidgets::Tooltip("Navigate Pause with the D-pad\nIf used with D-pad as Equip Items, you must hold C-Up to equip instead of navigate\n"
|
||||
"To make the cursor only move a single space no matter how long a direction is held, manually set gDpadHoldChange to 0");
|
||||
UIWidgets::PaddedEnhancementCheckbox("D-pad Support in Text Boxes", "gDpadText");
|
||||
"To make the cursor only move a single space no matter how long a direction is held, manually set gSettings.DpadHoldChange to 0");
|
||||
UIWidgets::PaddedEnhancementCheckbox("D-pad Support in Text Boxes", CVAR_SETTING("DpadInText"));
|
||||
UIWidgets::Tooltip("Navigate choices in text boxes, shop item selection, and the file select / name entry screens with the D-pad\n"
|
||||
"To make the cursor only move a single space during name entry no matter how long a direction is held, manually set gDpadHoldChange to 0");
|
||||
UIWidgets::PaddedEnhancementCheckbox("D-pad as Equip Items", "gDpadEquips");
|
||||
"To make the cursor only move a single space during name entry no matter how long a direction is held, manually set gSettings.DpadHoldChange to 0");
|
||||
UIWidgets::PaddedEnhancementCheckbox("D-pad as Equip Items", CVAR_SETTING("DpadEquips"));
|
||||
UIWidgets::Tooltip("Equip items and equipment on the D-pad\nIf used with D-pad on Pause Screen, you must hold C-Up to equip instead of navigate");
|
||||
Ship::GuiWindow::EndGroupPanel(0);
|
||||
}
|
||||
@ -1676,31 +1676,31 @@ void SohInputEditorWindow::DrawMiscControlPanel() {
|
||||
Ship::GuiWindow::BeginGroupPanel("Misc Controls", ImGui::GetContentRegionAvail());
|
||||
UIWidgets::PaddedText("Allow the cursor to be on any slot");
|
||||
static const char* cursorOnAnySlot[3] = { "Only in Rando", "Always", "Never" };
|
||||
UIWidgets::EnhancementCombobox("gPauseAnyCursor", cursorOnAnySlot, PAUSE_ANY_CURSOR_RANDO_ONLY);
|
||||
UIWidgets::EnhancementCombobox(CVAR_SETTING("PauseAnyCursor"), cursorOnAnySlot, PAUSE_ANY_CURSOR_RANDO_ONLY);
|
||||
UIWidgets::Tooltip("Allows the cursor on the pause menu to be over any slot. Sometimes required in rando to select "
|
||||
"certain items.");
|
||||
UIWidgets::Spacer(0);
|
||||
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
|
||||
UIWidgets::PaddedEnhancementCheckbox("Enable speed modifiers", "gEnableWalkModify", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Enable speed modifiers", CVAR_SETTING("WalkModifier.Enabled"), true, false);
|
||||
UIWidgets::Tooltip("Hold the assigned button to change the maximum walking or swimming speed");
|
||||
if (CVarGetInteger("gEnableWalkModify", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("WalkModifier.Enabled"), 0)) {
|
||||
UIWidgets::Spacer(5);
|
||||
Ship::GuiWindow::BeginGroupPanel("Speed Modifier", ImGui::GetContentRegionAvail());
|
||||
UIWidgets::PaddedEnhancementCheckbox("Toggle modifier instead of holding", "gWalkSpeedToggle", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Toggle modifier instead of holding", CVAR_SETTING("WalkModifier.SpeedToggle"), true, false);
|
||||
Ship::GuiWindow::BeginGroupPanel("Walk Modifier", ImGui::GetContentRegionAvail());
|
||||
UIWidgets::PaddedEnhancementCheckbox("Don't affect jump distance/velocity", "gWalkModifierDoesntChangeJump", true, false);
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Walk Modifier 1: %.0f %%", "##WalkMod1", "gWalkModifierOne", 0.0f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Walk Modifier 2: %.0f %%", "##WalkMod2", "gWalkModifierTwo", 0.0f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Don't affect jump distance/velocity", CVAR_SETTING("WalkModifier.DoesntChangeJump"), true, false);
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Walk Modifier 1: %.0f %%", "##WalkMod1", CVAR_SETTING("WalkModifier.Mapping1"), 0.0f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Walk Modifier 2: %.0f %%", "##WalkMod2", CVAR_SETTING("WalkModifier.Mapping2"), 0.0f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
Ship::GuiWindow::EndGroupPanel(0);
|
||||
Ship::GuiWindow::BeginGroupPanel("Swim Modifier", ImGui::GetContentRegionAvail());
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Swim Modifier 1: %.0f %%", "##SwimMod1", "gSwimModifierOne", 0.0f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Swim Modifier 2: %.0f %%", "##SwimMod2", "gSwimModifierTwo", 0.0f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Swim Modifier 1: %.0f %%", "##SwimMod1", CVAR_SETTING("WalkModifier.SwimMapping1"), 0.0f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Swim Modifier 2: %.0f %%", "##SwimMod2", CVAR_SETTING("WalkModifier.SwimMapping2"), 0.0f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
Ship::GuiWindow::EndGroupPanel(0);
|
||||
Ship::GuiWindow::EndGroupPanel(0);
|
||||
}
|
||||
ImGui::EndDisabled();
|
||||
UIWidgets::Spacer(0);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Answer Navi Prompt with L Button", "gNaviOnL");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Answer Navi Prompt with L Button", CVAR_SETTING("NaviOnL"));
|
||||
UIWidgets::Tooltip("Speak to Navi with L but enter first-person camera with C-Up");
|
||||
Ship::GuiWindow::EndGroupPanel(0);
|
||||
}
|
||||
|
@ -229,24 +229,25 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
|
||||
COSMETIC_OPTION("Consumable.GoldRupee", "Gold Rupee", COSMETICS_GROUP_CONSUMABLE, ImVec4(255, 190, 55, 255), false, true, true),
|
||||
COSMETIC_OPTION("Consumable.SilverRupee", "Silver Rupee", COSMETICS_GROUP_CONSUMABLE, ImVec4(255, 255, 255, 255), false, true, true),
|
||||
|
||||
COSMETIC_OPTION("Hud.AButton", "A Button", COSMETICS_GROUP_HUD, ImVec4( 90, 90, 255, 255), false, true, false),
|
||||
COSMETIC_OPTION("Hud.BButton", "B Button", COSMETICS_GROUP_HUD, ImVec4( 0, 150, 0, 255), false, true, false),
|
||||
COSMETIC_OPTION("Hud.CButtons", "C Buttons", COSMETICS_GROUP_HUD, ImVec4(255, 160, 0, 255), false, true, false),
|
||||
COSMETIC_OPTION("Hud.CUpButton", "C Up Button", COSMETICS_GROUP_HUD, ImVec4(255, 160, 0, 255), false, true, true),
|
||||
COSMETIC_OPTION("Hud.CDownButton", "C Down Button", COSMETICS_GROUP_HUD, ImVec4(255, 160, 0, 255), false, true, true),
|
||||
COSMETIC_OPTION("Hud.CLeftButton", "C Left Button", COSMETICS_GROUP_HUD, ImVec4(255, 160, 0, 255), false, true, true),
|
||||
COSMETIC_OPTION("Hud.CRightButton", "C Right Button", COSMETICS_GROUP_HUD, ImVec4(255, 160, 0, 255), false, true, true),
|
||||
COSMETIC_OPTION("Hud.StartButton", "Start Button", COSMETICS_GROUP_HUD, ImVec4(200, 0, 0, 255), false, true, false),
|
||||
COSMETIC_OPTION("Hud.Dpad", "Dpad", COSMETICS_GROUP_HUD, ImVec4(255, 255, 255, 255), false, true, false),
|
||||
COSMETIC_OPTION("Hud.KeyCount", "Key Count", COSMETICS_GROUP_HUD, ImVec4(200, 230, 255, 255), false, true, true),
|
||||
COSMETIC_OPTION("Hud.StoneOfAgony", "Stone of Agony", COSMETICS_GROUP_HUD, ImVec4(255, 255, 255, 255), false, true, true),
|
||||
COSMETIC_OPTION("Hud.Minimap", "Minimap", COSMETICS_GROUP_HUD, ImVec4( 0, 255, 255, 255), false, true, false),
|
||||
COSMETIC_OPTION("Hud.MinimapPosition", "Minimap Position", COSMETICS_GROUP_HUD, ImVec4(200, 255, 0, 255), false, true, true),
|
||||
COSMETIC_OPTION("Hud.MinimapEntrance", "Minimap Entrance", COSMETICS_GROUP_HUD, ImVec4(200, 0, 0, 255), false, true, true),
|
||||
COSMETIC_OPTION("Hud.EnemyHealthBar", "Enemy Health Bar", COSMETICS_GROUP_HUD, ImVec4(255, 0, 0, 255), true, true, false),
|
||||
COSMETIC_OPTION("Hud.EnemyHealthBorder", "Enemy Health Border", COSMETICS_GROUP_HUD, ImVec4(255, 255, 255, 255), true, false, true),
|
||||
COSMETIC_OPTION("Hud.NameTagActorText", "Nametag Text", COSMETICS_GROUP_HUD, ImVec4(255, 255, 255, 255), true, true, false),
|
||||
COSMETIC_OPTION("Hud.NameTagActorBackground", "Nametag Background", COSMETICS_GROUP_HUD, ImVec4(0, 0, 0, 80), true, false, true),
|
||||
COSMETIC_OPTION("HUD.AButton", "A Button", COSMETICS_GROUP_HUD, ImVec4( 90, 90, 255, 255), false, true, false),
|
||||
COSMETIC_OPTION("HUD.BButton", "B Button", COSMETICS_GROUP_HUD, ImVec4( 0, 150, 0, 255), false, true, false),
|
||||
COSMETIC_OPTION("HUD.CButtons", "C Buttons", COSMETICS_GROUP_HUD, ImVec4(255, 160, 0, 255), false, true, false),
|
||||
COSMETIC_OPTION("HUD.CUpButton", "C Up Button", COSMETICS_GROUP_HUD, ImVec4(255, 160, 0, 255), false, true, true),
|
||||
COSMETIC_OPTION("HUD.CDownButton", "C Down Button", COSMETICS_GROUP_HUD, ImVec4(255, 160, 0, 255), false, true, true),
|
||||
COSMETIC_OPTION("HUD.CLeftButton", "C Left Button", COSMETICS_GROUP_HUD, ImVec4(255, 160, 0, 255), false, true, true),
|
||||
COSMETIC_OPTION("HUD.CRightButton", "C Right Button", COSMETICS_GROUP_HUD, ImVec4(255, 160, 0, 255), false, true, true),
|
||||
COSMETIC_OPTION("HUD.StartButton", "Start Button", COSMETICS_GROUP_HUD, ImVec4(200, 0, 0, 255), false, true, false),
|
||||
COSMETIC_OPTION("HUD.Dpad", "Dpad", COSMETICS_GROUP_HUD, ImVec4(255, 255, 255, 255), false, true, false),
|
||||
COSMETIC_OPTION("HUD.KeyCount", "Key Count", COSMETICS_GROUP_HUD, ImVec4(200, 230, 255, 255), false, true, true),
|
||||
COSMETIC_OPTION("HUD.StoneOfAgony", "Stone of Agony", COSMETICS_GROUP_HUD, ImVec4(255, 255, 255, 255), false, true, true),
|
||||
COSMETIC_OPTION("HUD.Minimap", "Minimap", COSMETICS_GROUP_HUD, ImVec4( 0, 255, 255, 255), false, true, false),
|
||||
COSMETIC_OPTION("HUD.MinimapPosition", "Minimap Position", COSMETICS_GROUP_HUD, ImVec4(200, 255, 0, 255), false, true, true),
|
||||
COSMETIC_OPTION("HUD.MinimapEntrance", "Minimap Entrance", COSMETICS_GROUP_HUD, ImVec4(200, 0, 0, 255), false, true, true),
|
||||
COSMETIC_OPTION("HUD.EnemyHealthBar", "Enemy Health Bar", COSMETICS_GROUP_HUD, ImVec4(255, 0, 0, 255), true, true, false),
|
||||
COSMETIC_OPTION("HUD.EnemyHealthBorder", "Enemy Health Border", COSMETICS_GROUP_HUD, ImVec4(255, 255, 255, 255), true, false, true),
|
||||
COSMETIC_OPTION("HUD.NameTagActorText", "Nametag Text", COSMETICS_GROUP_HUD, ImVec4(255, 255, 255, 255), true, true, false),
|
||||
COSMETIC_OPTION("HUD.NameTagActorBackground", "Nametag Background", COSMETICS_GROUP_HUD, ImVec4(0, 0, 0, 80), true, false, true),
|
||||
// Todo (Cosmetics): re-implement title card colors
|
||||
|
||||
COSMETIC_OPTION("Kaleido.ItemSelA", "Item Select Color", COSMETICS_GROUP_KALEIDO, ImVec4(10, 50, 80, 255), false, true, false),
|
||||
COSMETIC_OPTION("Kaleido.ItemSelB", "Item Select Color B", COSMETICS_GROUP_KALEIDO, ImVec4(70, 100, 130, 255), false, true, true),
|
||||
@ -298,12 +299,12 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
|
||||
COSMETIC_OPTION("Arrows.LightPrimary", "Light Primary", COSMETICS_GROUP_ARROWS, ImVec4(255, 255, 0, 255), false, true, false),
|
||||
COSMETIC_OPTION("Arrows.LightSecondary", "Light Secondary", COSMETICS_GROUP_ARROWS, ImVec4(255, 255, 170, 0), false, true, true),
|
||||
|
||||
// COSMETIC_OPTION("Magic.DinsPrimary", "Din's Primary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 255, 255), false, true, false), // Todo (Cosmetics): Replace gDF_Col
|
||||
// COSMETIC_OPTION("Magic.DinsSecondary", "Din's Secondary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 255, 255), false, true, true), // Todo (Cosmetics): Replace gDF_Env
|
||||
// COSMETIC_OPTION("Magic.DinsPrimary", "Din's Primary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 255, 255), false, true, false),
|
||||
// COSMETIC_OPTION("Magic.DinsSecondary", "Din's Secondary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 255, 255), false, true, true),
|
||||
// COSMETIC_OPTION("Magic.FaroresPrimary", "Farore's Primary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 255, 255), false, true, false), // Todo (Cosmetics): Implement
|
||||
// COSMETIC_OPTION("Magic.FaroresSecondary", "Farore's Secondary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 255, 255), false, true, true), // Todo (Cosmetics): Implement
|
||||
// COSMETIC_OPTION("Magic.NayrusPrimary", "Nayru's Primary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 255, 255), false, true, false), // Todo (Cosmetics): Replace gNL_Diamond_Col / gNL_Orb_Col
|
||||
// COSMETIC_OPTION("Magic.NayrusSecondary", "Nayru's Secondary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 255, 255), false, true, true), // Todo (Cosmetics): Replace gNL_Diamond_Env / gNL_Orb_Env
|
||||
// COSMETIC_OPTION("Magic.NayrusPrimary", "Nayru's Primary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 255, 255), false, true, false),
|
||||
// COSMETIC_OPTION("Magic.NayrusSecondary", "Nayru's Secondary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 255, 255), false, true, true),
|
||||
|
||||
COSMETIC_OPTION("SpinAttack.Level1Primary", "Level 1 Primary", COSMETICS_GROUP_SPIN_ATTACK, ImVec4(170, 255, 255, 255), false, true, true),
|
||||
COSMETIC_OPTION("SpinAttack.Level1Secondary", "Level 1 Secondary", COSMETICS_GROUP_SPIN_ATTACK, ImVec4( 0, 100, 255, 255), false, true, false),
|
||||
@ -350,11 +351,11 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
|
||||
};
|
||||
|
||||
static const char* MarginCvarList[] {
|
||||
CVAR_COSMETIC("Hearts"), CVAR_COSMETIC("HeartsCount"), CVAR_COSMETIC("MagicBar"), CVAR_COSMETIC("VisualSoA"), CVAR_COSMETIC("BButton"), CVAR_COSMETIC("AButton"), CVAR_COSMETIC("StartButton"),
|
||||
CVAR_COSMETIC("CUpButton"), CVAR_COSMETIC("CDownButton"), CVAR_COSMETIC("CLeftButton"), CVAR_COSMETIC("CRightButton"), CVAR_COSMETIC("Dpad"), CVAR_COSMETIC("Minimap"),
|
||||
CVAR_COSMETIC("SmallKey"), CVAR_COSMETIC("Rupees"), CVAR_COSMETIC("Carrots"), CVAR_COSMETIC("Timers"), CVAR_COSMETIC("ArcheryScore"), CVAR_COSMETIC("TitleCard.Map"), CVAR_COSMETIC("TitleCard.Boss"), CVAR_COSMETIC("IGT")
|
||||
CVAR_COSMETIC("HUD.Hearts"), CVAR_COSMETIC("HUD.HeartsCount"), CVAR_COSMETIC("HUD.MagicBar"), CVAR_COSMETIC("HUD.VisualSoA"), CVAR_COSMETIC("HUD.BButton"), CVAR_COSMETIC("HUD.AButton"), CVAR_COSMETIC("HUD.StartButton"),
|
||||
CVAR_COSMETIC("HUD.CUpButton"), CVAR_COSMETIC("HUD.CDownButton"), CVAR_COSMETIC("HUD.CLeftButton"), CVAR_COSMETIC("HUD.CRightButton"), CVAR_COSMETIC("HUD.Dpad"), CVAR_COSMETIC("HUD.Minimap"),
|
||||
CVAR_COSMETIC("HUD.SmallKey"), CVAR_COSMETIC("HUD.Rupees"), CVAR_COSMETIC("HUD.Carrots"), CVAR_COSMETIC("HUD.Timers"), CVAR_COSMETIC("HUD.ArcheryScore"), CVAR_COSMETIC("HUD.TitleCard.Map"), CVAR_COSMETIC("HUD.TitleCard.Boss"), CVAR_COSMETIC("HUD.IGT")
|
||||
};
|
||||
static const char* MarginCvarNonAnchor[]{ CVAR_COSMETIC("Carrots"), CVAR_COSMETIC("Timers"), CVAR_COSMETIC("ArcheryScore"), CVAR_COSMETIC("TitleCard.Map"),CVAR_COSMETIC("TitleCard.Boss") };
|
||||
static const char* MarginCvarNonAnchor[]{ CVAR_COSMETIC("HUD.Carrots"), CVAR_COSMETIC("HUD.Timers"), CVAR_COSMETIC("HUD.ArcheryScore"), CVAR_COSMETIC("HUD.TitleCard.Map"),CVAR_COSMETIC("HUD.TitleCard.Boss") };
|
||||
|
||||
ImVec4 GetRandomValue(int MaximumPossible){
|
||||
ImVec4 NewColor;
|
||||
@ -1205,10 +1206,10 @@ void Draw_Placements(){
|
||||
if (ImGui::BeginTable("tableMargins", 1, FlagsTable)) {
|
||||
ImGui::TableSetupColumn("General margins settings", FlagsCell, TablesCellsWidth);
|
||||
Table_InitHeader();
|
||||
UIWidgets::EnhancementSliderInt("Top : %dx", "##UIMARGINT", "gHUDMargin_T", (ImGui::GetWindowViewport()->Size.y/2)*-1, 25, "", 0);
|
||||
UIWidgets::EnhancementSliderInt("Left: %dx", "##UIMARGINL", "gHUDMargin_L", -25, ImGui::GetWindowViewport()->Size.x, "", 0);
|
||||
UIWidgets::EnhancementSliderInt("Right: %dx", "##UIMARGINR", "gHUDMargin_R", (ImGui::GetWindowViewport()->Size.x)*-1, 25, "", 0);
|
||||
UIWidgets::EnhancementSliderInt("Bottom: %dx", "##UIMARGINB", "gHUDMargin_B", (ImGui::GetWindowViewport()->Size.y/2)*-1, 25, "", 0);
|
||||
UIWidgets::EnhancementSliderInt("Top : %dx", "##UIMARGINT", CVAR_COSMETIC("HUD.Margin.T"), (ImGui::GetWindowViewport()->Size.y/2)*-1, 25, "", 0);
|
||||
UIWidgets::EnhancementSliderInt("Left: %dx", "##UIMARGINL", CVAR_COSMETIC("HUD.Margin.L"), -25, ImGui::GetWindowViewport()->Size.x, "", 0);
|
||||
UIWidgets::EnhancementSliderInt("Right: %dx", "##UIMARGINR", CVAR_COSMETIC("HUD.Margin.R"), (ImGui::GetWindowViewport()->Size.x)*-1, 25, "", 0);
|
||||
UIWidgets::EnhancementSliderInt("Bottom: %dx", "##UIMARGINB", CVAR_COSMETIC("HUD.Margin.B"), (ImGui::GetWindowViewport()->Size.y/2)*-1, 25, "", 0);
|
||||
SetMarginAll("All margins on",true);
|
||||
UIWidgets::Tooltip("Set most of the elements to use margins\nSome elements with default position will not be affected\nElements without Anchor or Hidden will not be turned on");
|
||||
ImGui::SameLine();
|
||||
@ -1224,11 +1225,11 @@ void Draw_Placements(){
|
||||
if (ImGui::BeginTable("tableHeartsCounts", 1, FlagsTable)) {
|
||||
ImGui::TableSetupColumn("Hearts counts settings", FlagsCell, TablesCellsWidth);
|
||||
Table_InitHeader(false);
|
||||
DrawUseMarginsSlider("Hearts counts", CVAR_COSMETIC("Hearts"));
|
||||
DrawPositionsRadioBoxes(CVAR_COSMETIC("HeartsCount"));
|
||||
DrawPositionSlider(CVAR_COSMETIC("HeartsCount"),-22,ImGui::GetWindowViewport()->Size.y,-125,ImGui::GetWindowViewport()->Size.x);
|
||||
DrawScaleSlider(CVAR_COSMETIC("HeartsCount"),0.7f);
|
||||
UIWidgets::EnhancementSliderInt("Heart line length : %d", "##HeartLineLength", CVAR_COSMETIC("Hearts.LineLength"), 0, 20, "", 10);
|
||||
DrawUseMarginsSlider("Hearts counts", CVAR_COSMETIC("HUD.Hearts"));
|
||||
DrawPositionsRadioBoxes(CVAR_COSMETIC("HUD.HeartsCount"));
|
||||
DrawPositionSlider(CVAR_COSMETIC("HUD.HeartsCount"),-22,ImGui::GetWindowViewport()->Size.y,-125,ImGui::GetWindowViewport()->Size.x);
|
||||
DrawScaleSlider(CVAR_COSMETIC("HUD.HeartsCount"),0.7f);
|
||||
UIWidgets::EnhancementSliderInt("Heart line length : %d", "##HeartLineLength", CVAR_COSMETIC("HUD.Hearts.LineLength"), 0, 20, "", 10);
|
||||
UIWidgets::Tooltip("This will set the length of a row of hearts. Set to 0 for unlimited length.");
|
||||
ImGui::NewLine();
|
||||
ImGui::EndTable();
|
||||
@ -1238,12 +1239,12 @@ void Draw_Placements(){
|
||||
if (ImGui::BeginTable("tablemmpos", 1, FlagsTable)) {
|
||||
ImGui::TableSetupColumn("Magic meter settings", FlagsCell, TablesCellsWidth);
|
||||
Table_InitHeader(false);
|
||||
DrawUseMarginsSlider("Magic meter", CVAR_COSMETIC("MagicBar"));
|
||||
DrawPositionsRadioBoxes(CVAR_COSMETIC("MagicBar"));
|
||||
UIWidgets::EnhancementRadioButton("Anchor to life bar", CVAR_COSMETIC("MagicBar.PosType"), 5);
|
||||
DrawUseMarginsSlider("Magic meter", CVAR_COSMETIC("HUD.MagicBar"));
|
||||
DrawPositionsRadioBoxes(CVAR_COSMETIC("HUD.MagicBar"));
|
||||
UIWidgets::EnhancementRadioButton("Anchor to life bar", CVAR_COSMETIC("HUD.MagicBar.PosType"), 5);
|
||||
UIWidgets::Tooltip("This will make your elements follow the bottom of the life meter");
|
||||
DrawPositionSlider(CVAR_COSMETIC("MagicBar"), 0, ImGui::GetWindowViewport()->Size.y/2, -5, ImGui::GetWindowViewport()->Size.x/2);
|
||||
DrawScaleSlider(CVAR_COSMETIC("MagicBar"),1.0f);
|
||||
DrawPositionSlider(CVAR_COSMETIC("HUD.MagicBar"), 0, ImGui::GetWindowViewport()->Size.y/2, -5, ImGui::GetWindowViewport()->Size.x/2);
|
||||
DrawScaleSlider(CVAR_COSMETIC("HUD.MagicBar"),1.0f);
|
||||
ImGui::NewLine();
|
||||
ImGui::EndTable();
|
||||
}
|
||||
@ -1252,76 +1253,76 @@ void Draw_Placements(){
|
||||
if (ImGui::BeginTable("tabledvisualstoneofagony", 1, FlagsTable)) {
|
||||
ImGui::TableSetupColumn("Visual stone of agony settings", FlagsCell, TablesCellsWidth);
|
||||
Table_InitHeader(false);
|
||||
DrawUseMarginsSlider("Visual stone of agony", CVAR_COSMETIC("VisualSoA"));
|
||||
DrawPositionsRadioBoxes(CVAR_COSMETIC("VisualSoA"));
|
||||
DrawUseMarginsSlider("Visual stone of agony", CVAR_COSMETIC("HUD.VisualSoA"));
|
||||
DrawPositionsRadioBoxes(CVAR_COSMETIC("HUD.VisualSoA"));
|
||||
s16 Min_X_VSOA = 0;
|
||||
s16 Max_X_VSOA = ImGui::GetWindowViewport()->Size.x/2;
|
||||
if(CVarGetInteger(CVAR_COSMETIC("VisualSoA.PosType"),0) == 2){
|
||||
if(CVarGetInteger(CVAR_COSMETIC("HUD.VisualSoA.PosType"),0) == 2){
|
||||
Max_X_VSOA = 290;
|
||||
} else if(CVarGetInteger(CVAR_COSMETIC("VisualSoA.PosType"),0) == 4){
|
||||
} else if(CVarGetInteger(CVAR_COSMETIC("HUD.VisualSoA.PosType"),0) == 4){
|
||||
Min_X_VSOA = (ImGui::GetWindowViewport()->Size.x/2)*-1;
|
||||
}
|
||||
DrawPositionSlider(CVAR_COSMETIC("VisualSoA"), 0, ImGui::GetWindowViewport()->Size.y/2, Min_X_VSOA, Max_X_VSOA);
|
||||
DrawScaleSlider(CVAR_COSMETIC("VisualSoA"),1.0f);
|
||||
DrawPositionSlider(CVAR_COSMETIC("HUD.VisualSoA"), 0, ImGui::GetWindowViewport()->Size.y/2, Min_X_VSOA, Max_X_VSOA);
|
||||
DrawScaleSlider(CVAR_COSMETIC("HUD.VisualSoA"),1.0f);
|
||||
ImGui::NewLine();
|
||||
ImGui::EndTable();
|
||||
}
|
||||
}
|
||||
Draw_Table_Dropdown("B Button position", "tablebbtn", "B Button settings", "B Button", CVAR_COSMETIC("BButton"), 0, ImGui::GetWindowViewport()->Size.y/4+50, -1, ImGui::GetWindowViewport()->Size.x-50, 0.95f);
|
||||
Draw_Table_Dropdown("A Button position", "tableabtn", "A Button settings", "A Button", CVAR_COSMETIC("AButton"), -10, ImGui::GetWindowViewport()->Size.y/4+50, -20, ImGui::GetWindowViewport()->Size.x-50, 0.95f);
|
||||
Draw_Table_Dropdown("Start Button position", "tablestartbtn", "Start Button settings", "Start Button", CVAR_COSMETIC("StartButton"), 0, ImGui::GetWindowViewport()->Size.y/2, 0, ImGui::GetWindowViewport()->Size.x/2+70, 0.75f);
|
||||
C_Button_Dropdown("C Button Up position", "tablecubtn", "C Button Up settings", "C Button Up", CVAR_COSMETIC("CUpButton"), CVAR_COSMETIC("CUpButton.PosType"), 0.5f);
|
||||
C_Button_Dropdown("C Button Down position", "tablecdbtn", "C Button Down settings", "C Button Down", CVAR_COSMETIC("CDownButton"), CVAR_COSMETIC("CDownButton.PosType"), 0.87f);
|
||||
C_Button_Dropdown("C Button Left position", "tableclbtn", "C Button Left settings", "C Button Left", CVAR_COSMETIC("CLeftButton"), CVAR_COSMETIC("CLeftButton.PosType"), 0.87f);
|
||||
C_Button_Dropdown("C Button Right position", "tablecrbtn", "C Button Right settings", "C Button Right", CVAR_COSMETIC("CRightButton"), CVAR_COSMETIC("CRightButton.PosType"), 0.87f);
|
||||
if (CVarGetInteger("gDpadEquips",0) && ImGui::CollapsingHeader("DPad items position")) {
|
||||
Draw_Table_Dropdown("B Button position", "tablebbtn", "B Button settings", "B Button", CVAR_COSMETIC("HUD.BButton"), 0, ImGui::GetWindowViewport()->Size.y/4+50, -1, ImGui::GetWindowViewport()->Size.x-50, 0.95f);
|
||||
Draw_Table_Dropdown("A Button position", "tableabtn", "A Button settings", "A Button", CVAR_COSMETIC("HUD.AButton"), -10, ImGui::GetWindowViewport()->Size.y/4+50, -20, ImGui::GetWindowViewport()->Size.x-50, 0.95f);
|
||||
Draw_Table_Dropdown("Start Button position", "tablestartbtn", "Start Button settings", "Start Button", CVAR_COSMETIC("HUD.StartButton"), 0, ImGui::GetWindowViewport()->Size.y/2, 0, ImGui::GetWindowViewport()->Size.x/2+70, 0.75f);
|
||||
C_Button_Dropdown("C Button Up position", "tablecubtn", "C Button Up settings", "C Button Up", CVAR_COSMETIC("HUD.CUpButton"), CVAR_COSMETIC("HUD.CUpButton.PosType"), 0.5f);
|
||||
C_Button_Dropdown("C Button Down position", "tablecdbtn", "C Button Down settings", "C Button Down", CVAR_COSMETIC("HUD.CDownButton"), CVAR_COSMETIC("HUD.CDownButton.PosType"), 0.87f);
|
||||
C_Button_Dropdown("C Button Left position", "tableclbtn", "C Button Left settings", "C Button Left", CVAR_COSMETIC("HUD.CLeftButton"), CVAR_COSMETIC("HUD.CLeftButton.PosType"), 0.87f);
|
||||
C_Button_Dropdown("C Button Right position", "tablecrbtn", "C Button Right settings", "C Button Right", CVAR_COSMETIC("HUD.CRightButton"), CVAR_COSMETIC("HUD.CRightButton.PosType"), 0.87f);
|
||||
if (CVarGetInteger(CVAR_SETTING("DpadEquips"),0) && ImGui::CollapsingHeader("DPad items position")) {
|
||||
if (ImGui::BeginTable("tabledpaditems", 1, FlagsTable)) {
|
||||
ImGui::TableSetupColumn("DPad items settings", FlagsCell, TablesCellsWidth);
|
||||
Table_InitHeader(false);
|
||||
DrawUseMarginsSlider("DPad items", CVAR_COSMETIC("Dpad"));
|
||||
DrawPositionsRadioBoxes(CVAR_COSMETIC("Dpad"));
|
||||
DrawUseMarginsSlider("DPad items", CVAR_COSMETIC("HUD.Dpad"));
|
||||
DrawPositionsRadioBoxes(CVAR_COSMETIC("HUD.Dpad"));
|
||||
s16 Min_X_Dpad = 0;
|
||||
s16 Max_X_Dpad = ImGui::GetWindowViewport()->Size.x/2;
|
||||
if(CVarGetInteger("gDPadPosType",0) == 2){
|
||||
if(CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosType"),0) == 2){
|
||||
Max_X_Dpad = 290;
|
||||
} else if(CVarGetInteger("gDPadPosType",0) == 4){
|
||||
} else if(CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosType"),0) == 4){
|
||||
Min_X_Dpad = (ImGui::GetWindowViewport()->Size.x/2)*-1;
|
||||
}
|
||||
DrawPositionSlider(CVAR_COSMETIC("Dpad"), 0, ImGui::GetWindowViewport()->Size.y/2, Min_X_Dpad, Max_X_Dpad);
|
||||
DrawScaleSlider(CVAR_COSMETIC("Dpad"),1.0f);
|
||||
DrawPositionSlider(CVAR_COSMETIC("HUD.Dpad"), 0, ImGui::GetWindowViewport()->Size.y/2, Min_X_Dpad, Max_X_Dpad);
|
||||
DrawScaleSlider(CVAR_COSMETIC("HUD.Dpad"),1.0f);
|
||||
ImGui::NewLine();
|
||||
ImGui::EndTable();
|
||||
}
|
||||
}
|
||||
Draw_Table_Dropdown("Minimaps position", "tableminimapspos", "minimaps settings", "Minimap", CVAR_COSMETIC("Minimap"), (ImGui::GetWindowViewport()->Size.y/3)*-1, ImGui::GetWindowViewport()->Size.y/3, ImGui::GetWindowViewport()->Size.x*-1, ImGui::GetWindowViewport()->Size.x/2, 1.0f);
|
||||
Draw_Table_Dropdown("Small Keys counter position", "tablesmolekeys", "Small Keys counter settings", "Small Keys counter", CVAR_COSMETIC("SmallKey"), 0, ImGui::GetWindowViewport()->Size.y/3, -1, ImGui::GetWindowViewport()->Size.x/2, 1.0f);
|
||||
Draw_Table_Dropdown("Rupee counter position", "tablerupeecount", "Rupee counter settings", "Rupee counter", CVAR_COSMETIC("Rupees"), -2, ImGui::GetWindowViewport()->Size.y/3, -3, ImGui::GetWindowViewport()->Size.x/2, 1.0f);
|
||||
Draw_Table_Dropdown("Carrots position", "tableCarrots", "Carrots settings", "Carrots", CVAR_COSMETIC("Carrots"), 0, ImGui::GetWindowViewport()->Size.y/2, -50, ImGui::GetWindowViewport()->Size.x/2+25, 1.0f);
|
||||
Draw_Table_Dropdown("Timers position", "tabletimers", "Timers settings", "Timers", CVAR_COSMETIC("Timers"), 0, ImGui::GetWindowViewport()->Size.y/2, -50, ImGui::GetWindowViewport()->Size.x/2-50, 1.0f);
|
||||
Draw_Table_Dropdown("Archery Scores position", "tablearchery", "Archery Scores settings", "Archery scores", CVAR_COSMETIC("ArcheryScore"), 0, ImGui::GetWindowViewport()->Size.y/2, -50, ImGui::GetWindowViewport()->Size.x/2-50, 1.0f);
|
||||
Draw_Table_Dropdown("Title cards (Maps) position", "tabletcmaps", "Titlecard maps settings", "Title cards (overworld)", CVAR_COSMETIC("TitleCard.Map"), 0, ImGui::GetWindowViewport()->Size.y/2, -50, ImGui::GetWindowViewport()->Size.x/2+10, 1.0f);
|
||||
Draw_Table_Dropdown("Title cards (Bosses) position", "tabletcbosses", "Title cards (Bosses) settings", "Title cards (Bosses)", CVAR_COSMETIC("TitleCard.Boss"), 0, ImGui::GetWindowViewport()->Size.y/2, -50, ImGui::GetWindowViewport()->Size.x/2+10, 1.0f);
|
||||
Draw_Table_Dropdown("In-game Gameplay Timer position", "tablegameplaytimer", "In-game Gameplay Timer settings", "In-game Gameplay Timer", CVAR_COSMETIC("IGT"), 0, ImGui::GetWindowViewport()->Size.y / 2, -50, ImGui::GetWindowViewport()->Size.x / 2 + 10, 1.0f);
|
||||
Draw_Table_Dropdown("Minimaps position", "tableminimapspos", "minimaps settings", "Minimap", CVAR_COSMETIC("HUD.Minimap"), (ImGui::GetWindowViewport()->Size.y/3)*-1, ImGui::GetWindowViewport()->Size.y/3, ImGui::GetWindowViewport()->Size.x*-1, ImGui::GetWindowViewport()->Size.x/2, 1.0f);
|
||||
Draw_Table_Dropdown("Small Keys counter position", "tablesmolekeys", "Small Keys counter settings", "Small Keys counter", CVAR_COSMETIC("HUD.SmallKey"), 0, ImGui::GetWindowViewport()->Size.y/3, -1, ImGui::GetWindowViewport()->Size.x/2, 1.0f);
|
||||
Draw_Table_Dropdown("Rupee counter position", "tablerupeecount", "Rupee counter settings", "Rupee counter", CVAR_COSMETIC("HUD.Rupees"), -2, ImGui::GetWindowViewport()->Size.y/3, -3, ImGui::GetWindowViewport()->Size.x/2, 1.0f);
|
||||
Draw_Table_Dropdown("Carrots position", "tableCarrots", "Carrots settings", "Carrots", CVAR_COSMETIC("HUD.Carrots"), 0, ImGui::GetWindowViewport()->Size.y/2, -50, ImGui::GetWindowViewport()->Size.x/2+25, 1.0f);
|
||||
Draw_Table_Dropdown("Timers position", "tabletimers", "Timers settings", "Timers", CVAR_COSMETIC("HUD.Timers"), 0, ImGui::GetWindowViewport()->Size.y/2, -50, ImGui::GetWindowViewport()->Size.x/2-50, 1.0f);
|
||||
Draw_Table_Dropdown("Archery Scores position", "tablearchery", "Archery Scores settings", "Archery scores", CVAR_COSMETIC("HUD.ArcheryScore"), 0, ImGui::GetWindowViewport()->Size.y/2, -50, ImGui::GetWindowViewport()->Size.x/2-50, 1.0f);
|
||||
Draw_Table_Dropdown("Title cards (Maps) position", "tabletcmaps", "Titlecard maps settings", "Title cards (overworld)", CVAR_COSMETIC("HUD.TitleCard.Map"), 0, ImGui::GetWindowViewport()->Size.y/2, -50, ImGui::GetWindowViewport()->Size.x/2+10, 1.0f);
|
||||
Draw_Table_Dropdown("Title cards (Bosses) position", "tabletcbosses", "Title cards (Bosses) settings", "Title cards (Bosses)", CVAR_COSMETIC("HUD.TitleCard.Boss"), 0, ImGui::GetWindowViewport()->Size.y/2, -50, ImGui::GetWindowViewport()->Size.x/2+10, 1.0f);
|
||||
Draw_Table_Dropdown("In-game Gameplay Timer position", "tablegameplaytimer", "In-game Gameplay Timer settings", "In-game Gameplay Timer", CVAR_COSMETIC("HUD.IGT"), 0, ImGui::GetWindowViewport()->Size.y / 2, -50, ImGui::GetWindowViewport()->Size.x / 2 + 10, 1.0f);
|
||||
if (ImGui::CollapsingHeader("Enemy Health Bar position")) {
|
||||
if (ImGui::BeginTable("enemyhealthbar", 1, FlagsTable)) {
|
||||
ImGui::TableSetupColumn("Enemy Health Bar settings", FlagsCell, TablesCellsWidth);
|
||||
Table_InitHeader(false);
|
||||
std::string posTypeCVar = CVAR_COSMETIC("HUD.EnemyHealthBarPosType");
|
||||
std::string posTypeCVar = CVAR_COSMETIC("HUD.EnemyHealthBar.PosType");
|
||||
UIWidgets::EnhancementRadioButton("Anchor to Enemy", posTypeCVar.c_str(), ENEMYHEALTH_ANCHOR_ACTOR);
|
||||
UIWidgets::Tooltip("This will use enemy on screen position");
|
||||
UIWidgets::EnhancementRadioButton("Anchor to the top", posTypeCVar.c_str(), ENEMYHEALTH_ANCHOR_TOP);
|
||||
UIWidgets::Tooltip("This will make your elements follow the top edge of your game window");
|
||||
UIWidgets::EnhancementRadioButton("Anchor to the bottom", posTypeCVar.c_str(), ENEMYHEALTH_ANCHOR_BOTTOM);
|
||||
UIWidgets::Tooltip("This will make your elements follow the bottom edge of your game window");
|
||||
DrawPositionSlider(CVAR_COSMETIC("HUD.EnemyHealthBar"), -SCREEN_HEIGHT, SCREEN_HEIGHT, -ImGui::GetWindowViewport()->Size.x / 2, ImGui::GetWindowViewport()->Size.x / 2);
|
||||
if (UIWidgets::EnhancementSliderInt("Health Bar Width: %d", "##EnemyHealthBarWidth", CVAR_COSMETIC("HUD.EnemyHealthBarWidth.Value"), 32, 128, "", 64)) {
|
||||
CVarSetInteger(CVAR_COSMETIC("HUD.EnemyHealthBarWidth.Changed"), 1);
|
||||
DrawPositionSlider(CVAR_COSMETIC("HUD.EnemyHealthBar."), -SCREEN_HEIGHT, SCREEN_HEIGHT, -ImGui::GetWindowViewport()->Size.x / 2, ImGui::GetWindowViewport()->Size.x / 2);
|
||||
if (UIWidgets::EnhancementSliderInt("Health Bar Width: %d", "##EnemyHealthBarWidth", CVAR_COSMETIC("HUD.EnemyHealthBar.Width.Value"), 32, 128, "", 64)) {
|
||||
CVarSetInteger(CVAR_COSMETIC("HUD.EnemyHealthBar.Width.Changed"), 1);
|
||||
}
|
||||
UIWidgets::Tooltip("This will change the width of the health bar");
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Reset##EnemyHealthBarWidth")) {
|
||||
CVarClear(CVAR_COSMETIC("HUD.EnemyHealthBarWidth.Value"));
|
||||
CVarClear(CVAR_COSMETIC("HUD.EnemyHealthBarWidth.Changed"));
|
||||
CVarClear(CVAR_COSMETIC("HUD.EnemyHealthBar.Width.Value"));
|
||||
CVarClear(CVAR_COSMETIC("HUD.EnemyHealthBar.Width.Changed"));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
ImGui::NewLine();
|
||||
@ -1346,8 +1347,8 @@ void Reset_Option_Double(const char* Button_Title, const char* name) {
|
||||
}
|
||||
void DrawSillyTab() {
|
||||
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
|
||||
if (CVarGetInteger("gLetItSnow", 0)) {
|
||||
if (UIWidgets::EnhancementCheckbox("Let It Snow", "gLetItSnow")) {
|
||||
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
|
||||
if (UIWidgets::EnhancementCheckbox("Let It Snow", CVAR_GENERAL("LetItSnow"))) {
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
}
|
||||
@ -1380,7 +1381,7 @@ void DrawSillyTab() {
|
||||
Reset_Option_Single("Reset##BunnyHood_EarSpread", CVAR_COSMETIC("BunnyHood.EarSpread"));
|
||||
UIWidgets::EnhancementSliderFloat("Goron Neck Length: %f", "##Goron_NeckLength", CVAR_COSMETIC("Goron.NeckLength"), 0.0f, 1000.0f, "", 0.0f, false);
|
||||
Reset_Option_Single("Reset##Goron_NeckLength", CVAR_COSMETIC("Goron.NeckLength"));
|
||||
UIWidgets::EnhancementCheckbox("Unfix Goron Spin", "gUnfixGoronSpin");
|
||||
UIWidgets::EnhancementCheckbox("Unfix Goron Spin", CVAR_COSMETIC("UnfixGoronSpin"));
|
||||
UIWidgets::EnhancementSliderFloat("Fairies Size: %f", "##Fairies_Size", CVAR_COSMETIC("Fairies.Size"), 0.25f, 5.0f, "", 1.0f, false);
|
||||
Reset_Option_Single("Reset##Fairies_Size", CVAR_COSMETIC("Fairies.Size"));
|
||||
UIWidgets::EnhancementSliderFloat("N64 Logo Spin Speed: %f", "##N64Logo_SpinSpeed", CVAR_COSMETIC("N64Logo.SpinSpeed"), 0.25f, 5.0f, "", 1.0f, false);
|
||||
|
@ -223,7 +223,7 @@ void PatchMirroredSoldOutGI() {
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
|
||||
};
|
||||
|
||||
if (CVarGetInteger("gMirroredWorld", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
|
||||
if (mirroredSoldOutVtx == nullptr) {
|
||||
// Copy the original vertices that we want to modify (4 at the beginning of the resource)
|
||||
mirroredSoldOutVtx = (Vtx*)malloc(sizeof(Vtx) * 4);
|
||||
@ -270,7 +270,7 @@ void PatchMirroredSunSongEtching() {
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, 7, 5, G_TX_NOLOD, G_TX_NOLOD)
|
||||
};
|
||||
|
||||
if (CVarGetInteger("gMirroredWorld", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
|
||||
if (mirroredSunSongVtx == nullptr) {
|
||||
// Copy the original vertices that we want to modify (4 at the beginning of the resource)
|
||||
mirroredSunSongVtx = (Vtx*)malloc(sizeof(Vtx) * 4);
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <string>
|
||||
#include <libultraship/bridge.h>
|
||||
#include <libultraship/libultraship.h>
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
extern "C" {
|
||||
#include <z64.h>
|
||||
@ -887,7 +888,7 @@ std::vector<u16> GetActorsWithDescriptionContainingString(std::string s) {
|
||||
}
|
||||
|
||||
void ActorViewer_AddTagForActor(Actor* actor) {
|
||||
int val = CVarGetInteger("gDebugActorViewerNameTags", ACTORVIEWER_NAMETAGS_NONE);
|
||||
int val = CVarGetInteger(CVAR_DEVELOPER_TOOLS("ActorViewer.NameTags"), ACTORVIEWER_NAMETAGS_NONE);
|
||||
auto entry = ActorDB::Instance->RetrieveEntry(actor->id);
|
||||
std::string tag;
|
||||
|
||||
@ -1129,10 +1130,10 @@ void ActorViewerWindow::DrawElement() {
|
||||
newActor.params = 0;
|
||||
}
|
||||
|
||||
UIWidgets::EnhancementCheckbox("Advanced mode", "gActorViewerAdvancedParams");
|
||||
UIWidgets::EnhancementCheckbox("Advanced mode", CVAR_DEVELOPER_TOOLS("ActorViewer.AdvancedParams"));
|
||||
UIWidgets::InsertHelpHoverText("Changes the actor specific param menus with a direct input");
|
||||
|
||||
if (CVarGetInteger("gActorViewerAdvancedParams", 0)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("ActorViewer.AdvancedParams"), 0)) {
|
||||
ImGui::InputScalar("params", ImGuiDataType_S16, &newActor.params, &one);
|
||||
} else if (std::find(noParamsActors.begin(), noParamsActors.end(), newActor.id) == noParamsActors.end()) {
|
||||
CreateActorSpecificData();
|
||||
@ -1214,7 +1215,7 @@ void ActorViewerWindow::DrawElement() {
|
||||
UIWidgets::Spacer(0);
|
||||
|
||||
ImGui::Text("Actor Name Tags");
|
||||
if (UIWidgets::EnhancementCombobox("gDebugActorViewerNameTags", nameTagOptions, ACTORVIEWER_NAMETAGS_NONE)) {
|
||||
if (UIWidgets::EnhancementCombobox(CVAR_DEVELOPER_TOOLS("ActorViewer.NameTags"), nameTagOptions, ACTORVIEWER_NAMETAGS_NONE)) {
|
||||
NameTag_RemoveAllByTag(DEBUG_ACTOR_NAMETAG_TAG);
|
||||
ActorViewer_AddTagForAllActors();
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <cmath>
|
||||
#include <libultraship/bridge.h>
|
||||
#include <libultraship/libultraship.h>
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
extern "C" {
|
||||
#include <z64.h>
|
||||
@ -57,17 +58,17 @@ void ColViewerWindow::DrawElement() {
|
||||
ImGui::End();
|
||||
return;
|
||||
}
|
||||
UIWidgets::EnhancementCheckbox("Enabled", "gColViewerEnabled");
|
||||
UIWidgets::EnhancementCheckbox("Enabled", CVAR_DEVELOPER_TOOLS("ColViewer.Enabled"));
|
||||
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Scene", "gColViewerScene", ColRenderSettingNames, COLVIEW_DISABLED);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Bg Actors", "gColViewerBgActors", ColRenderSettingNames, COLVIEW_DISABLED);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Col Check", "gColViewerColCheck", ColRenderSettingNames, COLVIEW_DISABLED);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Waterbox", "gColViewerWaterbox", ColRenderSettingNames, COLVIEW_DISABLED);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Scene", CVAR_DEVELOPER_TOOLS("ColViewer.Scene"), ColRenderSettingNames, COLVIEW_DISABLED);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Bg Actors", CVAR_DEVELOPER_TOOLS("ColViewer.BGActors"), ColRenderSettingNames, COLVIEW_DISABLED);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Col Check", CVAR_DEVELOPER_TOOLS("ColViewer.ColCheck"), ColRenderSettingNames, COLVIEW_DISABLED);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Waterbox", CVAR_DEVELOPER_TOOLS("ColViewer.Waterbox"), ColRenderSettingNames, COLVIEW_DISABLED);
|
||||
|
||||
UIWidgets::EnhancementCheckbox("Apply as decal", "gColViewerDecal");
|
||||
UIWidgets::EnhancementCheckbox("Apply as decal", CVAR_DEVELOPER_TOOLS("ColViewer.Decal"));
|
||||
UIWidgets::InsertHelpHoverText("Applies the collision as a decal display. This can be useful if there is z-fighting occuring "
|
||||
"with the scene geometry, but can cause other artifacts.");
|
||||
UIWidgets::EnhancementCheckbox("Shaded", "gColViewerShaded");
|
||||
UIWidgets::EnhancementCheckbox("Shaded", CVAR_DEVELOPER_TOOLS("ColViewer.Shaded"));
|
||||
UIWidgets::InsertHelpHoverText("Applies the scene's shading to the collision display.");
|
||||
|
||||
// This has to be duplicated in both code paths due to the nature of ImGui::IsItemHovered()
|
||||
@ -75,20 +76,20 @@ void ColViewerWindow::DrawElement() {
|
||||
if (ImGui::TreeNode("Colors")) {
|
||||
UIWidgets::InsertHelpHoverText(colorHelpText);
|
||||
|
||||
UIWidgets::EnhancementColor("Normal", "gColViewerColorNormal", scene_col, ImVec4(255, 255, 255, 255), false);
|
||||
UIWidgets::EnhancementColor("Hookshot", "gColViewerColorHookshot", hookshot_col, ImVec4(128, 128, 255, 255),
|
||||
UIWidgets::EnhancementColor("Normal", CVAR_DEVELOPER_TOOLS("ColViewer.ColorNormal"), scene_col, ImVec4(255, 255, 255, 255), false);
|
||||
UIWidgets::EnhancementColor("Hookshot", CVAR_DEVELOPER_TOOLS("ColViewer.ColorHookshot"), hookshot_col, ImVec4(128, 128, 255, 255),
|
||||
false);
|
||||
UIWidgets::EnhancementColor("Entrance", "gColViewerColorEntrance", entrance_col, ImVec4(0, 255, 0, 255), false);
|
||||
UIWidgets::EnhancementColor("Special Surface (Grass/Sand/Etc)", "gColViewerColorSpecialSurface",
|
||||
UIWidgets::EnhancementColor("Entrance", CVAR_DEVELOPER_TOOLS("ColViewer.ColorEntrance"), entrance_col, ImVec4(0, 255, 0, 255), false);
|
||||
UIWidgets::EnhancementColor("Special Surface (Grass/Sand/Etc)", CVAR_DEVELOPER_TOOLS("ColViewer.ColorSpecialSurface"),
|
||||
specialSurface_col, ImVec4(192, 255, 192, 255), false);
|
||||
UIWidgets::EnhancementColor("Interactable (Vines/Crawlspace/Etc)", "gColViewerColorInteractable",
|
||||
UIWidgets::EnhancementColor("Interactable (Vines/Crawlspace/Etc)", CVAR_DEVELOPER_TOOLS("ColViewer.ColorInteractable"),
|
||||
interactable_col, ImVec4(192, 0, 192, 255), false);
|
||||
UIWidgets::EnhancementColor("Slope", "gColViewerColorSlope", slope_col, ImVec4(255, 255, 128, 255), false);
|
||||
UIWidgets::EnhancementColor("Void", "gColViewerColorVoid", void_col, ImVec4(255, 0, 0, 255), false);
|
||||
UIWidgets::EnhancementColor("OC", "gColViewerColorOC", oc_col, ImVec4(255, 255, 255, 255), false);
|
||||
UIWidgets::EnhancementColor("AC", "gColViewerColorAC", ac_col, ImVec4(0, 0, 255, 255), false);
|
||||
UIWidgets::EnhancementColor("AT", "gColViewerColorAT", at_col, ImVec4(255, 0, 0, 255), false);
|
||||
UIWidgets::EnhancementColor("Waterbox", "gColViewerColorWaterbox", waterbox_col, ImVec4(0, 0, 255, 255), false);
|
||||
UIWidgets::EnhancementColor("Slope", CVAR_DEVELOPER_TOOLS("ColViewer.ColorSlope"), slope_col, ImVec4(255, 255, 128, 255), false);
|
||||
UIWidgets::EnhancementColor("Void", CVAR_DEVELOPER_TOOLS("ColViewer.ColorVoid"), void_col, ImVec4(255, 0, 0, 255), false);
|
||||
UIWidgets::EnhancementColor("OC", CVAR_DEVELOPER_TOOLS("ColViewer.ColorOC"), oc_col, ImVec4(255, 255, 255, 255), false);
|
||||
UIWidgets::EnhancementColor("AC", CVAR_DEVELOPER_TOOLS("ColViewer.ColorAC"), ac_col, ImVec4(0, 0, 255, 255), false);
|
||||
UIWidgets::EnhancementColor("AT", CVAR_DEVELOPER_TOOLS("ColViewer.ColorAT"), at_col, ImVec4(255, 0, 0, 255), false);
|
||||
UIWidgets::EnhancementColor("Waterbox", CVAR_DEVELOPER_TOOLS("ColViewer.ColorWaterbox"), waterbox_col, ImVec4(0, 0, 255, 255), false);
|
||||
|
||||
ImGui::TreePop();
|
||||
} else {
|
||||
@ -308,7 +309,7 @@ void InitGfx(std::vector<Gfx>& gfx, ColRenderSetting setting) {
|
||||
alpha = 0xFF;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gColViewerDecal", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Decal"), 0) != 0) {
|
||||
rm |= ZMODE_DEC;
|
||||
} else if (setting == ColRenderSetting::Transparent) {
|
||||
rm |= ZMODE_XLU;
|
||||
@ -320,7 +321,7 @@ void InitGfx(std::vector<Gfx>& gfx, ColRenderSetting setting) {
|
||||
gfx.push_back(gsDPSetCycleType(G_CYC_1CYCLE));
|
||||
gfx.push_back(gsDPSetRenderMode(rm | blc1, rm | blc2));
|
||||
|
||||
if (CVarGetInteger("gColViewerShaded", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Shaded"), 0) != 0) {
|
||||
gfx.push_back(gsDPSetCombineMode(G_CC_MODULATERGB_PRIM_ENVA, G_CC_MODULATERGB_PRIM_ENVA));
|
||||
gfx.push_back(gsSPLoadGeometryMode(G_CULL_BACK | G_ZBUFFER | G_LIGHTING));
|
||||
} else {
|
||||
@ -333,16 +334,13 @@ void InitGfx(std::vector<Gfx>& gfx, ColRenderSetting setting) {
|
||||
|
||||
// Draws a dynapoly structure (scenes or Bg Actors)
|
||||
void DrawDynapoly(std::vector<Gfx>& dl, CollisionHeader* col, int32_t bgId) {
|
||||
uint32_t colorR = CVarGetInteger("gColViewerColorNormalR", 255);
|
||||
uint32_t colorG = CVarGetInteger("gColViewerColorNormalG", 255);
|
||||
uint32_t colorB = CVarGetInteger("gColViewerColorNormalB", 255);
|
||||
uint32_t colorA = 255;
|
||||
Color_RGBA8 color = {255, 255, 255, 255};
|
||||
|
||||
uint32_t lastColorR = colorR;
|
||||
uint32_t lastColorG = colorG;
|
||||
uint32_t lastColorB = colorB;
|
||||
uint32_t lastColorR = color.r;
|
||||
uint32_t lastColorG = color.g;
|
||||
uint32_t lastColorB = color.b;
|
||||
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, colorR, colorG, colorB, colorA));
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
|
||||
// This keeps track of if we have processed a poly, but not drawn it yet so we can batch them.
|
||||
// This saves several hundred commands in larger scenes
|
||||
@ -352,49 +350,35 @@ void DrawDynapoly(std::vector<Gfx>& dl, CollisionHeader* col, int32_t bgId) {
|
||||
CollisionPoly* poly = &col->polyList[i];
|
||||
|
||||
if (SurfaceType_IsHookshotSurface(&gPlayState->colCtx, poly, bgId)) {
|
||||
colorR = CVarGetInteger("gColViewerColorHookshotR", 128);
|
||||
colorG = CVarGetInteger("gColViewerColorHookshotG", 128);
|
||||
colorB = CVarGetInteger("gColViewerColorHookshotB", 255);
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorHookshot"), { 128, 128, 255, 255 });
|
||||
} else if (func_80041D94(&gPlayState->colCtx, poly, bgId) > 0x01) {
|
||||
colorR = CVarGetInteger("gColViewerColorInteractableR", 192);
|
||||
colorG = CVarGetInteger("gColViewerColorInteractableG", 0);
|
||||
colorB = CVarGetInteger("gColViewerColorInteractableB", 192);
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorInteractable"), {192, 0, 192, 255});
|
||||
} else if (func_80041E80(&gPlayState->colCtx, poly, bgId) == 0x0C) {
|
||||
colorR = CVarGetInteger("gColViewerColorVoidR", 255);
|
||||
colorG = CVarGetInteger("gColViewerColorVoidG", 0);
|
||||
colorB = CVarGetInteger("gColViewerColorVoidB", 0);
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorVoid"), { 255, 0, 0, 255 });
|
||||
} else if (SurfaceType_GetSceneExitIndex(&gPlayState->colCtx, poly, bgId) ||
|
||||
func_80041E80(&gPlayState->colCtx, poly, bgId) == 0x05) {
|
||||
colorR = CVarGetInteger("gColViewerColorEntranceR", 0);
|
||||
colorG = CVarGetInteger("gColViewerColorEntranceG", 255);
|
||||
colorB = CVarGetInteger("gColViewerColorEntranceB", 0);
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorEntrance"), { 0, 255, 0, 255 });
|
||||
} else if (func_80041D4C(&gPlayState->colCtx, poly, bgId) != 0 ||
|
||||
SurfaceType_IsWallDamage(&gPlayState->colCtx, poly, bgId)) {
|
||||
colorR = CVarGetInteger("gColViewerColorSpecialSurfaceR", 192);
|
||||
colorG = CVarGetInteger("gColViewerColorSpecialSurfaceG", 255);
|
||||
colorB = CVarGetInteger("gColViewerColorSpecialSurfaceB", 192);
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorSpecialSurface"), { 192, 255, 192, 255 });
|
||||
} else if (SurfaceType_GetSlope(&gPlayState->colCtx, poly, bgId) == 0x01) {
|
||||
colorR = CVarGetInteger("gColViewerColorSlopeR", 255);
|
||||
colorG = CVarGetInteger("gColViewerColorSlopeG", 255);
|
||||
colorB = CVarGetInteger("gColViewerColorSlopeB", 128);
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorSlope"), { 255, 255, 128, 255 });
|
||||
} else {
|
||||
colorR = CVarGetInteger("gColViewerColorNormalR", 255);
|
||||
colorG = CVarGetInteger("gColViewerColorNormalG", 255);
|
||||
colorB = CVarGetInteger("gColViewerColorNormalB", 255);
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorNormal"), { 255, 255, 255, 255 });
|
||||
}
|
||||
|
||||
if (colorR != lastColorR || colorG != lastColorG || colorB != lastColorB) {
|
||||
if (color.r != lastColorR || color.g != lastColorG || color.b != lastColorB) {
|
||||
// Color changed, flush previous poly
|
||||
if (previousPoly) {
|
||||
dl.push_back(gsSPVertex((uintptr_t)&vtxDl.at(vtxDl.size() - 3), 3, 0));
|
||||
dl.push_back(gsSP1Triangle(0, 1, 2, 0));
|
||||
previousPoly = false;
|
||||
}
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, colorR, colorG, colorB, colorA));
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
}
|
||||
lastColorR = colorR;
|
||||
lastColorG = colorG;
|
||||
lastColorB = colorB;
|
||||
lastColorR = color.r;
|
||||
lastColorG = color.g;
|
||||
lastColorB = color.b;
|
||||
|
||||
Vec3s* va = &col->vtxList[COLPOLY_VTX_INDEX(poly->flags_vIA)];
|
||||
Vec3s* vb = &col->vtxList[COLPOLY_VTX_INDEX(poly->flags_vIB)];
|
||||
@ -428,9 +412,9 @@ void DrawDynapoly(std::vector<Gfx>& dl, CollisionHeader* col, int32_t bgId) {
|
||||
|
||||
// Draws the scene
|
||||
void DrawSceneCollision() {
|
||||
ColRenderSetting showSceneColSetting = (ColRenderSetting)CVarGetInteger("gColViewerScene", COLVIEW_DISABLED);
|
||||
ColRenderSetting showSceneColSetting = (ColRenderSetting)CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Scene"), COLVIEW_DISABLED);
|
||||
|
||||
if (showSceneColSetting == ColRenderSetting::Disabled || !CVarGetInteger("gColViewerEnabled", 0)) {
|
||||
if (showSceneColSetting == ColRenderSetting::Disabled || !CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Enabled"), 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -443,8 +427,8 @@ void DrawSceneCollision() {
|
||||
|
||||
// Draws all Bg Actors
|
||||
void DrawBgActorCollision() {
|
||||
ColRenderSetting showBgActorSetting = (ColRenderSetting)CVarGetInteger("gColViewerBgActors", COLVIEW_DISABLED);
|
||||
if (showBgActorSetting == ColRenderSetting::Disabled || !CVarGetInteger("gColViewerEnabled", 0)) {
|
||||
ColRenderSetting showBgActorSetting = (ColRenderSetting)CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.BGActors"), COLVIEW_DISABLED);
|
||||
if (showBgActorSetting == ColRenderSetting::Disabled || !CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Enabled"), 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -568,8 +552,8 @@ void DrawColCheckList(std::vector<Gfx>& dl, Collider** objects, int32_t count) {
|
||||
|
||||
// Draws all Col Check objects
|
||||
void DrawColCheckCollision() {
|
||||
ColRenderSetting showColCheckSetting = (ColRenderSetting)CVarGetInteger("gColViewerColCheck", COLVIEW_DISABLED);
|
||||
if (showColCheckSetting == ColRenderSetting::Disabled || !CVarGetInteger("gColViewerEnabled", 0)) {
|
||||
ColRenderSetting showColCheckSetting = (ColRenderSetting)CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.ColCheck"), COLVIEW_DISABLED);
|
||||
if (showColCheckSetting == ColRenderSetting::Disabled || !CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Enabled"), 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -578,15 +562,14 @@ void DrawColCheckCollision() {
|
||||
dl.push_back(gsSPMatrix(&gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH));
|
||||
|
||||
CollisionCheckContext& col = gPlayState->colChkCtx;
|
||||
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, CVarGetInteger("gColViewerColorOCR", 255), CVarGetInteger("gColViewerColorOCG", 255),
|
||||
CVarGetInteger("gColViewerColorOCB", 255), 255));
|
||||
Color_RGBA8 color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorOC"), { 255, 255, 255, 255 });
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
DrawColCheckList(dl, col.colOC, col.colOCCount);
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, CVarGetInteger("gColViewerColorACR", 0), CVarGetInteger("gColViewerColorACG", 0),
|
||||
CVarGetInteger("gColViewerColorACB", 255), 255));
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorAC"), { 0, 0, 255, 255 });
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
DrawColCheckList(dl, col.colAC, col.colACCount);
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, CVarGetInteger("gColViewerColorATR", 255), CVarGetInteger("gColViewerColorATG", 0),
|
||||
CVarGetInteger("gColViewerColorATB", 0), 255));
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorAT"), { 0, 0, 255, 255 });
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
|
||||
DrawColCheckList(dl, col.colAT, col.colATCount);
|
||||
}
|
||||
@ -621,8 +604,8 @@ extern "C" f32 zdWaterBoxMinY;
|
||||
|
||||
// Draws all waterboxes
|
||||
void DrawWaterboxList() {
|
||||
ColRenderSetting showWaterboxSetting = (ColRenderSetting)CVarGetInteger("gColViewerWaterbox", COLVIEW_DISABLED);
|
||||
if (showWaterboxSetting == ColRenderSetting::Disabled || !CVarGetInteger("gColViewerEnabled", 0)) {
|
||||
ColRenderSetting showWaterboxSetting = (ColRenderSetting)CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Waterbox"), COLVIEW_DISABLED);
|
||||
if (showWaterboxSetting == ColRenderSetting::Disabled || !CVarGetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Enabled"), 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -630,9 +613,9 @@ void DrawWaterboxList() {
|
||||
InitGfx(dl, showWaterboxSetting);
|
||||
dl.push_back(gsSPMatrix(&gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH));
|
||||
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, CVarGetInteger("gColViewerColorWaterboxR", 0),
|
||||
CVarGetInteger("gColViewerColorWaterboxG", 0),
|
||||
CVarGetInteger("gColViewerColorWaterboxB", 255), 255));
|
||||
Color_RGBA8 color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorWaterbox"), { 0, 0, 255, 255 });
|
||||
|
||||
dl.push_back(gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
|
||||
CollisionHeader* col = gPlayState->colCtx.colHeader;
|
||||
for (int32_t waterboxIndex = 0; waterboxIndex < col->numWaterBoxes; waterboxIndex++) {
|
||||
@ -693,7 +676,7 @@ extern "C" void DrawColViewer() {
|
||||
|
||||
OPEN_DISPS(gPlayState->state.gfxCtx);
|
||||
|
||||
uint8_t mirroredWorld = CVarGetInteger("gMirroredWorld", 0);
|
||||
uint8_t mirroredWorld = CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0);
|
||||
// Col viewer needs inverted culling in mirror mode for both OPA and XLU buffers
|
||||
if (mirroredWorld) {
|
||||
gSPSetExtraGeometryMode(POLY_OPA_DISP++, G_EX_INVERT_CULLING);
|
||||
|
@ -1705,7 +1705,7 @@ void DrawPlayerTab() {
|
||||
ImGui::SameLine();
|
||||
ImGui::InputScalar("C Right", ImGuiDataType_U8, &gSaveContext.equips.buttonItems[3], &one, NULL);
|
||||
|
||||
if (CVarGetInteger("gDpadEquips", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("DpadEquips"), 0)) {
|
||||
ImGui::NewLine();
|
||||
ImGui::Text("Current D-pad Equips");
|
||||
ImGui::InputScalar("D-pad Up ", ImGuiDataType_U8, &gSaveContext.equips.buttonItems[4], &one, NULL); // Two spaces at the end for aligning, not elegant but it's working
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "valueViewer.h"
|
||||
#include "../../UIWidgets.hpp"
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
extern "C" {
|
||||
#include <z64.h>
|
||||
@ -107,7 +108,7 @@ void ValueViewerWindow::DrawElement() {
|
||||
return;
|
||||
}
|
||||
|
||||
UIWidgets::PaddedEnhancementCheckbox("Enable Printing", "gValueViewer.EnablePrinting");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Enable Printing", CVAR_DEVELOPER_TOOLS("ValueViewerEnablePrinting"));
|
||||
|
||||
ImGui::BeginGroup();
|
||||
static int selectedElement = -1;
|
||||
@ -187,7 +188,7 @@ void ValueViewerWindow::DrawElement() {
|
||||
}
|
||||
|
||||
ImGui::BeginGroup();
|
||||
if (CVarGetInteger("gValueViewer.EnablePrinting", 0)) {
|
||||
if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("ValueViewerEnablePrinting"), 0)) {
|
||||
ImGui::Checkbox(("Print##" + std::string(element.name)).c_str(), &element.isPrinted);
|
||||
if (element.isPrinted) {
|
||||
char* prefix = (char*)element.prefix.c_str();
|
||||
|
@ -353,19 +353,19 @@ void GameInteractor::RawAction::SetTimeOfDay(uint32_t time) {
|
||||
}
|
||||
|
||||
void GameInteractor::RawAction::SetCollisionViewer(bool active) {
|
||||
CVarSetInteger("gColViewerEnabled", active);
|
||||
CVarSetInteger("gColViewerDecal", active);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Enabled"), active);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Decal"), active);
|
||||
|
||||
if (active) {
|
||||
CVarSetInteger("gColViewerScene", COLVIEW_TRANSPARENT);
|
||||
CVarSetInteger("gColViewerBgActors", COLVIEW_TRANSPARENT);
|
||||
CVarSetInteger("gColViewerColCheck", COLVIEW_TRANSPARENT);
|
||||
CVarSetInteger("gColViewerWaterbox", COLVIEW_TRANSPARENT);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Scene"), COLVIEW_TRANSPARENT);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.BGActors"), COLVIEW_TRANSPARENT);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.ColCheck"), COLVIEW_TRANSPARENT);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Waterbox"), COLVIEW_TRANSPARENT);
|
||||
} else {
|
||||
CVarSetInteger("gColViewerScene", COLVIEW_DISABLED);
|
||||
CVarSetInteger("gColViewerBgActors", COLVIEW_DISABLED);
|
||||
CVarSetInteger("gColViewerColCheck", COLVIEW_DISABLED);
|
||||
CVarSetInteger("gColViewerWaterbox", COLVIEW_DISABLED);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Scene"), COLVIEW_DISABLED);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.BGActors"), COLVIEW_DISABLED);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.ColCheck"), COLVIEW_DISABLED);
|
||||
CVarSetInteger(CVAR_DEVELOPER_TOOLS("ColViewer.Waterbox"), COLVIEW_DISABLED);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -388,7 +388,7 @@ void GameplayStatsRow(const char* label, const std::string& value, ImVec4 color
|
||||
}
|
||||
|
||||
bool compareTimestampInfoByTime(const TimestampInfo& a, const TimestampInfo& b) {
|
||||
return CVarGetInteger("gGameplayStats.TimestampsReverse", 0) ? a.time > b.time : a.time < b.time;
|
||||
return CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.ReverseTimestamps"), 0) ? a.time > b.time : a.time < b.time;
|
||||
}
|
||||
|
||||
const char* ResolveSceneID(int sceneID, int roomID){
|
||||
@ -443,13 +443,13 @@ void DrawGameplayStatsHeader() {
|
||||
} else {
|
||||
GameplayStatsRow("Total Game Time:", formatTimestampGameplayStat(GAMEPLAYSTAT_TOTAL_TIME), gSaveContext.sohStats.gameComplete ? COLOR_GREEN : COLOR_WHITE);
|
||||
}
|
||||
if (CVarGetInteger("gGameplayStats.ShowAdditionalTimers", 0)) { // !Only display total game time
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.ShowAdditionalTimers"), 0)) { // !Only display total game time
|
||||
GameplayStatsRow("Gameplay Time:", formatTimestampGameplayStat(gSaveContext.sohStats.playTimer / 2), COLOR_GREY);
|
||||
GameplayStatsRow("Pause Menu Time:", formatTimestampGameplayStat(gSaveContext.sohStats.pauseTimer / 3), COLOR_GREY);
|
||||
GameplayStatsRow("Time in scene:", formatTimestampGameplayStat(gSaveContext.sohStats.sceneTimer / 2), COLOR_LIGHT_BLUE);
|
||||
GameplayStatsRow("Time in room:", formatTimestampGameplayStat(gSaveContext.sohStats.roomTimer / 2), COLOR_LIGHT_BLUE);
|
||||
}
|
||||
if (gPlayState != NULL && CVarGetInteger("gGameplayStats.ShowDebugInfo", 0)) { // && display debug info
|
||||
if (gPlayState != NULL && CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.ShowDebugInfo"), 0)) { // && display debug info
|
||||
GameplayStatsRow("play->sceneNum:", formatHexGameplayStat(gPlayState->sceneNum), COLOR_YELLOW);
|
||||
GameplayStatsRow("gSaveContext.entranceIndex:", formatHexGameplayStat(gSaveContext.entranceIndex), COLOR_YELLOW);
|
||||
GameplayStatsRow("gSaveContext.cutsceneIndex:", formatHexOnlyGameplayStat(gSaveContext.cutsceneIndex), COLOR_YELLOW);
|
||||
@ -567,13 +567,13 @@ void DrawGameplayStatsBreakdownTab() {
|
||||
for (int i = 0; i < gSaveContext.sohStats.tsIdx; i++) {
|
||||
std::string sceneName = ResolveSceneID(gSaveContext.sohStats.sceneTimestamps[i].scene, gSaveContext.sohStats.sceneTimestamps[i].room);
|
||||
std::string name;
|
||||
if (CVarGetInteger("gGameplayStats.RoomBreakdown", 0) && gSaveContext.sohStats.sceneTimestamps[i].scene != SCENE_GROTTOS) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.RoomBreakdown"), 0) && gSaveContext.sohStats.sceneTimestamps[i].scene != SCENE_GROTTOS) {
|
||||
name = fmt::format("{:s} Room {:d}", sceneName, gSaveContext.sohStats.sceneTimestamps[i].room);
|
||||
} else {
|
||||
name = sceneName;
|
||||
}
|
||||
strcpy(sceneTimestampDisplay[i].name, name.c_str());
|
||||
sceneTimestampDisplay[i].time = CVarGetInteger("gGameplayStats.RoomBreakdown", 0) ?
|
||||
sceneTimestampDisplay[i].time = CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.RoomBreakdown"), 0) ?
|
||||
gSaveContext.sohStats.sceneTimestamps[i].roomTime : gSaveContext.sohStats.sceneTimestamps[i].sceneTime;
|
||||
sceneTimestampDisplay[i].color = COLOR_GREY;
|
||||
sceneTimestampDisplay[i].isRoom = gSaveContext.sohStats.sceneTimestamps[i].isRoom;
|
||||
@ -584,13 +584,13 @@ void DrawGameplayStatsBreakdownTab() {
|
||||
ImGui::TableSetupColumn("stat", ImGuiTableColumnFlags_WidthStretch);
|
||||
for (int i = 0; i < gSaveContext.sohStats.tsIdx; i++) {
|
||||
TimestampInfo tsInfo = sceneTimestampDisplay[i];
|
||||
bool canShow = !tsInfo.isRoom || CVarGetInteger("gGameplayStats.RoomBreakdown", 0);
|
||||
bool canShow = !tsInfo.isRoom || CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.RoomBreakdown"), 0);
|
||||
if (tsInfo.time > 0 && strnlen(tsInfo.name, 40) > 1 && canShow) {
|
||||
GameplayStatsRow(tsInfo.name, formatTimestampGameplayStat(tsInfo.time), tsInfo.color);
|
||||
}
|
||||
}
|
||||
std::string toPass;
|
||||
if (CVarGetInteger("gGameplayStats.RoomBreakdown", 0) && gSaveContext.sohStats.sceneNum != SCENE_GROTTOS) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.RoomBreakdown"), 0) && gSaveContext.sohStats.sceneNum != SCENE_GROTTOS) {
|
||||
toPass = fmt::format("{:s} Room {:d}", ResolveSceneID(gSaveContext.sohStats.sceneNum, gSaveContext.sohStats.roomNum), gSaveContext.sohStats.roomNum);
|
||||
} else {
|
||||
toPass = ResolveSceneID(gSaveContext.sohStats.sceneNum, gSaveContext.sohStats.roomNum);
|
||||
@ -601,21 +601,21 @@ void DrawGameplayStatsBreakdownTab() {
|
||||
}
|
||||
|
||||
void DrawGameplayStatsOptionsTab() {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show in-game total timer", "gGameplayStats.ShowIngameTimer", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show in-game total timer", CVAR_ENHANCEMENT("GameplayStats.ShowIngameTimer"), true, false);
|
||||
UIWidgets::InsertHelpHoverText("Keep track of the timer as an in-game HUD element. The position of the timer can be changed in the Cosmetics Editor.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show latest timestamps on top", "gGameplayStats.TimestampsReverse", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Room Breakdown", "gGameplayStats.RoomBreakdown", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show latest timestamps on top", CVAR_ENHANCEMENT("GameplayStats.ReverseTimestamps"), true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Room Breakdown", CVAR_ENHANCEMENT("GameplayStats.RoomBreakdown"), true, false);
|
||||
ImGui::SameLine();
|
||||
UIWidgets::InsertHelpHoverText("Allows a more in-depth perspective of time spent in a certain map.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("RTA Timing on new files", "gGameplayStats.RTATiming", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("RTA Timing on new files", CVAR_ENHANCEMENT("GameplayStats.RTATiming"), true, false);
|
||||
ImGui::SameLine();
|
||||
UIWidgets::InsertHelpHoverText(
|
||||
"Timestamps are relative to starting timestamp rather than in game time, usually necessary for races/speedruns.\n\n"
|
||||
"Starting timestamp is on first non-c-up input after intro cutscene.\n\n"
|
||||
"NOTE: THIS NEEDS TO BE SET BEFORE CREATING A FILE TO TAKE EFFECT"
|
||||
);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show additional detail timers", "gGameplayStats.ShowAdditionalTimers", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show Debug Info", "gGameplayStats.ShowDebugInfo");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show additional detail timers", CVAR_ENHANCEMENT("GameplayStats.ShowAdditionalTimers"), true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show Debug Info", CVAR_ENHANCEMENT("GameplayStats.ShowDebugInfo"));
|
||||
}
|
||||
|
||||
void GameplayStatsWindow::DrawElement() {
|
||||
@ -657,7 +657,7 @@ void InitStats(bool isDebug) {
|
||||
for (int dungeon = 0; dungeon < ARRAY_COUNT(gSaveContext.sohStats.dungeonKeys); dungeon++) {
|
||||
gSaveContext.sohStats.dungeonKeys[dungeon] = isDebug ? 8 : 0;
|
||||
}
|
||||
gSaveContext.sohStats.rtaTiming = CVarGetInteger("gGameplayStats.RTATiming", 0);
|
||||
gSaveContext.sohStats.rtaTiming = CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.RTATiming"), 0);
|
||||
gSaveContext.sohStats.fileCreatedAt = 0;
|
||||
gSaveContext.sohStats.playTimer = 0;
|
||||
gSaveContext.sohStats.pauseTimer = 0;
|
||||
|
@ -12,7 +12,7 @@
|
||||
(!gSaveContext.sohStats.fileCreatedAt ? 0 : ((GetUnixTimestamp() - gSaveContext.sohStats.fileCreatedAt) / 100)) :\
|
||||
(gSaveContext.sohStats.itemTimestamp[TIMESTAMP_DEFEAT_GANON])) :\
|
||||
(gSaveContext.sohStats.playTimer / 2 + gSaveContext.sohStats.pauseTimer / 3))
|
||||
#define CURRENT_MODE_TIMER (CVarGetInteger("gGameplayStats.RoomBreakdown", 0) ?\
|
||||
#define CURRENT_MODE_TIMER (CVarGetInteger(CVAR_ENHANCEMENT("GameplayStats.RoomBreakdown"), 0) ?\
|
||||
gSaveContext.sohStats.roomTimer :\
|
||||
gSaveContext.sohStats.sceneTimer)
|
||||
|
||||
|
@ -196,14 +196,14 @@ void RegisterUnrestrictedItems() {
|
||||
void RegisterFreezeTime() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() {
|
||||
if (CVarGetInteger(CVAR_CHEAT("FreezeTime"), 0) != 0) {
|
||||
if (CVarGetInteger("gPrevTime", -1) == -1) {
|
||||
CVarSetInteger("gPrevTime", gSaveContext.dayTime);
|
||||
if (CVarGetInteger(CVAR_GENERAL("PrevTime"), -1) == -1) {
|
||||
CVarSetInteger(CVAR_GENERAL("PrevTime"), gSaveContext.dayTime);
|
||||
}
|
||||
|
||||
int32_t prevTime = CVarGetInteger("gPrevTime", gSaveContext.dayTime);
|
||||
int32_t prevTime = CVarGetInteger(CVAR_GENERAL("PrevTime"), gSaveContext.dayTime);
|
||||
gSaveContext.dayTime = prevTime;
|
||||
} else {
|
||||
CVarClear("gPrevTime");
|
||||
CVarClear(CVAR_GENERAL("PrevTime"));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -272,11 +272,11 @@ void RegisterOcarinaTimeTravel() {
|
||||
!nearbyOcarinaSpot && !nearbyFrogs) {
|
||||
|
||||
if (IS_RANDO) {
|
||||
CVarSetInteger("gSwitchTimeline", 1);
|
||||
CVarSetInteger(CVAR_GENERAL("SwitchTimeline"), 1);
|
||||
} else if (!IS_RANDO && !nearbyDoorOfTime) {
|
||||
// This check is made for when Link is learning the Song Of Time in a vanilla save file that load a
|
||||
// Temple of Time scene where the only object present is the Door of Time
|
||||
CVarSetInteger("gSwitchTimeline", 1);
|
||||
CVarSetInteger(CVAR_GENERAL("SwitchTimeline"), 1);
|
||||
}
|
||||
ReloadSceneTogglingLinkAge();
|
||||
}
|
||||
@ -699,10 +699,10 @@ void UpdateMirrorModeState(int32_t sceneNum) {
|
||||
((mirroredMode == MIRRORED_WORLD_DUNGEONS_RANDOM || mirroredMode == MIRRORED_WORLD_DUNGEONS_RANDOM_SEEDED) && randomMirror)))
|
||||
) {
|
||||
nextMirroredWorld = true;
|
||||
CVarSetInteger("gMirroredWorld", 1);
|
||||
CVarSetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 1);
|
||||
} else {
|
||||
nextMirroredWorld = false;
|
||||
CVarClear("gMirroredWorld");
|
||||
CVarClear(CVAR_ENHANCEMENT("MirroredWorld"));
|
||||
}
|
||||
|
||||
if (prevMirroredWorld != nextMirroredWorld) {
|
||||
|
@ -91,7 +91,7 @@ void DrawNameTag(PlayState* play, const NameTag* nameTag) {
|
||||
// Set position, billboard effect, scale (with mirror mode), then center nametag
|
||||
Matrix_Translate(nameTag->actor->world.pos.x, posY, nameTag->actor->world.pos.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
Matrix_Scale(scale * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1), -scale, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(scale * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1), -scale, 1.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(-(float)nameTag->width / 2, -nameTag->height, 0, MTXMODE_APPLY);
|
||||
Matrix_ToMtx(nameTag->mtx, (char*)__FILE__, __LINE__);
|
||||
|
||||
|
@ -40,7 +40,7 @@ void applyPreset(std::vector<PresetEntry> entries) {
|
||||
}
|
||||
|
||||
void DrawPresetSelector(PresetType presetTypeId) {
|
||||
const std::string presetTypeCvar = "gPreset" + std::to_string(presetTypeId);
|
||||
const std::string presetTypeCvar = CVAR_GENERAL("SelectedPresets.") + std::to_string(presetTypeId);
|
||||
const PresetTypeDefinition presetTypeDef = presetTypes.at(presetTypeId);
|
||||
const uint16_t selectedPresetId = CVarGetInteger(presetTypeCvar.c_str(), 0);
|
||||
const PresetDefinition selectedPresetDef = presetTypeDef.presets.at(selectedPresetId);
|
||||
|
@ -60,18 +60,18 @@ void applyPreset(std::vector<PresetEntry> entries);
|
||||
// TODO: Ideally everything below this point will come from one/many JSON files
|
||||
|
||||
const std::vector<const char*> enhancementsCvars = {
|
||||
"gDpadPause",
|
||||
"gDpadText",
|
||||
"gDpadOcarina",
|
||||
"gRStickOcarina",
|
||||
"gDpadEquips",
|
||||
"gPauseAnyCursor",
|
||||
CVAR_SETTING("DPadOnPause"),
|
||||
CVAR_SETTING("DpadInText"),
|
||||
CVAR_SETTING("OcarinaControl.Dpad"),
|
||||
CVAR_SETTING("OcarinaControl.RStick"),
|
||||
CVAR_SETTING("DpadEquips"),
|
||||
CVAR_SETTING("PauseAnyCursor"),
|
||||
CVAR_ENHANCEMENT("DpadNoDropOcarinaInput"),
|
||||
"gNaviOnL",
|
||||
"gInvertXAxis",
|
||||
"gInvertYAxis",
|
||||
"gRightStickAiming",
|
||||
"gDisableAutoCenterViewFirstPerson",
|
||||
CVAR_SETTING("NaviOnL"),
|
||||
CVAR_SETTING("FreeLook.InvertXAxis"),
|
||||
CVAR_SETTING("FreeLook.InvertYAxis"),
|
||||
CVAR_SETTING("Controls.RightStickAim"),
|
||||
CVAR_SETTING("DisableFirstPersonAutoCenterView"),
|
||||
CVAR_ENHANCEMENT("TextSpeed"),
|
||||
CVAR_ENHANCEMENT("MweepSpeed"),
|
||||
CVAR_ENHANCEMENT("ForgeTime"),
|
||||
@ -152,7 +152,6 @@ const std::vector<const char*> enhancementsCvars = {
|
||||
CVAR_ENHANCEMENT("PauseLiveLinkRotation"),
|
||||
CVAR_ENHANCEMENT("PauseLiveLink"),
|
||||
CVAR_ENHANCEMENT("MinFrameCount"),
|
||||
"gN64Mode",
|
||||
CVAR_ENHANCEMENT("NewDrops"),
|
||||
CVAR_ENHANCEMENT("DisableBlackBars"),
|
||||
CVAR_ENHANCEMENT("DynamicWalletIcon"),
|
||||
@ -240,7 +239,7 @@ const std::vector<const char*> enhancementsCvars = {
|
||||
CVAR_ENHANCEMENT("RandomizedEnemySizes"),
|
||||
CVAR_ENHANCEMENT("RandomizedEnemies"),
|
||||
CVAR_ENHANCEMENT("MirroredWorldMode"),
|
||||
"gMirroredWorld",
|
||||
CVAR_ENHANCEMENT("MirroredWorld"),
|
||||
CVAR_ENHANCEMENT("HyperEnemies"),
|
||||
CVAR_ENHANCEMENT("HookshotableReticle"),
|
||||
CVAR_ENHANCEMENT("HideBunnyHood"),
|
||||
@ -287,12 +286,12 @@ const std::vector<const char*> cheatCvars = {
|
||||
CVAR_WINDOW("CollisionViewer"),
|
||||
CVAR_WINDOW("DLViewer"),
|
||||
CVAR_WINDOW("SaveEditor"),
|
||||
"gEnableWalkModify",
|
||||
"gWalkSpeedToggle",
|
||||
"gWalkModifierOne",
|
||||
"gWalkModifierTwo",
|
||||
"gSwimModifierOne",
|
||||
"gSwimModifierTwo",
|
||||
CVAR_SETTING("WalkModifier.Enabled"),
|
||||
CVAR_SETTING("WalkModifier.SpeedToggle"),
|
||||
CVAR_SETTING("WalkModifier.Mapping1"),
|
||||
CVAR_SETTING("WalkModifier.Mapping2"),
|
||||
CVAR_SETTING("WalkModifier.SwimMapping1"),
|
||||
CVAR_SETTING("WalkModifier.SwimMapping2"),
|
||||
CVAR_ENHANCEMENT("GoronPot"),
|
||||
CVAR_ENHANCEMENT("DampeWin"),
|
||||
CVAR_ENHANCEMENT("CustomizeShootingGallery"),
|
||||
@ -317,7 +316,7 @@ const std::vector<const char*> cheatCvars = {
|
||||
CVAR_CHEAT("EasyInputBuffer"),
|
||||
CVAR_CHEAT("NoRestrictItems"),
|
||||
CVAR_CHEAT("FreezeTime"),
|
||||
"gPrevTime",
|
||||
CVAR_GENERAL("PrevTime"),
|
||||
CVAR_CHEAT("DropsDontDie"),
|
||||
CVAR_CHEAT("FireproofDekuShield"),
|
||||
CVAR_CHEAT("ShieldTwoHanded"),
|
||||
@ -329,19 +328,17 @@ const std::vector<const char*> cheatCvars = {
|
||||
CVAR_CHEAT("EnableBetaQuest"),
|
||||
CVAR_DEVELOPER_TOOLS("BetterDebugWarpScreen"),
|
||||
CVAR_GENERAL("SwitchAge"),
|
||||
"gSwitchTimeline",
|
||||
CVAR_GENERAL("SwitchTimeline"),
|
||||
CVAR_CHEAT("NoRedeadFreeze"),
|
||||
CVAR_CHEAT("NoKeeseGuayTarget"),
|
||||
CVAR_CHEAT("BombTimerMultiplier"),
|
||||
CVAR_CHEAT("NoFishDespawn"),
|
||||
CVAR_CHEAT("NoBugsDespawn"),
|
||||
"gWalkModifierDoesntChangeJump",
|
||||
CVAR_SETTING("WalkModifier.DoesntChangeJump"),
|
||||
CVAR_STATS_WINDOW_OPEN,
|
||||
CVAR_CHEAT("SaveStatesEnabled"),
|
||||
CVAR_CHEAT("SaveStatePromise"),
|
||||
CVAR_DEVELOPER_TOOLS("RegEditEnabled"),
|
||||
"gPreset0",
|
||||
"gPreset1",
|
||||
CVAR_CHEAT("DekuStick"),
|
||||
CVAR_DEVELOPER_TOOLS("DebugWarpScreenTranslation"),
|
||||
CVAR_DEVELOPER_TOOLS("DebugSaveFileMode"),
|
||||
@ -493,17 +490,17 @@ const std::vector<const char*> randomizerCvars = {
|
||||
|
||||
const std::vector<PresetEntry> vanillaPlusPresetEntries = {
|
||||
// D-pad Support in text and file select
|
||||
PRESET_ENTRY_S32("gDpadText", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("DpadInText"), 1),
|
||||
// Play Ocarina with D-pad
|
||||
PRESET_ENTRY_S32("gDpadOcarina", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("OcarinaControl.Dpad"), 1),
|
||||
// Play Ocarina with Right Stick
|
||||
PRESET_ENTRY_S32("gRStickOcarina", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("OcarinaControl.RStick"), 1),
|
||||
// D-pad as Equip Items
|
||||
PRESET_ENTRY_S32("gDpadEquips", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("DpadEquips"), 1),
|
||||
// Prevent Dropped Ocarina Inputs
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadNoDropOcarinaInput"), 1),
|
||||
// Right Stick Aiming
|
||||
PRESET_ENTRY_S32("gRightStickAiming", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("Controls.RightStickAim"), 1),
|
||||
|
||||
// Text Speed (1 to 5)
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TextSpeed"), 5),
|
||||
@ -564,17 +561,17 @@ const std::vector<PresetEntry> vanillaPlusPresetEntries = {
|
||||
|
||||
const std::vector<PresetEntry> enhancedPresetEntries = {
|
||||
// D-pad Support in text and file select
|
||||
PRESET_ENTRY_S32("gDpadText", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("DpadInText"), 1),
|
||||
// Play Ocarina with D-pad
|
||||
PRESET_ENTRY_S32("gDpadOcarina", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("OcarinaControl.Dpad"), 1),
|
||||
// Play Ocarina with Right Stick
|
||||
PRESET_ENTRY_S32("gRStickOcarina", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("OcarinaControl.RStick"), 1),
|
||||
// D-pad as Equip Items
|
||||
PRESET_ENTRY_S32("gDpadEquips", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("DpadEquips"), 1),
|
||||
// Prevent Dropped Ocarina Inputs
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadNoDropOcarinaInput"), 1),
|
||||
// Right Stick Aiming
|
||||
PRESET_ENTRY_S32("gRightStickAiming", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("Controls.RightStickAim"), 1),
|
||||
|
||||
// Text Speed (1 to 5)
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TextSpeed"), 5),
|
||||
@ -693,17 +690,17 @@ const std::vector<PresetEntry> enhancedPresetEntries = {
|
||||
|
||||
const std::vector<PresetEntry> randomizerPresetEntries = {
|
||||
// D-pad Support in text and file select
|
||||
PRESET_ENTRY_S32("gDpadText", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("DpadInText"), 1),
|
||||
// Play Ocarina with D-pad
|
||||
PRESET_ENTRY_S32("gDpadOcarina", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("OcarinaControl.Dpad"), 1),
|
||||
// Play Ocarina with Right Stick
|
||||
PRESET_ENTRY_S32("gRStickOcarina", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("OcarinaControl.RStick"), 1),
|
||||
// D-pad as Equip Items
|
||||
PRESET_ENTRY_S32("gDpadEquips", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("DpadEquips"), 1),
|
||||
// Prevent Dropped Ocarina Inputs
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DpadNoDropOcarinaInput"), 1),
|
||||
// Right Stick Aiming
|
||||
PRESET_ENTRY_S32("gRightStickAiming", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("Controls.RightStickAim"), 1),
|
||||
|
||||
// Text Speed (1 to 5)
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("TextSpeed"), 5),
|
||||
@ -867,10 +864,10 @@ const std::vector<PresetEntry> spockRacePresetEntries = {
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DisableNaviCallAudio"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastChests"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastDrops"), 1),
|
||||
PRESET_ENTRY_S32("gDpadText", 1),
|
||||
PRESET_ENTRY_S32("gDpadOcarina", 1),
|
||||
PRESET_ENTRY_S32("gRStickOcarina", 1),
|
||||
PRESET_ENTRY_S32("gDpadEquips", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("DpadInText"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("OcarinaControl.Dpad"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("OcarinaControl.RStick"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("DpadEquips"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastOcarinaPlayback"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InstantScarecrow"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MarketSneak"), 1),
|
||||
@ -886,7 +883,7 @@ const std::vector<PresetEntry> spockRacePresetEntries = {
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("CreditsFix"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkipText"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("SkulltulaFreeze"), 1),
|
||||
PRESET_ENTRY_S32("gPauseAnyCursor", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("PauseAnyCursor"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("FastFarores"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoInputForCredits"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MaskSelect"), 1),
|
||||
@ -969,7 +966,6 @@ const std::vector<PresetEntry> spockRaceNoLogicPresetEntries = {
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ForgeTime"), 0),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GoronPot"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("GuaranteeFishingBite"), 1),
|
||||
PRESET_ENTRY_S32("gHideBuildInfo", 1),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InstantFishing"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InstantPutaway"), 1),
|
||||
@ -979,7 +975,7 @@ const std::vector<PresetEntry> spockRaceNoLogicPresetEntries = {
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MweepSpeed"), 5),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoForcedNavi"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("NoInputForCredits"), 1),
|
||||
PRESET_ENTRY_S32("gPauseAnyCursor", 1),
|
||||
PRESET_ENTRY_S32(CVAR_SETTING("PauseAnyCursor"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("10GSHint"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("20GSHint"), 1),
|
||||
PRESET_ENTRY_S32(CVAR_RANDOMIZER_SETTING("30GSHint"), 1),
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <libultraship/bridge.h>
|
||||
#include <Context.h>
|
||||
#include <libultraship/libultra/types.h>
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
void RandoMain::GenerateRando(std::unordered_map<RandomizerSettingKey, u8> cvarSettings, std::set<RandomizerCheck> excludedLocations, std::set<RandomizerTrick> enabledTricks,
|
||||
std::string seedString) {
|
||||
@ -16,14 +17,14 @@ void RandoMain::GenerateRando(std::unordered_map<RandomizerSettingKey, u8> cvarS
|
||||
LocationTable_Init();
|
||||
|
||||
// std::string settingsFileName = "./randomizer/latest_settings.json";
|
||||
// CVarSetString("gLoadedPreset", settingsFileName.c_str());
|
||||
// CVarSetString(CVAR_RANDOMIZER_SETTING("LoadedPreset"), settingsFileName.c_str());
|
||||
|
||||
std::string fileName = Ship::Context::GetPathRelativeToAppDirectory(GenerateRandomizer(cvarSettings, excludedLocations, enabledTricks, seedString).c_str());
|
||||
CVarSetString("gSpoilerLog", fileName.c_str());
|
||||
CVarSetString(CVAR_GENERAL("SpoilerLog"), fileName.c_str());
|
||||
|
||||
CVarSave();
|
||||
CVarLoad();
|
||||
CVarSetInteger("gNewSeedGenerated", 1);
|
||||
CVarSetInteger(CVAR_GENERAL("NewSeedGenerated"), 1);
|
||||
}
|
||||
|
||||
std::array<Item, KEY_ENUM_MAX>* RandoMain::GetFullItemTable() {
|
||||
|
@ -2827,7 +2827,7 @@ RandomizerCheck Randomizer::GetCheckFromRandomizerInf(RandomizerInf randomizerIn
|
||||
std::thread randoThread;
|
||||
|
||||
void GenerateRandomizerImgui(std::string seed = "") {
|
||||
CVarSetInteger("gRandoGenerating", 1);
|
||||
CVarSetInteger(CVAR_GENERAL("RandoGenerating"), 1);
|
||||
CVarSave();
|
||||
|
||||
std::unordered_map<RandomizerSettingKey, u8> cvarSettings;
|
||||
@ -2945,7 +2945,7 @@ void GenerateRandomizerImgui(std::string seed = "") {
|
||||
// RANDOTODO implement chest minigame shuffle with keysanity
|
||||
cvarSettings[RSK_SHUFFLE_CHEST_MINIGAME] = false;
|
||||
|
||||
cvarSettings[RSK_LANGUAGE] = CVarGetInteger("gLanguages", 0);
|
||||
cvarSettings[RSK_LANGUAGE] = CVarGetInteger(CVAR_SETTING("Languages"), 0);
|
||||
|
||||
cvarSettings[RSK_CUCCO_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 7);
|
||||
cvarSettings[RSK_BIG_POE_COUNT] = CVarGetInteger(CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), 10);
|
||||
@ -3052,7 +3052,7 @@ void GenerateRandomizerImgui(std::string seed = "") {
|
||||
|
||||
RandoMain::GenerateRando(cvarSettings, excludedLocations, enabledTricks, seed);
|
||||
|
||||
CVarSetInteger("gRandoGenerating", 0);
|
||||
CVarSetInteger(CVAR_GENERAL("RandoGenerating"), 0);
|
||||
CVarSave();
|
||||
CVarLoad();
|
||||
|
||||
@ -3060,7 +3060,7 @@ void GenerateRandomizerImgui(std::string seed = "") {
|
||||
}
|
||||
|
||||
bool GenerateRandomizer(std::string seed /*= ""*/) {
|
||||
if (CVarGetInteger("gRandoGenerating", 0) == 0) {
|
||||
if (CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0) == 0) {
|
||||
randoThread = std::thread(&GenerateRandomizerImgui, seed);
|
||||
return true;
|
||||
}
|
||||
@ -3144,7 +3144,7 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
return;
|
||||
}
|
||||
|
||||
bool disableEditingRandoSettings = CVarGetInteger("gRandoGenerating", 0) || CVarGetInteger("gOnFileSelectNameEntry", 0);
|
||||
bool disableEditingRandoSettings = CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0) || CVarGetInteger(CVAR_GENERAL("OnFileSelectNameEntry"), 0);
|
||||
if (disableEditingRandoSettings) {
|
||||
UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||
}
|
||||
@ -3182,12 +3182,12 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
if (!CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0)) {
|
||||
std::string spoilerfilepath = CVarGetString("gSpoilerLog", "");
|
||||
std::string spoilerfilepath = CVarGetString(CVAR_GENERAL("SpoilerLog"), "");
|
||||
ImGui::Text("Spoiler File: %s", spoilerfilepath.c_str());
|
||||
}
|
||||
|
||||
// RANDOTODO settings presets
|
||||
// std::string presetfilepath = CVarGetString("gLoadedPreset", "");
|
||||
// std::string presetfilepath = CVarGetString(CVAR_RANDOMIZER_SETTING("LoadedPreset"), "");
|
||||
// ImGui::Text("Settings File: %s", presetfilepath.c_str());
|
||||
|
||||
UIWidgets::PaddedSeparator();
|
||||
|
@ -1068,7 +1068,7 @@ void CheckTrackerWindow::DrawElement() {
|
||||
}
|
||||
|
||||
bool shouldHideArea(ImGuiTextFilter& checkSearch, std::map<RandomizerCheckArea, std::vector<RandomizerCheckObject>> checksByArea, RandomizerCheckArea rcArea) {
|
||||
bool shouldHideFilteredAreas = CVarGetInteger("gTrackers.CheckTracker.HideFilteredAreas", 1);
|
||||
bool shouldHideFilteredAreas = CVarGetInteger(CVAR_TRACKER_CHECK("HideFilteredAreas"), 1);
|
||||
if (!shouldHideFilteredAreas) {
|
||||
return false;
|
||||
}
|
||||
@ -1640,7 +1640,7 @@ void CheckTrackerSettingsWindow::DrawElement() {
|
||||
|
||||
// Filtering settings
|
||||
UIWidgets::PaddedSeparator();
|
||||
UIWidgets::EnhancementCheckbox("Filter Empty Areas", "gTrackers.CheckTracker.HideFilteredAreas", false, "", UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
UIWidgets::EnhancementCheckbox("Filter Empty Areas", CVAR_TRACKER_CHECK("HideFilteredAreas"), false, "", UIWidgets::CheckboxGraphics::Checkmark, true);
|
||||
UIWidgets::Tooltip("If enabled, will hide area headers that have no locations matching filter");
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
@ -1650,7 +1650,7 @@ void CheckTrackerSettingsWindow::DrawElement() {
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Unchecked", CVAR_TRACKER_CHECK("Unchecked.MainColor"), CVAR_TRACKER_CHECK("Unchecked.ExtraColor"), Color_Unchecked_Main, Color_Unchecked_Extra, Color_Main_Default, Color_Unchecked_Extra_Default, CVAR_TRACKER_CHECK("Unchecked.Hide"), "Checks you have not interacted with at all.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Skipped", CVAR_TRACKER_CHECK("Skipped.MainColor"), CVAR_TRACKER_CHECK("Skipped.ExtraColor"), Color_Skipped_Main, Color_Skipped_Extra, Color_Main_Default, Color_Skipped_Extra_Default, CVAR_TRACKER_CHECK("Skipped.Hide"), "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Seen", CVAR_TRACKER_CHECK("Seen.MainColor"), CVAR_TRACKER_CHECK("Seen.ExtraColor"), Color_Seen_Main, Color_Seen_Extra, Color_Main_Default, Color_Seen_Extra_Default, CVAR_TRACKER_CHECK("Seen.Hide"), "Used for shops. Shows item names for shop slots when walking in, and prices when highlighting them in buy mode.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Scummed", CVAR_TRACKER_CHECK("Scummed.MainColor"), CVAR_TRACKER_CHECK("Scummed.ExtraColor"), Color_Scummed_Main, Color_Scummed_Extra, Color_Main_Default, Color_Scummed_Extra_Default, "gCheckTrackerScummedHide", "Checks you collect, but then reload before saving so you no longer have them.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Scummed", CVAR_TRACKER_CHECK("Scummed.MainColor"), CVAR_TRACKER_CHECK("Scummed.ExtraColor"), Color_Scummed_Main, Color_Scummed_Extra, Color_Main_Default, Color_Scummed_Extra_Default, CVAR_TRACKER_CHECK("Scummed.Hide"), "Checks you collect, but then reload before saving so you no longer have them.");
|
||||
//CheckTracker::ImGuiDrawTwoColorPickerSection("Hinted (WIP)", CVAR_TRACKER_CHECK("Hinted.MainColor"), CVAR_TRACKER_CHECK("Hinted.ExtraColor"), Color_Hinted_Main, Color_Hinted_Extra, Color_Main_Default, Color_Hinted_Extra_Default, CVAR_TRACKER_CHECK("Hinted.Hide"), "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Collected", CVAR_TRACKER_CHECK("Collected.MainColor"), CVAR_TRACKER_CHECK("Collected.ExtraColor"), Color_Collected_Main, Color_Collected_Extra, Color_Main_Default, Color_Collected_Extra_Default, CVAR_TRACKER_CHECK("Collected.Hide"), "Checks you have collected without saving or reloading yet.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Saved", CVAR_TRACKER_CHECK("Saved.MainColor"), CVAR_TRACKER_CHECK("Saved.ExtraColor"), Color_Saved_Main, Color_Saved_Extra, Color_Main_Default, Color_Saved_Extra_Default, CVAR_TRACKER_CHECK("Saved.Hide"), "Checks that you saved the game while having collected.");
|
||||
|
@ -4,8 +4,9 @@
|
||||
|
||||
#include <soh/UIWidgets.hpp>
|
||||
#include <graphic/Fast3D/gfx_pc.h>
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
/* Console Variables are grouped under gAdvancedResolution. (e.g. "gAdvancedResolution.Enabled")
|
||||
/* Console Variables are grouped under gAdvancedResolution. (e.g. CVAR_PREFIX_ADVANCED_RESOLUTION ".Enabled")
|
||||
|
||||
The following cvars are used in Libultraship and can be edited here:
|
||||
- Enabled - Turns Advanced Resolution Mode on.
|
||||
@ -83,25 +84,25 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
// Letting it go below 1 in this Editor will even allow for checking if screen bounds are being exceeded.
|
||||
if (default_maxIntegerScaleFactor < integerScale_maximumBounds) {
|
||||
max_integerScaleFactor =
|
||||
integerScale_maximumBounds + CVarGetInteger("gAdvancedResolution.IntegerScale.ExceedBoundsBy", 0);
|
||||
integerScale_maximumBounds + CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.ExceedBoundsBy", 0);
|
||||
}
|
||||
|
||||
// Combo List defaults
|
||||
static int item_aspectRatio = CVarGetInteger("gAdvancedResolution.UIComboItem.AspectRatio", 3);
|
||||
static int item_pixelCount = CVarGetInteger("gAdvancedResolution.UIComboItem.PixelCount", default_pixelCount);
|
||||
static int item_aspectRatio = CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".UIComboItem.AspectRatio", 3);
|
||||
static int item_pixelCount = CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".UIComboItem.PixelCount", default_pixelCount);
|
||||
// Stored Values for non-UIWidgets elements
|
||||
static float aspectRatioX =
|
||||
CVarGetFloat("gAdvancedResolution.AspectRatioX", aspectRatioPresetsX[item_aspectRatio]);
|
||||
CVarGetFloat(CVAR_PREFIX_ADVANCED_RESOLUTION ".AspectRatioX", aspectRatioPresetsX[item_aspectRatio]);
|
||||
static float aspectRatioY =
|
||||
CVarGetFloat("gAdvancedResolution.AspectRatioY", aspectRatioPresetsY[item_aspectRatio]);
|
||||
CVarGetFloat(CVAR_PREFIX_ADVANCED_RESOLUTION ".AspectRatioY", aspectRatioPresetsY[item_aspectRatio]);
|
||||
static int verticalPixelCount =
|
||||
CVarGetInteger("gAdvancedResolution.VerticalPixelCount", pixelCountPresets[item_pixelCount]);
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".VerticalPixelCount", pixelCountPresets[item_pixelCount]);
|
||||
// Additional settings
|
||||
static bool showHorizontalResField = false;
|
||||
static int horizontalPixelCount = (verticalPixelCount / aspectRatioY) * aspectRatioX;
|
||||
// Disabling flags
|
||||
const bool disabled_everything = !CVarGetInteger("gAdvancedResolution.Enabled", 0);
|
||||
const bool disabled_pixelCount = !CVarGetInteger("gAdvancedResolution.VerticalResolutionToggle", 0);
|
||||
const bool disabled_everything = !CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".Enabled", 0);
|
||||
const bool disabled_pixelCount = !CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".VerticalResolutionToggle", 0);
|
||||
|
||||
#ifdef __APPLE__
|
||||
// Display HiDPI warning. (Remove this once we can definitively say it's fixed.)
|
||||
@ -112,8 +113,8 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
|
||||
if (ImGui::CollapsingHeader("Original Settings", ImGuiTreeNodeFlags_DefaultOpen)) {
|
||||
// The original resolution slider (for convenience)
|
||||
const bool disabled_resolutionSlider = (CVarGetInteger("gAdvancedResolution.VerticalResolutionToggle", 0) &&
|
||||
CVarGetInteger("gAdvancedResolution.Enabled", 0)) ||
|
||||
const bool disabled_resolutionSlider = (CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".VerticalResolutionToggle", 0) &&
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".Enabled", 0)) ||
|
||||
CVarGetInteger(CVAR_LOW_RES_MODE, 0);
|
||||
if (UIWidgets::EnhancementSliderFloat("Internal Resolution: %.1f%%", "##IMul", CVAR_INTERNAL_RESOLUTION, 0.5f,
|
||||
2.0f, "", 1.0f, true, true, disabled_resolutionSlider)) {
|
||||
@ -140,7 +141,7 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
|
||||
UIWidgets::PaddedSeparator(true, true, 3.0f, 3.0f);
|
||||
// Activator
|
||||
UIWidgets::PaddedEnhancementCheckbox("Enable advanced settings.", "gAdvancedResolution.Enabled", false, false,
|
||||
UIWidgets::PaddedEnhancementCheckbox("Enable advanced settings.", CVAR_PREFIX_ADVANCED_RESOLUTION ".Enabled", false, false,
|
||||
false, "", UIWidgets::CheckboxGraphics::Cross, false);
|
||||
// Error/Warning display
|
||||
if (!CVarGetInteger(CVAR_LOW_RES_MODE, 0)) {
|
||||
@ -185,9 +186,9 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
horizontalPixelCount = (verticalPixelCount / aspectRatioY) * aspectRatioX;
|
||||
}
|
||||
|
||||
CVarSetFloat("gAdvancedResolution.AspectRatioX", aspectRatioX);
|
||||
CVarSetFloat("gAdvancedResolution.AspectRatioY", aspectRatioY);
|
||||
CVarSetInteger("gAdvancedResolution.UIComboItem.AspectRatio", item_aspectRatio);
|
||||
CVarSetFloat(CVAR_PREFIX_ADVANCED_RESOLUTION ".AspectRatioX", aspectRatioX);
|
||||
CVarSetFloat(CVAR_PREFIX_ADVANCED_RESOLUTION ".AspectRatioY", aspectRatioY);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".UIComboItem.AspectRatio", item_aspectRatio);
|
||||
CVarSave();
|
||||
}
|
||||
// Hide aspect ratio input fields if using one of the presets.
|
||||
@ -217,7 +218,7 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
|
||||
// Vertical Resolution
|
||||
UIWidgets::PaddedEnhancementCheckbox("Set fixed vertical resolution (disables Resolution slider)",
|
||||
"gAdvancedResolution.VerticalResolutionToggle", true, false,
|
||||
CVAR_PREFIX_ADVANCED_RESOLUTION ".VerticalResolutionToggle", true, false,
|
||||
disabled_everything, "", UIWidgets::CheckboxGraphics::Cross, false);
|
||||
UIWidgets::Tooltip(
|
||||
"Override the resolution scale slider and use the settings below, irrespective of window size.");
|
||||
@ -233,8 +234,8 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
horizontalPixelCount = (verticalPixelCount / aspectRatioY) * aspectRatioX;
|
||||
}
|
||||
|
||||
CVarSetInteger("gAdvancedResolution.VerticalPixelCount", verticalPixelCount);
|
||||
CVarSetInteger("gAdvancedResolution.UIComboItem.PixelCount", item_pixelCount);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".VerticalPixelCount", verticalPixelCount);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".UIComboItem.PixelCount", item_pixelCount);
|
||||
CVarSave();
|
||||
}
|
||||
// Horizontal Resolution, if visibility is enabled for it.
|
||||
@ -290,43 +291,43 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
|
||||
// Integer scaling settings group (Pixel-perfect Mode)
|
||||
static const ImGuiTreeNodeFlags IntegerScalingResolvedImGuiFlag =
|
||||
CVarGetInteger("gAdvancedResolution.PixelPerfectMode", 0) ? ImGuiTreeNodeFlags_DefaultOpen
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".PixelPerfectMode", 0) ? ImGuiTreeNodeFlags_DefaultOpen
|
||||
: ImGuiTreeNodeFlags_None;
|
||||
if (ImGui::CollapsingHeader("Integer Scaling Settings", IntegerScalingResolvedImGuiFlag)) {
|
||||
const bool disabled_pixelPerfectMode =
|
||||
!CVarGetInteger("gAdvancedResolution.PixelPerfectMode", 0) || disabled_everything;
|
||||
!CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".PixelPerfectMode", 0) || disabled_everything;
|
||||
// Pixel-perfect Mode
|
||||
UIWidgets::PaddedEnhancementCheckbox("Pixel-perfect Mode", "gAdvancedResolution.PixelPerfectMode", true,
|
||||
UIWidgets::PaddedEnhancementCheckbox("Pixel-perfect Mode", CVAR_PREFIX_ADVANCED_RESOLUTION ".PixelPerfectMode", true,
|
||||
true, disabled_pixelCount || disabled_everything, "",
|
||||
UIWidgets::CheckboxGraphics::Cross, false);
|
||||
UIWidgets::Tooltip("Don't scale image to fill window.");
|
||||
if (disabled_pixelCount && CVarGetInteger("gAdvancedResolution.PixelPerfectMode", 0)) {
|
||||
CVarSetInteger("gAdvancedResolution.PixelPerfectMode", 0);
|
||||
if (disabled_pixelCount && CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".PixelPerfectMode", 0)) {
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".PixelPerfectMode", 0);
|
||||
CVarSave();
|
||||
}
|
||||
|
||||
// Integer Scaling
|
||||
UIWidgets::EnhancementSliderInt(
|
||||
"Integer scale factor: %d", "##ARSIntScale", "gAdvancedResolution.IntegerScale.Factor", 1,
|
||||
"Integer scale factor: %d", "##ARSIntScale", CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.Factor", 1,
|
||||
max_integerScaleFactor, "%d", 1, true,
|
||||
disabled_pixelPerfectMode || CVarGetInteger("gAdvancedResolution.IntegerScale.FitAutomatically", 0));
|
||||
disabled_pixelPerfectMode || CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.FitAutomatically", 0));
|
||||
UIWidgets::Tooltip("Integer scales the image. Only available in pixel-perfect mode.");
|
||||
// Display warning if size is being clamped or if framebuffer is larger than viewport.
|
||||
if (!disabled_pixelPerfectMode &&
|
||||
(CVarGetInteger("gAdvancedResolution.IntegerScale.NeverExceedBounds", 1) &&
|
||||
CVarGetInteger("gAdvancedResolution.IntegerScale.Factor", 1) > integerScale_maximumBounds)) {
|
||||
(CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.NeverExceedBounds", 1) &&
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.Factor", 1) > integerScale_maximumBounds)) {
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(messageColor[MESSAGE_WARNING], ICON_FA_EXCLAMATION_TRIANGLE " Window exceeded.");
|
||||
}
|
||||
|
||||
UIWidgets::PaddedEnhancementCheckbox(
|
||||
"Automatically scale image to fit viewport", "gAdvancedResolution.IntegerScale.FitAutomatically", true,
|
||||
"Automatically scale image to fit viewport", CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.FitAutomatically", true,
|
||||
true, disabled_pixelPerfectMode, "", UIWidgets::CheckboxGraphics::Cross, false);
|
||||
UIWidgets::Tooltip("Automatically sets scale factor to fit window. Only available in pixel-perfect mode.");
|
||||
if (CVarGetInteger("gAdvancedResolution.IntegerScale.FitAutomatically", 0)) {
|
||||
if (CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.FitAutomatically", 0)) {
|
||||
// This is just here to update the value shown on the slider.
|
||||
// The function in LUS to handle this setting will ignore IntegerScaleFactor while active.
|
||||
CVarSetInteger("gAdvancedResolution.IntegerScale.Factor", integerScale_maximumBounds);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.Factor", integerScale_maximumBounds);
|
||||
// CVarSave();
|
||||
}
|
||||
} // End of integer scaling settings
|
||||
@ -344,19 +345,19 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Disable aspect correction and stretch the output image.\n"
|
||||
"(Might be useful for 4:3 televisions!)\n"
|
||||
"Not available in Pixel Perfect Mode.",
|
||||
"gAdvancedResolution.IgnoreAspectCorrection", false, true,
|
||||
CVarGetInteger("gAdvancedResolution.PixelPerfectMode", 0) ||
|
||||
CVAR_PREFIX_ADVANCED_RESOLUTION ".IgnoreAspectCorrection", false, true,
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".PixelPerfectMode", 0) ||
|
||||
disabled_everything,
|
||||
"", UIWidgets::CheckboxGraphics::Cross, false);
|
||||
#else
|
||||
if (CVarGetInteger("gAdvancedResolution.IgnoreAspectCorrection", 0)) {
|
||||
if (CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IgnoreAspectCorrection", 0)) {
|
||||
// This setting is intentionally not exposed on PC platforms,
|
||||
// but may be accidentally activated for varying reasons.
|
||||
// Having this button should hopefully prevent support headaches.
|
||||
ImGui::TextColored(messageColor[MESSAGE_QUESTION], ICON_FA_QUESTION_CIRCLE
|
||||
" If the image is stretched and you don't know why, click this.");
|
||||
if (ImGui::Button("Click to reenable aspect correction.")) {
|
||||
CVarSetInteger("gAdvancedResolution.IgnoreAspectCorrection", 0);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IgnoreAspectCorrection", 0);
|
||||
CVarSave();
|
||||
}
|
||||
UIWidgets::Spacer(2);
|
||||
@ -386,12 +387,12 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
|
||||
// Integer Scaling - Never Exceed Bounds.
|
||||
const bool disabled_neverExceedBounds =
|
||||
!CVarGetInteger("gAdvancedResolution.PixelPerfectMode", 0) ||
|
||||
CVarGetInteger("gAdvancedResolution.IntegerScale.FitAutomatically", 0) || disabled_everything;
|
||||
!CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".PixelPerfectMode", 0) ||
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.FitAutomatically", 0) || disabled_everything;
|
||||
const bool checkbox_neverExceedBounds =
|
||||
UIWidgets::PaddedEnhancementCheckbox("Prevent integer scaling from exceeding screen bounds.\n"
|
||||
"(Makes screen bounds take priority over specified factor.)",
|
||||
"gAdvancedResolution.IntegerScale.NeverExceedBounds",
|
||||
CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.NeverExceedBounds",
|
||||
true, false, disabled_neverExceedBounds, "",
|
||||
UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip(
|
||||
@ -403,22 +404,22 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
|
||||
// Initialise the (currently unused) "Exceed Bounds By" cvar if it's been changed.
|
||||
if (checkbox_neverExceedBounds &&
|
||||
CVarGetInteger("gAdvancedResolution.IntegerScale.ExceedBoundsBy", 0)) {
|
||||
CVarSetInteger("gAdvancedResolution.IntegerScale.ExceedBoundsBy", 0);
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.ExceedBoundsBy", 0)) {
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.ExceedBoundsBy", 0);
|
||||
CVarSave();
|
||||
}
|
||||
|
||||
// Integer Scaling - Exceed Bounds By 1x/Offset.
|
||||
// A popular feature in some retro frontends/upscalers, sometimes called "crop overscan" or "1080p 5x".
|
||||
/*
|
||||
UIWidgets::PaddedEnhancementCheckbox("Allow integer scale factor to go +1 above maximum screen bounds.", "gAdvancedResolution.IntegerScale.ExceedBoundsBy", false, false, !CVarGetInteger("gAdvancedResolution.PixelPerfectMode", 0) || disabled_everything, "", UIWidgets::CheckboxGraphics::Cross, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Allow integer scale factor to go +1 above maximum screen bounds.", CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.ExceedBoundsBy", false, false, !CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".PixelPerfectMode", 0) || disabled_everything, "", UIWidgets::CheckboxGraphics::Cross, false);
|
||||
*/
|
||||
// It does actually function as expected, but exceeding the bottom of the screen shows a scroll bar.
|
||||
// I've ended up commenting this one out because of the scroll bar, and for simplicity.
|
||||
|
||||
// Display an info message about the scroll bar.
|
||||
if (!CVarGetInteger("gAdvancedResolution.IntegerScale.NeverExceedBounds", 1) ||
|
||||
CVarGetInteger("gAdvancedResolution.IntegerScale.ExceedBoundsBy", 0)) {
|
||||
if (!CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.NeverExceedBounds", 1) ||
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.ExceedBoundsBy", 0)) {
|
||||
if (disabled_neverExceedBounds) { // Dim this help text accordingly
|
||||
UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||
}
|
||||
@ -431,9 +432,9 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
|
||||
// Another support helper button, to disable the unused "Exceed Bounds By" cvar.
|
||||
// (Remove this button if uncommenting the checkbox.)
|
||||
if (CVarGetInteger("gAdvancedResolution.IntegerScale.ExceedBoundsBy", 0)) {
|
||||
if (CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.ExceedBoundsBy", 0)) {
|
||||
if (ImGui::Button("Click to reset a console variable that may be causing this.")) {
|
||||
CVarSetInteger("gAdvancedResolution.IntegerScale.ExceedBoundsBy", 0);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".IntegerScale.ExceedBoundsBy", 0);
|
||||
CVarSave();
|
||||
}
|
||||
}
|
||||
@ -451,13 +452,13 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
if (aspectRatioX < 0.0f) {
|
||||
aspectRatioX = 0.0f;
|
||||
}
|
||||
CVarSetFloat("gAdvancedResolution.AspectRatioX", aspectRatioX);
|
||||
CVarSetFloat(CVAR_PREFIX_ADVANCED_RESOLUTION ".AspectRatioX", aspectRatioX);
|
||||
}
|
||||
if (update[UPDATE_aspectRatioY]) {
|
||||
if (aspectRatioY < 0.0f) {
|
||||
aspectRatioY = 0.0f;
|
||||
}
|
||||
CVarSetFloat("gAdvancedResolution.AspectRatioY", aspectRatioY);
|
||||
CVarSetFloat(CVAR_PREFIX_ADVANCED_RESOLUTION ".AspectRatioY", aspectRatioY);
|
||||
}
|
||||
if (update[UPDATE_verticalPixelCount]) {
|
||||
// There's a upper and lower clamp on the Libultraship side too,
|
||||
@ -468,10 +469,10 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
|
||||
if (verticalPixelCount > maxVerticalPixelCount) {
|
||||
verticalPixelCount = maxVerticalPixelCount;
|
||||
}
|
||||
CVarSetInteger("gAdvancedResolution.VerticalPixelCount", verticalPixelCount);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".VerticalPixelCount", verticalPixelCount);
|
||||
}
|
||||
CVarSetInteger("gAdvancedResolution.UIComboItem.AspectRatio", item_aspectRatio);
|
||||
CVarSetInteger("gAdvancedResolution.UIComboItem.PixelCount", item_pixelCount);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".UIComboItem.AspectRatio", item_aspectRatio);
|
||||
CVarSetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".UIComboItem.PixelCount", item_pixelCount);
|
||||
CVarSave();
|
||||
}
|
||||
}
|
||||
@ -484,7 +485,7 @@ void AdvancedResolutionSettingsWindow::UpdateElement() {
|
||||
bool AdvancedResolutionSettingsWindow::IsDroppingFrames() {
|
||||
// a rather imprecise way of checking for frame drops.
|
||||
// but it's mostly there to inform the player of large drops.
|
||||
const short targetFPS = CVarGetInteger("gInterpolationFPS", 20);
|
||||
const short targetFPS = CVarGetInteger(CVAR_SETTING("InterpolationFPS"), 20);
|
||||
const float threshold = targetFPS / 20.0f + 4.1f;
|
||||
return ImGui::GetIO().Framerate < targetFPS - threshold;
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ std::string GetParameritizedText(std::string key, TextBank bank, const char* arg
|
||||
}
|
||||
|
||||
const char* GetLanguageCode() {
|
||||
switch (CVarGetInteger("gLanguages", 0)) {
|
||||
switch (CVarGetInteger(CVAR_SETTING("Languages"), 0)) {
|
||||
case LANGUAGE_FRA:
|
||||
return "fr-FR";
|
||||
break;
|
||||
@ -116,7 +116,7 @@ static std::string titleCardText;
|
||||
|
||||
void RegisterOnSceneInitHook() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneInit>([](int16_t sceneNum) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
titleCardText = NameForSceneId(sceneNum);
|
||||
});
|
||||
@ -124,7 +124,7 @@ void RegisterOnSceneInitHook() {
|
||||
|
||||
void RegisterOnPresentTitleCardHook() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPresentTitleCard>([]() {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
SpeechSynthesizer::Instance->Speak(titleCardText.c_str(), GetLanguageCode());
|
||||
});
|
||||
@ -134,7 +134,7 @@ void RegisterOnPresentTitleCardHook() {
|
||||
|
||||
void RegisterOnInterfaceUpdateHook() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnInterfaceUpdate>([]() {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
static uint32_t prevTimer = 0;
|
||||
static char ttsAnnounceBuf[32];
|
||||
@ -193,7 +193,7 @@ void RegisterOnInterfaceUpdateHook() {
|
||||
|
||||
void RegisterOnKaleidoscopeUpdateHook() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnKaleidoscopeUpdate>([](int16_t inDungeonScene) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
static int16_t prevCursorIndex = 0;
|
||||
static uint16_t prevCursorSpecialPos = 0;
|
||||
@ -550,14 +550,14 @@ void RegisterOnKaleidoscopeUpdateHook() {
|
||||
|
||||
void RegisterOnUpdateMainMenuSelection() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPresentFileSelect>([]() {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
auto translation = GetParameritizedText("file1", TEXT_BANK_FILECHOOSE, nullptr);
|
||||
SpeechSynthesizer::Instance->Speak(translation.c_str(), GetLanguageCode());
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileSelectSelection>([](uint16_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case FS_BTN_MAIN_FILE_1: {
|
||||
@ -596,7 +596,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileSelectConfirmationSelection>([](uint16_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case FS_BTN_CONFIRM_YES: {
|
||||
@ -615,7 +615,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileCopySelection>([](uint16_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case FS_BTN_COPY_FILE_1: {
|
||||
@ -644,7 +644,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileCopyConfirmationSelection>([](uint16_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case FS_BTN_CONFIRM_YES: {
|
||||
@ -663,7 +663,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileEraseSelection>([](uint16_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case FS_BTN_ERASE_FILE_1: {
|
||||
@ -692,7 +692,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileEraseConfirmationSelection>([](uint16_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case FS_BTN_CONFIRM_YES: {
|
||||
@ -711,7 +711,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileAudioSelection>([](uint8_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case FS_AUDIO_STEREO: {
|
||||
@ -740,7 +740,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileTargetSelection>([](uint8_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case FS_TARGET_SWITCH: {
|
||||
@ -759,7 +759,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileLanguageSelection>([](uint8_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case LANGUAGE_ENG: {
|
||||
@ -783,7 +783,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileQuestSelection>([](uint8_t questIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
switch (questIndex) {
|
||||
case QUEST_NORMAL: {
|
||||
@ -812,7 +812,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileBossRushOptionSelection>([](uint8_t optionIndex, uint8_t optionValue) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
auto optionName = BossRush_GetSettingName(optionIndex, gSaveContext.language);
|
||||
auto optionValueName = BossRush_GetSettingChoiceName(optionIndex, optionValue, gSaveContext.language);
|
||||
@ -821,7 +821,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileNameSelection>([](int16_t charCode) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
char charVal[2];
|
||||
std::string translation;
|
||||
@ -958,7 +958,7 @@ std::string Message_TTS_Decode(uint8_t* sourceBuf, uint16_t startOfset, uint16_t
|
||||
|
||||
void RegisterOnDialogMessageHook() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnDialogMessage>([]() {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
if (!CVarGetInteger(CVAR_SETTING("A11yTTS"), 0)) return;
|
||||
|
||||
MessageContext *msgCtx = &gPlayState->msgCtx;
|
||||
|
||||
@ -1030,7 +1030,7 @@ void RegisterOnDialogMessageHook() {
|
||||
|
||||
void InitTTSBank() {
|
||||
std::string languageSuffix = "_eng.json";
|
||||
switch (CVarGetInteger("gLanguages", 0)) {
|
||||
switch (CVarGetInteger(CVAR_SETTING("Languages"), 0)) {
|
||||
case LANGUAGE_FRA:
|
||||
languageSuffix = "_fra.json";
|
||||
break;
|
||||
|
@ -432,7 +432,7 @@ OTRGlobals::~OTRGlobals() {
|
||||
}
|
||||
|
||||
void OTRGlobals::ScaleImGui() {
|
||||
float scale = imguiScaleOptionToValue[CVarGetInteger("gImGuiScale", defaultImGuiScale)];
|
||||
float scale = imguiScaleOptionToValue[CVarGetInteger(CVAR_SETTING("ImGuiScale"), defaultImGuiScale)];
|
||||
float newScale = scale / previousImGuiScale;
|
||||
ImGui::GetStyle().ScaleAllSizes(newScale);
|
||||
ImGui::GetIO().FontGlobalScale = scale;
|
||||
@ -467,14 +467,14 @@ bool OTRGlobals::HasOriginal() {
|
||||
|
||||
uint32_t OTRGlobals::GetInterpolationFPS() {
|
||||
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) {
|
||||
return CVarGetInteger("gInterpolationFPS", 20);
|
||||
return CVarGetInteger(CVAR_SETTING("InterpolationFPS"), 20);
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gMatchRefreshRate", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("MatchRefreshRate"), 0)) {
|
||||
return Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate();
|
||||
}
|
||||
|
||||
return std::min<uint32_t>(Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(), CVarGetInteger("gInterpolationFPS", 20));
|
||||
return std::min<uint32_t>(Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(), CVarGetInteger(CVAR_SETTING("InterpolationFPS"), 20));
|
||||
}
|
||||
|
||||
struct ExtensionEntry {
|
||||
@ -1153,17 +1153,17 @@ extern "C" void InitOTR() {
|
||||
InitMods();
|
||||
ActorDB::AddBuiltInCustomActors();
|
||||
// #region SOH [Randomizer] TODO: Remove these and refactor spoiler file handling for randomizer
|
||||
CVarClear("gRandomizerNewFileDropped");
|
||||
CVarClear("gRandomizerDroppedFile");
|
||||
CVarClear(CVAR_GENERAL("RandomizerNewFileDropped"));
|
||||
CVarClear(CVAR_GENERAL("RandomizerDroppedFile"));
|
||||
// #endregion
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnFileDropped>(SoH_ProcessDroppedFiles);
|
||||
|
||||
time_t now = time(NULL);
|
||||
tm *tm_now = localtime(&now);
|
||||
if (tm_now->tm_mon == 11 && tm_now->tm_mday >= 24 && tm_now->tm_mday <= 25) {
|
||||
CVarRegisterInteger("gLetItSnow", 1);
|
||||
CVarRegisterInteger(CVAR_GENERAL("LetItSnow"), 1);
|
||||
} else {
|
||||
CVarClear("gLetItSnow");
|
||||
CVarClear(CVAR_GENERAL("LetItSnow"));
|
||||
}
|
||||
|
||||
srand(now);
|
||||
@ -1335,7 +1335,7 @@ extern "C" void Graph_StartFrame() {
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
case KbScancode::LUS_KB_F9: {
|
||||
// Toggle TTS
|
||||
CVarSetInteger("gA11yTTS", !CVarGetInteger("gA11yTTS", 0));
|
||||
CVarSetInteger(CVAR_SETTING("A11yTTS"), !CVarGetInteger(CVAR_SETTING("A11yTTS"), 0));
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@ -1405,7 +1405,7 @@ extern "C" void Graph_ProcessGfxCommands(Gfx* commands) {
|
||||
|
||||
OTRGlobals::Instance->context->GetWindow()->SetTargetFps(fps);
|
||||
|
||||
int threshold = CVarGetInteger("gExtraLatencyThreshold", 80);
|
||||
int threshold = CVarGetInteger(CVAR_SETTING("ExtraLatencyThreshold"), 80);
|
||||
OTRGlobals::Instance->context->GetWindow()->SetMaximumFrameLatency(threshold > 0 && target_fps >= threshold ? 2 : 1);
|
||||
|
||||
RunCommands(commands, mtx_replacements);
|
||||
@ -1502,7 +1502,7 @@ extern "C" uint32_t ResourceMgr_GetGameRegion(int index) {
|
||||
|
||||
uint32_t IsSceneMasterQuest(s16 sceneNum) {
|
||||
uint32_t value = 0;
|
||||
uint8_t mqMode = CVarGetInteger("gBetterDebugWarpScreenMQMode", WARP_MODE_OVERRIDE_OFF);
|
||||
uint8_t mqMode = CVarGetInteger(CVAR_GENERAL("BetterDebugWarpScreenMQMode"), WARP_MODE_OVERRIDE_OFF);
|
||||
if (mqMode == WARP_MODE_OVERRIDE_MQ_AS_VANILLA) {
|
||||
return 1;
|
||||
} else if (mqMode == WARP_MODE_OVERRIDE_VANILLA_AS_MQ) {
|
||||
@ -2131,11 +2131,11 @@ extern "C" uint32_t OTRGetCurrentHeight() {
|
||||
}
|
||||
|
||||
Color_RGB8 GetColorForControllerLED() {
|
||||
auto brightness = CVarGetFloat("gLedBrightness", 1.0f) / 1.0f;
|
||||
auto brightness = CVarGetFloat(CVAR_SETTING("LEDBrightness"), 1.0f) / 1.0f;
|
||||
Color_RGB8 color = { 0, 0, 0 };
|
||||
if (brightness > 0.0f) {
|
||||
LEDColorSource source = static_cast<LEDColorSource>(CVarGetInteger("gLedColorSource", LED_SOURCE_TUNIC_ORIGINAL));
|
||||
bool criticalOverride = CVarGetInteger("gLedCriticalOverride", 1);
|
||||
LEDColorSource source = static_cast<LEDColorSource>(CVarGetInteger(CVAR_SETTING("LEDColorSource"), LED_SOURCE_TUNIC_ORIGINAL));
|
||||
bool criticalOverride = CVarGetInteger(CVAR_SETTING("LEDCriticalOverride"), 1);
|
||||
if (gPlayState && (source == LED_SOURCE_TUNIC_ORIGINAL || source == LED_SOURCE_TUNIC_COSMETICS)) {
|
||||
switch (CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC)) {
|
||||
case EQUIP_VALUE_TUNIC_KOKIRI:
|
||||
@ -2202,7 +2202,7 @@ Color_RGB8 GetColorForControllerLED() {
|
||||
}
|
||||
}
|
||||
if (source == LED_SOURCE_CUSTOM) {
|
||||
color = CVarGetColor24("gLedPort1Color", { 255, 255, 255 });
|
||||
color = CVarGetColor24(CVAR_SETTING("LEDPort1Color"), { 255, 255, 255 });
|
||||
}
|
||||
if (gPlayState && (criticalOverride || source == LED_SOURCE_HEALTH)) {
|
||||
if (HealthMeter_IsCritical()) {
|
||||
@ -2462,7 +2462,7 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
||||
if (player->getItemEntry.getItemId == RG_ICE_TRAP) {
|
||||
u16 iceTrapTextId = Random(0, NUM_ICE_TRAP_MESSAGES);
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::IceTrapRandoMessageTableID, iceTrapTextId);
|
||||
if (CVarGetInteger("gLetItSnow", 0)) {
|
||||
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::IceTrapRandoMessageTableID, NUM_ICE_TRAP_MESSAGES + 1);
|
||||
}
|
||||
} else if (player->getItemEntry.getItemId == RG_TRIFORCE_PIECE) {
|
||||
@ -2724,8 +2724,8 @@ void SoH_ProcessDroppedFiles(std::string filePath) {
|
||||
|
||||
// #region SOH [Randomizer] TODO: Refactor spoiler file handling for randomizer
|
||||
if (configJson.contains("version") && configJson.contains("finalSeed")) {
|
||||
CVarSetString("gRandomizerDroppedFile", filePath.c_str());
|
||||
CVarSetInteger("gRandomizerNewFileDropped", 1);
|
||||
CVarSetString(CVAR_GENERAL("RandomizerDroppedFile"), filePath.c_str());
|
||||
CVarSetInteger(CVAR_GENERAL("RandomizerNewFileDropped"), 1);
|
||||
return;
|
||||
}
|
||||
// #endregion
|
||||
|
@ -1166,7 +1166,7 @@ int SaveManager::GetSaveSectionID(std::string& sectionName) {
|
||||
void SaveManager::CreateDefaultGlobal() {
|
||||
gSaveContext.audioSetting = 0;
|
||||
gSaveContext.zTargetSetting = 0;
|
||||
gSaveContext.language = CVarGetInteger("gLanguages", LANGUAGE_ENG);
|
||||
gSaveContext.language = CVarGetInteger(CVAR_SETTING("Languages"), LANGUAGE_ENG);
|
||||
|
||||
SaveGlobal();
|
||||
}
|
||||
@ -2546,7 +2546,7 @@ void SaveManager::ConvertFromUnversioned() {
|
||||
gSaveContext.zTargetSetting = data[SRAM_HEADER_ZTARGET] & 1;
|
||||
gSaveContext.language = data[SRAM_HEADER_LANGUAGE];
|
||||
if (gSaveContext.language >= LANGUAGE_MAX) {
|
||||
gSaveContext.language = CVarGetInteger("gLanguages", LANGUAGE_ENG);
|
||||
gSaveContext.language = CVarGetInteger(CVAR_SETTING("Languages"), LANGUAGE_ENG);
|
||||
}
|
||||
SaveGlobal();
|
||||
|
||||
|
@ -201,7 +201,7 @@ namespace SohGui {
|
||||
gui->AddGuiWindow(mRandomizerSettingsWindow);
|
||||
mAdvancedResolutionSettingsWindow = std::make_shared<AdvancedResolutionSettings::AdvancedResolutionSettingsWindow>(CVAR_WINDOW("AdvancedResolutionEditor"), "Advanced Resolution Settings");
|
||||
gui->AddGuiWindow(mAdvancedResolutionSettingsWindow);
|
||||
mModalWindow = std::make_shared<SohModalWindow>("gOpenWindows.modalWindowEnabled", "Modal Window");
|
||||
mModalWindow = std::make_shared<SohModalWindow>(CVAR_WINDOW("ModalWindow"), "Modal Window");
|
||||
gui->AddGuiWindow(mModalWindow);
|
||||
mModalWindow->Show();
|
||||
}
|
||||
|
@ -182,18 +182,18 @@ void DrawSettingsMenu() {
|
||||
if (ImGui::BeginMenu("Settings"))
|
||||
{
|
||||
if (ImGui::BeginMenu("Audio")) {
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Master Volume: %.1f %%", "##Master_Vol", "gGameMasterVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true);
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Main Music Volume: %.1f %%", "##Main_Music_Vol", "gMainMusicVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||
Audio_SetGameVolume(SEQ_PLAYER_BGM_MAIN, CVarGetFloat("gMainMusicVolume", 1.0f));
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Master Volume: %.1f %%", "##Master_Vol", CVAR_SETTING("Volume.Master"), 0.0f, 1.0f, "", 1.0f, true, true, false, true);
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Main Music Volume: %.1f %%", "##Main_Music_Vol", CVAR_SETTING("Volume.MainMusic"), 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||
Audio_SetGameVolume(SEQ_PLAYER_BGM_MAIN, CVarGetFloat(CVAR_SETTING("Volume.MainMusic"), 1.0f));
|
||||
}
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Sub Music Volume: %.1f %%", "##Sub_Music_Vol", "gSubMusicVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||
Audio_SetGameVolume(SEQ_PLAYER_BGM_SUB, CVarGetFloat("gSubMusicVolume", 1.0f));
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Sub Music Volume: %.1f %%", "##Sub_Music_Vol", CVAR_SETTING("Volume.SubMusic"), 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||
Audio_SetGameVolume(SEQ_PLAYER_BGM_SUB, CVarGetFloat(CVAR_SETTING("Volume.SubMusic"), 1.0f));
|
||||
}
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Sound Effects Volume: %.1f %%", "##Sound_Effect_Vol", "gSFXMusicVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||
Audio_SetGameVolume(SEQ_PLAYER_SFX, CVarGetFloat("gSFXMusicVolume", 1.0f));
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Sound Effects Volume: %.1f %%", "##Sound_Effect_Vol", CVAR_SETTING("Volume.SFX"), 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||
Audio_SetGameVolume(SEQ_PLAYER_SFX, CVarGetFloat(CVAR_SETTING("Volume.SFX"), 1.0f));
|
||||
}
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Fanfare Volume: %.1f %%", "##Fanfare_Vol", "gFanfareVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||
Audio_SetGameVolume(SEQ_PLAYER_FANFARE, CVarGetFloat("gFanfareVolume", 1.0f));
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Fanfare Volume: %.1f %%", "##Fanfare_Vol", CVAR_SETTING("Volume.Fanfare"), 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||
Audio_SetGameVolume(SEQ_PLAYER_FANFARE, CVarGetFloat(CVAR_SETTING("Volume.Fanfare"), 1.0f));
|
||||
}
|
||||
|
||||
static std::unordered_map<Ship::AudioBackend, const char*> audioBackendNames = {
|
||||
@ -270,8 +270,8 @@ void DrawSettingsMenu() {
|
||||
|
||||
if (ImGui::BeginMenu("Graphics")) {
|
||||
#ifndef __APPLE__
|
||||
const bool disabled_resolutionSlider = CVarGetInteger("gAdvancedResolution.VerticalResolutionToggle", 0) &&
|
||||
CVarGetInteger("gAdvancedResolution.Enabled", 0);
|
||||
const bool disabled_resolutionSlider = CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".VerticalResolutionToggle", 0) &&
|
||||
CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".Enabled", 0);
|
||||
if (UIWidgets::EnhancementSliderFloat("Internal Resolution: %.1f %%", "##IMul", CVAR_INTERNAL_RESOLUTION, 0.5f,
|
||||
2.0f, "", 1.0f, true, true, disabled_resolutionSlider)) {
|
||||
Ship::Context::GetInstance()->GetWindow()->SetResolutionMultiplier(CVarGetFloat(CVAR_INTERNAL_RESOLUTION, 1));
|
||||
@ -344,7 +344,7 @@ void DrawSettingsMenu() {
|
||||
fpsSlider = 3;
|
||||
}
|
||||
}
|
||||
if (CVarGetInteger("gMatchRefreshRate", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("MatchRefreshRate"), 0)) {
|
||||
UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||
}
|
||||
|
||||
@ -366,7 +366,7 @@ void DrawSettingsMenu() {
|
||||
fpsSlider++;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gMatchRefreshRate", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("MatchRefreshRate"), 0)) {
|
||||
UIWidgets::ReEnableComponent("");
|
||||
}
|
||||
if (fpsSlider > 3) {
|
||||
@ -382,14 +382,14 @@ void DrawSettingsMenu() {
|
||||
} else if (fpsSlider == 3) {
|
||||
currentFps = 60;
|
||||
}
|
||||
CVarSetInteger("gInterpolationFPS", currentFps);
|
||||
CVarSetInteger(CVAR_SETTING("InterpolationFPS"), currentFps);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
#else
|
||||
bool matchingRefreshRate =
|
||||
CVarGetInteger("gMatchRefreshRate", 0) && Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() != Ship::WindowBackend::DX11;
|
||||
CVarGetInteger(CVAR_SETTING("MatchRefreshRate"), 0) && Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() != Ship::WindowBackend::DX11;
|
||||
UIWidgets::PaddedEnhancementSliderInt(
|
||||
(currentFps == 20) ? "Frame Rate: Original (20 fps)" : "Frame Rate: %d fps",
|
||||
"##FPSInterpolation", "gInterpolationFPS", minFps, maxFps, "", 20, true, true, false, matchingRefreshRate);
|
||||
"##FPSInterpolation", CVAR_SETTING("InterpolationFPS"), minFps, maxFps, "", 20, true, true, false, matchingRefreshRate);
|
||||
#endif
|
||||
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) {
|
||||
UIWidgets::Tooltip(
|
||||
@ -411,18 +411,18 @@ void DrawSettingsMenu() {
|
||||
if (ImGui::Button("Match Frame Rate to Refresh Rate")) {
|
||||
int hz = Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate();
|
||||
if (hz >= 20 && hz <= 360) {
|
||||
CVarSetInteger("gInterpolationFPS", hz);
|
||||
CVarSetInteger(CVAR_SETTING("InterpolationFPS"), hz);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Match Frame Rate to Refresh Rate", "gMatchRefreshRate", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Match Frame Rate to Refresh Rate", CVAR_SETTING("MatchRefreshRate"), true, false);
|
||||
}
|
||||
UIWidgets::Tooltip("Matches interpolation value to the game window's current refresh rate.");
|
||||
|
||||
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::DX11) {
|
||||
UIWidgets::PaddedEnhancementSliderInt(CVarGetInteger("gExtraLatencyThreshold", 80) == 0 ? "Jitter fix: Off" : "Jitter fix: >= %d FPS",
|
||||
"##ExtraLatencyThreshold", "gExtraLatencyThreshold", 0, 360, "", 80, true, true, false);
|
||||
UIWidgets::PaddedEnhancementSliderInt(CVarGetInteger(CVAR_SETTING("ExtraLatencyThreshold"), 80) == 0 ? "Jitter fix: Off" : "Jitter fix: >= %d FPS",
|
||||
"##ExtraLatencyThreshold", CVAR_SETTING("ExtraLatencyThreshold"), 0, 360, "", 80, true, true, false);
|
||||
UIWidgets::Tooltip(
|
||||
"(For DirectX backend only)\n\n"
|
||||
"When Interpolation FPS (Frame Rate) setting is at least this threshold, add one frame of delay (e.g. 16.6 ms for 60 FPS) in order to avoid jitter."
|
||||
@ -435,7 +435,7 @@ void DrawSettingsMenu() {
|
||||
ImGui::Text("ImGui Menu Scale");
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored({ 0.85f, 0.35f, 0.0f, 1.0f }, "(Experimental)");
|
||||
if (UIWidgets::EnhancementCombobox("gImGuiScale", imguiScaleOptions, 1)) {
|
||||
if (UIWidgets::EnhancementCombobox(CVAR_SETTING("ImGuiScale"), imguiScaleOptions, 1)) {
|
||||
OTRGlobals::Instance->ScaleImGui();
|
||||
}
|
||||
UIWidgets::Tooltip("Changes the scaling of the ImGui menu elements.");
|
||||
@ -511,14 +511,14 @@ void DrawSettingsMenu() {
|
||||
UIWidgets::Spacer(0);
|
||||
|
||||
if (ImGui::BeginMenu("Languages")) {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Translate Title Screen", "gTitleScreenTranslation");
|
||||
if (UIWidgets::EnhancementRadioButton("English", "gLanguages", LANGUAGE_ENG)) {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Translate Title Screen", CVAR_SETTING("TitleScreenTranslation"));
|
||||
if (UIWidgets::EnhancementRadioButton("English", CVAR_SETTING("Languages"), LANGUAGE_ENG)) {
|
||||
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnSetGameLanguage>();
|
||||
}
|
||||
if (UIWidgets::EnhancementRadioButton("German", "gLanguages", LANGUAGE_GER)) {
|
||||
if (UIWidgets::EnhancementRadioButton("German", CVAR_SETTING("Languages"), LANGUAGE_GER)) {
|
||||
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnSetGameLanguage>();
|
||||
}
|
||||
if (UIWidgets::EnhancementRadioButton("French", "gLanguages", LANGUAGE_FRA)) {
|
||||
if (UIWidgets::EnhancementRadioButton("French", CVAR_SETTING("Languages"), LANGUAGE_FRA)) {
|
||||
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnSetGameLanguage>();
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
@ -528,10 +528,10 @@ void DrawSettingsMenu() {
|
||||
|
||||
if (ImGui::BeginMenu("Accessibility")) {
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
UIWidgets::PaddedEnhancementCheckbox("Text to Speech", "gA11yTTS");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Text to Speech", CVAR_SETTING("A11yTTS"));
|
||||
UIWidgets::Tooltip("Enables text to speech for in game dialog");
|
||||
#endif
|
||||
UIWidgets::PaddedEnhancementCheckbox("Disable Idle Camera Re-Centering", "gA11yDisableIdleCam");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Disable Idle Camera Re-Centering", CVAR_SETTING("A11yDisableIdleCam"));
|
||||
UIWidgets::Tooltip("Disables the automatic re-centering of the camera when idle.");
|
||||
|
||||
ImGui::EndMenu();
|
||||
@ -1763,7 +1763,8 @@ void DrawRemoteControlMenu() {
|
||||
ImGui::BeginDisabled(GameInteractor::Instance->isRemoteInteractorEnabled);
|
||||
ImGui::Text("Remote Interaction Scheme");
|
||||
if (UIWidgets::EnhancementCombobox(CVAR_REMOTE("Scheme"), remoteOptions, GI_SCHEME_SAIL)) {
|
||||
switch (CVarGetInteger(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL)) {
|
||||
auto scheme = CVarGetInteger(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL);
|
||||
switch (scheme) {
|
||||
case GI_SCHEME_SAIL:
|
||||
case GI_SCHEME_CROWD_CONTROL:
|
||||
CVarSetString(CVAR_REMOTE("IP"), "127.0.0.1");
|
||||
@ -1827,7 +1828,8 @@ void DrawRemoteControlMenu() {
|
||||
const char* buttonLabel = GameInteractor::Instance->isRemoteInteractorEnabled ? "Disable" : "Enable";
|
||||
if (ImGui::Button(buttonLabel, ImVec2(-1.0f, 0.0f))) {
|
||||
if (GameInteractor::Instance->isRemoteInteractorEnabled) {
|
||||
CVarSetInteger(CVAR_REMOTE("Enabled"), 0);
|
||||
CVarClear(CVAR_REMOTE("Enabled"));
|
||||
CVarClear(CVAR_REMOTE("CrowdControl"));
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
switch (CVarGetInteger(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL)) {
|
||||
case GI_SCHEME_SAIL:
|
||||
|
@ -486,14 +486,14 @@ namespace UIWidgets {
|
||||
|
||||
bool EnhancementRadioButton(const char* text, const char* cvarName, int id) {
|
||||
/*Usage :
|
||||
EnhancementRadioButton("My Visible Name","gMyCVarName", MyID);
|
||||
EnhancementRadioButton("My Visible Name",CVAR_GROUP("MyCVarName"), MyID);
|
||||
First arg is the visible name of the Radio button
|
||||
Second is the cvar name where MyID will be saved.
|
||||
Note: the CVar name should be the same to each Buddies.
|
||||
Example :
|
||||
EnhancementRadioButton("English", "gLanguages", LANGUAGE_ENG);
|
||||
EnhancementRadioButton("German", "gLanguages", LANGUAGE_GER);
|
||||
EnhancementRadioButton("French", "gLanguages", LANGUAGE_FRA);
|
||||
EnhancementRadioButton("English", CVAR_SETTING("Languages"), LANGUAGE_ENG);
|
||||
EnhancementRadioButton("German", CVAR_SETTING("Languages"), LANGUAGE_GER);
|
||||
EnhancementRadioButton("French", CVAR_SETTING("Languages"), LANGUAGE_FRA);
|
||||
*/
|
||||
std::string make_invisible = "##" + std::string(text) + std::string(cvarName);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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,9 +1602,9 @@ 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--;
|
||||
@ -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;
|
||||
}
|
||||
|
@ -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++;
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
@ -1129,10 +1129,10 @@ void TitleCard_Draw(PlayState* play, TitleCardContext* titleCtx) {
|
||||
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;
|
||||
@ -2214,7 +2214,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;
|
||||
}
|
||||
@ -2911,7 +2911,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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
@ -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;
|
||||
}
|
||||
@ -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)) {
|
||||
|
@ -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"
|
||||
|
||||
#define FLAGS 0
|
||||
|
||||
@ -333,7 +334,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(CVAR_ENHANCEMENT("RandomizedEnemies"), 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);
|
||||
|
@ -19,12 +19,12 @@ void KaleidoSetup_Update(PlayState* play) {
|
||||
(play->sceneNum != SCENE_BOMBCHU_BOWLING_ALLEY || !Flags_GetSwitch(play, 0x38))) {
|
||||
|
||||
u8 easyPauseBufferEnabled = CVarGetInteger(CVAR_CHEAT("EasyPauseBuffer"), 0);
|
||||
u8 easyPauseBufferTimer = CVarGetInteger("gCheatEasyPauseBufferTimer", 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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -176,10 +176,10 @@ 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(CVAR_COSMETIC("Consumable.Hearts.Changed"), 0)) {
|
||||
@ -336,20 +336,20 @@ static void* sHeartDDTextures[] = {
|
||||
|
||||
s16 getHealthMeterXOffset() {
|
||||
s16 X_Margins;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Hearts.UseMargins"), 0) != 0)
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Hearts.UseMargins"), 0) != 0)
|
||||
X_Margins = Left_LM_Margin;
|
||||
else
|
||||
X_Margins = 0;
|
||||
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) == 1) {//Anchor Left
|
||||
return OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosX"), 0)+X_Margins+70.0f);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) == 2) {//Anchor Right
|
||||
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(CVAR_COSMETIC("HeartsCount.PosX"), 0)+X_Margins+70.0f);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) == 3) {//Anchor None
|
||||
return CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosX"), 0)+70.0f;;
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) == 4) {//Hidden
|
||||
return 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(CVAR_COSMETIC("Hearts.UseMargins"), 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(CVAR_COSMETIC("HeartsCount.PosType"), 0) != 0) {
|
||||
HeartsScale = CVarGetFloat(CVAR_COSMETIC("HeartsCount.Scale"), 0.7f);
|
||||
return CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosY"), 0)+Y_Margins+(HeartsScale*15);
|
||||
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(CVAR_COSMETIC("HeartsCount.PosType"), 0) != 0) {
|
||||
HeartsScale = CVarGetFloat(CVAR_COSMETIC("HeartsCount.Scale"), 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(CVAR_COSMETIC("Hearts.UseMargins"), 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(CVAR_COSMETIC("HeartsCount.PosType"), 0) != 0) {
|
||||
offsetY = CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosY"), 0)+Y_Margins+(HeartsScale*15);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) == 1) {//Anchor Left
|
||||
offsetX = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosX"), 0)+X_Margins+70.0f);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) == 2) {//Anchor Right
|
||||
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(CVAR_COSMETIC("HeartsCount.PosX"), 0)+X_Margins+70.0f);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) == 3) {//Anchor None
|
||||
offsetX = CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosX"), 0)+70.0f;
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HeartsCount.PosType"), 0) == 4) {//Hidden
|
||||
offsetX = 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 {
|
||||
@ -626,7 +626,7 @@ void HealthMeter_Draw(PlayState* play) {
|
||||
}
|
||||
|
||||
offsetX += 10.0f;
|
||||
s32 lineLength = CVarGetInteger(CVAR_COSMETIC("Hearts.LineLength"), 10);
|
||||
s32 lineLength = CVarGetInteger(CVAR_COSMETIC("HUD.Hearts.LineLength"), 10);
|
||||
if (lineLength != 0 && (i+1)%lineLength == 0) {
|
||||
offsetX = PosX_anchor;
|
||||
offsetY += 10.0f;
|
||||
|
@ -615,8 +615,8 @@ void Minimap_DrawCompassIcons(PlayState* play) {
|
||||
}
|
||||
s16 X_Margins_Minimap;
|
||||
s16 Y_Margins_Minimap;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 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(CVAR_COSMETIC("Minimap.PosType"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
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(CVAR_COSMETIC("Minimap.PosX"), 0)*10)) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
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(CVAR_COSMETIC("Minimap.PosX"), 0)*10)) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y +((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 3) {//Anchor None
|
||||
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(CVAR_COSMETIC("Minimap.PosX"), 0)*10) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
(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(CVAR_COSMETIC("Minimap.PosType"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
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(CVAR_COSMETIC("Minimap.PosX"), 0)*10)) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
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(CVAR_COSMETIC("Minimap.PosX"), 0)*10)) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y +((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 3) {//Anchor None
|
||||
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(CVAR_COSMETIC("Minimap.PosX"), 0)*10) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y - tempZ + ((CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
(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);
|
||||
|
||||
@ -735,15 +735,15 @@ void Minimap_Draw(PlayState* play) {
|
||||
|
||||
// If any of these CVars are enabled, disable toggling the minimap with L, unless gEnableMapToggle is set
|
||||
bool enableMapToggle =
|
||||
!(CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0) || CVarGetInteger(CVAR_CHEAT("MoonJumpOnL"), 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(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 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(CVAR_COSMETIC("Minimap.PosType"), 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(CVAR_COSMETIC("Minimap.PosType"), 0) != 0) {
|
||||
dgnMiniMapY = R_DGN_MINIMAP_Y+CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0)+Y_Margins_Minimap;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
dgnMiniMapX = OTRGetDimensionFromLeftEdge(R_DGN_MINIMAP_X+CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)+X_Margins_Minimap);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
dgnMiniMapX = OTRGetDimensionFromRightEdge(R_DGN_MINIMAP_X+CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)+X_Margins_Minimap);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 3) {//Anchor None
|
||||
dgnMiniMapX = CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0);
|
||||
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(CVAR_COSMETIC("Minimap.PosType"), 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(CVAR_COSMETIC("Minimap.PosType"), 0) != 0) {
|
||||
oWMiniMapY = R_OW_MINIMAP_Y+CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0)+Y_Margins_Minimap;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
oWMiniMapX = OTRGetDimensionFromLeftEdge(R_OW_MINIMAP_X+CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)+X_Margins_Minimap);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
oWMiniMapX = OTRGetDimensionFromRightEdge(R_OW_MINIMAP_X+CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)+X_Margins_Minimap);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 3) {//Anchor None
|
||||
oWMiniMapX = CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0);
|
||||
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(CVAR_COSMETIC("Minimap.PosType"), 0) != 0) {
|
||||
entranceY = newY + CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0) + Y_Margins_Minimap;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 1) { // Anchor Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
entranceX = OTRGetRectDimensionFromLeftEdge(newX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0));
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 2) { // Anchor Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
entranceX = OTRGetRectDimensionFromRightEdge(newX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0));
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 3) { // Anchor None
|
||||
entranceX = newX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -934,19 +934,19 @@ 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(CVAR_COSMETIC("Minimap.PosType"), 0) != 0) {
|
||||
entranceY = 154 + Y_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
entranceX = OTRGetRectDimensionFromLeftEdge(origX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0));
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
entranceX = OTRGetRectDimensionFromRightEdge(origX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0));
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 3) {//Anchor None
|
||||
entranceX = origX + X_Margins_Minimap + CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
|
@ -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(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 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(CVAR_COSMETIC("Minimap.PosType"), 0) != 0) {
|
||||
rectTop = (markPoint->y + Y_Margins_Minimap_ic + 140 + CVarGetInteger(CVAR_COSMETIC("Minimap.PosY"), 0));
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap_ic = Left_MC_Margin;};
|
||||
if (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(CVAR_COSMETIC("Minimap.PosX"), 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(CVAR_COSMETIC("Minimap.PosX"), 0)+204+X_Margins_Minimap_ic);
|
||||
rectLeft = OTRGetRectDimensionFromLeftEdge(markPointX+CVarGetInteger(CVAR_COSMETIC("HUD.Minimap.PosX"), 0)+204+X_Margins_Minimap_ic);
|
||||
}
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Minimap.UseMargins"), 0) != 0) {X_Margins_Minimap_ic = Right_MC_Margin;};
|
||||
rectLeft = OTRGetRectDimensionFromRightEdge(markPointX+CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)+204+X_Margins_Minimap_ic);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 3) {//Anchor None
|
||||
rectLeft = markPointX+CVarGetInteger(CVAR_COSMETIC("Minimap.PosX"), 0)+204+X_Margins_Minimap_ic;
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("Minimap.PosType"), 0) == 4) {//Hidden
|
||||
} 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 {
|
||||
|
@ -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;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -627,12 +627,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);
|
||||
@ -800,7 +794,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;
|
||||
}
|
||||
|
||||
@ -1514,7 +1508,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);
|
||||
@ -1748,7 +1742,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);
|
||||
}
|
||||
@ -1796,11 +1790,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);
|
||||
}
|
||||
@ -1977,11 +1971,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);
|
||||
|
@ -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);
|
||||
@ -2123,8 +2123,8 @@ void Player_DrawPauseImpl(PlayState* play, void* seg04, void* seg06, SkelAnime*
|
||||
playerSwordAndShield[1] = shield;
|
||||
|
||||
Matrix_SetTranslateRotateYXZ(pos->x - ((CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLink"), 0) && LINK_AGE_IN_YEARS == YEARS_ADULT) ? 25 : 0),
|
||||
pos->y - (CVarGetInteger("gPauseTriforce", 0) ? 16 : 0), pos->z, rot);
|
||||
Matrix_Scale(scale * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1), scale, scale, MTXMODE_APPLY);
|
||||
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);
|
||||
@ -2142,11 +2142,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;
|
||||
@ -2202,7 +2202,7 @@ void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f*
|
||||
};
|
||||
s16 AnimArraySize = ARRAY_COUNT(PauseMenuAnimSet);
|
||||
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLink"), 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) {
|
||||
@ -2359,7 +2359,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;
|
||||
|
@ -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(CVAR_CHEAT("NoRestrictItems"), 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.
|
||||
|
@ -232,7 +232,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
||||
gSaveContext.dayTime = 0x6AAB;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
|
||||
if ((fileChooseCtx->buttonIndex == 0 && CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) || CVarGetInteger("gNaviSkipCutscene", 0)) {
|
||||
if ((fileChooseCtx->buttonIndex == 0 && CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0))) {
|
||||
gSaveContext.cutsceneIndex = 0;
|
||||
}
|
||||
|
||||
@ -245,7 +245,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
||||
u8 currentQuest = fileChooseCtx->questType[fileChooseCtx->buttonIndex];
|
||||
|
||||
if (currentQuest == QUEST_RANDOMIZER &&
|
||||
strnlen(CVarGetString("gSpoilerLog", ""), 1) != 0) {
|
||||
strnlen(CVarGetString(CVAR_GENERAL("SpoilerLog"), ""), 1) != 0) {
|
||||
gSaveContext.questId = QUEST_RANDOMIZER;
|
||||
|
||||
Randomizer_InitSaveFile();
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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"
|
||||
|
||||
#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED
|
||||
|
||||
@ -216,8 +217,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(CVAR_ENHANCEMENT("RandomizedEnemies"), 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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && !CVarGetInteger("gCrowdControl", 0) && Actor_Find(&play->actorCtx, ACTOR_EN_TORCH2, ACTORCAT_BOSS) == NULL) ||
|
||||
((CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || CVarGetInteger("gCrowdControl", 0)) && Flags_GetTempClear(play, this->dyna.actor.room));
|
||||
(!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++;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -733,7 +733,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(CVAR_ENHANCEMENT("RandomizedEnemies"), 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);
|
||||
}
|
||||
|
||||
|
@ -1363,7 +1363,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;
|
||||
@ -1384,14 +1384,14 @@ void EnGo2_WakeUp(EnGo2* this, PlayState* play) {
|
||||
// which uses the same frame data as ANIM_1/10 but no morph frames, but only when the
|
||||
// current animation frame is at 0, meaning no morphing is necessary anyway.
|
||||
// ANIM_13 is ANIM_0 but with the startFrame and mode adjusted for biggoron.
|
||||
if (this->skelAnime.curFrame == 0.0f && !CVarGetInteger("gUnfixGoronSpin", 0)) {
|
||||
if (this->skelAnime.curFrame == 0.0f && !CVarGetInteger(CVAR_COSMETIC("UnfixGoronSpin"), 0)) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_13);
|
||||
} else {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_10);
|
||||
}
|
||||
this->skelAnime.playSpeed = 0.5f;
|
||||
} else {
|
||||
if (this->skelAnime.curFrame == 0.0f && !CVarGetInteger("gUnfixGoronSpin", 0)) {
|
||||
if (this->skelAnime.curFrame == 0.0f && !CVarGetInteger(CVAR_COSMETIC("UnfixGoronSpin"), 0)) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_0);
|
||||
} else {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_1);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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(CVAR_ENHANCEMENT("RandomizedEnemies"), 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.
|
||||
@ -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(CVAR_ENHANCEMENT("RandomizedEnemies"), 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);
|
||||
@ -1484,7 +1486,8 @@ void EnIk_Init(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
// Immediately trigger Iron Knuckle for Enemy Rando and Crowd Control
|
||||
if ((CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 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;
|
||||
}
|
||||
}
|
||||
|
@ -655,7 +655,7 @@ void EnMag_DrawInnerMq(Actor* thisx, PlayState* play, Gfx** gfxp) {
|
||||
u16 rectTop;
|
||||
u16 length;
|
||||
int lang = LANGUAGE_ENG;
|
||||
if (CVarGetInteger("gTitleScreenTranslation", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("TitleScreenTranslation"), 0)) {
|
||||
lang = gSaveContext.language;
|
||||
}
|
||||
|
||||
@ -855,7 +855,7 @@ void EnMag_DrawInnerVanilla(Actor* thisx, PlayState* play, Gfx** gfxp) {
|
||||
u16 rectTop;
|
||||
u16 length;
|
||||
int lang = LANGUAGE_ENG;
|
||||
if (CVarGetInteger("gTitleScreenTranslation", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("TitleScreenTranslation"), 0)) {
|
||||
lang = gSaveContext.language;
|
||||
}
|
||||
|
||||
|
@ -664,7 +664,7 @@ void EnOssan_UpdateCursorPos(PlayState* play, EnOssan* this) {
|
||||
this->cursorX = x;
|
||||
this->cursorY = y;
|
||||
|
||||
if (CVarGetInteger("gMirroredWorld", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
|
||||
this->cursorX = SCREEN_WIDTH - x;
|
||||
}
|
||||
}
|
||||
@ -775,7 +775,7 @@ void EnOssan_UpdateJoystickInputState(PlayState* play, EnOssan* this) {
|
||||
s8 stickX = input->rel.stick_x;
|
||||
s8 stickY = input->rel.stick_y;
|
||||
|
||||
if (CVarGetInteger("gMirroredWorld", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
|
||||
stickX = -input->rel.stick_x;
|
||||
}
|
||||
|
||||
@ -981,7 +981,7 @@ s32 EnOssan_FacingShopkeeperDialogResult(EnOssan* this, PlayState* play) {
|
||||
void EnOssan_State_FacingShopkeeper(EnOssan* this, PlayState* play, Player* player) {
|
||||
Input* input = &play->state.input[0];
|
||||
u8 nextIndex;
|
||||
bool dpad = CVarGetInteger("gDpadText", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
|
||||
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) &&
|
||||
!EnOssan_TestEndInteraction(this, play, &play->state.input[0])) {
|
||||
@ -992,7 +992,7 @@ void EnOssan_State_FacingShopkeeper(EnOssan* this, PlayState* play, Player* play
|
||||
|
||||
u16 dLeft = BTN_DLEFT;
|
||||
u16 dRight = BTN_DRIGHT;
|
||||
if (CVarGetInteger("gMirroredWorld", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
|
||||
dLeft = BTN_DRIGHT;
|
||||
dRight = BTN_DLEFT;
|
||||
}
|
||||
@ -1070,7 +1070,7 @@ void EnOssan_CursorUpDown(EnOssan* this, PlayState* play) {
|
||||
Input* input = &play->state.input[0];
|
||||
u8 curTemp = this->cursorIndex;
|
||||
u8 curScanTemp;
|
||||
bool dpad = CVarGetInteger("gDpadText", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
|
||||
|
||||
if ((this->stickAccumY < 0) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) {
|
||||
curTemp &= 0xFE;
|
||||
@ -1223,7 +1223,7 @@ void EnOssan_State_BrowseLeftShelf(EnOssan* this, PlayState* play, Player* playe
|
||||
u8 prevIndex = this->cursorIndex;
|
||||
s32 c;
|
||||
s32 d;
|
||||
bool dpad = CVarGetInteger("gDpadText", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
|
||||
|
||||
if (!EnOssan_ReturnItemToShelf(this)) {
|
||||
osSyncPrintf("%s[%d]:" VT_FGCOL(GREEN) "ズーム中!!" VT_RST "\n", __FILE__, __LINE__);
|
||||
@ -1242,7 +1242,7 @@ void EnOssan_State_BrowseLeftShelf(EnOssan* this, PlayState* play, Player* playe
|
||||
|
||||
u16 dLeft = BTN_DLEFT;
|
||||
u16 dRight = BTN_DRIGHT;
|
||||
if (CVarGetInteger("gMirroredWorld", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
|
||||
dLeft = BTN_DRIGHT;
|
||||
dRight = BTN_DLEFT;
|
||||
}
|
||||
@ -1292,7 +1292,7 @@ void EnOssan_State_BrowseRightShelf(EnOssan* this, PlayState* play, Player* play
|
||||
s32 pad[2];
|
||||
u8 prevIndex;
|
||||
u8 nextIndex;
|
||||
bool dpad = CVarGetInteger("gDpadText", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
|
||||
|
||||
prevIndex = this->cursorIndex;
|
||||
if (!EnOssan_ReturnItemToShelf(this)) {
|
||||
@ -1312,7 +1312,7 @@ void EnOssan_State_BrowseRightShelf(EnOssan* this, PlayState* play, Player* play
|
||||
|
||||
u16 dLeft = BTN_DLEFT;
|
||||
u16 dRight = BTN_DRIGHT;
|
||||
if (CVarGetInteger("gMirroredWorld", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
|
||||
dLeft = BTN_DRIGHT;
|
||||
dRight = BTN_DLEFT;
|
||||
}
|
||||
@ -2414,7 +2414,7 @@ void EnOssan_DrawStickDirectionPrompts(PlayState* play, EnOssan* this) {
|
||||
s32 drawStickRightPrompt = this->stickRightPrompt.isEnabled;
|
||||
|
||||
// Invert which stick prompt is active when only one is active
|
||||
if (CVarGetInteger("gMirroredWorld", 0) && (drawStickLeftPrompt != drawStickRightPrompt)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) && (drawStickLeftPrompt != drawStickRightPrompt)) {
|
||||
drawStickLeftPrompt = !drawStickLeftPrompt;
|
||||
drawStickRightPrompt = !drawStickRightPrompt;
|
||||
}
|
||||
|
@ -580,7 +580,7 @@ void EnPartner_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
Input sControlInput = play->state.input[this->actor.params];
|
||||
|
||||
f32 relX = sControlInput.cur.stick_x / 10.0f * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1);
|
||||
f32 relX = sControlInput.cur.stick_x / 10.0f * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1);
|
||||
f32 relY = sControlInput.cur.stick_y / 10.0f;
|
||||
|
||||
Vec3f camForward = { GET_ACTIVE_CAM(play)->at.x - GET_ACTIVE_CAM(play)->eye.x, 0.0f,
|
||||
@ -689,7 +689,7 @@ void EnPartner_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
uint16_t partnerButtons[7] = { BTN_CLEFT, BTN_CDOWN, BTN_CRIGHT, BTN_DUP, BTN_DDOWN, BTN_DLEFT, BTN_DRIGHT};
|
||||
uint8_t buttonMax = 3;
|
||||
if (CVarGetInteger("gDpadEquips", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_SETTING("DpadEquips"), 0) != 0) {
|
||||
buttonMax = ARRAY_COUNT(gSaveContext.equips.cButtonSlots);
|
||||
}
|
||||
|
||||
|
@ -254,7 +254,7 @@ void func_80AE2744(EnRd* this, PlayState* play) {
|
||||
// Add a height check to redeads/gibdos freeze when Enemy Randomizer is on.
|
||||
// Without the height check, redeads/gibdos can freeze the player from insane distances in
|
||||
// vertical rooms (like the first room in Deku Tree), making these rooms nearly unplayable.
|
||||
s8 enemyRandoCCActive = CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || CVarGetInteger("gCrowdControl", 0);
|
||||
s8 enemyRandoCCActive = CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || (CVarGetInteger(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL) == GI_SCHEME_CROWD_CONTROL && CVarGetInteger(CVAR_REMOTE("Enabled"), 0));
|
||||
if (!enemyRandoCCActive || (enemyRandoCCActive && this->actor.yDistToPlayer <= 100.0f && this->actor.yDistToPlayer >= -100.0f)) {
|
||||
if ((this->actor.params != 2) && (this->unk_305 == 0)) {
|
||||
func_80AE37BC(this);
|
||||
@ -668,7 +668,7 @@ void func_80AE3C98(EnRd* this, PlayState* play) {
|
||||
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
if (this->unk_30C == 0) {
|
||||
s8 enemyRandoCCActive = CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || CVarGetInteger("gCrowdControl", 0);
|
||||
s8 enemyRandoCCActive = CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) || (CVarGetInteger(CVAR_REMOTE("Scheme"), GI_SCHEME_SAIL) == GI_SCHEME_CROWD_CONTROL && CVarGetInteger(CVAR_REMOTE("Enabled"), 0));
|
||||
// Don't set this flag in Enemy Rando as it can overlap with other objects using the same flag.
|
||||
if (!Flags_GetSwitch(play, this->unk_312 & 0x7F) && !enemyRandoCCActive) {
|
||||
Flags_SetSwitch(play, this->unk_312 & 0x7F);
|
||||
|
@ -128,7 +128,7 @@ void EnTorch2_Init(Actor* thisx, PlayState* play2) {
|
||||
|
||||
// Change Dark Link to regular enemy instead of boss with enemy randomizer and crowd control.
|
||||
// This way Dark Link will be considered for "clear enemy" rooms properly.
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 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);
|
||||
}
|
||||
|
||||
@ -592,7 +592,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
||||
input->prev.button = input->cur.button & (u16) ~(BTN_A | BTN_B);
|
||||
PadUtils_UpdateRelXY(input);
|
||||
|
||||
if (CVarGetInteger("gMirroredWorld", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
|
||||
input->rel.stick_x *= -1;
|
||||
}
|
||||
|
||||
|
@ -2025,7 +2025,7 @@ void Fishing_DrawRod(PlayState* play) {
|
||||
spC8 = player->unk_85C - spC8;
|
||||
|
||||
spC4 = player->unk_858;
|
||||
Math_SmoothStepToF(&player->unk_858, input->rel.stick_x * 0.02f * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1), 0.3f, 5.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->unk_858, input->rel.stick_x * 0.02f * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1), 0.3f, 5.0f, 0.0f);
|
||||
spC4 = player->unk_858 - spC4;
|
||||
|
||||
if (player->unk_858 > 1.0f) {
|
||||
|
@ -200,8 +200,8 @@ void MagicDark_DiamondDraw(Actor* thisx, PlayState* play) {
|
||||
u16 gameplayFrames = play->gameplayFrames;
|
||||
Color_RGB8 Spell_env_ori = {0, 100, 255};
|
||||
Color_RGB8 Spell_col_ori = {170, 255, 255};
|
||||
Color_RGB8 Spell_env = CVarGetColor24("gNL_Diamond_Env", Spell_env_ori);
|
||||
Color_RGB8 Spell_col = CVarGetColor24("gNL_Diamond_Col", Spell_col_ori);
|
||||
Color_RGB8 Spell_env = CVarGetColor24(CVAR_COSMETIC("Magic.NayrusSecondary.Value"), Spell_env_ori);
|
||||
Color_RGB8 Spell_col = CVarGetColor24(CVAR_COSMETIC("Magic.NayrusPrimary.Value"), Spell_col_ori);
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
@ -224,7 +224,7 @@ void MagicDark_DiamondDraw(Actor* thisx, PlayState* play) {
|
||||
Matrix_RotateY(this->actor.shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
if (CVarGetInteger("gUseSpellsCol",0)) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("UseSpellsColors"),0)) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, Spell_col.r, Spell_col.g, Spell_col.b, (s32)(this->primAlpha * 0.6f) & 0xFF);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, Spell_env.r, Spell_env.g, Spell_env.b, 128);
|
||||
} else {
|
||||
|
@ -218,8 +218,8 @@ void MagicFire_Draw(Actor* thisx, PlayState* play) {
|
||||
u8 alpha;
|
||||
Color_RGB8 Spell_env_ori = {255, 0, 0};
|
||||
Color_RGB8 Spell_col_ori = {255, 200, 0};
|
||||
Color_RGB8 Spell_env = CVarGetColor24("gDF_Env", Spell_env_ori);
|
||||
Color_RGB8 Spell_col = CVarGetColor24("gDF_Col", Spell_col_ori);
|
||||
Color_RGB8 Spell_env = CVarGetColor24(CVAR_COSMETIC("Magic.DinsSecondary.Value"), Spell_env_ori);
|
||||
Color_RGB8 Spell_col = CVarGetColor24(CVAR_COSMETIC("Magic.DinsPrimaryary.Value"), Spell_col_ori);
|
||||
|
||||
if (this->action > 0) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
@ -231,7 +231,7 @@ void MagicFire_Draw(Actor* thisx, PlayState* play) {
|
||||
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
||||
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, 319, 239);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
if (CVarGetInteger("gUseSpellsCol",0)) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("UseSpellsColors"),0)) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, Spell_col.r, Spell_col.g, Spell_col.b, (u8)(this->alphaMultiplier * 255));
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, Spell_env.r, Spell_env.g, Spell_env.b, (u8)(this->alphaMultiplier * 255));
|
||||
} else {
|
||||
|
@ -2213,7 +2213,7 @@ s32 Player_ItemIsItemAction(s32 item1, s32 itemAction) {
|
||||
}
|
||||
|
||||
s32 Player_GetItemOnButton(PlayState* play, s32 index) {
|
||||
if (index >= ((CVarGetInteger("gDpadEquips", 0) != 0) ? 8 : 4)) {
|
||||
if (index >= ((CVarGetInteger(CVAR_SETTING("DpadEquips"), 0) != 0) ? 8 : 4)) {
|
||||
return ITEM_NONE;
|
||||
} else if (play->bombchuBowlingStatus != 0) {
|
||||
return (play->bombchuBowlingStatus > 0) ? ITEM_BOMBCHU : ITEM_NONE;
|
||||
@ -2254,7 +2254,7 @@ void Player_ProcessItemButtons(Player* this, PlayState* play) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA) {
|
||||
s32 maskItem = this->currentMask - PLAYER_MASK_KEATON + ITEM_MASK_KEATON;
|
||||
bool hasOnDpad = false;
|
||||
if (CVarGetInteger("gDpadEquips", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_SETTING("DpadEquips"), 0) != 0) {
|
||||
for (int buttonIndex = 4; buttonIndex < 8; buttonIndex++) {
|
||||
hasOnDpad |= gSaveContext.equips.buttonItems[buttonIndex] == maskItem;
|
||||
}
|
||||
@ -2270,7 +2270,7 @@ void Player_ProcessItemButtons(Player* this, PlayState* play) {
|
||||
maskItemAction = this->currentMask - 1 + PLAYER_IA_MASK_KEATON;
|
||||
|
||||
bool hasOnDpad = false;
|
||||
if (CVarGetInteger("gDpadEquips", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_SETTING("DpadEquips"), 0) != 0) {
|
||||
for (int buttonIndex = 0; buttonIndex < 4; buttonIndex++) {
|
||||
hasOnDpad |= Player_ItemIsItemAction(DPAD_ITEM(buttonIndex), maskItemAction);
|
||||
}
|
||||
@ -2286,7 +2286,7 @@ void Player_ProcessItemButtons(Player* this, PlayState* play) {
|
||||
if (!(this->stateFlags1 & (PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_IN_CUTSCENE)) && !func_8008F128(this)) {
|
||||
if (this->itemAction >= PLAYER_IA_FISHING_POLE) {
|
||||
bool hasOnDpad = false;
|
||||
if (CVarGetInteger("gDpadEquips", 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_SETTING("DpadEquips"), 0) != 0) {
|
||||
for (int buttonIndex = 0; buttonIndex < 4; buttonIndex++) {
|
||||
hasOnDpad |= Player_ItemIsInUse(this, DPAD_ITEM(buttonIndex));
|
||||
}
|
||||
@ -2677,7 +2677,7 @@ int func_80834E44(PlayState* play) {
|
||||
|
||||
int func_80834E7C(PlayState* play) {
|
||||
u16 buttonsToCheck = BTN_A | BTN_B | 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;
|
||||
}
|
||||
return (play->shootingGalleryStatus != 0) &&
|
||||
@ -4003,7 +4003,7 @@ void func_80837948(PlayState* play, Player* this, s32 arg2) {
|
||||
}
|
||||
|
||||
if ((arg2 >= PLAYER_MWA_FLIPSLASH_START) && (arg2 <= PLAYER_MWA_JUMPSLASH_FINISH)) {
|
||||
if (CVarGetInteger("gRestoreQPA", 1) && temp == -1) {
|
||||
if (CVarGetInteger(CVAR_GENERAL("RestoreQPA"), 1) && temp == -1) {
|
||||
dmgFlags = 0x16171617;
|
||||
}
|
||||
else {
|
||||
@ -5653,7 +5653,7 @@ s32 Player_ActionChange_4(Player* this, PlayState* play) {
|
||||
this->stateFlags2 |= PLAYER_STATE2_NAVI_ALERT;
|
||||
}
|
||||
|
||||
if (!CHECK_BTN_ALL(sControlInput->press.button, CVarGetInteger("gNaviOnL", 0) ? BTN_L : BTN_CUP) && !sp28) {
|
||||
if (!CHECK_BTN_ALL(sControlInput->press.button, CVarGetInteger(CVAR_SETTING("NaviOnL"), 0) ? BTN_L : BTN_CUP) && !sp28) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -5702,7 +5702,7 @@ s32 Player_ActionChange_0(Player* this, PlayState* play) {
|
||||
if ((this->unk_664 != NULL) && (CHECK_FLAG_ALL(this->unk_664->flags, ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_NAVI_HAS_INFO) ||
|
||||
(this->unk_664->naviEnemyId != 0xFF))) {
|
||||
this->stateFlags2 |= PLAYER_STATE2_NAVI_ALERT;
|
||||
} else if ((this->naviTextId == 0 || CVarGetInteger("gNaviOnL", 0)) && !func_8008E9C4(this) && CHECK_BTN_ALL(sControlInput->press.button, BTN_CUP) &&
|
||||
} else if ((this->naviTextId == 0 || CVarGetInteger(CVAR_SETTING("NaviOnL"), 0)) && !func_8008E9C4(this) && CHECK_BTN_ALL(sControlInput->press.button, BTN_CUP) &&
|
||||
(YREG(15) != 0x10) &&
|
||||
(YREG(15) != 0x20) && !func_8083B8F4(this, play)) {
|
||||
func_80078884(NA_SE_SY_ERROR);
|
||||
@ -6551,18 +6551,18 @@ void func_8083DFE0(Player* this, f32* arg1, s16* arg2) {
|
||||
maxSpeed *= 1.5f;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gEnableWalkModify", 0) && !CVarGetInteger("gWalkModifierDoesntChangeJump", 0)) {
|
||||
if (CVarGetInteger("gWalkSpeedToggle", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("WalkModifier.Enabled"), 0) && !CVarGetInteger(CVAR_SETTING("WalkModifier.DoesntChangeJump"), 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("WalkModifier.SpeedToggle"), 0)) {
|
||||
if (gWalkSpeedToggle1) {
|
||||
maxSpeed *= CVarGetFloat("gWalkModifierOne", 1.0f);
|
||||
maxSpeed *= CVarGetFloat(CVAR_SETTING("WalkModifier.Mapping1"), 1.0f);
|
||||
} else if (gWalkSpeedToggle2) {
|
||||
maxSpeed *= CVarGetFloat("gWalkModifierTwo", 1.0f);
|
||||
maxSpeed *= CVarGetFloat(CVAR_SETTING("WalkModifier.Mapping2"), 1.0f);
|
||||
}
|
||||
} else {
|
||||
if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_MODIFIER1)) {
|
||||
maxSpeed *= CVarGetFloat("gWalkModifierOne", 1.0f);
|
||||
maxSpeed *= CVarGetFloat(CVAR_SETTING("WalkModifier.Mapping1"), 1.0f);
|
||||
} else if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_MODIFIER2)) {
|
||||
maxSpeed *= CVarGetFloat("gWalkModifierTwo", 1.0f);
|
||||
maxSpeed *= CVarGetFloat(CVAR_SETTING("WalkModifier.Mapping2"), 1.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6932,7 +6932,7 @@ s32 func_8083EAF0(Player* this, Actor* actor) {
|
||||
|
||||
s32 Player_ActionChange_9(Player* this, PlayState* play) {
|
||||
u16 buttonsToCheck = BTN_A | BTN_B | 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 ((this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) && (this->heldActor != NULL) &&
|
||||
@ -7415,7 +7415,7 @@ s32 func_8083FD78(Player* this, f32* arg1, s16* arg2, PlayState* play) {
|
||||
}
|
||||
|
||||
// #region SOH [Enhancement]
|
||||
if (CVarGetInteger("gRightStickAiming", 0) || !CVarGetInteger("gInvertZAimingYAxis", 1)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("Controls.RightStickAim"), 0) || !CVarGetInteger(CVAR_SETTING("Controls.InvertZAimingYAxis"), 1)) {
|
||||
|
||||
if (this->unk_664 != NULL) {
|
||||
func_8083DB98(this, 1);
|
||||
@ -7423,7 +7423,7 @@ s32 func_8083FD78(Player* this, f32* arg1, s16* arg2, PlayState* play) {
|
||||
int8_t relStickY;
|
||||
|
||||
// preserves simultaneous left/right-stick aiming
|
||||
if (CVarGetInteger("gRightStickAiming", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("Controls.RightStickAim"), 0)) {
|
||||
if ((sControlInput->rel.stick_y + sControlInput->rel.right_stick_y) >= 0) {
|
||||
relStickY = (((sControlInput->rel.stick_y) > (sControlInput->rel.right_stick_y))
|
||||
? (sControlInput->rel.stick_y)
|
||||
@ -7438,7 +7438,7 @@ s32 func_8083FD78(Player* this, f32* arg1, s16* arg2, PlayState* play) {
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->actor.focus.rot.x,
|
||||
relStickY * (CVarGetInteger("gInvertZAimingYAxis", 1) ? 1 : -1) * 240.0f, 14, 4000, 30);
|
||||
relStickY * (CVarGetInteger(CVAR_SETTING("Controls.InvertZAimingYAxis"), 1) ? 1 : -1) * 240.0f, 14, 4000, 30);
|
||||
func_80836AB8(this, 1);
|
||||
}
|
||||
// #endregion
|
||||
@ -8289,18 +8289,18 @@ void Player_Action_80842180(Player* this, PlayState* play) {
|
||||
sp2C *= 1.5f;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gEnableWalkModify", 0)) {
|
||||
if (CVarGetInteger("gWalkSpeedToggle", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("WalkModifier.Enabled"), 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("WalkModifier.SpeedToggle"), 0)) {
|
||||
if (gWalkSpeedToggle1) {
|
||||
sp2C *= CVarGetFloat("gWalkModifierOne", 1.0f);
|
||||
sp2C *= CVarGetFloat(CVAR_SETTING("WalkModifier.Mapping1"), 1.0f);
|
||||
} else if (gWalkSpeedToggle2) {
|
||||
sp2C *= CVarGetFloat("gWalkModifierTwo", 1.0f);
|
||||
sp2C *= CVarGetFloat(CVAR_SETTING("WalkModifier.Mapping2"), 1.0f);
|
||||
}
|
||||
} else {
|
||||
if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_MODIFIER1)) {
|
||||
sp2C *= CVarGetFloat("gWalkModifierOne", 1.0f);
|
||||
sp2C *= CVarGetFloat(CVAR_SETTING("WalkModifier.Mapping1"), 1.0f);
|
||||
} else if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_MODIFIER2)) {
|
||||
sp2C *= CVarGetFloat("gWalkModifierTwo", 1.0f);
|
||||
sp2C *= CVarGetFloat(CVAR_SETTING("WalkModifier.Mapping2"), 1.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -8694,8 +8694,8 @@ void Player_Action_80843188(Player* this, PlayState* play) {
|
||||
func_8083721C(this);
|
||||
|
||||
if (this->av2.actionVar2 != 0) {
|
||||
sp54 = sControlInput->rel.stick_y * 100 * (CVarGetInteger("gInvertShieldAimingYAxis", 1) ? 1 : -1);
|
||||
sp50 = sControlInput->rel.stick_x * (CVarGetInteger("gMirroredWorld", 0) ? 120 : -120) * (CVarGetInteger("gInvertShieldAimingXAxis", 0) ? -1 : 1);
|
||||
sp54 = sControlInput->rel.stick_y * 100 * (CVarGetInteger(CVAR_SETTING("Controls.InvertShieldAimingYAxis"), 1) ? 1 : -1);
|
||||
sp50 = sControlInput->rel.stick_x * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? 120 : -120) * (CVarGetInteger(CVAR_SETTING("Controls.InvertShieldAimingYAxis"), 0) ? -1 : 1);
|
||||
sp4E = this->actor.shape.rot.y - Camera_GetInputDirYaw(GET_ACTIVE_CAM(play));
|
||||
|
||||
sp40 = Math_CosS(sp4E);
|
||||
@ -9076,7 +9076,7 @@ void Player_Action_8084411C(Player* this, PlayState* play) {
|
||||
Actor* heldActor = this->heldActor;
|
||||
|
||||
u16 buttonsToCheck = BTN_A | BTN_B | 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 (!func_80835644(play, this, heldActor) && (heldActor->id == ACTOR_EN_NIW) &&
|
||||
@ -9858,7 +9858,7 @@ void Player_Action_80846260(Player* this, PlayState* play) {
|
||||
}
|
||||
|
||||
u16 buttonsToCheck = BTN_A | BTN_B | 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 (this->av2.actionVar2 == 0) {
|
||||
@ -11074,13 +11074,13 @@ void func_80848EF8(Player* this, PlayState* play) {
|
||||
stoneOfAgonyColor = CVarGetColor24(CVAR_COSMETIC("HUD.StoneOfAgony.Value"), stoneOfAgonyColor);
|
||||
}
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("VisualAgony"), 0) && !this->stateFlags1 && !GameInteractor_NoUIActive()) {
|
||||
s16 Top_Margins = (CVarGetInteger("gHUDMargin_T", 0) * -1);
|
||||
s16 Left_Margins = CVarGetInteger("gHUDMargin_L", 0);
|
||||
s16 Right_Margins = CVarGetInteger("gHUDMargin_R", 0);
|
||||
s16 Top_Margins = (CVarGetInteger(CVAR_COSMETIC("HUD.Margin.T"), 0) * -1);
|
||||
s16 Left_Margins = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.L"), 0);
|
||||
s16 Right_Margins = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.R"), 0);
|
||||
s16 X_Margins_VSOA;
|
||||
s16 Y_Margins_VSOA;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("VisualSoA.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("VisualSoA.PosType"), 0) == 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.VisualSoA.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.VisualSoA.PosType"), 0) == 0) {
|
||||
X_Margins_VSOA = Left_Margins;
|
||||
};
|
||||
Y_Margins_VSOA = Top_Margins;
|
||||
@ -11092,21 +11092,21 @@ void func_80848EF8(Player* this, PlayState* play) {
|
||||
s16 PosY_VSOA_ori = 60 + Y_Margins_VSOA;
|
||||
s16 PosX_VSOA;
|
||||
s16 PosY_VSOA;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("VisualSoA.PosType"), 0) != 0) {
|
||||
PosY_VSOA = CVarGetInteger(CVAR_COSMETIC("VisualSoA.PosY"), 0) + Y_Margins_VSOA;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("VisualSoA.PosType"), 0) == 1) { // Anchor Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("VisualSoA.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.VisualSoA.PosType"), 0) != 0) {
|
||||
PosY_VSOA = CVarGetInteger(CVAR_COSMETIC("HUD.VisualSoA.PosY"), 0) + Y_Margins_VSOA;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.VisualSoA.PosType"), 0) == 1) { // Anchor Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.VisualSoA.UseMargins"), 0) != 0) {
|
||||
X_Margins_VSOA = Left_Margins;
|
||||
};
|
||||
PosX_VSOA = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("VisualSoA.PosX"), 0) + X_Margins_VSOA);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("VisualSoA.PosType"), 0) == 2) { // Anchor Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("VisualSoA.UseMargins"), 0) != 0) {
|
||||
PosX_VSOA = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HUD.VisualSoA.PosX"), 0) + X_Margins_VSOA);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.VisualSoA.PosType"), 0) == 2) { // Anchor Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.VisualSoA.UseMargins"), 0) != 0) {
|
||||
X_Margins_VSOA = Right_Margins;
|
||||
};
|
||||
PosX_VSOA = OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("VisualSoA.PosX"), 0) + X_Margins_VSOA);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("VisualSoA.PosType"), 0) == 3) { // Anchor None
|
||||
PosX_VSOA = CVarGetInteger(CVAR_COSMETIC("VisualSoA.PosX"), 0);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("VisualSoA.PosType"), 0) == 4) { // Hidden
|
||||
PosX_VSOA = OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("HUD.VisualSoA.PosX"), 0) + X_Margins_VSOA);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.VisualSoA.PosType"), 0) == 3) { // Anchor None
|
||||
PosX_VSOA = CVarGetInteger(CVAR_COSMETIC("HUD.VisualSoA.PosX"), 0);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.VisualSoA.PosType"), 0) == 4) { // Hidden
|
||||
PosX_VSOA = -9999;
|
||||
}
|
||||
} else {
|
||||
@ -11661,7 +11661,7 @@ void Player_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gEnableWalkModify", 0) && CVarGetInteger("gWalkSpeedToggle", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("WalkModifier.Enabled"), 0) && CVarGetInteger(CVAR_SETTING("WalkModifier.SpeedToggle"), 0)) {
|
||||
if (CHECK_BTN_ALL(sControlInput->press.button, BTN_MODIFIER1)) {
|
||||
gWalkSpeedToggle1 = !gWalkSpeedToggle1;
|
||||
}
|
||||
@ -11774,7 +11774,7 @@ void Player_DrawGameplay(PlayState* play, Player* this, s32 lod, Gfx* cullDList,
|
||||
|
||||
if ((overrideLimbDraw == Player_OverrideLimbDrawGameplayDefault) && (this->currentMask != PLAYER_MASK_NONE)) {
|
||||
// Fixes a bug in vanilla where ice traps are rendered extremely large while wearing a bunny hood
|
||||
if (CVarGetInteger("gFixIceTrapWithBunnyHood", 1)) Matrix_Push();
|
||||
if (CVarGetInteger(CVAR_GENERAL("FixIceTrapWithBunnyHood"), 1)) Matrix_Push();
|
||||
Mtx* bunnyEarMtx = Graph_Alloc(play->state.gfxCtx, 2 * sizeof(Mtx));
|
||||
|
||||
if (this->currentMask == PLAYER_MASK_BUNNY) {
|
||||
@ -11803,7 +11803,7 @@ void Player_DrawGameplay(PlayState* play, Player* this, s32 lod, Gfx* cullDList,
|
||||
gSPDisplayList(POLY_OPA_DISP++, sMaskDlists[this->currentMask - 1]);
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gFixIceTrapWithBunnyHood", 1)) Matrix_Pop();
|
||||
if (CVarGetInteger(CVAR_GENERAL("FixIceTrapWithBunnyHood"), 1)) Matrix_Pop();
|
||||
}
|
||||
|
||||
if ((this->currentBoots == PLAYER_BOOTS_HOVER ||
|
||||
@ -11997,23 +11997,23 @@ s16 func_8084ABD8(PlayState* play, Player* this, s32 arg2, s16 arg3) {
|
||||
s32 temp1 = 0;
|
||||
s16 temp2 = 0;
|
||||
s16 temp3 = 0;
|
||||
s8 invertXAxisMulti = ((CVarGetInteger("gInvertAimingXAxis", 0) && !CVarGetInteger("gMirroredWorld", 0)) || (!CVarGetInteger("gInvertAimingXAxis", 0) && CVarGetInteger("gMirroredWorld", 0))) ? -1 : 1;
|
||||
s8 invertYAxisMulti = CVarGetInteger("gInvertAimingYAxis", 1) ? 1 : -1;
|
||||
f32 xAxisMulti = CVarGetFloat("gFirstPersonCameraSensitivityX", 1.0f);
|
||||
f32 yAxisMulti = CVarGetFloat("gFirstPersonCameraSensitivityY", 1.0f);
|
||||
s8 invertXAxisMulti = ((CVarGetInteger(CVAR_SETTING("Controls.InvertAimingXAxis"), 0) && !CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) || (!CVarGetInteger(CVAR_SETTING("Controls.InvertAimingXAxis"), 0) && CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0))) ? -1 : 1;
|
||||
s8 invertYAxisMulti = CVarGetInteger(CVAR_SETTING("Controls.InvertAimingYAxis"), 1) ? 1 : -1;
|
||||
f32 xAxisMulti = CVarGetFloat(CVAR_SETTING("FirstPersonCameraSensitivity.X"), 1.0f);
|
||||
f32 yAxisMulti = CVarGetFloat(CVAR_SETTING("FirstPersonCameraSensitivity.Y"), 1.0f);
|
||||
|
||||
if (!func_8002DD78(this) && !func_808334B4(this) && (arg2 == 0)) { // First person without weapon
|
||||
// Y Axis
|
||||
if (!CVarGetInteger("gMoveWhileFirstPerson", 0)) {
|
||||
if (!CVarGetInteger(CVAR_SETTING("MoveInFirstPerson"), 0)) {
|
||||
temp2 += sControlInput->rel.stick_y * 240.0f * invertYAxisMulti * yAxisMulti;
|
||||
}
|
||||
if (CVarGetInteger("gRightStickAiming", 0) && fabsf(sControlInput->cur.right_stick_y) > 15.0f) {
|
||||
if (CVarGetInteger(CVAR_SETTING("Controls.RightStickAim"), 0) && fabsf(sControlInput->cur.right_stick_y) > 15.0f) {
|
||||
temp2 += sControlInput->cur.right_stick_y * 240.0f * invertYAxisMulti * yAxisMulti;
|
||||
}
|
||||
if (fabsf(sControlInput->cur.gyro_x) > 0.01f) {
|
||||
temp2 += (-sControlInput->cur.gyro_x) * 750.0f;
|
||||
}
|
||||
if (CVarGetInteger("gDisableAutoCenterViewFirstPerson", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("DisableFirstPersonAutoCenterView"), 0)) {
|
||||
this->actor.focus.rot.x += temp2 * 0.1f;
|
||||
this->actor.focus.rot.x = CLAMP(this->actor.focus.rot.x, -14000, 14000);
|
||||
} else {
|
||||
@ -12022,10 +12022,10 @@ s16 func_8084ABD8(PlayState* play, Player* this, s32 arg2, s16 arg3) {
|
||||
|
||||
// X Axis
|
||||
temp2 = 0;
|
||||
if (!CVarGetInteger("gMoveWhileFirstPerson", 0)) {
|
||||
if (!CVarGetInteger(CVAR_SETTING("MoveInFirstPerson"), 0)) {
|
||||
temp2 += sControlInput->rel.stick_x * -16.0f * invertXAxisMulti * xAxisMulti;
|
||||
}
|
||||
if (CVarGetInteger("gRightStickAiming", 0) && fabsf(sControlInput->cur.right_stick_x) > 15.0f) {
|
||||
if (CVarGetInteger(CVAR_SETTING("Controls.RightStickAim"), 0) && fabsf(sControlInput->cur.right_stick_x) > 15.0f) {
|
||||
temp2 += sControlInput->cur.right_stick_x * -16.0f * invertXAxisMulti * xAxisMulti;
|
||||
}
|
||||
if (fabsf(sControlInput->cur.gyro_y) > 0.01f) {
|
||||
@ -12037,11 +12037,11 @@ s16 func_8084ABD8(PlayState* play, Player* this, s32 arg2, s16 arg3) {
|
||||
// Y Axis
|
||||
temp1 = (this->stateFlags1 & PLAYER_STATE1_ON_HORSE) ? 3500 : 14000;
|
||||
|
||||
if (!CVarGetInteger("gMoveWhileFirstPerson", 0)) {
|
||||
if (!CVarGetInteger(CVAR_SETTING("MoveInFirstPerson"), 0)) {
|
||||
temp3 += ((sControlInput->rel.stick_y >= 0) ? 1 : -1) *
|
||||
(s32)((1.0f - Math_CosS(sControlInput->rel.stick_y * 200)) * 1500.0f) * invertYAxisMulti * yAxisMulti;
|
||||
}
|
||||
if (CVarGetInteger("gRightStickAiming", 0) && fabsf(sControlInput->cur.right_stick_y) > 15.0f) {
|
||||
if (CVarGetInteger(CVAR_SETTING("Controls.RightStickAim"), 0) && fabsf(sControlInput->cur.right_stick_y) > 15.0f) {
|
||||
temp3 += ((sControlInput->cur.right_stick_y >= 0) ? 1 : -1) *
|
||||
(s32)((1.0f - Math_CosS(sControlInput->cur.right_stick_y * 200)) * 1500.0f) * invertYAxisMulti * yAxisMulti;
|
||||
}
|
||||
@ -12055,11 +12055,11 @@ s16 func_8084ABD8(PlayState* play, Player* this, s32 arg2, s16 arg3) {
|
||||
temp1 = 19114;
|
||||
temp2 = this->actor.focus.rot.y - this->actor.shape.rot.y;
|
||||
temp3 = 0;
|
||||
if (!CVarGetInteger("gMoveWhileFirstPerson", 0)) {
|
||||
if (!CVarGetInteger(CVAR_SETTING("MoveInFirstPerson"), 0)) {
|
||||
temp3 = ((sControlInput->rel.stick_x >= 0) ? 1 : -1) *
|
||||
(s32)((1.0f - Math_CosS(sControlInput->rel.stick_x * 200)) * -1500.0f) * invertXAxisMulti * xAxisMulti;
|
||||
}
|
||||
if (CVarGetInteger("gRightStickAiming", 0) && fabsf(sControlInput->cur.right_stick_x) > 15.0f) {
|
||||
if (CVarGetInteger(CVAR_SETTING("Controls.RightStickAim"), 0) && fabsf(sControlInput->cur.right_stick_x) > 15.0f) {
|
||||
temp3 += ((sControlInput->cur.right_stick_x >= 0) ? 1 : -1) *
|
||||
(s32)((1.0f - Math_CosS(sControlInput->cur.right_stick_x * 200)) * -1500.0f) * invertXAxisMulti * xAxisMulti;
|
||||
}
|
||||
@ -12070,7 +12070,7 @@ s16 func_8084ABD8(PlayState* play, Player* this, s32 arg2, s16 arg3) {
|
||||
this->actor.focus.rot.y = CLAMP(temp2, -temp1, temp1) + this->actor.shape.rot.y;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gMoveWhileFirstPerson", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("MoveInFirstPerson"), 0)) {
|
||||
f32 movementSpeed = LINK_IS_ADULT ? 9.0f : 8.25f;
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA && this->currentMask == PLAYER_MASK_BUNNY) {
|
||||
movementSpeed *= 1.5f;
|
||||
@ -12109,18 +12109,18 @@ void func_8084AEEC(Player* this, f32* arg1, f32 arg2, s16 arg3) {
|
||||
// #region SOH [Enhancement]
|
||||
f32 swimMod = 1.0f;
|
||||
|
||||
if (CVarGetInteger("gEnableWalkModify", 0) == 1) {
|
||||
if (CVarGetInteger("gWalkSpeedToggle", 0) == 1) {
|
||||
if (CVarGetInteger(CVAR_SETTING("WalkModifier.Enabled"), 0) == 1) {
|
||||
if (CVarGetInteger(CVAR_SETTING("WalkModifier.SpeedToggle"), 0) == 1) {
|
||||
if (gWalkSpeedToggle1) {
|
||||
swimMod *= CVarGetFloat("gSwimModifierOne", 1.0f);
|
||||
swimMod *= CVarGetFloat(CVAR_SETTING("WalkModifier.SwimMapping1"), 1.0f);
|
||||
} else if (gWalkSpeedToggle2) {
|
||||
swimMod *= CVarGetFloat("gSwimModifierTwo", 1.0f);
|
||||
swimMod *= CVarGetFloat(CVAR_SETTING("WalkModifier.SwimMapping2"), 1.0f);
|
||||
}
|
||||
} else {
|
||||
if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_MODIFIER1)) {
|
||||
swimMod *= CVarGetFloat("gSwimModifierOne", 1.0f);
|
||||
swimMod *= CVarGetFloat(CVAR_SETTING("WalkModifier.SwimMapping1"), 1.0f);
|
||||
} else if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_MODIFIER2)) {
|
||||
swimMod *= CVarGetFloat("gSwimModifierTwo", 1.0f);
|
||||
swimMod *= CVarGetFloat(CVAR_SETTING("WalkModifier.SwimMapping2"), 1.0f);
|
||||
}
|
||||
}
|
||||
temp1 = this->skelAnime.curFrame - 10.0f;
|
||||
@ -12268,7 +12268,7 @@ void Player_Action_8084B1D8(Player* this, PlayState* play) {
|
||||
}
|
||||
|
||||
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 ((this->csAction != 0) || (this->unk_6AD == 0) || (this->unk_6AD >= 4) || func_80833B54(this) ||
|
||||
@ -12707,7 +12707,7 @@ void Player_Action_8084BF1C(Player* this, PlayState* play) {
|
||||
if ((this->av1.actionVar1 != 0) && (sp80 != 0)) {
|
||||
anim2 = this->ageProperties->unk_BC[this->av2.actionVar2];
|
||||
|
||||
if (CVarGetInteger("gMirroredWorld", 0) ? (sp80 < 0) : (sp80 > 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? (sp80 < 0) : (sp80 > 0)) {
|
||||
this->skelAnime.prevTransl = this->ageProperties->unk_7A[this->av2.actionVar2];
|
||||
Player_AnimPlayOnce(play, this, anim2);
|
||||
} else {
|
||||
@ -13356,7 +13356,7 @@ void func_8084DBC4(PlayState* play, Player* this, f32 arg2) {
|
||||
func_8084AEEC(this, &this->linearVelocity, sp2C * 0.5f, sp2A);
|
||||
// Original implementation of func_8084AEEC (SurfaceWithoutSwimMod) to prevent velocity increases via swim mod which push Link into the air
|
||||
// #region SOH [Enhancement]
|
||||
if (CVarGetInteger("gEnableWalkModify", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("WalkModifier.Enabled"), 0)) {
|
||||
SurfaceWithoutSwimMod(this, &this->actor.velocity.y, arg2, this->yaw);
|
||||
// #endregion
|
||||
} else {
|
||||
@ -14413,9 +14413,9 @@ s32 func_8084FCAC(Player* this, PlayState* play) {
|
||||
if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_DDOWN)) {
|
||||
angle = temp + 0x8000;
|
||||
} else if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_DLEFT)) {
|
||||
angle = temp + (0x4000 * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1));
|
||||
angle = temp + (0x4000 * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1));
|
||||
} else if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_DRIGHT)) {
|
||||
angle = temp - (0x4000 * (CVarGetInteger("gMirroredWorld", 0) ? -1 : 1));
|
||||
angle = temp - (0x4000 * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1));
|
||||
}
|
||||
|
||||
this->actor.world.pos.x += speed * Math_SinS(angle);
|
||||
|
@ -62,7 +62,7 @@ void EffectSsExtra_Draw(PlayState* play, u32 index, EffectSs* this) {
|
||||
s32 pad;
|
||||
f32 scale = this->rScale / 100.0f;
|
||||
void* object = play->objectCtx.status[this->rObjBankIdx].segment;
|
||||
u8 mirroredWorld = CVarGetInteger("gMirroredWorld", 0);
|
||||
u8 mirroredWorld = CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0);
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
|
@ -673,7 +673,7 @@ void Sram_InitDebugSave(void);
|
||||
void Sram_InitBossRushSave();
|
||||
|
||||
u8 hasRandomizerQuest() {
|
||||
if (strnlen(CVarGetString("gSpoilerLog", ""), 1) != 0) {
|
||||
if (strnlen(CVarGetString(CVAR_GENERAL("SpoilerLog"), ""), 1) != 0) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@ -991,7 +991,7 @@ void DrawSeedHashSprites(FileChooseContext* this) {
|
||||
|
||||
// Draw Seed Icons for spoiler log
|
||||
if (this->configMode == CM_QUEST_MENU && this->questType[this->buttonIndex] == QUEST_RANDOMIZER &&
|
||||
strnlen(CVarGetString("gSpoilerLog", ""), 1) != 0 && fileSelectSpoilerFileLoaded) {
|
||||
strnlen(CVarGetString(CVAR_GENERAL("SpoilerLog"), ""), 1) != 0 && fileSelectSpoilerFileLoaded) {
|
||||
u16 xStart = 64;
|
||||
for (unsigned int i = 0; i < 5; i++) {
|
||||
SpriteLoad(this, GetSeedTexture(gSaveContext.seedIcons[i]));
|
||||
@ -1008,12 +1008,12 @@ void DrawSeedHashSprites(FileChooseContext* this) {
|
||||
u8 generating;
|
||||
|
||||
void FileChoose_UpdateRandomizer() {
|
||||
if (CVarGetInteger("gRandoGenerating", 0) != 0 && generating == 0) {
|
||||
if (CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0) != 0 && generating == 0) {
|
||||
generating = 1;
|
||||
func_800F5E18(SEQ_PLAYER_BGM_MAIN, NA_BGM_HORSE, 0, 7, 1);
|
||||
return;
|
||||
} else if (CVarGetInteger("gRandoGenerating", 0) == 0 && generating) {
|
||||
if (SpoilerFileExists(CVarGetString("gSpoilerLog", ""))) {
|
||||
} else if (CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0) == 0 && generating) {
|
||||
if (SpoilerFileExists(CVarGetString(CVAR_GENERAL("SpoilerLog"), ""))) {
|
||||
Audio_PlayFanfare(NA_BGM_HORSE_GOAL);
|
||||
} else {
|
||||
func_80078884(NA_SE_SY_OCARINA_ERROR);
|
||||
@ -1025,25 +1025,25 @@ void FileChoose_UpdateRandomizer() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!SpoilerFileExists(CVarGetString("gSpoilerLog", "")) && !CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0)) {
|
||||
CVarSetString("gSpoilerLog", "");
|
||||
if (!SpoilerFileExists(CVarGetString(CVAR_GENERAL("SpoilerLog"), "")) && !CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0)) {
|
||||
CVarSetString(CVAR_GENERAL("SpoilerLog"), "");
|
||||
fileSelectSpoilerFileLoaded = false;
|
||||
}
|
||||
|
||||
if ((CVarGetInteger("gRandomizerNewFileDropped", 0) != 0) || (CVarGetInteger("gNewSeedGenerated", 0) != 0) ||
|
||||
(!fileSelectSpoilerFileLoaded && SpoilerFileExists(CVarGetString("gSpoilerLog", "")))) {
|
||||
if (CVarGetInteger("gRandomizerNewFileDropped", 0) != 0) {
|
||||
CVarSetString("gSpoilerLog", CVarGetString("gRandomizerDroppedFile", "None"));
|
||||
if ((CVarGetInteger(CVAR_GENERAL("RandomizerNewFileDropped"), 0) != 0) || (CVarGetInteger(CVAR_GENERAL("NewSeedGenerated"), 0) != 0) ||
|
||||
(!fileSelectSpoilerFileLoaded && SpoilerFileExists(CVarGetString(CVAR_GENERAL("SpoilerLog"), "")))) {
|
||||
if (CVarGetInteger(CVAR_GENERAL("RandomizerNewFileDropped"), 0) != 0) {
|
||||
CVarSetString(CVAR_GENERAL("SpoilerLog"), CVarGetString(CVAR_GENERAL("RandomizerDroppedFile"), "None"));
|
||||
}
|
||||
bool silent = true;
|
||||
if ((CVarGetInteger("gRandomizerNewFileDropped", 0) != 0) || (CVarGetInteger("gNewSeedGenerated", 0) != 0)) {
|
||||
if ((CVarGetInteger(CVAR_GENERAL("RandomizerNewFileDropped"), 0) != 0) || (CVarGetInteger(CVAR_GENERAL("NewSeedGenerated"), 0) != 0)) {
|
||||
silent = false;
|
||||
}
|
||||
CVarSetInteger("gNewSeedGenerated", 0);
|
||||
CVarSetInteger("gRandomizerNewFileDropped", 0);
|
||||
CVarSetString("gRandomizerDroppedFile", "");
|
||||
CVarSetInteger(CVAR_GENERAL("NewSeedGenerated"), 0);
|
||||
CVarSetInteger(CVAR_GENERAL("RandomizerNewFileDropped"), 0);
|
||||
CVarSetString(CVAR_GENERAL("RandomizerDroppedFile"), "");
|
||||
fileSelectSpoilerFileLoaded = false;
|
||||
const char* fileLoc = CVarGetString("gSpoilerLog", "");
|
||||
const char* fileLoc = CVarGetString(CVAR_GENERAL("SpoilerLog"), "");
|
||||
Randomizer_LoadSettings(fileLoc);
|
||||
Randomizer_LoadHintLocations(fileLoc);
|
||||
Randomizer_LoadRequiredTrials(fileLoc);
|
||||
@ -1053,7 +1053,7 @@ void FileChoose_UpdateRandomizer() {
|
||||
Randomizer_LoadEntranceOverrides(fileLoc, silent);
|
||||
fileSelectSpoilerFileLoaded = true;
|
||||
|
||||
if (SpoilerFileExists(CVarGetString("gSpoilerLog", "")) && CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0)) {
|
||||
if (SpoilerFileExists(CVarGetString(CVAR_GENERAL("SpoilerLog"), "")) && CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0)) {
|
||||
remove(fileLoc);
|
||||
}
|
||||
}
|
||||
@ -1074,7 +1074,7 @@ void FileChoose_UpdateMainMenu(GameState* thisx) {
|
||||
static u8 linkName[] = { 0x15, 0x2C, 0x31, 0x2E, 0x3E, 0x3E, 0x3E, 0x3E };
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVarGetInteger("gDpadText", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
|
||||
|
||||
FileChoose_UpdateRandomizer();
|
||||
|
||||
@ -1264,7 +1264,7 @@ void FileChoose_UpdateQuestMenu(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
s8 i = 0;
|
||||
bool dpad = CVarGetInteger("gDpadText", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
|
||||
|
||||
FileChoose_UpdateRandomizer();
|
||||
|
||||
@ -1311,7 +1311,7 @@ void FileChoose_UpdateQuestMenu(GameState* thisx) {
|
||||
this->prevConfigMode = this->configMode;
|
||||
this->configMode = CM_ROTATE_TO_NAME_ENTRY;
|
||||
this->logoAlpha = 0;
|
||||
CVarSetInteger("gOnFileSelectNameEntry", 1);
|
||||
CVarSetInteger(CVAR_GENERAL("OnFileSelectNameEntry"), 1);
|
||||
this->kbdButton = FS_KBD_BTN_NONE;
|
||||
this->charPage = FS_CHAR_PAGE_ENG;
|
||||
this->kbdX = 0;
|
||||
@ -1340,7 +1340,7 @@ void FileChoose_UpdateBossRushMenu(GameState* thisx) {
|
||||
FileChoose_UpdateStickDirectionPromptAnim(thisx);
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVarGetInteger("gDpadText", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
|
||||
|
||||
// Fade in elements after opening Boss Rush options menu
|
||||
this->bossRushUIAlpha += 25;
|
||||
@ -2816,7 +2816,7 @@ void FileChoose_FadeInFileInfo(GameState* thisx) {
|
||||
void FileChoose_ConfirmFile(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVarGetInteger("gDpadText", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_START) || (CHECK_BTN_ALL(input->press.button, BTN_A))) {
|
||||
if (this->confirmButtonIndex == FS_BTN_CONFIRM_YES) {
|
||||
@ -3016,21 +3016,6 @@ void FileChoose_LoadGame(GameState* thisx) {
|
||||
|
||||
gSaveContext.naviTimer = 0;
|
||||
|
||||
// SWORDLESS LINK IS BACK BABY
|
||||
if (CVarGetInteger("gSwordlessLink", 0) != 0)
|
||||
{
|
||||
if ((gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI) &&
|
||||
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_MASTER) &&
|
||||
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_BGS) &&
|
||||
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KNIFE)) {
|
||||
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_NONE;
|
||||
swordEquipValue = (BOMSWAP16(gEquipMasks[EQUIP_TYPE_SWORD]) & gSaveContext.equips.equipment) >> (EQUIP_TYPE_SWORD * 4);
|
||||
gSaveContext.equips.equipment &= gEquipNegMasks[EQUIP_TYPE_SWORD];
|
||||
gSaveContext.inventory.equipment ^= (gBitFlags[swordEquipValue - 1] << BOMSWAP16(gEquipShifts[EQUIP_TYPE_SWORD]));
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_RANDO) {
|
||||
// Setup the modified entrance table and entrance shuffle table for rando
|
||||
Entrance_Init();
|
||||
@ -3313,7 +3298,7 @@ void FileChoose_Main(GameState* thisx) {
|
||||
this->stickRelX = input->rel.stick_x;
|
||||
this->stickRelY = input->rel.stick_y;
|
||||
|
||||
if (CVarGetInteger("gDpadHoldChange", 1) && CVarGetInteger("gDpadText", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("DpadHoldChange"), 1) && CVarGetInteger(CVAR_SETTING("DpadInText"), 0)) {
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DLEFT)) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
this->inputTimerX = 10;
|
||||
@ -3661,7 +3646,7 @@ void FileChoose_Init(GameState* thisx) {
|
||||
this->questType[2] = MIN_QUEST;
|
||||
fileSelectSpoilerFileLoaded = false;
|
||||
isFastFileIdIncompatible = 0;
|
||||
CVarSetInteger("gOnFileSelectNameEntry", 0);
|
||||
CVarSetInteger(CVAR_GENERAL("OnFileSelectNameEntry"), 0);
|
||||
|
||||
SREG(30) = 1;
|
||||
osSyncPrintf("SIZE=%x\n", size);
|
||||
|
@ -64,7 +64,7 @@ static s16 sLastCopyEraseButtonIndex;
|
||||
void FileChoose_SelectCopySource(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVarGetInteger("gDpadText", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
|
||||
|
||||
if (((this->buttonIndex == FS_BTN_COPY_QUIT) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
@ -181,7 +181,7 @@ void FileChoose_SetupCopyDest2(GameState* thisx) {
|
||||
void FileChoose_SelectCopyDest(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVarGetInteger("gDpadText", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
|
||||
|
||||
if (((this->buttonIndex == FS_BTN_COPY_QUIT) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
@ -370,7 +370,7 @@ void FileChoose_CopyConfirm(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
u16 dayTime;
|
||||
bool dpad = CVarGetInteger("gDpadText", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
|
||||
|
||||
if (((this->buttonIndex != FS_BTN_CONFIRM_YES) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
@ -695,7 +695,7 @@ void FileChoose_SetupEraseSelect(GameState* thisx) {
|
||||
void FileChoose_EraseSelect(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVarGetInteger("gDpadText", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
|
||||
|
||||
if (((this->buttonIndex == FS_BTN_COPY_QUIT) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
@ -837,7 +837,7 @@ void FileChoose_SetupEraseConfirm2(GameState* thisx) {
|
||||
void FileChoose_EraseConfirm(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVarGetInteger("gDpadText", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
|
||||
|
||||
if (((this->buttonIndex != FS_BTN_CONFIRM_YES) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
|
@ -380,7 +380,7 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
|
||||
}
|
||||
this->prevConfigMode = CM_NAME_ENTRY;
|
||||
sLastCharIndex = -1;
|
||||
CVarSetInteger("gOnFileSelectNameEntry", 0);
|
||||
CVarSetInteger(CVAR_GENERAL("OnFileSelectNameEntry"), 0);
|
||||
} else {
|
||||
for (i = this->newFileNameCharCount; i < 7; i++) {
|
||||
filename[i] = filename[i + 1];
|
||||
@ -455,7 +455,7 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
|
||||
gSaveContext.dayTime = dayTime;
|
||||
this->prevConfigMode = CM_MAIN_MENU;
|
||||
this->configMode = CM_NAME_ENTRY_TO_MAIN;
|
||||
CVarSetInteger("gOnFileSelectNameEntry", 0);
|
||||
CVarSetInteger(CVAR_GENERAL("OnFileSelectNameEntry"), 0);
|
||||
this->nameBoxAlpha[this->buttonIndex] = this->nameAlpha[this->buttonIndex] = 200;
|
||||
this->connectorAlpha[this->buttonIndex] = 255;
|
||||
func_800AA000(300.0f, 0xB4, 0x14, 0x64);
|
||||
@ -527,7 +527,7 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
s16 prevKbdX;
|
||||
bool dpad = CVarGetInteger("gDpadText", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
|
||||
|
||||
this->kbdButton = 99;
|
||||
|
||||
@ -683,7 +683,7 @@ static s8 sLastOptionButtonIndex = -1;
|
||||
void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVarGetInteger("gDpadText", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
@ -753,7 +753,7 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
||||
|
||||
// Persist the new language so it is not overridden on the next frame
|
||||
if (languageChanged) {
|
||||
CVarSetInteger("gLanguages", gSaveContext.language);
|
||||
CVarSetInteger(CVAR_SETTING("Languages"), gSaveContext.language);
|
||||
GameInteractor_ExecuteOnSetGameLanguage();
|
||||
}
|
||||
|
||||
|
@ -45,9 +45,9 @@ void Select_LoadGame(SelectContext* this, s32 entranceIndex) {
|
||||
}
|
||||
|
||||
if (this->isBetterWarp) {
|
||||
CVarSetInteger("gBetterDebugWarpScreenCurrentScene", this->currentScene);
|
||||
CVarSetInteger("gBetterDebugWarpScreenTopDisplayedScene", this->topDisplayedScene);
|
||||
CVarSetInteger("gBetterDebugWarpScreenPageDownIndex", this->pageDownIndex);
|
||||
CVarSetInteger(CVAR_GENERAL("BetterDebugWarpScreenCurrentScene"), this->currentScene);
|
||||
CVarSetInteger(CVAR_GENERAL("BetterDebugWarpScreenTopDisplayedScene"), this->topDisplayedScene);
|
||||
CVarSetInteger(CVAR_GENERAL("BetterDebugWarpScreenPageDownIndex"), this->pageDownIndex);
|
||||
CVarSave();
|
||||
|
||||
if (ResourceMgr_GameHasMasterQuest() && ResourceMgr_GameHasOriginal()) {
|
||||
@ -57,11 +57,11 @@ void Select_LoadGame(SelectContext* this, s32 entranceIndex) {
|
||||
s16 scene = gEntranceTable[entrancePair.entranceIndex].scene;
|
||||
u8 isEntranceDefaultMQ = ResourceMgr_IsSceneMasterQuest(scene);
|
||||
if (!isEntranceDefaultMQ && this->opt) { // Force vanilla for default MQ scene
|
||||
CVarSetInteger("gBetterDebugWarpScreenMQMode", WARP_MODE_OVERRIDE_MQ_AS_VANILLA);
|
||||
CVarSetInteger("gBetterDebugWarpScreenMQModeScene", scene);
|
||||
CVarSetInteger(CVAR_GENERAL("BetterDebugWarpScreenMQMode"), WARP_MODE_OVERRIDE_MQ_AS_VANILLA);
|
||||
CVarSetInteger(CVAR_GENERAL("BetterDebugWarpScreenMQModeScene"), scene);
|
||||
} else if (isEntranceDefaultMQ && !this->opt) { // Force MQ for default vanilla scene
|
||||
CVarSetInteger("gBetterDebugWarpScreenMQMode", WARP_MODE_OVERRIDE_VANILLA_AS_MQ);
|
||||
CVarSetInteger("gBetterDebugWarpScreenMQModeScene", scene);
|
||||
CVarSetInteger(CVAR_GENERAL("BetterDebugWarpScreenMQMode"), WARP_MODE_OVERRIDE_VANILLA_AS_MQ);
|
||||
CVarSetInteger(CVAR_GENERAL("BetterDebugWarpScreenMQModeScene"), scene);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -111,9 +111,9 @@ void Select_Grotto_LoadGame(SelectContext* this, s32 grottoIndex) {
|
||||
}
|
||||
|
||||
if (this->isBetterWarp) {
|
||||
CVarSetInteger("gBetterDebugWarpScreenCurrentScene", this->currentScene);
|
||||
CVarSetInteger("gBetterDebugWarpScreenTopDisplayedScene", this->topDisplayedScene);
|
||||
CVarSetInteger("gBetterDebugWarpScreenPageDownIndex", this->pageDownIndex);
|
||||
CVarSetInteger(CVAR_GENERAL("BetterDebugWarpScreenCurrentScene"), this->currentScene);
|
||||
CVarSetInteger(CVAR_GENERAL("BetterDebugWarpScreenTopDisplayedScene"), this->topDisplayedScene);
|
||||
CVarSetInteger(CVAR_GENERAL("BetterDebugWarpScreenPageDownIndex"), this->pageDownIndex);
|
||||
CVarSave();
|
||||
}
|
||||
|
||||
@ -1564,13 +1564,13 @@ void Select_SwitchBetterWarpMode(SelectContext* this, u8 isBetterWarpMode) {
|
||||
gSaveContext.dayTime = 0x8000;
|
||||
|
||||
if (isBetterWarpMode) {
|
||||
s32 currScene = CVarGetInteger("gBetterDebugWarpScreenCurrentScene", 0);
|
||||
s32 currScene = CVarGetInteger(CVAR_GENERAL("BetterDebugWarpScreenCurrentScene"), 0);
|
||||
this->count = ARRAY_COUNT(sBetterScenes);
|
||||
|
||||
if (currScene >= 0 && currScene < this->count) {
|
||||
this->currentScene = currScene;
|
||||
this->topDisplayedScene = CVarGetInteger("gBetterDebugWarpScreenTopDisplayedScene", 0);
|
||||
this->pageDownIndex = CVarGetInteger("gBetterDebugWarpScreenPageDownIndex", 0);
|
||||
this->topDisplayedScene = CVarGetInteger(CVAR_GENERAL("BetterDebugWarpScreenTopDisplayedScene"), 0);
|
||||
this->pageDownIndex = CVarGetInteger(CVAR_GENERAL("BetterDebugWarpScreenPageDownIndex"), 0);
|
||||
|
||||
BetterSceneSelectEntrancePair entrancePair = this->betterScenes[this->currentScene].entrancePairs[this->pageDownIndex];
|
||||
if (entrancePair.canBeMQ && ResourceMgr_IsSceneMasterQuest(gEntranceTable[entrancePair.entranceIndex].scene)) {
|
||||
@ -1637,7 +1637,7 @@ void Select_Init(GameState* thisx) {
|
||||
gSaveContext.nightFlag = 0;
|
||||
gSaveContext.dayTime = 0x8000;
|
||||
|
||||
CVarClear("gBetterDebugWarpScreenMQMode");
|
||||
CVarClear("gBetterDebugWarpScreenMQModeScene");
|
||||
CVarClear(CVAR_GENERAL("BetterDebugWarpScreenMQMode"));
|
||||
CVarClear(CVAR_GENERAL("BetterDebugWarpScreenMQModeScene"));
|
||||
Select_SwitchBetterWarpMode(this, CVarGetInteger(CVAR_DEVELOPER_TOOLS("BetterDebugWarpScreen"), 0));
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ void Title_Draw(TitleContext* this) {
|
||||
}
|
||||
|
||||
// Draw ice cube around N64 logo.
|
||||
if (CVarGetInteger("gLetItSnow", 0)) {
|
||||
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
|
||||
f32 scale = 0.4f;
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
|
@ -103,7 +103,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
s16 pad2;
|
||||
s16 phi_s0_2;
|
||||
s16 sp208[3];
|
||||
bool dpad = CVarGetInteger("gDpadPause", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0);
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
|
@ -143,7 +143,7 @@ void KaleidoScope_DrawPlayerWork(PlayState* play) {
|
||||
pos.y = -130.0f;
|
||||
pos.z = -150.0f;
|
||||
scale = 0.046f;
|
||||
} else if (CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) != EQUIP_VALUE_SWORD_MASTER && !CVarGetInteger("gPauseTriforce", 0)) {
|
||||
} else if (CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) != EQUIP_VALUE_SWORD_MASTER && !CVarGetInteger(CVAR_GENERAL("PauseTriforce"), 0)) {
|
||||
pos.x = 25.0f;
|
||||
pos.y = -228.0f;
|
||||
pos.z = 60.0f;
|
||||
@ -213,9 +213,9 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
||||
s16 cursorX;
|
||||
s16 cursorY;
|
||||
s16 oldCursorPoint;
|
||||
bool dpad = (CVarGetInteger("gDpadPause", 0) && !CHECK_BTN_ALL(input->cur.button, BTN_CUP));
|
||||
bool pauseAnyCursor = (CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && IS_RANDO) ||
|
||||
(CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_ALWAYS_ON);
|
||||
bool dpad = (CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0) && !CHECK_BTN_ALL(input->cur.button, BTN_CUP));
|
||||
bool pauseAnyCursor = (CVarGetInteger(CVAR_SETTING("PauseAnyCursor"), 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && IS_RANDO) ||
|
||||
(CVarGetInteger(CVAR_SETTING("PauseAnyCursor"), 0) == PAUSE_ANY_CURSOR_ALWAYS_ON);
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
@ -552,7 +552,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
||||
}
|
||||
|
||||
u16 buttonsToCheck = BTN_A | BTN_CLEFT | BTN_CDOWN | BTN_CRIGHT;
|
||||
if (CVarGetInteger("gDpadEquips", 0) && (!CVarGetInteger("gDpadPause", 0) || CHECK_BTN_ALL(input->cur.button, BTN_CUP))) {
|
||||
if (CVarGetInteger(CVAR_SETTING("DpadEquips"), 0) && (!CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0) || CHECK_BTN_ALL(input->cur.button, BTN_CUP))) {
|
||||
buttonsToCheck |= BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT;
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ void KaleidoScope_DrawItemCycleExtras(PlayState* play, u8 slot, u8 canCycle, u8
|
||||
void KaleidoScope_HandleItemCycleExtras(PlayState* play, u8 slot, bool canCycle, u8 leftItem, u8 rightItem, bool replaceCButtons) {
|
||||
Input* input = &play->state.input[0];
|
||||
PauseContext* pauseCtx = &play->pauseCtx;
|
||||
bool dpad = (CVarGetInteger("gDpadPause", 0) && !CHECK_BTN_ALL(input->cur.button, BTN_CUP));
|
||||
bool dpad = (CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0) && !CHECK_BTN_ALL(input->cur.button, BTN_CUP));
|
||||
u8 slotItem = gSaveContext.inventory.items[slot];
|
||||
u8 hasLeftItem = leftItem != ITEM_NONE && slotItem != leftItem;
|
||||
u8 hasRightItem = rightItem != ITEM_NONE && slotItem != rightItem && leftItem != rightItem;
|
||||
@ -414,9 +414,9 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
||||
s16 cursorY;
|
||||
s16 oldCursorPoint;
|
||||
s16 moveCursorResult;
|
||||
bool dpad = (CVarGetInteger("gDpadPause", 0) && !CHECK_BTN_ALL(input->cur.button, BTN_CUP));
|
||||
bool pauseAnyCursor = pauseCtx->cursorSpecialPos == 0 && ((CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && IS_RANDO) ||
|
||||
(CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_ALWAYS_ON));
|
||||
bool dpad = (CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0) && !CHECK_BTN_ALL(input->cur.button, BTN_CUP));
|
||||
bool pauseAnyCursor = pauseCtx->cursorSpecialPos == 0 && ((CVarGetInteger(CVAR_SETTING("PauseAnyCursor"), 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && IS_RANDO) ||
|
||||
(CVarGetInteger(CVAR_SETTING("PauseAnyCursor"), 0) == PAUSE_ANY_CURSOR_ALWAYS_ON));
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
@ -669,7 +669,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
||||
if ((pauseCtx->debugState == 0) && (pauseCtx->state == 6) && (pauseCtx->unk_1E4 == 0)) {
|
||||
KaleidoScope_HandleItemCycles(play);
|
||||
u16 buttonsToCheck = BTN_CLEFT | BTN_CDOWN | BTN_CRIGHT;
|
||||
if (CVarGetInteger("gDpadEquips", 0) && (!CVarGetInteger("gDpadPause", 0) || CHECK_BTN_ALL(input->cur.button, BTN_CUP))) {
|
||||
if (CVarGetInteger(CVAR_SETTING("DpadEquips"), 0) && (!CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0) || CHECK_BTN_ALL(input->cur.button, BTN_CUP))) {
|
||||
buttonsToCheck |= BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT;
|
||||
}
|
||||
if (CHECK_BTN_ANY(input->press.button, buttonsToCheck)) {
|
||||
@ -803,7 +803,7 @@ void KaleidoScope_SetupItemEquip(PlayState* play, u16 item, u16 slot, s16 animX,
|
||||
pauseCtx->equipTargetCBtn = 1;
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_CRIGHT)) {
|
||||
pauseCtx->equipTargetCBtn = 2;
|
||||
} else if (CVarGetInteger("gDpadEquips", 0)) {
|
||||
} else if (CVarGetInteger(CVAR_SETTING("DpadEquips"), 0)) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DUP)) {
|
||||
pauseCtx->equipTargetCBtn = 3;
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) {
|
||||
@ -858,10 +858,10 @@ void KaleidoScope_UpdateItemEquip(PlayState* play) {
|
||||
u16 offsetX;
|
||||
u16 offsetY;
|
||||
|
||||
s16 Top_HUD_Margin = CVarGetInteger("gHUDMargin_T", 0);
|
||||
s16 Left_HUD_Margin = CVarGetInteger("gHUDMargin_L", 0);
|
||||
s16 Right_HUD_Margin = CVarGetInteger("gHUDMargin_R", 0);
|
||||
s16 Bottom_HUD_Margin = CVarGetInteger("gHUDMargin_B", 0);
|
||||
s16 Top_HUD_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.T"), 0);
|
||||
s16 Left_HUD_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.L"), 0);
|
||||
s16 Right_HUD_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.R"), 0);
|
||||
s16 Bottom_HUD_Margin = CVarGetInteger(CVAR_COSMETIC("HUD.Margin.B"), 0);
|
||||
|
||||
s16 X_Margins_CL;
|
||||
s16 X_Margins_CR;
|
||||
@ -873,36 +873,36 @@ void KaleidoScope_UpdateItemEquip(PlayState* play) {
|
||||
s16 Y_Margins_BtnB;
|
||||
s16 X_Margins_DPad_Items;
|
||||
s16 Y_Margins_DPad_Items;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("BButton.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("BButton.PosType"), 0) == 0) {X_Margins_BtnB = Right_HUD_Margin;};
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.BButton.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.BButton.PosType"), 0) == 0) {X_Margins_BtnB = Right_HUD_Margin;};
|
||||
Y_Margins_BtnB = (Top_HUD_Margin*-1);
|
||||
} else {
|
||||
X_Margins_BtnB = 0;
|
||||
Y_Margins_BtnB = 0;
|
||||
}
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CLeftButton.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CLeftButton.PosType"), 0) == 0) {X_Margins_CL = Right_HUD_Margin;};
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.PosType"), 0) == 0) {X_Margins_CL = Right_HUD_Margin;};
|
||||
Y_Margins_CL = (Top_HUD_Margin*-1);
|
||||
} else {
|
||||
X_Margins_CL = 0;
|
||||
Y_Margins_CL = 0;
|
||||
}
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CRightButton.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CRightButton.PosType"), 0) == 0) {X_Margins_CR = Right_HUD_Margin;};
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.PosType"), 0) == 0) {X_Margins_CR = Right_HUD_Margin;};
|
||||
Y_Margins_CR = (Top_HUD_Margin*-1);
|
||||
} else {
|
||||
X_Margins_CR = 0;
|
||||
Y_Margins_CR = 0;
|
||||
}
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CDownButton.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CDownButton.PosType"), 0) == 0) {X_Margins_CD = Right_HUD_Margin;};
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.PosType"), 0) == 0) {X_Margins_CD = Right_HUD_Margin;};
|
||||
Y_Margins_CD = (Top_HUD_Margin*-1);
|
||||
} else {
|
||||
X_Margins_CD = 0;
|
||||
Y_Margins_CD = 0;
|
||||
}
|
||||
if (CVarGetInteger("gDPadUseMargins", 0) != 0) {
|
||||
if (CVarGetInteger("gDPadPosType", 0) == 0) {X_Margins_DPad_Items = Right_HUD_Margin;};
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.UseMargins"), 0) != 0) {
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosType"), 0) == 0) {X_Margins_DPad_Items = Right_HUD_Margin;};
|
||||
Y_Margins_DPad_Items = (Top_HUD_Margin*-1);
|
||||
} else {
|
||||
X_Margins_DPad_Items = 0;
|
||||
@ -925,28 +925,28 @@ void KaleidoScope_UpdateItemEquip(PlayState* play) {
|
||||
}; //(X,Y) Used with custom position to place it properly.
|
||||
|
||||
//DPadItems
|
||||
if (CVarGetInteger("gDPadPosType", 0) != 0) {
|
||||
sCButtonPosY[3] = CVarGetInteger("gDPadPosY", 0)+Y_Margins_DPad_Items+DPad_ItemsOffset[0][1];//Up
|
||||
sCButtonPosY[4] = CVarGetInteger("gDPadPosY", 0)+Y_Margins_DPad_Items+DPad_ItemsOffset[1][1];//Down
|
||||
sCButtonPosY[5] = CVarGetInteger("gDPadPosY", 0)+Y_Margins_DPad_Items+DPad_ItemsOffset[2][1];//Left
|
||||
sCButtonPosY[6] = CVarGetInteger("gDPadPosY", 0)+Y_Margins_DPad_Items+DPad_ItemsOffset[3][1];//Right
|
||||
if (CVarGetInteger("gDPadPosType", 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger("gDPadUseMargins", 0) != 0) {X_Margins_DPad_Items = Left_HUD_Margin;};
|
||||
sCButtonPosX[3] = OTRGetDimensionFromLeftEdge(CVarGetInteger("gDPadPosX", 0)+X_Margins_DPad_Items+DPad_ItemsOffset[0][0]);
|
||||
sCButtonPosX[4] = OTRGetDimensionFromLeftEdge(CVarGetInteger("gDPadPosX", 0)+X_Margins_DPad_Items+DPad_ItemsOffset[1][0]);
|
||||
sCButtonPosX[5] = OTRGetDimensionFromLeftEdge(CVarGetInteger("gDPadPosX", 0)+X_Margins_DPad_Items+DPad_ItemsOffset[2][0]);
|
||||
sCButtonPosX[6] = OTRGetDimensionFromLeftEdge(CVarGetInteger("gDPadPosX", 0)+X_Margins_DPad_Items+DPad_ItemsOffset[3][0]);
|
||||
} else if (CVarGetInteger("gDPadPosType", 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger("gDPadUseMargins", 0) != 0) {X_Margins_DPad_Items = Right_HUD_Margin;};
|
||||
sCButtonPosX[3] = OTRGetDimensionFromRightEdge(CVarGetInteger("gDPadPosX", 0)+X_Margins_DPad_Items+DPad_ItemsOffset[0][0]);
|
||||
sCButtonPosX[4] = OTRGetDimensionFromRightEdge(CVarGetInteger("gDPadPosX", 0)+X_Margins_DPad_Items+DPad_ItemsOffset[1][0]);
|
||||
sCButtonPosX[5] = OTRGetDimensionFromRightEdge(CVarGetInteger("gDPadPosX", 0)+X_Margins_DPad_Items+DPad_ItemsOffset[2][0]);
|
||||
sCButtonPosX[6] = OTRGetDimensionFromRightEdge(CVarGetInteger("gDPadPosX", 0)+X_Margins_DPad_Items+DPad_ItemsOffset[3][0]);
|
||||
} else if (CVarGetInteger("gDPadPosType", 0) == 3) {//Anchor None
|
||||
sCButtonPosX[3] = CVarGetInteger("gDPadPosX", 0)+DPad_ItemsOffset[0][0];
|
||||
sCButtonPosX[4] = CVarGetInteger("gDPadPosX", 0)+DPad_ItemsOffset[1][0];
|
||||
sCButtonPosX[5] = CVarGetInteger("gDPadPosX", 0)+DPad_ItemsOffset[2][0];
|
||||
sCButtonPosX[6] = CVarGetInteger("gDPadPosX", 0)+DPad_ItemsOffset[3][0];
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosType"), 0) != 0) {
|
||||
sCButtonPosY[3] = CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosY"), 0)+Y_Margins_DPad_Items+DPad_ItemsOffset[0][1];//Up
|
||||
sCButtonPosY[4] = CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosY"), 0)+Y_Margins_DPad_Items+DPad_ItemsOffset[1][1];//Down
|
||||
sCButtonPosY[5] = CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosY"), 0)+Y_Margins_DPad_Items+DPad_ItemsOffset[2][1];//Left
|
||||
sCButtonPosY[6] = CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosY"), 0)+Y_Margins_DPad_Items+DPad_ItemsOffset[3][1];//Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosType"), 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.UseMargins"), 0) != 0) {X_Margins_DPad_Items = Left_HUD_Margin;};
|
||||
sCButtonPosX[3] = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosX"), 0)+X_Margins_DPad_Items+DPad_ItemsOffset[0][0]);
|
||||
sCButtonPosX[4] = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosX"), 0)+X_Margins_DPad_Items+DPad_ItemsOffset[1][0]);
|
||||
sCButtonPosX[5] = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosX"), 0)+X_Margins_DPad_Items+DPad_ItemsOffset[2][0]);
|
||||
sCButtonPosX[6] = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosX"), 0)+X_Margins_DPad_Items+DPad_ItemsOffset[3][0]);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosType"), 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.UseMargins"), 0) != 0) {X_Margins_DPad_Items = Right_HUD_Margin;};
|
||||
sCButtonPosX[3] = OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosX"), 0)+X_Margins_DPad_Items+DPad_ItemsOffset[0][0]);
|
||||
sCButtonPosX[4] = OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosX"), 0)+X_Margins_DPad_Items+DPad_ItemsOffset[1][0]);
|
||||
sCButtonPosX[5] = OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosX"), 0)+X_Margins_DPad_Items+DPad_ItemsOffset[2][0]);
|
||||
sCButtonPosX[6] = OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosX"), 0)+X_Margins_DPad_Items+DPad_ItemsOffset[3][0]);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosType"), 0) == 3) {//Anchor None
|
||||
sCButtonPosX[3] = CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosX"), 0)+DPad_ItemsOffset[0][0];
|
||||
sCButtonPosX[4] = CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosX"), 0)+DPad_ItemsOffset[1][0];
|
||||
sCButtonPosX[5] = CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosX"), 0)+DPad_ItemsOffset[2][0];
|
||||
sCButtonPosX[6] = CVarGetInteger(CVAR_COSMETIC("HUD.Dpad.PosX"), 0)+DPad_ItemsOffset[3][0];
|
||||
}
|
||||
} else {
|
||||
sCButtonPosX[3] = OTRGetDimensionFromRightEdge(ItemIconPos_ori[3][0]);
|
||||
@ -959,48 +959,48 @@ void KaleidoScope_UpdateItemEquip(PlayState* play) {
|
||||
sCButtonPosY[6] = ItemIconPos_ori[6][1];
|
||||
}
|
||||
//C button Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CLeftButton.PosType"), 0) != 0) {
|
||||
sCButtonPosY[0] = CVarGetInteger(CVAR_COSMETIC("CLeftButton.PosY"), 0)+Y_Margins_CL;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CLeftButton.PosType"), 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CLeftButton.UseMargins"), 0) != 0) {X_Margins_CL = Left_HUD_Margin;};
|
||||
sCButtonPosX[0] = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("CLeftButton.PosX"), 0)+X_Margins_CL);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("CLeftButton.PosType"), 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CLeftButton.UseMargins"), 0) != 0) {X_Margins_CL = Right_HUD_Margin;};
|
||||
sCButtonPosX[0] = OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("CLeftButton.PosX"), 0)+X_Margins_CL);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("CLeftButton.PosType"), 0) == 3) {//Anchor None
|
||||
sCButtonPosX[0] = CVarGetInteger(CVAR_COSMETIC("CLeftButton.PosX"), 0);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.PosType"), 0) != 0) {
|
||||
sCButtonPosY[0] = CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.PosY"), 0)+Y_Margins_CL;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.PosType"), 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.UseMargins"), 0) != 0) {X_Margins_CL = Left_HUD_Margin;};
|
||||
sCButtonPosX[0] = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.PosX"), 0)+X_Margins_CL);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.PosType"), 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.UseMargins"), 0) != 0) {X_Margins_CL = Right_HUD_Margin;};
|
||||
sCButtonPosX[0] = OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.PosX"), 0)+X_Margins_CL);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.PosType"), 0) == 3) {//Anchor None
|
||||
sCButtonPosX[0] = CVarGetInteger(CVAR_COSMETIC("HUD.CLeftButton.PosX"), 0);
|
||||
}
|
||||
} else {
|
||||
sCButtonPosX[0] = OTRGetRectDimensionFromRightEdge(ItemIconPos_ori[0][0]);
|
||||
sCButtonPosY[0] = ItemIconPos_ori[0][1];
|
||||
}
|
||||
//C Button down
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CDownButton.PosType"), 0) != 0) {
|
||||
sCButtonPosY[1] = CVarGetInteger(CVAR_COSMETIC("CDownButton.PosY"), 0)+Y_Margins_CD;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CDownButton.PosType"), 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CDownButton.UseMargins"), 0) != 0) {X_Margins_CD = Left_HUD_Margin;};
|
||||
sCButtonPosX[1] = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("CDownButton.PosX"), 0)+X_Margins_CD);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("CDownButton.PosType"), 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CDownButton.UseMargins"), 0) != 0) {X_Margins_CD = Right_HUD_Margin;};
|
||||
sCButtonPosX[1] = OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("CDownButton.PosX"), 0)+X_Margins_CD);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("CDownButton.PosType"), 0) == 3) {//Anchor None
|
||||
sCButtonPosX[1] = CVarGetInteger(CVAR_COSMETIC("CDownButton.PosX"), 0);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.PosType"), 0) != 0) {
|
||||
sCButtonPosY[1] = CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.PosY"), 0)+Y_Margins_CD;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.PosType"), 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.UseMargins"), 0) != 0) {X_Margins_CD = Left_HUD_Margin;};
|
||||
sCButtonPosX[1] = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.PosX"), 0)+X_Margins_CD);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.PosType"), 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.UseMargins"), 0) != 0) {X_Margins_CD = Right_HUD_Margin;};
|
||||
sCButtonPosX[1] = OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.PosX"), 0)+X_Margins_CD);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.PosType"), 0) == 3) {//Anchor None
|
||||
sCButtonPosX[1] = CVarGetInteger(CVAR_COSMETIC("HUD.CDownButton.PosX"), 0);
|
||||
}
|
||||
} else {
|
||||
sCButtonPosX[1] = OTRGetRectDimensionFromRightEdge(ItemIconPos_ori[1][0]);
|
||||
sCButtonPosY[1] = ItemIconPos_ori[1][1];
|
||||
}
|
||||
//C button Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CRightButton.PosType"), 0) != 0) {
|
||||
sCButtonPosY[2] = CVarGetInteger(CVAR_COSMETIC("CRightButton.PosY"), 0)+Y_Margins_CR;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CRightButton.PosType"), 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CRightButton.UseMargins"), 0) != 0) {X_Margins_CR = Left_HUD_Margin;};
|
||||
sCButtonPosX[2] = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("CRightButton.PosX"), 0)+X_Margins_CR);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("CRightButton.PosType"), 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("CRightButton.UseMargins"), 0) != 0) {X_Margins_CR = Right_HUD_Margin;};
|
||||
sCButtonPosX[2] = OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("CRightButton.PosX"), 0)+X_Margins_CR);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("CRightButton.PosType"), 0) == 3) {//Anchor None
|
||||
sCButtonPosX[2] = CVarGetInteger(CVAR_COSMETIC("CRightButton.PosX"), 0);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.PosType"), 0) != 0) {
|
||||
sCButtonPosY[2] = CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.PosY"), 0)+Y_Margins_CR;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.PosType"), 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.UseMargins"), 0) != 0) {X_Margins_CR = Left_HUD_Margin;};
|
||||
sCButtonPosX[2] = OTRGetDimensionFromLeftEdge(CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.PosX"), 0)+X_Margins_CR);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.PosType"), 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.UseMargins"), 0) != 0) {X_Margins_CR = Right_HUD_Margin;};
|
||||
sCButtonPosX[2] = OTRGetDimensionFromRightEdge(CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.PosX"), 0)+X_Margins_CR);
|
||||
} else if (CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.PosType"), 0) == 3) {//Anchor None
|
||||
sCButtonPosX[2] = CVarGetInteger(CVAR_COSMETIC("HUD.CRightButton.PosX"), 0);
|
||||
}
|
||||
} else {
|
||||
sCButtonPosX[2] = OTRGetRectDimensionFromRightEdge(ItemIconPos_ori[2][0]);
|
||||
|
@ -54,7 +54,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
s16 stepG;
|
||||
s16 stepB;
|
||||
u16 rgba16;
|
||||
bool dpad = CVarGetInteger("gDpadPause", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0);
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
@ -347,7 +347,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
gDPLoadTLUT_pal16(POLY_KAL_DISP++, 0, interfaceCtx->mapPalettesPulse[palettePulseIdx]);
|
||||
gDPSetTextureLUT(POLY_KAL_DISP++, G_TT_RGBA16);
|
||||
|
||||
u8 mirroredWorld = CVarGetInteger("gMirroredWorld", 0);
|
||||
u8 mirroredWorld = CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0);
|
||||
u8 mirrorMode = mirroredWorld ? G_TX_MIRROR : G_TX_NOMIRROR;
|
||||
// Offset the U value of each vertex to be in the mirror boundary for the map textures
|
||||
if (mirroredWorld) {
|
||||
@ -443,8 +443,8 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
s16 stepR;
|
||||
s16 stepG;
|
||||
s16 stepB;
|
||||
bool dpad = CVarGetInteger("gDpadPause", 0);
|
||||
u8 mirroredWorld = CVarGetInteger("gMirroredWorld", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0);
|
||||
u8 mirroredWorld = CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0);
|
||||
u8 mirrorMode = mirroredWorld ? G_TX_MIRROR : G_TX_NOMIRROR;
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
@ -7,7 +7,7 @@ void KaleidoScope_UpdatePrompt(PlayState* play) {
|
||||
Input* input = &play->state.input[0];
|
||||
s8 relStickX = input->rel.stick_x;
|
||||
s16 step;
|
||||
bool dpad = CVarGetInteger("gDpadPause", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0);
|
||||
|
||||
if (((pauseCtx->state == 7) && (pauseCtx->unk_1EC == 1)) || (pauseCtx->state == 0xE) || (pauseCtx->state == 0x10)) {
|
||||
if ((pauseCtx->promptChoice == 0) && ((relStickX >= 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)))) {
|
||||
|
@ -945,7 +945,7 @@ Gfx* KaleidoScope_QuadTextureIA4(Gfx* gfx, void* texture, s16 width, s16 height,
|
||||
}
|
||||
|
||||
Gfx* KaleidoScope_QuadTextureIA8(Gfx* gfx, void* texture, s16 width, s16 height, u16 point) {
|
||||
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(gfx++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, mirrorMode | G_TX_WRAP,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSP1Quadrangle(gfx++, point, point + 2, point + 3, point + 1, 0);
|
||||
@ -1099,7 +1099,7 @@ void KaleidoScope_HandlePageToggles(PauseContext* pauseCtx, Input* input) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool dpad = CVarGetInteger("gDpadPause", 0);
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0);
|
||||
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->cur.button, BTN_DLEFT))) {
|
||||
pauseCtx->pageSwitchTimer++;
|
||||
@ -1273,7 +1273,7 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gDpadHoldChange", 1) && CVarGetInteger("gDpadPause", 0)) {
|
||||
if (CVarGetInteger(CVAR_SETTING("DpadHoldChange"), 1) && CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0)) {
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DLEFT)) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
D_8082AD44 = XREG(8);
|
||||
@ -2061,8 +2061,8 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
||||
}
|
||||
} else {
|
||||
bool pauseAnyCursor =
|
||||
(CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && IS_RANDO) ||
|
||||
(CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_ALWAYS_ON);
|
||||
(CVarGetInteger(CVAR_SETTING("PauseAnyCursor"), 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && IS_RANDO) ||
|
||||
(CVarGetInteger(CVAR_SETTING("PauseAnyCursor"), 0) == PAUSE_ANY_CURSOR_ALWAYS_ON);
|
||||
if (!pauseCtx->pageIndex && (!pauseAnyCursor || (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE))) { // pageIndex == PAUSE_ITEM
|
||||
pauseCtx->infoPanelVtx[16].v.ob[0] = pauseCtx->infoPanelVtx[18].v.ob[0] =
|
||||
WREG(49 + gSaveContext.language);
|
||||
@ -2199,8 +2199,8 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
||||
void KaleidoScope_UpdateNamePanel(PlayState* play) {
|
||||
PauseContext* pauseCtx = &play->pauseCtx;
|
||||
u16 sp2A;
|
||||
bool pauseAnyCursor = (CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && IS_RANDO) ||
|
||||
(CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_ALWAYS_ON);
|
||||
bool pauseAnyCursor = (CVarGetInteger(CVAR_SETTING("PauseAnyCursor"), 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && IS_RANDO) ||
|
||||
(CVarGetInteger(CVAR_SETTING("PauseAnyCursor"), 0) == PAUSE_ANY_CURSOR_ALWAYS_ON);
|
||||
|
||||
if ((pauseCtx->namedItem != pauseCtx->cursorItem[pauseCtx->pageIndex]) ||
|
||||
((pauseCtx->pageIndex == PAUSE_MAP) && (pauseCtx->cursorSpecialPos != 0))) {
|
||||
@ -2868,7 +2868,7 @@ void KaleidoScope_InitVertices(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
|
||||
for (phi_t3 = 1; phi_t3 < ARRAY_COUNT(gSaveContext.equips.buttonItems); phi_t3++, phi_t2 += 4) {
|
||||
if (gSaveContext.equips.cButtonSlots[phi_t3 - 1] != ITEM_NONE &&
|
||||
((phi_t3 < 4) || CVarGetInteger("gDpadEquips", 0))) {
|
||||
((phi_t3 < 4) || CVarGetInteger(CVAR_SETTING("DpadEquips"), 0))) {
|
||||
phi_t4 = gSaveContext.equips.cButtonSlots[phi_t3 - 1] * 4;
|
||||
|
||||
pauseCtx->itemVtx[phi_t2 + 0].v.ob[0] = pauseCtx->itemVtx[phi_t2 + 2].v.ob[0] =
|
||||
@ -3267,7 +3267,7 @@ void KaleidoScope_Draw(PlayState* play) {
|
||||
func_800AAA50(&play->view, 15);
|
||||
|
||||
// Flip the OPA and XLU projections again as the set view call above reset the original flips from z_play
|
||||
if (CVarGetInteger("gMirroredWorld", 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0)) {
|
||||
gSPMatrix(POLY_OPA_DISP++, play->view.projectionFlippedPtr, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPMatrix(POLY_XLU_DISP++, play->view.projectionFlippedPtr, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPMatrix(POLY_OPA_DISP++, play->view.viewingPtr, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
|
||||
@ -3996,7 +3996,7 @@ void KaleidoScope_Update(PlayState* play)
|
||||
(CHECK_BTN_ALL(input->press.button, BTN_B) && IS_BOSS_RUSH)) {
|
||||
if (CVarGetInteger(CVAR_CHEAT("EasyPauseBuffer"), 0) || CVarGetInteger(CVAR_CHEAT("EasyInputBuffer"), 0)) {
|
||||
// Easy pause buffer is 13 frames, 12 for kaledio to end, and one more to advance a single frame
|
||||
CVarSetInteger("gCheatEasyPauseBufferTimer", 13);
|
||||
CVarSetInteger(CVAR_GENERAL("CheatEasyPauseBufferTimer"), 13);
|
||||
}
|
||||
Interface_SetDoAction(play, DO_ACTION_NONE);
|
||||
pauseCtx->state = 0x12;
|
||||
@ -4560,7 +4560,7 @@ void KaleidoScope_Update(PlayState* play)
|
||||
R_UPDATE_RATE = 3;
|
||||
R_PAUSE_MENU_MODE = 0;
|
||||
|
||||
CVarSetInteger("gPauseTriforce", 0);
|
||||
CVarSetInteger(CVAR_GENERAL("PauseTriforce"), 0);
|
||||
|
||||
func_800981B8(&play->objectCtx);
|
||||
func_800418D0(&play->colCtx, play);
|
||||
|
@ -132,7 +132,7 @@ void PauseMapMark_DrawForDungeon(PlayState* play) {
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
// Compute the offset to mirror icons over the map center (48) as an axis line
|
||||
s16 mirrorOffset = CVarGetInteger("gMirroredWorld", 0) ? mirrorOffset = (48 - markPoint->x) * 2 + 1 : 0;
|
||||
s16 mirrorOffset = CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? mirrorOffset = (48 - markPoint->x) * 2 + 1 : 0;
|
||||
|
||||
Matrix_Push();
|
||||
Matrix_Translate(GREG(92) + markPoint->x + mirrorOffset, GREG(93) + markPoint->y, 0.0f, MTXMODE_APPLY);
|
||||
|
Loading…
Reference in New Issue
Block a user