Fixed DisplayList Binary extraction and some other factories

This commit is contained in:
KiritoDv
2024-04-08 18:09:34 -06:00
committed by Lywx
parent 3918fde51a
commit 6d5f37db33
6 changed files with 28 additions and 16 deletions
+4 -3
View File
@@ -233,14 +233,15 @@ ExportResult DListBinaryExporter::Export(std::ostream &write, std::shared_ptr<IP
if(overlap.has_value()){
auto ovnode = std::get<1>(overlap.value());
uint64_t hash = CRC64(std::get<0>(overlap.value()).c_str());
SPDLOG_INFO("Found vtx: 0x{:X} Hash: 0x{:X} Path: {}", ptr, hash, std::get<0>(overlap.value()));
auto path = Companion::Instance->RelativePath(std::get<0>(overlap.value()));
uint64_t hash = CRC64(path.c_str());
SPDLOG_INFO("Found vtx: 0x{:X} Hash: 0x{:X} Path: {}", ptr, hash, path);
auto offset = GetSafeNode<uint32_t>(ovnode, "offset");
auto count = GetSafeNode<uint32_t>(ovnode, "count");
auto diff = ASSET_PTR(ptr) - ASSET_PTR(offset);
Gfx value = gsSPVertexOTR(diff, nvtx, ((didx >> 1) - nvtx));
Gfx value = gsSPVertexOTR(diff, nvtx, didx);
SPDLOG_INFO("gsSPVertexOTR({}, {}, {})", diff, nvtx, didx);