1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 12:03:07 +01:00
Commit Graph

148 Commits

Author SHA1 Message Date
Tulio Leao
054bc8e4ca Receive ScreenCoordsXY and return CoordsXY in Viewport 2019-11-13 18:27:59 -03:00
Tulio Leao
892c084cd8 Use ScreenCoordsXY for windows/Footpath 2019-11-11 23:10:51 -03:00
duncanspumpkin
5ca553dd08 Refactor viewport_coord_to_map_coord to return a CoordXY 2019-11-01 20:04:07 +00:00
Tulio Leao
b793d7e79a Avoid dereferencing map_get_first_element_at nullptr on libopenrct2 (#10013)
* Avoid dereferencing map_get_first_element_at nullptr on Map.cpp

* Avoid dereferencing map_get_first_element_at nullptr on MapAnimation.cpp

Returning true or internal control variable, based on what was seen on `map_animation_invalidate_track_onridephoto`

* Avoid dereferencing map_get_first_element_at nullptr on Park.cpp

* Avoid dereferencing map_get_first_element_at nullptr on Scenery.cpp

* Avoid dereferencing map_get_first_element_at nullptr on Sprite.cpp

* Avoid dereferencing map_get_first_element_at nullptr on TileInspector.cpp

* Avoid dereferencing map_get_first_element_at nullptr on Wall.cpp

* Avoid dereferencing map_get_first_element_at nullptr on Fountain.cpp

* Avoid dereferencing map_get_first_element_at nullptr on Footpath.cpp

* Avoid dereferencing map_get_first_element_at nullptr on Entrance.cpp

* Avoid dereferencing map_get_first_element_at nullptr on Banner.cpp

* Avoid dereferencing map_get_first_element_at nullptr on Vehicle.cpp

* Avoid dereferencing map_get_first_element_at nullptr on TrackDesignSave.cpp

* Avoid dereferencing map_get_first_element_at nullptr on TrackDesign.cpp

* Avoid dereferencing map_get_first_element_at nullptr on Track.cpp

* Avoid dereferencing map_get_first_element_at nullptr on Station.cpp

* Avoid dereferencing map_get_first_element_at nullptr on RideRatings.cpp

* Avoid dereferencing map_get_first_element_at nullptr on Ride.cpp

* Avoid dereferencing map_get_first_element_at nullptr on S4Importer.cpp

* Avoid dereferencing map_get_first_element_at nullptr on Staff.cpp

* Avoid dereferencing map_get_first_element_at nullptr on Peep.cpp

* Avoid dereferencing map_get_first_element_at nullptr on GuestPathfinding.cpp

* Avoid dereferencing map_get_first_element_at nullptr on Guest.cpp

* Avoid dereferencing map_get_first_element_at nullptr on VirtualFloor.cpp

* Avoid dereferencing map_get_first_element_at nullptr on Paint.TileElement.cpp

* Fix issues raised on review

* Fix remaining review issues.

* Early exit on loops if tileElement is nullptr

* Fix clang-format issues
2019-10-09 15:02:21 +01:00
Michael Steenbeek
a5700a3d07 Merge pull request #9959 from richard-fine/directions
Convert more code to use proper Direction symbols
2019-09-22 16:59:41 +02:00
Joseph Atkins-Turkish
747e00512d Fix #7572: Queue paths connect to regular paths through fences 2019-09-18 23:31:29 +02:00
Richard Fine
31ce0f20f7 Use range-based for loops for checking all directions 2019-09-01 18:40:28 +01:00
Richard Fine
5ff78e48c7 Reduce usage of GetDirectionWithOffset()
GetDirectionWithOffset(2) is the same thing as 'direction_reverse(GetDirection())', and the latter is more readable.
2019-09-01 18:40:08 +01:00
Richard Fine
52b4717d85 Use Direction type for PathElement SlopeDirection 2019-09-01 16:08:01 +01:00
duncanspumpkin
5b92b64ec7 Refactor map_get_path_element_at to return PathElement and use CoordsXYZ 2019-08-19 20:04:57 +01:00
duncanspumpkin
c6452095ca Refactor tile_element_height to use CoordsXY 2019-08-19 20:04:57 +01:00
duncanspumpkin
5333dc4295 Return a SurfaceElement from get_surface_element 2019-08-19 20:04:56 +01:00
Ted John
ab7b17fc4e Add nullptr checks for get_ride in libopenrct2 (#9788) 2019-08-08 22:58:56 +01:00
Ted John
cd4eb86a7c Merge pull request #9725 from IntelOrca/refactor/ride-manager
Refactor ride list
2019-08-07 21:03:17 +01:00
0cufox0
b4e0df2e5f Fix review issues and formatting 2019-08-05 20:19:57 +01:00
Ted John
e23638548a Reduce use of MAX_RIDES and RIDE_TYPE_NULL 2019-08-04 16:44:17 +01:00
Matt
fc3afb3349 Remove unnecessary multiplication and division for sprite lists 2019-06-22 17:38:28 +02:00
duncanspumpkin
b9a70d02a3 Make suggested changes
Implement suggestions

Fix formatting
2019-05-12 17:31:48 +01:00
duncanspumpkin
e9e445837f Add landset/buyrights action 2019-05-12 17:29:19 +01:00
duncanspumpkin
f6b610c325 Implement Banner Place/Remove Actions 2019-05-02 17:47:01 +01:00
Michael Steenbeek
42a1a8704d Use empty() for vectors; clean up bool comparisons (#9118) 2019-04-20 20:39:47 +02:00
duncanspumpkin
5280728760 Fix formatting 2019-04-04 19:23:44 +01:00
duncanspumpkin
356a0e5e91 Rework flags 2019-04-04 19:23:44 +01:00
Gymnasiast
9839bb7bba Fix path preview
More work is needed to properly split the paths, but this will do for now.
2019-04-01 21:58:57 +02:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Michael Steenbeek
602821a389 Split path surface objects into paths and queues 2019-03-16 12:37:32 +01:00
Duncan
adf440ed1f Merge pull request #8874 from ZehMatt/fix-8873
Fix #8873: null dereference when trying to place footpath.
2019-03-16 07:40:48 +00:00
Duncan
82f320eb24 Merge pull request #8830 from duncanspumpkin/path_from_track
Footpath Place From Track Game Action
2019-03-15 19:42:30 +00:00
Matt
126ffd104e Fix #8873: null dereference when trying to place footpath. 2019-03-15 19:31:04 +01:00
Ted John
0aade935aa Fix #8824: invalid read in footpath_chain_ride_queue (#8831) 2019-03-06 19:11:21 +00:00
duncanspumpkin
0070283dc2 Implement game action 2019-03-05 19:54:17 +00:00
duncanspumpkin
29de97f5b1 Remove references to old game command 2019-03-04 16:57:21 +00:00
duncanspumpkin
bcced4016f Use new action 2019-03-04 16:57:21 +00:00
duncanspumpkin
c8fd5174ae Implement footpathplace 2019-03-04 16:57:21 +00:00
duncanspumpkin
510d71ab68 Add FootpathSceneryPlaceAction 2019-03-04 16:57:21 +00:00
Ted John
cdec457abd Refactor peep struct 2019-02-28 20:28:58 +01:00
Duncan
f0092b7aae Merge pull request #8781 from duncanspumpkin/flag_refactor
Flag refactor
2019-02-27 19:18:02 +00:00
jensj12
89066759eb Fix #8264: Rides and scenery placeable outside of map with ZC and Sandbox mode enabled (#8715)
* Fix #8264: Rides and scenery placeable outside of map with ZC and Sandbox mode enabled

map_can_construct_with_clear_at first checks whether it is inside the map, and then checks gCheatsDisableClearanceChecks, making earlier checks for gCheatsDisableClearanceChecks unnecessary.

* Increase network version
2019-02-27 18:46:18 +00:00
duncanspumpkin
9d78bb0d4e Fix compile and formating 2019-02-27 10:54:08 +00:00
duncanspumpkin
584c4d5134 Prevent a dereference of nullptr 2019-02-27 10:49:48 +00:00
duncanspumpkin
fae15fceca Use IsBroken 2019-02-27 10:49:48 +00:00
duncanspumpkin
7840f6a7f7 Use SetIsBroken 2019-02-27 10:49:48 +00:00
duncanspumpkin
6495ffdb34 Use IsBlockedByVehicle 2019-02-27 10:49:48 +00:00
duncanspumpkin
354cce71eb Introduce new functions to stop direct access 2019-02-27 10:49:48 +00:00
duncanspumpkin
112b40910b Pass a bool to the set function. Make review changes 2019-02-25 20:44:12 +00:00
duncanspumpkin
737c308e4e Use IsGhost() to access ghost state
Added set and clear ghost to further prevent direct access to flags
2019-02-25 15:12:35 +00:00
duncanspumpkin
6890f4f756 Use quarter tile for map can construct at
Make callees of map_can_construct_with_clear use QuarterTile

Use quarter tile for small scenery rotation

Fix clang format

Further clang format
2019-02-25 13:51:08 +00:00
ζeh Matt
d143c7b7c6 Fix 8698 (#8709) 2019-02-14 22:09:16 +01:00
Ted John
9e461b2e34 Pass Ride* instead of ride_id_t 2019-02-12 23:29:38 +00:00
ζeh Matt
3aad9a4b2e Refactor footpath_update_path_wide_flags 2019-01-29 19:07:00 +01:00