1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Clean up metal supports in Junior RC drawing

This commit is contained in:
Gymnasiast
2020-05-04 14:57:43 +02:00
parent 174b32c098
commit 923701e16b
2 changed files with 86 additions and 86 deletions

View File

@@ -114,19 +114,19 @@ static constexpr const uint32_t _metalSupportTypeToCrossbeamImages[][8] = {
/** rct2: 0x0097B142 */
static constexpr const uint8_t supportTypeToHeight[] = {
6,
3,
3,
6,
3,
3,
6,
6,
6,
6,
4,
3,
6,
6, // METAL_SUPPORTS_TUBES
3, // METAL_SUPPORTS_FORK
3, // METAL_SUPPORTS_FORK_ALT
6, // METAL_SUPPORTS_BOXED
3, // METAL_SUPPORTS_STICK
3, // METAL_SUPPORTS_STICK_ALT
6, // METAL_SUPPORTS_THICK_CENTRED
6, // METAL_SUPPORTS_THICK
6, // METAL_SUPPORTS_THICK_ALT
6, // METAL_SUPPORTS_THICK_ALT_CENTRED
4, // METAL_SUPPORTS_TRUSS
3, // METAL_SUPPORTS_TUBES_INVERTED
6, // METAL_SUPPORTS_BOXED_COATED
};
struct metal_supports_images {
@@ -136,19 +136,19 @@ struct metal_supports_images {
/** rct2: 0x0097B15C */
static constexpr const metal_supports_images _97B15C[] = {
{ 3243, 3209 },
{ 3279, 3262 },
{ 3298, 3262 },
{ 3334, 3317 },
{ 0, 3658 },
{ 0, 3658 },
{ 0, 3141 },
{ 0, 3158 },
{ 0, 3175 },
{ 0, 3192 },
{ 0, 3124 },
{ 3243, 3209 },
{ 3334, 3353 },
{ 3243, 3209 }, // METAL_SUPPORTS_TUBES
{ 3279, 3262 }, // METAL_SUPPORTS_FORK
{ 3298, 3262 }, // METAL_SUPPORTS_FORK_ALT
{ 3334, 3317 }, // METAL_SUPPORTS_BOXED
{ 0, 3658 }, // METAL_SUPPORTS_STICK
{ 0, 3658 }, // METAL_SUPPORTS_STICK_ALT
{ 0, 3141 }, // METAL_SUPPORTS_THICK_CENTRED
{ 0, 3158 }, // METAL_SUPPORTS_THICK
{ 0, 3175 }, // METAL_SUPPORTS_THICK_ALT
{ 0, 3192 }, // METAL_SUPPORTS_THICK_ALT_CENTRED
{ 0, 3124 }, // METAL_SUPPORTS_TRUSS
{ 3243, 3209 }, // METAL_SUPPORTS_TUBES_INVERTED
{ 3334, 3353 }, // METAL_SUPPORTS_BOXED_COATED
};
/** rct2: 0x0097B190 */

View File

@@ -1711,7 +1711,7 @@ void junior_rc_paint_track_25_deg_up(
if (track_paint_util_should_paint_supports(session->MapPosition))
{
int32_t supportType = (direction & 1) ? 2 : 1;
int32_t supportType = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK;
metal_a_supports_paint_setup(session, supportType, 4, 8, height, session->TrackColours[SCHEME_SUPPORTS]);
}
@@ -1738,7 +1738,7 @@ void junior_rc_paint_track_flat_to_25_deg_up(
if (track_paint_util_should_paint_supports(session->MapPosition))
{
int32_t supportType = (direction & 1) ? 2 : 1;
int32_t supportType = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK;
uint16_t ax = (direction == 0) ? 5 : 3;
metal_a_supports_paint_setup(session, supportType, 4, ax, height, session->TrackColours[SCHEME_SUPPORTS]);
}
@@ -1779,7 +1779,7 @@ void junior_rc_paint_track_25_deg_up_to_flat(
if (track_paint_util_should_paint_supports(session->MapPosition))
{
int32_t supportType = (direction & 1) ? 2 : 1;
int32_t supportType = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK;
metal_a_supports_paint_setup(session, supportType, 4, 6, height, session->TrackColours[SCHEME_SUPPORTS]);
}
@@ -1923,7 +1923,7 @@ static void junior_rc_flat_to_left_bank_paint_setup(
if (track_paint_util_should_paint_supports(session->MapPosition))
{
int32_t edi = (direction & 1) ? 2 : 1;
int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK;
metal_a_supports_paint_setup(session, edi, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
}
@@ -1971,7 +1971,7 @@ static void junior_rc_flat_to_right_bank_paint_setup(
if (track_paint_util_should_paint_supports(session->MapPosition))
{
int32_t edi = (direction & 1) ? 2 : 1;
int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK;
metal_a_supports_paint_setup(session, edi, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
}
@@ -2195,7 +2195,7 @@ static void junior_rc_left_bank_to_25_deg_up_paint_setup(
if (track_paint_util_should_paint_supports(session->MapPosition))
{
int32_t edi = (direction & 1) ? 2 : 1;
int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK;
metal_a_supports_paint_setup(session, edi, 4, 3, height, session->TrackColours[SCHEME_SUPPORTS]);
}
@@ -2255,7 +2255,7 @@ static void junior_rc_right_bank_to_25_deg_up_paint_setup(
if (track_paint_util_should_paint_supports(session->MapPosition))
{
int32_t edi = (direction & 1) ? 2 : 1;
int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK;
metal_a_supports_paint_setup(session, edi, 4, 3, height, session->TrackColours[SCHEME_SUPPORTS]);
}
@@ -2332,7 +2332,7 @@ static void junior_rc_25_deg_up_to_left_bank_paint_setup(
if (track_paint_util_should_paint_supports(session->MapPosition))
{
int32_t edi = (direction & 1) ? 2 : 1;
int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK;
metal_a_supports_paint_setup(session, edi, 4, 6, height, session->TrackColours[SCHEME_SUPPORTS]);
}
@@ -2393,7 +2393,7 @@ static void junior_rc_25_deg_up_to_right_bank_paint_setup(
if (track_paint_util_should_paint_supports(session->MapPosition))
{
int32_t edi = (direction & 1) ? 2 : 1;
int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK;
metal_a_supports_paint_setup(session, edi, 4, 6, height, session->TrackColours[SCHEME_SUPPORTS]);
}
@@ -2482,7 +2482,7 @@ static void junior_rc_left_bank_paint_setup(
if (track_paint_util_should_paint_supports(session->MapPosition))
{
int32_t edi = (direction & 1) ? 2 : 1;
int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK;
metal_a_supports_paint_setup(session, edi, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
}
@@ -3671,7 +3671,7 @@ static void junior_rc_brake_paint_setup(
if (track_paint_util_should_paint_supports(session->MapPosition))
{
int32_t edi = (direction & 1) ? 2 : 1;
int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK;
metal_a_supports_paint_setup(session, edi, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
}
@@ -3707,7 +3707,7 @@ static void junior_rc_block_brake_paint_setup(
if (track_paint_util_should_paint_supports(session->MapPosition))
{
int32_t edi = (direction & 1) ? 2 : 1;
int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK;
metal_a_supports_paint_setup(session, edi, 4, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
}
@@ -4221,8 +4221,8 @@ void junior_rc_paint_track_diag_25_deg_up(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 8, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
8, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4241,8 +4241,8 @@ void junior_rc_paint_track_diag_flat_to_25_deg_up(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 0, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
0, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4264,8 +4264,8 @@ void junior_rc_paint_track_diag_flat_to_60_deg_up(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 0, height + 6,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
0, height + 6, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4284,8 +4284,8 @@ void junior_rc_paint_track_diag_25_deg_up_to_flat(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 4, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
4, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4307,8 +4307,8 @@ void junior_rc_paint_track_diag_60_deg_up_to_flat(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 4, height + 13,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
4, height + 13, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4327,8 +4327,8 @@ void junior_rc_paint_track_diag_25_deg_down(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 8, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
8, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4347,8 +4347,8 @@ void junior_rc_paint_track_diag_flat_to_25_deg_down(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 4, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
4, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4370,8 +4370,8 @@ void junior_rc_paint_track_diag_flat_to_60_deg_down(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 4, height + 7,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
4, height + 7, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4390,8 +4390,8 @@ void junior_rc_paint_track_diag_25_deg_down_to_flat(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 0, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
0, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4413,8 +4413,8 @@ void junior_rc_paint_track_diag_60_deg_down_to_flat(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 0, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
0, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4665,8 +4665,8 @@ static void junior_rc_diag_left_bank_to_25_deg_up_paint_setup(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 0, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
0, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4692,8 +4692,8 @@ static void junior_rc_diag_right_bank_to_25_deg_up_paint_setup(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 0, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
0, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4719,8 +4719,8 @@ static void junior_rc_diag_25_deg_up_to_left_bank_paint_setup(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 4, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
4, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4746,8 +4746,8 @@ static void junior_rc_diag_25_deg_up_to_right_bank_paint_setup(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 4, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
4, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4773,8 +4773,8 @@ static void junior_rc_diag_left_bank_to_25_deg_down_paint_setup(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 4, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
4, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4800,8 +4800,8 @@ static void junior_rc_diag_right_bank_to_25_deg_down_paint_setup(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 4, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
4, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4827,8 +4827,8 @@ static void junior_rc_diag_25_deg_down_to_left_bank_paint_setup(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 0, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
0, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -4854,8 +4854,8 @@ static void junior_rc_diag_25_deg_down_to_right_bank_paint_setup(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 0, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
0, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -5190,8 +5190,8 @@ void junior_rc_paint_track_diag_60_deg_up(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 36, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
36, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -5210,8 +5210,8 @@ void junior_rc_paint_track_diag_60_deg_down(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 28, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
28, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -5231,8 +5231,8 @@ void junior_rc_paint_track_diag_25_deg_up_to_60_deg_up(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 16, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
16, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -5262,8 +5262,8 @@ void junior_rc_paint_track_diag_60_deg_up_to_25_deg_up(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 21, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
21, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -5293,8 +5293,8 @@ void junior_rc_paint_track_diag_25_deg_down_to_60_deg_down(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 17, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
17, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];
@@ -5314,8 +5314,8 @@ void junior_rc_paint_track_diag_60_deg_down_to_25_deg_down(
if (trackSequence == 3)
{
metal_b_supports_paint_setup(
session, (direction & 1) ? 2 : 1, junior_rc_diag_support_segment[direction], 8, height,
session->TrackColours[SCHEME_SUPPORTS]);
session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, junior_rc_diag_support_segment[direction],
8, height, session->TrackColours[SCHEME_SUPPORTS]);
}
int32_t blockedSegments = junior_rc_diag_blocked_segments[trackSequence];