From a6c9c06f9aa98521a63aa35ac4f5c8133882c07d Mon Sep 17 00:00:00 2001 From: mix <167040362+mixiate@users.noreply.github.com> Date: Sat, 15 Feb 2025 14:18:41 +0000 Subject: [PATCH] Fix #16357: Chairlift station covers draw incorrectly (#23808) --- distribution/changelog.txt | 1 + .../paint/track/transport/Chairlift.cpp | 22 +++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 6d06a68865..b508821a65 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -2,6 +2,7 @@ ------------------------------------------------------------------------ - Improved: [#23677] Building new ride track now inherits the colour scheme from the previous piece. - Fix: [#9999, #10000, #10001, #10002, #10003] Truncated scenario strings when using Catalan, Czech, Japanese, Polish or Russian. +- Fix: [#16357] Chairlift station covers draw incorrectly. - Fix: [#21768] Dirty blocks debug overlay is rendered incorrectly on high DPI screens. - Fix: [#22617] Sloped Wooden and Side-Friction supports draw out of order when built directly above diagonal track pieces. - Fix: [#23522] Diagonal sloped Steeplechase supports have glitched sprites at the base. diff --git a/src/openrct2/paint/track/transport/Chairlift.cpp b/src/openrct2/paint/track/transport/Chairlift.cpp index 641d32a3bc..24d0f807c6 100644 --- a/src/openrct2/paint/track/transport/Chairlift.cpp +++ b/src/openrct2/paint/track/transport/Chairlift.cpp @@ -208,7 +208,7 @@ static void ChairliftPaintStationNeSw( if (!isStart && !isEnd) { imageId = session.TrackColours.WithIndex(((direction == 0) ? SPR_20502 : SPR_20504)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 13, height + 28 }, { 32, 6, 2 } }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 13, height + 22 }, { 32, 6, 1 } }); } imageId = session.SupportColours.WithIndex(SPR_FLOOR_METAL); @@ -232,7 +232,7 @@ static void ChairliftPaintStationNeSw( if (hasFence) { imageId = session.TrackColours.WithIndex(SPR_FENCE_METAL_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 30, height + 2 }, { 32, 1, 27 } }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 30, height + 2 }, { 32, 1, 20 } }); } TrackPaintUtilDrawStationCovers(session, EDGE_SE, hasFence, stationObj, height, stationColour); @@ -244,20 +244,20 @@ static void ChairliftPaintStationNeSw( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 30, 2, height + 4 }, { 1, 28, 27 } }); imageId = session.TrackColours.WithIndex(chairlift_bullwheel_frames[ride.chairlift_bullwheel_rotation / 16384]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 26 } }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 19 } }); imageId = session.TrackColours.WithIndex(SPR_CHAIRLIFT_STATION_END_CAP_NE); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 26 } }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 19 } }); drawFrontColumn = false; } else if ((direction == 2 && isStart) || (direction == 0 && isEnd)) { imageId = session.TrackColours.WithIndex(chairlift_bullwheel_frames[ride.chairlift_bullwheel_rotation / 16384]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 26 } }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 19 } }); imageId = session.TrackColours.WithIndex(SPR_CHAIRLIFT_STATION_END_CAP_SW); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 26 } }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 19 } }); drawBackColumn = false; } @@ -301,7 +301,7 @@ static void ChairliftPaintStationSeNw( if (!isStart && !isEnd) { imageId = session.TrackColours.WithIndex(((direction == 1) ? SPR_20503 : SPR_20505)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 13, 0, height + 28 }, { 6, 32, 2 } }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 13, 0, height + 22 }, { 6, 32, 1 } }); } imageId = session.SupportColours.WithIndex(SPR_FLOOR_METAL); @@ -325,7 +325,7 @@ static void ChairliftPaintStationSeNw( if (hasFence) { imageId = session.TrackColours.WithIndex(SPR_FENCE_METAL_SW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 30, 0, height + 2 }, { 1, 32, 27 } }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 30, 0, height + 2 }, { 1, 32, 20 } }); } TrackPaintUtilDrawStationCovers(session, EDGE_SW, hasFence, stationObj, height, stationColour); @@ -334,10 +334,10 @@ static void ChairliftPaintStationSeNw( if ((direction == 1 && isStart) || (direction == 3 && isEnd)) { imageId = session.TrackColours.WithIndex(chairlift_bullwheel_frames[ride.chairlift_bullwheel_rotation / 16384]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 26 } }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 19 } }); imageId = session.TrackColours.WithIndex(SPR_CHAIRLIFT_STATION_END_CAP_SE); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 26 } }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 19 } }); drawLeftColumn = false; } @@ -348,7 +348,7 @@ static void ChairliftPaintStationSeNw( imageId = session.TrackColours.WithIndex(chairlift_bullwheel_frames[ride.chairlift_bullwheel_rotation / 16384]); - auto bb = BoundBoxXYZ{ { 14, 14, height + 4 }, { 4, 4, 26 } }; + auto bb = BoundBoxXYZ{ { 14, 14, height + 4 }, { 4, 4, 19 } }; PaintAddImageAsParent(session, imageId, { 0, 0, height }, bb); imageId = session.TrackColours.WithIndex(SPR_CHAIRLIFT_STATION_END_CAP_NW);