summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcoco875 <pereira.jannin@gmail.com>2025-08-21 04:02:55 +0200
committerLywx <kiritodev01@gmail.com>2025-12-01 12:39:42 -0600
commit75f47bc85ae3ee235621629b1f17d307b69b9686 (patch)
tree6762153426a766bc3f13017ba2414752e4b23169 /src
parent35bf098074262de07063e3cf8c3ea5503f46ad68 (diff)
fix some mistake
Diffstat (limited to 'src')
-rw-r--r--src/factories/mk64/PackedDisplayListFactory.cpp5
-rw-r--r--src/factories/mk64/PackedDisplayListFactory.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/factories/mk64/PackedDisplayListFactory.cpp b/src/factories/mk64/PackedDisplayListFactory.cpp
index 946c972..3042319 100644
--- a/src/factories/mk64/PackedDisplayListFactory.cpp
+++ b/src/factories/mk64/PackedDisplayListFactory.cpp
@@ -582,6 +582,7 @@ std::optional<std::shared_ptr<IParsedData>> PackedDListFactory::parse(std::vecto
// uint32_t w0 = (_SHIFTL(G_VTX, 24, 8)
// | ((n << 10) + ((n * 0x10) - 1)));
// uint32_t w1 = vtxOff;
+ vtxOff |= 0x04000000;
N64Gfx macro = gsSPVertex(vtxOff, n, 0);
emit(macro.words.w0, macro.words.w1);
continue;
@@ -686,7 +687,7 @@ std::optional<std::shared_ptr<IParsedData>> PackedDListFactory::parse(std::vecto
// G_SETTIMG (on garde un pointeur brut = offset; l'exporteur patchera en OTR)
// Utiliser width=1 par défaut pour le champ "width-1" du w0
// uint32_t w0 = (_SHIFTL(G_SETTIMG, 24, 8) | _SHIFTL(fmt, 21, 3) | _SHIFTL(siz, 19, 2));
- N64Gfx macro = gsDPSetTextureImage(fmt, siz, 1, offset);
+ N64Gfx macro = gsDPSetTextureImage(fmt, siz, 1, 0x05000000 | offset);
emit(macro.words.w0, macro.words.w1);
@@ -828,7 +829,7 @@ std::optional<std::shared_ptr<IParsedData>> PackedDListFactory::parse(std::vecto
// uint32_t w0 = (_SHIFTL(G_DL, 24, 8)); // push
// // Encode as segmented address into segment 0x07 so exporter treats it as an index into packed DL buffer
// uint32_t w1 = 0x07000000u | (idx * 8);
- N64Gfx macro = gsSPDisplayList(idx);
+ N64Gfx macro = gsSPDisplayList(0x07000000u|(idx*8));
emit(macro.words.w0, macro.words.w1);
} break;
case PG_ENDDL:
diff --git a/src/factories/mk64/PackedDisplayListFactory.h b/src/factories/mk64/PackedDisplayListFactory.h
index 696fff0..908e308 100644
--- a/src/factories/mk64/PackedDisplayListFactory.h
+++ b/src/factories/mk64/PackedDisplayListFactory.h
@@ -11,6 +11,9 @@ public:
return {
REGISTER(Header, DListHeaderExporter)
REGISTER(Binary, DListBinaryExporter)
+ #ifdef STANDALONE
+ REGISTER(Code, DListCodeExporter)
+ #endif
};
}
uint32_t GetAlignment() override { return 0; }