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
* Part of #21421: refactor TUNNEL_MAX_COUNT
* Part of #21421: deleted unused OBJECT_SELECTION_NOT_...
* Part of #21421: refactor MAX_SERVER_DESCRIPTION_LENGTH
* Part of #21421: refactor EXPENDITURE_TABLE_MONTH_COUNT
* Part of #21421: refactor FINANCE_GRAPH_SIZE
* Part of #21421: refactor NETWORK_STREAM_VERSION and _ID
* Part of #21421: MONEY_STRING_MAXLENGTH
* Part of #21421: deleted MAX_USER_STRINGS
* Part of #21421: refactor USER_STRING_MAX_LENGTH
* Part of #21421: deleted USER_STRING_END
* Part of #21421: refactor REAL_NAME_START
* Part of #21421: refactor REAL_NAME_END
* Part of #21421: deleted FONT(X) and FONT_OPENRCT2_SPRITE
* Part of #21421: refactor CURRENCY_SYMBOL_MAX_SIZE
* Part of #21421: refactor CURRENCY_RATE_MAX_NUM_DIGITS
* Part of #21421: refactor SCROLLABLE_ROW_HEIGHT
* Part of #21421: refactor ADD_CLAMP_BODY
* Part of #21421: applied clang-format to Util.cpp
* Part of #21421: incorporate feedback from #21760
* Part of #21421: revert to nbsp in Currency.cpp
* Part of #21421: fix merge conflict
* Part of #21421: fix more merge conflict
* Part of #21421: apply clang format
* Part of #21421: using std::numerics for finding bounds
* Part of #21421: fix reference to kAddClampBody
* Part of #21421: improved on comments about AddClamp func
* Part of #21421: apply correct network stream version number
* Part of #21421: apply clang-format