1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00
Commit Graph

234 Commits

Author SHA1 Message Date
Michael Steenbeek
c1e2c7cc5a Fix mistake made in #10579 (#11184) 2020-03-31 20:56:47 +02:00
Michael Steenbeek
cfb405f0ed Use StationIndex in many more places (#10992) 2020-03-26 21:38:26 +01:00
Michael Steenbeek
3f473ec3f0 Fix #6123: Cannot build some track designs with 4 stations (#11031) 2020-03-25 14:20:29 +01:00
Michael Steenbeek
c519512cfe Create ObjectEntryIndex (#10980) 2020-03-20 19:28:39 +01:00
Michael Steenbeek
18ebe73dfa Replace object_entry_get_type() with method (#10937) 2020-03-15 12:07:04 +01:00
Gymnasiast
bdf681f440 Clean up many other coordinates 2020-03-13 12:03:43 +01:00
Duncan
3003e1de75 Fix #10602: Error adding track scenery additions far from station start
Issue caused due to stuffing a temporary unsigned variable in a signed variable. This fix is not a permanent fix and this field in the future should be split up into two separate fields: tile position and relative tile position.

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2020-03-13 09:32:05 +01:00
Michael Steenbeek
be13c1fc87 Refactor more TileCoords 2020-03-07 21:07:18 +01:00
Michael Steenbeek
d64b73c29a Clean up RCT1/2 constants (#10855) 2020-03-05 22:49:16 +01:00
Tulio Leao
09fad0ef7f Change rct_viewport to use ScreenCoordsXY 2020-03-02 20:50:58 -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
Michael Steenbeek
8a9f0eeca5 Prepare track piece handling code for more than 256 pieces (#10575) 2020-01-17 12:27:14 +01: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
Tulio Leao
b1dc6ed6ed Use CoordsXY on footpath_connect_edges() 2020-01-05 08:20:16 -03:00
Michael Steenbeek
0c9b1cec96 Correct max vehicles per ride value (#10504)
* Correct max vehicles per ride value

* Fix formatting

* Fix constant usage in TrackDesign.cpp
2020-01-04 18:10:33 +01:00
Duncan
c170926200 Refactor to prefer baseZ instead of height for big Z (#10478) 2019-12-31 09:33:27 +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
Michael Steenbeek
64f7cac6d6 Create getters for station height and start (#10453) 2019-12-27 15:57:40 +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
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
52d09171ba Remove usage of LocationXY on TrackDesign (#10383) 2019-12-18 11:20:51 +01:00
duncanspumpkin
df5d5f4eb1 Fix the logging once and for all 2019-12-15 16:48:14 +00:00
duncanspumpkin
3c89fc63ad Reduce logging of variables to just name to make logs useful 2019-12-15 08:26:19 +00:00
duncanspumpkin
2eab8c3784 Fix formatting and declaration 2019-12-15 08:23:21 +00:00
duncanspumpkin
63b8f83f4f Make suggested changes 2019-12-15 08:23:21 +00:00
duncanspumpkin
cfb4bba721 Remove todo and clang format where required
Change array type to avoid additional code

Make CI's happier
2019-12-15 08:21:32 +00:00
duncanspumpkin
d8b5060eb9 Remove dead game command code.
Refactor of z increment
2019-12-15 08:21:32 +00:00
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