Torch
Loading...
Searching...
No Matches
EntityGfxFactory.h
1#pragma once
2
3#include "factories/BaseFactory.h"
4#include "types/RawBuffer.h"
5#include <vector>
6
8 uint32_t offset;
9 std::vector<uint32_t> commands;
10};
11
12class PM64EntityGfxData : public IParsedData {
13public:
14 std::vector<uint8_t> mBuffer;
15 std::vector<PM64EntityDisplayListInfo> mDisplayLists;
16 std::vector<uint32_t> mStandaloneMtx; // Mtx offsets not reachable by DL walking
17
18 PM64EntityGfxData(std::vector<uint8_t>&& buffer, std::vector<PM64EntityDisplayListInfo>&& displayLists)
19 : mBuffer(std::move(buffer)), mDisplayLists(std::move(displayLists)) {
20 }
21};
22
24 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
25};
26
28 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
29};
30
32public:
33 std::optional<std::shared_ptr<IParsedData>> parse(std::vector<uint8_t>& buffer, YAML::Node& data) override;
34 inline std::unordered_map<ExportType, std::shared_ptr<BaseExporter>> GetExporters() override {
35 return {
36 REGISTER(Header, PM64EntityGfxHeaderExporter)
37 REGISTER(Binary, PM64EntityGfxBinaryExporter)
38 };
39 }
40};
Definition BaseFactory.h:88
Definition BaseFactory.h:94
Definition BaseFactory.h:80
Definition EntityGfxFactory.h:23
Definition EntityGfxFactory.h:31
Definition EntityGfxFactory.h:27
Definition EntityGfxFactory.h:7