mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-11 14:08:20 -05:00
ba13e6b2c4
Co-authored-by: kenix3 <kenixwhisperwind@gmail.com> Co-authored-by: David Chavez <david@dcvz.io> Co-authored-by: KiritoDv <kiritodev01@gmail.com> Co-authored-by: Christopher Leggett <chris@leggett.dev>
22 lines
738 B
C++
22 lines
738 B
C++
#include "PlayerAnimationExporter.h"
|
|
#include <libultraship/bridge.h>
|
|
|
|
void OTRExporter_PlayerAnimationExporter::Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer)
|
|
{
|
|
ZPlayerAnimationData* anim = (ZPlayerAnimationData*)res;
|
|
|
|
WriteHeader(res, outPath, writer, Ship::ResourceType::SOH_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);
|
|
}
|