Commit Graph

1536 Commits

Author SHA1 Message Date
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 bad5e326d1
Merge pull request #10103 from tupaschoal/compilation-warnings
Fix some compilation warnings
2019-12-28 23:09:14 +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 84928cb4ef Comment why GetOrLoadImageTexture returns BasicTextureInfo 2019-12-27 15:05:28 -03:00
Tulio Leao d4feed81e6 Fix C6031: return value ignored 2019-12-27 15:05:28 -03:00
Tulio Leao 28812760e7 Fix some compilation warnings 2019-12-27 15:05:27 -03: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
Michael Steenbeek 8ca0cf52a7
Replace more direct accesses to base/clearance Z with getter/setter (#10454) 2019-12-27 15:26:40 +01:00
Tulio Leao 109a90269c Prefer setNull/isNull on TopToolbar over LOCATION_NULL 2019-12-27 09:52:31 -03:00
Tulio Leao 15f873c018 Remove LocationXY usage on openrct2-ui\windows\ViewClipping.cpp 2019-12-27 09:52:27 -03:00
Tulio Leao 05ef277cbd Remove LocationXY usage on openrct2-ui\windows\TopToolbar.cpp 2019-12-27 09:22:51 -03:00
Tulio Leao 3c3e179e7f Remove LocationXY usage on openrct2-ui\windows\RideConstruction.cpp 2019-12-27 09:22:51 -03:00
ζeh Matt 518780c3e8
Merge pull request #10422 from ZehMatt/refactor/gCommandExpenditure
Refactor out gCommandExpenditureType
2019-12-25 01:49:46 +01:00
Gymnasiast 62fcbb07ca
Rename methods to GetBaseZ/GetClearanceZ 2019-12-23 20:08:37 +01:00
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
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 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
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 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
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
Duncan 228205a199 Fix crash in dev builds due to sign issues (#10405) 2019-12-21 14:08:57 +01:00
Gymnasiast dcc720c1ec
Remove MakeXY16() 2019-12-21 13:51:59 +01: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 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
Duncan 3be7d824ac
Merge pull request #10397 from duncanspumpkin/refactor_gcommand
Remove gCommandPosition. Use GameActionRes instead.
2019-12-19 20:48:20 +00: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
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 a5065e95c6 Simplify MouseInput differential coords calculation 2019-12-18 23:57:57 -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 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
Tulio Leao c2c40fa951 Create ScreenCoordsXY on UIContext mouse/finger functions (#10382) 2019-12-17 18:46:28 +01:00