mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Create ScreenCoords struct. Refactor 3d_to_2d again
This commit is contained in:
@@ -254,7 +254,7 @@ void screenshot_giant()
|
||||
int32_t z = tile_element_height({ centreX, centreY });
|
||||
|
||||
CoordsXYZ centreCoords3d = { centreX, centreY, z };
|
||||
CoordsXY centreCoords2d = translate_3d_to_2d_with_z(rotation, centreCoords3d);
|
||||
auto centreCoords2d = translate_3d_to_2d_with_z(rotation, centreCoords3d);
|
||||
|
||||
viewport.view_x = centreCoords2d.x - ((viewport.view_width << zoom) / 2);
|
||||
viewport.view_y = centreCoords2d.y - ((viewport.view_height << zoom) / 2);
|
||||
@@ -525,7 +525,7 @@ int32_t cmdline_for_screenshot(const char** argv, int32_t argc, ScreenshotOption
|
||||
int32_t z = tile_element_height({ customX, customY });
|
||||
CoordsXYZ coords3d = { customX, customY, z };
|
||||
|
||||
CoordsXY coords2d = translate_3d_to_2d_with_z(customRotation, coords3d);
|
||||
auto coords2d = translate_3d_to_2d_with_z(customRotation, coords3d);
|
||||
|
||||
viewport.view_x = coords2d.x - ((viewport.view_width << customZoom) / 2);
|
||||
viewport.view_y = coords2d.y - ((viewport.view_height << customZoom) / 2);
|
||||
|
||||
Reference in New Issue
Block a user