1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 14:02:59 +01:00
Commit Graph

204 Commits

Author SHA1 Message Date
duncanspumpkin
7dbf0353ff Serialise scenery, mazes, entrances 2019-12-15 08:21:32 +00:00
duncanspumpkin
83503f4c69 Serialise track design. Start work on making it work
Fix track designs issuing extra game actions
2019-12-15 08:21:32 +00:00
duncanspumpkin
c781fcb72d Start moving track design into a game action
Make place track design work with game actions
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
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
081c9fb187 Use CoordsXY for TrackDesign* rotations 2019-12-04 23:30:36 -03: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
Tom Lankhorst
027c09553b Reformat code with clang-format 8.0. 2019-11-04 15:11:06 +01:00
Sijmen Schoon
ab2dbea32a Change a sizable portion of LocationXY(Z) to (Tile)CoordsXY(Z) 2019-10-31 00:19:14 +01:00
duncanspumpkin
ee64892f4b Clang format 2019-10-20 15:47:45 +01:00
duncanspumpkin
5842b851c2 Remove old game command for MazePlaceTrack 2019-10-20 15:23:36 +01:00
duncanspumpkin
783ae13538 Add MazePlaceTrackAction
This game action had been accidently assumed to be hard to do. Woops.
2019-10-20 15:21:49 +01:00
Duncan
9ad15e398b Merge pull request #10091 from tupaschoal/nullprt-deref-avoid-get_first_at
Avoid dereferencing invalid map_get_first_element_at return
2019-10-19 13:55:54 +02:00
Tulio Leao
35577f5b19 Avoid dereferencing invalid map_get_first_element_at return 2019-10-19 07:54:31 -03:00
Duncan
c3e14328f1 Little Refactor (#10075)
* Correct the label for track elem 255.

* Catch last little change
2019-10-19 10:00:42 +02:00
Denis Khabenkov
4e111c66a3 Fix #10074: Refactor TrackDesignEntranceElement 2019-10-11 00:25:13 +03:00
Denis Khabenkov
57a208d560 Fix #10064: Refactor TrackDesignEntranceElement (#10066)
* Fix #10064: Refactor TrackDesignEntranceElement
2019-10-10 18:23:29 +01: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
7193ba1bb7 Create TrackDesignMazElement struct
Closes #10053
2019-10-08 18:21:58 -03:00
Tulio Leao
6be7c42a3d Close #10051: Create TrackDesignSceneryElement 2019-10-08 17:13:34 +02:00
Tulio Leao
ff57f43996 Create TrackDesignTrackElement struct
Closes #10054
2019-10-08 07:47:56 -03:00
Denis Khabenkov
de53ac84b8 Fix #10052: Create a TrackDesignEntranceElement struct to replace rct_td6_entrance_element 2019-10-07 21:59:07 +03:00
Gymnasiast
bb73dd0dfb Refactor track element to use 16 bytes 2019-08-31 13:14:19 +02:00
Gymnasiast
f365bc3cb7 Create getters and setters for occupied quadrant 2019-08-27 21:12:48 +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
927c8a4e85 Create ScreenCoords struct. Refactor 3d_to_2d again 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
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
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
duncanspumpkin
486f13440f Fix #9875. Check for valid tile element before dereferencing 2019-08-17 11:06:19 +01:00
duncanspumpkin
5a611f49d6 Fix #9859. Actually keep the loading of a track design with try.
Mistake whilst implementing track desing importer and changing where code that could throw.
2019-08-15 20:13:39 +01:00
duncanspumpkin
2e24dc1f00 Fix large scenery mirror rotation 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
54d6722bf2 Link everything together 2019-08-09 20:40:35 +01:00
duncanspumpkin
16022a8b57 Remove dead code 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
cd4eb86a7c Merge pull request #9725 from IntelOrca/refactor/ride-manager
Refactor ride list
2019-08-07 21:03:17 +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
e23638548a Reduce use of MAX_RIDES and RIDE_TYPE_NULL 2019-08-04 16:44:17 +01:00