mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-23 06:02:08 -05:00

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);
|
|
}
|
|
}
|