Tulio Leao
38cf4728ef
Make Map::map_get_nth_element_at() use CoordsXY ( #10411 )
2019-12-21 14:04:00 +01:00
Duncan
3be7d824ac
Merge pull request #10397 from duncanspumpkin/refactor_gcommand
...
Remove gCommandPosition. Use GameActionRes instead.
2019-12-19 20:48:20 +00:00
Michael Steenbeek
6ede67d50a
Merge pull request #10371 from tupaschoal/coords-for-get-surface-element-at
...
Make map_get_surface_element_at only accept Coords objects
2019-12-19 13:24:17 +01:00
Michael Steenbeek
f59f5d9b1f
Merge pull request #10375 from tupaschoal/coords-for-map-entrance-exit
...
Make map entrance/exit fetching functions use Coords objects
2019-12-19 11:39:37 +01:00
Tulio Leao
5c657bde9f
Remove map_get_surface_element_at operating with TileCoordsXY
2019-12-18 23:47:17 -03:00
Tulio Leao
7c75db2b2d
Make map_get_surface_element_at only accept Coords objects
2019-12-18 23:46:50 -03:00
Tulio Leao
af281817c3
Use CoordsXYZD on map_get_wall_element_at() ( #10374 )
...
* Use CoordsXYZD on map_get_wall_element_at()
* Add CoordsXYZ::ToTileStart()
2019-12-18 11:23:53 +01:00
Tulio Leao
c71c4284d0
Make map entrance/exit fetching functions use only CoordsXY objects
2019-12-17 23:55:46 -03:00
duncanspumpkin
d97bb88c41
Reduce desyncs by removing teh track before updating peep logic
2019-12-15 08:21:32 +00:00
Tulio Leao
af7b364946
Prefer map_is_location_valid over hardcoded map limits ( #10373 )
2019-12-14 22:50:34 +01:00
Tulio Leao
03e7e29b21
Make map entrance/exit fetching functions use Coords objects
2019-12-14 12:13:09 -03:00
Tulio Leao
801e6e085d
Use CoordsXY on Map::map_surface_is_blocked() ( #10369 )
...
* Use CoordsXY on Map::map_surface_is_blocked()
* Update src/openrct2/peep/GuestPathfinding.cpp
* Use map_is_location_valid() instead of hardcoded number
2019-12-14 09:57:13 +01:00
Tulio Leao
440f012e8a
Remove unused Map::rotate_map_coordinates() function ( #10362 )
2019-12-12 18:53:24 +01:00
Duncan
90bde58852
Merge pull request #10329 from tupaschoal/coords-for-windows-rotate
...
Use CoordsXY on TopToolbar and TrackDesignPlace rotations
2019-12-11 08:44:06 +00:00
Tulio Leao
68e0519c5e
Remove Map::map_offset_with_rotation()
2019-12-09 17:55:57 -03:00
Tulio Leao
e21e0105af
Use CoordsXY for Map rotations ( #10335 )
2019-12-05 20:38:14 +01:00
Tulio Leao
accb4ea691
Use CoordsXY on TopToolbar and TrackDesignPlace rotations
2019-12-04 22:07:11 -03:00
Tulio Leao
72b4d93ad2
Avoid dereferencing map_get_surface_element_at nullptr on libopenrct2
2019-11-18 08:01:04 -03:00
Matt
59b71183a2
Only temporarily set the cheat state
2019-10-16 13:21:21 +02: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
Gymnasiast
db5c018e22
Add requested check
2019-10-03 22:26:08 +02:00
crorvig
7f54ba0be7
Set BuildInPauseMode to true during map_remove_out_of_range_elements()
...
Set BuildInPauseMode to true during map_remove_out_of_range_elements()
2019-10-03 22:26:08 +02:00
crorvig
ed1dfa39c2
Fix #9955 Allow resizing of map in pause mode
...
Prevents infinite loop by forcing BuildInPauseMode on for the duration
of the map_remove_out_of_range_elements() call.
2019-10-03 22:26:08 +02:00
Gymnasiast
7e8ab6b693
Also clear pad_08 in tile_element_insert()
2019-08-30 21:48:18 +02:00
Gymnasiast
f365bc3cb7
Create getters and setters for occupied quadrant
2019-08-27 21:12:48 +02:00
Gymnasiast
5ef72a4e11
Rename quartertile param in map_can_construct_with_clear_at()
2019-08-25 17:49:44 +02:00
Gymnasiast
ec5ba20992
Create dedicated method for SetLastForTile()
2019-08-25 16:13:02 +02:00
Gymnasiast
6e200459d3
Refactor some accessors to tile element type and flags fields
2019-08-24 22:42:47 +02:00
duncanspumpkin
92f3e2de8b
Pass by const reference where possible
2019-08-19 20:04:59 +01:00
duncanspumpkin
11aa41c4c4
Reduce the number of temporary variables
2019-08-19 20:04:59 +01:00
duncanspumpkin
b77f15c4b7
Refactor map_get_highest_z to use CoordsXY
2019-08-19 20:04:59 +01:00
duncanspumpkin
a3ad551d10
Refactor clear_elements_at to use CoordsXY
2019-08-19 20:04:58 +01:00
duncanspumpkin
9ef6c8d2b4
Remove coordinate_3d_to_2d.
2019-08-19 20:04:58 +01:00
duncanspumpkin
927c8a4e85
Create ScreenCoords struct. Refactor 3d_to_2d again
2019-08-19 20:04:58 +01:00
duncanspumpkin
539ef5150a
Refactor map_get_bounding_box to use maprange and remove duplicate code
2019-08-19 20:04:58 +01:00
duncanspumpkin
9472c6b1ed
Remove duplicate code. Move translate_3d_to_2d to use CoordsXY
2019-08-19 20:04:58 +01:00
duncanspumpkin
af39ff20af
Refactor to use new inheritence and remove duplicate/redundant code
2019-08-19 20:04:58 +01:00
duncanspumpkin
fb8c42f3c2
Fix #9557 . Refactor map_is_location_at_edge and tile_element_insert
2019-08-19 20:04:57 +01:00
duncanspumpkin
f3db7f877a
Refactor tile_element_water_height to take CoordsXY
2019-08-19 20:04:57 +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
5ba9d55415
Refactor map_is_location_owned_or_has_rights to use CoordsXY
2019-08-19 20:04:57 +01:00
duncanspumpkin
0a1cb68328
Refactor map_can_build_at to use CoordsXYZ
2019-08-19 20:04:56 +01:00
duncanspumpkin
5333dc4295
Return a SurfaceElement from get_surface_element
2019-08-19 20:04:56 +01:00
duncanspumpkin
9619fd384d
Refactor map_is_location_owned to use CoordsXYZ
2019-08-19 20:04:56 +01:00
Ted John
9954f0b725
Add nullptr checks for more instances of get_ride ( #9819 )
2019-08-09 14:20:59 +01:00
Ted John
ab7b17fc4e
Add nullptr checks for get_ride in libopenrct2 ( #9788 )
2019-08-08 22:58:56 +01:00
Ted John
7fd4fd0c2a
Fix #9179 : Crash when modifying a ride occasionally ( #9756 )
...
Add lots of nullptr and tile element checks in the ride_modify call chain.
2019-08-08 12:59:06 +01:00
0cufox0
b4e0df2e5f
Fix review issues and formatting
2019-08-05 20:19:57 +01:00
0cufox0
8e33619b63
Refactor LargeSceneryRemoveAction
2019-08-05 20:18:01 +01:00