1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 14:02:59 +01:00
Commit Graph

172 Commits

Author SHA1 Message Date
Aaron van Geffen
cf516db6dc Split StringTypes.h off from String.hpp; adjust header includes 2024-09-10 23:55:53 +02:00
Gymnasiast
d90897fbee Refactor import flags 2024-08-07 20:15:59 +02:00
Aaron van Geffen
6b72aaed0c Make UtilBitScanForward a header implementation (#22406) 2024-07-28 19:43:07 +00:00
Aaron van Geffen
51816d2bd5 Disambiguate calls to UtilBitScanForward (#22402) 2024-07-28 18:44:59 +02:00
Aaron van Geffen
05e56517ab Adopt existing namespaces into OpenRCT2 namespace (#22368)
* Put all of TitleSequenceManager into the same namespace

* Move RideConstructionState into the OpenRCT2 namespace

* Adopt existing namespaces into OpenRCT2 namespace

This adds `using namespace OpenRCT2` to compilation units where appropriate,
as a means to get the codebase to compile until these units have been placed
in a namespace of their own.
2024-07-26 09:59:58 +02:00
Aaron van Geffen
6de514c387 Address minor code style violation in unsigned suffix (#22306) 2024-07-15 21:16:30 +02:00
Aaron van Geffen
3b42bbb2f3 Include cstdint and cstddef as needed at unit level 2024-07-09 16:49:47 +02:00
Aaron van Geffen
b5ef2693b0 Remove common.h include from all units 2024-07-09 16:45:19 +02:00
Aaron van Geffen
8cef18cd2f Include cassert as needed at unit level 2024-07-09 16:43:03 +02:00
Aaron van Geffen
51873dc0f6 Include Diagnostic.h at unit level 2024-07-09 16:23:31 +02:00
Aaron van Geffen
f9dcc21f05 Replace assert_struct_size macro with static_assert 2024-07-09 15:23:20 +02:00
Aaron van Geffen
749a1d5ac3 Merge pull request #22277 from AaronVanGeffen/calling-conventions 2024-07-12 18:34:33 +02:00
Aaron van Geffen
51bcbe3710 Move UTF8 functions from localisation into core (#22278) 2024-07-12 19:21:15 +03:00
Aaron van Geffen
e3bb105a06 Move SSE41 and AVX2 detection into Platform namespace 2024-07-12 14:38:18 +02:00
Aaron van Geffen
6bea2e8190 Replace custom BitCount implementation with std::popcount (C++20) 2024-07-12 14:35:54 +02:00
Aaron van Geffen
6072545c0c Move FASTCALL and RESTRICT into new CallingConventions.h file 2024-07-09 15:12:11 +02:00
Michael Steenbeek
eaba5f356c Replace assertions in DecodeChunkRLEWithSize() (#22061) 2024-05-19 16:15:18 +02:00
Aaron van Geffen
69c5e6ad9e Move money types into Money.hpp 2024-05-14 16:35:00 +02:00
Michał Janiszewski
3c35558f3f Fix compilation on Arch Linux with GCC 14 (#22031)
Fixes #22029
2024-05-13 22:09:00 +00:00
Aaron van Geffen
9e206d5528 Remove dependency on StringIds.h from Localisation.h (#22011)
* Remove dependency on StringIds.h from Localisation.h

* Include Language.h in UTF8.cpp for function declarations

* Rename tests/Localisation.cpp to tests/LocalisationTest.cpp
2024-05-10 19:14:05 +00:00
Duncan
2884e095c9 Don't include windows.h when not used 2024-05-10 09:27:17 +02:00
Claudio Tiecher
10a5d790c6 Part of #21421: replace define with constexpr (#21760)
* Part of #21421: refactor TUNNEL_MAX_COUNT

* Part of #21421: deleted unused OBJECT_SELECTION_NOT_...

* Part of #21421: refactor MAX_SERVER_DESCRIPTION_LENGTH

* Part of #21421: refactor EXPENDITURE_TABLE_MONTH_COUNT

* Part of #21421: refactor FINANCE_GRAPH_SIZE

* Part of #21421: refactor NETWORK_STREAM_VERSION and _ID

* Part of #21421: MONEY_STRING_MAXLENGTH

* Part of #21421: deleted MAX_USER_STRINGS

* Part of #21421: refactor USER_STRING_MAX_LENGTH

* Part of #21421: deleted USER_STRING_END

* Part of #21421: refactor REAL_NAME_START

* Part of #21421: refactor REAL_NAME_END

* Part of #21421: deleted FONT(X) and FONT_OPENRCT2_SPRITE

* Part of #21421: refactor CURRENCY_SYMBOL_MAX_SIZE

* Part of #21421: refactor CURRENCY_RATE_MAX_NUM_DIGITS

* Part of #21421: refactor SCROLLABLE_ROW_HEIGHT

* Part of #21421: refactor ADD_CLAMP_BODY

* Part of #21421: applied clang-format to Util.cpp

* Part of #21421: incorporate feedback from #21760

* Part of #21421: revert to nbsp in Currency.cpp

* Part of #21421: fix merge conflict

* Part of #21421: fix more merge conflict

* Part of #21421: apply clang format

* Part of #21421: using std::numerics for finding bounds

* Part of #21421: fix reference to kAddClampBody

* Part of #21421: improved on comments about AddClamp func

* Part of #21421: apply correct network stream version number

* Part of #21421: apply clang-format
2024-05-09 08:59:03 -03:00
Michał Janiszewski
7b12667ddb Reduce <algorithm> include (#21947) 2024-05-01 13:47:27 +02:00
Aaron van Geffen
255e89ec37 Refactor TitleScreen to TitleScene; introduce GameScene
Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2024-04-23 21:31:05 +02:00
Michał Janiszewski
49b28f1757 Prefetch paint struct bounds (#21894)
With restored `benchspritesort` this yields around 5% better results.
2024-04-25 14:14:17 +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
mawjMobi
519421d3a3 Ref: #11159 Reduce malloc() and free() usage (#20872) 2023-10-17 08:51:52 +01:00
Matthias Moninger
3ef6003671 Replace openrct2_assert with Guard::Assert, remove openrct2_assert 2023-07-02 16:42:46 +02:00
Matthias Moninger
379287ed0f Remove legacy stuff in common.h (#20523)
* Remove old interop macro

* Remove legacy string macro things

* Unbreak the posix/linux/unix builds

* Add String::IEquals and use it for case insensitive compare

* Add missing include for posix

* Replace _strnicmp with String::StartsWith

* Add LoByte and HiByte into Util.h, swap macros

* Fix android build

* Hopefully last of the string things

* Replace STUB directly with the warning
2023-07-02 12:59:20 +03:00
ζeh Matt
873fff2513 Remove BitCountInit and handle that with static initialization 2023-06-27 22:45:19 +03:00
Aaron van Geffen
d425e0a8bb Remove const qualifier from constexpr statements 2023-06-24 11:45:26 +02:00
Michael Steenbeek
dd624f9bff Replace remaining usages of money16, money32 (#19469)
* Use money64 for ride prices and shop items

* Use money64 for park entrance fee

* Use money64 for gGuestInitialCash

* Use money64 for upkeep costs

* Use money64 for ride value

* Use money64 for marketing campaign cost

* Use money64 for object prices

* Use money64 for land prices

* Use money64 for guest expenditure

* Replace remaining occurrences of money32 with money64

* Update replays

* Bump network version

---------

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-03-02 21:55:42 +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
Hielke Morsink
ba0c8c135a Apply review changes 2023-01-18 23:41:59 +01:00
Hielke Morsink
86ffb01ddd Add comment and rename function pointer 2023-01-18 23:02:44 +01:00
Hielke Morsink
0762fcb601 Rename snake_case functions in OpenRCT2/util folder 2023-01-18 22:44:13 +01:00
Hielke Morsink
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
Gymnasiast
a516dc507e Replace str_is_null_or_empty() with String::IsNullOrEmpty() 2023-01-08 16:19:18 +01:00
Gymnasiast
2f097e99c9 Replace strcasestr() with String::Contains() 2023-01-08 15:41:11 +01:00
Gymnasiast
aa01e21a55 Remove unused strcicmp() 2023-01-08 15:41:11 +01:00
Gymnasiast
6b922eea4a Remove unused safe_strtrunc() 2023-01-08 15:41:11 +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
73
48ba81371f Fix #18600: Some copyright years are not updated
this will address issue report #18600
2022-11-16 11:13:32 +01:00
Hielke Morsink
31dd4bf604 Use lower-case u integral suffix 2022-10-29 16:33:05 +02:00
Hielke Morsink
97a7fcc110 Consistently use literal suffix in upper-case 2022-10-29 16:28:53 +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
3c11e04b52 Fix #17053: Crash when trying to open files under 4 bytes in length 2022-09-28 03:08:27 +02:00
Hielke Morsink
45ac86062a Reduce octaves and add noise for 'jagged' edges 2022-04-28 20:54:57 +02:00
Silent
771637f24c Refactor filename_valid_characters into Platform::IsFilenameValid 2022-03-16 21:56:54 +01:00