Michael Steenbeek
08ab15ef36
Fix #10313 : Path furniture can be placed on level crossings
2020-01-05 17:59:02 +01:00
Tulio Leao
e7ee8ebc03
Use CoordsXY on footpath_update_queue_entrance_banner()
2020-01-05 09:14:55 -03:00
Tulio Leao
482ca8765c
Use CoordsXY on Footpath's loc_6A6D7E() and loc_6A6C85()
2020-01-05 09:14:51 -03:00
Tulio Leao
b1dc6ed6ed
Use CoordsXY on footpath_connect_edges()
2020-01-05 08:20:16 -03:00
Gymnasiast
0d09a645fc
Refactor map_get_footpath_element() and fix #10486
2019-12-31 10:08:36 +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
Tulio Leao
a4e99695d4
Remove LocationXY usage on openrct2\peep\Staff.cpp
2019-12-27 08:49:35 -03: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
27866e992d
Make Map::check_max_allowable_land_rights_for_tile() receive CoordsXYZ ( #10433 )
2019-12-23 17:24:41 +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
duncanspumpkin
521e5db4c2
Make constant values more explicit.
...
Fix mistake in z coordinate conversion
2019-12-21 12:22:59 +00:00
duncanspumpkin
1f80dee4df
Refactor footpath.cpp to remove LocationXY and use CoordsXY
2019-12-21 12:18:34 +00:00
Michael Steenbeek
6b5be4765d
Merge pull request #10399 from duncanspumpkin/refactor_map_animation
...
Refactor MapAnimation to use CoordsXYZ
2019-12-21 13:12:11 +01:00
duncanspumpkin
ee206546bf
Refactor MapAnimation to use CoordsXYZ
2019-12-19 18:38:46 +00:00
Tulio Leao
7c75db2b2d
Make map_get_surface_element_at only accept Coords objects
2019-12-18 23:46:50 -03:00
duncanspumpkin
0c6e062d5a
Refactor return value of screen_coord_to_viewport_cord
2019-12-01 09:15:07 +00:00
Tulio Leao
1532ee2b23
Create CoordsXY::ToTileStart() and CoordsXY::ToTileCentre()
2019-11-30 16:47:23 +01:00
Tulio Leao
47935288d0
Remove raw coordinates overload of get_map_coordinates_from_pos
2019-11-25 17:45:02 -03:00
Tulio Leao
054bc8e4ca
Receive ScreenCoordsXY and return CoordsXY in Viewport
2019-11-13 18:27:59 -03:00
Tulio Leao
892c084cd8
Use ScreenCoordsXY for windows/Footpath
2019-11-11 23:10:51 -03:00
duncanspumpkin
5ca553dd08
Refactor viewport_coord_to_map_coord to return a CoordXY
2019-11-01 20:04:07 +00: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
Joseph Atkins-Turkish
747e00512d
Fix #7572 : Queue paths connect to regular paths through fences
2019-09-18 23:31:29 +02:00
Richard Fine
31ce0f20f7
Use range-based for loops for checking all directions
2019-09-01 18:40:28 +01:00
Richard Fine
5ff78e48c7
Reduce usage of GetDirectionWithOffset()
...
GetDirectionWithOffset(2) is the same thing as 'direction_reverse(GetDirection())', and the latter is more readable.
2019-09-01 18:40:08 +01:00
Richard Fine
52b4717d85
Use Direction type for PathElement SlopeDirection
2019-09-01 16:08:01 +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
Ted John
ab7b17fc4e
Add nullptr checks for get_ride in libopenrct2 ( #9788 )
2019-08-08 22:58:56 +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
Ted John
e23638548a
Reduce use of MAX_RIDES and RIDE_TYPE_NULL
2019-08-04 16:44:17 +01:00
Matt
fc3afb3349
Remove unnecessary multiplication and division for sprite lists
2019-06-22 17:38:28 +02:00
duncanspumpkin
b9a70d02a3
Make suggested changes
...
Implement suggestions
Fix formatting
2019-05-12 17:31:48 +01:00
duncanspumpkin
e9e445837f
Add landset/buyrights action
2019-05-12 17:29:19 +01:00
duncanspumpkin
f6b610c325
Implement Banner Place/Remove Actions
2019-05-02 17:47:01 +01:00
Michael Steenbeek
42a1a8704d
Use empty() for vectors; clean up bool comparisons ( #9118 )
2019-04-20 20:39:47 +02:00
duncanspumpkin
5280728760
Fix formatting
2019-04-04 19:23:44 +01:00
duncanspumpkin
356a0e5e91
Rework flags
2019-04-04 19:23:44 +01:00
Gymnasiast
9839bb7bba
Fix path preview
...
More work is needed to properly split the paths, but this will do for now.
2019-04-01 21:58:57 +02:00
Aaron van Geffen
2af13904c5
Update copyright notices for 2019. ( #8903 )
2019-03-17 07:16:15 +00:00
Michael Steenbeek
602821a389
Split path surface objects into paths and queues
2019-03-16 12:37:32 +01:00
Duncan
adf440ed1f
Merge pull request #8874 from ZehMatt/fix-8873
...
Fix #8873 : null dereference when trying to place footpath.
2019-03-16 07:40:48 +00:00
Duncan
82f320eb24
Merge pull request #8830 from duncanspumpkin/path_from_track
...
Footpath Place From Track Game Action
2019-03-15 19:42:30 +00:00
Matt
126ffd104e
Fix #8873 : null dereference when trying to place footpath.
2019-03-15 19:31:04 +01:00
Ted John
0aade935aa
Fix #8824 : invalid read in footpath_chain_ride_queue ( #8831 )
2019-03-06 19:11:21 +00:00
duncanspumpkin
0070283dc2
Implement game action
2019-03-05 19:54:17 +00:00
duncanspumpkin
29de97f5b1
Remove references to old game command
2019-03-04 16:57:21 +00:00
duncanspumpkin
bcced4016f
Use new action
2019-03-04 16:57:21 +00:00
duncanspumpkin
c8fd5174ae
Implement footpathplace
2019-03-04 16:57:21 +00:00
duncanspumpkin
510d71ab68
Add FootpathSceneryPlaceAction
2019-03-04 16:57:21 +00:00
Ted John
cdec457abd
Refactor peep struct
2019-02-28 20:28:58 +01:00
Duncan
f0092b7aae
Merge pull request #8781 from duncanspumpkin/flag_refactor
...
Flag refactor
2019-02-27 19:18:02 +00:00
jensj12
89066759eb
Fix #8264 : Rides and scenery placeable outside of map with ZC and Sandbox mode enabled ( #8715 )
...
* Fix #8264 : Rides and scenery placeable outside of map with ZC and Sandbox mode enabled
map_can_construct_with_clear_at first checks whether it is inside the map, and then checks gCheatsDisableClearanceChecks, making earlier checks for gCheatsDisableClearanceChecks unnecessary.
* Increase network version
2019-02-27 18:46:18 +00:00
duncanspumpkin
9d78bb0d4e
Fix compile and formating
2019-02-27 10:54:08 +00:00
duncanspumpkin
584c4d5134
Prevent a dereference of nullptr
2019-02-27 10:49:48 +00:00
duncanspumpkin
fae15fceca
Use IsBroken
2019-02-27 10:49:48 +00:00
duncanspumpkin
7840f6a7f7
Use SetIsBroken
2019-02-27 10:49:48 +00:00
duncanspumpkin
6495ffdb34
Use IsBlockedByVehicle
2019-02-27 10:49:48 +00:00
duncanspumpkin
354cce71eb
Introduce new functions to stop direct access
2019-02-27 10:49:48 +00:00
duncanspumpkin
112b40910b
Pass a bool to the set function. Make review changes
2019-02-25 20:44:12 +00:00
duncanspumpkin
737c308e4e
Use IsGhost() to access ghost state
...
Added set and clear ghost to further prevent direct access to flags
2019-02-25 15:12:35 +00:00
duncanspumpkin
6890f4f756
Use quarter tile for map can construct at
...
Make callees of map_can_construct_with_clear use QuarterTile
Use quarter tile for small scenery rotation
Fix clang format
Further clang format
2019-02-25 13:51:08 +00:00
ζeh Matt
d143c7b7c6
Fix 8698 ( #8709 )
2019-02-14 22:09:16 +01:00
Ted John
9e461b2e34
Pass Ride* instead of ride_id_t
2019-02-12 23:29:38 +00:00
ζeh Matt
3aad9a4b2e
Refactor footpath_update_path_wide_flags
2019-01-29 19:07:00 +01:00
Michael Steenbeek
4e9d2ce764
Split footpath object into two internally
2019-01-20 21:38:38 +01:00
Gymnasiast
ad2698df0d
Move 'should draw path over supports' to tile element
2019-01-20 17:23:27 +01:00
Michael Steenbeek
b4bef2fe7d
Merge pull request #8560 from richard-fine/directions
...
Begin cleanup of direction handling
2019-01-18 19:09:39 +01:00
Gymnasiast
74a3674e86
Replace more hardcoded instances of RIDE_ID_NULL
2019-01-12 12:38:23 +01:00
Ted John
8701286772
Use new ride_id_t typedef ( #8561 )
2019-01-12 10:11:55 +00:00
Richard Fine
b77f1285a4
Reformat
2019-01-05 19:48:12 +00:00
Richard Fine
e90e9dd73f
Introduce many uses of direction_reverse
...
Change many of the places doing the ^2 trick to use direction_reverse instead, for improved readability.
2019-01-05 15:41:46 +00:00
Michael Steenbeek
b5317ee9e9
Split drawing of path and railing
2019-01-02 19:52:53 +01:00
Ted John
4195f0d9c9
Change gPeepSpawns to a vector so we can now have more than 2
2018-12-16 19:00:16 +00:00
ζeh Matt
940fff4bbf
Fix dereferencing nullptr when game objects are missing. ( #8360 )
2018-12-05 22:59:15 +01:00
Hielke Morsink
354d973a48
Use std::size instead of Util::CountOf
2018-11-23 21:59:08 +01:00
Michał Janiszewski
7582afe0b4
Fix #8248 : Invalid tile element in footpath_element_insert ( #8249 )
...
* Fix #8248 : Invalid tile element in footpath_element_insert
* Update Footpath.cpp
2018-11-11 19:17:08 +01:00
Michael Steenbeek
94ce57929a
Fix #8236 : Paths of track designs are built incorrectly
2018-11-08 22:13:44 +01:00
Michael Steenbeek
f8add7f62e
Rename rct_tile_element to TileElement
2018-11-01 13:53:50 +01:00
Michael Steenbeek
5f4cca3c7e
Remove rest of access to footpath edges
2018-10-31 15:08:06 +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
1d214c0e4e
Replace type comparisons with GetType()
...
This function is a bit odd, as it implicitly also checked if the rotation was 0. I assume this is a bug and it was only intended to check for type.
2018-10-31 13:12:11 +01:00
Michael Steenbeek
1dce29b9a7
Replace two more usages of type
2018-10-31 13:10:41 +01:00
Michael Steenbeek
db3c2fcc46
Use calls to set queue from track designs
2018-10-31 13:10:34 +01:00
Michael Steenbeek
af2c1e69d1
Remove residual access to path addition_status field
2018-10-31 13:10:07 +01:00
Michael Steenbeek
853e4c4a6a
Remove residual access to path ride_index field
2018-10-31 13:09:53 +01:00
Michael Steenbeek
785dc43f6b
Remove residual access to additions field
...
It looks like neighbour_list_push() never actually reads the contents of the station index, it just compares it to other tiles. Therefore, this should work.
2018-10-31 13:09:42 +01:00
Michael Steenbeek
0f4560598e
Replace residual access to path element entry index field
2018-10-31 13:09:29 +01:00
Michael Steenbeek
66cde65f87
Replace C style function for getting slope direction
2018-10-31 13:09:19 +01:00
Gymnasiast
90f04cf478
Fix #8057 : Game crashes when placing an entrance
2018-10-09 22:12:29 +02:00
Gymnasiast
774d26306f
Fix formatting
2018-10-04 14:54:13 +02:00
Gymnasiast
b1f737d985
Remove remaining access to additions field
2018-10-04 14:54:12 +02:00
Gymnasiast
a6885ea464
Replace C-style functions for getting direction
2018-10-04 14:54:12 +02:00
Gymnasiast
015ece94c6
Replace C-style functions for getting path entries
2018-10-04 12:13:17 +02:00
Gymnasiast
ecd6247462
Replace C-style functions for checking getting path additions
2018-10-04 12:13:17 +02:00
Gymnasiast
ee05438953
Replace C-style functions for checking path addition ghost status
2018-10-04 12:13:17 +02:00
Gymnasiast
e159ac65a6
Replace C-style functions for IsWide() and SetWide()
2018-10-04 12:13:17 +02:00
Gymnasiast
f9f233dbb1
Replace C-style function for HasQueueBanner()
2018-10-04 12:13:17 +02:00
Gymnasiast
37f59e17dc
Replace C-style isSloped() function
2018-10-04 12:13:17 +02:00
Gymnasiast
88f3e9be75
Fix crash
2018-10-03 19:38:18 +02:00
Michael Steenbeek
882a65e4c0
Port queue functions
2018-10-03 12:18:21 +02:00
Michael Steenbeek
3b7fc4cf8c
Port rest of banner functions
2018-09-27 22:15:04 +02:00
Michael Steenbeek
a8e087b560
Return actual entrance elements from map functions
2018-09-27 22:15:04 +02:00
Michael Steenbeek
995c6debf1
Port entrance path type lookup
2018-09-27 22:15:04 +02:00
Michael Steenbeek
3c93aca727
Port entrance station index and sequence lookup
2018-09-27 22:15:04 +02:00
Michael Steenbeek
c7eaa1ba80
Port entrance ride index lookup
2018-09-27 22:15:04 +02:00
Michael Steenbeek
cc7f8e612d
Port entrance type lookup
2018-09-27 22:15:04 +02:00
Michael Steenbeek
a3e9c63fc3
Move GetRideIndex to struct methods
2018-09-25 21:57:21 +02:00
Gymnasiast
ae4c464ce7
Move getting track sequence to struct methods
2018-09-25 21:57:21 +02:00
Gymnasiast
8908f3f47e
Move getting track type to struct methods
2018-09-25 21:57:21 +02:00
Gymnasiast
0f08128657
Fix formatting
2018-09-16 21:34:51 +02:00
Michael Steenbeek
74ccf010e6
Port surface elements to new structure
2018-09-16 21:34:51 +02:00
Michael Steenbeek
1d3baef9b7
Remove some C-style tile element functions
2018-09-16 21:34:04 +02:00
Matt
04928d4b84
Refactor reference over std::shared_ptr.
2018-08-31 07:18:48 +02:00
Linus Unnebäck
fd07be587a
Remove Math::Clamp in favour of std::clamp
2018-08-12 16:47:12 +01:00
ζeh Matt
b2005c3b9f
Implement FootpathRemoveAction as a GameAction ( #7867 )
2018-08-12 10:31:00 +02:00
Hielke Morsink
0b03464186
Replace 0 and NULL with nullptr ( #7827 )
2018-07-25 22:49:20 +02:00
clang-format
b02dfdbc93
Binpack function arguments together
...
Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:22 +02:00
clang-format
95ce592579
Enforce not breaking before assignments and function names
...
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:19 +02:00
clang-format
5c55fd6132
clang-format world
2018-07-23 16:00:12 +02:00
Michael Steenbeek
1b08fb4e69
Replace our own integer types with standard ones
2018-06-20 17:30:40 +02:00
Hielke Morsink
0cf256ac9e
Ready copyright notice for clang-format
...
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.
I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Ted John
c300f873f5
Refactor peep check for vehicle
2018-06-10 22:59:58 +01:00
Hielke Morsink
5d0022a5cb
Remove argument list from zero-initializers with zero/false/nullptr value
2018-06-04 19:50:46 +02:00
Michael Steenbeek
a14d59028f
Modify some commands to use CoordsXY
2018-06-04 19:18:52 +02:00
Hielke Morsink
20fb4501d0
Fix #7505 : Crash when building path off map edge ( #7587 )
...
Validate map location before looping over the tile elements.
2018-06-01 11:30:41 +02:00
Michael Steenbeek
b573bd49b3
Replace all occurrences of tile_element_is_last_for_tile()
2018-05-24 11:44:53 +02:00
duncanspumpkin
fcb66b7449
Start refactoring pathfinding to use tileCoords
2018-05-05 11:42:34 +01:00
Hielke Morsink
2203d662c9
Add bench and bin usage to the peep class
2018-05-05 11:42:20 +01:00
duncanspumpkin
40a88dc178
Move staff functions to staff.cpp
2018-05-05 11:08:20 +01:00
duncanspumpkin
8d37502c7a
Further use of SetState
2018-05-05 11:08:17 +01:00
duncanspumpkin
986b5a3f4d
Fix rebase issues
2018-05-05 11:06:24 +01:00
duncanspumpkin
80006cd4a0
Continue
2018-05-05 11:04:50 +01:00
Michael Steenbeek
5f9d40be7a
Replace tile_element_get_type() with struct method
2018-05-02 19:27:04 +02:00
oli414
3bff12c081
Seperate surface tile element
2018-05-01 16:33:16 +02:00
Hielke Morsink
30063984e6
Delete unused function arguments or mark them so ( #7426 )
...
This aims to make future refactoring easier. The arguments are removed where possible, but kept and marked with C++17's [[maybe_unused]] where they could not be removed (e.g. when they are used as a callback, rather than called directly).
I've skipped the rides/<category>/* and peep/* source files, because the rides source files are mostly generated and have a ton of unused variables, and the peep source files are being refactored.
I've also skipped most of window/* source files, because most of the functions are used as callbacks and will be bulk-renamed at some point.
2018-04-20 13:56:37 +02:00
Hielke Morsink
f661d48d90
Add tests for tile_element_wants_path_connection_towards
2018-04-17 20:43:49 +02:00
Hielke Morsink
99d8c83807
Fix #7402 Properly check for entrance location before disconnecting paths
2018-04-17 20:43:49 +02:00
Albert Morgese
a3b04a67b2
Implement #1675 : Auto-rotate shops to face footpaths
2018-04-16 20:02:46 +02:00
Hielke Morsink
dc673a64d8
Give context the ownership of repositories and the object manager ( #7340 )
...
This makes them no longer a singleton, which fixes annoying behaviour when launching multiple contexts in one game session.
2018-04-10 13:19:23 +01:00
Michał Janiszewski
67f74119cf
Fix missing headers
2018-03-20 00:27:58 +01:00
Michał Janiszewski
cd065d4f41
Reduce includes in common header
2018-03-20 00:27:58 +01:00
Michał Janiszewski
bb98618847
Fix compilation errors in Footpath.cpp
2018-03-18 10:19:17 +01:00
Michał Janiszewski
62000236a8
Add missing Guard.hpp header in Footpath.cpp
2018-03-18 10:19:17 +01:00
Hielke Morsink
f9307c8c9e
Proplerly check for element to be removed
...
The element that gets removed is only a ghost while using the path tool, other tools just remove the path immediately.
2018-03-18 10:19:17 +01:00
Hielke Morsink
d0471bcbfd
un-fill corners that were filled by the ghost
...
Old behaviour: connected edge and corners get removed.
New behaviour: connected edge may stay connected, but corners will be removed.
2018-03-18 10:19:17 +01:00
Hielke Morsink
16c575c115
Keep paths connected when wanted
...
A tile can have multiple connections to a path when building with clearance checks disables, but the function that removes the edges doesn't assume this. This PR makes it so that it first checks if there are no other tile elements that want to stay connected to a path before removing an edge.
2018-03-18 10:19:17 +01:00
Michael Steenbeek
5411c77358
Clean up more direct access to tile elements
2018-03-09 19:40:16 +01:00
Michael Steenbeek
1fa2fa8f80
Refactor ride->entrances and ride->exits
2018-03-07 19:10:50 +01:00
Aaron van Geffen
ba1d269227
Move all Virtual Floor code from Map to its own file.
2018-03-04 19:28:56 +01:00
ZehMatt
fdf7adecd9
Fix #7002 : Always invalidate virtual floor regardless of selection.
2018-03-04 19:28:56 +01:00
Michael Steenbeek
2de6529cf5
Use big coordinates for PeepSpawn's Z coordinate
2018-02-21 09:50:07 +01:00
Michael Steenbeek
ea0566a3f5
Split PeepSpawn and rct12_peep_spawn
2018-02-21 09:50:07 +01:00
Michael Steenbeek
45e892e5b5
Allow passing BigCoordsXY into map_get_surface_element_at()
2018-02-15 22:26:50 +01:00
Hielke Morsink
55979a3fff
Remove and replace C typedefs
...
`typedef struct/union/enum name { ... } name_again;` is not needed whe compiling C++, moving the name at the back to be in front of the object and removing `typedef` makes it usable the very same way.
This also replaces typedefs with the using keyword. They have better readability, especially for function pointer types, and would allow more flexibility when used with templates.
2018-02-14 09:42:26 +01:00
Ted John
7e01dcdaaf
Remove legacy object list
2018-02-12 12:48:41 +00:00
Hielke Morsink
7fe50a481f
Allow building queues from raised/lowered entrances
...
The original code assumes the entrance is at the exact same height as the
station, which is not always the case with hacked rides.
2018-02-06 19:09:51 +01:00
Michael Steenbeek
b78a744b8e
Create footpath_get_edges()
2018-02-06 10:41:31 +01:00
Gymnasiast
5cc21fd21b
Replace NULL with nullptr in C++ files
2018-01-29 21:33:21 +00:00
Michał Janiszewski
3ba0cc3dae
Add missed constexprs
2018-01-14 16:13:37 +01:00
Michael Steenbeek
1787af8084
Fix #7003 : Building sloped paths trough flat ones causes glitches
2018-01-11 16:30:11 +01:00
Michael Steenbeek
47a23603ae
Remove unused functions
2018-01-11 13:25:09 +01:00
Michael Steenbeek
cd5a1ba888
Compile files in world folder as C++
2018-01-11 13:25:09 +01:00