Commit Graph
198 Commits
Author SHA1 Message Date
Marino Rottier 6c6acd527b Rename TileElementBase members (#26522)
* Rename TileElementBase members to camelCase

* Rename RCT12TileElementBase and RCT12TileElement members to camelCase
2026-05-17 13:21:16 +00:00
Michał Janiszewski 7e782373a4 Workaround for GCC 16 2026-05-05 21:38:39 +02:00
Aaron van Geffen be84cdb1bb Rename Climate to Weather where appropriate (#26163)
* Introduce OpenRCT2::Weather namespace

* Rename Climate.h/cpp to Weather.h/cpp

* Rename ScClimate.hpp to ScWeather.hpp

* Rename drawing/Weather.h to drawing/WeatherDrawer.h
2026-03-08 11:00:07 +01:00
Aaron van Geffen 1cc7006127 Reorganise game actions into folders (#25987) 2026-02-10 08:57:40 +01:00
Michael Steenbeek 4878894a7e Use PaletteIndex in RenderTarget (#25948) 2026-02-07 23:41:40 +01:00
Michael Steenbeek 3e4261323a Rename some palette indices (#25843) 2026-01-18 21:24:45 +00:00
matheusvb3 f6cbfb91f8 Remove stray semicolons after declarations 2026-01-16 12:43:59 -03:00
matheusvb3 e039662267 Remove redundant namespace qualifiers (#25821) 2026-01-15 13:10:42 +01:00
Gymnasiast a13b1c4e11 Make PaletteIndex into a strong enum and move into namespace 2026-01-07 23:55:30 +01:00
Michael Steenbeek 78a654fcbd Rename missed occurrences of DrawPixelInfo/DPI to RenderTarget/RT (#25768) 2026-01-07 19:58:49 +00:00
Aaron van Geffen 40aaf97c07 Update copyright years to 2026 (#25741) 2026-01-05 13:42:59 +00:00
mix e4958e7314 Add option to command line screenshot to draw debug segment heights 2025-10-21 19:01:01 +00:00
Gymnasiast daa4fe8ac3 Rename field of all config categories 2025-10-07 20:21:32 +02:00
Gymnasiast 45912ec9a3 Rename members of SoundId 2025-10-01 20:35:34 +02:00
Gymnasiast 4158ddfe11 Change CheatType to lowerCamelCase 2025-10-01 20:34:54 +02:00
Gymnasiast 9c810d9e32 Update ParkData fields to new code style 2025-08-21 22:12:41 +02:00
mix b43e3e6727 Add option to draw bounding boxes to command line screenshot command (#24949) 2025-08-12 05:57:20 -03: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
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
Matt 42df41efdb Remove the use of shared_ptr for the Context (#24404)
* Replace shared_ptr with unique_ptr for Context systems, return refs

* Fix all the users

* clang-format fix

* Fix linux builds
2025-05-15 22:46:06 +03:00
Matt 6335c31336 Rename DrawPixelInfo to RenderTarget (#24339)
* Begin backend separation, rename type DrawingPixelInfo to RenderTarget

* Rename dpi variables to rt
2025-05-04 22:06:46 +00:00
ζeh Matt eb6b554d77 Fix screenshots not having a render context 2025-04-25 17:48:37 +03:00
Michael Steenbeek cfb4b008b2 Create weak enum for PaletteIndex 2025-04-09 16:47:22 +02:00
Gymnasiast b26a2953d7 Rename IMAGE_FORMAT and its members 2025-03-26 11:59:12 +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
Gymnasiast 4badffcdb6 Change GameState_t members to lowerCamelCase 2025-03-20 23:05:57 +01:00
Michael Steenbeek 06c1fed4f7 Refactor gScreenFlags to LegacyScene enum 2025-03-05 20:45:04 +00:00
73 c7c703515e Rename audio.h to Audio.h (#23842) 2025-02-17 13:24:03 +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
Matt 92dac978dc Merge pull request #23322 from ZehMatt/drawing-refactor
Refactor some code around the color palette
2024-12-17 20:29:13 +02:00
Aaron van Geffen 6ee798337a Introduce EnumUtils header (#23407) 2024-12-15 17:39:52 +01:00
ζeh Matt 0e1517be4f Move GamePalette into ColourPalette.h, use namespace for it also 2024-12-14 16:21:54 +02:00
Aaron van Geffen 35e117aca2 Rename String methods to use lowerCamelCase 2024-12-11 22:49:37 +01:00
Michael Steenbeek a2ed026264 Split up remaining tile elements 2024-10-15 22:02:31 +02:00
Michael Bernardi 09fa68a803 Revert DPI accessors 2024-09-27 02:50:50 +10:00
Michael Bernardi 8cc53324b6 Remove view width and height from Viewport struct 2024-09-27 00:07:40 +10:00
Michael Bernardi 8212c83965 Rewrite ViewportPaint to handle new DPI coords 2024-09-27 00:07:40 +10:00
Michael Bernardi 4cd5548352 Refactor DPI to distinguish screen and world coords 2024-09-27 00:07:40 +10:00
Aaron van Geffen e8cff5d75f Remove unused ScreenshotDumpPNG32bpp function (#22590) 2024-08-19 16:35:53 +00:00
mrmbernardi 9ed5c63857 Rename Location.hpp constants (#22385) 2024-07-26 10:23:25 +02:00
Aaron van Geffen 3d5c19de08 Drop Localisation.h include where not required 2024-07-13 13:33:32 +02: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 347ce53f26 Re-introduce message on successful screenshot (#21983)
* Re-introduce message on successful screenshot

* Automatically close previous screenshot notices before new ones
2024-05-10 15:04:12 +02:00
Aaron van Geffen ca6f142a97 Remove Config.h include from many places 2024-05-08 22:29:32 +02:00
Michał Janiszewski 7b12667ddb Reduce <algorithm> include (#21947) 2024-05-01 13:47:27 +02:00
Aaron van Geffen 56cbc0eb8a Refactor intro into IntroScene 2024-04-26 20:35:16 +02:00