mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-16 14:35:06 -05:00
442a88f03b
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: "???"
22 lines
723 B
C++
22 lines
723 B
C++
#include "PlayerAnimationExporter.h"
|
|
#include <Resource.h>
|
|
|
|
void OTRExporter_PlayerAnimationExporter::Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer)
|
|
{
|
|
ZPlayerAnimationData* anim = (ZPlayerAnimationData*)res;
|
|
|
|
WriteHeader(res, outPath, writer, Ship::ResourceType::PlayerAnimation);
|
|
|
|
auto start = std::chrono::steady_clock::now();
|
|
|
|
writer->Write((uint32_t)anim->limbRotData.size());
|
|
|
|
for (size_t i = 0; i < anim->limbRotData.size(); i++)
|
|
writer->Write(anim->limbRotData[i]);
|
|
|
|
auto end = std::chrono::steady_clock::now();
|
|
size_t diff = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
|
|
|
|
//printf("Exported Player Anim %s in %zums\n", anim->GetName().c_str(), diff);
|
|
}
|