From 19af4481c08d44fe4bff85eb4662bfb559c4dbfb Mon Sep 17 00:00:00 2001 From: Archez Date: Tue, 20 Feb 2024 09:31:24 -0500 Subject: [PATCH 1/4] fix object unload using wrong index (#3949) --- soh/soh/z_scene_otr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/soh/z_scene_otr.cpp b/soh/soh/z_scene_otr.cpp index 33104326e..be1840ecd 100644 --- a/soh/soh/z_scene_otr.cpp +++ b/soh/soh/z_scene_otr.cpp @@ -178,7 +178,7 @@ bool Scene_CommandObjectList(PlayState* play, LUS::ISceneCommand* cmd) { // Loop until a mismatch in the object lists // Then clear all object ids past that in the context object list and kill actors for those objects for (i = play->objectCtx.unk_09, k = 0; i < play->objectCtx.num; i++, k++) { - if (i >= cmdObj->objects.size() || play->objectCtx.status[i].id != cmdObj->objects[k]) { + if (k >= cmdObj->objects.size() || play->objectCtx.status[i].id != cmdObj->objects[k]) { for (j = i; j < play->objectCtx.num; j++) { play->objectCtx.status[j].id = OBJECT_INVALID; } From ef9fc0a9ec8716201dfaeb2d28d059171a066b7a Mon Sep 17 00:00:00 2001 From: Archez Date: Tue, 20 Feb 2024 09:38:10 -0500 Subject: [PATCH 2/4] fix endianess issue with camera setting data (#3950) --- soh/src/code/z_camera_data.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/soh/src/code/z_camera_data.inc b/soh/src/code/z_camera_data.inc index b9e0ba864..90b1874c7 100644 --- a/soh/src/code/z_camera_data.inc +++ b/soh/src/code/z_camera_data.inc @@ -16,9 +16,11 @@ typedef struct { union { u32 unk_00; struct { - u32 unk_bit0 : 1; - u32 unk_bit1 : 1; - u32 validModes : 30; + // SoH [Port] These bitfield values are unused and led to shifting in validModes for little endian systems + // Removing those so that validModes can be a complete 32 bit value + // u32 unk_bit0 : 1; + // u32 unk_bit1 : 1; + u32 validModes; }; }; CameraMode* cameraModes; From cd25f1d3c1fcecd574e6a4019c6f9cc41260ff1c Mon Sep 17 00:00:00 2001 From: Archez Date: Wed, 21 Feb 2024 00:20:25 -0500 Subject: [PATCH 3/4] Fix performance of dlist viewer (#3961) --- soh/soh/Enhancements/debugger/dlViewer.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/soh/soh/Enhancements/debugger/dlViewer.cpp b/soh/soh/Enhancements/debugger/dlViewer.cpp index da44a908a..028234fc1 100644 --- a/soh/soh/Enhancements/debugger/dlViewer.cpp +++ b/soh/soh/Enhancements/debugger/dlViewer.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include "dlViewer.h" @@ -68,14 +67,12 @@ std::map cmdMap = { void PerformDisplayListSearch() { auto result = LUS::Context::GetInstance()->GetResourceManager()->GetArchiveManager()->ListFiles("*" + std::string(searchString) + "*DL*"); - std::regex dlSearch(".*((DL)|(DL_.*))$"); - displayListSearchResults.clear(); // Filter the file results even further as StormLib can only use wildcard searching for (size_t i = 0; i < result->size(); i++) { std::string val = result->at(i); - if (std::regex_search(val.c_str(), dlSearch)) { + if (val.ends_with("DL") || val.find("DL_") != std::string::npos) { displayListSearchResults.push_back(val); } } @@ -99,8 +96,6 @@ void DLViewerWindow::DrawElement() { return; } - ImGui::Text("%d", searchDebounceFrames); - // Debounce the search field as listing otr files is expensive if (ImGui::InputText("Search Display Lists", searchString, ARRAY_COUNT(searchString))) { doSearch = true; From bcbe4cb1c35798cc1017844fc453de8ab8bfc6f1 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Wed, 21 Feb 2024 00:21:26 -0500 Subject: [PATCH 4/4] we crash if we try to SPDLOG in the destructors (#3951) * we crash if we try to SPDLOG in the destructors * rip em out * newline * add to destroy * Revert "rip em out" This reverts commit 738a9b80f327fe728e176d63ab2d54a36fb908ad. * Revert "we crash if we try to SPDLOG in the destructors" This reverts commit 327d305e00ab9cb05ca93c5566a06ae9a345d329. --- soh/soh/Enhancements/controls/InputViewer.h | 2 +- soh/soh/SohGui.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/controls/InputViewer.h b/soh/soh/Enhancements/controls/InputViewer.h index 646c15d9d..6f2e2c587 100644 --- a/soh/soh/Enhancements/controls/InputViewer.h +++ b/soh/soh/Enhancements/controls/InputViewer.h @@ -44,4 +44,4 @@ public: ~InputViewerSettingsWindow(); void Draw(); -}; \ No newline at end of file +}; diff --git a/soh/soh/SohGui.cpp b/soh/soh/SohGui.cpp index 4cb43d3a8..bbc12b1a1 100644 --- a/soh/soh/SohGui.cpp +++ b/soh/soh/SohGui.cpp @@ -224,5 +224,7 @@ namespace SohGui { mStatsWindow = nullptr; mConsoleWindow = nullptr; mSohMenuBar = nullptr; + mInputViewer = nullptr; + mInputViewerSettings = nullptr; } }