Commit Graph
134 Commits
Author SHA1 Message Date
Aaron van Geffen 225d3bda2c ParkImporter: rename GetDetails to PopulateIndexEntry 2025-02-18 15:53:53 +01:00
Aaron van Geffen a380413c56 Remove Scenario.h include from many units (#23901)
* Reduce includes/dependencies for Scenario.h

* Remove Scenario.h include from many units
2025-03-01 17:32:32 +01:00
Aaron van Geffen 893d0858cc Bump scenario index version (#23826) 2025-02-15 18:33:25 +00:00
Briar 376cb7980c Fix #9999-#10003: translations have truncated strings
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.
2025-02-15 00:18:24 +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 35e117aca2 Rename String methods to use lowerCamelCase 2024-12-11 22:49:37 +01:00
Aaron van Geffen 0c842d795e Fix .sea files not being listed in scenario index (#23013) 2024-10-17 21:27:25 +02:00
Michael Bernardi f110ea14f5 Apply check-code-formatting changes 2024-10-03 10:49:25 +10:00
Harry Hopkinson 5f0d657bf2 Move gScenarioFileName to GameState 2024-09-07 12:20:32 +02:00
Aaron van Geffen d8bac51044 Simplify ScenarioRepository::GetScenarioInfo massively 2024-09-03 21:12:37 +02:00
Aaron van Geffen 4f7385addb Move SC6 specific code from ScenarioRepository to S6Importer 2024-09-03 21:12:37 +02:00
Aaron van Geffen 229df6d66d Move CSStringConverter from localisation to rct12 folder (#22280) 2024-07-12 20:37:00 +00: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
Michał Janiszewski 7b12667ddb Reduce <algorithm> include (#21947) 2024-05-01 13:47:27 +02:00
Gymnasiast cfff3c53f9 Do not use RCT1/2 limits in TrackDesign.h
Some unrelated files seemingly relied on TrackDesign.h to import RCT2.h for them.
2024-01-03 21:12:53 +01: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 cdb9f4cd18 Fix #20843: Remove 0 padding from file path in scenario index filename 2023-10-04 04:37:27 +03:00
ζeh Matt 67d51c3584 Use u8string for ScenarioIndexEntry Path 2023-08-10 14:39:08 +03:00
ζeh Matt cc89104de0 Remove some macros from common.h 2023-07-27 14:50:13 +03:00
ζeh Matt 3d5e6ea932 Replace Equals with IEquals where appropriate 2023-07-05 23:14:05 +03:00
Michael Steenbeek fe2d1e2372 Small symbol cleanup (#20229)
* Remove unused generate_string_file() declaration

* Move IsUserStringID() to RCT12.h

The function is only used by RCT1/2 code, and the implementation is in RCT12.cpp

* Move ScenarioTranslate() to ScenarioRepository.cpp

Seems to have ended up in ObjectRepository.cpp by accident.
2023-05-17 19:27:04 +01:00
Silent c4b70358c8 More MAX_PATH removals (#20113)
* Refactor FileScanner to lift a MAX_PATH limit

* Replace Platform::EnsureDirectoryExists with Path::CreateDirectory

* Remove MAX_PATH from Platform.Posix.cpp
2023-05-09 20:08:46 +01:00
ζeh Matt 60bd8a4f3a Fix crash at scenario completion 2023-02-19 23:59:16 +02:00
ζeh Matt b057f0fe82 Remove memset 2023-02-19 23:59:15 +02:00
ζeh Matt b465b9d6e5 Use string to store ScenarioIndexEntry name 2023-02-19 23:59:15 +02:00
ζeh Matt 1b216c4d01 Use string to store ScenarioIndexEntry filename 2023-02-19 23:59:15 +02:00
kyphiiandTrevor Finney a428f20d46 Fix #19243: .park scenarios don't complete properly (#19411)
* Check for .park scenario during scenario completion

* Update changelog

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-02-16 05:39:31 +00:00
Matthias Moninger 7b61c6352a Desnake some stuff, small string passing cleanup (#19388)
* Rename scenario_index_entry to ScenarioIndexEntry

* Desnake members of ScenarioIndexEntry

* Pass const u8string& instead of utf8 pointer
2023-02-13 20:30:16 +00:00
Michael Steenbeek d8417fee30 Desnake the rct2/rct12 fields (#19254) 2023-01-22 19:16:41 +00:00
Duncan 7d08372c80 Remove snake_case from Class names OpenRCT2/Ride*-S* (#19232)
* Remove snake_case from Class names OpenRCT2/Ride*-S*

* Clang format
2023-01-20 20:58:55 +00:00
Michael Steenbeek bb55c6ce66 Remove loadsasnakes (#19192)
* Rename snake_case methods in scenario folder

* Rename snake_case methods in title folder

* Rename snake_case methods in object folder

* Rename snake_case methods in platform folder

* Rename snake_case methods in windows folder

* Rename tile_inspector.h to TileInspectorGlobals.h

* Rename snake_case methods in ui/windows folder
2023-01-17 19:46:55 +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
Michael Steenbeek b4480b344e Rename snake_case functions from localisation folder 2023-01-16 23:12:35 +00: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
Michael Steenbeek eeb28e5db8 Close #18591: Order RollerCoaster Tycoon 2 scenarios by difficulty 2022-11-24 13:12:27 +01:00
AuraSpecsandGymnasiast 0a7a50e2c5 Add tab for UCES scenarios
The order of the scenarios is listed in the same order listed on the UCES website. This also allows for translating the scenarios to other languages!

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2022-11-22 15:18:55 +01:00
Hielke Morsink abac080d3e Rename public general config data members 2022-10-16 21:46:01 +02: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
Michael Steenbeek a3b7ac5a90 Create category for DLC and BYO scenarios 2022-09-25 12:59:35 +02:00
skdltmxn 6aabe38590 Improve FileIndex (#17773) 2022-08-13 20:32:59 +01:00
Hielke Morsink e2da19f0f7 Add missing includes 2022-07-29 18:45:10 +02:00
Ted John d56a6a927c Fix #17276: RollerCoaster Tycoon 1 Title screen music not playing 2022-05-28 13:57:42 +02:00
Gymnasiast ffe8b4b45d Undo fspath() workaround for Android 2022-03-18 23:21:23 +01:00
Michael Steenbeek c334c7a176 Merge pull request #16724 from Gymnasiast/refactor/remove-path_get_filename
Remove four old path functions
2022-03-02 22:25:08 +01:00
Michael Steenbeek 5d030da5ae Fix missed occurrence 2022-03-02 21:48:39 +01:00
Hielke Morsink 6ba0a3bd49 Use u8 strings when dealing with file paths 2022-03-01 22:12:39 +01:00
Gymnasiast 49b414a40e Replace calls to path_get_filename() 2022-02-26 17:20:07 +01:00
Michael Steenbeek 5edc561715 Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00