Commit Graph

19998 Commits

Author SHA1 Message Date
ζeh Matt 765eada18e
Merge pull request #12526 from ZehMatt/win32-cleanup
Win32 and namespace cleanup
2020-08-05 17:18:50 +02:00
Duncan 3533d1734f
Merge pull request #12571 from ZehMatt/network/update-2
Refactor more network code
2020-08-05 15:55:24 +01:00
Matt 97d14feaa6 Rebase fixes 2020-08-05 16:35:40 +02:00
Matt 0dc43d66e4 Remove the use of INTERFACE macro and macro its self 2020-08-05 16:30:44 +02:00
Matt 83355e35cc Move IStream, MemoryStream, FileStream into OpenRCT2 namespace 2020-08-05 16:29:36 +02:00
Matt 30376085cf Include missing headers 2020-08-05 16:29:29 +02:00
Matt 59349b0a31 Add WIN32_LEAN_AND_MEAN to common.props 2020-08-05 16:27:48 +02:00
Matt e91e68e3ec Re-phrase the network compatibility comment 2020-08-05 16:19:57 +02:00
Matt 05a9b27136 Fix ByteSwapBE type safety 2020-08-05 16:17:18 +02:00
Tom Parsons 58240cf1ad
Close #12459: Remove unused enum PARK_LOAD_ERROR (#12590)
* Remove unused enum PARK_LOAD_ERROR

A refactoring a couple of years ago removed all uses so it
can safely be removed.

Closes #12459

* Also fix header order for clang-format
2020-08-04 23:26:59 -03:00
Matt Thomson 150100d89f Fix #12416: Refactor CURRENCY_AFFIX to use strong enum 2020-08-04 21:35:59 +01:00
Tom Parsons d9129bca0f
Fix #12405: Make LIGHTFX_LIGHT_TYPE a strong enum (LightType) (#12569)
* Fix #12405: Make LIGHTFX_LIGHT_TYPE a strong enum

* Fix #12405: Make LIGHTFX_LIGHT_TYPE a strong enum

- New strong enum LightType

- Remove unused enum members

- GetLightTypeSize and SetLightTypeSize modify size of light (0-3)

