Creating the scenario cache file tried to read the guest count as signed 16 bit value which doesn't work for values > 32k. In addition ObjectiveArg3 (variable to store guest count) is an signed value, unable to store 50k guests.
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
* Clean up internal localisation header includes
* Remove some external localisation includes
* Remove dependency on FormatCodes.h from InteractiveConsole.h
* Reduce Formatter.h, Localisation.Date.h includes
* Move WindowInvalidate and WidgetInvalidate families into WindowManager
* Use InvalidateWidget shorthand in more places
* Cut back on UiContext includes
* Cut back on Window.h includes
* Remove outdated parameter comments
* Replace WindowClose() calls with Close method calls where possible
* Move WindowClose family into WindowManager
* Remove UpdateSceneryGroupIndexes hack
* Wrap global game state in a unique_ptr
* Make ImportTileElements, SetTileElements use game state passed
* Make ImportParkName, ImportSavedView use game state passed
* Make ImportPeepSpawns use game state passed
* Make FixEntrancePositions use game state passed