Commit Graph
84 Commits
Author SHA1 Message Date
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
Michał Janiszewski 82f37d006c Prepare Platform, File, FileStream for handling embedded assets 2026-03-22 17:44:26 +01:00
matheusvb3 e039662267 Remove redundant namespace qualifiers (#25821) 2026-01-15 13:10:42 +01:00
Aaron van Geffen 40aaf97c07 Update copyright years to 2026 (#25741) 2026-01-05 13:42:59 +00:00
Michael Steenbeek a7dd47f48b Fix #24952: Duplicate track designs when running via Steam without having RCT1 linked 2025-11-26 15:43:39 +00:00
Gymnasiast daa4fe8ac3 Rename field of all config categories 2025-10-07 20:21:32 +02:00
Gymnasiast 7c1805b061 Add support for RCT Classic+ as a source 2025-04-17 21:20:59 +02:00
Michael Steenbeek 87765d662d Close #21767: Cannot select macOS version of RCTC as source 2025-04-11 17:00:57 +02:00
Gymnasiast 5b7793f77b Rename SPECIAL_FOLDER and its members 2025-03-26 12:06:31 +01:00
Gymnasiast 74758c77b6 Rename PATHID and its members 2025-03-25 23:57:36 +01:00
Gymnasiast 14b881e22b Rename DIRID and its members 2025-03-25 23:39:27 +01:00
Gymnasiast 622a8dc525 Rename DIRBASE and its members 2025-03-25 22:47:09 +01:00
Michael Steenbeek be9f27e4f9 Mass rename constants (#23656) 2025-01-19 15:59:45 +00:00
Aaron van Geffen fa06a49302 Update copyright year to 2025 (#23514) 2024-12-31 20:30:04 +01:00
Aaron van Geffen 6ee798337a Introduce EnumUtils header (#23407) 2024-12-15 17:39:52 +01:00
Aaron van Geffen 35e117aca2 Rename String methods to use lowerCamelCase 2024-12-11 22:49:37 +01:00
Tulio Leao e7ee0ba63a Implement ScenarioPatcher with FixLandOwnership capabilities 2024-08-19 19:52:13 -03:00
Aaron van Geffen 51873dc0f6 Include Diagnostic.h at unit level 2024-07-09 16:23:31 +02:00
Aaron van Geffen a63d86c488 Introduce Config namespace and struct 2024-05-10 12:10:21 +02:00
Aaron van Geffen a627cf7a1e Remove Drawing.h include from Config.h 2024-05-08 23:18:53 +02:00
Harry-Hopkinson 3247d16ed8 Replace size_t's with EnumValue 2024-03-04 19:21:12 +00:00
James103 1d8dc111f1 Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00
ζeh Matt 19f09dae14 Refactor PlatformEnvironment to avoid static initialization 2023-11-25 16:58:28 +02:00
Michael Steenbeek cf9aad7885 Close #19214: Use consistent casing for RC and RCT (#19230) 2023-01-20 08:19:14 +00:00
Hielke Morsinkandduncanspumpkin 6b7dc8fcdb Rename snake_case functions in openrct2/src folder
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 13:24:51 +01:00
karstandGymnasiast 43bcd2cf07 Add tab to About window to show contributors.md
Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2023-01-14 00:56:20 +01:00
James103 73738bbdc8 Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
Hielke Morsink 5fa53ad528 Rename global config functions to use TitleCase 2022-10-16 21:46:08 +02:00
Hielke Morsink abac080d3e Rename public general config data members 2022-10-16 21:46:01 +02:00
Ted John 331a5961b1 Implement asset packs for audio 2022-10-01 13:06:52 +01:00
73 b9e677945d Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Gymnasiast 6d3a3cec76 Apply review requests 2022-08-31 23:02:52 +02:00
Ted John 9699c9db9e Add support for RCT Classic audio files 2022-08-31 22:48:26 +02:00
Ted John 7d5e2e815e Support RCT Classic ride music 2022-08-31 22:48:26 +02:00
Ted John 85a66c67ac Add initial support for RCT Classic 2022-08-31 22:48:26 +02:00
Ted John d56a6a927c Fix #17276: RollerCoaster Tycoon 1 Title screen music not playing 2022-05-28 13:57:42 +02:00
Hielke Morsink 6ba0a3bd49 Use u8 strings when dealing with file paths 2022-03-01 22:12:39 +01:00
Hielke Morsink 55c71b0c74 Properly use utf8 strings where expected 2022-03-01 22:12:39 +01:00
Michael Steenbeek 5edc561715 Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00
Silent 5028ce3bf6 Turn GeneralConfiguration::rct1_path into an u8string
Fixes a crash when opening Advanced Options on the first launch
2022-02-12 16:07:04 +01:00
Michael Steenbeek 14374478a7 Use u8string_view in CSG functions (#16532) 2022-01-28 23:57:31 -03:00
Michael Steenbeek 149b164ee8 Use u8string for custom paths 2022-01-27 14:21:46 +01:00
Michael SteenbeekandTed John ff909cc286 Change rct2_path into a C++ string
Co-authored-by: Ted John <ted@brambles.org>
2022-01-05 15:18:25 +01:00
ZehMatt 47287e7fb1 Save crash dumps into a separate directory 2021-07-27 18:39:13 +03:00
Ted John e7ae9f9f15 Read legacy shortcuts and move to constants 2021-02-21 03:14:17 +00:00
Aaron van Geffen 7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Michael Steenbeek e83b86df4d Replace occurrences of OpenRCT with OpenRCT2 (#11898) 2020-06-08 15:11:07 +02:00
Michael Steenbeek 9ef8d6da42 Convert most remaining C-style casts to C++-style ones (#11867) 2020-06-07 23:18:11 +02:00