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
0cufox0
5cd8541a1c
Refactor smalSceneryRemoveAction
2019-08-05 20:17:57 +01:00
0cufox0
0320f195e3
refactor wallRemoveAction
2019-08-05 19:52:47 +01:00
Ted John
c3234b1442
Refactor map animations and dynamically create on park load ( #9705 )
2019-08-03 22:18:33 +02:00
Ted John
6fff2079f9
Refactor ride name to dynamic args and std::string
2019-07-29 19:18:16 +01:00
duncanspumpkin
3162d4dc75
Implement TileModifyAction
...
Further work moving game commands into the game action framework
2019-06-11 18:42:52 +01:00
Duncan
993709c087
Merge pull request #9321 from aw20368/fix/8723-use-rotate_map_coordinates
...
Fix #8723 Use rotate_map_coordinates to rotate coordinate
2019-06-08 07:52:52 +01:00
aw20368
e0cf476398
Fix #8723 Use rotate_map_coordinates to rotate coordinate
...
Added Rotate to CoordsXY, TileCoordsXY and used them to replace redundant rotation code.
2019-06-06 08:21:40 -04:00
aw20368
3ee6be0dbf
Fix #9288 : Replace repeated 3d to 2d functions ( #9301 )
...
Replaced duplicate 3d to 2d code with translate_3d_to_2d_with_z(...).
2019-05-30 22:41:53 +02:00
joshtucker132
4dc77bf121
Feature #8791 : Improved tile element flag manipulation in Tile Inspector
2019-05-14 21:38:31 +02:00
duncanspumpkin
e9e445837f
Add landset/buyrights action
2019-05-12 17:29:19 +01:00
Filip Gawin
6833da77e3
Simplify boolean expresions
2019-05-10 22:00:38 +02:00
duncanspumpkin
d14637e1ca
Fix narrowing and formatting
2019-05-02 17:47:01 +01:00
duncanspumpkin
f6b610c325
Implement Banner Place/Remove Actions
2019-05-02 17:47:01 +01:00
Nicole
d38fb6a7a2
Fix #8800 : ensure tile_element_height is used correctly ( #9087 )
...
* Changed calls to tile_element_height to tile_element_water_height
* Changes to calls to tile_element_height
* Removed tile element_height, map_get_highest_land_height, and map_get lowest_land_height
3 functions removed due to relocation.
* Added function tile_element_height back to map.cpp
Added tile_element height back to map.cpp. Was unnecessarily deleted.
* Update Map.h
* water_height changes
* Update Scenario.cpp
* Update Scenario.cpp
* Fix 8800: applied clang format
* Removed unnecessary ANDs
2019-04-23 18:26:48 +01:00
duncanspumpkin
d63919c0cc
Implement LargeSceneryPlaceAction
2019-04-07 14:55:07 +01:00
duncanspumpkin
5ab42488a9
Implement large scenery set colour action
2019-04-07 09:22:33 +01:00
duncanspumpkin
30a5194085
Use a vector for map selection tiles
2019-04-04 19:23:44 +01:00
duncanspumpkin
227786e05b
Remove game command
2019-03-27 18:48:26 +00:00
Duncan
791c3059f6
Add ParkEntranceRemove GameAction
2019-03-24 21:41:14 +01:00