Duncan
79dda7260a
Fix #11695 . Mechanics walking to 0,0 on entrance only ( #11704 )
...
Mistake made when refactoring that meant that null locations were converted into tile 0, 0. I've fixed the general case but it is preferred to try avoid using null states for coordinates if at all possible.
2020-05-11 20:28:40 +02:00
Michael Steenbeek
d7637cd70f
Replace many C-style casts ( #11720 )
2020-05-11 14:32:56 +02:00
Ted John
096de3ccc8
Implement list view
2020-05-09 17:24:15 +01:00
duncanspumpkin
54a058ca6c
Fix boat location import/export/update.
...
After a refactoring to split off the boat location the import/export functions meant incorrect information could be loaded into the s6 file for boats that had not left the station. Boats that had left the station had other fields clobbered for the same reason
2020-04-07 20:19:26 +01:00
Gymnasiast
bdf681f440
Clean up many other coordinates
2020-03-13 12:03:43 +01:00
Michael Steenbeek
e1427df59f
Fix #10899 : Position of money animation is incorrect ( #10903 )
2020-03-09 15:00:13 +01:00
Michael Steenbeek
be13c1fc87
Refactor more TileCoords
2020-03-07 21:07:18 +01:00
Tulio Leao
8b36cce37c
Make _lastMainViewport use ScreenCoordsXY
2020-03-02 20:51:01 -03:00
Tulio Leao
09fad0ef7f
Change rct_viewport to use ScreenCoordsXY
2020-03-02 20:50:58 -03:00
Michael Steenbeek
61175a4fbf
Confine use of LocationXY8 to RCT12 load/save code ( #10698 )
2020-03-01 21:16:10 +01:00
Michael Steenbeek
f41f878581
Replace some usages of LocationXY(Z)16 ( #10699 )
2020-02-18 22:42:38 +01:00
Tulio Leao
0c4623a39f
Replace typedef aliasing by using ( #10712 )
2020-02-17 11:43:47 +01:00
Matt
758a7e432f
Use const reference instead of copy for location structures
2020-02-13 11:53:14 +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
Tulio Leao
7cf03d3e41
Use CoordsXY on footpath_remove_edges_at()
2020-01-11 11:13:04 -03:00
Gymnasiast
1133a8c81c
Remove sLocationXY8
2019-12-30 23:03:13 +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
d0744df22f
Merge pull request #10443 from tupaschoal/reduce-locationxy
...
Remove LocationXY usage on windows and actions
2019-12-27 15:58:26 +01:00
Michael Steenbeek
64f7cac6d6
Create getters for station height and start ( #10453 )
2019-12-27 15:57:40 +01:00
Tulio Leao
109a90269c
Prefer setNull/isNull on TopToolbar over LOCATION_NULL
2019-12-27 09:52:31 -03:00
Tulio Leao
6c998d7b4d
Make Map::map_get_track_element_at() use CoordsXYZ
2019-12-24 11:19:03 -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
Duncan
96ff8fe7a1
Change value of COORDS_NULL to a less likely to collide value. ( #10423 )
...
It will also now match LOCATION_NULL. As this change should only affect in memory coords there should be no save, replay, network issues.
2019-12-22 14:03:32 +01:00
Michael Steenbeek
c2565bfe1c
Merge pull request #10407 from duncanspumpkin/refactor_stations
...
Fixing COORDS_NULL: Refactor stations
2019-12-21 16:13:48 +01:00
Gymnasiast
dcc720c1ec
Remove MakeXY16()
2019-12-21 13:51:59 +01:00
duncanspumpkin
b3dafc64c3
Refactor to improve readability as per suggestions
2019-12-21 12:12:10 +00:00
duncanspumpkin
45403ac2d3
Move station_starts to TileCoordsXY
2019-12-21 11:48:13 +00:00
Michael Steenbeek
a2b9598341
Modify code using Location8 to use isNull()/setNull() ( #10403 )
2019-12-21 11:34:46 +01:00
Tulio Leao
780e3265d1
Standardize Coords and TileCoords objects
2019-12-20 08:29:42 -03:00
Michael Steenbeek
6ede67d50a
Merge pull request #10371 from tupaschoal/coords-for-get-surface-element-at
...
Make map_get_surface_element_at only accept Coords objects
2019-12-19 13:24:17 +01:00
Michael Steenbeek
f59f5d9b1f
Merge pull request #10375 from tupaschoal/coords-for-map-entrance-exit
...
Make map entrance/exit fetching functions use Coords objects
2019-12-19 11:39:37 +01:00
Tulio Leao
aea755bd70
Allow TileCoordsXYZD to generate CoordsXYZD equivalent
2019-12-19 00:11:26 -03:00
Tulio Leao
5c657bde9f
Remove map_get_surface_element_at operating with TileCoordsXY
2019-12-18 23:47:17 -03:00
Tulio Leao
af281817c3
Use CoordsXYZD on map_get_wall_element_at() ( #10374 )
...
* Use CoordsXYZD on map_get_wall_element_at()
* Add CoordsXYZ::ToTileStart()
2019-12-18 11:23:53 +01:00
Tulio Leao
4f615c5802
Make const some methods of location objects ( #10392 )
2019-12-18 11:21:16 +01:00
duncanspumpkin
63b8f83f4f
Make suggested changes
2019-12-15 08:23:21 +00:00
Tulio Leao
2ff4c28cb5
Use CoordsXY on action rotation ( #10332 )
...
* Use CoordsXY on action rotation
* Don't use intermediate CoordsXY variable just for Rotating it next
* Standardize operations on Coords and Rotated Coords
* Remove unwanted linebreak addition
2019-12-12 08:09:46 +00: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
aca4d39107
Allow TileCoordsXYZ conversion to CoordsXYZ
2019-12-05 21:43:20 -03:00
Tulio Leao
1532ee2b23
Create CoordsXY::ToTileStart() and CoordsXY::ToTileCentre()
2019-11-30 16:47:23 +01:00
Tulio Leao
2acdc577f7
Use Coords for windows/RideConstruction
2019-11-18 19:17:54 -03:00
Tulio Leao
7e65aeaea3
Fix issues in code review
...
Implement operator== and operator!= for CoordsXYZD
Set location to null before returning from ride_get_entrance_or_exit_position_from_screen_position
2019-11-13 18:46:02 -03:00
Sijmen Schoon
f7fd98fcf2
Add constexpr keywords
2019-11-01 02:07:14 +01:00
Duncan
28e7d90efb
Merge pull request #10127 from tupaschoal/fix-10126
...
Fix #10126 : window movement inversed
2019-10-21 07:46:02 +01:00
Tulio Leao
6c35a0234e
Fix CoordsXY sum and subtract operators ( #10128 )
2019-10-21 07:23:01 +02:00
Tulio Leao
08db611dd5
Fix #10126 : window movement inversed
2019-10-20 23:44:26 -03:00
Tulio Leao
5f916b79ae
Use ScreenCoordsXY for MouseInput ( #10120 )
2019-10-20 19:10:30 +02:00