1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00
Commit Graph

28579 Commits

Author SHA1 Message Date
Gymnasiast
490012c6a4 Rename constants in DiscordService.cpp to use kCamelCase 2025-07-04 19:08:27 +02:00
Gymnasiast
8468f87a87 Refactor MarketingCampaignFlags into a FlagHolder 2025-07-04 19:08:26 +02:00
Gymnasiast
600a65b5bf Refactor award effect consts into an enum class 2025-07-04 19:08:26 +02:00
Gymnasiast
af3f61e49b Rename MAX_LANGUAGE_SIZE to kMaxLanguageSize 2025-07-04 19:08:26 +02:00
Gymnasiast
719eb0c6d3 Rename CS_SPRITE_FONT_OFFSET to kCSSpriteFontOffset 2025-07-04 19:08:26 +02:00
Gymnasiast
96e5d124b9 Refactor MEMORY_ACCESS into a FlagHolder 2025-07-04 19:08:24 +02:00
Gymnasiast
8820659a3d Rename SZ_{PRIVATE,PUBLIC}_{BEGIN,END}_TOKEN to k{Private,Public}Key{Begin,End}Token 2025-07-04 18:58:00 +02:00
Gymnasiast
48b0fb5285 Rename VIEWPORT_BUTTON to kButtonSize 2025-07-04 18:57:59 +02:00
Gymnasiast
af406b9ba6 Rename TRACK_DESIGN_INDEX_UNLOADED to kTrackDesignIndexUnloaded 2025-07-04 18:57:59 +02:00
Gymnasiast
0f346b6d55 Rename EXPENDITURE_COLUMN_WIDTH to kExpenditureColumnWidth 2025-07-04 18:57:59 +02:00
Gymnasiast
ad7b8b5496 Rename RCT1_LIGHT_OFFSET to kRCT1LightOffset 2025-07-04 18:57:59 +02:00
LRFLEW
4101fb65a9 Refactor Compression and Streams, and Add IStream Direct Interface 2025-07-04 18:55:17 +02:00
Michael Steenbeek
31d2092b69 Always try mapping footpaths for .park files 2025-07-04 18:54:18 +02:00
Michael Steenbeek
b77aa9a956 Small cleanup of sound range parameters 2025-07-04 18:52:58 +02:00
OpenRCT2 git bot
e8d9663eed Merge Localisation/master into OpenRCT2/develop 2025-07-04 04:07:59 +00:00
Michael Steenbeek
984c251172 Fix changelog entry for #20095
[ci skip]
2025-07-03 23:35:08 +02:00
Michael Steenbeek
0b2ca08180 Add #24710 to changelog
[ci skip]
2025-07-03 23:20:05 +02:00
Michał Janiszewski
763242b14d Add ability to scroll the map with gamepad stick 2025-07-03 22:48:59 +02:00
Michael Steenbeek
9fcbac56bb Revert "Close #1787: Replace blood-curdling scream with regular roller coaster screams" (#24716)
This reverts commit f176b27076.
2025-07-03 21:36:55 +02:00
Michael Steenbeek
f176b27076 Close #1787: Replace blood-curdling scream with regular roller coaster screams 2025-07-03 17:30:59 +02:00
OpenRCT2 git bot
0c01475ce4 Merge Localisation/master into OpenRCT2/develop 2025-07-03 04:09:47 +00:00
Michael Steenbeek
44ca248dbd Merge pull request #24710 from Gymnasiast/nsis-add-czech
NSIS: Fix UTF-8 detection, add Czech
2025-07-02 17:36:21 +02:00
Gymnasiast
86b2b16f64 NSIS: Add Czech translation 2025-07-02 15:28:07 +02:00
Gymnasiast
3073b8db58 NSIS: Assume files without BOMs are UTF-8 2025-07-02 15:28:07 +02:00
Garv Changrani
b47506dd90 Close #24665: Don't return empty strings with quotes for std::string 2025-07-02 13:33:54 +02:00
OpenRCT2 git bot
62418a9588 Merge Localisation/master into OpenRCT2/develop 2025-07-02 04:08:18 +00:00
Ríša Szlachta
2e6cb2fb6f cs-CZ: Add translation to Flathub package 2025-07-01 17:37:19 +02:00
Michał Janiszewski
9747c27664 GCC15 fix in ReplayManager.cpp (#24707)
```
In member function ‘bool OpenRCT2::ReplayManager::SerialiseCommand(DataSerialiser&, OpenRCT2::ReplayCommand&)’,
    inlined from ‘bool OpenRCT2::ReplayManager::Serialise(DataSerialiser&, OpenRCT2::ReplayRecordData&)’ at /home/janisozaur/workspace/openrct2/src/openrct2/ReplayManager.cpp:778:37:
/home/janisozaur/workspace/openrct2/src/openrct2/ReplayManager.cpp:719:38: error: potential null pointer dereference [-Werror=null-dereference]
  719 |             command.action->Serialise(serialiser);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
cc1plus: all warnings being treated as errors
```

```
$ gcc --version
gcc (GCC) 15.1.1 20250425
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
2025-07-01 11:15:09 +00:00
OpenRCT2 git bot
1826c8bcd2 Merge Localisation/master into OpenRCT2/develop 2025-06-30 04:10:46 +00:00
mrmbernardi
5f32624017 RideCreateAction: use constant instead of magic number 2025-06-29 20:54:46 +02:00
Matt
83aca7f374 Merge pull request #24689 from LRFLEW/nocopy
Remove Memory Copy in FileIndex::LoadOrBuild
2025-06-29 20:36:54 +03:00
LRFLEW
8819ae34a4 Remove Memory Copy in FileIndex::LoadOrBuild 2025-06-29 03:53:17 -05:00
OpenRCT2 git bot
118f23aa1c Merge Localisation/master into OpenRCT2/develop 2025-06-27 04:07:37 +00:00
Michael Steenbeek
2815d1958c Fix #18080: Obsolote .DAT objects can be loaded accidentally 2025-06-26 10:57:40 +00:00
OpenRCT2 git bot
e5d3633677 Merge Localisation/master into OpenRCT2/develop 2025-06-26 04:07:30 +00:00
Tulio Leao
eb07bd3e18 Make en-GB consistent with #24628 localisation changes
#24628 removed STR_5553 from all languages but en-GB, which was making the localisation report missing translations on OpenRCT2/Localisation PRs.

Additionally, it added this line break after STR_5816 which seemed unintentional to me.
2025-06-25 19:10:38 +02:00
OpenRCT2 git bot
e17dccae44 Merge Localisation/master into OpenRCT2/develop 2025-06-25 04:08:32 +00:00
Michael Steenbeek
3a09063f58 Merge pull request #24666 from Gymnasiast/fix/24661
Fix #24661: convert console command always crashes with a segmentation fault
2025-06-24 14:00:17 +02:00
Michael Steenbeek
f9b132e24d Remove sorting by difficulty in the scenario selector
This is barely used, complicates the scenario selector and Options window, and will get in the way when adding RCTC and custom campaign support. Time to remove it.
2025-06-24 10:53:26 +00:00
OpenRCT2 git bot
d3dcfb6e1a Merge Localisation/master into OpenRCT2/develop 2025-06-24 04:07:59 +00:00
Gymnasiast
f5acd2ba24 Fix: convert console command rejects files with an SV7 extension 2025-06-24 01:01:50 +02:00
Gymnasiast
f7612d56d0 Fix #24661: convert console command always crashes with a segmentation fault 2025-06-24 01:00:27 +02:00
mix
44decc9ce0 Rename metal support mappings 2025-06-24 00:31:10 +02:00
Cory Sanin
6fc950d38f Feature: Add optional screenshot argument for Z coord 2025-06-24 00:19:24 +02:00
Matt
d8964c5641 Fix #24509: Use std::sort instead of std::stable_sort (#24664) 2025-06-23 18:46:31 +02:00
OpenRCT2 git bot
d130e0dcc8 Merge Localisation/master into OpenRCT2/develop 2025-06-23 04:11:22 +00:00
Kuan-Wei Chiu
339f3ac755 Fix invalid null comparison in RideList sort comparator
The previous comparator returned false when either rideLhs or rideRhs was a nullptr, in an attempt to avoid null pointer dereference. However, this causes both comp(a, nullptr) and comp(nullptr, a) to return false, which violates the requirements of a strict weak ordering.

As defined in the C++ standard, the comparator used in std::sort must establish a strict weak ordering. This includes the requirement that the equivalence relation defined as
equiv(a, b) := !comp(a, b) && !comp(b, a) must be transitive.

In the original logic, two non-null elements a and b might be ordered such that comp(a, b) == true but if both comp(a, nullptr) and comp(b, nullptr) return false, then equiv(a, nullptr) == true and equiv(b, nullptr) == true, which implies equiv(a, b) == true. This contradicts comp(a, b) == true and violates transitivity of equiv.

Such violations can lead to undefined behavior in std::sort, including invalid memory access or segmentation faults.

Fix the comparator to consistently treat nullptr as greater than any non-null pointer, by returning rideLhs != nullptr when either pointer is null. This restores transitivity and compliance with the C++ standard, ensuring reliable and predictable sorting behavior.
2025-06-22 19:33:57 +02:00
Michael Steenbeek
51a5cff021 Merge pull request #24654 from Gymnasiast/refactor/metal-support-names
Rename members of support enums to lowerCamelCase
2025-06-21 23:31:10 +02:00
Gymnasiast
76ad3715bb Rename enum members of WoodenSupportTransitionType to lowerCamelCase 2025-06-21 14:46:32 +02:00
Gymnasiast
f267d6025b Rename enum members of WoodenSupportSubType to lowerCamelCase 2025-06-21 14:37:55 +02:00