From f50ce343a2a1bdca1b70d82e38a7701ea83c646a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Wed, 10 Jan 2018 20:21:43 +0100 Subject: [PATCH] MSVC fixes pt 4 --- src/openrct2/ride/TrackPaint.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index 57f7d2799a..7dc80a23b3 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -755,27 +755,27 @@ bool track_paint_util_draw_station_covers_2(paint_session * session, enum edge_t sint32 imageOffset = 0; LocationXYZ16 offset, bounds = { 0, 0, 0 }, boundsOffset = { 0, 0, 0 }; - offset = (LocationXYZ16){ 0, 0, static_cast(height) }; + offset = LocationXYZ16{ 0, 0, static_cast(height) }; switch (edge) { case EDGE_NE: - bounds = (LocationXYZ16){ 1, 30, heights[stationVariant][0] }; - boundsOffset = (LocationXYZ16){ 0, 1, static_cast(height + 1) }; + bounds = LocationXYZ16{ 1, 30, heights[stationVariant][0] }; + boundsOffset = LocationXYZ16{ 0, 1, static_cast(height + 1) }; imageOffset = hasFence ? SPR_STATION_COVER_OFFSET_SE_NW_BACK_1 : SPR_STATION_COVER_OFFSET_SE_NW_BACK_0; break; case EDGE_SE: - bounds = (LocationXYZ16){ 32, 32, 0 }; - boundsOffset = (LocationXYZ16){ 0, 0, static_cast(height + 1 + heights[stationVariant][0]) }; + bounds = LocationXYZ16{ 32, 32, 0 }; + boundsOffset = LocationXYZ16{ 0, 0, static_cast(height + 1 + heights[stationVariant][0]) }; imageOffset = SPR_STATION_COVER_OFFSET_NE_SW_FRONT; break; case EDGE_SW: - bounds = (LocationXYZ16){ 32, 32, 0 }; - boundsOffset = (LocationXYZ16){ 0, 0, static_cast(height + 1 + heights[stationVariant][0]) }; + bounds = LocationXYZ16{ 32, 32, 0 }; + boundsOffset = LocationXYZ16{ 0, 0, static_cast(height + 1 + heights[stationVariant][0]) }; imageOffset = SPR_STATION_COVER_OFFSET_SE_NW_FRONT; break; case EDGE_NW: - bounds = (LocationXYZ16){ 30, 1, heights[stationVariant][0] }; - boundsOffset = (LocationXYZ16){ 1, 0, static_cast(height + 1) }; + bounds = LocationXYZ16{ 30, 1, heights[stationVariant][0] }; + boundsOffset = LocationXYZ16{ 1, 0, static_cast(height + 1) }; imageOffset = hasFence ? SPR_STATION_COVER_OFFSET_NE_SW_BACK_1 : SPR_STATION_COVER_OFFSET_NE_SW_BACK_0; break; } @@ -996,7 +996,7 @@ void track_paint_util_right_helix_up_small_quarter_tiles_paint(paint_session * s uint32 imageId = sprites[direction][index][0] | colourFlags; LocationXY16 offset = (offsets == NULL ? LocationXY16{ 0, 0 } : offsets[direction][index][0]); LocationXY16 boundsLength = boundsLengths[direction][index][0]; - LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? (LocationXYZ16){ offset.x, offset.y, 0 } + LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index][0]); sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[0], height, @@ -1007,7 +1007,7 @@ void track_paint_util_right_helix_up_small_quarter_tiles_paint(paint_session * s uint32 imageId = sprites[direction][index][1] | colourFlags; LocationXY16 offset = (offsets == NULL ? LocationXY16{ 0, 0 } : offsets[direction][index][1]); LocationXY16 boundsLength = boundsLengths[direction][index][1]; - LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? (LocationXYZ16){ offset.x, offset.y, 0 } + LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index][1]); sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[1], height, @@ -1109,7 +1109,7 @@ void track_paint_util_right_helix_up_large_quarter_tiles_paint(paint_session * s uint32 imageId = sprites[direction][index][1] | colourFlags; LocationXY16 offset = (offsets == NULL ? LocationXY16{ 0, 0 } : offsets[direction][index][1]); LocationXY16 boundsLength = boundsLengths[direction][index][1]; - LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? (LocationXYZ16){ offset.x, offset.y, 0 } + LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index][1]); sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[1], height, @@ -1435,7 +1435,7 @@ void track_paint_util_right_quarter_turn_5_tiles_paint(paint_sessi LocationXY16 offset = (offsets == NULL ? LocationXY16{ 0, 0 } : offsets[direction][index]); LocationXY16 boundsLength = boundsLengths[direction][index]; LocationXYZ16 boundsOffset = - (boundsOffsets == NULL ? (LocationXYZ16){ offset.x, offset.y, 0 } : boundsOffsets[direction][index]); + (boundsOffsets == NULL ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index]); sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness, height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z, rotation); @@ -1601,7 +1601,7 @@ void track_paint_util_right_quarter_turn_3_tiles_paint(paint_sessi LocationXY16 offset = (offsets == NULL ? LocationXY16{ 0, 0 } : offsets[direction][index]); LocationXY16 boundsLength = boundsLengths[direction][index]; LocationXYZ16 boundsOffset = - (boundsOffsets == NULL ? (LocationXYZ16){ offset.x, offset.y, 0 } : boundsOffsets[direction][index]); + (boundsOffsets == NULL ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index]); sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness, height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z, rotation);