Gymnasiast
85ecb52e7c
Manually replace more Z occurrences
2019-12-23 20:05:26 +01:00
Gymnasiast
7d11858dbe
Create getter for GetBaseHeight()/GetClearanceHeight()
2019-12-23 20:05:24 +01:00
Duncan
b330d3816f
Reduce LocationXY usage in vehicle.cpp ( #10431 )
...
Note changed logic on boat hire (Now uses ToTileCentre() before didn't do the & ~0x1F)
and chairlift (Now actually checks the z coordinate of the bullwheel when going backwards {not sure if that is even possible}).
Both likely minor bugs.
2019-12-23 17:53:36 +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
c169a92f1f
Make ClearAction::ClearSceneryFromTile() receive a CoordsXY object ( #10432 )
2019-12-23 17:12:54 +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
Matt
0aa6fc7431
Fix formatting
2019-12-22 22:06:10 +01:00
ζeh Matt
19deee3e3a
Merge pull request #10421 from ZehMatt/fix-10420
...
Fix #10420 : Money effect causing false positive desync
2019-12-22 20:55:16 +01:00
Matt
52ee9c6896
Use enum class for ExpenditureType
2019-12-22 20:51:55 +01:00
Matt
79acb6a073
Move staff wage data to Staff.cpp/h
2019-12-22 20:51:55 +01:00
Matt
c24112ffad
Refactor out gCommandExpenditureType
2019-12-22 20:51:49 +01:00
nia
addd27d4dc
Support NetBSD and simplify platform ifdefs. ( #10271 )
...
For files intended to support unixy freedesktopy systems,
reduce the ifdef down to __unix__ && !__APPLE__ && !__ANDROID__,
rather than naming linux and all the BSDs and so on by hand.
Should simplify adding support for systems like illumos in the
future.
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2019-12-22 17:07:39 +01: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
Duncan
e61401e48c
Fix #10410 : Tile Inspector does not hightlight tile correctly
...
Mistake made when refactoring not passing the error up through the chain and silently working.
2019-12-22 13:59:24 +01:00
Tulio Leao
0416c2eaa3
Merge pull request #10427 from tupaschoal/fix-10426
...
Fix #10426 : Deleting path moves preview in opposite direction
2019-12-22 12:45:23 +00:00
Matt
69eb3f5d91
Bump up network version
2019-12-22 07:50:55 +01:00
Matt
d60cdbe5f2
Fix #10420 : Money effect causing false positive desync
2019-12-22 07:50:51 +01:00
Tulio Leao
461095ab6c
Fix #10417 : Ride preview incorrectly centered
2019-12-22 01:48:28 -03:00
Michael Steenbeek
30b03d998c
Merge pull request #10409 from tupaschoal/coords-for-set-tile-elements
...
Make Map::map_set_tile_elements() use TileCoordsXY
2019-12-21 19:12:51 +01:00
Michael Steenbeek
fb2f907414
Merge pull request #10363 from duncanspumpkin/refactor
...
Refactor to reduce LocationXY usage
2019-12-21 16:24:24 +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
Michael Steenbeek
ef4e494532
Merge pull request #10412 from Gymnasiast/refactor/lesslocationxy
...
Remove MakeXY16
2019-12-21 15:34:40 +01:00
Tulio Leao
5fcfc6af00
Rename map_set_tile_elements to singular
2019-12-21 10:28:52 -03:00
Tulio Leao
d7efe4de90
Make Map::map_set_tile_elements() use TileCoordsXY
2019-12-21 10:28:33 -03:00
Tulio Leao
9b1395bfb8
Make Map::map_get_banner_element_at() use CoordsXYZ ( #10408 )
2019-12-21 14:15:40 +01:00
Duncan
228205a199
Fix crash in dev builds due to sign issues ( #10405 )
2019-12-21 14:08:57 +01:00
Tulio Leao
5cd6c67abd
Make Map::map_get_small_scenery_element_at() receive CoordsXY ( #10406 )
2019-12-21 14:08:18 +01:00
Tulio Leao
38cf4728ef
Make Map::map_get_nth_element_at() use CoordsXY ( #10411 )
2019-12-21 14:04:00 +01:00
Gymnasiast
11cc07a2b8
Replace hard-coded index with constant
2019-12-21 14:00:45 +01:00
Gymnasiast
dcc720c1ec
Remove MakeXY16()
2019-12-21 13:51:59 +01:00
duncanspumpkin
64656cdc0e
Fix mistake made by auto complete
2019-12-21 12:43:13 +00:00
duncanspumpkin
521e5db4c2
Make constant values more explicit.
...
Fix mistake in z coordinate conversion
2019-12-21 12:22:59 +00:00
duncanspumpkin
f346e439fc
Change type of map selection a and b
2019-12-21 12:18:34 +00:00
duncanspumpkin
1f80dee4df
Refactor footpath.cpp to remove LocationXY and use CoordsXY
2019-12-21 12:18:34 +00:00
duncanspumpkin
6b72b0992d
Removal of LocationXY and simplify
2019-12-21 12:18:34 +00:00
duncanspumpkin
df2393c3f0
Fix clang format
2019-12-21 12:17:57 +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
b3dafc64c3
Refactor to improve readability as per suggestions
2019-12-21 12:12:10 +00:00
duncanspumpkin
21128c5389
Undo clang format mistakes
2019-12-21 11:52:32 +00:00
duncanspumpkin
45403ac2d3
Move station_starts to TileCoordsXY
2019-12-21 11:48:13 +00:00
duncanspumpkin
7297125cae
Refactor stations ready for TileCoordsXY
2019-12-21 11:26:37 +00:00
Michael Steenbeek
a2b9598341
Modify code using Location8 to use isNull()/setNull() ( #10403 )
2019-12-21 11:34:46 +01:00
duncanspumpkin
f64563e0a7
Make suggested changes
2019-12-21 09:07:34 +00:00
Tulio Leao
780e3265d1
Standardize Coords and TileCoords objects
2019-12-20 08:29:42 -03:00
Duncan
3be7d824ac
Merge pull request #10397 from duncanspumpkin/refactor_gcommand
...
Remove gCommandPosition. Use GameActionRes instead.
2019-12-19 20:48:20 +00:00
duncanspumpkin
86cc7e9734
Add temporary variable to clear up shifting.
...
Fix clang format.
Simplify compare
2019-12-19 18:58:33 +00:00
duncanspumpkin
ee206546bf
Refactor MapAnimation to use CoordsXYZ
2019-12-19 18:38:46 +00:00
nia
1f220f2d62
Simplify OS-specific FileStream code ( #10270 )
...
Define ftello/fseeko to ftello64/fseeko64 only on Linux,
these functions are Linux-specific extensions.
Define ftello/fseeko to _ftelli64/_fseeki64 on MSC.
Otherwise, just use the standardized ftello/fseeko, and avoid
duplicating code for different names of the same function.
This allows this code to be reused on e.g. NetBSD without piling
on additional #ifdefs for any other POSIX operating systems.
2019-12-19 18:34:31 +01:00
Tulio Leao
918624e090
Fix #10396 : Function returning TileCoordsXYZD'z coord in a CoordsXYZD object ( #10398 )
2019-12-19 15:41:22 +01: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
Tulio Leao
7e7b4029a9
Simplified conversions from TileCoordsXYZ to CoordsXY
2019-12-19 08:12:42 -03: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
Duncan
08bf0a6807
Merge pull request #10391 from tupaschoal/mouse-diff-coords
...
Save mouse differential coords using ScreenCoordsXY
2019-12-19 08:02:32 +00:00
Tulio Leao
aea755bd70
Allow TileCoordsXYZD to generate CoordsXYZD equivalent
2019-12-19 00:11:26 -03:00
Tulio Leao
a5065e95c6
Simplify MouseInput differential coords calculation
2019-12-18 23:57:57 -03:00
Tulio Leao
5c657bde9f
Remove map_get_surface_element_at operating with TileCoordsXY
2019-12-18 23:47:17 -03:00
Tulio Leao
7c75db2b2d
Make map_get_surface_element_at only accept Coords objects
2019-12-18 23:46:50 -03:00
Duncan
099404b505
Merge pull request #10381 from tupaschoal/cursorsate-store-coords
...
Make CursorState store a ScreenCoordsXY object
2019-12-18 20:10:51 +00: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
Tulio Leao
52d09171ba
Remove usage of LocationXY on TrackDesign ( #10383 )
2019-12-18 11:20:51 +01:00
Tulio Leao
c71c4284d0
Make map entrance/exit fetching functions use only CoordsXY objects
2019-12-17 23:55:46 -03:00
Tulio Leao
8613edee4a
Use ScreenCoordsXY::operator- to improve readability
2019-12-17 23:33:07 -03:00
Tulio Leao
972a8735e8
Fix arithmetic error in Scenery::window_scenery_update()
2019-12-17 23:32:34 -03:00
Tulio Leao
502a15512b
Save mouse differential coords using ScreenCoordsXY
2019-12-17 23:21:12 -03:00
Ted John
b2c0787c2d
Fix #10389 : Invalid read in vehicle_update_travelling ( #10390 )
2019-12-17 21:48:38 +01:00
Tulio Leao
c2c40fa951
Create ScreenCoordsXY on UIContext mouse/finger functions ( #10382 )
2019-12-17 18:46:28 +01:00
Tulio Leao
6b06b2c578
Use ScreenCoordsXY for Mouse Drag storage ( #10380 )
2019-12-17 18:38:20 +01:00
duncanspumpkin
df5d5f4eb1
Fix the logging once and for all
2019-12-15 16:48:14 +00:00
duncanspumpkin
11974dd7b3
Increment Network Version
2019-12-15 08:31:26 +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
073e75a7bd
Remove extra line break
2019-12-15 08:23:21 +00:00
duncanspumpkin
d97bb88c41
Reduce desyncs by removing teh track before updating peep logic
2019-12-15 08:21:32 +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
fa3332f47a
Fix ghost desync and rotation issue
...
Fix callback by reworking placement code
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
2cd3add373
Make CursorState store a ScreenCoordsXY object
2019-12-14 23:30:55 -03:00
Tulio Leao
72d19f779b
Fix clang-format
2019-12-14 23:07:45 -03:00
Tulio Leao
9d09f1b95c
Use ScreenCoordsXY on context cursor operations ( #10364 )
2019-12-14 22:52:18 +01:00
Tulio Leao
af7b364946
Prefer map_is_location_valid over hardcoded map limits ( #10373 )
2019-12-14 22:50:34 +01:00
Tulio Leao
03e7e29b21
Make map entrance/exit fetching functions use Coords objects
2019-12-14 12:13:09 -03:00
frutiemax
18ba9b27a3
Implement #7865 : Allow transport rides to synchronise with adjacent stations ( #10280 )
2019-12-14 09:58:00 +01:00
Tulio Leao
801e6e085d
Use CoordsXY on Map::map_surface_is_blocked() ( #10369 )
...
* Use CoordsXY on Map::map_surface_is_blocked()
* Update src/openrct2/peep/GuestPathfinding.cpp
* Use map_is_location_valid() instead of hardcoded number
2019-12-14 09:57:13 +01:00
Abd Narane
1ace96ccc4
Add shortcuts for changing the scaling value. ( #10341 )
...
Fixes #10305
2019-12-13 17:31:23 +01:00
Tulio Leao
440f012e8a
Remove unused Map::rotate_map_coordinates() function ( #10362 )
2019-12-12 18:53:24 +01: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
fed417da03
Merge pull request #10356 from duncanspumpkin/label_var
...
Change the label on known var to reflect use.
2019-12-11 18:14:07 +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
43366a0a51
Make sure height comparisons are done against TileCoords
2019-12-10 23:33:53 -03:00
Duncan
2a53ebd936
Merge pull request #10333 from tupaschoal/rotate-paint
...
Use CoordsXY for Paint rotations
2019-12-10 18:35:38 +00:00
Duncan
432ad7867a
Merge pull request #10334 from tupaschoal/rotate-for-trackdesign
...
Use CoordsXY for TrackDesign* rotations
2019-12-10 12:49:34 +00:00
Michael Steenbeek
8e805f5088
Merge pull request #10328 from tupaschoal/rotate-ride-coords
...
Use CoordsXY and ScreenCoordsXY for rotate in Ride*.*
2019-12-10 13:13:03 +01:00