summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcoco875 <pereira.jannin@gmail.com>2025-11-30 16:17:33 +0100
committerLywx <kiritodev01@gmail.com>2025-12-01 12:39:42 -0600
commitc7189642c36152cc312c4d32f944473dc2946db9 (patch)
treed924fc22715a25292b526ce2dc8c056b6e2eded3 /src
parentfa41ca66ce7acc3bc27939eb012a6b87472e377b (diff)
more PackedDListFactory into MK64 namespace
Diffstat (limited to 'src')
-rw-r--r--src/Companion.cpp2
-rw-r--r--src/factories/mk64/PackedDisplayListFactory.cpp2
-rw-r--r--src/factories/mk64/PackedDisplayListFactory.h2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/Companion.cpp b/src/Companion.cpp
index 34aba98..c4d2979 100644
--- a/src/Companion.cpp
+++ b/src/Companion.cpp
@@ -176,7 +176,7 @@ void Companion::Init(const ExportType type) {
this->RegisterFactory("MK64:DRIVING_BEHAVIOUR", std::make_shared<MK64::DrivingBehaviourFactory>());
this->RegisterFactory("MK64:ITEM_CURVE", std::make_shared<MK64::ItemCurveFactory>()); // Item curve for decomp only
this->RegisterFactory("MK64:METADATA", std::make_shared<MK64::CourseMetadataFactory>());
- this->RegisterFactory("MK64:PACKED_GFX", std::make_shared<PackedDListFactory>());
+ this->RegisterFactory("MK64:PACKED_GFX", std::make_shared<MK64::PackedDListFactory>());
#endif
#ifdef SF64_SUPPORT
diff --git a/src/factories/mk64/PackedDisplayListFactory.cpp b/src/factories/mk64/PackedDisplayListFactory.cpp
index d797f69..a49b1a4 100644
--- a/src/factories/mk64/PackedDisplayListFactory.cpp
+++ b/src/factories/mk64/PackedDisplayListFactory.cpp
@@ -544,7 +544,7 @@ static inline uint16_t RD16(const std::vector<uint8_t>& b, size_t i) {
return (uint16_t)((b[i + 1] << 8) | b[i]);
}
-std::optional<std::shared_ptr<IParsedData>> PackedDListFactory::parse(std::vector<uint8_t>& buffer, YAML::Node& data) {
+std::optional<std::shared_ptr<IParsedData>> MK64::PackedDListFactory::parse(std::vector<uint8_t>& buffer, YAML::Node& data) {
auto [_, segment] = Decompressor::AutoDecode(data, buffer);
std::vector<uint8_t> decoded(segment.data, segment.data + segment.size);
diff --git a/src/factories/mk64/PackedDisplayListFactory.h b/src/factories/mk64/PackedDisplayListFactory.h
index 908e308..e36f788 100644
--- a/src/factories/mk64/PackedDisplayListFactory.h
+++ b/src/factories/mk64/PackedDisplayListFactory.h
@@ -3,6 +3,7 @@
#include "../BaseFactory.h"
#include "../DisplayListFactory.h" // Reuse DList exporters and data shape
+namespace MK64 {
// Factory to expand MK64 packed DL bytecode into regular Gfx commands
class PackedDListFactory : public BaseFactory {
public:
@@ -18,3 +19,4 @@ public:
}
uint32_t GetAlignment() override { return 0; }
};
+}