Torch
Loading...
Searching...
No Matches
DisplayListFactory.h
1#pragma once
2
3#include "BaseFactory.h"
4#include "n64/CommandMacros.h"
5#include <tuple>
6
7class DListData : public IParsedData {
8public:
9 std::vector<uint32_t> mGfxs;
10
11 DListData() {}
12 DListData(std::vector<uint32_t> gfxs) : mGfxs(gfxs) {}
13};
14
16 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
17};
18
20 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
21};
22
23#ifdef STANDALONE
24class DListCodeExporter : public BaseExporter {
25 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
26};
27#endif
28
29class DListFactory : public BaseFactory {
30public:
31 std::optional<std::shared_ptr<IParsedData>> parse(std::vector<uint8_t>& buffer, YAML::Node& data) override;
32 std::unordered_map<ExportType, std::shared_ptr<BaseExporter>> GetExporters() override {
33 return {
34 REGISTER(Header, DListHeaderExporter)
35 REGISTER(Binary, DListBinaryExporter)
36 #ifdef STANDALONE
37 REGISTER(Code, DListCodeExporter)
38 #endif
39 };
40 }
41 uint32_t GetAlignment() override {
42 return 8;
43 }
44};
Definition BaseFactory.h:88
Definition BaseFactory.h:94
Definition DisplayListFactory.h:19
Definition DisplayListFactory.h:29
Definition DisplayListFactory.h:15
Definition BaseFactory.h:80