Torch
Loading...
Searching...
No Matches
TrackSections.h
1#pragma once
2
3#include <factories/BaseFactory.h>
4
5namespace MK64 {
6
7 struct TrackSections {
8 uint64_t crc;
9 int8_t surfaceType;
10 int8_t sectionId;
11 uint16_t flags;
12 };
13
14 class TrackSectionsData : public IParsedData {
15 public:
16 std::vector<TrackSections> mSecs;
17
18 explicit TrackSectionsData(std::vector<TrackSections> sections) : mSecs(sections) {}
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, TrackSectionsCodeExporter)
42 REGISTER(Header, TrackSectionsHeaderExporter)
43 REGISTER(Binary, TrackSectionsBinaryExporter)
44 };
45 }
46 bool SupportModdedAssets() override { return false; }
47 };
48
49}
Definition BaseFactory.h:88
Definition BaseFactory.h:94
Definition BaseFactory.h:80
Definition TrackSections.h:25
Definition TrackSections.h:29
Definition TrackSections.h:33
Definition TrackSections.h:21
Definition TrackSections.h:7