Shipwright/libultraship/libultraship/Skeleton.cpp
M4xw d24c8453db git subrepo clone https://github.com/HarbourMasters/libultraship.git
subrepo:
  subdir:   "libultraship"
  merged:   "a484cda98"
upstream:
  origin:   "https://github.com/HarbourMasters/libultraship.git"
  branch:   "main"
  commit:   "a484cda98"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
2022-03-22 02:52:44 +01:00

29 lines
776 B
C++

#include "Skeleton.h"
namespace Ship
{
void SkeletonV0::ParseFileBinary(BinaryReader* reader, Resource* res)
{
Skeleton* skel = (Skeleton*)res;
ResourceFile::ParseFileBinary(reader, skel);
skel->type = (SkeletonType)reader->ReadByte();
skel->limbType = (LimbType)reader->ReadByte();
skel->limbCount = reader->ReadUInt32();
skel->dListCount = reader->ReadUInt32();
skel->limbTableType = (LimbType)reader->ReadByte();
uint32_t limbTblCnt = reader->ReadUInt32();
skel->limbTable.reserve(limbTblCnt);
for (uint32_t i = 0; i < limbTblCnt; i++)
{
std::string limbPath = reader->ReadString();
skel->limbTable.push_back(limbPath);
}
}
}