Torch
Loading...
Searching...
No Matches
PaintingMapFactory.h
1#pragma once
2
3#include "factories/BaseFactory.h"
4#include "types/Vec3D.h"
5
6namespace SM64 {
7
8struct PaintingMapping {
9 int16_t vtxId;
10 int16_t texX;
11 int16_t texY;
12 PaintingMapping(int16_t vtxId, int16_t texX, int16_t texY) : vtxId(vtxId), texX(texX), texY(texY) {}
13};
14
15class PaintingData : public IParsedData {
16public:
17 std::vector<PaintingMapping> mPaintingMappings;
18 std::vector<Vec3s> mPaintingGroups;
19
20 PaintingData(std::vector<PaintingMapping> paintingMappings, std::vector<Vec3s> paintingGroups) : mPaintingMappings(std::move(paintingMappings)), mPaintingGroups(std::move(paintingGroups)) {}
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
32 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
33};
34
36public:
37 std::optional<std::shared_ptr<IParsedData>> parse(std::vector<uint8_t>& buffer, YAML::Node& data) override;
38 inline std::unordered_map<ExportType, std::shared_ptr<BaseExporter>> GetExporters() override {
39 return {
40 REGISTER(Code, PaintingMapCodeExporter)
41 REGISTER(Header, PaintingMapHeaderExporter)
42 REGISTER(Binary, PaintingMapBinaryExporter)
43 };
44 }
45};
46}
Definition BaseFactory.h:88
Definition BaseFactory.h:94
Definition BaseFactory.h:80
Definition PaintingMapFactory.h:27
Definition PaintingMapFactory.h:31
Definition PaintingMapFactory.h:35
Definition PaintingMapFactory.h:23