summaryrefslogtreecommitdiff
path: root/src/factories/mk64/PackedDisplayListFactory.h
blob: e36f788d064d4fe00178af47e5c3662343cb3b59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#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:
    std::optional<std::shared_ptr<IParsedData>> parse(std::vector<uint8_t>& buffer, YAML::Node& data) override;
    std::unordered_map<ExportType, std::shared_ptr<BaseExporter>> GetExporters() override {
        return {
            REGISTER(Header, DListHeaderExporter)
            REGISTER(Binary, DListBinaryExporter)
            #ifdef STANDALONE
            REGISTER(Code, DListCodeExporter)
            #endif
        };
    }
    uint32_t GetAlignment() override { return 0; }
};
}