Olivier Wervers
b71062ce1b
Fix #6530 : Make land tools work consistently on park borders ( #11181 )
...
Makes all land tools behave the same
2020-04-18 08:19:03 -03:00
Tulio Leao
64e4a8420e
Use named casts on openrct2/world ( #11141 )
2020-04-17 21:08:22 +02:00
Gymnasiast
5dc4b3e136
Make tile_element_insert take CoordsXYZ
2020-03-07 21:28:36 +01:00
Michael Steenbeek
be13c1fc87
Refactor more TileCoords
2020-03-07 21:07:18 +01:00
Gymnasiast
3ed7694495
Move tile element-specific flags
2020-03-04 22:01:09 +01:00
Gymnasiast
57a40c0657
Extend PathElement
2020-03-04 21:57:42 +01:00
Matt
758a7e432f
Use const reference instead of copy for location structures
2020-02-13 11:53:14 +01:00
Michael Steenbeek
d16fbb0cd2
Change ride->overall_view to CoordsXY ( #10673 )
2020-02-08 17:19:59 +01:00
Michael Steenbeek
5da4903430
Fix #10629 : Footpaths on the ground do not cost money ( #10671 )
2020-02-08 16:29:14 +01:00
Ted John
1e6bf84796
Do not log element out of range as error ( #10641 )
...
Many routines will attempt to access tile elements outside the range of the map. This can happen for example when a routine is observing surrounding tiles of a piece of track that is near the edge of the map. Null is returned from the function which is handled by the routine, so not really an error and can reduce many bounds checking in callers.
2020-02-01 20:44:57 +00:00
Tulio Leao
b7e9b36a27
Prefer std::array and COORDS defines on Map::CoordsDirectionDelta
2020-01-19 13:30:29 -03:00
Michael Steenbeek
d798811c4a
Make GetWaterHeight return big Z ( #10579 )
...
* Make GetWaterHeight return big Z
* Restore > 0 [ci skip]
2020-01-19 15:12:48 +00:00
Duncan
8abb9e5515
Fix obstructions not stopping ride placement ( #10585 )
2020-01-19 15:12:26 +00:00
Duncan
0702808692
Use a game action result for clear at function ( #10576 )
...
* Use a game action result for clear at function
* Clean up callers of set_error_text
* Make it compile
* Make suggested changes
* fix compile
* Fix nullptr deref
2020-01-19 13:14:37 +00:00
Tulio Leao
ac063a7e9a
Use CoordsXY on footpath_update_path_wide_flags()
2020-01-14 07:33:43 -03:00
Michael Steenbeek
44dc2068e7
Merge pull request #10515 from tupaschoal/use-more-coords-4
...
Use CoordsXY* on world/Footpath.cpp
2020-01-11 20:52:39 +01:00
Tulio Leao
7cf03d3e41
Use CoordsXY on footpath_remove_edges_at()
2020-01-11 11:13:04 -03:00
Michael Steenbeek
08ab15ef36
Fix #10313 : Path furniture can be placed on level crossings
2020-01-05 17:59:02 +01:00
Michael Steenbeek
63da894257
Merge pull request #10511 from tupaschoal/improve-clear-at
...
Improve variable names in map_can_construct_with_clear_at() and use big Z
2020-01-04 19:57:46 +01:00
Tulio Leao
d3579e472b
Use Big Z coordinates for map_can_construct_with_clear_at() vars
2020-01-04 10:31:18 -03:00
Tulio Leao
dff747ce0f
Improve variable names in map_can_construct_with_clear_at()
2020-01-04 10:27:57 -03:00
Tulio Leao
d861658669
Use CoordsXY on Scenery and SmallScenery ( #10513 )
2020-01-04 12:45:51 +01:00
Tulio Leao
06fb16ee88
Use CoordsXYZ for gMapSelectArrowPosition ( #10442 )
2019-12-30 16:51:35 +00:00
Michael Steenbeek
77494bbc73
Create definitions for some coords related stuff ( #10456 )
...
* Create definitions for some coords related stuff
* Use constexpr; add define for Z step
2019-12-30 15:03:51 +00:00
Tulio Leao
2d7dccb0c2
Make Map::map_can_construct_*() use CoordsXYRangedZ ( #10462 )
...
* Make Map::map_can_construct_with_clear_at() use CoordsXYRangedZ
* Make Map::map_can_construct_at() use CoordsXYRangedZ
2019-12-30 15:00:42 +00:00
Tulio Leao
98110c0544
Make Map::map_invalidate*() use CoordsXY ( #10437 )
...
* Make Map::map_invalidate_element() use CoordsXY
* Make Map::map_invalidate_tile_full() use CoordsXY
* Make Map::map_invalidate_tile_zoom0() use CoordsXY
* Make Map::map_invalidate_tile_zoom1() use CoordsXY
* Make Map::map_invalidate_tile() use CoordsXY
* Use CoordsXYRangedZ for map invalidation
* Fix vehicle tile invalidation use Z instead of Y coord
* Fix BannerRemoveAction sending Z TileCoords to invalidate tile
* Fix wrong tile invalidation on peep_update_walking_break_scenery
* Prefer ToTileStart over bitwise and
2019-12-28 08:44:33 +00:00
Tulio Leao
19b7bed37e
Use CoordsXY for Map::clear functions ( #10439 )
2019-12-27 15:58:40 +01:00
Michael Steenbeek
8ca0cf52a7
Replace more direct accesses to base/clearance Z with getter/setter ( #10454 )
2019-12-27 15:26:40 +01:00
Tulio Leao
9ec25e85cb
Coords for map_get_tile* ( #10440 )
...
* Make Map::map_get_tile_side() use CoordsXY
* Make Map::map_get_tile_quadrant() use CoordsXY
2019-12-27 12:36:47 +01:00
Tulio Leao
e827509786
Make Map::sign_set_colour() use CoordsXYZD ( #10441 )
...
* Make Map::sign_set_colour() use CoordsXYZD
* Rename Map::sign_set_colour()
2019-12-26 15:18:51 +00:00
Michael Steenbeek
b8687511a4
Merge pull request #10436 from tupaschoal/coords-large-scenery
...
Make Map's large scenery functions use Coords objects
2019-12-24 15:51:20 +01:00
Tulio Leao
81647b3dd8
Make Map::map_get_track_element_at_with_direction_from_ride() use CoordsXYZD
2019-12-24 11:19:06 -03:00
Tulio Leao
6ab46bd74a
Make Map::map_get_track_element_at_from_ride() use CoordsXYZ
2019-12-24 11:19:06 -03:00
Tulio Leao
c718d2be42
Make Map::map_get_track_element_at_of_type_from_ride() use CoordsXYZ
2019-12-24 11:19:06 -03:00
Tulio Leao
21435a4d01
Make Map::map_get_track_element_at_of_type_seq() use CoordsXYZ
2019-12-24 11:19:05 -03:00
Tulio Leao
77503fee97
Make Map::map_get_track_element_at_of_type() use CoordsXYZ
2019-12-24 11:19:05 -03:00
Tulio Leao
6c998d7b4d
Make Map::map_get_track_element_at() use CoordsXYZ
2019-12-24 11:19:03 -03:00
Gymnasiast
62fcbb07ca
Rename methods to GetBaseZ/GetClearanceZ
2019-12-23 20:08:37 +01:00
Gymnasiast
85ecb52e7c
Manually replace more Z occurrences
2019-12-23 20:05:26 +01:00
Gymnasiast
7d11858dbe
Create getter for GetBaseHeight()/GetClearanceHeight()
2019-12-23 20:05:24 +01:00
Tulio Leao
27866e992d
Make Map::check_max_allowable_land_rights_for_tile() receive CoordsXYZ ( #10433 )
2019-12-23 17:24:41 +01:00
Tulio Leao
6fb5524e1e
Make Map::map_large_scenery_get_origin() use CoordsXYZ*
2019-12-23 10:07:20 -03:00
Tulio Leao
00e1030d09
Make Map::map_get_large_scenery_segment() use CoordsXYZD
2019-12-23 09:53:21 -03:00
Tulio Leao
a2c7ecc6e5
Make Map::map_get_first_element_at() use CoordsXY ( #10413 )
...
* Make Map::map_get_first_element_at() use CoordsXY
* Fix clang-format on ClearAction.hpp
* Prefer TileDIrectionDelta over hardcoded delta on RideConstruction
* Use named Direction constants
* Make Compat::map_get_first_element_at() use CoordsXY
2019-12-23 07:35:41 +00:00
Michael Steenbeek
30b03d998c
Merge pull request #10409 from tupaschoal/coords-for-set-tile-elements
...
Make Map::map_set_tile_elements() use TileCoordsXY
2019-12-21 19:12:51 +01:00
Michael Steenbeek
fb2f907414
Merge pull request #10363 from duncanspumpkin/refactor
...
Refactor to reduce LocationXY usage
2019-12-21 16:24:24 +01:00
Tulio Leao
5fcfc6af00
Rename map_set_tile_elements to singular
2019-12-21 10:28:52 -03:00
Tulio Leao
d7efe4de90
Make Map::map_set_tile_elements() use TileCoordsXY
2019-12-21 10:28:33 -03:00
Tulio Leao
9b1395bfb8
Make Map::map_get_banner_element_at() use CoordsXYZ ( #10408 )
2019-12-21 14:15:40 +01:00
Tulio Leao
5cd6c67abd
Make Map::map_get_small_scenery_element_at() receive CoordsXY ( #10406 )
2019-12-21 14:08:18 +01:00