Close #11859: Add on-ride photo to APVC and Reverse Freefall RC

This commit is contained in:
Michael Steenbeek 2020-12-29 13:13:17 +01:00 committed by GitHub
parent 51faec5c50
commit ac65864b40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 67 additions and 2 deletions

View file

@ -2,6 +2,7 @@
------------------------------------------------------------------------
- Feature: [#6677] Add Discord RPC to macOS builds.
- Feature: [#6844] Enhanced track designer with ability to add/remove scenery and footpaths.
- Feature: [#11859] Add on-ride photo section to Air Powered Vertical and Reverse Freefall Coaster.
- Feature: [#13057] Make GameAction flags accessible by plugins.
- Feature: [#13078] [Plugin] Add colour picker widget.
- Feature: [#13376] Open custom window at specified tab.

View file

@ -929,6 +929,29 @@ static void air_powered_vertical_rc_track_booster(
paint_util_set_general_support_height(session, height + 32, 0x20);
}
static void air_powered_vertical_rc_track_onride_photo(
paint_session* session, ride_id_t rideIndex, uint8_t trackSequence, uint8_t direction, int32_t height,
const TileElement* tileElement)
{
static constexpr const uint32_t imageIds[4] = {
SPR_AIR_POWERED_VERTICAL_RC_FLAT_SW_NE,
SPR_AIR_POWERED_VERTICAL_RC_FLAT_NW_SE,
SPR_AIR_POWERED_VERTICAL_RC_FLAT_SW_NE,
SPR_AIR_POWERED_VERTICAL_RC_FLAT_NW_SE,
};
uint32_t imageId = imageIds[direction] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height);
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
track_paint_util_onride_photo_paint(session, direction, height + 3, tileElement);
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(session, height + 32, 0x20);
}
TRACK_PAINT_FUNCTION get_track_paint_function_air_powered_vertical_rc(int32_t trackType)
{
switch (trackType)
@ -973,6 +996,8 @@ TRACK_PAINT_FUNCTION get_track_paint_function_air_powered_vertical_rc(int32_t tr
return air_powered_vertical_rc_track_vertical_slope_down;
case TrackElemType::Booster:
return air_powered_vertical_rc_track_booster;
case TrackElemType::OnRidePhoto:
return air_powered_vertical_rc_track_onride_photo;
}
return nullptr;
}

View file

@ -85,6 +85,9 @@ enum
SPR_REVERSE_FREEFALL_RC_SLOPE_SUPPORTS_SE_NW_4 = 22223,
SPR_REVERSE_FREEFALL_RC_SLOPE_SUPPORTS_SE_NW_6 = 22224,
SPR_REVERSE_FREEFALL_RC_SLOPE_SUPPORTS_SE_NW_5 = 22225,
SPR_AIR_POWERED_VERTICAL_RC_FLAT_SW_NE = 22226,
SPR_AIR_POWERED_VERTICAL_RC_FLAT_NW_SE = 22227,
};
static constexpr const uint32_t reverse_freefall_rc_track_pieces_station[4] = {
@ -385,6 +388,40 @@ static void paint_reverse_freefall_rc_vertical(
}
}
static void paint_reverse_freefall_rc_onride_photo(
paint_session* session, ride_id_t rideIndex, uint8_t trackSequence, uint8_t direction, int32_t height,
const TileElement* tileElement)
{
static constexpr const uint32_t imageIds[4] = {
SPR_AIR_POWERED_VERTICAL_RC_FLAT_SW_NE,
SPR_AIR_POWERED_VERTICAL_RC_FLAT_NW_SE,
SPR_AIR_POWERED_VERTICAL_RC_FLAT_SW_NE,
SPR_AIR_POWERED_VERTICAL_RC_FLAT_NW_SE,
};
// The straight track without booster is borrowed from the APVC.
// It has one track colour, instead of the two that the Reverse Freefall Colour has.
uint32_t colour = session->TrackColours[SCHEME_TRACK];
if (!tileElement->IsGhost() && !tileElement->AsTrack()->IsHighlighted())
{
// Replace remap colour 1 (bits 19-23) with a copy of remap colour 2 (bits 24-28).
colour_t colour2 = (colour >> 24) & 31;
colour &= ~0xF80000;
colour |= (colour2 << 19);
}
uint32_t imageId = imageIds[direction] | colour;
PaintAddImageAsParentRotated(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height);
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
track_paint_util_onride_photo_paint(session, direction, height + 3, tileElement);
paint_util_push_tunnel_rotated(session, direction, height, TUNNEL_SQUARE_FLAT);
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(session, height + 32, 0x20);
}
TRACK_PAINT_FUNCTION get_track_paint_function_reverse_freefall_rc(int32_t trackType)
{
switch (trackType)
@ -399,6 +436,8 @@ TRACK_PAINT_FUNCTION get_track_paint_function_reverse_freefall_rc(int32_t trackT
return paint_reverse_freefall_rc_slope;
case TrackElemType::ReverseFreefallVertical:
return paint_reverse_freefall_rc_vertical;
case TrackElemType::OnRidePhoto:
return paint_reverse_freefall_rc_onride_photo;
}
return nullptr;
}

View file

@ -19,7 +19,7 @@ constexpr const RideTypeDescriptor AirPoweredVerticalCoasterRTD =
{
SET_FIELD(AlternateType, RIDE_TYPE_NULL),
SET_FIELD(Category, RIDE_CATEGORY_ROLLERCOASTER),
SET_FIELD(EnabledTrackPieces, (1ULL << TRACK_STRAIGHT) | (1ULL << TRACK_STATION_END) | (1ULL << TRACK_LIFT_HILL_STEEP) | (1ULL << TRACK_LIFT_HILL_CURVE) | (1ULL << TRACK_FLAT_ROLL_BANKING) | (1ULL << TRACK_CURVE) | (1ULL << TRACK_BRAKES) | (1ULL << TRACK_REVERSE_FREEFALL) | (1ULL << TRACK_SLOPE_TO_FLAT)),
SET_FIELD(EnabledTrackPieces, (1ULL << TRACK_STRAIGHT) | (1ULL << TRACK_STATION_END) | (1ULL << TRACK_LIFT_HILL_STEEP) | (1ULL << TRACK_LIFT_HILL_CURVE) | (1ULL << TRACK_FLAT_ROLL_BANKING) | (1ULL << TRACK_CURVE) | (1ULL << TRACK_BRAKES) | (1ULL << TRACK_REVERSE_FREEFALL) | (1ULL << TRACK_SLOPE_TO_FLAT) | (1ULL << TRACK_ON_RIDE_PHOTO)),
SET_FIELD(ExtraTrackPieces, (1ULL << TRACK_BOOSTER)),
SET_FIELD(CoveredTrackPieces, 0),
SET_FIELD(StartTrackPiece, TrackElemType::EndStation),

View file

@ -19,7 +19,7 @@ constexpr const RideTypeDescriptor ReverseFreefallCoasterRTD =
{
SET_FIELD(AlternateType, RIDE_TYPE_NULL),
SET_FIELD(Category, RIDE_CATEGORY_ROLLERCOASTER),
SET_FIELD(EnabledTrackPieces, (1ULL << TRACK_STRAIGHT) | (1ULL << TRACK_STATION_END) | (1ULL << TRACK_LIFT_HILL_STEEP) | (1ULL << TRACK_REVERSE_FREEFALL)),
SET_FIELD(EnabledTrackPieces, (1ULL << TRACK_STRAIGHT) | (1ULL << TRACK_STATION_END) | (1ULL << TRACK_LIFT_HILL_STEEP) | (1ULL << TRACK_REVERSE_FREEFALL) | (1ULL << TRACK_ON_RIDE_PHOTO)),
SET_FIELD(ExtraTrackPieces, 0),
SET_FIELD(CoveredTrackPieces, 0),
SET_FIELD(StartTrackPiece, TrackElemType::EndStation),