1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-21 14:53:02 +01:00

Fix #6821: Edge sprites drawing is corrupted

This commit is contained in:
ζeh Matt
2017-12-14 09:46:22 +01:00
committed by Michael Steenbeek
parent cc27beef73
commit c84fd8edd2

View File

@@ -641,7 +641,7 @@ static void viewport_surface_draw_tile_side_bottom(paint_session * session, enum
regs.ah = regs.cl; regs.ah = regs.cl;
for(uint32 tunnelIndex = 0; tunnelIndex < TUNNEL_MAX_COUNT; tunnelIndex++) for(uint32 tunnelIndex = 0; tunnelIndex < TUNNEL_MAX_COUNT;)
{ {
if (curHeight >= regs.al || curHeight >= regs.cl) if (curHeight >= regs.al || curHeight >= regs.cl)
{ {
@@ -663,7 +663,7 @@ static void viewport_surface_draw_tile_side_bottom(paint_session * session, enum
return; return;
} }
if (curHeight != tunnelArray[0].height) if (curHeight != tunnelArray[tunnelIndex].height)
{ {
// Normal walls // Normal walls
while (curHeight > tunnelArray[tunnelIndex].height) while (curHeight > tunnelArray[tunnelIndex].height)
@@ -716,6 +716,7 @@ static void viewport_surface_draw_tile_side_bottom(paint_session * session, enum
sub_98197C(session, image_id, offset.x, offset.y, tunnelBounds.x, tunnelBounds.y, boundBoxLength - 1, curHeight * 16, tunnelTopBoundBoxOffset.x, tunnelTopBoundBoxOffset.y, boundBoxOffsetZ, rotation); sub_98197C(session, image_id, offset.x, offset.y, tunnelBounds.x, tunnelBounds.y, boundBoxLength - 1, curHeight * 16, tunnelTopBoundBoxOffset.x, tunnelTopBoundBoxOffset.y, boundBoxOffsetZ, rotation);
curHeight += stru_97B570[tunnelType][0]; curHeight += stru_97B570[tunnelType][0];
tunnelIndex++;
} }
} }