Merge remote-tracking branch 'upstream/develop' into Custom-DLists

This commit is contained in:
Patrick12115 2024-02-25 21:24:08 -05:00
commit 4e12181fb8
5 changed files with 10 additions and 11 deletions

View File

@ -44,4 +44,4 @@ public:
~InputViewerSettingsWindow();
void Draw();
};
};

View File

@ -9,7 +9,6 @@
#include <bit>
#include <map>
#include <string>
#include <regex>
#include <libultraship/libultraship.h>
#include "dlViewer.h"
@ -68,14 +67,12 @@ std::map<int, std::string> 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;

View File

@ -224,5 +224,7 @@ namespace SohGui {
mStatsWindow = nullptr;
mConsoleWindow = nullptr;
mSohMenuBar = nullptr;
mInputViewer = nullptr;
mInputViewerSettings = nullptr;
}
}

View File

@ -178,7 +178,7 @@ bool Scene_CommandObjectList(PlayState* play, SOH::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;
}

View File

@ -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;