mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 22:13:07 +01:00
Create rotated version of support functions
This commit is contained in:
@@ -178,6 +178,26 @@ static constexpr uint8_t metal_supports_slope_image_map[] = {
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
static constexpr MetalSupportPlace kMetalSupportPlacementRotated[][NumOrthogonalDirections] = {
|
||||
{ MetalSupportPlace::TopCorner, MetalSupportPlace::RightCorner, MetalSupportPlace::BottomCorner,
|
||||
MetalSupportPlace::LeftCorner },
|
||||
{ MetalSupportPlace::LeftCorner, MetalSupportPlace::TopCorner, MetalSupportPlace::RightCorner,
|
||||
MetalSupportPlace::BottomCorner },
|
||||
{ MetalSupportPlace::RightCorner, MetalSupportPlace::BottomCorner, MetalSupportPlace::LeftCorner,
|
||||
MetalSupportPlace::TopCorner },
|
||||
{ MetalSupportPlace::BottomCorner, MetalSupportPlace::LeftCorner, MetalSupportPlace::TopCorner,
|
||||
MetalSupportPlace::RightCorner },
|
||||
{ MetalSupportPlace::Centre, MetalSupportPlace::Centre, MetalSupportPlace::Centre, MetalSupportPlace::Centre },
|
||||
{ MetalSupportPlace::TopLeftSide, MetalSupportPlace::TopRightSide, MetalSupportPlace::BottomRightSide,
|
||||
MetalSupportPlace::BottomLeftSide },
|
||||
{ MetalSupportPlace::TopRightSide, MetalSupportPlace::BottomRightSide, MetalSupportPlace::BottomLeftSide,
|
||||
MetalSupportPlace::TopLeftSide },
|
||||
{ MetalSupportPlace::BottomLeftSide, MetalSupportPlace::BottomLeftSide, MetalSupportPlace::TopLeftSide,
|
||||
MetalSupportPlace::TopRightSide },
|
||||
{ MetalSupportPlace::BottomRightSide, MetalSupportPlace::TopLeftSide, MetalSupportPlace::TopRightSide,
|
||||
MetalSupportPlace::BottomRightSide },
|
||||
};
|
||||
|
||||
/**
|
||||
* Metal pole supports
|
||||
* @param supportType (edi)
|
||||
@@ -374,6 +394,14 @@ bool MetalASupportsPaintSetup(
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MetalASupportsPaintSetupRotated(
|
||||
PaintSession& session, MetalSupportType supportTypeMember, MetalSupportPlace placement, Direction direction,
|
||||
int32_t special, int32_t height, ImageId imageTemplate)
|
||||
{
|
||||
placement = kMetalSupportPlacementRotated[EnumValue(placement)][direction];
|
||||
return MetalASupportsPaintSetup(session, supportTypeMember, placement, special, height, imageTemplate);
|
||||
}
|
||||
|
||||
/**
|
||||
* Metal pole supports
|
||||
* rct2: 0x00663584
|
||||
@@ -559,6 +587,14 @@ bool MetalBSupportsPaintSetup(
|
||||
return false; // AND
|
||||
}
|
||||
|
||||
bool MetalBSupportsPaintSetupRotated(
|
||||
PaintSession& session, MetalSupportType supportTypeMember, MetalSupportPlace placement, Direction direction,
|
||||
int32_t special, int32_t height, ImageId imageTemplate)
|
||||
{
|
||||
placement = kMetalSupportPlacementRotated[EnumValue(placement)][direction];
|
||||
return MetalBSupportsPaintSetup(session, supportTypeMember, placement, special, height, imageTemplate);
|
||||
}
|
||||
|
||||
constexpr uint8_t MetalSupportTypeCount = 13;
|
||||
constexpr MetalSupportType RotatedMetalSupports[MetalSupportTypeCount][NumOrthogonalDirections] = {
|
||||
{ MetalSupportType::Tubes, MetalSupportType::Tubes, MetalSupportType::Tubes, MetalSupportType::Tubes },
|
||||
|
||||
@@ -95,9 +95,15 @@ struct PaintSession;
|
||||
bool MetalASupportsPaintSetup(
|
||||
PaintSession& session, MetalSupportType supportTypeMember, MetalSupportPlace placement, int32_t special, int32_t height,
|
||||
ImageId imageTemplate);
|
||||
bool MetalASupportsPaintSetupRotated(
|
||||
PaintSession& session, MetalSupportType supportTypeMember, MetalSupportPlace placement, Direction direction,
|
||||
int32_t special, int32_t height, ImageId imageTemplate);
|
||||
bool MetalBSupportsPaintSetup(
|
||||
PaintSession& session, MetalSupportType supportTypeMember, MetalSupportPlace placement, int32_t special, int32_t height,
|
||||
ImageId imageTemplate);
|
||||
bool MetalBSupportsPaintSetupRotated(
|
||||
PaintSession& session, MetalSupportType supportTypeMember, MetalSupportPlace placement, Direction direction,
|
||||
int32_t special, int32_t height, ImageId imageTemplate);
|
||||
void DrawSupportsSideBySide(
|
||||
PaintSession& session, Direction direction, uint16_t height, ImageId colour, MetalSupportType type, int32_t special = 0);
|
||||
bool PathPoleSupportsPaintSetup(
|
||||
|
||||
Reference in New Issue
Block a user