summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2024-03-11 22:18:24 -0600
committerLywx <kiritodev01@gmail.com>2024-03-12 11:57:30 -0600
commit8e566f8cde0f44cfeee46314119e7ef7fdfaf677 (patch)
tree82a73df2d22d18caf6016532ac4345108aa3134f
parenta809755d7da0091f32d021fc24c82200305cb1cc (diff)
Update DisplayListFactory.cpp
-rw-r--r--src/factories/DisplayListFactory.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/factories/DisplayListFactory.cpp b/src/factories/DisplayListFactory.cpp
index 73cb1b7..ebaf3b0 100644
--- a/src/factories/DisplayListFactory.cpp
+++ b/src/factories/DisplayListFactory.cpp
@@ -373,8 +373,8 @@ std::optional<std::shared_ptr<IParsedData>> DListFactory::parse(std::vector<uint
break;
case GBIVersion::f3dex:
- index = C0(0, 8);
- offset = C0(8, 8) * 8;
+ uint32_t subcommand = (w0 >> 16) & 0xFF;
+ offset = w1;
/*
* Only generate lights on the second gsSPLight.
@@ -384,10 +384,9 @@ std::optional<std::shared_ptr<IParsedData>> DListFactory::parse(std::vector<uint
* gsSPLight(&name.l[0],1)
* gsSPLight(&name.a,2) <-- This ptr is used to generate the lights
*/
- if (index == GBI(G_MV_L1)) {
+ if (subcommand == GBI(G_MV_L1)) {
light = true;
}
- break;
default: {
index = C0(0, 8);
offset = C0(8, 8) * 8;