* Allow flag/bitmask coexistence in readers
* Add factory helpers and bulk setters for per-widget flags
* Switch coexistence from OR-both to per-window opt-in
* Migrate seven small windows to per-widget flags
* Migrate seven more windows to per-widget flags
* Migrate Cheats, MapGen and Footpath to per-widget flags
* Fix#26421: scenery tab highlight wraps when there are 64+ groups
* Migrate Ride window to per-widget flags
* Migrate ride and maze construction windows to per-widget flags
* Migrate six more windows to per-widget flags
* Migrate Banner, EditorScenarioOptions and RideList to per-widget flags
* Migrate SceneryScatter and LoadSave to per-widget flags
* Migrate EditorObjectSelection, GameBottomToolbar, Guest, Map, NewRide and Park to per-widget flags
* Migrate TopToolbar, TrackList, Research, Player and Options to per-widget flags
* Opt in remaining windows to per-widget flags
* Narrow getters and setters to per-widget flags
* Remove bitmask fields and useWidgetFlags switch
* Restore switch statements for tab/density pressed state
* Add makeHoldableSpinnerWidgets to drop per-page loops
* Update tests for per-widget flag storage
* Add changelog entry for #26421
* Reword narrative-tense comments from the migration
* Fix clang-format violations
* Remove dead holdable-widget tables from Park and Finances
The scripting engine's `ExecutePluginCall` by default frees its `JSValue` arguments.
When `HookEngine::Call` iterates over multiple subscribers, the first call would free
the argument, leaving subsequent subscribers with an invalid pointer (use-after-free).
This commit fixes the issue by duplicating the `JSValue` for each subscriber and
ensuring the original value is correctly managed based on the `keepArgsAlive` flag.
A new C++ headless test `ScriptingTests.cpp` is added to verify the fix and prevent
future regressions.
Corrupted RCT1/RCT2 save files may contain entities with duplicate or invalid EntityIndex values and when importing these saves, CreateEntityAt returns nullptr for duplicate indices, causing a null pointer dereference crash in ImportEntityCommonProperties, this sanitises each entity's (entities?) EntityIndex to match its array position, so that CreateEntityAt always succeeds. Added unit tests too for just this case, with a crashing save file.
* Remove dependency on StringIds.h from Localisation.h
* Include Language.h in UTF8.cpp for function declarations
* Rename tests/Localisation.cpp to tests/LocalisationTest.cpp
* Split FileStream declarations and definitions
* Split JobPool declarations and definitions
* Split StringBuilder declarations and definitions
* Split StringReader declarations and definitions
* Split ZoomLevel declarations and definitions
* Fix missing include in FileClassifier.cpp
* Remove pragma once from source files
* Fix missing include in StringBuilder.h
* Update Xcode project
* Fix compilation of tests
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
The code being removed in the patch tries to fast forward a peep into the ride when it is the second peep for a vehicle that is used in pairs. Problem is that funds checking does not happen, so it happens that a peep may pay against its will.
Lets say a rich peep enters in line and a poor peep enters in line right after.
If the price of the ride is such that the rich peep can pay and the poor peep can't, it will be dragged into the ride because funds checking only happened for the first.
The second part of the patch just adjusts we consider the vehicle a full car if the second position is filled.
Add test to verify that a peep is not dragged into a ride it can't pay
This test puts two peeps in a Ferris Wheel. The first peep is rich and the second peep is poor. When they are both in line, the ride price is raised so that the poor peep can't pay.
Make sure the poor peep turns back and leaves the ride.
During development, a mistake in the logic would have broken all rides other than ferris wheels in a way that multiple guests could enter the same car.
Also add a test to make sure that is never broken.