Commit Graph

101 Commits

Author SHA1 Message Date
Duncan c34079acee
Refactor LargeSceneryEntry and remove rct_scenery_entry (#14816) 2021-06-04 12:41:23 +01:00
skdltmxn b0a8ebc808
Refactor to use push_back more efficient (#13726) 2021-01-08 20:59:55 +00:00
Michael Steenbeek 406967c71f
Refactor object_entry_get_entry() to return Object 2021-01-03 23:01:52 +01:00
Dennis Devriendt 3073cca6aa
Close #13624: Refactor ViewportInteractionItem to use strong enum (#13657)
* Closes #13624: Refactor ViewportInteractionItem to use strong enum
2020-12-29 15:09:15 -03:00
Łukasz Pękalski 6e5105ab3b refactor: ObjectType to use strong enum
enum renaming complete
2020-11-11 16:07:01 +01:00
Matt ccde06ab0f
Explicitly pass formatter arguments to ShowError and family 2020-09-17 22:14:36 +03:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Michał Janiszewski c4b6897635 Address possible nullptr dereferences 2020-04-21 13:31:01 +02:00
Tulio Leao b449e445f7
Use named casts on openrct2/ride (#11163)
Excluding subfolders
2020-04-17 19:53:33 +02:00
Gymnasiast bdf681f440
Clean up many other coordinates 2020-03-13 12:03:43 +01:00
Gymnasiast 57a40c0657
Extend PathElement 2020-03-04 21:57:42 +01:00
Tulio Leao 475eed0a56 Receive CoordsXY by const ref instead of copy 2020-02-29 01:16:19 -03:00
Tulio Leao 181eaf768d Receive CoordsXYZ by const ref instead of copy 2020-02-29 01:14:05 -03: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 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
Gymnasiast 62fcbb07ca
Rename methods to GetBaseZ/GetClearanceZ 2019-12-23 20:08:37 +01:00
Gymnasiast 7d11858dbe
Create getter for GetBaseHeight()/GetClearanceHeight() 2019-12-23 20:05:24 +01:00
Tulio Leao 32259326bf Fix formatting on TrackDesignSave 2019-12-23 11:13:31 -03: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
Tulio Leao 081c9fb187 Use CoordsXY for TrackDesign* rotations 2019-12-04 23:30:36 -03:00
Tulio Leao 9123b597a9 Use constexpr on openrct2/* 2019-10-29 18:44:14 -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
Tulio Leao 6be7c42a3d Close #10051: Create TrackDesignSceneryElement 2019-10-08 17:13:34 +02:00
duncanspumpkin d145f93c0b Clang format 2019-08-09 20:43:03 +01:00
duncanspumpkin af31404472 Use std::string and cleanup unused functions
Use CoordsXY for save pop scenery functions

Use CoordsXY for push save scenery functions

Further refactoring to use coordsxy and standard functions
2019-08-09 20:43:03 +01:00
duncanspumpkin e9b59064e0 Fix code and clang format. Delete dead code.
Use correct TD4 checksum for vanilla TD4's.

Simplified the code for version detection since checksum numbers do not match up to a version

Fix TD4 imports.

Oh yeah TD4 doesn't have scenery or entrances

Move track related structs to correct files
2019-08-09 20:43:02 +01:00
duncanspumpkin af92dcba3e Creating t6 exporter 2019-08-09 20:39:54 +01:00
duncanspumpkin e3c63b762e Create new TrackDesign format 2019-08-09 20:39:53 +01:00
Ted John ab7b17fc4e
Add nullptr checks for get_ride in libopenrct2 (#9788) 2019-08-08 22:58:56 +01:00
Ted John 746d784b0e Fix placing track designs when ride 0 is not allocated 2019-08-07 21:25:28 +01:00
Ted John 6fff2079f9 Refactor ride name to dynamic args and std::string 2019-07-29 19:18:16 +01:00
Gymnasiast 64e51cd34b Close #8965: Refactor ride->inversions 2019-03-27 11:30:18 +01:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
duncanspumpkin c80c7b5cd2 Use LargeSceneryElement for return type 2019-03-16 16:23:26 +00:00
Ted John 9e461b2e34 Pass Ride* instead of ride_id_t 2019-02-12 23:29:38 +00:00
Ted John 9706dd8675 Pass Ride* instead of ride_id_t 2019-02-12 23:29:37 +00:00
Ted John 8701286772
Use new ride_id_t typedef (#8561) 2019-01-12 10:11:55 +00:00
Michael Steenbeek 31298bd772
Merge pull request #8543 from IntelOrca/refactor-ride
Refactor ride structure
2019-01-02 22:38:20 +01:00
Michael Steenbeek b5317ee9e9
Split drawing of path and railing 2019-01-02 19:52:53 +01:00
Ted John 38f632074b Merge ride track colour arrays into one 2019-01-01 21:25:34 +00:00
Ted John 37f76d1687 Move station fields into new station struct 2019-01-01 02:26:14 +00:00
Ted John 8e6497fc1d Merge vehicle_colours and vehicle_colours_extended 2018-12-31 19:25:07 +00:00
ζeh Matt 7d19a5bc77 Refactor memcpy to std::memcpy and memset to std::memset (#8408) 2018-12-15 22:23:31 +01:00
Michael Steenbeek f8add7f62e
Rename rct_tile_element to TileElement 2018-11-01 13:53:50 +01:00
Michael Steenbeek d89c3d9e67 Replace calls to get path edges
This replaces most calls/direct access to the footpath edges (i.e. the orthogonal directions, not the corners). This includes places where the whole byte was retrieved, but only compared against orthogonal directions.
2018-10-31 15:08:06 +01:00
Michael Steenbeek 853e4c4a6a Remove residual access to path ride_index field 2018-10-31 13:09:53 +01:00
Michael Steenbeek 0f4560598e Replace residual access to path element entry index field 2018-10-31 13:09:29 +01:00
tombomp 6992be87c3 Fix #8090: Bug with maze design saving
The exit wasn't being saved - ride_get_entrance_location was mistakenly called twice
2018-10-15 22:58:59 +02:00