* Split FileBrowser and OverwritePrompt from LoadSave unit
* Introduce FileBrowser::OpenPreferred
* Refactor FileBrowser::GetTitleStringId into its own function
* Rewrite OpenSystemFileBrowser using designated initalisers
* Rename dateModified, dateFormatted, timeFormatted properties
The issue here is that fontconfig may report the name of a given
font face in a language specified by the current locale, while the
OpenRCT2 font code checks the result against an English name.
This fix addresses the issue by temporarily changing the environment
LANG variable to use the default C locale, which should guarantee
English/ASCII names are returned by fontconfig. It uses an RAII
mechanism to ensure that the modified environment variable is restored
to its original value on exiting GetFontPath.
The origin of this bug is an issue in the logic for determining
when to wrap 3D sign text on multi-line signs in Paint.LargeScenery.cpp.
When processing the second line, no check was made that the full text
could fit within the sign's bounding box, and so spaces or newlines
were always used to wrap to a (nonexistent) third line, even when
the text would otherwise fit.
This fix addresses the issue by adding a check for this case, when
we're at the end of the text string and the max text width still
hasn't been exceeded. In that case, the best display string is set
to the full current string, rather than the string up to the last space glyph.
This issue, along with several related language-specific
trunctions, was traced back to the fact that ScenarioIndexEntry
uses a fixed-length array of utf8 characters to store the name,
internal name, and scenario details. In some cases, this does
not provide enough characters to contain the full description
and so the safe copy methods truncate them to fit in the
available buffer.
Since the use of fixed-size arrays is a holdover from earlier
C code, this commit addresses the issue by changing ScenarioIndexEntry
to use proper utf8 strings and string views, which do not require
truncation.
* Rename ClimateState to WeatherState
* Rename ClimateCurrent to WeatherCurrent
* Rename ClimateNext to WeatherNext
* Rename ClimateUpdateTimer to WeatherUpdateTimer
* Use named initialisers for weather state import in S4/S6 importers
* Rename S4::ClimateTimer to WeatherUpdateTimer as well
* Rename WeatherState struct properties to lowerCamelCase