diff --git a/CMakeLists.txt b/CMakeLists.txt
index 629f1f4950..f01b8ca80d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -367,7 +367,7 @@ install(FILES ${DOC_FILES} DESTINATION share/doc/${PROJECT})
if (UNIX AND (NOT USE_MMAP) AND (NOT DISABLE_RCT2) AND (NOT FORCE64))
file(GLOB_RECURSE ORCT2_RIDE_SOURCES "src/ride/*/*.c")
- file(GLOB_RECURSE ORCT2_RIDE_DEP_SOURCES "src/ride/ride_data.c" "src/ride/track_data.c" "src/ride/track_paint.c" "src/addresses.c" "src/diagnostic.c" "src/hook.c" "src/paint/map_element/map_element.c")
+ file(GLOB_RECURSE ORCT2_RIDE_DEP_SOURCES "src/ride/ride_data.c" "src/ride/track_data.c" "src/ride/track_data_old.c" "src/ride/track_paint.c" "src/addresses.c" "src/diagnostic.c" "src/hook.c" "src/paint/map_element/map_element.c")
file(GLOB_RECURSE ORCT2_TESTPAINT_SOURCES "test/testpaint/*.c" "test/testpaint/*.cpp" "test/testpaint/*.h")
add_executable(testpaint EXCLUDE_FROM_ALL ${ORCT2_RIDE_SOURCES} ${ORCT2_RIDE_DEP_SOURCES} ${ORCT2_TESTPAINT_SOURCES} ${RCT2_SECTIONS})
diff --git a/OpenRCT2.xcodeproj/project.pbxproj b/OpenRCT2.xcodeproj/project.pbxproj
index 10a75cc3f8..b01faed27b 100644
--- a/OpenRCT2.xcodeproj/project.pbxproj
+++ b/OpenRCT2.xcodeproj/project.pbxproj
@@ -17,6 +17,7 @@
008BF72C1CDAA5C30019A2AD /* track_design.c in Sources */ = {isa = PBXBuildFile; fileRef = 008BF7281CDAA5C30019A2AD /* track_design.c */; };
00EFEE721CF1D80B0035213B /* NetworkKey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00EFEE701CF1D80B0035213B /* NetworkKey.cpp */; };
791166FB1D7486EF005912EA /* NetworkServerAdvertiser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 791166F91D7486EF005912EA /* NetworkServerAdvertiser.cpp */; };
+ 85060FD31D8C17CC00DFA2B3 /* track_data_old.c in Sources */ = {isa = PBXBuildFile; fileRef = 8594C05F1D885CF600235E93 /* track_data_old.c */; };
8594C0601D885CF600235E93 /* track_data_old.c in Sources */ = {isa = PBXBuildFile; fileRef = 8594C05F1D885CF600235E93 /* track_data_old.c */; };
85AFA2111D7DB83E00221B42 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85AFA20F1D7DB83E00221B42 /* main.cpp */; };
85B5C0B01D81D912001B99A8 /* intercept_2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85B5C0AF1D81D912001B99A8 /* intercept_2.cpp */; };
@@ -2410,6 +2411,7 @@
C64FDA841D6D9A2100F259B9 /* car_ride.c in Sources */,
C64FDA851D6D9A2100F259B9 /* circus_show.c in Sources */,
C64FDA861D6D9A2100F259B9 /* crooked_house.c in Sources */,
+ 85060FD31D8C17CC00DFA2B3 /* track_data_old.c in Sources */,
C64FDA871D6D9A2100F259B9 /* dodgems.c in Sources */,
C64FDA881D6D9A2100F259B9 /* ferris_wheel.c in Sources */,
C64FDA891D6D9A2100F259B9 /* flying_saucers.c in Sources */,
diff --git a/test/testpaint/compat.c b/test/testpaint/compat.c
index 188c4217fe..5ff4bd9855 100644
--- a/test/testpaint/compat.c
+++ b/test/testpaint/compat.c
@@ -53,8 +53,8 @@ uint8 get_current_rotation() {
}
const uint32 construction_markers[] = {
- COLOUR_DARK_GREEN << 19 | COLOUR_GREY << 24 | IMAGE_TYPE_USE_PALETTE << 28, // White
- 2 << 19 | 0b110000 << 19 | IMAGE_TYPE_MIX_BACKGROUND << 28, // Translucent
+ COLOUR_DARK_GREEN << 19 | COLOUR_GREY << 24 | IMAGE_TYPE_REMAP, // White
+ 2 << 19 | 0b110000 << 19 | IMAGE_TYPE_TRANSPARENT, // Translucent
};
int object_entry_group_counts[] = {
diff --git a/test/testpaint/intercept.c b/test/testpaint/intercept.c
index e920e29791..c3f4cb1c0f 100644
--- a/test/testpaint/intercept.c
+++ b/test/testpaint/intercept.c
@@ -533,14 +533,13 @@ static bool testTrackElement(uint8 rideType, uint8 trackType, utf8string *error)
for (int trackSequence = 0; trackSequence < sequenceCount; trackSequence++) {
RCT2_GLOBAL(0x009DE56A, sint16) = 64; // x
RCT2_GLOBAL(0x009DE56E, sint16) = 64; // y
- RCT2_GLOBAL(0x009DE57C, bool) = true; // Above surface
- RCT2_GLOBAL(0x009E3250, rct_map_element *) = &surfaceElement;
+ gDidPassSurface = true; // Above surface
+ gSurfaceElement = &surfaceElement;
callCount = 0;
memset(&calls, 0, sizeof(calls));
- TRACK_PAINT_FUNCTION **trackTypeList = (TRACK_PAINT_FUNCTION **) RideTypeTrackPaintFunctionsOld[rideType];
- uint32 *trackDirectionList = (uint32 *) trackTypeList[trackType];
+ uint32 *trackDirectionList = (uint32 *)RideTypeTrackPaintFunctionsOld[rideType][trackType];
// Have to call from this point as it pushes esi and expects callee to pop it
RCT2_CALLPROC_X(
@@ -594,6 +593,8 @@ static bool testTrackElement(uint8 rideType, uint8 trackType, utf8string *error)
}
}
+ sprintf(*error, "");
+
bool segmentSuccess = testSupportSegments(rideType, trackType);
if (!segmentSuccess) {
return false;
diff --git a/test/testpaint/intercept_2.cpp b/test/testpaint/intercept_2.cpp
index 2e41d935db..92eff337df 100644
--- a/test/testpaint/intercept_2.cpp
+++ b/test/testpaint/intercept_2.cpp
@@ -345,8 +345,7 @@ namespace Intercept2
gSupport.height = 0;
gSupport.slope = 0xFF;
- TRACK_PAINT_FUNCTION ** trackTypeList = (TRACK_PAINT_FUNCTION **) RideTypeTrackPaintFunctionsOld[rideType];
- uint32 * trackDirectionList = (uint32 *) trackTypeList[trackType];
+ uint32 *trackDirectionList = (uint32 *)RideTypeTrackPaintFunctionsOld[rideType][trackType];
// Have to call from this point as it pushes esi and expects callee to pop it
RCT2_CALLPROC_X(
@@ -506,8 +505,7 @@ namespace Intercept2
gLeftTunnelCount = 0;
gRightTunnelCount = 0;
- TRACK_PAINT_FUNCTION ** trackTypeList = (TRACK_PAINT_FUNCTION **) RideTypeTrackPaintFunctionsOld[rideType];
- uint32 * trackDirectionList = (uint32 *) trackTypeList[trackType];
+ uint32 *trackDirectionList = (uint32 *)RideTypeTrackPaintFunctionsOld[rideType][trackType];
// Have to call from this point as it pushes esi and expects callee to pop it
RCT2_CALLPROC_X(
@@ -696,8 +694,7 @@ namespace Intercept2
for (int direction = 0; direction < 4; direction++) {
gVerticalTunnelHeight = 0;
- TRACK_PAINT_FUNCTION ** trackTypeList = (TRACK_PAINT_FUNCTION **) RideTypeTrackPaintFunctionsOld[rideType];
- uint32 * trackDirectionList = (uint32 *) trackTypeList[trackType];
+ uint32 *trackDirectionList = (uint32 *)RideTypeTrackPaintFunctionsOld[rideType][trackType];
// Have to call from this point as it pushes esi and expects callee to pop it
RCT2_CALLPROC_X(
diff --git a/test/testpaint/testpaint.vcxproj b/test/testpaint/testpaint.vcxproj
index 4c615d238d..e3350e01d9 100644
--- a/test/testpaint/testpaint.vcxproj
+++ b/test/testpaint/testpaint.vcxproj
@@ -157,6 +157,7 @@
+