mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-07 02:40:30 -05:00
![M4xw](/assets/img/avatar_default.png)
subrepo: subdir: "OTRExporter" merged: "1503d3eef" upstream: origin: "https://github.com/HarbourMasters/OTRExporter.git" branch: "master" commit: "1503d3eef" git-subrepo: version: "0.4.1" origin: "???" commit: "???"
23 lines
694 B
C++
23 lines
694 B
C++
#include "PathExporter.h"
|
|
#include "../ZAPD/ZFile.h"
|
|
|
|
void OTRExporter_Path::Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer)
|
|
{
|
|
ZPath* path = (ZPath*)res;
|
|
|
|
WriteHeader(res, outPath, writer, Ship::ResourceType::Path);
|
|
|
|
writer->Write((uint32_t)path->pathways.size());
|
|
|
|
for (int k = 0; k < path->pathways.size(); k++)
|
|
{
|
|
writer->Write((uint32_t)path->pathways[k].points.size());
|
|
|
|
for (int i = 0; i < path->pathways[k].points.size(); i++)
|
|
{
|
|
writer->Write(path->pathways[k].points[i].scalars[0].scalarData.s16);
|
|
writer->Write(path->pathways[k].points[i].scalars[1].scalarData.s16);
|
|
writer->Write(path->pathways[k].points[i].scalars[2].scalarData.s16);
|
|
}
|
|
}
|
|
} |