Commit Graph

19623 Commits

Author SHA1 Message Date
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
Aaron van Geffen fe9d577c2e Refactor Staff 2020-07-30 22:45:40 +02:00
Aaron van Geffen e8e61bd987 Refactor Sign 2020-07-30 22:39:09 +02:00
Aaron van Geffen 9b6f6b6216 Refactor Ride 2020-07-30 22:36:42 +02:00
Aaron van Geffen c1cff7fab0 Refactor Park 2020-07-30 22:25:18 +02:00
Michael Steenbeek e0f2aa9b99
Fix: Brakes keep working during "Brakes failure"
This was an error in the original implementation back in 2015.
Thanks to @duncanspumpkin for checking the assembly.
2020-07-30 22:21:19 +02:00
Aaron van Geffen 8325ec04ed Refactor ObjectLoadError 2020-07-30 22:05:11 +02:00
Aaron van Geffen 173c103573 Refactor NewRide 2020-07-30 21:56:51 +02:00
Aaron van Geffen 5e04508a59 Refactor NewCampaign 2020-07-30 21:54:26 +02:00
Aaron van Geffen 60e397abb9 Refactor Network 2020-07-30 21:51:13 +02:00
Aaron van Geffen 240e45d62d Refactor MusicCredits 2020-07-30 21:51:03 +02:00
Michael Steenbeek cd86d3d757
Fix #7969: Loading landscape resets money, inventions and objective (#12520) 2020-07-30 21:43:46 +02:00
Aaron van Geffen 24fc4119c9 Refactor Multiplayer 2020-07-30 21:28:48 +02:00
Aaron van Geffen 915dc5f07c Refactor MazeConstruction 2020-07-30 21:23:51 +02:00
Aaron van Geffen cd5b506b6b Refactor MapTooltip 2020-07-30 21:21:08 +02:00
Aaron van Geffen 768fcfcba2 Refactor MapGen 2020-07-30 21:18:32 +02:00
ζeh Matt b0c67762b7
Merge pull request #12485 from ZehMatt/network/cleanup-1
Refactor the Network a bit, setting the stones for further refactor work
2020-07-30 20:54:18 +02:00
Michael Steenbeek e03753c139
Fix #12498: Circus construction ghost does not rotate (#12519) 2020-07-30 20:29:26 +02:00
Matt f258c8034d Wrap code with macro test DISABLE_NETWORK 2020-07-30 20:29:16 +02:00
Aaron van Geffen 73bb5db99a Update Xcode project for network changes. 2020-07-30 20:29:15 +02:00
Matt af757fa58e Categorize members of NetworkBase 2020-07-30 20:29:15 +02:00
Matt 4cede91424 Introduce NetworkClient and NetworkServer 2020-07-30 20:29:15 +02:00
Matt cf1fb9ecff Move some types into NetworkTypes.h 2020-07-30 20:29:15 +02:00
Matt 37f6a11a1f Move Network declaration into header and rename to NetworkBase 2020-07-30 20:29:15 +02:00
Michael Steenbeek bb1d81471d
Fix #12506: Cannot advertise food if there are no rides in the park 2020-07-29 10:44:38 +02:00
OpenRCT2 git bot 1f3ea50915 Merge Localisation/master into OpenRCT2/develop. 2020-07-29 04:03:25 +00:00