From ffbe380da70742ccfe3866f6cc507afdb19861ff Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sat, 22 Oct 2016 01:04:17 +0200 Subject: [PATCH] Fix tunnel dumping --- test/testpaint/Printer.cpp | 6 +++--- test/testpaint/TestTrack.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/testpaint/Printer.cpp b/test/testpaint/Printer.cpp index 31d5d75e09..2d129b45ea 100644 --- a/test/testpaint/Printer.cpp +++ b/test/testpaint/Printer.cpp @@ -153,8 +153,8 @@ namespace Printer { s += "\n"; for (int direction = 0; direction < 4; ++direction) { - std::string leftEdge = PrintSideTunnelEdge(tunnelCalls[direction][2]); - std::string rightEdge = PrintSideTunnelEdge(tunnelCalls[direction][3]); + std::string leftEdge = PrintSideTunnelEdge(tunnelCalls[direction][3]); + std::string rightEdge = PrintSideTunnelEdge(tunnelCalls[direction][2]); s += String::Format(" %s %s ", leftEdge.c_str(), rightEdge.c_str()); } s += "\n"; @@ -204,7 +204,7 @@ namespace Printer { } else { offset = String::Format("+%d", edge.offset); } - s = String::Format("%3s/%X ", offset.c_str(), edge.type); + s = String::Format("%3s/%X", offset.c_str(), edge.type); break; } diff --git a/test/testpaint/TestTrack.cpp b/test/testpaint/TestTrack.cpp index c067779e43..7933561ae0 100644 --- a/test/testpaint/TestTrack.cpp +++ b/test/testpaint/TestTrack.cpp @@ -594,8 +594,8 @@ static uint8 TestTrackElementSideTunnels(uint8 rideType, uint8 trackType, uint8 CallOriginal(rideType, trackType, direction, trackSequence, height + offset, &mapElement); } - uint8 rightIndex = (4 - direction) % 4; - uint8 leftIndex = (rightIndex + 1) % 4; + uint8 rightIndex = (direction + 1) % 4; + uint8 leftIndex = direction; for (int i = 0; i < 4; ++i) { tileTunnelCalls[direction][i].call = TUNNELCALL_SKIPPED; @@ -625,8 +625,8 @@ static uint8 TestTrackElementSideTunnels(uint8 rideType, uint8 trackType, uint8 CallNew(rideType, trackType, direction, trackSequence, height + offset, &mapElement); } - uint8 rightIndex = (4 - direction) % 4; - uint8 leftIndex = (rightIndex + 1) % 4; + uint8 rightIndex = (direction + 1) % 4; + uint8 leftIndex = direction; for (int i = 0; i < 4; ++i) { newTileTunnelCalls[direction][i].call = TUNNELCALL_SKIPPED;