Commit Graph

15471 Commits

Author SHA1 Message Date
Richard Fine d21da12f9f
Fix 11414: ‘Possible misuse of comma operator’ warnings (#12919)
Fix the ‘possible misuse of comma operator’ warnings reported by XCode - the two original ones reported in #11414, plus one more in Util.cpp.
2020-09-13 17:43:59 +01:00
Ted John e79d4be5a5 Add quadrant and occupiedQuadrants to plugin API 2020-09-13 17:02:12 +01:00
Ted John 146a754001 Add plugin API for scenario and objective 2020-09-13 17:02:12 +01:00
Ted John e5107141e9 Add plugin API for park flags 2020-09-13 15:00:09 +01:00
Michael Steenbeek cf5b48a9dd
Rename Rain.{cpp,h} to Weather.{cpp,h} (#12914) 2020-09-12 19:32:26 -03:00
Sadret a9cd89d02e
Fix #12912: Plugin: selectedCell of CustomListView (#12913) 2020-09-12 19:24:23 -03:00
Richard Fine 4a20ed38a8 Document public API for pathfinder
Add comments explaining the externally-visible points in the pathfinding code.
2020-09-12 14:59:40 -04:00
Richard Fine 542eb873fc Consolidate pathfinding code
Consolidate all the guest pathfinding code from Peep.cpp into GuestPathfinding.cpp, and make a dedicated header for GuestPathfinding to help make it easier to see what the actual public interface is to the pathfinding system.
2020-09-12 14:59:40 -04:00
Gymnasiast 247de81e3b
Apply requested fixes 2020-09-12 13:45:50 +02:00
Ron4u 5fe542dd25
fixed issue 12335 2020-09-12 13:18:00 +02:00
Ted John eb18a5db81
Fix #12910: Plugin API: getRide sometimes returns null for valid IDs 2020-09-12 12:18:24 +02:00
Tulio Leao 917fb77f0e Revert regressed warning on window_install_track_paint 2020-09-10 21:19:53 -03:00
Tulio Leao c2f42cd908 Fix #12901: Guest thoughts show up as guest actions or names 2020-09-10 21:18:42 -03:00
Tulio Leao 2f3d455b3a
Merge pull request #12899 from Gymnasiast/refactor/c-style-casts
Remove most remaining C-style casts
2020-09-10 20:49:15 -03:00
Aaron van Geffen c0e551056f
Fix #12900: Garbled/distorted date lines in file browser (#12902)
* Fix #12900: Garbled/distorted date lines in file browser
2020-09-10 20:47:39 -03:00
ju-pinheiro 214620951f Close #12421: Refactor NETWORK_AUTH to use strong enum
Replacing enum NETWORK_AUTH with enum class NetworkAuth.
2020-09-10 19:32:28 -03:00
ju-pinheiro 20a8bbc322 Close #12420: Refactor NETWORK_PERMISSION to use strong enum
First approach, instead of a bigger refactor to avoid the need of "static_cast".
2020-09-10 19:32:27 -03:00
Tulio Leao 55f2eeb04d
Favour constexpr function over macro on Crypt.CNG.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao 720c17eea6
Cleanup c-style casts from Platform.Win32.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao e032ba091d
Cleanup c-style casts from Shared.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao 2a85374c6a
Cleanup c-style casts from Windows.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao cf5f3da0df
Cleanup c-style casts from Socket.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao fc59cb55a5
Cleanup c-style casts from Path.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao 9d2a9d76d3
Cleanup c-style casts from String.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao 5f47546392
Cleanup c-style casts from Http.WinHttp.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao 5afe6407a1
Cleanup c-style casts from FileWatcher.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao 5abbbf1357
Cleanup c-style casts from Crypt.CNG.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao cb7e190c8a
Cleanup c-style casts from File.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao de58f0f7a0
Cleanup c-style casts from FileScanner.hpp 2020-09-10 21:36:21 +02:00
Gymnasiast c83ddefe47
Convert remaining C-style casts to C++-style ones 2020-09-10 21:36:20 +02:00
Michał Janiszewski d8ffec0ed7
Use correct count of research items when importing park
Co-authored-by: Hielke Morsink <Broxzier@users.noreply.github.com>
Co-authored-by: Michael Steenbeek <Gymnasiast@users.noreply.github.com>
2020-09-10 21:01:14 +02:00
Duncan 353c02b596
Add visitors for all scenery placement and removes (#12886)
* Add visitors for all scenery placement and removes

This should allow greater flexibility for plugin developers

* Add CoordsXYZ visitor

* Increment plugin API version. Update changelog
2020-09-10 15:15:46 -03:00
tellovishous 96945183f5
Add stroke to lowercase 'L' to differentiate from capital 'I' (#12890)
The problem with many sans-serif fonts, such as those in RCT2, is that it can be difficult to tell between a lowercase L and an uppercase I, and can be visually ambiguous. What I've done is add a small stroke to the bottom of the lowercase L's so that it will stand out better when it's used next to capital I's.
2020-09-10 20:07:12 +02:00
Tulio Leao 4afbbed9bd
Fix #12881: Guests' favourite rides not listed in the guest window 2020-09-10 19:11:17 +02:00
Gymnasiast d140dd72c6
Remove const void* overload from DrawTextEllipsised() 2020-09-10 18:13:13 +02:00
Gymnasiast b788a099b5
Replace gfx_draw_string_clipped() calls with DrawTextEllipsised 2020-09-10 18:13:13 +02:00
Tom Parsons 9a30100a81
Make all GameAction types accessible to plugins (#12708)
* add ActionType

* Make all game actions available to plugins

Includes list of game actions in the .d.ts

* Add an overload for internal game actions

This allows things like Visual Studio Code to autocomplete

* action can be a string (custom gameactions)

* Increment OPENRCT2_PLUGIN_API_VERSION

* Add #12708 to changelog and tombomp to contributors.
2020-09-10 12:30:56 +01:00
Aaron van Geffen 11ebe78328
Refactor window offset std::arrays into regular arrays (#12799) 2020-09-09 22:51:51 +02:00
Michael Steenbeek ba7b08acfc
Merge pull request #12665 from Gymnasiast/refactor/objective-struct
Create Objective struct and use it for global objective
2020-09-09 22:34:33 +02:00
Michael Steenbeek bd28b74655
Make all game actions take an ObjectEntryIndex where applicable (#12384)
* Make all game actions take an ObjectEntryIndex where applicable

* Update replays for parameter size change

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-09-09 17:03:20 +01:00
Gymnasiast e23089d255
Make scenario check into member functions 2020-09-09 15:39:07 +02:00
Gymnasiast 6e22eade67
Create Objective struct and use it for global objective 2020-09-09 15:38:03 +02:00
Richard Fine d2d9750a5b Fix #5753: Entertainers make themselves happy instead of the guests
After identifying guests that are near an entertainer, modify the guest's HappinessTarget and TimeInQueue values instead of the entertainer's own values.
2020-09-08 16:40:29 -04:00
Jacob Schwartz fe71ce437d
Close #12434: Refactor ENTERTAINER_COSTUME to use strong enum (#12865) 2020-09-08 16:29:18 -03:00
Michael Steenbeek 30ffced8b9
Merge pull request #12880 from richard-fine/directions
Further clean up of direction-handling code
2020-09-08 18:16:25 +02:00
Richard Fine 6e176e725c Fix formatting 2020-09-07 22:27:33 -04:00
Richard Fine 51fdf84763 Use Direction type for TrackPaint functions
Many TrackPaint functions take a direction, but they used a mixture of uint8_t and int32_t types for the parameters. To make the semantics of the code clearer, use the dedicated Direction type for all of them.

This does mean that some parameters which were previously 32 bits (int32_t) will now be 8 bits (Direction) but from what I could see none of the usages make use of anything beyond the bottom 4 bits.
2020-09-07 21:20:34 -04:00
Richard Fine 74b581c572 Remove unused 'direction' parameter
The get_track_paint_function functions have all been taking an extra 'direction' parameter, but nothing is actually using it. To simplify things, remove the parameter.
2020-09-07 21:20:34 -04:00
Richard Fine 4d3ba7a6f0 Rename PathElement::Edges for clarity
PathElement::Edges actualy stores both 'edges' (in the lower 4 bits) and 'corners' in the upper four. Rename the variable to make this dual usage easier to see.
2020-09-07 21:20:34 -04:00
Michael Steenbeek 6ac23fbabb
Make Arabic font easier to read 2020-09-07 19:21:32 +02:00
Hielke Morsink 96d1db97e0
Fix: Unused variable warning because of if constexpr (#12871)
This moves the variable in question to the scope where it gets used. Since it's a reference, this shouldn't be a performance hit.
2020-09-06 22:22:49 +02:00
Nils Caspar 4e6935f689
Consistently render various height marks when zoomed in (#12853) 2020-09-06 08:56:41 +01:00
Gymnasiast d5ff5712b9
Add drawing code for the Esperanto characters 2020-09-05 22:58:00 +02:00
chess123mate 83de5fab2a
Fix #12818 - Ride prices not ignored in free-rides parks (#12832) 2020-09-05 11:10:42 -03:00
Duncan e24c897cad
Fix #12857: Incorrect thought arguments for RCT1 import 2020-09-05 13:24:26 +02:00
Ted John c7b8a63fa9 Fix network enum 2020-09-03 22:38:42 +01:00
Ted John 858bb4045f Explicitly close sockets when plugin is stopped 2020-09-03 22:38:42 +01:00
Ted John 33ba51b763 Fix crashes and improve socket lifecycle 2020-09-03 22:38:42 +01:00
Ted John 0bddf5a5db Rename SocketServer to Listener 2020-09-03 22:38:42 +01:00
Ted John 173a42f656 Apply code review suggestions 2020-09-03 22:38:42 +01:00
Ted John 1c91404707 Add more network guards 2020-09-03 22:38:42 +01:00
Ted John fd6fddb61a Improve WSA handling 2020-09-03 22:38:42 +01:00
Ted John 7dfb748500 Add listening property 2020-09-03 22:38:42 +01:00
Ted John 5da5804f84 Add localhost limitation 2020-09-03 22:38:42 +01:00
Ted John 703dc1efa7 Add ability to connect 2020-09-03 22:38:42 +01:00
Ted John 182bcaf21a Implement setNoDelay 2020-09-03 22:38:42 +01:00
Ted John 7a5cb8a5b6 Refactor events into EventList class 2020-09-03 22:38:42 +01:00
Ted John dce547af99 Start implementing TCP API 2020-09-03 22:38:35 +01:00
Nils Caspar 359bbee9f5
Fix #12845: Cancel marketing campaigns for demolished rides (#12848) 2020-09-03 18:20:42 -03:00
Duncan c0255efeaa
Create an enum class serializer (#12810)
* Create an enum class serializer

* Make visitor work again

* Make suggested changes
2020-09-03 21:55:46 +01:00
Nils Caspar bc33ef3d43
Add Park.entranceFee to the plugin API (#12840) 2020-09-03 17:07:19 -03:00
Nils Caspar 22f29bf192
Close #12414: Refactor GUEST_LIST_FILTER_TYPE to use strong enum (#12830) 2020-09-02 12:50:16 -03:00
Simon Ellmann 5f3fe62f83
Close #12432: Refactor STAFF_MODE to use strong enum (#12752)
* Refactor STAFF_MODE to use strong enum

Closes #12432

* Change type of gStaffModes to StaffMode
2020-09-02 12:48:40 -03:00
Nils Caspar ae81ed63cc
Remove unused constant TAB_HEIGHT in Cheats.cpp (#12838) 2020-09-01 22:58:06 +02:00
Michael Steenbeek 55722a7ad4
Remove commented-out code (#12834) 2020-09-01 15:33:52 -03:00
Simon J f7acb84e42
Fix #400: unable to place some saved tracks flush to the the ground (#12721) 2020-09-01 18:26:44 +02:00
Tulio Leao 4e58eae43d
Merge pull request #12808 from gguedesaz/fix-stringbuilder
Part of #11159: Refactor on StringBuilder.hpp
2020-09-01 00:48:55 -03:00
Gabriel Guedes 95ae589750 Part of #11159: Prefer std::basic_string<utf8> over raw pointer
Usage of std::basic_string to improve readability and maintainability.
2020-08-31 21:06:02 -03:00
Julia Pinheiro dafde532af
Close #12426: Refactor NETWORK_READPACKET to use strong enum (#12807)
Replacing enum NETWORK_READPACKET with enum class NetworkReadPacket.
2020-08-31 09:13:15 -03:00
Aaron van Geffen e9803fc4b5
Fix #12820: Title menu buttons not invalidating properly (#12821)
This introduces constants for the title menu buttons to ensure this does not happen again.
2020-08-30 23:30:02 +02:00
Aaron van Geffen 5825dedd81
Rename TitleScenarioSelect to ScenarioSelect (#12822)
The scenario select window is not only available through the title screen.
2020-08-30 20:22:20 +02:00
Gabriel Guedes 332e9e76d5 Part of #11159: Removing unused functions from StringBuilder.hpp 2020-08-29 14:34:30 -03:00
ju-pinheiro e9c3f31422
Close #12423: Refactor NETWORK_SERVER_STATE to use strong enum (#12802)
#12423
2020-08-29 08:05:51 -03:00
Łukasz Pękalski bfdc1f6d2a
Close #12430: Refactor OBJ_STRING_ID to use strong enum (#12796) 2020-08-28 23:36:58 -03:00
Tulio Leao 731a93dc39
Create WindowColour enum for widget definition calls (#12722)
* Make MakeWidget* functions take enum colour

* Make windows A-D use WindowColour enum

* Make windows E-G use WindowColour enum

* Make windows I-M use WindowColour enum

* Make windows N-P use WindowColour enum

* Make windows R-S use WindowColour enum

* Make windows T use WindowColour enum

* Make windows V-W use WindowColour enum
2020-08-28 23:31:31 -03:00
Cory Sanin 8d366ebaea
Add Ride.totalProfit to the plugin API (#12795)
Add Ride.totalProfit to the plugin API
2020-08-28 22:52:54 +01:00
awiebe b53c4b3625
Downgrade Mac build requirements of OpenRCT2 to macOS 10.13 (#12749)
Keep targeting macOS 10.14 for libopenrct2 target. Replace deployment target with macOS 10.13 for other targets, including the OpenRCT2 bundle.

Explicitly type std::arrays, since Xcode refuses to use C++17 array deduction.

Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2020-08-28 22:27:25 +02:00
Ted John 3a0bff4b93 Add comment about remX, remY 2020-08-28 01:30:17 +01:00
Ted John 65e3d20156 Refactor drawing 2020-08-28 01:30:15 +01:00
Ted John a1cd02c61c Disable closer zoom levels for software rendering 2020-08-28 01:29:59 +01:00
Ted John 609cde2304 Fix drawing of money text when zoomed in 2020-08-28 01:29:59 +01:00
Ted John 7f0510e444 Fix sub pixel clip issues with OpenGL 2020-08-28 01:29:59 +01:00
Ted John f51ad862c9 Refactor window drawing 2020-08-28 01:29:59 +01:00
Ted John 2b51eaeaa1 Fix weather gloom when zoomed in 2020-08-28 01:29:59 +01:00
Ted John 25581fa4ef Share blit methods between BMP and RLE 2020-08-28 01:29:59 +01:00
Ted John f16a46b872 Refactor RLE minify 2020-08-28 01:29:59 +01:00
Ted John 1645c64e87 Implement RLE magnify 2020-08-28 01:29:59 +01:00
Ted John 247c950c60 Implement magnify for bitmap 2020-08-28 01:29:59 +01:00
Ted John cd7324262d Create ZoomLevel struct to add two new zoom levels 2020-08-28 01:29:59 +01:00
Łukasz Pękalski 411f242cfd
Close #12431 Refactor VirtualFloorStyles to use strong enum (#12790) 2020-08-27 21:06:39 -03:00