1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

Update testpaint to match develop

This commit is contained in:
Marijn van der Werf
2016-09-15 19:10:33 +02:00
parent 1cc43d5012
commit 4e4a07d1b0
6 changed files with 14 additions and 13 deletions

View File

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

View File

@@ -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 */,

View File

@@ -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[] = {

View File

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

View File

@@ -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(

View File

@@ -157,6 +157,7 @@
<ClCompile Include="..\..\src\ride\thrill\top_spin.c" />
<ClCompile Include="..\..\src\ride\thrill\twist.c" />
<ClCompile Include="..\..\src\ride\track_data.c" />
<ClCompile Include="..\..\src\ride\track_data_old.c" />
<ClCompile Include="..\..\src\ride\track_paint.c" />
<ClCompile Include="..\..\src\ride\transport\chairlift.c" />
<ClCompile Include="..\..\src\ride\transport\lift.c" />