From 450bf61ee4f19fb8a986c0194406773544274f7a Mon Sep 17 00:00:00 2001 From: frutiemax Date: Sun, 29 Aug 2021 10:08:54 -0400 Subject: [PATCH] Part of #13874: TrackSequenceProperties, Pricing and MirrorMap renamed --- src/openrct2-ui/windows/NewRide.cpp | 2 +- src/openrct2-ui/windows/Ride.cpp | 2 +- src/openrct2-ui/windows/TrackDesignPlace.cpp | 4 ++-- src/openrct2/actions/MazePlaceTrackAction.cpp | 4 ++-- src/openrct2/actions/MazeSetTrackAction.cpp | 4 ++-- src/openrct2/actions/TrackPlaceAction.cpp | 10 +++++----- src/openrct2/actions/TrackRemoveAction.cpp | 8 ++++---- src/openrct2/actions/WallPlaceAction.cpp | 2 +- src/openrct2/ride/Ride.cpp | 16 ++++++++-------- src/openrct2/ride/RideConstruction.cpp | 10 +++++----- src/openrct2/ride/TrackData.cpp | 6 +++--- src/openrct2/ride/TrackData.h | 6 +++--- src/openrct2/ride/TrackDesign.cpp | 2 +- src/openrct2/ride/Vehicle.cpp | 4 ++-- src/openrct2/world/Footpath.cpp | 12 ++++++------ 15 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/openrct2-ui/windows/NewRide.cpp b/src/openrct2-ui/windows/NewRide.cpp index dff60eaa81..c601b19dba 100644 --- a/src/openrct2-ui/windows/NewRide.cpp +++ b/src/openrct2-ui/windows/NewRide.cpp @@ -946,7 +946,7 @@ static void window_new_ride_paint_ride_information( int32_t startPieceId = GetRideTypeDescriptor(item.Type).StartTrackPiece; money64 price = GetRideTypeDescriptor(item.Type).BuildCosts.TrackPrice; const auto& ted = GetTrackElementDescriptor(startPieceId); - price *= ted.Pricing; + price *= ted.Price; price = (price >> 17) * 10 * GetRideTypeDescriptor(item.Type).BuildCosts.PriceEstimateMultiplier; // diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index 7469bce3dc..1e42580432 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -1370,7 +1370,7 @@ rct_window* window_ride_open_track(TileElement* tileElement) auto trackElement = tileElement->AsTrack(); auto trackType = trackElement->GetTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); - if (ted.TrackSequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN) + if (ted.SequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN) { auto stationIndex = trackElement->GetStationIndex(); return window_ride_open_station(ride, stationIndex); diff --git a/src/openrct2-ui/windows/TrackDesignPlace.cpp b/src/openrct2-ui/windows/TrackDesignPlace.cpp index 26d46164af..58da05f5bd 100644 --- a/src/openrct2-ui/windows/TrackDesignPlace.cpp +++ b/src/openrct2-ui/windows/TrackDesignPlace.cpp @@ -574,8 +574,8 @@ static void window_track_place_draw_mini_preview_track( auto bits = trackBlock->var_08.Rotate(curTrackRotation & 3).GetBaseQuarterOccupied(); // Station track is a lighter colour - uint8_t colour = (ted.TrackSequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN) ? _PaletteIndexColourStation - : _PaletteIndexColourTrack; + uint8_t colour = (ted.SequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN) ? _PaletteIndexColourStation + : _PaletteIndexColourTrack; for (int32_t i = 0; i < 4; i++) { diff --git a/src/openrct2/actions/MazePlaceTrackAction.cpp b/src/openrct2/actions/MazePlaceTrackAction.cpp index c39f19a21b..c62e469524 100644 --- a/src/openrct2/actions/MazePlaceTrackAction.cpp +++ b/src/openrct2/actions/MazePlaceTrackAction.cpp @@ -116,7 +116,7 @@ GameActions::Result::Ptr MazePlaceTrackAction::Query() const } const auto& ted = GetTrackElementDescriptor(TrackElemType::Maze); - money32 price = (((ride->GetRideTypeDescriptor().BuildCosts.TrackPrice * ted.Pricing) >> 16)); + money32 price = (((ride->GetRideTypeDescriptor().BuildCosts.TrackPrice * ted.Price) >> 16)); res->Cost = canBuild->Cost + price / 2 * 10; return res; @@ -158,7 +158,7 @@ GameActions::Result::Ptr MazePlaceTrackAction::Execute() const } const auto& ted = GetTrackElementDescriptor(TrackElemType::Maze); - money32 price = (((ride->GetRideTypeDescriptor().BuildCosts.TrackPrice * ted.Pricing) >> 16)); + money32 price = (((ride->GetRideTypeDescriptor().BuildCosts.TrackPrice * ted.Price) >> 16)); res->Cost = canBuild->Cost + price / 2 * 10; auto startLoc = _loc.ToTileStart(); diff --git a/src/openrct2/actions/MazeSetTrackAction.cpp b/src/openrct2/actions/MazeSetTrackAction.cpp index 167f67e1fd..f0dd07396f 100644 --- a/src/openrct2/actions/MazeSetTrackAction.cpp +++ b/src/openrct2/actions/MazeSetTrackAction.cpp @@ -137,7 +137,7 @@ GameActions::Result::Ptr MazeSetTrackAction::Query() const } const auto& ted = GetTrackElementDescriptor(TrackElemType::Maze); - money32 price = (((ride->GetRideTypeDescriptor().BuildCosts.TrackPrice * ted.Pricing) >> 16)); + money32 price = (((ride->GetRideTypeDescriptor().BuildCosts.TrackPrice * ted.Price) >> 16)); res->Cost = price / 2 * 10; return res; @@ -173,7 +173,7 @@ GameActions::Result::Ptr MazeSetTrackAction::Execute() const if (tileElement == nullptr) { const auto& ted = GetTrackElementDescriptor(TrackElemType::Maze); - money32 price = (((ride->GetRideTypeDescriptor().BuildCosts.TrackPrice * ted.Pricing) >> 16)); + money32 price = (((ride->GetRideTypeDescriptor().BuildCosts.TrackPrice * ted.Price) >> 16)); res->Cost = price / 2 * 10; auto startLoc = _loc.ToTileStart(); diff --git a/src/openrct2/actions/TrackPlaceAction.cpp b/src/openrct2/actions/TrackPlaceAction.cpp index 1763aba396..2f36dfc5c8 100644 --- a/src/openrct2/actions/TrackPlaceAction.cpp +++ b/src/openrct2/actions/TrackPlaceAction.cpp @@ -318,7 +318,7 @@ GameActions::Result::Ptr TrackPlaceAction::Query() const } } - int32_t entranceDirections = ted.TrackSequenceProperties[0]; + int32_t entranceDirections = ted.SequenceProperties[0]; if ((entranceDirections & TRACK_SEQUENCE_FLAG_ORIGIN) && trackBlock->index == 0) { if (!track_add_station_element({ mapLoc, baseZ, _origin.direction }, _rideIndex, 0, _fromTrackDesign)) @@ -367,7 +367,7 @@ GameActions::Result::Ptr TrackPlaceAction::Query() const } money32 price = ride->GetRideTypeDescriptor().BuildCosts.TrackPrice; - price *= ted.Pricing; + price *= ted.Price; price >>= 16; res->Cost = cost + ((price / 2) * 10); @@ -538,7 +538,7 @@ GameActions::Result::Ptr TrackPlaceAction::Execute() const { if (!(GetFlags() & GAME_COMMAND_FLAG_NO_SPEND)) { - entranceDirections = ted.TrackSequenceProperties[0]; + entranceDirections = ted.SequenceProperties[0]; } } @@ -597,7 +597,7 @@ GameActions::Result::Ptr TrackPlaceAction::Execute() const } trackElement->SetColourScheme(_colour); - entranceDirections = ted.TrackSequenceProperties[0]; + entranceDirections = ted.SequenceProperties[0]; if (entranceDirections & TRACK_SEQUENCE_FLAG_CONNECTS_TO_PATH) { uint8_t availableDirections = entranceDirections & 0x0F; @@ -653,7 +653,7 @@ GameActions::Result::Ptr TrackPlaceAction::Execute() const } money32 price = ride->GetRideTypeDescriptor().BuildCosts.TrackPrice; - price *= ted.Pricing; + price *= ted.Price; price >>= 16; res->Cost = cost + ((price / 2) * 10); diff --git a/src/openrct2/actions/TrackRemoveAction.cpp b/src/openrct2/actions/TrackRemoveAction.cpp index 49e9967d05..8e1bf2b942 100644 --- a/src/openrct2/actions/TrackRemoveAction.cpp +++ b/src/openrct2/actions/TrackRemoveAction.cpp @@ -203,7 +203,7 @@ GameActions::Result::Ptr TrackRemoveAction::Query() const return MakeResult(GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS); } - int32_t entranceDirections = ted.TrackSequenceProperties[0]; + int32_t entranceDirections = ted.SequenceProperties[0]; if (entranceDirections & TRACK_SEQUENCE_FLAG_ORIGIN && (tileElement->AsTrack()->GetSequenceIndex() == 0)) { if (!track_remove_station_element({ mapLoc, _origin.direction }, rideIndex, 0)) @@ -229,7 +229,7 @@ GameActions::Result::Ptr TrackRemoveAction::Query() const } money32 price = ride->GetRideTypeDescriptor().BuildCosts.TrackPrice; - price *= ted.Pricing; + price *= ted.Price; price >>= 16; price = (price + cost) / 2; if (ride->lifecycle_flags & RIDE_LIFECYCLE_EVER_BEEN_OPENED) @@ -378,7 +378,7 @@ GameActions::Result::Ptr TrackRemoveAction::Execute() const return MakeResult(GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS); } - int32_t entranceDirections = ted.TrackSequenceProperties[0]; + int32_t entranceDirections = ted.SequenceProperties[0]; if (entranceDirections & TRACK_SEQUENCE_FLAG_ORIGIN && (tileElement->AsTrack()->GetSequenceIndex() == 0)) { if (!track_remove_station_element({ mapLoc, _origin.direction }, rideIndex, 0)) @@ -477,7 +477,7 @@ GameActions::Result::Ptr TrackRemoveAction::Execute() const } money32 price = ride->GetRideTypeDescriptor().BuildCosts.TrackPrice; - price *= ted.Pricing; + price *= ted.Price; price >>= 16; price = (price + cost) / 2; if (ride->lifecycle_flags & RIDE_LIFECYCLE_EVER_BEEN_OPENED) diff --git a/src/openrct2/actions/WallPlaceAction.cpp b/src/openrct2/actions/WallPlaceAction.cpp index 2f660ea596..d50b922c65 100644 --- a/src/openrct2/actions/WallPlaceAction.cpp +++ b/src/openrct2/actions/WallPlaceAction.cpp @@ -441,7 +441,7 @@ bool WallPlaceAction::WallCheckObstructionWithTrack( int32_t z; if (sequence == 0) { - if (ted.TrackSequenceProperties[0] & TRACK_SEQUENCE_FLAG_DISALLOW_DOORS) + if (ted.SequenceProperties[0] & TRACK_SEQUENCE_FLAG_DISALLOW_DOORS) { return false; } diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index 7774faf789..ee659c2023 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -414,7 +414,7 @@ bool ride_try_get_origin_element(const Ride* ride, CoordsXYE* output) bool specialTrackPiece = (it.element->AsTrack()->GetTrackType() != TrackElemType::BeginStation && it.element->AsTrack()->GetTrackType() != TrackElemType::MiddleStation - && (ted.TrackSequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)); + && (ted.SequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)); // Set result tile to this track piece if first found track or a ??? if (resultTileElement == nullptr || specialTrackPiece) @@ -2230,7 +2230,7 @@ static void ride_shop_connected(Ride* ride) } const auto& ted = GetTrackElementDescriptor(track_type); - uint8_t entrance_directions = ted.TrackSequenceProperties[0] & 0xF; + uint8_t entrance_directions = ted.SequenceProperties[0] & 0xF; uint8_t tile_direction = trackElement->GetDirection(); entrance_directions = rol4(entrance_directions, tile_direction); @@ -2775,7 +2775,7 @@ static int32_t ride_check_station_length(CoordsXYE* input, CoordsXYE* output) do { const auto& ted = GetTrackElementDescriptor(output->element->AsTrack()->GetTrackType()); - if (ted.TrackSequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN) + if (ted.SequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN) { num_station_elements++; last_good_station = *output; @@ -2823,7 +2823,7 @@ static bool ride_check_start_and_end_is_station(CoordsXYE* input) track_get_back(input, &trackBack); auto trackType = trackBack.element->AsTrack()->GetTrackType(); const auto* ted = &GetTrackElementDescriptor(trackType); - if (!(ted->TrackSequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) + if (!(ted->SequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) { return false; } @@ -2833,7 +2833,7 @@ static bool ride_check_start_and_end_is_station(CoordsXYE* input) track_get_front(input, &trackFront); trackType = trackFront.element->AsTrack()->GetTrackType(); ted = &GetTrackElementDescriptor(trackType); - if (!(ted->TrackSequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) + if (!(ted->SequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) { return false; } @@ -3545,7 +3545,7 @@ static bool ride_initialise_cable_lift_track(Ride* ride, bool isApplying) continue; const auto& ted = GetTrackElementDescriptor(tileElement->AsTrack()->GetTrackType()); - if (!(ted.TrackSequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) + if (!(ted.SequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) { continue; } @@ -3778,7 +3778,7 @@ TrackElement* Ride::GetOriginElement(StationIndex stationIndex) const auto* trackElement = tileElement->AsTrack(); const auto& ted = GetTrackElementDescriptor(trackElement->GetTrackType()); - if (!(ted.TrackSequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) + if (!(ted.SequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) continue; if (trackElement->GetRideIndex() == id) @@ -4885,7 +4885,7 @@ static int32_t ride_get_track_length(Ride* ride) trackType = tileElement->AsTrack()->GetTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); - if (!(ted.TrackSequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) + if (!(ted.SequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) continue; if (tileElement->GetBaseZ() != trackStart.z) diff --git a/src/openrct2/ride/RideConstruction.cpp b/src/openrct2/ride/RideConstruction.cpp index 0eae6e5656..de5f99dfd3 100644 --- a/src/openrct2/ride/RideConstruction.cpp +++ b/src/openrct2/ride/RideConstruction.cpp @@ -1255,7 +1255,7 @@ CoordsXYZD ride_get_entrance_or_exit_position_from_screen_position(const ScreenC if (info.Element->AsTrack()->GetRideIndex() == gRideEntranceExitPlaceRideIndex) { const auto& ted = GetTrackElementDescriptor(info.Element->AsTrack()->GetTrackType()); - if (ted.TrackSequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN) + if (ted.SequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN) { if (info.Element->AsTrack()->GetTrackType() == TrackElemType::Maze) { @@ -1346,7 +1346,7 @@ CoordsXYZD ride_get_entrance_or_exit_position_from_screen_position(const ScreenC int32_t eax = (entranceExitCoords.direction + 2 - tileElement->GetDirection()) & TILE_ELEMENT_DIRECTION_MASK; const auto& ted = GetTrackElementDescriptor(tileElement->AsTrack()->GetTrackType()); - if (ted.TrackSequenceProperties[tileElement->AsTrack()->GetSequenceIndex()] & (1 << eax)) + if (ted.SequenceProperties[tileElement->AsTrack()->GetSequenceIndex()] & (1 << eax)) { entranceExitCoords.direction = direction_reverse(entranceExitCoords.direction); gRideEntranceExitPlaceDirection = entranceExitCoords.direction; @@ -1476,7 +1476,7 @@ void sub_6CB945(Ride* ride) continue; ted = &GetTrackElementDescriptor(tileElement->AsTrack()->GetTrackType()); - if (!(ted->TrackSequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) + if (!(ted->SequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) continue; trackFound = true; @@ -1521,7 +1521,7 @@ void sub_6CB945(Ride* ride) continue; ted = &GetTrackElementDescriptor(tileElement->AsTrack()->GetTrackType()); - if (!(ted->TrackSequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) + if (!(ted->SequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) continue; trackFound = true; @@ -1617,7 +1617,7 @@ void sub_6CB945(Ride* ride) Direction direction = (tileElement->GetDirection() - direction_reverse(trackElement->GetDirection())) & 3; ted = &GetTrackElementDescriptor(trackType); - if (!(ted->TrackSequenceProperties[trackSequence] & (1 << direction))) + if (!(ted->SequenceProperties[trackSequence] & (1 << direction))) { continue; } diff --git a/src/openrct2/ride/TrackData.cpp b/src/openrct2/ride/TrackData.cpp index 4777b5faf9..f30a130642 100644 --- a/src/openrct2/ride/TrackData.cpp +++ b/src/openrct2/ride/TrackData.cpp @@ -5148,14 +5148,14 @@ namespace OpenRCT2 desc.CurveChain = gTrackCurveChain[i]; desc.Flags = TrackFlags[i]; desc.HeightMarkerPositions = TrackHeightMarkerPositions[i]; - desc.MirrorMap = TrackElementMirrorMap[i]; + desc.MirrorElement = TrackElementMirrorMap[i]; desc.PieceLength = TrackPieceLengths[i]; - desc.Pricing = TrackPricing[i]; + desc.Price = TrackPricing[i]; for (uint8_t j = 0; j < MaxSequencesPerPiece; j++) { desc.SequenceElementAllowedWallEdges[j] = TrackSequenceElementAllowedWallEdges[i][j]; - desc.TrackSequenceProperties[j] = TrackSequenceProperties[i][j]; + desc.SequenceProperties[j] = TrackSequenceProperties[i][j]; } _trackElementDescriptors.push_back(desc); } diff --git a/src/openrct2/ride/TrackData.h b/src/openrct2/ride/TrackData.h index 0b43a74426..4cd3705355 100644 --- a/src/openrct2/ride/TrackData.h +++ b/src/openrct2/ride/TrackData.h @@ -63,13 +63,13 @@ struct TrackElementDescriptor uint8_t PieceLength; track_curve_chain CurveChain; track_type_t AlternativeType; - money32 Pricing; - track_type_t MirrorMap; + money32 Price; + track_type_t MirrorElement; uint32_t HeightMarkerPositions; uint16_t Flags; std::array SequenceElementAllowedWallEdges; - std::array TrackSequenceProperties; + std::array SequenceProperties; }; namespace OpenRCT2 diff --git a/src/openrct2/ride/TrackDesign.cpp b/src/openrct2/ride/TrackDesign.cpp index e2144e571e..e6394da8fb 100644 --- a/src/openrct2/ride/TrackDesign.cpp +++ b/src/openrct2/ride/TrackDesign.cpp @@ -771,7 +771,7 @@ static void track_design_mirror_ride(TrackDesign* td6) for (auto& track : td6->track_elements) { const auto& ted = GetTrackElementDescriptor(track.type); - track.type = ted.MirrorMap; + track.type = ted.MirrorElement; } for (auto& entrance : td6->entrance_elements) diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index 4c9057d2d3..e1cbfce103 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -7934,7 +7934,7 @@ void Vehicle::Sub6DBF3E() auto trackType = GetTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); - if (!(ted.TrackSequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) + if (!(ted.SequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) { return; } @@ -9210,7 +9210,7 @@ loc_6DCE02: { auto trackType = GetTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); - if (!(ted.TrackSequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) + if (!(ted.SequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN)) { return; } diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index 92bf23ead8..1dceddad05 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -882,14 +882,14 @@ static void loc_6A6D7E( const auto trackType = tileElement->AsTrack()->GetTrackType(); const uint8_t trackSequence = tileElement->AsTrack()->GetSequenceIndex(); const auto& ted = GetTrackElementDescriptor(trackType); - if (!(ted.TrackSequenceProperties[trackSequence] & TRACK_SEQUENCE_FLAG_CONNECTS_TO_PATH)) + if (!(ted.SequenceProperties[trackSequence] & TRACK_SEQUENCE_FLAG_CONNECTS_TO_PATH)) { return; } uint16_t dx = direction_reverse( (direction - tileElement->GetDirection()) & TILE_ELEMENT_DIRECTION_MASK); - if (!(ted.TrackSequenceProperties[trackSequence] & (1 << dx))) + if (!(ted.SequenceProperties[trackSequence] & (1 << dx))) { return; } @@ -966,12 +966,12 @@ static void loc_6A6C85( const auto trackType = tileElementPos.element->AsTrack()->GetTrackType(); const uint8_t trackSequence = tileElementPos.element->AsTrack()->GetSequenceIndex(); const auto& ted = GetTrackElementDescriptor(trackType); - if (!(ted.TrackSequenceProperties[trackSequence] & TRACK_SEQUENCE_FLAG_CONNECTS_TO_PATH)) + if (!(ted.SequenceProperties[trackSequence] & TRACK_SEQUENCE_FLAG_CONNECTS_TO_PATH)) { return; } uint16_t dx = (direction - tileElementPos.element->GetDirection()) & TILE_ELEMENT_DIRECTION_MASK; - if (!(ted.TrackSequenceProperties[trackSequence] & (1 << dx))) + if (!(ted.SequenceProperties[trackSequence] & (1 << dx))) { return; } @@ -2108,10 +2108,10 @@ bool tile_element_wants_path_connection_towards(const TileCoordsXYZD& coords, co const auto trackType = tileElement->AsTrack()->GetTrackType(); const uint8_t trackSequence = tileElement->AsTrack()->GetSequenceIndex(); const auto& ted = GetTrackElementDescriptor(trackType); - if (ted.TrackSequenceProperties[trackSequence] & TRACK_SEQUENCE_FLAG_CONNECTS_TO_PATH) + if (ted.SequenceProperties[trackSequence] & TRACK_SEQUENCE_FLAG_CONNECTS_TO_PATH) { uint16_t dx = ((coords.direction - tileElement->GetDirection()) & TILE_ELEMENT_DIRECTION_MASK); - if (ted.TrackSequenceProperties[trackSequence] & (1 << dx)) + if (ted.SequenceProperties[trackSequence] & (1 << dx)) { // Track element has the flags required for the given direction return true;