1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-22 23:33:04 +01:00

Receive ScreenCoordsXY and return CoordsXY in Viewport

This commit is contained in:
Tulio Leao
2019-11-12 00:20:58 -03:00
parent dde6ee93e0
commit 054bc8e4ca
11 changed files with 63 additions and 67 deletions

View File

@@ -916,7 +916,9 @@ void window_rotate_camera(rct_window* w, int32_t direction)
// has something to do with checking if middle of the viewport is obstructed
rct_viewport* other;
screen_get_map_xy(x, y, &x, &y, &other);
CoordsXY coords = screen_get_map_xy({ x, y }, &other);
x = coords.x;
y = coords.y;
// other != viewport probably triggers on viewports in ride or guest window?
// x is LOCATION_NULL if middle of viewport is obstructed by another window?