Tulio Leao
d0717c2748
Remove padding from rct_window
2020-03-05 08:03:33 -03:00
Tulio Leao
724a6d4dcf
Make rct_window use ScreenCoordsXY
2020-03-02 20:51:01 -03:00
Tulio Leao
2cfac98342
Make gSavedView 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
Tulio Leao
87f724d038
Use Coords objects for viewport_create()
2020-03-02 20:49:59 -03:00
Michael Steenbeek
d395d67b95
Merge pull request #10846 from tupaschoal/const-ref-screencoords
...
Prefer const ref to send ScreenCoordsXY over
2020-03-01 14:17:51 +01:00
Tulio Leao
91c4735917
Revert to copy instead of const-ref for functions that edit content
2020-03-01 00:49:00 -03:00
Tulio Leao
9bcd20e0e6
Prefer const ref to send ScreenCoordsXY over
2020-02-29 08:25:48 -03:00
Tulio Leao
98781e7596
Revert change to commented line
2020-02-23 09:19:45 -03:00
Tulio Leao
1b3f0e9a44
Create ScreenCoordsXY gSavedView from separate x,y variables
2020-02-22 16:01:21 -03:00
ζeh Matt
1272c0c043
Crash using benchspritesort with dimensions not divisible by 32 ( #10743 )
...
Fixes #10740
2020-02-19 21:50:13 +01:00
Matt
0f50697ceb
Fix unused variable warning
2020-02-16 15:50:35 +01:00
Matt
c440b8f918
Fix #10705 : Apply multithreaded rendering to all viewports
2020-02-16 14:06:08 +01:00
Matt
758a7e432f
Use const reference instead of copy for location structures
2020-02-13 11:53:14 +01:00
Michał Janiszewski
1b7639238a
Fix #9559 : benchspritesort is broken after #8481 ( #9590 )
...
* Fix #9559 : benchspritesort is broken after #8481
This takes multithreading into account as well
* Apply review fixes
* Fix detection of newer Google Benchmark (>= 1.5.0)
* Review fix
2020-02-12 22:18:00 +01:00
Michael Steenbeek
d16fbb0cd2
Change ride->overall_view to CoordsXY ( #10673 )
2020-02-08 17:19:59 +01:00
Duncan
d486ac4d3b
Reduce direct usage of LOCATION_NULL ( #10480 )
...
* Reduce direct usage of Location_Null
Ideally we want to refactor these out to use std::optional as much as possible but for now move to using the standard interfaces.
* Remove incorrect AND with LOCATION_NULL
In the original this was a simple comparison to check for negative. Unsure how it ended up as an AND with the negative bit.
2019-12-31 09:01:17 +01:00
Duncan
7a64eb4402
Fix #10470 . Mistake caused by reusing variable names for different functions. ( #10476 )
...
Added in comments to clarify why function is required. Renamed variables again to clarify what they are used for
2019-12-30 12:26:58 +01:00
Tulio Leao
9ec25e85cb
Coords for map_get_tile* ( #10440 )
...
* Make Map::map_get_tile_side() use CoordsXY
* Make Map::map_get_tile_quadrant() use CoordsXY
2019-12-27 12:36:47 +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
Michael Steenbeek
d012c8141b
Merge pull request #10316 from duncanspumpkin/light_fx
...
Make lights work for all rotations.
2019-12-04 14:11:26 +01:00
duncanspumpkin
f964d38e7d
Renable light occlusion
2019-12-01 14:51:14 +00: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
4537c061d9
Prefer std::optional over LOCATION_NULL on Viewport ( #10297 )
2019-11-29 17:17:01 +01:00
Duncan
b316f447a4
Merge pull request #10285 from tupaschoal/useCoords-get-map-coords
...
Remove raw coordinates overload of get_map_coordinates_from_pos
2019-11-29 09:20:12 +00:00
Tulio Leao
47935288d0
Remove raw coordinates overload of get_map_coordinates_from_pos
2019-11-25 17:45:02 -03:00
duncanspumpkin
0c4fffb2ec
Refactor viewport_adjust_for_map_height to use CoordsXYZ.
2019-11-24 21:37:35 +00:00
Duncan
966ba6b018
Merge pull request #10269 from duncanspumpkin/centre_2d
...
Refactor centre_2d_coordinates to use screenCoords.
2019-11-24 14:28:18 +00:00
duncanspumpkin
d4c15cd774
Refactor centre_2d_coordinates to use screenCoords.
2019-11-20 18:44:03 +00:00
Tulio Leao
f94970b059
Use CoordsXY/ScreenCoordsXY for viewport*_with_z
...
Closes #10268
2019-11-19 18:33:40 -03:00
duncanspumpkin
3b8bf56b71
Use helper function
2019-11-19 11:20:59 +00:00
duncanspumpkin
421107436f
Refactor helper function to take screen coords
2019-11-19 11:20:59 +00:00
duncanspumpkin
1d6a923298
Refactor screen_get_map_xy_with_z to use CoordsXY structs
2019-11-19 11:20:58 +00:00
duncanspumpkin
e4ee91f5ff
Refactor get_map_coordiantes to enforce Coords struct
2019-11-14 20:28:54 +00:00
Duncan
8eb42867dd
Merge pull request #10223 from duncanspumpkin/viewport_refactor
...
Remove global variables from get_map_coordinates_from_pos_window
2019-11-14 20:27:39 +00:00
Tulio Leao
30815f0886
Fix clang-format
2019-11-13 18:28:03 -03:00
Tulio Leao
054bc8e4ca
Receive ScreenCoordsXY and return CoordsXY in Viewport
2019-11-13 18:27:59 -03:00
duncanspumpkin
0af10781f1
Remove unused globals
2019-11-13 19:04:01 +00:00
duncanspumpkin
57baeeaa3c
Refactor to remove std::optional
2019-11-13 18:58:17 +00:00
duncanspumpkin
278dd9b1d2
Remove global variables from get_map_coordinates_from_pos_window
2019-11-12 20:11:48 +00:00
Tulio Leao
9776a0843d
Make Viewport::screen_to_map_pos() return coords ( #10171 )
...
* Make Viewport::screen_to_map_pos() return coords
* Fix clang-format
* Update src/openrct2-ui/windows/TileInspector.cpp
* Update src/openrct2-ui/windows/TileInspector.cpp
* Apply suggestions from code review
2019-11-02 08:04:46 +00:00
Alan Berndt
a4181d10f4
Refactor get_map_coordinates_from_pos_window ( #10109 )
...
* Refactor get_map_coordinates_from_pos_window
This changes get_map_coordinates_from_pos_window to use the
ScreenCoordsXY and CoordsXY structs instead of bare ints as suggested
in #10065
* Use default constructor.
The default constructor initializes the coordinates to (0, 0) anyway so
doing that explicitly is redundant.
* Fix parentheses
* Fix formatting issues
* Manually fix clang formatting
Apparently my version of clang-format doesn't behave properly so I am
manually making the changes that CI suggests.
2019-11-01 20:57:44 +00:00
duncanspumpkin
5ca553dd08
Refactor viewport_coord_to_map_coord to return a CoordXY
2019-11-01 20:04:07 +00:00
Duncan
7546c846df
Name functions and remove dead code
...
The dead code removed has been removed already from the draw sprite. Should have removed it from interaction at the same time.
2019-10-19 17:21:08 +02:00
Tulio Leao
ce1f38da25
Use ScreenCoordsXY for window functions ( #10086 )
...
* Use ScreenCoordsXY for window_create function
* Use ScreenCoordsXY for window_find_from_point function
* Use ScreenCoordsXY for window_find_widget_from_point
* Use ScreenCoordsXY for ride_contruction_tool*
* Use ScreenCoordsXY for window_event_tool*
* Use ScreenCoordsXY for window_event_scroll_mouse*
* Use ScreenCoordsXY for remaining window_event*
* Use ScreenCoordsXY for window_(set|move)_position
2019-10-19 13:07:03 +02:00
Ted John
f4079434dc
Fix #4927 : Giant screenshot cut off at bottom and top
2019-08-21 20:11:06 +01:00
duncanspumpkin
37ef48890f
Move various to use CoordsXYZ funcs instead of LocationXYZ
2019-08-19 20:04:58 +01:00
duncanspumpkin
c6452095ca
Refactor tile_element_height to use CoordsXY
2019-08-19 20:04:57 +01:00
Matt
cc6321048f
Refactor window_invalidate to use rct_window::Invalidate
2019-08-11 17:22:00 +02:00