From 90aafc2dbd0f90d37cd34d1be945b626bc1bb38a Mon Sep 17 00:00:00 2001 From: MegaMech Date: Mon, 12 Aug 2024 13:38:14 -0600 Subject: Update DisplayListFactory.cpp --- src/factories/DisplayListFactory.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/factories/DisplayListFactory.cpp') diff --git a/src/factories/DisplayListFactory.cpp b/src/factories/DisplayListFactory.cpp index a596ab4..7464d68 100644 --- a/src/factories/DisplayListFactory.cpp +++ b/src/factories/DisplayListFactory.cpp @@ -296,21 +296,15 @@ ExportResult DListBinaryExporter::Export(std::ostream &write, std::shared_ptrGetNodeByAddr(ptr); auto branch = (w0 >> 16) & G_DL_NO_PUSH; - if (node["otr_mode"]) { - auto str = node["otr_mode"].as(); - // Too lower case - std::transform(str.begin(), str.end(), str.begin(), [](unsigned char c){ return std::tolower(c); }); - if (str == "index") { - value = gsSPDisplayListOTRIndex(w1); - } else { - value = gsSPDisplayListOTRHash(ptr); - } + // Export displaylist segment addresses as an index into a buffer of gfx + if ((Companion::Instance->GetGBIMinorVersion() == GBIMinorVersion::Mk64) && (SEGMENT_NUMBER(w1) == 0x07)) { + value = gsSPDisplayListOTRIndex(w1); w0 = value.words.w0; w1 = value.words.w1; } else { - value = gsSPDisplayListOTRHash(ptr); - w0 = value.words.w0; - w1 = value.words.w1; + value = gsSPDisplayListOTRHash(ptr); + w0 = value.words.w0; + w1 = value.words.w1; } writer.Write(w0); -- cgit v1.2.3