Commit Graph
30759 Commits
Author SHA1 Message Date
mix d7176d3cb0 Remove narrow and inverted blocks in reverseFreefallSlope sequences 2026-10-19 22:49:52 +01:00
mix 2f7ad0cc47 Make height markers on airThrustVerticalDownToLevel equal to up variant 2026-10-19 22:22:32 +01:00
mix 5679873393 Fix #27300: Can't place walls on all tiles of air powered slopes 2026-10-19 22:20:21 +01:00
MarkAlliban 53bbc400e2 Populate scenario.objective.length (the getter already exists) (#27294) 2026-10-18 09:28:19 +02:00
MarkAlliban 105131d5f4 For plugin API, add segmentLength to the ride.stations array (#27298)
This is required for several reasons: calculating soft guest cap for harder guest generation, stat requirements for multi-station rides, etc.
2026-10-18 09:27:25 +02:00
Michael Steenbeek 815ac9352a Fix #27293: ObjectAsset is unable to compile (#27297) 2026-10-17 11:06:44 +02:00
tbarford 9f08662491 Disable building tiny turns after banked pieces (#27288) 2026-10-17 10:02:12 +02:00
Michael Steenbeek e94a6794f5 Merge pull request #27099 from ryanabx/flatpak-portal-object-lookup
Improve object loading speed on slow filesystems
2026-10-17 10:00:34 +02:00
Sjoerd de Bruin 2107821cbe Fix #27286: Headless servers do not write chat logs (#27287) 2026-10-14 18:00:42 +02:00
OpenRCT2 git bot 44de4bf07e Merge Localisation/master into OpenRCT2/develop 2026-10-12 04:13:34 +00:00
csunday95 42184adf10 Close #27199: Move ObjectAsset to its own file (#27205)
Perform the refactor described in #27199, move ObjectAsset to its own cpp file. I also added a brief docstring for the class based on my understanding of its function.
2026-10-11 18:38:30 +02:00
Gymnasiast 99c2f79898 Update changelog 2026-10-11 12:21:28 +02:00
Gymnasiast 96be799e24 Fix code style 2026-10-11 12:16:34 +02:00
Gymnasiast 70f11d3b00 Use tolower in ToLowerAscii() 2026-10-11 12:10:02 +02:00
Ryan Brue 6e4431451f Fix #21030, #26981: Resolve original game files from a cached listing
Every image source of the form `$RCT2:OBJDATA/NAME.DAT` was resolved by
probing that exact name, then the `.POB` name, and on failure by scanning
the object directory recursively. Scanning it stats every entry, so on an
RCT Classic installation -- a single flat `Assets` folder of 2708 lower
case files, which never match the upper case names the shipped JSON
objects ask for -- both probes missed and each object cost a scan of the
whole folder. A park needs hundreds of those, and the cache holding the
results is thread_local on threads that are destroyed together with the
job pool, so the work was repeated on every park load and title sequence
transition.

Stat and open are ~45x more expensive on the FUSE file system Flatpak's
document portal provides than on local disk, which is why this became
unbearable there in particular.

The RCT1/RCT2 data directories are now listed once into a case
insensitive name index that IPlatformEnvironment::FindFile answers from,
so resolving a name costs no file system operations at all. Reading a
listing only needs the names, not the metadata, and the index is dropped
when a base path changes.

Loading test/tests/testdata/parks/bpb.sv6 with RCT Classic game data,
measured with `openrct2-cli screenshot` (byte identical output before and
after):

                        before     after
  document portal       54.5 s     0.45 s
  local disk             2.58 s    0.34 s

Used an LLM to find the problem and generate the patch, and verified the
speedup on my own.

Assisted-by: LLM
Signed-off-by: Ryan Brue <ryanbrue.dev@gmail.com>
2026-10-11 12:03:40 +02:00
Ryan Brue 9c0a1eb8fd Do not query metadata for files that cannot match a search pattern
FileScannerUnix stats every entry it lists in order to read its size and
modified time, but files whose name does not match the search pattern are
never returned by next(). Skipping them before that call cuts the
repository freshness scans at startup from 10832 stat calls to 345 for a
RollerCoaster Tycoon Classic installation, and lets the load/save window
list a directory's sub directories without querying every file in it.

This matters on file systems where metadata operations are expensive: a
stat costs ~60us on the FUSE file system Flatpak's document portal
provides, against ~1.4us on local disk.

Entries whose type readdir did not report are still queried, as they may
be a directory that has to be recursed into.

Used an LLM to find the issue, and generate the patch. Performed my own
testing.

Assisted-by: LLM
Signed-off-by: Ryan Brue <ryanbrue.dev@gmail.com>
2026-10-11 12:03:40 +02:00
Paul Harley e87de05792 Fix #16807: Log and skip invalid object JSON files (#27117) 2026-10-11 09:44:42 +00:00
Richard Fine 41b1cd01bc Refactor: more use of the Direction type and helpers (#27237)
Advance adoption of the 'Direction' type for cardinal directions:

* Split `Direction` and its helpers out to their own header (`Direction.h`)
* Replace loops that iterate all four directions with range-based loops
* Replace some math with calls to helper functions. I also introduced a new `DirectionRotate()` function, a generalisation of `DirectionNext()`/`DirectionPrev()`.
* Replace `uint8_t`/`int32_t` with `Direction` in some function signatures and field types, if the thing being passed/stored is supposed to be a cardinal direction

In the process I also fixed two defects in the code:
* The bitmask used to select the direction from a TD6EntranceElement was too wide - it was grabbing the low 4 bits, but only needs the low 2.
* `CoordsXYZD.toTileCentre()` was taking the tile corner and adding a `CoordsXYZD` value to it, to add half-tile offsets to X and Y. So, it's more correct to add a `CoordsXY` value instead, and skip the unnecessary Z and D dimensions.
2026-10-11 11:26:19 +02:00
Dylan d28122de93 Fix missing commit hash in container-built binaries (#27271)
Git refuses to read the repo inside the container jobs because the
workspace is owned by a different user, so CMake silently gets no
branch or commit hash. Mark the workspace as a safe directory, as
check-code-formatting already does.
2026-10-11 09:14:22 +00:00
Michael Steenbeek 6e42a9fe4c Add #27264 to changelog 2026-10-10 23:34:12 +02:00
Michael Steenbeek c40737c839 Fix #27264: Headless server crashes when loading a recolourable terrain surface (#27265) 2026-10-10 18:09:41 +02:00
Gymnasiast 6f5bd14895 Start v0.5.6+1 2026-10-10 16:03:17 +02:00
Gymnasiast 57f9406c57 Merge branch 'master' into develop 2026-10-10 16:02:50 +02:00
Gymnasiast 82b309798a Release v0.5.6
- Feature: [#16014] Land surfaces and edges can now be recoloured.
- Feature: [#26894] Added 18 additional colours, including 5 from the base version of RCT1 (which were removed in later versions).
- Feature: [#27153] [Plugin] Add `guestsEntertained` to `Entertainer` interface.
- Feature: [#27184] [Plugin] Double limit of miscellaneous entities (e.g. crash particles, steam plumes and balloons) to 6400.
- Feature: [#27254] New title sequence (see https://github.com/OpenRCT2/title-sequences/releases/tag/v0.5.6 for credits).
- Feature: [objects#447] Track designer grid can now be used outside the Track Designer.
- Improved: [#21400] The selector for setting staff patrol areas is now drawn on the water as well as on the surface under water.
- Improved: [#22933] You can now toggle between long and short base flat-to-steep pieces if the ride has both available.
- Improved: [#26947] Rain is now drawn next to the bottom info panels (in RCT2 style).
- Improved: [#27097] On Linux, Flatpak Steam RCTC/RCT2 paths are now auto-detected.
- Improved: [#27110] The option to automatically open shops after construction now also closes them before construction.
- Change: [#27071] The gamepad deadzone has been raised from 11% to 25% by default to compensate for stick drift.
- Change: [#27100] Negative G-forces no longer turn red in the stats window and graph when below -2.50.
- Fix: [#1514] Wrong capitalisation for strings in the Guest List window.
- Fix: [#12516] Sprites past 65,536 pixels are drawn in the wrong place by the software renderer, most visibly in long scenario lists.
- Fix: [#15423] Crash when a guest or handyman uses a bin whose path addition object is not loaded.
- Fix: [#17409] When reading system settings, non-US dollar currencies are not recognised correctly.
- Fix: [#18151] Park value and company value are out of date after loading a save.
- Fix: [#19754, #27109] Some rides in RCT1 saves have a wrong number of cars per train.
- Fix: [#19755, #21320] RCT1 allows more cars per train on some rides than OpenRCT2.
- Fix: [#20882] When setting rides with preservation status in the Scenario Editor, some rides are not shown.
- Fix: [#21576] RCT1 Wooden wild mouse track designs with 2-car trains are not imported correctly.
- Fix: [#22298] [Plugin] Crash when changing a large scenery element whose object is not loaded.
- Fix: [#24457] Yellow is always rendered as third remap in Ride window.
- Fix: [#25400] The Inverted Flying RollerCoaster draws upright Twister track pieces for pieces it doesn’t have.
- Fix: [#26222] ‘Follow this on Main View’ follows the invisible first car on ride types that have one, making the view turn too early.
- Fix: [#26754] Switching window tabs by touch could crash the game on some Linux builds.
- Fix: [#26998] Crash when generating a `Simplex Height Map` with a higher width than height.
- Fix: [#27052] Unnamed rides in RCT2 base and Wacky Worlds scenarios have hardcoded English names.
- Fix: [#27056] [Plugin] Loading water palettes from plugin does not update the palette correctly.
- Fix: [#27070] The game keeps responding to input while the window is not focused (primarily gamepads).
- Fix: [#27084] [Plugin] `PermissionType` for `drag_path_area` is missing.
- Fix: [#27087] The ‘Update available’ widget is offset incorrectly.
- Fix: [#27093] Pause and fast forward buttons are shown in multiplayer.
- Fix: [#27113] Chat button is shown in editor mode.
- Fix: [#27133] [Plugin] Dropdown and spinner are not fully hidden with isVisible on creation.
- Fix: [#27134] Viewing track designs may cause network desyncs.
- Fix: [#27136] Guests keep waiting at a level crossing after the train has passed, due to faulty iteration over the track the train has vacated.
- Fix: [#27212] Chain lifts are blue in screenshots taken from the command line.
- Fix: [#27218] Tile inspector coordinate spinners are too short for coordinate 1000.
- Fix: [#27233] `openrct2 parkinfo objects` crashes when called with a scenario instead of save.
- Fix: [#27234] [Plugin] Setting `TrackElement.seatRotation` fails on every ride except mazes, where it does not apply.
2026-10-10 13:57:21 +02:00
Gymnasiast 473662d899 Merge branch 'develop' 2026-10-10 13:54:18 +02:00
Gymnasiast 67427972a2 Update backtrace.io token 2026-10-10 13:53:50 +02:00
RayKoopa 89ec0da210 Retain land colours even when styles are inactive (#27228) 2026-10-10 13:11:49 +02:00
Hielke Morsink 33aacdeb0d Update title sequence to latest release (v0.5.6) (#27254) 2026-10-08 00:22:05 +02:00
Michael Steenbeek c4aea2c72e Merge pull request #27239 from Gymnasiast/refactor/park-info-objects
Fix "openrct2 parkinfo objects" crashing every time
2026-10-07 13:54:37 +02:00
OpenRCT2 git bot 57121f0ee9 Merge Localisation/master into OpenRCT2/develop 2026-10-07 04:06:16 +00:00
OpenRCT2 git bot bf79fb582c Merge Localisation/master into OpenRCT2/develop 2026-10-06 04:06:01 +00:00
OpenRCT2 git bot 21afdbc550 Merge Localisation/master into OpenRCT2/develop 2026-10-05 04:10:58 +00:00
Michael Steenbeek 2b2ae307fb Merge pull request #27244 from Gymnasiast/refactor/palette-fixes
Small tweaks to Palette.cpp
2026-10-04 22:23:07 +02:00
Gymnasiast 2a09af4158 Make gGamePalette internal to Palette.cpp 2026-10-04 21:12:32 +02:00
Gymnasiast f7f83c0c26 Move index 255 fix from UpdatePalette() to LoadPalette()
Doesn’t need to be done that often.
2026-10-04 21:11:52 +02:00
RayKoopa 13e6599dc4 Do not set land tool gLandToolTerrainSurface to MapGen selection (#27243) 2026-10-04 20:23:50 +02:00
Michael Steenbeek 66449cee0e Merge pull request #27231 from Gymnasiast/refactor/more-gamestate-stuff
Remove getGameState() calls from import and news, move news to ParkData
2026-10-04 16:11:57 +02:00
Michael Steenbeek 497f9ae7d4 Fix #27235: RCT1 base game TD4 files don't import with original car colours (#27241) 2026-10-04 16:11:36 +02:00
Gymnasiast b8a0f76804 Move news items to ParkData, make news function take a reference to the queues 2026-10-04 14:10:36 +02:00
Gymnasiast a487d4cc74 Remove getGameState() calls in importer code 2026-10-04 13:56:25 +02:00
Michael Steenbeek 5f4e4434bb Fix #27236: Expanding map does not copy recolourable landscape colours (#27240) 2026-10-04 13:39:58 +02:00
Gymnasiast d71dadb7a5 Add missing comma to comment 2026-10-04 11:54:30 +02:00
Gymnasiast 02133a10bb Add missing object types to kTypeToName, guard against out of bounds read 2026-10-04 11:54:29 +02:00
Gymnasiast dff8086726 Fix #27233: openrct2 parkinfo object segfaults when called with a scenario 2026-10-04 11:54:29 +02:00
Gymnasiast 5417ea3fba Fix "openrct2 parkinfo objects" crashing every time 2026-10-04 11:39:14 +02:00
Gymnasiast d4ca070ece Add missing part of STR_5587 2026-10-04 10:15:19 +02:00
OpenRCT2 git bot f44e1939eb Merge Localisation/master into OpenRCT2/develop 2026-10-04 05:21:13 +00:00
GhostCoder6969 5d86c6be37 Fix three small spelling mistakes (#27232) 2026-10-04 00:14:34 +02:00
Guy Sviry 9507bf486a Fix TrackElement.seatRotation setter rejecting every ride except mazes (#27234)
The maze check in ScTileElement::seatRotation_set was inverted, so the
setter refused every track element except maze ones, the only ride type
seat rotation does not apply to. Use the same check as the getter.
2026-10-04 00:13:00 +02:00
Michael Steenbeek bc0b670487 Merge pull request #26894 from Gymnasiast/feature/rct1-gold-colour
Add gold colour from RCT1 (and a few more)
2026-10-03 21:12:11 +02:00