From 7d69446464240d235f93bf62afad91a6d65817cf Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sun, 16 Oct 2016 21:41:20 +0200 Subject: [PATCH] Attempt to fix GCC --- test/testpaint/PaintIntercept.cpp | 5 +---- test/testpaint/TestTrack.cpp | 2 +- test/testpaint/Utils.cpp | 6 ------ test/testpaint/Utils.hpp | 2 +- test/testpaint/generate.cpp | 3 ++- test/testpaint/intercept.h | 1 - test/testpaint/intercept_2.cpp | 7 ++++--- 7 files changed, 9 insertions(+), 17 deletions(-) diff --git a/test/testpaint/PaintIntercept.cpp b/test/testpaint/PaintIntercept.cpp index a56564b662..5ee804d6ae 100644 --- a/test/testpaint/PaintIntercept.cpp +++ b/test/testpaint/PaintIntercept.cpp @@ -21,6 +21,7 @@ extern "C" { #include "../../src/common.h" #include "../../src/hook.h" #include "../../src/interface/viewport.h" +#include "../../src/paint/supports.h" } class PaintInterceptor { @@ -337,10 +338,6 @@ int intercept_get_calls(function_call *buffer) { return PaintInterceptor::GetCalls(buffer); } -void intercept_simulate_wooden_supports(bool enabled) { - return PaintInterceptor::SetSimulateWoodenSupports(enabled); -} - void initHooks() { PaintInterceptor::InitHooks(); } diff --git a/test/testpaint/TestTrack.cpp b/test/testpaint/TestTrack.cpp index bb90af069c..6adca06ad7 100644 --- a/test/testpaint/TestTrack.cpp +++ b/test/testpaint/TestTrack.cpp @@ -110,7 +110,7 @@ uint8 TestTrack::TestPaintTrackElementCalls(uint8 rideType, uint8 trackType, std intercept_reset_environment(); - int sequenceCount = getTrackSequenceCount(rideType, trackType); + int sequenceCount = Utils::getTrackSequenceCount(rideType, trackType); *error += String::Format("rct2: 0x%08X\n", RideTypeTrackPaintFunctionsOld[rideType][trackType]); diff --git a/test/testpaint/Utils.cpp b/test/testpaint/Utils.cpp index 6c3cd7a10a..344a408b3d 100644 --- a/test/testpaint/Utils.cpp +++ b/test/testpaint/Utils.cpp @@ -67,9 +67,3 @@ namespace Utils { return (newPaintGetter != 0); } } - -extern "C" { - int getTrackSequenceCount(uint8 rideType, uint8 trackType) { - return Utils::getTrackSequenceCount(rideType, trackType); - } -} \ No newline at end of file diff --git a/test/testpaint/Utils.hpp b/test/testpaint/Utils.hpp index 3aaaab09ce..9ced7e4a2c 100644 --- a/test/testpaint/Utils.hpp +++ b/test/testpaint/Utils.hpp @@ -22,4 +22,4 @@ namespace Utils { int getTrackSequenceCount(uint8 rideType, uint8 trackType); bool rideSupportsTrackType(uint8 rideType, uint8 trackType); bool rideIsImplemented(uint8 rideType); -} \ No newline at end of file +} diff --git a/test/testpaint/generate.cpp b/test/testpaint/generate.cpp index 615692f9ef..253e3cd8f8 100644 --- a/test/testpaint/generate.cpp +++ b/test/testpaint/generate.cpp @@ -20,6 +20,7 @@ #include "intercept.h" #include "String.hpp" +#include "Utils.hpp" extern "C" { @@ -173,7 +174,7 @@ private: void GenerateTrackFunctionBody(int tabs, int trackType) { - int numSequences = getTrackSequenceCount(_rideType, trackType); + int numSequences = Utils::getTrackSequenceCount(_rideType, trackType); if (numSequences > 1) { WriteLine(tabs, "switch (trackSequence) {"); diff --git a/test/testpaint/intercept.h b/test/testpaint/intercept.h index b63ee38f6e..1f1655ad97 100644 --- a/test/testpaint/intercept.h +++ b/test/testpaint/intercept.h @@ -81,7 +81,6 @@ extern "C" { #endif void initHooks(); - int getTrackSequenceCount(uint8 rideType, uint8 trackType); bool testSupportSegments(uint8 rideType, uint8 trackType); bool testTunnels(uint8 rideType, uint8 trackType); bool testVerticalTunnels(uint8 rideType, uint8 trackType); diff --git a/test/testpaint/intercept_2.cpp b/test/testpaint/intercept_2.cpp index 70f9cae0f3..a8fff99c51 100644 --- a/test/testpaint/intercept_2.cpp +++ b/test/testpaint/intercept_2.cpp @@ -18,6 +18,7 @@ #include #include "intercept.h" +#include "Utils.hpp" extern "C" { #include "../../src/paint/paint.h" @@ -356,7 +357,7 @@ namespace Intercept2 int height = 48; TRACK_PAINT_FUNCTION_GETTER newPaintGetter = RideTypeTrackPaintFunctions[rideType]; - int sequenceCount = getTrackSequenceCount(rideType, trackType); + int sequenceCount = Utils::getTrackSequenceCount(rideType, trackType); for (int chainLift = 0; chainLift < 2; chainLift++) { if (chainLift == 0) { @@ -526,7 +527,7 @@ namespace Intercept2 int height = 48; TRACK_PAINT_FUNCTION_GETTER newPaintGetter = RideTypeTrackPaintFunctions[rideType]; - int sequenceCount = getTrackSequenceCount(rideType, trackType); + int sequenceCount = Utils::getTrackSequenceCount(rideType, trackType); for (int trackSequence = 0; trackSequence < sequenceCount; trackSequence++) { @@ -698,7 +699,7 @@ namespace Intercept2 int height = 48; TRACK_PAINT_FUNCTION_GETTER newPaintGetter = RideTypeTrackPaintFunctions[rideType]; - int sequenceCount = getTrackSequenceCount(rideType, trackType); + int sequenceCount = Utils::getTrackSequenceCount(rideType, trackType); for (int trackSequence = 0; trackSequence < sequenceCount; trackSequence++) {