1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 07:44:38 +01:00
Commit Graph

1569 Commits

Author SHA1 Message Date
Gymnasiast
6f7987e1c7 Turn MapSelectFlags into FlagHolder 2025-09-11 22:06:10 +02:00
Aaron van Geffen
4446ff9f6f Pass game state ref as parameter to game actions (#25065) 2025-09-08 16:21:29 +02:00
Aaron van Geffen
5a4cc7d00d Remove Network function name prefixes given namespace qualifiers 2025-08-31 16:02:43 +02:00
Aaron van Geffen
12ab9195b6 Rework EntityRegistry into class 2025-08-31 14:29:36 +02:00
Aaron van Geffen
5b8fedd5b2 Rework Map.h includes (remove transitive header includes) 2025-09-04 22:16:53 +02:00
Aaron van Geffen
013fcb3798 Split off MapSelection.h from Map.h 2025-09-04 21:57:36 +02:00
mix
fff4d44b12 Fix glitch and crash panning viewport partially outside game window (#25054) 2025-08-30 12:48:12 +00:00
Michał Janiszewski
1787b1de69 Allow disabling of REPL (#25071) 2025-08-30 12:32:16 +02:00
Aaron van Geffen
abe58f6439 Move ClearAction, GameAction, ScenarioSetSettingAction into GameActions (#25045) 2025-08-29 06:32:05 -03:00
Michael Steenbeek
85a0f70ae1 Fix #12831: Zooming to cursor on land edges sometimes moves the camera incorrectly (#25042)
* Calculate zoom to cursor based on mouse coordinates

* Remove unused function WindowViewportGetMapCoordsByCursor

* Remove unused function WindowViewportCentreTileAroundCursor

* Set viewport pos on zoom to avoid unnecessary draw and shift
2025-08-28 00:11:47 +02:00
mix
dd1cc48ce3 Set viewport pos on zoom to avoid unnecessary draw and shift 2025-08-27 12:07:35 +01:00
Aaron van Geffen
45ad3ec683 Move RideEntranceExit{Place/Remove}/FreezeRating/SetAppearance/SetColourScheme 2025-08-27 10:55:37 +02:00
Aaron van Geffen
1bcee698a9 Move RideSetName/Price/Setting actions into GameActions namespace 2025-08-27 10:47:34 +02:00
mix
677f6c0717 Remove unused function WindowViewportCentreTileAroundCursor 2025-08-27 09:13:05 +01:00
mix
fa92008548 Remove unused function WindowViewportGetMapCoordsByCursor 2025-08-27 09:10:00 +01:00
mix
06579b45d2 Calculate zoom to cursor based on mouse coordinates 2025-08-27 09:05:17 +01:00
Aaron van Geffen
a052437d12 Move Park game actions to GameActions namespace 2025-08-26 20:52:46 +02:00
Aaron van Geffen
620c1f40ef Move Staff game actions into GameActions namespace 2025-08-26 18:34:31 +02:00
Aaron van Geffen
1e059d18d0 Move Guest and Land game actions into GameActions namespace 2025-08-26 15:10:05 +02:00
Aaron van Geffen
e8ef3897df Rework more game actions into GameActions namespace 2025-08-26 14:22:58 +02:00
Aaron van Geffen
19dd05c32f Move landPrice/constructionRightsPrice into Scenario::Options 2025-08-22 16:10:12 +02:00
Aaron van Geffen
aa35ec07cd Introduce Scenario::Options struct; move cash and guest options 2025-08-22 15:57:33 +02:00
Gymnasiast
9c810d9e32 Update ParkData fields to new code style 2025-08-21 22:12:41 +02:00
Aaron van Geffen
ae5cee3879 Move tile elements into OpenRCT2 namespace (#24991) 2025-08-17 11:50:12 -03:00
Tulio Leao
80b5187da9 Rename ride_rating to RideRating_t 2025-08-17 08:49:03 -03:00
Aaron van Geffen
a053a84486 Move all object units into OpenRCT2 namespace (#24980)
* Move all object units into OpenRCT2 namespace

* Dealing with fallout, part 1

* Dealing with fallout, part 2

* Dealing with fallout, part 3

* Apply clang-format in a few more places

* Remove redundant 'virtual' keyword
2025-08-17 06:46:03 -03:00
Aaron van Geffen
e300ca8277 Move .maxBankLoan into ParkData struct 2025-08-13 22:29:25 +02:00
Aaron van Geffen
68a4991971 Move .bankLoan into ParkData struct 2025-08-13 21:24:06 +02:00
Aaron van Geffen
94f40e46ef Move .companyValue into ParkData struct 2025-08-13 21:08:00 +02:00
Aaron van Geffen
b842537616 Move .cash, .cashHistory into ParkData struct 2025-08-13 20:23:14 +02:00
mix
b43e3e6727 Add option to draw bounding boxes to command line screenshot command (#24949) 2025-08-12 05:57:20 -03:00
Joel Teichroeb
a146f38194 Fix #24173: Allow all game speeds between 1 and 8 if developer mode is on (#24270) 2025-08-07 12:10:24 +02:00
Michał Janiszewski
f6292b4c13 Use clang-format 20 (#24861)
https://clang.llvm.org/docs/ClangFormatStyleOptions.html
2025-07-31 11:01:48 +02:00
Michał Janiszewski
763242b14d Add ability to scroll the map with gamepad stick 2025-07-03 22:48:59 +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
Cory Sanin
6fc950d38f Feature: Add optional screenshot argument for Z coord 2025-06-24 00:19:24 +02:00
mix
8d2309a4c2 Change magic numbers to constants in Viewport::Invalidate function 2025-06-13 21:13:34 +01:00
mix
92dd81b9ea Change tile related magic numbers to consts in map animation code 2025-06-13 21:13:34 +01:00
mix
8a5145678c Pass viewport through map animation invalidation functions 2025-06-13 21:13:33 +01:00
mix
e464b2ebe7 Don't invalidate map animations for tiles that are not in view 2025-06-13 21:13:33 +01:00
Hielke Morsink
4d9f56b447 Fix: undefined behaviour in string construction (#24602)
Explicitly used `s` string literal suffix to ensure all concatenations are performed between `std::string` objects. This prevents unsafe implicit conversions and resolves a GCC warning about potential memory overlap caused by mixing raw string literals and `std::string` temporaries.

I ran into this issue when compiling OpenRCT2 for raspberry pi using GCC 12. The error it threw was:

```
In file included from /usr/include/c++/12/string:40,
                 from /usr/include/c++/12/stdexcept:39,
                 from /usr/include/c++/12/system_error:41,
                 from /usr/include/c++/12/bits/fs_fwd.h:35,
                 from /usr/include/c++/12/filesystem:44,
                 from OpenRCT2/src/openrct2/interface/../core/FileSystem.hpp:35,
                 from OpenRCT2/src/openrct2/interface/Screenshot.h:12,
                 from OpenRCT2/src/openrct2/interface/Screenshot.cpp:10:
In static member function ‘static constexpr std::char_traits<char>::char_type* std::char_traits<char>::copy(char_type*, const char_type*, std::size_t)’,
    inlined from ‘static constexpr void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_copy(_CharT*, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:423:21,
    inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_M_replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.tcc:532:22,
    inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:2171:19,
    inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:1858:29,
    inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:3531:35,
    inlined from ‘ScreenshotGetNextPath()::<lambda(int)>’ at OpenRCT2/src/openrct2/interface/Screenshot.cpp:158:41,
    inlined from ‘std::optional<std::__cxx11::basic_string<char> > ScreenshotGetNextPath()’ at OpenRCT2/src/openrct2/interface/Screenshot.cpp:164:39:
/usr/include/c++/12/bits/char_traits.h:431:56: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775811 or more bytes at offsets [3, 9223372036854775807] and 2 may overlap up to 9223372036854775815 bytes at offset -4 [-Werror=restrict]
  431 |         return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));
      |                                        ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/libopenrct2.dir/build.make:2736: CMakeFiles/libopenrct2.dir/src/openrct2/interface/Screenshot.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:89: CMakeFiles/libopenrct2.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
```
2025-06-11 10:00:51 +02:00
Aaron van Geffen
dac097ce64 Rework news options into one tab in the news window 2025-06-10 21:13:05 +00:00
Gymnasiast
757ab61b20 Refactor WidgetFlags to FlagHolder 2025-06-10 19:55:37 +02:00
Gymnasiast
650fa3ae2e Rename WindowWidgetType to WidgetType and change for new code style 2025-06-10 19:55:12 +02:00
Matt
fb834e64aa Merge pull request #24474 from Harry-Hopkinson/more-efficiently-search-viewports
Fix #24426: More efficiently search viewports.
2025-05-29 21:24:14 +03:00
Harry-Hopkinson
2b19320db3 Remove unused function (WindowGetPreviousViewport) 2025-05-27 18:26:08 +00:00
73
6bbb0e8348 Fix typo on VIEWPORT_FLAG_INDEPENDENT_ROTATION
This fixes a typo on a variable.
2025-05-26 12:05:13 +02:00
Harry Hopkinson
994cc858e8 More efficiently search viewports for playing Audio 2025-05-26 08:37:44 +01:00
Harry Hopkinson
371dcc28f5 More efficiently search viewports 2025-05-26 08:37:15 +01:00
Gymnasiast
d2615beb6e Change News enums to use lowerCamelCase 2025-05-24 23:47:18 +02:00