mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 14:02:59 +01:00
Create ScreenCoords struct. Refactor 3d_to_2d again
This commit is contained in:
@@ -2337,12 +2337,12 @@ void track_design_draw_preview(TrackDesign* td6, uint8_t* pixels)
|
||||
{
|
||||
gCurrentRotation = i;
|
||||
|
||||
CoordsXY pos2d = translate_3d_to_2d_with_z(i, centre);
|
||||
pos2d.x -= offset.x;
|
||||
pos2d.y -= offset.y;
|
||||
auto screenCoords = translate_3d_to_2d_with_z(i, centre);
|
||||
screenCoords.x -= offset.x;
|
||||
screenCoords.y -= offset.y;
|
||||
|
||||
int32_t left = pos2d.x;
|
||||
int32_t top = pos2d.y;
|
||||
int32_t left = screenCoords.x;
|
||||
int32_t top = screenCoords.y;
|
||||
int32_t right = left + size_x;
|
||||
int32_t bottom = top + size_y;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user