mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-02 08:35:08 -04:00
d24c8453db
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: "???"
27 lines
688 B
C++
27 lines
688 B
C++
#include "Vertex.h"
|
|
|
|
namespace Ship
|
|
{
|
|
void VertexV0::ParseFileBinary(BinaryReader* reader, Resource* res) {
|
|
Vertex* vtx = (Vertex*)res;
|
|
ResourceFile::ParseFileBinary(reader, res);
|
|
|
|
uint32_t count = reader->ReadUInt32();
|
|
vtx->vtxList.reserve(count);
|
|
|
|
for (uint32_t i = 0; i < count; i++) {
|
|
Vtx data;
|
|
data.x = reader->ReadInt16();
|
|
data.y = reader->ReadInt16();
|
|
data.z = reader->ReadInt16();
|
|
data.flag = reader->ReadUInt16();
|
|
data.s = reader->ReadInt16();
|
|
data.t = reader->ReadInt16();
|
|
data.r = reader->ReadUByte();
|
|
data.g = reader->ReadUByte();
|
|
data.b = reader->ReadUByte();
|
|
data.a = reader->ReadUByte();
|
|
vtx->vtxList.push_back(data);
|
|
}
|
|
}
|
|
} |