mirror of https://github.com/OpenRCT2/OpenRCT2.git
Consolidate support and general support height calls
This commit is contained in:
parent
00e1f504f5
commit
d6ce38185f
|
@ -717,31 +717,26 @@ static void classicStandUpRCTrackLeftEighthBankToDiag(
|
|||
PaintAddImageAsParentRotated(
|
||||
session, direction, session.TrackColours.WithIndex(imageId), { 0, 0, height },
|
||||
{ { 16, 16, height }, { 16, 16, 3 } });
|
||||
MetalASupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session.TrackColours.WithIndex(imageId), { 0, 0, height },
|
||||
{ { 0, 16, height }, { 16, 18, 3 } });
|
||||
MetalASupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours);
|
||||
break;
|
||||
case 2:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session.TrackColours.WithIndex(imageId), { 0, 0, height },
|
||||
{ { 0, 0, height }, { 16, 16, 3 } });
|
||||
MetalASupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours);
|
||||
break;
|
||||
case 3:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session.TrackColours.WithIndex(imageId), { 0, 0, height },
|
||||
{ { 16, 0, height }, { 16, 16, 3 } });
|
||||
MetalASupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours);
|
||||
break;
|
||||
}
|
||||
MetalASupportsPaintSetupRotated(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, direction, 0, height, session.SupportColours);
|
||||
|
||||
PaintUtilSetSegmentSupportHeight(
|
||||
session,
|
||||
PaintUtilRotateSegments(
|
||||
|
@ -874,31 +869,26 @@ static void classicStandUpRCTrackRightEighthBankToDiag(
|
|||
PaintAddImageAsParentRotated(
|
||||
session, direction, session.TrackColours.WithIndex(imageId), { 0, 0, height },
|
||||
{ { 16, 0, height }, { 16, 16, 3 } });
|
||||
MetalASupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session.TrackColours.WithIndex(imageId), { 0, 0, height },
|
||||
{ { 0, 0, height }, { 16, 16, 3 } });
|
||||
MetalASupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours);
|
||||
break;
|
||||
case 2:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session.TrackColours.WithIndex(imageId), { 0, 0, height },
|
||||
{ { 0, 16, height }, { 16, 18, 3 } });
|
||||
MetalASupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours);
|
||||
break;
|
||||
case 3:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session.TrackColours.WithIndex(imageId), { 0, 0, height },
|
||||
{ { 16, 16, height }, { 16, 16, 3 } });
|
||||
MetalASupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours);
|
||||
break;
|
||||
}
|
||||
MetalASupportsPaintSetupRotated(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, direction, 0, height, session.SupportColours);
|
||||
|
||||
PaintUtilSetSegmentSupportHeight(
|
||||
session,
|
||||
PaintUtilRotateSegments(
|
||||
|
@ -1059,7 +1049,6 @@ static inline void classicStandUpRCTrackDiagFlatWithBank(
|
|||
PaintSegment::bottomRightSide),
|
||||
direction),
|
||||
0xFFFF, 0);
|
||||
PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20);
|
||||
break;
|
||||
case 1:
|
||||
switch (direction)
|
||||
|
@ -1077,7 +1066,6 @@ static inline void classicStandUpRCTrackDiagFlatWithBank(
|
|||
PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide),
|
||||
direction),
|
||||
0xFFFF, 0);
|
||||
PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20);
|
||||
break;
|
||||
case 2:
|
||||
switch (direction)
|
||||
|
@ -1096,31 +1084,18 @@ static inline void classicStandUpRCTrackDiagFlatWithBank(
|
|||
PaintSegment::bottomRightSide),
|
||||
direction),
|
||||
0xFFFF, 0);
|
||||
PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20);
|
||||
break;
|
||||
case 3:
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
MetalASupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session.TrackColours.WithIndex(img1), { -16, -16, height },
|
||||
{ { -16, -16, height }, { 32, 32, 3 } });
|
||||
MetalASupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours);
|
||||
break;
|
||||
case 2:
|
||||
MetalASupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours);
|
||||
break;
|
||||
case 3:
|
||||
MetalASupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours);
|
||||
break;
|
||||
}
|
||||
MetalASupportsPaintSetupRotated(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, direction, 0, height, session.SupportColours);
|
||||
|
||||
PaintUtilSetSegmentSupportHeight(
|
||||
session,
|
||||
|
@ -1130,9 +1105,10 @@ static inline void classicStandUpRCTrackDiagFlatWithBank(
|
|||
PaintSegment::bottomLeftSide),
|
||||
direction),
|
||||
0xFFFF, 0);
|
||||
PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20);
|
||||
break;
|
||||
}
|
||||
|
||||
PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20);
|
||||
}
|
||||
|
||||
static void classicStandUpRCTrackDiagFlatToLeftBank(
|
||||
|
@ -1213,7 +1189,6 @@ static void classicStandUpRCTrackDiagFlatTo25DegUpBanked(
|
|||
PaintSegment::bottomRightSide),
|
||||
direction),
|
||||
0xFFFF, 0);
|
||||
PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20);
|
||||
break;
|
||||
case 1:
|
||||
switch (direction)
|
||||
|
@ -1231,7 +1206,6 @@ static void classicStandUpRCTrackDiagFlatTo25DegUpBanked(
|
|||
PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide),
|
||||
direction),
|
||||
0xFFFF, 0);
|
||||
PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20);
|
||||
break;
|
||||
case 2:
|
||||
switch (direction)
|
||||
|
@ -1250,31 +1224,19 @@ static void classicStandUpRCTrackDiagFlatTo25DegUpBanked(
|
|||
PaintSegment::bottomRightSide),
|
||||
direction),
|
||||
0xFFFF, 0);
|
||||
PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20);
|
||||
break;
|
||||
case 3:
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
MetalBSupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 0, height, session.SupportColours);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session.TrackColours.WithIndex(img1), { -16, -16, height },
|
||||
{ { -16, -16, height }, { 32, 32, 3 } });
|
||||
MetalBSupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 0, height, session.SupportColours);
|
||||
break;
|
||||
case 2:
|
||||
MetalBSupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 0, height, session.SupportColours);
|
||||
break;
|
||||
case 3:
|
||||
MetalBSupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 0, height, session.SupportColours);
|
||||
break;
|
||||
}
|
||||
MetalBSupportsPaintSetupRotated(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, direction, 0, height, session.SupportColours);
|
||||
|
||||
PaintUtilSetSegmentSupportHeight(
|
||||
session,
|
||||
PaintUtilRotateSegments(
|
||||
|
@ -1283,9 +1245,10 @@ static void classicStandUpRCTrackDiagFlatTo25DegUpBanked(
|
|||
PaintSegment::bottomLeftSide),
|
||||
direction),
|
||||
0xFFFF, 0);
|
||||
PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20);
|
||||
break;
|
||||
}
|
||||
|
||||
PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20);
|
||||
}
|
||||
|
||||
static void classicStandUpRCTrackDiagLeftBankTo25DegUp(
|
||||
|
@ -1349,7 +1312,6 @@ static void classicStandUpRCTrackDiag25DegUpToFlatBanked(
|
|||
PaintSegment::bottomRightSide),
|
||||
direction),
|
||||
0xFFFF, 0);
|
||||
PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20);
|
||||
break;
|
||||
case 1:
|
||||
switch (direction)
|
||||
|
@ -1367,7 +1329,6 @@ static void classicStandUpRCTrackDiag25DegUpToFlatBanked(
|
|||
PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide),
|
||||
direction),
|
||||
0xFFFF, 0);
|
||||
PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20);
|
||||
break;
|
||||
case 2:
|
||||
switch (direction)
|
||||
|
@ -1386,31 +1347,19 @@ static void classicStandUpRCTrackDiag25DegUpToFlatBanked(
|
|||
PaintSegment::bottomRightSide),
|
||||
direction),
|
||||
0xFFFF, 0);
|
||||
PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20);
|
||||
break;
|
||||
case 3:
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
MetalBSupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, 4, height, session.SupportColours);
|
||||
break;
|
||||
case 1:
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction, session.TrackColours.WithIndex(img1), { -16, -16, height },
|
||||
{ { -16, -16, height }, { 32, 32, 3 } });
|
||||
MetalBSupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::TopCorner, 4, height, session.SupportColours);
|
||||
break;
|
||||
case 2:
|
||||
MetalBSupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::RightCorner, 4, height, session.SupportColours);
|
||||
break;
|
||||
case 3:
|
||||
MetalBSupportsPaintSetup(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::BottomCorner, 4, height, session.SupportColours);
|
||||
break;
|
||||
}
|
||||
MetalBSupportsPaintSetupRotated(
|
||||
session, MetalSupportType::Tubes, MetalSupportPlace::LeftCorner, direction, 4, height, session.SupportColours);
|
||||
|
||||
PaintUtilSetSegmentSupportHeight(
|
||||
session,
|
||||
PaintUtilRotateSegments(
|
||||
|
@ -1419,9 +1368,10 @@ static void classicStandUpRCTrackDiag25DegUpToFlatBanked(
|
|||
PaintSegment::bottomLeftSide),
|
||||
direction),
|
||||
0xFFFF, 0);
|
||||
PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20);
|
||||
break;
|
||||
}
|
||||
|
||||
PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20);
|
||||
}
|
||||
|
||||
static void classicStandUpRCTrackDiag25DegUpToLeftBank(
|
||||
|
|
Loading…
Reference in New Issue