1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

save object details to repository file

This commit is contained in:
Ted John
2016-06-25 14:44:04 +01:00
parent 2449b7dbf0
commit e93b2141a1
9 changed files with 64 additions and 28 deletions

View File

@@ -64,6 +64,18 @@ void StringTable::Read(IStream * stream, uint8 id)
Sort();
}
const utf8 * StringTable::GetString(uint8 id)
{
for (auto &string : _strings)
{
if (string.Id == id)
{
return string.Text;
}
}
return nullptr;
}
void StringTable::Sort()
{
std::sort(_strings.begin(), _strings.end(), [](const StringTableEntry &a, const StringTableEntry &b) -> bool