diff --git a/src/openrct2/ride/CableLift.cpp b/src/openrct2/ride/CableLift.cpp index a614b904c1..fa4d48c45f 100644 --- a/src/openrct2/ride/CableLift.cpp +++ b/src/openrct2/ride/CableLift.cpp @@ -244,7 +244,7 @@ bool Vehicle::CableLiftUpdateTrackMotionForwards() if (!track_block_get_next(&input, &output, &outputZ, &outputDirection)) return false; - if (track_pitch_and_roll_end(trackType) != track_pitch_and_roll_start(output.element->AsTrack()->GetTrackType())) + if (TrackPitchAndRollEnd(trackType) != TrackPitchAndRollStart(output.element->AsTrack()->GetTrackType())) return false; TrackLocation = { output, outputZ }; @@ -305,8 +305,7 @@ bool Vehicle::CableLiftUpdateTrackMotionBackwards() if (!track_block_get_previous(input, &output)) return false; - if (track_pitch_and_roll_start(trackType) - != track_pitch_and_roll_end(output.begin_element->AsTrack()->GetTrackType())) + if (TrackPitchAndRollStart(trackType) != TrackPitchAndRollEnd(output.begin_element->AsTrack()->GetTrackType())) return false; TrackLocation = { output.begin_x, output.begin_y, output.begin_z }; diff --git a/src/openrct2/ride/Track.cpp b/src/openrct2/ride/Track.cpp index 2452d78872..121c75e451 100644 --- a/src/openrct2/ride/Track.cpp +++ b/src/openrct2/ride/Track.cpp @@ -560,12 +560,12 @@ const rct_trackdefinition FlatRideTrackDefinitions[256] = }; // clang-format on -PitchAndRoll track_pitch_and_roll_start(uint8_t trackType) +PitchAndRoll TrackPitchAndRollStart(uint8_t trackType) { return { TrackDefinitions[trackType].vangle_start, TrackDefinitions[trackType].bank_start }; } -PitchAndRoll track_pitch_and_roll_end(uint8_t trackType) +PitchAndRoll TrackPitchAndRollEnd(uint8_t trackType) { return { TrackDefinitions[trackType].vangle_end, TrackDefinitions[trackType].bank_end }; } diff --git a/src/openrct2/ride/Track.h b/src/openrct2/ride/Track.h index 17b9a443f0..2c9ba6823c 100644 --- a/src/openrct2/ride/Track.h +++ b/src/openrct2/ride/Track.h @@ -554,8 +554,8 @@ struct track_circuit_iterator extern const rct_trackdefinition FlatRideTrackDefinitions[256]; extern const rct_trackdefinition TrackDefinitions[256]; -PitchAndRoll track_pitch_and_roll_start(uint8_t trackType); -PitchAndRoll track_pitch_and_roll_end(uint8_t trackType); +PitchAndRoll TrackPitchAndRollStart(uint8_t trackType); +PitchAndRoll TrackPitchAndRollEnd(uint8_t trackType); int32_t track_is_connected_by_shape(TileElement* a, TileElement* b); diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index 75e8f88af8..c24f401f5e 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -7937,7 +7937,7 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, Ride* cur { CoordsXYZD location = {}; - auto pitchAndRollEnd = track_pitch_and_roll_end(trackType); + auto pitchAndRollEnd = TrackPitchAndRollEnd(trackType); TileElement* tileElement = map_get_track_element_at_of_type_seq(TrackLocation, trackType, 0); if (tileElement == nullptr) @@ -8371,7 +8371,7 @@ static PitchAndRoll PitchAndRollEnd(Ride* curRide, bool useInvertedSprites, uint */ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, Ride* curRide, uint16_t* progress) { - auto pitchAndRollStart = track_pitch_and_roll_start(trackType); + auto pitchAndRollStart = TrackPitchAndRollStart(trackType); TileElement* tileElement = map_get_track_element_at_of_type_seq(TrackLocation, trackType, 0); if (tileElement == nullptr) @@ -8805,7 +8805,7 @@ loc_6DC476: } if (PitchAndRollStart(HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES), tileElement) - != track_pitch_and_roll_end(GetTrackType())) + != TrackPitchAndRollEnd(GetTrackType())) { goto loc_6DC9BC; } @@ -9012,7 +9012,7 @@ loc_6DCA9A: } if (PitchAndRollStart(HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES), tileElement) - != track_pitch_and_roll_end(GetTrackType())) + != TrackPitchAndRollEnd(GetTrackType())) { goto loc_6DCD4A; }