Torch
Loading...
Searching...
No Matches
TrackSections.h
1
#pragma once
2
3
#include <factories/BaseFactory.h>
4
5
namespace
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
21
class
TrackSectionsHeaderExporter
:
public
BaseExporter
{
22
ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement)
override
;
23
};
24
25
class
TrackSectionsBinaryExporter
:
public
BaseExporter
{
26
ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement)
override
;
27
};
28
29
class
TrackSectionsCodeExporter
:
public
BaseExporter
{
30
ExportResult Export(std::ostream& write, std::shared_ptr<IParsedData> data, std::string& entryName, YAML::Node& node, std::string* replacement)
override
;
31
};
32
33
class
TrackSectionsFactory
:
public
BaseFactory
{
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
}
BaseExporter
Definition
BaseFactory.h:88
BaseFactory
Definition
BaseFactory.h:94
IParsedData
Definition
BaseFactory.h:80
MK64::TrackSectionsBinaryExporter
Definition
TrackSections.h:25
MK64::TrackSectionsCodeExporter
Definition
TrackSections.h:29
MK64::TrackSectionsFactory
Definition
TrackSections.h:33
MK64::TrackSectionsHeaderExporter
Definition
TrackSections.h:21
MK64::TrackSections
Definition
TrackSections.h:7
src
factories
mk64
TrackSections.h
Generated by
1.14.0