Commit Graph
187 Commits
Author SHA1 Message Date
Michael Steenbeek 44f62a97c2 Move PhotoItem to RTD (#11415) 2020-04-24 04:47:40 +02:00
Breno Rodrigues Guimarães c0d0c7de16 Part of #11389: Replace set_format_arg by Formatter::Common() (#11388) 2020-04-22 21:41:20 -03:00
Michał Janiszewski 2323cc1596 Use named casts instead of old-style casts
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +02:00
Gymnasiast edd31d9f16 Move flags to RideTypeDescriptors 2020-04-17 17:03:33 +02:00
Michał Janiszewski a197e529e8 Fix #6238: Invalid tile elem iteration in Guest::UpdateUsingBin (#11248) 2020-04-08 01:03:02 +02:00
Michael Steenbeek 3a47e3b309 Fix #11166: Null pointer read in Guest::UpdateRideAdvanceThroughEntrance (#11182) 2020-04-06 22:32:27 +02:00
Michał Janiszewski 971db142a5 Revert "Fix #11166: Null pointer read in Guest::UpdateRideAdvanceThroughEntrance (#11182)"
This is being reverted now that we have replay records uploaded as part
of the backtrace.io information to try figuring out the root cause.

This reverts commit 598b85d0ca.
2020-04-03 09:51:32 +02:00
Michael Steenbeek 598b85d0ca Fix #11166: Null pointer read in Guest::UpdateRideAdvanceThroughEntrance (#11182) 2020-04-01 12:45:08 +02:00
Michael Steenbeek cfb405f0ed Use StationIndex in many more places (#10992) 2020-03-26 21:38:26 +01:00
Gymnasiast 2f7a26e8da Refactor station index a bit 2020-03-21 17:05:16 +01:00
Michael Steenbeek fd91c41a76 Name remaining ride type flags (#10947) 2020-03-16 22:52:06 +01:00
Gymnasiast bdf681f440 Clean up many other coordinates 2020-03-13 12:03:43 +01:00
Gymnasiast 3412c47a9e Convert some Guest functions to methods 2020-03-13 10:50:22 +01:00
Michael Steenbeek 9b5e8140f9 Fix #10919: Crash when assertion fails in heavily damaged park (#10921) 2020-03-13 10:35:03 +01:00
Michael Steenbeek be13c1fc87 Refactor more TileCoords 2020-03-07 21:07:18 +01:00
Gymnasiast 2eb967b30d Change station start to CoordsXY 2020-03-05 12:29:02 +01:00
Michael SteenbeekandTulio Leao d5c4d78d49 Move vehicle track location to CoordsXYZ (#10856)
* Move vehicle track location to CoordsXYZ

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-03-01 15:45:51 -03:00
Michael Steenbeek f41f878581 Replace some usages of LocationXY(Z)16 (#10699) 2020-02-18 22:42:38 +01:00
Michael Steenbeek 6d97601d6f Replace hardcoded occurrences of maximum map size (#10696) 2020-02-13 20:27:13 +01:00
Matt c381d9ff3f Remove obsolete construction of CoordsXY object 2020-02-13 12:11:20 +01:00
Michael Steenbeek e53d76ae2e Fix errors in #10680 (#10692) 2020-02-12 23:11:04 +01:00
Duncan b8b539c16e Modify next_x/y/z to become a CoordsXYZ (#10680)
* Modify next_x/y/z to become a CoordsXYZ

Should be further scope for refactoring from this.

* Make suggested changes

* Fix default construct issues
2020-02-11 22:01:14 +00:00
duncanspumpkin 5e9e9df7ce Refactor invalidate_sprite 2020-01-19 17:16:42 +00:00
duncanspumpkin a5ef8d6240 Rename rct_vehicle 2020-01-19 17:14:56 +00:00
duncanspumpkin 164acc85cc Rename sprites to newer style naming 2020-01-19 17:10:53 +00:00
Gymnasiast af12421f2d Apply fixes 2020-01-19 17:34:11 +01:00
modulo7 fdf0c17fd8 Name field var_CD of vehicle struct. Refactor to enum 2020-01-19 17:34:11 +01: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
duncanspumpkin f04e791f7c When in NO_MONEY mode still path to shops with prices 2020-01-16 20:28:38 +00:00
Duncan c170926200 Refactor to prefer baseZ instead of height for big Z (#10478) 2019-12-31 09:33:27 +01: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
Michael Steenbeek 4b0dff92aa Name word_981D6C (#10471) 2019-12-30 12:29:08 +01: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
Michael Steenbeek 64f7cac6d6 Create getters for station height and start (#10453) 2019-12-27 15:57: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 37973c162f Remove LocationXY usage on openrct2\peep\Guest.cpp 2019-12-27 08:49:35 -03:00
ζeh Matt 518780c3e8 Merge pull request #10422 from ZehMatt/refactor/gCommandExpenditure
Refactor out gCommandExpenditureType
2019-12-25 01:49:46 +01: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 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
Matt 52ee9c6896 Use enum class for ExpenditureType 2019-12-22 20:51:55 +01:00
Matt c24112ffad Refactor out gCommandExpenditureType 2019-12-22 20:51:49 +01:00
Tulio Leao 7c75db2b2d Make map_get_surface_element_at only accept Coords objects 2019-12-18 23:46:50 -03:00
Tulio Leao af7b364946 Prefer map_is_location_valid over hardcoded map limits (#10373) 2019-12-14 22:50:34 +01:00
Tulio Leao 1532ee2b23 Create CoordsXY::ToTileStart() and CoordsXY::ToTileCentre() 2019-11-30 16:47:23 +01:00
Tulio Leao 72b4d93ad2 Avoid dereferencing map_get_surface_element_at nullptr on libopenrct2 2019-11-18 08:01:04 -03: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