Torch
Loading...
Searching...
No Matches
CourseVtx.h
1#pragma once
2
3#include "factories/VtxFactory.h"
4#include <factories/BaseFactory.h>
5
6namespace MK64 {
7
8 struct CourseVtx {
9 int16_t ob[3]; /* x, y, z */
10 int16_t tc[2]; /* texture coord */
11 uint8_t cn[4]; /* color & alpha */
12 };
13
14 class CourseVtxData : public IParsedData {
15 public:
16 std::vector<CourseVtx> mVtxs;
17
18 explicit CourseVtxData(std::vector<CourseVtx> vtxs) : mVtxs(vtxs) {}
19 };
20
22 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
23 };
24
26 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
27 };
28
30 ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement) override;
31 };
32
34 public:
35 std::optional<std::shared_ptr<IParsedData>> parse(std::vector<uint8_t>& buffer, YAML::Node& data) override;
36 std::optional<std::shared_ptr<IParsedData>> parse_modding(std::vector<uint8_t>& buffer, YAML::Node& data) override {
37 return std::nullopt;
38 }
39 inline std::unordered_map<ExportType, std::shared_ptr<BaseExporter>> GetExporters() override {
40 return {
41 REGISTER(Code, CourseVtxCodeExporter)
42 REGISTER(Header, VtxHeaderExporter)
43 REGISTER(Binary, VtxBinaryExporter)
44 };
45 }
46 bool SupportModdedAssets() override { return false; }
47 };
48
49}
Definition BaseFactory.h:88
Definition BaseFactory.h:94
Definition BaseFactory.h:80
Definition CourseVtx.h:25
Definition CourseVtx.h:29
Definition CourseVtx.h:33
Definition CourseVtx.h:21
Definition VtxFactory.h:23
Definition VtxFactory.h:19
Definition CourseVtx.h:8