summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorGarrett Cox <garrettjcox@gmail.com>2026-07-08 00:37:02 -0500
committerGitHub <noreply@github.com>2026-07-08 00:37:02 -0500
commit8061b4443fcc242454dd6efe1fd93f491bbc5f5d (patch)
treedfa7eb2d229e0dae6b18317c2c804a4da923160c /mm
parente07b6f7317716d30ab76184c96804e57a25820a1 (diff)
parent1a0e91f04dc452b96220e29ed2561a1146625987 (diff)
Merge pull request #1782 from garrettjoecox/house-keeping
Various house-keeping tweaks
Diffstat (limited to 'mm')
-rw-r--r--mm/2s2h/BenGui/BenMenu.cpp2
-rw-r--r--mm/2s2h/BenPort.cpp4
-rw-r--r--mm/2s2h/DeveloperTools/DeveloperTools.cpp10
-rw-r--r--mm/2s2h/Enhancements/Trackers/TimeSplits/TimeSplitsActions.cpp8
-rw-r--r--mm/2s2h/Rando/Spoiler/RefreshOptions.cpp4
-rw-r--r--mm/2s2h/config/ConfigUpdaters.cpp10
-rw-r--r--mm/2s2h/z_scene_2SH.cpp1
7 files changed, 15 insertions, 24 deletions
diff --git a/mm/2s2h/BenGui/BenMenu.cpp b/mm/2s2h/BenGui/BenMenu.cpp
index 15917f1a4..74e41861f 100644
--- a/mm/2s2h/BenGui/BenMenu.cpp
+++ b/mm/2s2h/BenGui/BenMenu.cpp
@@ -107,7 +107,7 @@ static const std::vector<const char*> debugSaveOptions = {
};
#ifdef _DEBUG
-DebugLogOption defaultLogLevel = DEBUG_LOG_TRACE;
+DebugLogOption defaultLogLevel = DEBUG_LOG_DEBUG;
#else
DebugLogOption defaultLogLevel = DEBUG_LOG_INFO;
#endif
diff --git a/mm/2s2h/BenPort.cpp b/mm/2s2h/BenPort.cpp
index d09c9c433..460b66f96 100644
--- a/mm/2s2h/BenPort.cpp
+++ b/mm/2s2h/BenPort.cpp
@@ -624,7 +624,7 @@ void OTRGlobals::Initialize() {
std::unordered_set<uint32_t> validHashes = { MM_NTSC_US_10, MM_NTSC_US_GC };
#if (_DEBUG)
- auto defaultLogLevel = spdlog::level::trace;
+ auto defaultLogLevel = spdlog::level::debug;
#else
auto defaultLogLevel = spdlog::level::info;
#endif
@@ -632,7 +632,7 @@ void OTRGlobals::Initialize() {
context->InitConsoleVariables();
auto logLevel = static_cast<spdlog::level::level_enum>(CVarGetInteger("gDeveloperTools.LogLevel", defaultLogLevel));
context->InitLogging(logLevel, logLevel);
- Ship::Context::GetInstance()->GetLogger()->set_pattern("[%H:%M:%S.%e] [%s:%#] [%l] %v");
+ Ship::Context::GetInstance()->GetLogger()->set_pattern("[%H:%M:%S.%e] [%s:%#] [%^%l%$] %v");
context->InitGfxDebugger();
context->InitFileDropMgr();
diff --git a/mm/2s2h/DeveloperTools/DeveloperTools.cpp b/mm/2s2h/DeveloperTools/DeveloperTools.cpp
index 8cd632cef..3b650b772 100644
--- a/mm/2s2h/DeveloperTools/DeveloperTools.cpp
+++ b/mm/2s2h/DeveloperTools/DeveloperTools.cpp
@@ -149,11 +149,11 @@ void RegisterPreventActorInitHooks() {
void RegisterDebugMode() {
// Disable various debug options when toggled off
if (!CVAR_DEBUG_MODE) {
- CVarSetInteger(CVAR_SAVE_FILE_MODE_NAME, DEBUG_SAVE_INFO_NONE);
- CVarSetInteger(CVAR_PREVENT_ACTOR_UPDATE_NAME, 0);
- CVarSetInteger(CVAR_PREVENT_ACTOR_DRAW_NAME, 0);
- CVarSetInteger(CVAR_PREVENT_ACTOR_INIT_NAME, 0);
- CVarSetInteger("gDeveloperTools.DisableObjectDependency", 0);
+ CVarClear(CVAR_SAVE_FILE_MODE_NAME);
+ CVarClear(CVAR_PREVENT_ACTOR_UPDATE_NAME);
+ CVarClear(CVAR_PREVENT_ACTOR_DRAW_NAME);
+ CVarClear(CVAR_PREVENT_ACTOR_INIT_NAME);
+ CVarClear("gDeveloperTools.DisableObjectDependency");
if (gPlayState != NULL) {
gPlayState->frameAdvCtx.enabled = false;
diff --git a/mm/2s2h/Enhancements/Trackers/TimeSplits/TimeSplitsActions.cpp b/mm/2s2h/Enhancements/Trackers/TimeSplits/TimeSplitsActions.cpp
index 25883b874..4982fa56c 100644
--- a/mm/2s2h/Enhancements/Trackers/TimeSplits/TimeSplitsActions.cpp
+++ b/mm/2s2h/Enhancements/Trackers/TimeSplits/TimeSplitsActions.cpp
@@ -6,7 +6,6 @@
#include <ship/window/Window.h>
#include "2s2h/BenGui/UIWidgets.hpp"
#include <fstream>
-#include <filesystem>
#include "assets/archives/icon_item_static/icon_item_static_yar.h"
@@ -361,13 +360,6 @@ void SplitSaveFileAction(uint32_t action, std::string listName) {
}
void RegisterTimesplits() {
- if (!std::filesystem::exists(Ship::Context::GetPathRelativeToAppDirectory("2S2HTimeSplitData.json"))) {
- json initFile;
- std::ofstream file(Ship::Context::GetPathRelativeToAppDirectory("2S2HTimeSplitData.json"));
- file << initFile.dump(4);
- file.close();
- }
-
SplitSaveFileAction(SPLIT_RETRIEVE, "");
COND_HOOK(OnItemGive, CVAR, [](u8 item) {
diff --git a/mm/2s2h/Rando/Spoiler/RefreshOptions.cpp b/mm/2s2h/Rando/Spoiler/RefreshOptions.cpp
index 831e6b6ef..2ca62b82d 100644
--- a/mm/2s2h/Rando/Spoiler/RefreshOptions.cpp
+++ b/mm/2s2h/Rando/Spoiler/RefreshOptions.cpp
@@ -37,8 +37,8 @@ void Rando::Spoiler::RefreshOptions() {
// If the current spoiler file is not in the randomizer folder, reset the cvar
if (spoilerFileIndex == -1) {
- CVarSetInteger("gRando.SpoilerFileIndex", 0);
- CVarSetString("gRando.SpoilerFile", "");
+ CVarClear("gRando.SpoilerFileIndex");
+ CVarClear("gRando.SpoilerFile");
} else {
CVarSetInteger("gRando.SpoilerFileIndex", spoilerFileIndex);
}
diff --git a/mm/2s2h/config/ConfigUpdaters.cpp b/mm/2s2h/config/ConfigUpdaters.cpp
index 7107bd7e0..b02e0f73f 100644
--- a/mm/2s2h/config/ConfigUpdaters.cpp
+++ b/mm/2s2h/config/ConfigUpdaters.cpp
@@ -36,7 +36,7 @@ static bool HasDisplayOverlayModeInConfig(Ship::Config* conf) {
}
static void MigrateDisplayOverlayTimerMode(Ship::Config* conf) {
- if (HasDisplayOverlayModeInConfig(conf)) {
+ if (!HasDisplayOverlayModeInConfig(conf)) {
return;
}
@@ -51,10 +51,10 @@ static void MigrateDisplayOverlayTimerMode(Ship::Config* conf) {
}
static void MigrateWarpPoints(Ship::Config* conf) {
- auto warpPoints = nlohmann::json::object();
-
if (conf->GetNestedJson().contains("CVars")) {
if (CVarGetInteger("gDeveloperTools.WarpPoint.Saved", 0) != 0) {
+ auto warpPoints = nlohmann::json::object();
+
s32 entranceId = CVarGetInteger("gDeveloperTools.WarpPoint.Entrance", 0);
s8 roomNum = CVarGetInteger("gDeveloperTools.WarpPoint.Room", 0);
Vec3f pos = { CVarGetFloat("gDeveloperTools.WarpPoint.X", 0.0f),
@@ -67,10 +67,10 @@ static void MigrateWarpPoints(Ship::Config* conf) {
{ "pos", { { "x", pos.x }, { "y", pos.y }, { "z", pos.z } } },
{ "rotY", rotY },
{ "bootToPoint", bootToPoint } };
+
+ Ship::Context::GetInstance()->GetConfig()->SetBlock("WarpPoints", warpPoints);
}
}
-
- Ship::Context::GetInstance()->GetConfig()->SetBlock("WarpPoints", warpPoints);
}
ConfigVersion1Updater::ConfigVersion1Updater() : ConfigVersionUpdater(1) {
diff --git a/mm/2s2h/z_scene_2SH.cpp b/mm/2s2h/z_scene_2SH.cpp
index 25fe24176..e6834e922 100644
--- a/mm/2s2h/z_scene_2SH.cpp
+++ b/mm/2s2h/z_scene_2SH.cpp
@@ -513,7 +513,6 @@ extern "C" s32 OTRfunc_8009728C(PlayState* play, RoomContext* roomCtx, s32 roomN
// DmaMgr_SendRequest2(&roomCtx->dmaRequest, roomCtx->unk_34, play->roomList.romFiles[roomNum].vromStart, size,
// 0,
//&roomCtx->loadQueue, NULL, __FILE__, __LINE__);
- printf("File Name %s\n", play->roomList.romFiles[roomNum].fileName);
auto roomData = std::static_pointer_cast<SOH::Scene>(ResourceLoad(play->roomList.romFiles[roomNum].fileName));
roomCtx->status = 1;
roomCtx->roomRequestAddr = roomData.get();