diff --git a/src/openrct2/paint/support/WoodenSupports.cpp b/src/openrct2/paint/support/WoodenSupports.cpp index b7b5ea3a92..c153e95b11 100644 --- a/src/openrct2/paint/support/WoodenSupports.cpp +++ b/src/openrct2/paint/support/WoodenSupports.cpp @@ -140,103 +140,102 @@ static constexpr const ImagesByTransitionTypeArray::const_pointer WoodenCurveSup struct UnkSupportsDescriptor { BoundBoxXYZ bounding_box; uint8_t var_6; - uint8_t var_7; }; /* 0x0097B23C */ static constexpr UnkSupportsDescriptor SupportsDescriptors[] = { - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Flat to gentle - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Gentle to flat - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Gentle slope - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Gentle to steep - {{{10, 0, 0}, {10, 32, 44}}, 1, 1}, - {{{0, 10, 0}, {32, 10, 44}}, 1, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Steep to gentle - {{{10, 0, 0}, {10, 32, 44}}, 1, 1}, - {{{0, 10, 0}, {32, 10, 44}}, 1, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Steep slope - {{{10, 0, 2}, {10, 32, 76}}, 1, 1}, - {{{0, 10, 2}, {32, 10, 76}}, 1, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 4}}, 0, 1}, // Slope - {{{0, 0, 0}, {1, 1, 4}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 4}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 4}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Flat to steep small - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Steep to flat small - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // ? - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // ? - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // ? - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{2, 2, 1}, {28, 28, 2}}, 0, 1}, // Large scenery - {{{2, 2, 1}, {28, 28, 2}}, 0, 1}, - {{{2, 2, 1}, {28, 28, 2}}, 0, 1}, - {{{2, 2, 1}, {28, 28, 2}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Flat to steep large 1 - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Flat to steep large 2 - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Flat to steep large 3 - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Flat to steep large 4 - {{{10, 0, 2}, {10, 32, 52}}, 1, 1}, - {{{0, 10, 2}, {32, 10, 52}}, 1, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Steep to flat large 1 - {{{10, 0, 2}, {10, 32, 76}}, 1, 1}, - {{{0, 10, 2}, {32, 10, 76}}, 1, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Steep to flat large 2 - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Steep to flat large 3 - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Steep to flat large 4 - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // Flat to gentle + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // Gentle to flat + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // Gentle slope + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // Gentle to steep + {{{10, 0, 0}, {10, 32, 44}}, 1}, + {{{0, 10, 0}, {32, 10, 44}}, 1}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // Steep to gentle + {{{10, 0, 0}, {10, 32, 44}}, 1}, + {{{0, 10, 0}, {32, 10, 44}}, 1}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // Steep slope + {{{10, 0, 2}, {10, 32, 76}}, 1}, + {{{0, 10, 2}, {32, 10, 76}}, 1}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 4}}, 0}, // Slope + {{{0, 0, 0}, {1, 1, 4}}, 0}, + {{{0, 0, 0}, {1, 1, 4}}, 0}, + {{{0, 0, 0}, {1, 1, 4}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // Flat to steep small + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // Steep to flat small + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // ? + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // ? + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // ? + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{2, 2, 1}, {28, 28, 2}}, 0}, // Large scenery + {{{2, 2, 1}, {28, 28, 2}}, 0}, + {{{2, 2, 1}, {28, 28, 2}}, 0}, + {{{2, 2, 1}, {28, 28, 2}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // Flat to steep large 1 + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // Flat to steep large 2 + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // Flat to steep large 3 + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // Flat to steep large 4 + {{{10, 0, 2}, {10, 32, 52}}, 1}, + {{{0, 10, 2}, {32, 10, 52}}, 1}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // Steep to flat large 1 + {{{10, 0, 2}, {10, 32, 76}}, 1}, + {{{0, 10, 2}, {32, 10, 76}}, 1}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // Steep to flat large 2 + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // Steep to flat large 3 + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, // Steep to flat large 4 + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, + {{{0, 0, 0}, {1, 1, 8}}, 0}, }; /* 0x0098D8D4 */ static constexpr UnkSupportsDescriptor Byte98D8D4[] = { - {{{0, 0, 0}, {1, 1, 4}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 4}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 4}}, 0, 1}, - {{{0, 0, 0}, {1, 1, 4}}, 0, 1}, + {{{0, 0, 0}, {1, 1, 4}}, 0}, + {{{0, 0, 0}, {1, 1, 4}}, 0}, + {{{0, 0, 0}, {1, 1, 4}}, 0}, + {{{0, 0, 0}, {1, 1, 4}}, 0}, }; /* 0x0097B3C4 */ @@ -359,8 +358,7 @@ static bool WoodenABSupportPaintSetupPaintSpecial( const UnkSupportsDescriptor& supportsDesc = SupportsDescriptors[supportsDescriptorIndex]; const auto* imageIds = WoodenCurveSupportImageIds[EnumValue(supportType)][EnumValue(subType)]; - // TODO: SupportsDescriptors[supportsDescriptorIndex].var_7 is never 0 - if (imageIds == nullptr || imageIds[EnumValue(transitionType)][direction] == 0 || supportsDesc.var_7 == 0) + if (imageIds == nullptr || imageIds[EnumValue(transitionType)][direction] == 0) return false; auto imageId = imageTemplate.WithIndex(imageIds[EnumValue(transitionType)][direction]);