Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
2b5cb77
Ported "cvar_prefixes.h" Header file from SoH.
Glought Nov 9, 2025
cac6fee
Changed code that uses "gCosmetics." to the "CVAR_COSMETIC" macro.
Glought Nov 8, 2025
c455b41
Removed Redundant "CVAR_AUDIO" macro.
Glought Nov 23, 2025
389fb8b
Changed code that uses "gCheats." to the "CVAR_CHEAT" macro.
Glought Nov 8, 2025
f483af2
Changed code that uses "gEnhancements." to the "CVAR_ENHANCEMENT" macro.
Glought Nov 8, 2025
0fa4f1b
Changed code that uses "gSettings." to the "CVAR_SETTING" macro.
Glought Nov 8, 2025
a6fefa1
Changed code that uses "gWindows." to the "CVAR_WINDOW" macro.
Glought Nov 8, 2025
cb409e2
Changed code that uses "gDeveloperTools." to the "CVAR_DEVELOPER_TOOL…
Glought Nov 8, 2025
3dc939f
Added "CVAR_PREFIX_RANDOMIZER" macro to "2ship-cvars.cmake"
Glought Nov 8, 2025
8761b84
Removed "CFG_TRACKER_ITEM" macro in "ItemTracker.cpp".
Glought Nov 9, 2025
1cf60fe
Changed code that used the "CVAR_RANDOMIZER" macro to the
Glought Nov 9, 2025
1132591
Changed code that uses "gModes." to the "CVAR_ENHANCEMENT("Modes.*")"
Glought Nov 8, 2025
acdffbb
Changed code that uses "gFixes" to the "CVAR_ENHANCEMENT("Fixes.*")"
Glought Nov 8, 2025
2744f92
Updated PresetManager to reflect changes to "gFixes", "gModes",
Glought Nov 9, 2025
e3b5634
Changed Code the uses "CVAR_PREFIX_ADVANCED_RESOLUTION" to
Glought Nov 9, 2025
dabe5b0
Ran Clang Format
Glought Nov 8, 2025
90a61c8
Changed code that uses "gCollisionViewer." to the "CVAR_DEVELOPER_TOO…
Glought Nov 9, 2025
5ec0ed9
Changed code that uses "gEventLog." to the "CVAR_DEVELOPER_TOOLS("Eve…
Glought Nov 9, 2025
25db9cc
Added "#include "2s2h/cvar_prefixes.h"" to all files that uses a
Glought Nov 9, 2025
ca58f76
Added "CVAR_TRACKER_TIMESPLITS" macro.
Glought Nov 9, 2025
1e1925b
Changed code that used "gNotifications." to use the
Glought Nov 9, 2025
fd382fa
Changed code the used "gDisplayOverlay." to use the
Glought Nov 9, 2025
a49691d
Changed code that used "gInterpolationFPS" to use the
Glought Nov 9, 2025
5732ba6
Changed code that used "gMatchRefreshRate" to use the
Glought Nov 9, 2025
f5650f4
Ran Clang Format
Glought Nov 9, 2025
c04e966
Updated PresetManager to reflect changes to "gCollisionViewer",
Glought Nov 9, 2025
0427dcc
Ported "ConfigUpdater" from SoH.
Glought Nov 11, 2025
0d31dc8
Changed code that used "gAudioEditor.*" to use the
Glought Nov 28, 2025
8273e48
Changed code that used "gEnhancements.*" to use the
Glought Nov 28, 2025
983d232
Changed code that used "gDeveloperTools.*" to use the
Glought Nov 28, 2025
20a62d1
Changed code that used "gSettings.ItemTracker.*" to use the
Glought Nov 28, 2025
3694bb8
Changed code that used "gWindows.*" to use the
Glought Nov 28, 2025
518994d
Changed code that used "gSettings.*" to use the
Glought Nov 28, 2025
97ac85d
Add "#define CVAR_INPUT_VIEWER(var) "gInputViewer." var" to
Glought Nov 28, 2025
49f3fb0
Ran Clang Format
Glought Nov 28, 2025
2027043
Updated the new CVARs from the latest Commits as of 12-3-25 to use the
Glought Dec 3, 2025
245c6dc
Updated the new CVARs from the latest Commits as of 12-27-25 to use the
Glought Dec 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions CMake/2ship-cvars.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
set(CVAR_PREFIX_RANDOMIZER_ENHANCEMENT "gRandoEnhancements")
set(CVAR_PREFIX_RANDOMIZER_SETTING "gRandoSettings")
set(CVAR_PREFIX_RANDOMIZER "gRando")
set(CVAR_PREFIX_COSMETIC "gCosmetics")
set(CVAR_PREFIX_AUDIO "gAudioEditor")
set(CVAR_PREFIX_CHEAT "gCheats")
Expand All @@ -10,9 +9,10 @@ set(CVAR_PREFIX_TRACKER "gTrackers")
set(CVAR_PREFIX_DEVELOPER_TOOLS "gDeveloperTools")
set(CVAR_PREFIX_GENERAL "gGeneral")
set(CVAR_PREFIX_REMOTE "gRemote")
set(CVAR_PREFIX_GAMEPLAY_STATS "gGameplayStats")
set(CVAR_PREFIX_TIME_DISPLAY "gTimeDisplay")
add_compile_definitions(
CVAR_PREFIX_RANDOMIZER_ENHANCEMENT="${CVAR_PREFIX_RANDOMIZER_ENHANCEMENT}"
CVAR_PREFIX_RANDOMIZER_SETTING="${CVAR_PREFIX_RANDOMIZER_SETTING}"
CVAR_PREFIX_RANDOMIZER="${CVAR_PREFIX_RANDOMIZER}"
CVAR_PREFIX_COSMETIC="${CVAR_PREFIX_COSMETIC}"
CVAR_PREFIX_AUDIO="${CVAR_PREFIX_AUDIO}"
CVAR_PREFIX_CHEAT="${CVAR_PREFIX_CHEAT}"
Expand All @@ -23,4 +23,6 @@ add_compile_definitions(
CVAR_PREFIX_DEVELOPER_TOOLS="${CVAR_PREFIX_DEVELOPER_TOOLS}"
CVAR_PREFIX_GENERAL="${CVAR_PREFIX_GENERAL}"
CVAR_PREFIX_REMOTE="${CVAR_PREFIX_REMOTE}"
CVAR_PREFIX_GAMEPLAY_STATS="${CVAR_PREFIX_GAMEPLAY_STATS}"
CVAR_PREFIX_TIME_DISPLAY="${CVAR_PREFIX_TIME_DISPLAY}"
)
48 changes: 25 additions & 23 deletions mm/2s2h/BenGui/BenGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "CosmeticEditor.h"
#include "Notification.h"
#include "2s2h/Rando/CheckTracker/CheckTracker.h"
#include "2s2h/cvar_prefixes.h"

#ifdef __APPLE__
#include <fast/backends/gfx_metal.h>
Expand Down Expand Up @@ -83,15 +84,15 @@ void SetupGuiElements() {
mBenMenuBar = std::make_shared<BenMenuBar>(CVAR_MENU_BAR_OPEN, CVarGetInteger(CVAR_MENU_BAR_OPEN, 0));
gui->SetMenuBar(std::reinterpret_pointer_cast<Ship::GuiMenuBar>(mBenMenuBar));

if (!gui->GetMenuBar() && !CVarGetInteger("gSettings.DisableMenuShortcutNotify", 0)) {
if (!gui->GetMenuBar() && !CVarGetInteger(CVAR_SETTING("DisableMenuShortcutNotify"), 0)) {
#if defined(__SWITCH__) || defined(__WIIU__)
gui->GetGameOverlay()->TextDrawNotification(30.0f, true, "Press - to access enhancements menu");
#else
gui->GetGameOverlay()->TextDrawNotification(30.0f, true, "Press F1 to access enhancements menu");
#endif
}

mBenMenu = std::make_shared<BenMenu>("gWindows.Menu", "Settings Menu");
mBenMenu = std::make_shared<BenMenu>(CVAR_WINDOW("Menu"), "Settings Menu");
gui->SetMenu(mBenMenu);

mStatsWindow = gui->GetGuiWindow("Stats");
Expand All @@ -115,73 +116,74 @@ void SetupGuiElements() {
}

mHookDebuggerWindow =
std::make_shared<HookDebuggerWindow>("gWindows.HookDebugger", "Hook Debugger", ImVec2(480, 600));
std::make_shared<HookDebuggerWindow>(CVAR_WINDOW("HookDebugger"), "Hook Debugger", ImVec2(480, 600));
gui->AddGuiWindow(mHookDebuggerWindow);

mSaveEditorWindow = std::make_shared<SaveEditorWindow>("gWindows.SaveEditor", "Save Editor", ImVec2(480, 600));
mSaveEditorWindow = std::make_shared<SaveEditorWindow>(CVAR_WINDOW("SaveEditor"), "Save Editor", ImVec2(480, 600));
gui->AddGuiWindow(mSaveEditorWindow);

mHudEditorWindow = std::make_shared<HudEditorWindow>("gWindows.HudEditor", "HUD Editor", ImVec2(480, 600));
mHudEditorWindow = std::make_shared<HudEditorWindow>(CVAR_WINDOW("HudEditor"), "HUD Editor", ImVec2(480, 600));
gui->AddGuiWindow(mHudEditorWindow);

mCosmeticEditorWindow =
std::make_shared<CosmeticEditorWindow>("gWindows.CosmeticEditor", "Cosmetic Editor", ImVec2(480, 600));
std::make_shared<CosmeticEditorWindow>(CVAR_WINDOW("CosmeticEditor"), "Cosmetic Editor", ImVec2(480, 600));
gui->AddGuiWindow(mCosmeticEditorWindow);

mActorViewerWindow = std::make_shared<ActorViewerWindow>("gWindows.ActorViewer", "Actor Viewer", ImVec2(520, 600));
mActorViewerWindow =
std::make_shared<ActorViewerWindow>(CVAR_WINDOW("ActorViewer"), "Actor Viewer", ImVec2(520, 600));
gui->AddGuiWindow(mActorViewerWindow);

mCollisionViewerWindow =
std::make_shared<CollisionViewerWindow>("gWindows.CollisionViewer", "Collision Viewer", ImVec2(390, 475));
std::make_shared<CollisionViewerWindow>(CVAR_WINDOW("CollisionViewer"), "Collision Viewer", ImVec2(390, 475));
gui->AddGuiWindow(mCollisionViewerWindow);

mEventLogWindow = std::make_shared<EventLogWindow>("gWindows.EventLog", "Event Log", ImVec2(520, 600));
mEventLogWindow = std::make_shared<EventLogWindow>(CVAR_WINDOW("EventLog"), "Event Log", ImVec2(520, 600));
gui->AddGuiWindow(mEventLogWindow);

mDLViewerWindow = std::make_shared<DLViewerWindow>("gWindows.DLViewer", "DL Viewer", ImVec2(520, 600));
mDLViewerWindow = std::make_shared<DLViewerWindow>(CVAR_WINDOW("DLViewer"), "DL Viewer", ImVec2(520, 600));
gui->AddGuiWindow(mDLViewerWindow);
mMessageViewerWindow =
std::make_shared<MessageViewerWindow>("gWindows.MessageViewer", "Message Viewer", ImVec2(520, 600));
std::make_shared<MessageViewerWindow>(CVAR_WINDOW("MessageViewer"), "Message Viewer", ImVec2(520, 600));
gui->AddGuiWindow(mMessageViewerWindow);

mAudioEditorWindow = std::make_shared<AudioEditor>("gWindows.AudioEditor", "Audio Editor", ImVec2(520, 600));
mAudioEditorWindow = std::make_shared<AudioEditor>(CVAR_WINDOW("AudioEditor"), "Audio Editor", ImVec2(520, 600));
gui->AddGuiWindow(mAudioEditorWindow);

mItemTrackerWindow = std::make_shared<ItemTrackerWindow>("gWindows.ItemTracker", "Item Tracker");
mItemTrackerWindow = std::make_shared<ItemTrackerWindow>(CVAR_WINDOW("ItemTracker"), "Item Tracker");
gui->AddGuiWindow(mItemTrackerWindow);

mItemTrackerSettingsWindow = std::make_shared<ItemTrackerSettingsWindow>("gWindows.ItemTrackerSettings",
mItemTrackerSettingsWindow = std::make_shared<ItemTrackerSettingsWindow>(CVAR_WINDOW("ItemTrackerSettings"),
"Item Tracker Settings", ImVec2(800, 400));
gui->AddGuiWindow(mItemTrackerSettingsWindow);

mDisplayOverlayWindow = std::make_shared<DisplayOverlayWindow>("gWindows.DisplayOverlay", "Display Overlay");
mDisplayOverlayWindow = std::make_shared<DisplayOverlayWindow>(CVAR_WINDOW("DisplayOverlay"), "Display Overlay");
gui->AddGuiWindow(mDisplayOverlayWindow);

mTimesplitsWindow = std::make_shared<TimesplitsWindow>("gWindows.Timesplits", "Time Splits Window");
mTimesplitsWindow = std::make_shared<TimesplitsWindow>(CVAR_WINDOW("Timesplits"), "Time Splits Window");
gui->AddGuiWindow(mTimesplitsWindow);

mTimesplitsSettingsWindow = std::make_shared<TimesplitsSettingsWindow>(
"gWindows.Timesplits.Settings", "Time Splits Settings Window", ImVec2(567, 97));
CVAR_WINDOW("Timesplits.Settings"), "Time Splits Settings Window", ImVec2(567, 97));
gui->AddGuiWindow(mTimesplitsSettingsWindow);

mNotificationWindow = std::make_shared<Notification::Window>("gWindows.Notifications", "Notifications Window");
mNotificationWindow = std::make_shared<Notification::Window>(CVAR_WINDOW("Notifications"), "Notifications Window");
gui->AddGuiWindow(mNotificationWindow);
mNotificationWindow->Show();

mRandoCheckTrackerWindow = std::make_shared<Rando::CheckTracker::CheckTrackerWindow>(
"gWindows.CheckTracker", "Check Tracker", ImVec2(375, 460));
CVAR_WINDOW("CheckTracker"), "Check Tracker", ImVec2(375, 460));
gui->AddGuiWindow(mRandoCheckTrackerWindow);

mRandoCheckTrackerSettingsWindow = std::make_shared<Rando::CheckTracker::SettingsWindow>(
"gWindows.CheckTrackerSettings", "Check Tracker Settings");
CVAR_WINDOW("CheckTrackerSettings"), "Check Tracker Settings");
gui->AddGuiWindow(mRandoCheckTrackerSettingsWindow);

mInputViewer = std::make_shared<InputViewer>("gWindows.InputViewer", "Input Viewer");
mInputViewer = std::make_shared<InputViewer>(CVAR_WINDOW("InputViewer"), "Input Viewer");
gui->AddGuiWindow(mInputViewer);
mInputViewerSettings = std::make_shared<InputViewerSettingsWindow>("gWindows.InputViewerSettings",
mInputViewerSettings = std::make_shared<InputViewerSettingsWindow>(CVAR_WINDOW("InputViewerSettings"),
"Input Viewer Settings", ImVec2(500, 525));
gui->AddGuiWindow(mInputViewerSettings);
mModalWindow = std::make_shared<BenModalWindow>("gWindows.ModalWindow", "Modal Window");
mModalWindow = std::make_shared<BenModalWindow>(CVAR_WINDOW("ModalWindow"), "Modal Window");
gui->AddGuiWindow(mModalWindow);
mModalWindow->Show();
}
Expand Down
20 changes: 10 additions & 10 deletions mm/2s2h/BenGui/BenInputEditorWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1205,28 +1205,28 @@ void BenInputEditorWindow::DrawModifierButtonsSection(uint8_t port) {
DrawButtonLine("M1", port, BTN_CUSTOM_MODIFIER1);
DrawButtonLine("M2", port, BTN_CUSTOM_MODIFIER2);

ImGui::BeginDisabled(CVarGetInteger("gSettings.DisableChanges", 0));
CVarCheckbox("Enable Speed Modifiers", "gSettings.SpeedModifier.Enable",
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
CVarCheckbox("Enable Speed Modifiers", CVAR_SETTING("SpeedModifier.Enable"),
CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip("Hold the assigned button to change the maximum walking or swimming speed."));
if (CVarGetInteger("gSettings.SpeedModifier.Enable", 0)) {
if (CVarGetInteger(CVAR_SETTING("SpeedModifier.Enable"), 0)) {
UIWidgets::Spacer(5);
Ship::GuiWindow::BeginGroupPanel("Speed Modifier", ImGui::GetContentRegionAvail());
CVarCheckbox("Toggle modifier instead of holding", "gSettings.SpeedModifier.Toggle",
CVarCheckbox("Toggle modifier instead of holding", CVAR_SETTING("SpeedModifier.Toggle"),
CheckboxOptions().Color(THEME_COLOR));
Ship::GuiWindow::BeginGroupPanel("Walk Modifier", ImGui::GetContentRegionAvail());
CVarCheckbox("Enable Walk Speed Modifier", "gSettings.SpeedModifier.WalkEnable",
CVarCheckbox("Enable Walk Speed Modifier", CVAR_SETTING("SpeedModifier.WalkEnable"),
CheckboxOptions().Color(THEME_COLOR));
CVarSliderFloat("Walk Modifier 1: %.0f %%", "gSettings.SpeedModifier.WalkMapping1",
CVarSliderFloat("Walk Modifier 1: %.0f %%", CVAR_SETTING("SpeedModifier.WalkMapping1"),
FloatSliderOptions()
.Color(THEME_COLOR)
.IsPercentage()
.Min(0.0f)
.Max(15.0f)
.DefaultValue(1.0f)
.ShowAdjustmentButtons(true));
CVarSliderFloat("Walk Modifier 2: %.0f %%", "gSettings.SpeedModifier.WalkMapping2",
CVarSliderFloat("Walk Modifier 2: %.0f %%", CVAR_SETTING("SpeedModifier.WalkMapping2"),
FloatSliderOptions()
.Color(THEME_COLOR)
.IsPercentage()
Expand All @@ -1236,17 +1236,17 @@ void BenInputEditorWindow::DrawModifierButtonsSection(uint8_t port) {
.ShowAdjustmentButtons(true));
Ship::GuiWindow::EndGroupPanel(0);
Ship::GuiWindow::BeginGroupPanel("Swim Modifier", ImGui::GetContentRegionAvail());
CVarCheckbox("Enable Swim Speed Modifier", "gSettings.SpeedModifier.SwimEnable",
CVarCheckbox("Enable Swim Speed Modifier", CVAR_SETTING("SpeedModifier.SwimEnable"),
CheckboxOptions().Color(THEME_COLOR));
CVarSliderFloat("Swim Modifier 1: %.0f %%", "gSettings.SpeedModifier.SwimMapping1",
CVarSliderFloat("Swim Modifier 1: %.0f %%", CVAR_SETTING("SpeedModifier.SwimMapping1"),
FloatSliderOptions()
.Color(THEME_COLOR)
.IsPercentage()
.Min(0.0f)
.Max(8.75f)
.DefaultValue(1.0f)
.ShowAdjustmentButtons(true));
CVarSliderFloat("Swim Modifier 2: %.0f %%", "gSettings.SpeedModifier.SwimMapping2",
CVarSliderFloat("Swim Modifier 2: %.0f %%", CVAR_SETTING("SpeedModifier.SwimMapping2"),
FloatSliderOptions()
.Color(THEME_COLOR)
.IsPercentage()
Expand Down
Loading
Loading