summaryrefslogtreecommitdiff
path: root/src/factories/mk64/Waypoints.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/factories/mk64/Waypoints.cpp')
-rw-r--r--src/factories/mk64/Waypoints.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/factories/mk64/Waypoints.cpp b/src/factories/mk64/Waypoints.cpp
index 9149fb6..81e6b36 100644
--- a/src/factories/mk64/Waypoints.cpp
+++ b/src/factories/mk64/Waypoints.cpp
@@ -6,18 +6,19 @@
#define NUM(x) std::dec << std::setfill(' ') << std::setw(6) << x
#define COL(c) "0x" << std::hex << std::setw(2) << std::setfill('0') << c
-void MK64::WaypointHeaderExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement) {
+ExportResult MK64::WaypointHeaderExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement) {
const auto symbol = GetSafeNode(node, "symbol", entryName);
if(Companion::Instance->IsOTRMode()){
write << "static const char " << symbol << "[] = \"__OTR__" << (*replacement) << "\";\n\n";
- return;
+ return std::nullopt;
}
write << "extern TrackWaypoint " << symbol << "[];\n";
+ return std::nullopt;
}
-void MK64::WaypointCodeExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) {
+ExportResult MK64::WaypointCodeExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) {
auto waypoints = std::static_pointer_cast<WaypointData>(raw)->mWaypoints;
auto symbol = GetSafeNode(node, "symbol", entryName);
@@ -39,9 +40,10 @@ void MK64::WaypointCodeExporter::Export(std::ostream &write, std::shared_ptr<IPa
write << "{" << NUM(x) << ", " << NUM(y) << ", " << NUM(z) << ", " << NUM(seg) << " },\n";
}
write << "};\n\n";
+ return std::nullopt;
}
-void MK64::WaypointBinaryExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) {
+ExportResult MK64::WaypointBinaryExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) {
auto waypoints = std::static_pointer_cast<WaypointData>(raw)->mWaypoints;
auto writer = LUS::BinaryWriter();
@@ -55,6 +57,7 @@ void MK64::WaypointBinaryExporter::Export(std::ostream &write, std::shared_ptr<I
}
writer.Finish(write);
+ return std::nullopt;
}
std::optional<std::shared_ptr<IParsedData>> MK64::WaypointsFactory::parse(std::vector<uint8_t>& buffer, YAML::Node& node) {