diff options
| author | inspectredc <inspectredc@gmail.com> | 2025-06-19 14:36:00 +0100 |
|---|---|---|
| committer | Lywx <kiritodev01@gmail.com> | 2025-07-04 17:41:27 -0600 |
| commit | 59773d06d9ee0fcd6e61d204869c9816f59216b0 (patch) | |
| tree | 2b0a93f0d4e0b65d11cb1777c3742335a747dc0d /src/factories/DisplayListFactory.cpp | |
| parent | 5e334dc8c7dfc055a7a6bfadaee43735d4ab6692 (diff) | |
Support Vtx Overlaps
Diffstat (limited to 'src/factories/DisplayListFactory.cpp')
| -rw-r--r-- | src/factories/DisplayListFactory.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/factories/DisplayListFactory.cpp b/src/factories/DisplayListFactory.cpp index 20eea5b..5c3e165 100644 --- a/src/factories/DisplayListFactory.cpp +++ b/src/factories/DisplayListFactory.cpp @@ -606,7 +606,8 @@ std::optional<std::shared_ptr<IParsedData>> DListFactory::parse(std::vector<uint const auto decl = Companion::Instance->GetNodeByAddr(w1); if(!decl.has_value()){ - auto search = SearchVtx(w1); + auto adjPtr = Companion::Instance->PatchVirtualAddr(w1); + auto search = SearchVtx(adjPtr); if(search.has_value()){ auto [path, vtx] = search.value(); @@ -617,14 +618,14 @@ std::optional<std::shared_ptr<IParsedData>> DListFactory::parse(std::vector<uint auto lCount = GetSafeNode<uint32_t>(vtx, "count"); auto lSize = ALIGN16(lCount * sizeof(N64Vtx_t)); - if(w1 > lOffset && w1 <= lOffset + lSize){ - SPDLOG_INFO("Found vtx at 0x{:X} matching last vtx at 0x{:X}", w1, lOffset); - GFXDOverride::RegisterVTXOverlap(w1, search.value()); + if(adjPtr > lOffset && adjPtr <= lOffset + lSize){ + SPDLOG_INFO("Found vtx at 0x{:X} matching last vtx at 0x{:X}", adjPtr, lOffset); + GFXDOverride::RegisterVTXOverlap(adjPtr, search.value()); } } else { YAML::Node vtx; vtx["type"] = "VTX"; - vtx["offset"] = w1; + vtx["offset"] = adjPtr; vtx["count"] = nvtx; Companion::Instance->AddAsset(vtx); } |
