summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandom <28494085+Random06457@users.noreply.github.com>2023-12-19 04:00:45 +0100
committerGitHub <noreply@github.com>2023-12-18 22:00:45 -0500
commitfc881b984b653e52042bb770b94f1ab95a909f3c (patch)
tree8a739914ab41d3fe5eaf9f32d0f6cadf0b3359e2
parent926b4a3fb52cbadd7ab3f7fe48f0500881f84cbd (diff)
add texture coordinate hack for gSunDL vertices (#1)
-rw-r--r--ZAPD/ZDisplayList.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/ZAPD/ZDisplayList.cpp b/ZAPD/ZDisplayList.cpp
index d8549e9..66759fe 100644
--- a/ZAPD/ZDisplayList.cpp
+++ b/ZAPD/ZDisplayList.cpp
@@ -1766,6 +1766,14 @@ static int32_t GfxdCallback_Vtx(uint32_t seg, int32_t count)
bool keyAlreadyOccupied = self->vertices.find(vtxOffset) != self->vertices.end();
+ if (self->GetName() == "gSunDL")
+ {
+ for (auto& vtx: vtxList)
+ {
+ vtx.t = (((vtx.t >> 5) - 1) / 2) << 5;
+ }
+ }
+
// In some cases a vtxList already exists at vtxOffset. Only override the existing list
// if the new one is bigger.
if (!keyAlreadyOccupied ||