From 8b2d3937fda7b7e7171a4d055e6b59bb10130cb2 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Mon, 13 Feb 2023 23:37:50 +0100 Subject: [PATCH] Clean up call to PaintAddImageAsParent() --- src/openrct2/paint/Supports.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/openrct2/paint/Supports.cpp b/src/openrct2/paint/Supports.cpp index f12575ceec..4dd1aa01e1 100644 --- a/src/openrct2/paint/Supports.cpp +++ b/src/openrct2/paint/Supports.cpp @@ -843,16 +843,11 @@ bool MetalASupportsPaintSetup( uint8_t ebp = esi[segment * 8 + 1]; - int8_t xOffset = SupportBoundBoxes[segment].x; - int8_t yOffset = SupportBoundBoxes[segment].y; - xOffset += Loc97B052[ebp].x; - yOffset += Loc97B052[ebp].y; - - int16_t boundBoxLengthX = _97B062[ebp].x; - int16_t boundBoxLengthY = _97B062[ebp].y; + auto offset = CoordsXYZ{ SupportBoundBoxes[segment] + Loc97B052[ebp], height }; + auto boundBoxLength = CoordsXYZ(_97B062[ebp], 1); auto image_id = imageTemplate.WithIndex(_metalSupportTypeToCrossbeamImages[supportType][ebp]); - PaintAddImageAsParent(session, image_id, { xOffset, yOffset, height }, { boundBoxLengthX, boundBoxLengthY, 1 }); + PaintAddImageAsParent(session, image_id, offset, boundBoxLength); segment = newSegment; }