mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 10:21:57 -05:00
parent
362ea7bbc0
commit
097b90a3db
2 changed files with 8 additions and 10 deletions
|
@ -20,6 +20,7 @@
|
|||
- Fix: [#11405] Building a path through walls does not always remove the walls.
|
||||
- Fix: [#11450] Rides with unsuitable track can't be opened even with "Enable all drawable track pieces" cheat.
|
||||
- Fix: [#11455] Object Selection window cuts off scenery names.
|
||||
- Fix: [#11640] Objects with a blank description in one language do not fall back to other languages anymore.
|
||||
- Fix: RCT1 scenarios have more items in the object list than are present in the park or the research list.
|
||||
- Improved: [#6530] Allow water and land height changes on park borders.
|
||||
- Improved: [#11390] Build hash written to screenshot metadata.
|
||||
|
|
|
@ -56,21 +56,18 @@ void StringTable::Read(IReadObjectContext* context, IStream* stream, uint8_t id)
|
|||
{
|
||||
uint8_t languageId = (rct2LanguageId <= RCT2_LANGUAGE_ID_PORTUGUESE) ? RCT2ToOpenRCT2LanguageId[rct2LanguageId]
|
||||
: static_cast<uint8_t>(LANGUAGE_UNDEFINED);
|
||||
StringTableEntry entry{};
|
||||
entry.Id = id;
|
||||
entry.LanguageId = languageId;
|
||||
|
||||
std::string stringAsWin1252 = stream->ReadStdString();
|
||||
auto stringAsUtf8 = rct2_to_utf8(stringAsWin1252, rct2LanguageId);
|
||||
|
||||
if (StringIsBlank(stringAsUtf8.data()))
|
||||
if (!StringIsBlank(stringAsUtf8.data()))
|
||||
{
|
||||
entry.LanguageId = LANGUAGE_UNDEFINED;
|
||||
stringAsUtf8 = String::Trim(stringAsUtf8);
|
||||
StringTableEntry entry{};
|
||||
entry.Id = id;
|
||||
entry.LanguageId = languageId;
|
||||
entry.Text = stringAsUtf8;
|
||||
_strings.push_back(entry);
|
||||
}
|
||||
stringAsUtf8 = String::Trim(stringAsUtf8);
|
||||
|
||||
entry.Text = stringAsUtf8;
|
||||
_strings.push_back(entry);
|
||||
}
|
||||
}
|
||||
catch (const std::exception&)
|
||||
|
|
Loading…
Reference in a new issue