mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-01 08:05:07 -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: "???"
23 lines
506 B
C++
23 lines
506 B
C++
#include "Text.h"
|
|
|
|
void Ship::TextV0::ParseFileBinary(BinaryReader* reader, Resource* res)
|
|
{
|
|
Text* txt = (Text*)res;
|
|
|
|
ResourceFile::ParseFileBinary(reader, txt);
|
|
|
|
uint32_t msgCount = reader->ReadUInt32();
|
|
txt->messages.reserve(msgCount);
|
|
|
|
for (uint32_t i = 0; i < msgCount; i++)
|
|
{
|
|
MessageEntry entry;
|
|
entry.id = reader->ReadUInt16();
|
|
entry.textboxType = reader->ReadUByte();
|
|
entry.textboxYPos = reader->ReadUByte();
|
|
entry.msg = reader->ReadString();
|
|
|
|
txt->messages.push_back(entry);
|
|
}
|
|
}
|