summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArchez <Archez@users.noreply.github.com>2024-02-18 14:34:15 -0500
committerlouist103 <35883445+louist103@users.noreply.github.com>2024-03-02 12:13:16 -0500
commit199dc67d2c7e0f342a8f21d59f1c78ab7ffb865d (patch)
tree34723342bdd77e6368a50863d1999ca5128eb327
parentb9d4f4d841f7c6f5ee8efc006d4cc8c683ec1088 (diff)
handle all sgement lookups for vtx commands (#12)
-rw-r--r--OTRExporter/DisplayListExporter.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/OTRExporter/DisplayListExporter.cpp b/OTRExporter/DisplayListExporter.cpp
index 031c88e..e6a8031 100644
--- a/OTRExporter/DisplayListExporter.cpp
+++ b/OTRExporter/DisplayListExporter.cpp
@@ -782,17 +782,15 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina
break;
case G_VTX:
{
- if (GETSEGNUM(data) == 0xC || GETSEGNUM(data) == 0x8)
+ if (!Globals::Instance->HasSegment(GETSEGNUM(data), res->parent->workerID))
{
- // 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))};
+ Gfx value = {gsSPVertex((data & 0xFFFFFFFF) + 1, nn, ((aa >> 1) - nn))};
word0 = value.words.w0;
- word1 = value.words.w1 | 1;
+ word1 = value.words.w1;
}
else
{