Commit Graph

4131 Commits

Author SHA1 Message Date
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 1a5f4c6952
Offset minimap using screen coords instead 2024-05-13 23:31:06 +02:00
spacek531 6df16c7946
Clean up more ride type references 2024-05-13 09:20:51 +02:00
Aaron van Geffen 57a6b0a00c
Remove STR_VIEWPORT (#22018)
* Remove STR_VIEWPORT

* Remove StringIds.h include from Main.cpp
2024-05-11 18:21:45 +00:00
Harry Hopkinson bda383c236
Fix #22007: Cannot update image of ImgButton from plugins 2024-05-11 13:32:14 +02:00
Aaron van Geffen 96ce7f706f Move widget constants from Windows.h to Widget.h 2024-05-10 22:14:10 +02:00
Aaron van Geffen 738471ff84 Deduplicate button width and alignment code 2024-05-09 12:35:34 +02:00
Aaron van Geffen 1e9bee0c00 Fixup: workaround for std::ranges::reverse_view being too new 2024-05-08 21:52:49 +02:00
Aaron van Geffen 05448222e2 Options: extract common code to ToggleToolbarSetting helper 2024-05-08 21:22:28 +02:00
Aaron van Geffen e423575411 Add a config setting to toggle toolbar mode 2024-05-08 21:19:57 +02:00
Aaron van Geffen 6e607bbb37 Optionally align the toolbar buttons horizontally centred 2024-05-08 20:47:55 +02:00
Aaron van Geffen 16a7e36984 Refactor AlignButtonsLeftRight to use std::ranges::reverse_view 2024-05-08 20:20:33 +02:00
Aaron van Geffen c4fdade375 Fix _topToolbarWidgets indentation 2024-05-08 20:04:32 +02:00
Aaron van Geffen b37e2479c8 Refactor kWidgetOrderLeftGroup, kWidgetOrderRightGroup into std::array 2024-05-08 20:04:13 +02:00
Aaron van Geffen d801882492 TopToolbar: refactor OnPrepareDraw into separate functions 2024-05-08 19:58:27 +02:00
Aaron van Geffen 617003dff6 Use WIN32_LEAN_AND_MEAN in UiContext and Platform 2024-05-10 12:57:05 +02:00
Aaron van Geffen a63d86c488 Introduce Config namespace and struct 2024-05-10 12:10:21 +02: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
Gymnasiast 4cdaaa9810
Refactor slope flags 2024-05-10 20:16:07 +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 ba9c84f835
Move Csg path related functions into their own header (#22004) 2024-05-10 12:05:52 +02:00
Harry Hopkinson 98ac3a1bbc
Replace GfxDrawString() with DrawText() 2024-05-10 09:56:03 +00:00
Michał Janiszewski 63e996194f
Reduce inclusion of FixedVector.h (#21994)
FixedVector class requires use of algorithm include, one of C++'s
heaviest, while in practice it is used only in handful of places.

See #21947 for methodology

372-266=106 #include <algorithm>s fewer
2024-05-09 12:34:18 +00: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 24a2db9fc9
Remove <algorithm> include from Location.hpp (#21993)
See #21947 for methodology

528-372=156 `#include <algorithm>`s fewer
2024-05-09 11:54:40 +00:00
Aaron van Geffen 47d0996b4f
Merge pull request #21981 from AaronVanGeffen/map-window
Rework map window to take map size into account
2024-05-09 10:54:22 +02:00
Aaron van Geffen 81e068c7b2
Merge pull request #21990 from AaronVanGeffen/config-include
Remove Config.h include (and therefore Drawing.h) from many places
2024-05-09 00:00:42 +02:00
Aaron van Geffen a61a561d01 Remove Currency.h include from Localisation.h 2024-05-08 23:41:42 +02:00
Aaron van Geffen ca6f142a97 Remove Config.h include from many places 2024-05-08 22:29:32 +02:00
Aaron van Geffen 8dd22e90b4 Offset small maps to centre of scrollview 2024-05-08 17:40:28 +02:00
Aaron van Geffen 58aa5e0106 Limit map window dimensions based on map size 2024-05-08 16:36:48 +02:00
Aaron van Geffen 779e65d8b2 GameBottomToolbar: use constants for balloon/umbrella/hat sprites 2024-05-07 23:00:46 +02:00
Aaron van Geffen 73c592b137 Guest window: use constants for balloon/umbrella/hat sprites 2024-05-07 23:00:36 +02:00
Aaron van Geffen aeef004710 Prevent map corners from being cut off (original bug) 2024-05-07 13:56:06 +02:00
Aaron van Geffen 0d3c9909b6 Map window: rework to use current map sizes 2024-05-07 13:50:44 +02:00
Aaron van Geffen fa90a84d22
Make construction and removal buttons holdable (#21950)
* Footpath: make construction button holdable

* RideConstruction: make construction button holdable

* Allow repeated removal as well

* Amend changelog
2024-05-05 11:38:49 +00:00
mrmbernardi 489ae58c5c
Close #21825: Only lock OpenGL texture cache when using multi-threading (#21952)
Fixes #21825 by making 'DrawingLocks' which lock only if multi threaded drawing is enabled. Refactors TTF.cpp to use this.

Also cleans up some header files, modernises constants, and removes code to avoid using shared_mutex on MacOS builds. This was originally added because older versions of MacOS didn't support this in the STL.
2024-05-05 10:54:50 +00:00
Michał Janiszewski 7b12667ddb
Reduce `<algorithm>` include (#21947) 2024-05-01 13:47:27 +02:00
Michał Janiszewski ad79699b21
Reduce transient inclusion of `<future>` (#21944) 2024-05-01 12:27:51 +02:00
Michael Steenbeek 921860729b
Merge pull request #21850 from Gymnasiast/backport/brake-stuff
Small backport of changes for #15314
2024-04-30 13:57:37 +02:00
Michael Steenbeek 44c442f832
Fix #21870: Demolishing flat ride in pause mode allows copies 2024-04-30 13:50:04 +02:00
Gymnasiast 00618c79d2
Rename _currentBrakeSpeed2 to _currentBrakeSpeed 2024-04-30 13:39:49 +02:00
Gymnasiast dbbfc2f1d1
Create kMaximumBrakeSpeed 2024-04-30 13:39:49 +02:00
duncanspumpkin f6c34ddd59
Simplify map flashing flags and move into map 2024-04-29 14:10:53 +02:00
duncanspumpkin 4810a72232
Move a number of ui only updates into UiContext tick 2024-04-29 14:10:52 +02:00
Aaron van Geffen 56cbc0eb8a Refactor intro into IntroScene 2024-04-26 20:35:16 +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
Michael Steenbeek be9f1a2072
Merge pull request #21711 from AaronVanGeffen/peep-data
Refactor peep animation data
2024-04-26 20:06:31 +02:00
Harry-Hopkinson 74513374d1 Rename MAX_SERVER_DESCRIPTION_LENGTH to kMaxServerDescriptionLength 2024-04-26 17:56:20 +01:00
Harry-Hopkinson 5ef115941d Rename NETWORK_DEFAULT_PORT to kNetworkDefaultPort 2024-04-26 17:55:23 +01:00