diff options
| author | rozlette <Rozelette@users.noreply.github.com> | 2022-02-14 00:15:45 -0600 |
|---|---|---|
| committer | M4xw <m4x@m4xw.net> | 2022-02-17 21:03:39 +0100 |
| commit | 8370d48c57bfa2d2f6a5a1cec37033cdd70b1435 (patch) | |
| tree | 233ed634c3d34ef39db281c8eef8bd167b8127be | |
| parent | 096a7e7d443d17c47245aca3e23e67569a5681af (diff) | |
Add hack for vertices in segment 0xC
| -rw-r--r-- | OTRExporter/DisplayListExporter.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/OTRExporter/DisplayListExporter.cpp b/OTRExporter/DisplayListExporter.cpp index a505a70..e9dccf5 100644 --- a/OTRExporter/DisplayListExporter.cpp +++ b/OTRExporter/DisplayListExporter.cpp @@ -768,6 +768,19 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina break; case G_VTX: { + if (GETSEGNUM(data) == 0xC) + { + // hack for dynamic verticies used in en_ganon_mant and en_jsjutan + // TODO is there a better way? + int32_t aa = (data & 0x000000FF00000000ULL) >> 32; + int32_t nn = (data & 0x000FF00000000000ULL) >> 44; + + Gfx value = gsSPVertex(data & 0xFFFFFFFF, nn, ((aa >> 1) - nn)); + + word0 = value.words.w0; + word1 = value.words.w1 | 0xF0000000; + } + else //if (dList->vertices.size() > 0) { // Connect neighboring vertex arrays |
