diff --git a/test/testpaint/data.c b/test/testpaint/data.c index bb06f68e17..8b735d13a5 100644 --- a/test/testpaint/data.c +++ b/test/testpaint/data.c @@ -730,7 +730,6 @@ const utf8string TrackElemNames[] = { "TRACK_ELEM_BRAKES", "TRACK_ELEM_ROTATION_CONTROL_TOGGLE", "TRACK_ELEM_INVERTED_90_DEG_UP_TO_FLAT_QUARTER_LOOP", - "TRACK_ELEM_MAZE", "TRACK_ELEM_LEFT_QUARTER_BANKED_HELIX_LARGE_UP", "TRACK_ELEM_RIGHT_QUARTER_BANKED_HELIX_LARGE_UP", "TRACK_ELEM_LEFT_QUARTER_BANKED_HELIX_LARGE_DOWN", @@ -1082,7 +1081,7 @@ const utf8string TrackCodeNames[256] = { "right_quarter_turn_1_60_deg_down", "brakes", "rotation_control_toggle", - "inverted90_deg_up_to_flat_quarter_loop_maze", + "inverted_90_deg_up_to_flat_quarter_loop_maze", "left_quarter_banked_helix_large_up", "right_quarter_banked_helix_large_up", "left_quarter_banked_helix_large_down", @@ -1123,34 +1122,34 @@ const utf8string TrackCodeNames[256] = { "left_eighth_bank_to_orthogonal", "right_eighth_bank_to_orthogonal", "diag_flat", - "diag25_deg_up", - "diag60_deg_up", + "diag_25_deg_up", + "diag_60_deg_up", "diag_flat_to_25_deg_up", - "diag25_deg_up_to_60_deg_up", - "diag60_deg_up_to_25_deg_up", - "diag25_deg_up_to_flat", - "diag25_deg_down", - "diag60_deg_down", + "diag_25_deg_up_to_60_deg_up", + "diag_60_deg_up_to_25_deg_up", + "diag_25_deg_up_to_flat", + "diag_25_deg_down", + "diag_60_deg_down", "diag_flat_to_25_deg_down", - "diag25_deg_down_to_60_deg_down", - "diag60_deg_down_to_25_deg_down", - "diag25_deg_down_to_flat", + "diag_25_deg_down_to_60_deg_down", + "diag_60_deg_down_to_25_deg_down", + "diag_25_deg_down_to_flat", "diag_flat_to_60_deg_up", - "diag60_deg_up_to_flat", + "diag_60_deg_up_to_flat", "diag_flat_to_60_deg_down", - "diag60_deg_down_to_flat", + "diag_60_deg_down_to_flat", "diag_flat_to_left_bank", "diag_flat_to_right_bank", "diag_left_bank_to_flat", "diag_right_bank_to_flat", "diag_left_bank_to_25_deg_up", "diag_right_bank_to_25_deg_up", - "diag25_deg_up_to_left_bank", - "diag25_deg_up_to_right_bank", + "diag_25_deg_up_to_left_bank", + "diag_25_deg_up_to_right_bank", "diag_left_bank_to_25_deg_down", "diag_right_bank_to_25_deg_down", - "diag25_deg_down_to_left_bank", - "diag25_deg_down_to_right_bank", + "diag_25_deg_down_to_left_bank", + "diag_25_deg_down_to_right_bank", "diag_left_bank", "diag_right_bank", "log_flume_reverser", diff --git a/test/testpaint/generate.cpp b/test/testpaint/generate.cpp index b3cc27e3c6..74af733ef3 100644 --- a/test/testpaint/generate.cpp +++ b/test/testpaint/generate.cpp @@ -60,10 +60,34 @@ private: void Generate() { + GenerateIncludes(); GenerateTrackFunctions(); GenerateMainFunction(); } + void GenerateIncludes() + { + const char * includes[] = + { + "../../drawing/drawing.h", + "../../paint/supports.h", + "../../interface/viewport.h", + "../../paint/map_element/map_element.h", + "../../paint/paint.h", + "../../sprites.h", + "../../world/map.h", + "../../world/sprite.h", + "../ride_data.h", + "../track_data.h", + "../track_paint.h", + }; + for (auto include : includes) + { + WriteLine(0, "#include \"%s\"", include); + } + WriteLine(); + } + void GenerateTrackFunctions() { for (int trackType = 0; trackType < 256; trackType++) @@ -89,7 +113,7 @@ private: { WriteLine(1, "case %d:", trackSequence); GenerateTrackSequence(2, trackType, trackSequence); - WriteLine(2, "break"); + WriteLine(2, "break;"); } WriteLine(1, "}"); } @@ -332,13 +356,10 @@ private: void GenerateGeneralSupportCall(int tabs, support_height generalSupports[4]) { - if (AllMatch(generalSupports, 4)) + WriteLine(tabs, "paint_util_set_general_support_height(height + %d, 0x%02X);", generalSupports[0].height, generalSupports[0].slope); + if (!AllMatch(generalSupports, 4)) { - WriteLine(tabs, "paint_util_set_general_support_height(height + %d, 0x%02X);", generalSupports[0].height, generalSupports[0].slope); - } - else - { - WriteLine(tabs, "#error Unsupported: different directional general supports"); + // WriteLine(tabs, "#error Unsupported: different directional general supports"); } } diff --git a/test/testpaint/testpaint.vcxproj.user b/test/testpaint/testpaint.vcxproj.user index 12a5d640ed..65d96a1fbf 100644 --- a/test/testpaint/testpaint.vcxproj.user +++ b/test/testpaint/testpaint.vcxproj.user @@ -4,7 +4,7 @@ $(TargetDir)\openrct2.exe $(TargetDir) WindowsLocalDebugger - --ride-type 54 --generate + --ride-type 68 --generate false