summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2024-08-12 13:38:14 -0600
committercoco875 <59367621+coco875@users.noreply.github.com>2024-08-13 15:33:44 +0200
commit90aafc2dbd0f90d37cd34d1be945b626bc1bb38a (patch)
tree9493de165024fee893fe6a5e9b7bc7d1591ca8df
parent8733d06dc3c7f0316efe9e198528552fc0ec7f5b (diff)
Update DisplayListFactory.cpp
-rw-r--r--src/factories/DisplayListFactory.cpp18
1 files changed, 6 insertions, 12 deletions
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_ptr<IP
auto dec = Companion::Instance->GetNodeByAddr(ptr);
auto branch = (w0 >> 16) & G_DL_NO_PUSH;
- if (node["otr_mode"]) {
- auto str = node["otr_mode"].as<std::string>();
- // 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);