1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 16:54:52 +01:00

Attempt to fix GCC

This commit is contained in:
Marijn van der Werf
2016-10-16 21:41:20 +02:00
parent 6c54bba6f6
commit 7d69446464
7 changed files with 9 additions and 17 deletions

View File

@@ -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();
}

View File

@@ -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]);

View File

@@ -67,9 +67,3 @@ namespace Utils {
return (newPaintGetter != 0);
}
}
extern "C" {
int getTrackSequenceCount(uint8 rideType, uint8 trackType) {
return Utils::getTrackSequenceCount(rideType, trackType);
}
}

View File

@@ -22,4 +22,4 @@ namespace Utils {
int getTrackSequenceCount(uint8 rideType, uint8 trackType);
bool rideSupportsTrackType(uint8 rideType, uint8 trackType);
bool rideIsImplemented(uint8 rideType);
}
}

View File

@@ -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) {");

View File

@@ -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);

View File

@@ -18,6 +18,7 @@
#include <algorithm>
#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++) {