* actually save the change to lightType
2020-08-04 15:55:14 +01:00
Tulio Leao 78053e34d5
Fix #12561: Synchronized coasters not synced (#12572) 2020-08-04 15:51:35 +01:00
pizza2004 156be224f9
Close #12399: Refactor MIXER_GROUP to strong enum (#12531) 2020-08-03 20:51:12 -03:00
Tulio Leao bf0c4c4f0e
Fix #12533: Track designs list does not use natural sorting (#12537) 2020-08-03 20:42:54 -03:00
Duncan 0809069e74
Fix #12577: Mistake made in refactor #12538 (#12579)
Loop called the peep window open only when nullptr. Added extra checks for nullptr on window open
2020-08-03 20:09:24 -03:00
Duncan 87953ace9b
Fix #12535, #12536: RCT1 import can crash when too many misc entities (#12580)
Eventually this can be fixed properly in the new save format
2020-08-03 20:07:13 -03:00
Duncan 4fcdcc3729
Fix #12581: Divide by zero on dodgems on customised vehicles (#12582)
Likely caused by use of the console or a new plugin
2020-08-03 20:05:22 -03:00
Sidney 31fc1bd225
closes #12454: Remove unused enum EDIT_SCENARIOOPTIONS_* (#12547) 2020-08-03 21:05:43 +01:00
pizza2004 d217dfa9b9
Refactor NewsItem into namespace and Pascal Case (#12511) 2020-08-02 23:14:00 -03:00
Matt 07b343813a Fix passing missing parameter 2020-08-03 00:46:44 +02:00
Matt 28dcaeae2f Refactor reading/writing packets 2020-08-03 00:36:02 +02:00
Matt 21f63c1010 Pass NetworkCommand type as constructor to simplify code 2020-08-02 22:31:00 +02:00
Matt 313b8a7518 Remove std::unique_ptr and use move semantics instead 2020-08-02 22:08:56 +02:00
Matt 224efdbbdf Simplify usage of NetworkPacket::Data 2020-08-02 22:07:47 +02:00
Duncan aa11773da3
Fix #12566, #12565, #12562, #12560, #12558: Nullptr deref (#12567)
Mistake made in refactor meant that a nullptr deref took place when the screen coords were outside of the normal play area
2020-08-02 20:13:09 +01:00
Duncan 733bc5a981
Close #12518: Viewport Refactor (#12541)
* Remove viewport pointer from get_map_coordinates_from_pos

* Removed viewport from get_window

* Return a InteractionInfo from get_map_coord...

* Remove viewport_interaction_info struct

* Add Entity union to simplify code

* Name the enum used for viewport interaction

* Simplify functions further by returning the info struct

* Add default switches
2020-08-02 08:32:59 +01:00
Łukasz Pękalski 0f78d452a4
Part of #12497: Remove extra SPRITE_INDEX_NULL check (#12538)
* refactor: deleted double check of SPRITE_INDEX_NULL in Staff* ride_get_mechanic(Ride* ride)

* refactor: deleted double check of SPRITE_INDEX_NULL in Ride.cpp file

* refactor: deleted double check of SPRITE_INDEX_NULL in windows/Ride.cpp in function static rct_string_id window_ride_get_status_vehicle

* refactor: deleted double check of SPRITE_INDEX_NULL in ride/Ride.cpp

* refactor: deleted double check in FormatStatusTo
2020-08-02 08:28:11 +01:00
Duncan f49bfa777a
Change maze pathfinding to not prefer a direction (#12546)
* Change maze pathfinding to not prefer a direction

* Increment network version

* Update changelog

* Update replays
2020-08-02 08:20:34 +01:00
Sidney 7c0b03463c
Close #12452: Refactor DIAGNOSTIC_LEVEL to use strong enum (#12549) 2020-08-02 07:51:02 +01:00
Sidney 97d74e142e
Close #12441: Refactor VEHICLE_TRACK_SUBPOSITION to use strong enum (#12550) 2020-08-02 07:50:07 +01:00
Aaron van Geffen e039a51826
Fix #12552: Grey rectangles appear under windows and menus (#12554)
* Fix #12552: Grey rectangles appear under windows and menus

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-08-02 00:47:28 -03:00
Cory Sanin 394e8fb733
Resolve GCC warnings for Ride.cpp (#12553)
Eliminate warnings from ride_create_vehicles and ride_create_vehicles_find_first_block that would prevent build from succeeding when using GCC.
2020-08-02 00:28:47 +02:00
annoyingdroid ddd21fa87a
Part of #12098: Use ScreenRect on gfx_filter_rect (#12134) 2020-08-01 14:40:01 -03:00
TELK bf08943929
Fix #12352: Wrong date format for file names (#12543)
Issue likely caused by 5ae592ec79

Also see: https://en.cppreference.com/w/cpp/chrono/c/tm
2020-08-01 18:43:19 +02:00
Michał Janiszewski 88bad7729c
Merge pull request #12491 from janisozaur/openurl
Add OpenURL method, with implementation for Linux and Windows
2020-08-01 15:42:31 +02:00
Michael Steenbeek 4e9c32ff3a
Merge pull request #12521 from AaronVanGeffen/refactor/widgets-8
Refactor the last sets of widget definitions
2020-08-01 15:11:28 +02:00
Gymnasiast 3d071cec53
Implement OpenURL for macOS 2020-08-01 14:25:32 +02:00
Duncan 6d11825e1a
Reduce the use of rct_sprite (#12530)
* Reduce the use of rct_sprite

* Pass the correct types in S4 importer

* Add additional nullptr checks

* Simplify the viewport interaction

* Apply review comments

* Small cleanup of GetEntity

* Fix test paint
2020-08-01 11:29:54 +01:00
frutiemax 2c350fa416
Part of #12097: Use ScreenRect in gfx_fill_rect_inset (#12284) 2020-08-01 00:51:29 -03:00
Taylor Stieff f7f5124c07
Make tile element direction accessible for scripts (#12057)
* Make tile element direction accessible for scripts

Add the direction field from the tile element
class to the ScTileElement class passed to
the script engine.

Co-authored-by: Taylor Stieff <taylor.stieff@heavenhr.de>
2020-08-01 00:46:59 -03:00
Aaron van Geffen 3430076088 Very quickly process remaining review comments 2020-07-31 13:25:08 +02:00
Duncan cd1d573c39
Pass the formatter directly to scrolling_text_setup 2020-07-31 12:31:26 +02:00
Aaron van Geffen 16a484545a
Use WW in MapGen common widgets 2020-07-31 11:26:49 +02:00
Aaron van Geffen e6e850e399
Apply suggestions from code review
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-07-31 11:25:50 +02:00
Michael Steenbeek 402570adb6
Refactor usage of TextPaint
Eliminating a global variable in the process.
2020-07-31 11:13:28 +02:00
Duncan c6e26267a4
Reduce the use of GET_VEHICLE (#12494)
* Start removing GET_VEHICLE macro use

* Further work

* Remove further GET_VEHICLE's

* Further removal of GET_VEHICLE

* Remove the last of GET_VEHICLE

* Fix testpaint

* Fix nullptr deref

* Make review changes

Also swapped in helper functions and used a standard patern for iterating the train cars

* Further simplify loops for train cars
2020-07-31 07:48:27 +01:00
Aaron van Geffen d32809eaef
Fix formatting for StaffFirePrompt (#12525) 2020-07-30 23:06:01 +02:00
Aaron van Geffen 16ad1d18fb
Refactor another set of widget definitions (#12503)
* Refactor TopToolbar

* Refactor TrackDesignManage

* Refactor TrackDesignPlace

* Refactor TrackList

* Refactor ViewClipping

* Refactor Viewport

* Refactor TitleEditor

* Refactor TitleCommandEditor

* Refactor Themes

* Refactor TextInput
2020-07-30 22:58:49 +02:00
Aaron van Geffen b738c4fa87 Refactor StaffFirePrompt 2020-07-30 22:51:32 +02:00