summaryrefslogtreecommitdiff
path: root/src/factories
diff options
context:
space:
mode:
authorKiritoDv <kiritodev01@gmail.com>2024-03-22 09:22:43 -0600
committerKiritoDv <kiritodev01@gmail.com>2024-03-22 09:22:43 -0600
commit0a28d35eb4d80a7d9d7737bd18cd0a71953404c8 (patch)
tree201881458148150bd49bf180e4ddfef03f9a9bbf /src/factories
parent95e7bc0d68f0f8687486b30f3a795f143e4456b0 (diff)
First conceptasync
Diffstat (limited to 'src/factories')
-rw-r--r--src/factories/BaseFactory.h1
-rw-r--r--src/factories/DisplayListFactory.cpp4
2 files changed, 2 insertions, 3 deletions
diff --git a/src/factories/BaseFactory.h b/src/factories/BaseFactory.h
index 1246c91..eeebbf4 100644
--- a/src/factories/BaseFactory.h
+++ b/src/factories/BaseFactory.h
@@ -32,6 +32,7 @@ struct OffsetEntry {
};
typedef std::optional<std::variant<size_t, OffsetEntry>> ExportResult;
+#define ParseResult std::optional<std::shared_ptr<IParsedData>>
enum class ExportType {
Header,
diff --git a/src/factories/DisplayListFactory.cpp b/src/factories/DisplayListFactory.cpp
index 29c1bf9..760c7ad 100644
--- a/src/factories/DisplayListFactory.cpp
+++ b/src/factories/DisplayListFactory.cpp
@@ -352,7 +352,7 @@ std::optional<std::shared_ptr<IParsedData>> DListFactory::parse(std::vector<uint
// We need to process gsSPLight which is a subcommand inside G_MOVEMEM (0x03).
if(opcode == GBI(G_MOVEMEM)) {
// 0x03860000 or 0x03880000 subcommand will contain 0x86/0x88 for G_MV_L0 and G_MV_L1. Other subcommands also exist.
- uint8_t subcommand = (w0 >> 16) & 0xFF;
+ uint8_t subcommand = (w0 >> 16) & 0xFF;
uint8_t index = 0;
uint8_t offset = 0;
bool light = false;
@@ -494,7 +494,5 @@ std::optional<std::shared_ptr<IParsedData>> DListFactory::parse(std::vector<uint
gfxs.push_back(w1);
}
-
-
return std::make_shared<DListData>(gfxs);
}