diff --git a/src/openrct2-ui/interface/ViewportInteraction.cpp b/src/openrct2-ui/interface/ViewportInteraction.cpp index 0d16a018cb..b6cac08993 100644 --- a/src/openrct2-ui/interface/ViewportInteraction.cpp +++ b/src/openrct2-ui/interface/ViewportInteraction.cpp @@ -357,7 +357,7 @@ namespace OpenRCT2::Ui } ft.Add(stringId); } - else if (tileElement->asTrack()->IsStation()) + else if (tileElement->asTrack()->isStation()) { StringId stringId; if (ride->numStations > 1) @@ -392,7 +392,7 @@ namespace OpenRCT2::Ui if (tileElement->getType() == TileElementType::entrance) stationIndex = tileElement->asEntrance()->getStationIndex().ToUnderlying(); else - stationIndex = tileElement->asTrack()->GetStationIndex().ToUnderlying(); + stationIndex = tileElement->asTrack()->getStationIndex().ToUnderlying(); for (int32_t i = stationIndex; i >= 0; i--) if (ride->getStations()[i].Start.IsNull()) diff --git a/src/openrct2-ui/ride/Construction.cpp b/src/openrct2-ui/ride/Construction.cpp index f5e09ecf0f..eabcf998a4 100644 --- a/src/openrct2-ui/ride/Construction.cpp +++ b/src/openrct2-ui/ride/Construction.cpp @@ -380,18 +380,18 @@ namespace OpenRCT2 if (info.Element->getType() == TileElementType::track) { const auto* trackElement = info.Element->asTrack(); - if (trackElement->GetRideIndex() == gRideEntranceExitPlaceRideIndex) + if (trackElement->getRideIndex() == gRideEntranceExitPlaceRideIndex) { - const auto& ted = GetTrackElementDescriptor(trackElement->GetTrackType()); + const auto& ted = GetTrackElementDescriptor(trackElement->getTrackType()); if (ted.sequenceData.sequences[0].flags.has(SequenceFlag::trackOrigin)) { - if (trackElement->GetTrackType() == TrackElemType::maze) + if (trackElement->getTrackType() == TrackElemType::maze) { gRideEntranceExitPlaceStationIndex = StationIndex::FromUnderlying(0); } else { - gRideEntranceExitPlaceStationIndex = trackElement->GetStationIndex(); + gRideEntranceExitPlaceStationIndex = trackElement->getStationIndex(); } } } @@ -455,9 +455,9 @@ namespace OpenRCT2 { if (trackElement->getBaseZ() != stationBaseZ) continue; - if (trackElement->GetRideIndex() != gRideEntranceExitPlaceRideIndex) + if (trackElement->getRideIndex() != gRideEntranceExitPlaceRideIndex) continue; - if (trackElement->GetTrackType() == TrackElemType::maze) + if (trackElement->getTrackType() == TrackElemType::maze) { // if it's a maze, it can place the entrance and exit immediately entranceExitCoords.direction = DirectionReverse(entranceExitCoords.direction); @@ -467,12 +467,12 @@ namespace OpenRCT2 // if it's not a maze, the sequence properties for the TrackElement must be found to determine if an // entrance can be placed on that side - gRideEntranceExitPlaceStationIndex = trackElement->GetStationIndex(); + gRideEntranceExitPlaceStationIndex = trackElement->getStationIndex(); // get the ride entrance's side relative to the TrackElement Direction direction = (DirectionReverse(entranceExitCoords.direction) - trackElement->getDirection()) & 3; - const auto& ted = GetTrackElementDescriptor(trackElement->GetTrackType()); - auto connectionSides = ted.sequenceData.sequences[trackElement->GetSequenceIndex()] + const auto& ted = GetTrackElementDescriptor(trackElement->getTrackType()); + auto connectionSides = ted.sequenceData.sequences[trackElement->getSequenceIndex()] .getEntranceConnectionSides(); if (connectionSides & (1 << direction)) { diff --git a/src/openrct2-ui/windows/Map.cpp b/src/openrct2-ui/windows/Map.cpp index 1fef5390a3..e092e5d04d 100644 --- a/src/openrct2-ui/windows/Map.cpp +++ b/src/openrct2-ui/windows/Map.cpp @@ -940,7 +940,7 @@ namespace OpenRCT2::Ui::Windows } case TileElementType::track: { - Ride* targetRide = GetRide(tileElement->asTrack()->GetRideIndex()); + Ride* targetRide = GetRide(tileElement->asTrack()->getRideIndex()); if (targetRide != nullptr) { const auto& colourKey = targetRide->getRideTypeDescriptor().ColourKey; diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index 34ddcdc853..f7409982cb 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -1455,7 +1455,7 @@ namespace OpenRCT2::Ui::Windows if (it.element->getType() != TileElementType::track) continue; - if (it.element->asTrack()->GetRideIndex() != ride.id) + if (it.element->asTrack()->getRideIndex() != ride.id) continue; auto location = TileCoordsXY(it.x, it.y).ToCoordsXY(); @@ -4282,15 +4282,15 @@ namespace OpenRCT2::Ui::Windows return; if (info.Element->getType() != TileElementType::track) return; - if (info.Element->asTrack()->GetRideIndex() != rideId) + if (info.Element->asTrack()->getRideIndex() != rideId) return; - if (info.Element->asTrack()->GetColourScheme() == newColourScheme) + if (info.Element->asTrack()->getColourScheme() == newColourScheme) return; auto z = info.Element->getBaseZ(); auto direction = info.Element->getDirection(); auto gameAction = GameActions::RideSetColourSchemeAction( - CoordsXYZD{ info.Loc, z, direction }, info.Element->asTrack()->GetTrackType(), newColourScheme); + CoordsXYZD{ info.Loc, z, direction }, info.Element->asTrack()->getTrackType(), newColourScheme); GameActions::Execute(&gameAction, getGameState()); } @@ -7314,11 +7314,11 @@ namespace OpenRCT2::Ui::Windows { // Open ride window in station view auto trackElement = tileElement->asTrack(); - auto trackType = trackElement->GetTrackType(); + auto trackType = trackElement->getTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); if (ted.sequenceData.sequences[0].flags.has(SequenceFlag::trackOrigin)) { - auto stationIndex = trackElement->GetStationIndex(); + auto stationIndex = trackElement->getStationIndex(); return WindowRideOpenStation(*ride, stationIndex); } } diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index 479468d0fb..50bf8af528 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -2367,7 +2367,7 @@ namespace OpenRCT2::Ui::Windows { *newCoords = { trackBeginEnd.begin_x, trackBeginEnd.begin_y, trackBeginEnd.begin_z }; direction = trackBeginEnd.begin_direction; - type = trackBeginEnd.begin_element->asTrack()->GetTrackType(); + type = trackBeginEnd.begin_element->asTrack()->getTrackType(); _gotoStartPlacementMode = false; } else if (trackBlockGetNext(&inputElement, &outputElement, &newCoords->z, &direction)) @@ -2375,7 +2375,7 @@ namespace OpenRCT2::Ui::Windows newCoords->x = outputElement.x; newCoords->y = outputElement.y; direction = outputElement.element->getDirection(); - type = outputElement.element->asTrack()->GetTrackType(); + type = outputElement.element->asTrack()->getTrackType(); _gotoStartPlacementMode = false; } else @@ -2391,7 +2391,7 @@ namespace OpenRCT2::Ui::Windows return; } - const auto& ted = GetTrackElementDescriptor(tileElement->asTrack()->GetTrackType()); + const auto& ted = GetTrackElementDescriptor(tileElement->asTrack()->getTrackType()); newCoords->z = (tileElement->getBaseZ()) - ted.sequenceData.sequences[0].clearance.z; _gotoStartPlacementMode = true; } @@ -2516,7 +2516,7 @@ namespace OpenRCT2::Ui::Windows != std::nullopt) { auto trackSetBrakeSpeed = GameActions::TrackSetBrakeSpeedAction( - _currentTrackBegin, tileElement->asTrack()->GetTrackType(), brakesSpeed); + _currentTrackBegin, tileElement->asTrack()->getTrackType(), brakesSpeed); trackSetBrakeSpeed.SetCallback([](const GameActions::GameAction* ga, const GameActions::Result* result) { WindowRideConstructionUpdateActiveElements(); }); @@ -2703,15 +2703,15 @@ namespace OpenRCT2::Ui::Windows // Setup non changing parts of the temporary track tile element tempTrackTileElement.setType(TileElementType::track); tempTrackTileElement.setDirection(trackDirection); - tempTrackTileElement.asTrack()->SetHasChain(liftHillAndInvertedState.has(LiftHillAndInverted::liftHill)); + tempTrackTileElement.asTrack()->setHasChain(liftHillAndInvertedState.has(LiftHillAndInverted::liftHill)); tempTrackTileElement.setLastForTile(true); - tempTrackTileElement.asTrack()->SetTrackType(trackType); - tempTrackTileElement.asTrack()->SetRideType(currentRide->type); - tempTrackTileElement.asTrack()->SetHasCableLift(false); - tempTrackTileElement.asTrack()->SetInverted(liftHillAndInvertedState.has(LiftHillAndInverted::inverted)); - tempTrackTileElement.asTrack()->SetColourScheme(_currentColourScheme); + tempTrackTileElement.asTrack()->setTrackType(trackType); + tempTrackTileElement.asTrack()->setRideType(currentRide->type); + tempTrackTileElement.asTrack()->setHasCableLift(false); + tempTrackTileElement.asTrack()->setInverted(liftHillAndInvertedState.has(LiftHillAndInverted::inverted)); + tempTrackTileElement.asTrack()->setColourScheme(_currentColourScheme); // Skipping seat rotation, should not be necessary for a temporary piece. - tempTrackTileElement.asTrack()->SetRideIndex(rideIndex); + tempTrackTileElement.asTrack()->setRideIndex(rideIndex); const auto& ted = GetTrackElementDescriptor(trackType); const auto* rideEntry = currentRide->getRideEntry(); @@ -2751,7 +2751,7 @@ namespace OpenRCT2::Ui::Windows tempTrackTileElement.setOccupiedQuadrants(quarterTile.GetBaseQuarterOccupied()); tempTrackTileElement.setBaseZ(baseZ); tempTrackTileElement.setClearanceZ(clearanceZ); - tempTrackTileElement.asTrack()->SetSequenceIndex(i); + tempTrackTileElement.asTrack()->setSequenceIndex(i); // Draw this map tile TileElementPaintSetup(*session, coords, true); @@ -2915,7 +2915,7 @@ namespace OpenRCT2::Ui::Windows _currentTrackBegin.y = next_track.y; _currentTrackBegin.z = trackPos.z; _currentTrackPieceDirection = next_track.element->getDirection(); - _currentTrackPieceType = next_track.element->asTrack()->GetTrackType(); + _currentTrackPieceType = next_track.element->asTrack()->getTrackType(); _currentTrackSelectionFlags.clearAll(); _rideConstructionState = RideConstructionState::selected; _rideConstructionNextArrowPulse = 0; @@ -2962,7 +2962,7 @@ namespace OpenRCT2::Ui::Windows _currentTrackBegin.y = trackBeginEnd.begin_y; _currentTrackBegin.z = trackBeginEnd.begin_z; _currentTrackPieceDirection = trackBeginEnd.begin_direction; - _currentTrackPieceType = trackBeginEnd.begin_element->asTrack()->GetTrackType(); + _currentTrackPieceType = trackBeginEnd.begin_element->asTrack()->getTrackType(); _currentTrackSelectionFlags.clearAll(); _rideConstructionState = RideConstructionState::selected; _rideConstructionNextArrowPulse = 0; @@ -3127,11 +3127,11 @@ namespace OpenRCT2::Ui::Windows &tileElement, {}) != std::nullopt) { - _selectedTrackType = tileElement->asTrack()->GetTrackType(); - if (trackTypeHasSpeedSetting(tileElement->asTrack()->GetTrackType())) - _currentBrakeSpeed = tileElement->asTrack()->GetBrakeBoosterSpeed(); - _currentColourScheme = static_cast(tileElement->asTrack()->GetColourScheme()); - _currentSeatRotationAngle = tileElement->asTrack()->GetSeatRotation(); + _selectedTrackType = tileElement->asTrack()->getTrackType(); + if (trackTypeHasSpeedSetting(tileElement->asTrack()->getTrackType())) + _currentBrakeSpeed = tileElement->asTrack()->getBrakeBoosterSpeed(); + _currentColourScheme = static_cast(tileElement->asTrack()->getColourScheme()); + _currentSeatRotationAngle = tileElement->asTrack()->getSeatRotation(); } } @@ -5037,8 +5037,8 @@ namespace OpenRCT2::Ui::Windows CoordsXYE next_track; if (trackBlockGetNextFromZero({ x, y, z }, *ride, direction, &next_track, &z, &direction, true)) { - auto trackType = next_track.element->asTrack()->GetTrackType(); - int32_t trackSequence = next_track.element->asTrack()->GetSequenceIndex(); + auto trackType = next_track.element->asTrack()->getTrackType(); + int32_t trackSequence = next_track.element->asTrack()->getSequenceIndex(); auto trackRemoveAction = GameActions::TrackRemoveAction{ trackType, trackSequence, { next_track.x, next_track.y, z, static_cast(direction) } }; diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index 2409e1b54e..85297151da 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -666,18 +666,18 @@ namespace OpenRCT2::Ui::Windows case WIDX_TRACK_CHECK_CHAIN_LIFT: { bool entireTrackBlock = isWidgetPressed(WIDX_TRACK_CHECK_APPLY_TO_ALL); - bool newLift = !tileElement->asTrack()->HasChain(); + bool newLift = !tileElement->asTrack()->hasChain(); TrackBlockSetLift(windowTileInspectorSelectedIndex, entireTrackBlock, newLift); break; } case WIDX_TRACK_CHECK_BRAKE_CLOSED: - TrackSetBrakeClosed(windowTileInspectorSelectedIndex, !tileElement->asTrack()->IsBrakeClosed()); + TrackSetBrakeClosed(windowTileInspectorSelectedIndex, !tileElement->asTrack()->isBrakeClosed()); break; case WIDX_TRACK_CHECK_IS_INDESTRUCTIBLE: TrackSetIndestructible( - windowTileInspectorSelectedIndex, !tileElement->asTrack()->IsIndestructible()); + windowTileInspectorSelectedIndex, !tileElement->asTrack()->isIndestructible()); break; } // switch widget index break; @@ -1276,7 +1276,7 @@ namespace OpenRCT2::Ui::Windows void onDrawTrack(RenderTarget& rt, ScreenCoordsXY screenCoords, const TrackElement& trackEl) { - RideId id = trackEl.GetRideIndex(); + RideId id = trackEl.getRideIndex(); auto rideTile = GetRide(id); // Ride ID @@ -1293,22 +1293,22 @@ namespace OpenRCT2::Ui::Windows } // Ride type. Individual pieces may be of a different ride type from the ride it belongs to. - const auto& rtd = GetRideTypeDescriptor(trackEl.GetRideType()); + const auto& rtd = GetRideTypeDescriptor(trackEl.getRideType()); ft = Formatter(); ft.Add(rtd.Naming.Name); drawText(rt, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_TRACK_RIDE_TYPE, ft, { colours[1] }); // Track ft = Formatter(); - ft.Add(trackEl.GetTrackType()); + ft.Add(trackEl.getTrackType()); drawText(rt, screenCoords + ScreenCoordsXY{ 0, 33 }, STR_TILE_INSPECTOR_TRACK_PIECE_ID, ft, { colours[1] }); ft = Formatter(); - ft.Add(trackEl.GetSequenceIndex()); + ft.Add(trackEl.getSequenceIndex()); drawText(rt, screenCoords + ScreenCoordsXY{ 0, 44 }, STR_TILE_INSPECTOR_TRACK_SEQUENCE, ft, { colours[1] }); - if (trackEl.IsStation()) + if (trackEl.isStation()) { - auto stationIndex = trackEl.GetStationIndex(); + auto stationIndex = trackEl.getStationIndex(); ft = Formatter(); ft.Add(STR_COMMA16); ft.Add(stationIndex.ToUnderlying()); @@ -1324,7 +1324,7 @@ namespace OpenRCT2::Ui::Windows } ft = Formatter(); - ft.Add(ColourSchemeNames[trackEl.GetColourScheme()]); + ft.Add(ColourSchemeNames[trackEl.getColourScheme()]); drawText(rt, screenCoords + ScreenCoordsXY{ 0, 66 }, STR_TILE_INSPECTOR_COLOUR_SCHEME, ft, { colours[1] }); // Properties @@ -2281,12 +2281,12 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_TRACK_CHECK_IS_INDESTRUCTIBLE].moveTo(PropertyRowCol(propertiesAnchor, 4, 0)); setCheckboxValue(WIDX_TRACK_CHECK_APPLY_TO_ALL, _applyToAll); - setCheckboxValue(WIDX_TRACK_CHECK_CHAIN_LIFT, tileElement->asTrack()->HasChain()); - setCheckboxValue(WIDX_TRACK_CHECK_BRAKE_CLOSED, tileElement->asTrack()->IsBrakeClosed()); - widgets[WIDX_TRACK_CHECK_BRAKE_CLOSED].content = tileElement->asTrack()->IsBlockStart() + setCheckboxValue(WIDX_TRACK_CHECK_CHAIN_LIFT, tileElement->asTrack()->hasChain()); + setCheckboxValue(WIDX_TRACK_CHECK_BRAKE_CLOSED, tileElement->asTrack()->isBrakeClosed()); + widgets[WIDX_TRACK_CHECK_BRAKE_CLOSED].content = tileElement->asTrack()->isBlockStart() ? STR_TILE_INSPECTOR_TRACK_BLOCK_BRAKE : STR_TILE_INSPECTOR_TRACK_BRAKE_CLOSED; - setCheckboxValue(WIDX_TRACK_CHECK_IS_INDESTRUCTIBLE, tileElement->asTrack()->IsIndestructible()); + setCheckboxValue(WIDX_TRACK_CHECK_IS_INDESTRUCTIBLE, tileElement->asTrack()->isIndestructible()); break; case TileElementType::smallScenery: diff --git a/src/openrct2/actions/ride/MazePlaceTrackAction.cpp b/src/openrct2/actions/ride/MazePlaceTrackAction.cpp index bf284bc3bd..5fa7e6f97f 100644 --- a/src/openrct2/actions/ride/MazePlaceTrackAction.cpp +++ b/src/openrct2/actions/ride/MazePlaceTrackAction.cpp @@ -190,10 +190,10 @@ namespace OpenRCT2::GameActions Guard::Assert(trackElement != nullptr); trackElement->setClearanceZ(clearanceHeight); - trackElement->SetTrackType(TrackElemType::maze); - trackElement->SetRideType(ride->type); - trackElement->SetRideIndex(_rideIndex); - trackElement->SetMazeEntry(_mazeEntry); + trackElement->setTrackType(TrackElemType::maze); + trackElement->setRideType(ride->type); + trackElement->setRideIndex(_rideIndex); + trackElement->setMazeEntry(_mazeEntry); trackElement->setGhost(flags.has(CommandFlag::ghost)); MapInvalidateTileFull(startLoc); diff --git a/src/openrct2/actions/ride/MazeSetTrackAction.cpp b/src/openrct2/actions/ride/MazeSetTrackAction.cpp index cdbf8a1bbc..2240fb49fb 100644 --- a/src/openrct2/actions/ride/MazeSetTrackAction.cpp +++ b/src/openrct2/actions/ride/MazeSetTrackAction.cpp @@ -237,10 +237,10 @@ namespace OpenRCT2::GameActions Guard::Assert(trackElement != nullptr); trackElement->setClearanceZ(_loc.z + kMazeClearanceHeight); - trackElement->SetTrackType(TrackElemType::maze); - trackElement->SetRideType(ride->type); - trackElement->SetRideIndex(_rideIndex); - trackElement->SetMazeEntry(0xFFFF); + trackElement->setTrackType(TrackElemType::maze); + trackElement->setRideType(ride->type); + trackElement->setRideIndex(_rideIndex); + trackElement->setMazeEntry(0xFFFF); trackElement->setGhost(flags.has(CommandFlag::ghost)); tileElement = trackElement->as(); @@ -263,12 +263,12 @@ namespace OpenRCT2::GameActions { uint8_t segmentOffset = MazeGetSegmentBit(_loc); - tileElement->asTrack()->MazeEntrySubtract(1 << segmentOffset); + tileElement->asTrack()->mazeEntrySubtract(1 << segmentOffset); if (!_initialPlacement) { segmentOffset = kByte993CE9[(_loc.direction + segmentOffset)]; - tileElement->asTrack()->MazeEntrySubtract(1 << segmentOffset); + tileElement->asTrack()->mazeEntrySubtract(1 << segmentOffset); uint8_t temp_edx = kByte993CFC[segmentOffset]; if (temp_edx != 0xFF) @@ -280,11 +280,11 @@ namespace OpenRCT2::GameActions if (previousTileElement != nullptr) { - previousTileElement->asTrack()->MazeEntrySubtract(1 << temp_edx); + previousTileElement->asTrack()->mazeEntrySubtract(1 << temp_edx); } else { - tileElement->asTrack()->MazeEntryAdd(1 << segmentOffset); + tileElement->asTrack()->mazeEntryAdd(1 << segmentOffset); } } } @@ -315,16 +315,16 @@ namespace OpenRCT2::GameActions uint32_t segmentBit = MazeGetSegmentBit(previousSegment); - tileElement->asTrack()->MazeEntryAdd(1 << segmentBit); + tileElement->asTrack()->mazeEntryAdd(1 << segmentBit); segmentBit--; - tileElement->asTrack()->MazeEntryAdd(1 << segmentBit); + tileElement->asTrack()->mazeEntryAdd(1 << segmentBit); segmentBit = (segmentBit - 4) & 0x0F; - tileElement->asTrack()->MazeEntryAdd(1 << segmentBit); + tileElement->asTrack()->mazeEntryAdd(1 << segmentBit); segmentBit = (segmentBit + 3) & 0x0F; do { - tileElement->asTrack()->MazeEntryAdd(1 << segmentBit); + tileElement->asTrack()->mazeEntryAdd(1 << segmentBit); uint32_t direction1 = kByte993D0C[segmentBit]; auto nextElementLoc = previousSegment.ToTileStart() + CoordsDirectionDelta[direction1]; @@ -335,7 +335,7 @@ namespace OpenRCT2::GameActions if (tmp_tileElement != nullptr) { uint8_t edx11 = kByte993CFC[segmentBit]; - tmp_tileElement->asTrack()->MazeEntryAdd(1 << (edx11)); + tmp_tileElement->asTrack()->mazeEntryAdd(1 << (edx11)); } segmentBit--; @@ -346,7 +346,7 @@ namespace OpenRCT2::GameActions MapInvalidateTile({ _loc.ToTileStart(), tileElement->getBaseZ(), tileElement->getClearanceZ() }); - if ((tileElement->asTrack()->GetMazeEntry() & 0x8888) == 0x8888) + if ((tileElement->asTrack()->getMazeEntry() & 0x8888) == 0x8888) { TileElementRemove(tileElement); ride->validateStations(); diff --git a/src/openrct2/actions/ride/RideDemolishAction.cpp b/src/openrct2/actions/ride/RideDemolishAction.cpp index 1c1e04e4c6..4caada4462 100644 --- a/src/openrct2/actions/ride/RideDemolishAction.cpp +++ b/src/openrct2/actions/ride/RideDemolishAction.cpp @@ -216,15 +216,15 @@ namespace OpenRCT2::GameActions continue; auto* trackElement = tileElement->asTrack(); - if (trackElement->GetRideIndex() != _rideIndex) + if (trackElement->getRideIndex() != _rideIndex) continue; const auto location = CoordsXYZD(tileCoords, trackElement->getBaseZ(), trackElement->getDirection()); - const auto type = trackElement->GetTrackType(); + const auto type = trackElement->getTrackType(); if (type != TrackElemType::maze) { - auto trackRemoveAction = TrackRemoveAction(type, trackElement->GetSequenceIndex(), location); + auto trackRemoveAction = TrackRemoveAction(type, trackElement->getSequenceIndex(), location); trackRemoveAction.SetFlags({ CommandFlag::noSpend }); auto removeRes = ExecuteNested(&trackRemoveAction, gameState); diff --git a/src/openrct2/actions/ride/RideSetVisibilityAction.cpp b/src/openrct2/actions/ride/RideSetVisibilityAction.cpp index aa41d71bcc..4e55bf080f 100644 --- a/src/openrct2/actions/ride/RideSetVisibilityAction.cpp +++ b/src/openrct2/actions/ride/RideSetVisibilityAction.cpp @@ -60,7 +60,7 @@ namespace OpenRCT2::GameActions const TileCoordsXY tileCoords{ x, y }; for (auto* trackElement : TileElementsView(tileCoords)) { - if (trackElement->GetRideIndex() == _rideIndex) + if (trackElement->getRideIndex() == _rideIndex) { trackElement->setInvisible(_visibility == RideSetVisibilityType::invisible); MapInvalidateTileFull(tileCoords.ToCoordsXY()); diff --git a/src/openrct2/actions/scenery/WallPlaceAction.cpp b/src/openrct2/actions/scenery/WallPlaceAction.cpp index f42e090bbd..bec7624c7d 100644 --- a/src/openrct2/actions/scenery/WallPlaceAction.cpp +++ b/src/openrct2/actions/scenery/WallPlaceAction.cpp @@ -406,13 +406,13 @@ namespace OpenRCT2::GameActions bool WallPlaceAction::WallCheckObstructionWithTrack( const WallSceneryEntry* wall, int32_t z0, TrackElement* trackElement, bool* wallAcrossTrack) const { - TrackElemType trackType = trackElement->GetTrackType(); + TrackElemType trackType = trackElement->getTrackType(); using namespace OpenRCT2::TrackMetadata; const auto& ted = GetTrackElementDescriptor(trackType); - int32_t sequence = trackElement->GetSequenceIndex(); + int32_t sequence = trackElement->getSequenceIndex(); int32_t direction = (_edge - trackElement->getDirection()) & kTileElementDirectionMask; - auto ride = GetRide(trackElement->GetRideIndex()); + auto ride = GetRide(trackElement->getRideIndex()); if (ride == nullptr) { return false; diff --git a/src/openrct2/actions/terraform/LandSetHeightAction.cpp b/src/openrct2/actions/terraform/LandSetHeightAction.cpp index 7426bb0c19..a7488ab979 100644 --- a/src/openrct2/actions/terraform/LandSetHeightAction.cpp +++ b/src/openrct2/actions/terraform/LandSetHeightAction.cpp @@ -264,7 +264,7 @@ namespace OpenRCT2::GameActions { for (auto* trackElement : TileElementsView(_coords)) { - RideId rideIndex = trackElement->GetRideIndex(); + RideId rideIndex = trackElement->getRideIndex(); auto ride = GetRide(rideIndex); if (ride == nullptr) diff --git a/src/openrct2/actions/track/TrackPlaceAction.cpp b/src/openrct2/actions/track/TrackPlaceAction.cpp index fd78d6bcc1..ee4b27adc1 100644 --- a/src/openrct2/actions/track/TrackPlaceAction.cpp +++ b/src/openrct2/actions/track/TrackPlaceAction.cpp @@ -577,11 +577,11 @@ namespace OpenRCT2::GameActions trackElement->setClearanceZ(clearanceZ); trackElement->setDirection(_origin.direction); - trackElement->SetHasChain(_trackPlaceFlags.has(LiftHillAndInverted::liftHill)); - trackElement->SetSequenceIndex(blockIndex); - trackElement->SetRideIndex(_rideIndex); - trackElement->SetTrackType(_trackType); - trackElement->SetRideType(_rideType); + trackElement->setHasChain(_trackPlaceFlags.has(LiftHillAndInverted::liftHill)); + trackElement->setSequenceIndex(blockIndex); + trackElement->setRideIndex(_rideIndex); + trackElement->setTrackType(_trackType); + trackElement->setRideType(_rideType); trackElement->setGhost(GetFlags().has(CommandFlag::ghost)); switch (_trackType) @@ -594,31 +594,31 @@ namespace OpenRCT2::GameActions break; case TrackElemType::brakes: case TrackElemType::diagBrakes: - trackElement->SetBrakeClosed(true); + trackElement->setBrakeClosed(true); break; default: break; } if (trackTypeHasSpeedSetting(_trackType)) { - trackElement->SetBrakeBoosterSpeed(_brakeSpeed); + trackElement->setBrakeBoosterSpeed(_brakeSpeed); } if (rtd.flags.has(RtdFlag::hasLandscapeDoors)) { - trackElement->SetDoorAState(kLandEdgeDoorFrameClosed); - trackElement->SetDoorBState(kLandEdgeDoorFrameClosed); + trackElement->setDoorAState(kLandEdgeDoorFrameClosed); + trackElement->setDoorBState(kLandEdgeDoorFrameClosed); } else { - trackElement->SetSeatRotation(_seatRotation); + trackElement->setSeatRotation(_seatRotation); } if (_trackPlaceFlags.has(LiftHillAndInverted::inverted)) { - trackElement->SetInverted(true); + trackElement->setInverted(true); } - trackElement->SetColourScheme(static_cast(_colour)); + trackElement->setColourScheme(static_cast(_colour)); if (ted.sequenceData.sequences[0].flags.has(SequenceFlag::connectsToPath)) { diff --git a/src/openrct2/actions/track/TrackRemoveAction.cpp b/src/openrct2/actions/track/TrackRemoveAction.cpp index d4674c738e..584a3048c6 100644 --- a/src/openrct2/actions/track/TrackRemoveAction.cpp +++ b/src/openrct2/actions/track/TrackRemoveAction.cpp @@ -90,13 +90,13 @@ namespace OpenRCT2::GameActions if ((trackElement->getDirection()) != _origin.direction) continue; - if (trackElement->GetSequenceIndex() != _sequence) + if (trackElement->getSequenceIndex() != _sequence) continue; if (trackElement->isGhost() != isGhost) continue; - auto tileTrackType = normaliseTrackType(trackElement->GetTrackType()); + auto tileTrackType = normaliseTrackType(trackElement->getTrackType()); if (tileTrackType != comparableTrackType) continue; @@ -113,14 +113,14 @@ namespace OpenRCT2::GameActions return Result(Status::invalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_TRACK_ELEMENT_NOT_FOUND); } - if (foundElement->IsIndestructible()) + if (foundElement->isIndestructible()) { return Result( Status::disallowed, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_YOU_ARE_NOT_ALLOWED_TO_REMOVE_THIS_SECTION); } - RideId rideIndex = foundElement->GetRideIndex(); - const auto trackType = foundElement->GetTrackType(); + RideId rideIndex = foundElement->getRideIndex(); + const auto trackType = foundElement->getTrackType(); auto ride = GetRide(rideIndex); if (ride == nullptr) @@ -135,7 +135,7 @@ namespace OpenRCT2::GameActions return Result(Status::invalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_VALUE_OUT_OF_RANGE); } const auto& ted = GetTrackElementDescriptor(trackType); - auto sequenceIndex = foundElement->GetSequenceIndex(); + auto sequenceIndex = foundElement->getSequenceIndex(); if (sequenceIndex >= ted.sequenceData.numSequences) { LOG_ERROR("Track block %d not found for track type %d.", sequenceIndex, trackType); @@ -178,10 +178,10 @@ namespace OpenRCT2::GameActions if (trackElement->getDirection() != _origin.direction) continue; - if (trackElement->GetSequenceIndex() != i) + if (trackElement->getSequenceIndex() != i) continue; - if (trackElement->GetTrackType() != trackType) + if (trackElement->getTrackType() != trackType) continue; if (trackElement->isGhost() != isGhost) @@ -199,7 +199,7 @@ namespace OpenRCT2::GameActions return Result(Status::unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_TRACK_ELEMENT_NOT_FOUND); } - if (ted.sequenceData.sequences[0].flags.has(SequenceFlag::trackOrigin) && (foundElement->GetSequenceIndex() == 0)) + if (ted.sequenceData.sequences[0].flags.has(SequenceFlag::trackOrigin) && (foundElement->getSequenceIndex() == 0)) { const auto removeElementResult = TrackRemoveStationElement({ mapLoc, _origin.direction }, rideIndex, {}); if (!removeElementResult.Successful) @@ -259,13 +259,13 @@ namespace OpenRCT2::GameActions if ((trackElement->getDirection()) != _origin.direction) continue; - if (trackElement->GetSequenceIndex() != _sequence) + if (trackElement->getSequenceIndex() != _sequence) continue; if (trackElement->isGhost() != isGhost) continue; - auto tileTrackType = normaliseTrackType(trackElement->GetTrackType()); + auto tileTrackType = normaliseTrackType(trackElement->getTrackType()); if (tileTrackType != comparableTrackType) continue; @@ -282,9 +282,9 @@ namespace OpenRCT2::GameActions return Result(Status::invalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_TRACK_ELEMENT_NOT_FOUND); } - RideId rideIndex = foundElement->GetRideIndex(); - const auto trackType = foundElement->GetTrackType(); - bool isLiftHill = foundElement->HasChain(); + RideId rideIndex = foundElement->getRideIndex(); + const auto trackType = foundElement->getTrackType(); + bool isLiftHill = foundElement->hasChain(); auto ride = GetRide(rideIndex); if (ride == nullptr) @@ -293,7 +293,7 @@ namespace OpenRCT2::GameActions return Result(Status::invalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_RIDE_NOT_FOUND); } const auto& ted = GetTrackElementDescriptor(trackType); - auto sequenceIndex = foundElement->GetSequenceIndex(); + auto sequenceIndex = foundElement->getSequenceIndex(); if (sequenceIndex >= ted.sequenceData.numSequences) { LOG_ERROR("Track block %d not found for track type %d.", sequenceIndex, trackType); @@ -333,10 +333,10 @@ namespace OpenRCT2::GameActions if (trackElement->getDirection() != _origin.direction) continue; - if (trackElement->GetSequenceIndex() != i) + if (trackElement->getSequenceIndex() != i) continue; - if (trackElement->GetTrackType() != trackType) + if (trackElement->getTrackType() != trackType) continue; if (trackElement->isGhost() != isGhost) @@ -354,7 +354,7 @@ namespace OpenRCT2::GameActions return Result(Status::unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_TRACK_ELEMENT_NOT_FOUND); } - if (ted.sequenceData.sequences[0].flags.has(SequenceFlag::trackOrigin) && (foundElement->GetSequenceIndex() == 0)) + if (ted.sequenceData.sequences[0].flags.has(SequenceFlag::trackOrigin) && (foundElement->getSequenceIndex() == 0)) { const auto removeElementResult = TrackRemoveStationElement({ mapLoc, _origin.direction }, rideIndex, {}); if (!removeElementResult.Successful) @@ -382,7 +382,7 @@ namespace OpenRCT2::GameActions // Don't do this if the ride is simulating and the tile is a ghost to prevent desyncs. if (ted.sequenceData.sequences[0].flags.has(SequenceFlag::trackOrigin) && (!GetFlags().has(CommandFlag::ghost) || (GetFlags().has(CommandFlag::trackDesign))) - && (foundElement->GetSequenceIndex() == 0)) + && (foundElement->getSequenceIndex() == 0)) { const auto removeElementResult = TrackRemoveStationElement( { mapLoc, _origin.direction }, rideIndex, { CommandFlag::apply }); diff --git a/src/openrct2/actions/track/TrackSetBrakeSpeedAction.cpp b/src/openrct2/actions/track/TrackSetBrakeSpeedAction.cpp index 048b7d73de..07fb7e1974 100644 --- a/src/openrct2/actions/track/TrackSetBrakeSpeedAction.cpp +++ b/src/openrct2/actions/track/TrackSetBrakeSpeedAction.cpp @@ -83,7 +83,7 @@ namespace OpenRCT2::GameActions if (isExecuting) { GetTrackElementOriginAndApplyChanges( - { _loc, tileElement->getDirection() }, tileElement->asTrack()->GetTrackType(), _brakeSpeed, nullptr, + { _loc, tileElement->getDirection() }, tileElement->asTrack()->getTrackType(), _brakeSpeed, nullptr, { TrackElementSetFlag::brakeBoosterSpeed }); } return res; diff --git a/src/openrct2/entity/Balloon.cpp b/src/openrct2/entity/Balloon.cpp index 6f175b5df9..98fa35c447 100644 --- a/src/openrct2/entity/Balloon.cpp +++ b/src/openrct2/entity/Balloon.cpp @@ -137,7 +137,7 @@ namespace OpenRCT2 if (tileElement->getType() == TileElementType::track) { const TrackElement* trackElement = tileElement->asTrack(); - const auto* ride = GetRide(trackElement->GetRideIndex()); + const auto* ride = GetRide(trackElement->getRideIndex()); if (ride != nullptr && ride->getRideTypeDescriptor().flags.has(RtdFlag::hasRoofOverWholeRide)) { check_ceiling = true; diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index 1f1e32a759..c49d9934c4 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -1825,7 +1825,7 @@ namespace OpenRCT2 for (auto* trackElement : TileElementsView(location)) { - auto rideIndex = trackElement->GetRideIndex(); + auto rideIndex = trackElement->getRideIndex(); if (!rideIndex.IsNull()) { rideConsideration[rideIndex.ToUnderlying()] = true; @@ -2933,7 +2933,7 @@ namespace OpenRCT2 break; case TileElementType::track: { - auto* ride = GetRide(tileElement->asTrack()->GetRideIndex()); + auto* ride = GetRide(tileElement->asTrack()->getRideIndex()); if (ride == nullptr) break; @@ -3138,7 +3138,7 @@ namespace OpenRCT2 for (auto* trackElement : TileElementsView(location)) { - auto rideIndex = trackElement->GetRideIndex(); + auto rideIndex = trackElement->getRideIndex(); auto ride = GetRide(rideIndex); if (ride == nullptr) continue; @@ -4166,7 +4166,7 @@ namespace OpenRCT2 if (trackElement->getBaseZ() != vehicle->TrackLocation.z) continue; - if (trackElement->GetStationIndex() != CurrentRideStation) + if (trackElement->getStationIndex() != CurrentRideStation) continue; foundStation = true; @@ -4906,7 +4906,7 @@ namespace OpenRCT2 return; } - uint16_t mazeEntry = trackElement->GetMazeEntry(); + uint16_t mazeEntry = trackElement->getMazeEntry(); // Var37 is 3, 7, 11 or 15 uint8_t hedges[4]{ 0xFF, 0xFF, 0xFF, 0xFF }; uint8_t openCount = 0; @@ -6324,7 +6324,7 @@ namespace OpenRCT2 return false; } - auto ride = GetRide(tileElement->asTrack()->GetRideIndex()); + auto ride = GetRide(tileElement->asTrack()->getRideIndex()); if (ride == nullptr || !ride->isRide()) { return false; @@ -6370,7 +6370,7 @@ namespace OpenRCT2 bool Loc690FD0(Guest& guest, RideId* rideToView, uint8_t* rideSeatToView, TileElement* tileElement) { - auto ride = GetRide(tileElement->asTrack()->GetRideIndex()); + auto ride = GetRide(tileElement->asTrack()->getRideIndex()); if (ride == nullptr) return false; diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index 0cfd72641b..2129e2ddaf 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -2227,7 +2227,7 @@ namespace OpenRCT2 */ static bool PeepInteractWithShop(Peep* peep, const CoordsXYE& coords) { - RideId rideIndex = coords.element->asTrack()->GetRideIndex(); + RideId rideIndex = coords.element->asTrack()->getRideIndex(); auto ride = GetRide(rideIndex); if (ride == nullptr || !ride->getRideTypeDescriptor().flags.has(RtdFlag::isShopOrFacility)) return false; diff --git a/src/openrct2/entity/Staff.cpp b/src/openrct2/entity/Staff.cpp index c96b889028..c3ae39cd5d 100644 --- a/src/openrct2/entity/Staff.cpp +++ b/src/openrct2/entity/Staff.cpp @@ -875,7 +875,7 @@ namespace OpenRCT2 if (trackElement == nullptr) return false; - auto ride = GetRide(trackElement->GetRideIndex()); + auto ride = GetRide(trackElement->getRideIndex()); if (ride == nullptr) return false; @@ -2382,7 +2382,7 @@ namespace OpenRCT2 TrackBeginEnd trackBeginEnd; while (trackBlockGetPrevious(input, &trackBeginEnd)) { - if (trackBeginEnd.begin_element->asTrack()->IsStation()) + if (trackBeginEnd.begin_element->asTrack()->isStation()) { input.x = trackBeginEnd.begin_x; input.y = trackBeginEnd.begin_y; diff --git a/src/openrct2/paint/tile_element/Paint.Path.cpp b/src/openrct2/paint/tile_element/Paint.Path.cpp index d76a278b6c..efd9d06543 100644 --- a/src/openrct2/paint/tile_element/Paint.Path.cpp +++ b/src/openrct2/paint/tile_element/Paint.Path.cpp @@ -856,7 +856,7 @@ static BoundBoxXYZ PathPaintGetBoundbox(const PaintSession& session, int32_t hei // If we are on the same tile as a straight track, add the offset 2 so we // can clip above gravel part of the track sprite if (session.TrackElementOnSameHeight != nullptr - && session.TrackElementOnSameHeight->asTrack()->GetTrackType() == TrackElemType::flat) + && session.TrackElementOnSameHeight->asTrack()->getTrackType() == TrackElemType::flat) { boundingBoxZOffset = 2; } diff --git a/src/openrct2/paint/track/TrackPaintGeneric.h b/src/openrct2/paint/track/TrackPaintGeneric.h index e866c75c01..5ee1a888e5 100644 --- a/src/openrct2/paint/track/TrackPaintGeneric.h +++ b/src/openrct2/paint/track/TrackPaintGeneric.h @@ -71,7 +71,7 @@ namespace OpenRCT2 { static_assert(tunnelCount <= TrackMetadata::kSequenceTunnelMaxPerSequence); - const auto& ted = OpenRCT2::TrackMetadata::GetTrackElementDescriptor(trackElement.GetTrackType()); + const auto& ted = OpenRCT2::TrackMetadata::GetTrackElementDescriptor(trackElement.getTrackType()); const auto& sequenceDescriptor = ted.sequenceData.sequences[trackSequence]; uint8_t modifiedTrackSequence = trackSequence; diff --git a/src/openrct2/paint/track/coaster/AirPoweredVerticalCoaster.cpp b/src/openrct2/paint/track/coaster/AirPoweredVerticalCoaster.cpp index 98865ec9ba..1fcd020fb7 100644 --- a/src/openrct2/paint/track/coaster/AirPoweredVerticalCoaster.cpp +++ b/src/openrct2/paint/track/coaster/AirPoweredVerticalCoaster.cpp @@ -954,7 +954,7 @@ static void AirPoweredVerticalRCTrackBooster( // The booster piece is borrowed from the Reverse Freefall Colour. // It has two track colours, instead of the one that the APVC has. auto colour = session.TrackColours; - if (!trackElement.isGhost() && !trackElement.IsHighlighted()) + if (!trackElement.isGhost() && !trackElement.isHighlighted()) { colour = colour.WithSecondary(colour.GetPrimary()); } diff --git a/src/openrct2/paint/track/coaster/AlpineCoaster.cpp b/src/openrct2/paint/track/coaster/AlpineCoaster.cpp index 062f37ee2a..64004e8cee 100644 --- a/src/openrct2/paint/track/coaster/AlpineCoaster.cpp +++ b/src/openrct2/paint/track/coaster/AlpineCoaster.cpp @@ -70,7 +70,7 @@ namespace OpenRCT2::AlpineRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -141,7 +141,7 @@ namespace OpenRCT2::AlpineRC { (SPR_TRACKS_ALPINE_TRACK_FLAT + 1), (SPR_TRACKS_ALPINE_TRACK_FLAT + 1), SPR_STATION_BASE_MEDIUM_NW_SE }, }; - if (trackElement.GetTrackType() == TrackElemType::endStation) + if (trackElement.getTrackType() == TrackElemType::endStation) { PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 0, height }, @@ -171,7 +171,7 @@ namespace OpenRCT2::AlpineRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -250,7 +250,7 @@ namespace OpenRCT2::AlpineRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -329,7 +329,7 @@ namespace OpenRCT2::AlpineRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1111,7 +1111,7 @@ namespace OpenRCT2::AlpineRC }; TrackPaintUtilDiagTilesPaintExtra( - session, 3, height, direction, trackSequence, images[trackElement.HasChain()], supportType.metal); + session, 3, height, direction, trackSequence, images[trackElement.hasChain()], supportType.metal); } static void TrackDiag25DegUp( @@ -1121,7 +1121,7 @@ namespace OpenRCT2::AlpineRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1155,7 +1155,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1188,7 +1188,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1222,7 +1222,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1266,7 +1266,7 @@ namespace OpenRCT2::AlpineRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1300,7 +1300,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1333,7 +1333,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1367,7 +1367,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1411,7 +1411,7 @@ namespace OpenRCT2::AlpineRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1445,7 +1445,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1478,7 +1478,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1512,7 +1512,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1560,7 +1560,7 @@ namespace OpenRCT2::AlpineRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1594,7 +1594,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1627,7 +1627,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1661,7 +1661,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1705,7 +1705,7 @@ namespace OpenRCT2::AlpineRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1738,7 +1738,7 @@ namespace OpenRCT2::AlpineRC 0xFFFF, 0); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1770,7 +1770,7 @@ namespace OpenRCT2::AlpineRC 0xFFFF, 0); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1803,7 +1803,7 @@ namespace OpenRCT2::AlpineRC 0xFFFF, 0); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1848,7 +1848,7 @@ namespace OpenRCT2::AlpineRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1882,7 +1882,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1915,7 +1915,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1949,7 +1949,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { diff --git a/src/openrct2/paint/track/coaster/BobsleighCoaster.cpp b/src/openrct2/paint/track/coaster/BobsleighCoaster.cpp index 34bc61e8a5..2bd71a6408 100644 --- a/src/openrct2/paint/track/coaster/BobsleighCoaster.cpp +++ b/src/openrct2/paint/track/coaster/BobsleighCoaster.cpp @@ -38,7 +38,7 @@ static void BobsleighRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -131,7 +131,7 @@ static void BobsleighRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -232,7 +232,7 @@ static void BobsleighRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -333,7 +333,7 @@ static void BobsleighRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3997,7 +3997,7 @@ static void BobsleighRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); switch (direction) { case 0: diff --git a/src/openrct2/paint/track/coaster/CompactInvertedCoaster.cpp b/src/openrct2/paint/track/coaster/CompactInvertedCoaster.cpp index 264bbdba19..ae72c56f0d 100644 --- a/src/openrct2/paint/track/coaster/CompactInvertedCoaster.cpp +++ b/src/openrct2/paint/track/coaster/CompactInvertedCoaster.cpp @@ -55,7 +55,7 @@ static void CompactInvertedRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -136,7 +136,7 @@ static void CompactInvertedRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -229,7 +229,7 @@ static void CompactInvertedRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -298,7 +298,7 @@ static void CompactInvertedRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -391,7 +391,7 @@ static void CompactInvertedRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -472,7 +472,7 @@ static void CompactInvertedRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -577,7 +577,7 @@ static void CompactInvertedRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5472,7 +5472,7 @@ static void CompactInvertedRCTrack90DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5550,7 +5550,7 @@ static void CompactInvertedRCTrack60DegUpTo90DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5630,7 +5630,7 @@ static void CompactInvertedRCTrack90DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5703,7 +5703,7 @@ static void CompactInvertedRCTrack60DegDownTo90DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6570,7 +6570,7 @@ static void CompactInvertedRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - const auto* images = kCompactInvertedDiagFlatImages[trackElement.HasChain()]; + const auto* images = kCompactInvertedDiagFlatImages[trackElement.hasChain()]; CompactInvertedRCTrackDiagFlatBase(session, trackSequence, images, direction, height, supportType); } @@ -6585,7 +6585,7 @@ static void CompactInvertedRCTrackDiagBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - const auto* images = kCompactInvertedDiagBlockBrakeImages[trackElement.IsBrakeClosed()]; + const auto* images = kCompactInvertedDiagBlockBrakeImages[trackElement.isBrakeClosed()]; CompactInvertedRCTrackDiagFlatBase(session, trackSequence, images, direction, height, supportType); } @@ -6597,7 +6597,7 @@ static void CompactInvertedRCTrackDiag25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6628,7 +6628,7 @@ static void CompactInvertedRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6659,7 +6659,7 @@ static void CompactInvertedRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6691,7 +6691,7 @@ static void CompactInvertedRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6857,7 +6857,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6888,7 +6888,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6919,7 +6919,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6951,7 +6951,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7221,7 +7221,7 @@ static void CompactInvertedRCTrackDiag25DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7252,7 +7252,7 @@ static void CompactInvertedRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7283,7 +7283,7 @@ static void CompactInvertedRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7315,7 +7315,7 @@ static void CompactInvertedRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7377,7 +7377,7 @@ static void CompactInvertedRCTrackDiag25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7408,7 +7408,7 @@ static void CompactInvertedRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7439,7 +7439,7 @@ static void CompactInvertedRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7471,7 +7471,7 @@ static void CompactInvertedRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7637,7 +7637,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7667,7 +7667,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7697,7 +7697,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7728,7 +7728,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7998,7 +7998,7 @@ static void CompactInvertedRCTrackDiag25DegDownToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8029,7 +8029,7 @@ static void CompactInvertedRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8060,7 +8060,7 @@ static void CompactInvertedRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8092,7 +8092,7 @@ static void CompactInvertedRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { diff --git a/src/openrct2/paint/track/coaster/CorkscrewRollerCoaster.cpp b/src/openrct2/paint/track/coaster/CorkscrewRollerCoaster.cpp index 97f99ac765..be8ef87a45 100644 --- a/src/openrct2/paint/track/coaster/CorkscrewRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/CorkscrewRollerCoaster.cpp @@ -70,7 +70,7 @@ static void CorkscrewRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -141,9 +141,9 @@ static void CorkscrewRCTrackStation( 16237, }; - if (trackElement.GetTrackType() == TrackElemType::endStation) + if (trackElement.getTrackType() == TrackElemType::endStation) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kCorkscrewRcBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); @@ -173,7 +173,7 @@ static void CorkscrewRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -252,7 +252,7 @@ static void CorkscrewRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -331,7 +331,7 @@ static void CorkscrewRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -410,7 +410,7 @@ static void CorkscrewRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -501,7 +501,7 @@ static void CorkscrewRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -592,7 +592,7 @@ static void CorkscrewRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6320,7 +6320,7 @@ static void CorkscrewRCTrackDiagFlat( }; TrackPaintUtilDiagTilesPaintExtra( - session, 3, height, direction, trackSequence, kImages[trackElement.HasChain()], supportType.metal); + session, 3, height, direction, trackSequence, kImages[trackElement.hasChain()], supportType.metal); } static void CorkscrewRCTrackDiagBrakes( @@ -6347,7 +6347,7 @@ static void CorkscrewRCTrackDiagBlockBrakes( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, kCorkscrewRcDiagBlockBrakeImages[trackElement.IsBrakeClosed()], + session, 3, height, direction, trackSequence, kCorkscrewRcDiagBlockBrakeImages[trackElement.isBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) @@ -6369,7 +6369,7 @@ static void CorkscrewRCTrackDiag25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6400,7 +6400,7 @@ static void CorkscrewRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6431,7 +6431,7 @@ static void CorkscrewRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6463,7 +6463,7 @@ static void CorkscrewRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6532,7 +6532,7 @@ static void CorkscrewRCTrackDiag60DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6563,7 +6563,7 @@ static void CorkscrewRCTrackDiag60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6594,7 +6594,7 @@ static void CorkscrewRCTrackDiag60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6626,7 +6626,7 @@ static void CorkscrewRCTrackDiag60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6695,7 +6695,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6726,7 +6726,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6757,7 +6757,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6789,7 +6789,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6858,7 +6858,7 @@ static void CorkscrewRCTrackDiag25DegUpTo60DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6889,7 +6889,7 @@ static void CorkscrewRCTrackDiag25DegUpTo60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6920,7 +6920,7 @@ static void CorkscrewRCTrackDiag25DegUpTo60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6952,7 +6952,7 @@ static void CorkscrewRCTrackDiag25DegUpTo60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7021,7 +7021,7 @@ static void CorkscrewRCTrackDiag60DegUpTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7052,7 +7052,7 @@ static void CorkscrewRCTrackDiag60DegUpTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7083,7 +7083,7 @@ static void CorkscrewRCTrackDiag60DegUpTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7115,7 +7115,7 @@ static void CorkscrewRCTrackDiag60DegUpTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7184,7 +7184,7 @@ static void CorkscrewRCTrackDiag25DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7215,7 +7215,7 @@ static void CorkscrewRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7246,7 +7246,7 @@ static void CorkscrewRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7278,7 +7278,7 @@ static void CorkscrewRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7347,7 +7347,7 @@ static void CorkscrewRCTrackDiag25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7378,7 +7378,7 @@ static void CorkscrewRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7409,7 +7409,7 @@ static void CorkscrewRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7441,7 +7441,7 @@ static void CorkscrewRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7510,7 +7510,7 @@ static void CorkscrewRCTrackDiag60DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7541,7 +7541,7 @@ static void CorkscrewRCTrackDiag60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7572,7 +7572,7 @@ static void CorkscrewRCTrackDiag60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7604,7 +7604,7 @@ static void CorkscrewRCTrackDiag60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7673,7 +7673,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7703,7 +7703,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7733,7 +7733,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7764,7 +7764,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7834,7 +7834,7 @@ static void CorkscrewRCTrackDiag25DegDownTo60DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7865,7 +7865,7 @@ static void CorkscrewRCTrackDiag25DegDownTo60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7896,7 +7896,7 @@ static void CorkscrewRCTrackDiag25DegDownTo60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7928,7 +7928,7 @@ static void CorkscrewRCTrackDiag25DegDownTo60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7997,7 +7997,7 @@ static void CorkscrewRCTrackDiag60DegDownTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8028,7 +8028,7 @@ static void CorkscrewRCTrackDiag60DegDownTo25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8059,7 +8059,7 @@ static void CorkscrewRCTrackDiag60DegDownTo25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8091,7 +8091,7 @@ static void CorkscrewRCTrackDiag60DegDownTo25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8160,7 +8160,7 @@ static void CorkscrewRCTrackDiag25DegDownToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8191,7 +8191,7 @@ static void CorkscrewRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8222,7 +8222,7 @@ static void CorkscrewRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8254,7 +8254,7 @@ static void CorkscrewRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -9654,7 +9654,7 @@ static void CorkscrewRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kCorkscrewRcBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); diff --git a/src/openrct2/paint/track/coaster/FlyingRollerCoaster.cpp b/src/openrct2/paint/track/coaster/FlyingRollerCoaster.cpp index cc2a1c3c88..892266b907 100644 --- a/src/openrct2/paint/track/coaster/FlyingRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/FlyingRollerCoaster.cpp @@ -34,7 +34,7 @@ static void FlyingRCTrackStation( { 17155, 17151 }, }; - if (trackElement.GetTrackType() == TrackElemType::endStation) + if (trackElement.getTrackType() == TrackElemType::endStation) { PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 0, height }, diff --git a/src/openrct2/paint/track/coaster/FlyingRollerCoasterInverted.cpp b/src/openrct2/paint/track/coaster/FlyingRollerCoasterInverted.cpp index 0b544dafb8..e14b9f32ca 100644 --- a/src/openrct2/paint/track/coaster/FlyingRollerCoasterInverted.cpp +++ b/src/openrct2/paint/track/coaster/FlyingRollerCoasterInverted.cpp @@ -32,7 +32,7 @@ static void InvertedFlyingRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -113,7 +113,7 @@ static void InvertedFlyingRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -229,7 +229,7 @@ static void InvertedFlyingRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -404,7 +404,7 @@ static void InvertedFlyingRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4553,7 +4553,7 @@ static void InvertedFlyingRCTrackDiagFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4584,7 +4584,7 @@ static void InvertedFlyingRCTrackDiagFlat( PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4615,7 +4615,7 @@ static void InvertedFlyingRCTrackDiagFlat( PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4647,7 +4647,7 @@ static void InvertedFlyingRCTrackDiagFlat( PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4693,7 +4693,7 @@ static void InvertedFlyingRCTrackDiag25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4724,7 +4724,7 @@ static void InvertedFlyingRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4755,7 +4755,7 @@ static void InvertedFlyingRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4787,7 +4787,7 @@ static void InvertedFlyingRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4936,7 +4936,7 @@ static void InvertedFlyingRCTrackDiagFlatTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4967,7 +4967,7 @@ static void InvertedFlyingRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4998,7 +4998,7 @@ static void InvertedFlyingRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5030,7 +5030,7 @@ static void InvertedFlyingRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5283,7 +5283,7 @@ static void InvertedFlyingRCTrackDiag25DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5314,7 +5314,7 @@ static void InvertedFlyingRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5345,7 +5345,7 @@ static void InvertedFlyingRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5377,7 +5377,7 @@ static void InvertedFlyingRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { diff --git a/src/openrct2/paint/track/coaster/HeartlineTwisterCoaster.cpp b/src/openrct2/paint/track/coaster/HeartlineTwisterCoaster.cpp index 7ee2335481..d1a8f887a5 100644 --- a/src/openrct2/paint/track/coaster/HeartlineTwisterCoaster.cpp +++ b/src/openrct2/paint/track/coaster/HeartlineTwisterCoaster.cpp @@ -24,7 +24,7 @@ static void HeartlineTwisterRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -130,7 +130,7 @@ static void HeartlineTwisterRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -227,7 +227,7 @@ static void HeartlineTwisterRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -324,7 +324,7 @@ static void HeartlineTwisterRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -421,7 +421,7 @@ static void HeartlineTwisterRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -518,7 +518,7 @@ static void HeartlineTwisterRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -615,7 +615,7 @@ static void HeartlineTwisterRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { diff --git a/src/openrct2/paint/track/coaster/HybridCoaster.cpp b/src/openrct2/paint/track/coaster/HybridCoaster.cpp index ba3204843e..c5d0fc2b7a 100644 --- a/src/openrct2/paint/track/coaster/HybridCoaster.cpp +++ b/src/openrct2/paint/track/coaster/HybridCoaster.cpp @@ -107,7 +107,7 @@ namespace OpenRCT2::HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_TRACKS_HYBRID_LIFT_TRACK_FLAT + direction), @@ -137,7 +137,7 @@ namespace OpenRCT2::HybridRC { (SPR_TRACKS_HYBRID_TRACK_BRAKE + 1), (SPR_TRACKS_HYBRID_TRACK_BLOCK_BRAKE + 1) }, }; - if (trackElement.GetTrackType() == TrackElemType::endStation) + if (trackElement.getTrackType() == TrackElemType::endStation) { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(imageIds[direction][1]), { 0, 0, height }, @@ -164,7 +164,7 @@ namespace OpenRCT2::HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_TRACKS_HYBRID_LIFT_TRACK_GENTLE + direction + 8), @@ -223,7 +223,7 @@ namespace OpenRCT2::HybridRC }; auto* ps = PaintAddImageAsParentRotated( - session, direction, GetTrackColour(session).WithIndex(imageIds[trackElement.HasChain() ? 0 : 1][direction]), + session, direction, GetTrackColour(session).WithIndex(imageIds[trackElement.hasChain() ? 0 : 1][direction]), { 0, 0, height }, { { boundBoxOffsets[direction].x, boundBoxOffsets[direction].y, boundBoxOffsets[direction].z }, { boundBoxLengths[direction].x, boundBoxLengths[direction].y, boundBoxLengths[direction].z } }); @@ -252,7 +252,7 @@ namespace OpenRCT2::HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_TRACKS_HYBRID_LIFT_TRACK_GENTLE + direction), @@ -283,7 +283,7 @@ namespace OpenRCT2::HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -366,7 +366,7 @@ namespace OpenRCT2::HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -450,7 +450,7 @@ namespace OpenRCT2::HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_TRACKS_HYBRID_LIFT_TRACK_GENTLE + direction + 4), @@ -1447,7 +1447,7 @@ namespace OpenRCT2::HybridRC }; TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, images[trackElement.HasChain()], defaultDiagTileOffsets, + session, 3, height, direction, trackSequence, images[trackElement.hasChain()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr, 0, GetTrackColour(session)); DrawSupportForSequenceA( @@ -1658,7 +1658,7 @@ namespace OpenRCT2::HybridRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1686,7 +1686,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1716,7 +1716,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1746,7 +1746,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1783,7 +1783,7 @@ namespace OpenRCT2::HybridRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1811,7 +1811,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1841,7 +1841,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1871,7 +1871,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1908,7 +1908,7 @@ namespace OpenRCT2::HybridRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1936,7 +1936,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1966,7 +1966,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1996,7 +1996,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2033,7 +2033,7 @@ namespace OpenRCT2::HybridRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2061,7 +2061,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2091,7 +2091,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2121,7 +2121,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2158,7 +2158,7 @@ namespace OpenRCT2::HybridRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2185,7 +2185,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2214,7 +2214,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2243,7 +2243,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2281,7 +2281,7 @@ namespace OpenRCT2::HybridRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2309,7 +2309,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2339,7 +2339,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2369,7 +2369,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2406,7 +2406,7 @@ namespace OpenRCT2::HybridRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2434,7 +2434,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2464,7 +2464,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2494,7 +2494,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2531,7 +2531,7 @@ namespace OpenRCT2::HybridRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2559,7 +2559,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2589,7 +2589,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2619,7 +2619,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2656,7 +2656,7 @@ namespace OpenRCT2::HybridRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2684,7 +2684,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2714,7 +2714,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2744,7 +2744,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2781,7 +2781,7 @@ namespace OpenRCT2::HybridRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2809,7 +2809,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2839,7 +2839,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2869,7 +2869,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2906,7 +2906,7 @@ namespace OpenRCT2::HybridRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2934,7 +2934,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2964,7 +2964,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2994,7 +2994,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3031,7 +3031,7 @@ namespace OpenRCT2::HybridRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3059,7 +3059,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3089,7 +3089,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3119,7 +3119,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { diff --git a/src/openrct2/paint/track/coaster/InvertedHairpinCoaster.cpp b/src/openrct2/paint/track/coaster/InvertedHairpinCoaster.cpp index 0aa7d6b3a9..6b67ce984c 100644 --- a/src/openrct2/paint/track/coaster/InvertedHairpinCoaster.cpp +++ b/src/openrct2/paint/track/coaster/InvertedHairpinCoaster.cpp @@ -27,7 +27,7 @@ static void InvertedHairpinRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -116,7 +116,7 @@ static void InvertedHairpinRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -209,7 +209,7 @@ static void InvertedHairpinRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -278,7 +278,7 @@ static void InvertedHairpinRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -371,7 +371,7 @@ static void InvertedHairpinRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -452,7 +452,7 @@ static void InvertedHairpinRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -557,7 +557,7 @@ static void InvertedHairpinRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1120,7 +1120,7 @@ static void InvertedHairpinRCTrackFlatTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1201,7 +1201,7 @@ static void InvertedHairpinRCTrack60DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { diff --git a/src/openrct2/paint/track/coaster/InvertedRollerCoaster.cpp b/src/openrct2/paint/track/coaster/InvertedRollerCoaster.cpp index b89f0faa7d..a2dfa82b99 100644 --- a/src/openrct2/paint/track/coaster/InvertedRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/InvertedRollerCoaster.cpp @@ -39,7 +39,7 @@ static void InvertedRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -120,7 +120,7 @@ static void InvertedRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -253,7 +253,7 @@ static void InvertedRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -462,7 +462,7 @@ static void InvertedRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6278,7 +6278,7 @@ static void InvertedRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - const auto* images = kInvertedRCDiagFlatImages[trackElement.HasChain()]; + const auto* images = kInvertedRCDiagFlatImages[trackElement.hasChain()]; InvertedRCTrackDiagFlatBase(session, trackSequence, images, direction, height, supportType); } @@ -6297,7 +6297,7 @@ static void InvertedRCTrackDiag25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6328,7 +6328,7 @@ static void InvertedRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6359,7 +6359,7 @@ static void InvertedRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6391,7 +6391,7 @@ static void InvertedRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6557,7 +6557,7 @@ static void InvertedRCTrackDiagFlatTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6588,7 +6588,7 @@ static void InvertedRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6619,7 +6619,7 @@ static void InvertedRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6651,7 +6651,7 @@ static void InvertedRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6921,7 +6921,7 @@ static void InvertedRCTrackDiag25DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6952,7 +6952,7 @@ static void InvertedRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6983,7 +6983,7 @@ static void InvertedRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7015,7 +7015,7 @@ static void InvertedRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7077,7 +7077,7 @@ static void InvertedRCTrackDiag25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7108,7 +7108,7 @@ static void InvertedRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7139,7 +7139,7 @@ static void InvertedRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7171,7 +7171,7 @@ static void InvertedRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7337,7 +7337,7 @@ static void InvertedRCTrackDiagFlatTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7367,7 +7367,7 @@ static void InvertedRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7397,7 +7397,7 @@ static void InvertedRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7428,7 +7428,7 @@ static void InvertedRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7698,7 +7698,7 @@ static void InvertedRCTrackDiag25DegDownToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7729,7 +7729,7 @@ static void InvertedRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7760,7 +7760,7 @@ static void InvertedRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7792,7 +7792,7 @@ static void InvertedRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -15432,7 +15432,7 @@ static void InvertedRCTrack60DegUpTo90DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -15509,7 +15509,7 @@ static void InvertedRCTrack90DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -15581,7 +15581,7 @@ static void InvertedRCTrack60DegDownTo90DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { diff --git a/src/openrct2/paint/track/coaster/JuniorRollerCoaster.cpp b/src/openrct2/paint/track/coaster/JuniorRollerCoaster.cpp index 3698f43424..de81a65a5b 100644 --- a/src/openrct2/paint/track/coaster/JuniorRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/JuniorRollerCoaster.cpp @@ -1847,7 +1847,7 @@ static constexpr const uint32_t junior_rc_track_pieces_diag_blockbrakes[2][4] = template constexpr uint8_t JuniorRCGetSubTypeOffset(const TrackElement& trackElement) { - return trackElement.HasChain() ? EnumValue(TSubType) : 0; + return trackElement.hasChain() ? EnumValue(TSubType) : 0; } template @@ -1881,12 +1881,12 @@ static void JuniorRCPaintStation( { ImageId imageId; - const bool isBraked = trackElement.IsBrakeClosed(); + const bool isBraked = trackElement.isBrakeClosed(); if (direction == 0 || direction == 2) { // height += 2 (height) - if (trackElement.GetTrackType() == TrackElemType::endStation && TSubType == JuniorRCSubType::junior) + if (trackElement.getTrackType() == TrackElemType::endStation && TSubType == JuniorRCSubType::junior) { imageId = session.TrackColours.WithIndex(junior_rc_track_pieces_block_brake[isBraked][direction]); } @@ -1899,7 +1899,7 @@ static void JuniorRCPaintStation( else if (direction == 1 || direction == 3) { // height += 2 (height) - if (trackElement.GetTrackType() == TrackElemType::endStation && TSubType == JuniorRCSubType::junior) + if (trackElement.getTrackType() == TrackElemType::endStation && TSubType == JuniorRCSubType::junior) { imageId = session.TrackColours.WithIndex(junior_rc_track_pieces_block_brake[isBraked][direction]); } @@ -4033,7 +4033,7 @@ static void JuniorRCBlockBrakePaintSetup( { ImageId image_id; - bool isBraked = trackElement.IsBrakeClosed(); + bool isBraked = trackElement.isBrakeClosed(); image_id = session.TrackColours.WithIndex(junior_rc_track_pieces_block_brake[isBraked][direction]); if (direction & 1) @@ -4545,7 +4545,7 @@ static void JuniorRCTrackDiagBlockBrakes( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_blockbrakes[trackElement.IsBrakeClosed()], + session, 1, height, direction, trackSequence, junior_rc_track_pieces_diag_blockbrakes[trackElement.isBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) @@ -5562,7 +5562,7 @@ static void JuniorRCFlatTo60DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - bool isChained = trackElement.HasChain(); + bool isChained = trackElement.hasChain(); auto image_id = session.TrackColours.WithIndex(junior_rc_track_pieces_flat_to_60_deg_up[isChained][direction][0]); PaintAddImageAsParent( @@ -5625,7 +5625,7 @@ static void JuniorRC60DegUpToFlatPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - bool isChained = trackElement.HasChain(); + bool isChained = trackElement.hasChain(); auto image_id = session.TrackColours.WithIndex(junior_rc_track_pieces_60_deg_up_to_flat[isChained][direction][0]); PaintAddImageAsParent( diff --git a/src/openrct2/paint/track/coaster/LatticeTriangleTrack.cpp b/src/openrct2/paint/track/coaster/LatticeTriangleTrack.cpp index 68d31e8c31..ff053f9034 100644 --- a/src/openrct2/paint/track/coaster/LatticeTriangleTrack.cpp +++ b/src/openrct2/paint/track/coaster/LatticeTriangleTrack.cpp @@ -98,7 +98,7 @@ static void LatticeTriangleTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasCableLift()) + if (trackElement.hasCableLift()) { switch (direction) { @@ -120,7 +120,7 @@ static void LatticeTriangleTrackFlat( MetalASupportsPaintSetup(session, supportType.metal, MetalSupportPlace::centre, 0, height, session.SupportColours); } } - else if (trackElement.HasChain()) + else if (trackElement.hasChain()) { switch (direction) { @@ -188,9 +188,9 @@ static void LatticeTriangleTrackStation( 18085, }; - if (trackElement.GetTrackType() == TrackElemType::endStation) + if (trackElement.getTrackType() == TrackElemType::endStation) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kLatticeTriangleBrakeImages[direction][isClosed][0]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); @@ -220,7 +220,7 @@ static void LatticeTriangleTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasCableLift()) + if (trackElement.hasCableLift()) { switch (direction) { @@ -250,7 +250,7 @@ static void LatticeTriangleTrack25DegUp( MetalASupportsPaintSetup(session, supportType.metal, MetalSupportPlace::centre, 8, height, session.SupportColours); } } - else if (trackElement.HasChain()) + else if (trackElement.hasChain()) { switch (direction) { @@ -327,7 +327,7 @@ static void LatticeTriangleTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasCableLift()) + if (trackElement.hasCableLift()) { switch (direction) { @@ -404,7 +404,7 @@ static void LatticeTriangleTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasCableLift()) + if (trackElement.hasCableLift()) { switch (direction) { @@ -434,7 +434,7 @@ static void LatticeTriangleTrackFlatTo25DegUp( MetalASupportsPaintSetup(session, supportType.metal, MetalSupportPlace::centre, 3, height, session.SupportColours); } } - else if (trackElement.HasChain()) + else if (trackElement.hasChain()) { switch (direction) { @@ -511,7 +511,7 @@ static void LatticeTriangleTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasCableLift()) + if (trackElement.hasCableLift()) { switch (direction) { @@ -600,7 +600,7 @@ static void LatticeTriangleTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasCableLift()) + if (trackElement.hasCableLift()) { switch (direction) { @@ -689,7 +689,7 @@ static void LatticeTriangleTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasCableLift()) + if (trackElement.hasCableLift()) { switch (direction) { @@ -719,7 +719,7 @@ static void LatticeTriangleTrack25DegUpToFlat( MetalASupportsPaintSetup(session, supportType.metal, MetalSupportPlace::centre, 6, height, session.SupportColours); } } - else if (trackElement.HasChain()) + else if (trackElement.hasChain()) { switch (direction) { @@ -4572,7 +4572,7 @@ static void LatticeTriangleTrackFlatTo60DegUpLongBase( switch (trackSequence) { case 0: - if (trackElement.HasCableLift()) + if (trackElement.hasCableLift()) { switch (direction) { @@ -4643,7 +4643,7 @@ static void LatticeTriangleTrackFlatTo60DegUpLongBase( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasCableLift()) + if (trackElement.hasCableLift()) { switch (direction) { @@ -4710,7 +4710,7 @@ static void LatticeTriangleTrackFlatTo60DegUpLongBase( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasCableLift()) + if (trackElement.hasCableLift()) { switch (direction) { @@ -4777,7 +4777,7 @@ static void LatticeTriangleTrackFlatTo60DegUpLongBase( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: - if (trackElement.HasCableLift()) + if (trackElement.hasCableLift()) { switch (direction) { @@ -5907,7 +5907,7 @@ static void LatticeTriangleTrackDiagFlat( }; TrackPaintUtilDiagTilesPaintExtra( - session, 3, height, direction, trackSequence, images[trackElement.HasChain()], supportType.metal); + session, 3, height, direction, trackSequence, images[trackElement.hasChain()], supportType.metal); } /** rct2: 0x008ADB04 */ @@ -5918,7 +5918,7 @@ static void LatticeTriangleTrackDiag25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5949,7 +5949,7 @@ static void LatticeTriangleTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5980,7 +5980,7 @@ static void LatticeTriangleTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6012,7 +6012,7 @@ static void LatticeTriangleTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6174,7 +6174,7 @@ static void LatticeTriangleTrackDiagFlatTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6205,7 +6205,7 @@ static void LatticeTriangleTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6236,7 +6236,7 @@ static void LatticeTriangleTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6268,7 +6268,7 @@ static void LatticeTriangleTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6523,7 +6523,7 @@ static void LatticeTriangleTrackDiag25DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6554,7 +6554,7 @@ static void LatticeTriangleTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6585,7 +6585,7 @@ static void LatticeTriangleTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6617,7 +6617,7 @@ static void LatticeTriangleTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6686,7 +6686,7 @@ static void LatticeTriangleTrackDiag25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6717,7 +6717,7 @@ static void LatticeTriangleTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6748,7 +6748,7 @@ static void LatticeTriangleTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6780,7 +6780,7 @@ static void LatticeTriangleTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6942,7 +6942,7 @@ static void LatticeTriangleTrackDiagFlatTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6972,7 +6972,7 @@ static void LatticeTriangleTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7002,7 +7002,7 @@ static void LatticeTriangleTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7033,7 +7033,7 @@ static void LatticeTriangleTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7289,7 +7289,7 @@ static void LatticeTriangleTrackDiag25DegDownToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7320,7 +7320,7 @@ static void LatticeTriangleTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7351,7 +7351,7 @@ static void LatticeTriangleTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7383,7 +7383,7 @@ static void LatticeTriangleTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8783,7 +8783,7 @@ static void LatticeTriangleTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kLatticeTriangleBrakeImages[direction][isClosed][0]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); @@ -18160,11 +18160,11 @@ static void LatticeTriangleTrackDiagBrakes( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, kLatticeTriangleDiagBrakeImages[trackElement.IsBrakeClosed()][0], + session, 3, height, direction, trackSequence, kLatticeTriangleDiagBrakeImages[trackElement.isBrakeClosed()][0], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, kLatticeTriangleDiagBrakeImages[trackElement.IsBrakeClosed()][1], + session, 3, height, direction, trackSequence, kLatticeTriangleDiagBrakeImages[trackElement.isBrakeClosed()][1], defaultDiagTileOffsets, defaultDiagBoundLengths, diagBrakeBoundsOffsets); if (trackSequence == 3) diff --git a/src/openrct2/paint/track/coaster/LatticeTriangleTrackAlt.cpp b/src/openrct2/paint/track/coaster/LatticeTriangleTrackAlt.cpp index 2cf205a9ae..4ed8c4e2e6 100644 --- a/src/openrct2/paint/track/coaster/LatticeTriangleTrackAlt.cpp +++ b/src/openrct2/paint/track/coaster/LatticeTriangleTrackAlt.cpp @@ -66,9 +66,9 @@ static void LatticeTriangleTrackAltStation( SPR_TRACKS_LATTICE_TRIANGLE_TRACK_DRIVE_TYRE_SW_NE, SPR_TRACKS_LATTICE_TRIANGLE_TRACK_DRIVE_TYRE_SE_NW, }; - if (trackElement.GetTrackType() == TrackElemType::endStation) + if (trackElement.getTrackType() == TrackElemType::endStation) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kLatticeTriangleAltBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); @@ -98,7 +98,7 @@ static void LatticeTriangleTrackAltBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kLatticeTriangleAltBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); @@ -117,7 +117,7 @@ static void LatticeTriangleTrackAltBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kLatticeTriangleAltBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); @@ -225,7 +225,7 @@ static void LatticeTriangleTrackAltDiagBlockBrake( }; TrackPaintUtilDiagTilesPaintExtra( - session, 3, height, direction, trackSequence, images[trackElement.IsBrakeClosed()], supportType.metal); + session, 3, height, direction, trackSequence, images[trackElement.isBrakeClosed()], supportType.metal); } static void LatticeTriangleTrackAltDiagBrake( @@ -248,7 +248,7 @@ static void LatticeTriangleTrackAltDiagBrake( }; TrackPaintUtilDiagTilesPaintExtra( - session, 3, height, direction, trackSequence, images[trackElement.IsBrakeClosed()], supportType.metal); + session, 3, height, direction, trackSequence, images[trackElement.isBrakeClosed()], supportType.metal); } TrackPaintFunction GetTrackPaintFunctionLatticeTriangleTrackAlt(TrackElemType trackType) diff --git a/src/openrct2/paint/track/coaster/LayDownRollerCoasterInverted.cpp b/src/openrct2/paint/track/coaster/LayDownRollerCoasterInverted.cpp index 7c94370fbe..2302f34c33 100644 --- a/src/openrct2/paint/track/coaster/LayDownRollerCoasterInverted.cpp +++ b/src/openrct2/paint/track/coaster/LayDownRollerCoasterInverted.cpp @@ -55,7 +55,7 @@ static void LayDownRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -136,7 +136,7 @@ static void LayDownRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -269,7 +269,7 @@ static void LayDownRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -478,7 +478,7 @@ static void LayDownRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3780,7 +3780,7 @@ static void LayDownRCTrackDiagFlat( { -16, -16, -2 }, { -16, -16, -2 }, }; - const auto* images = kLaydownDiagFlatImages[trackElement.HasChain()]; + const auto* images = kLaydownDiagFlatImages[trackElement.hasChain()]; TrackPaintUtilDiagTilesPaint( session, 3, height + 24, direction, trackSequence, images, defaultDiagTileOffsets, defaultDiagBoundLengths, boundsOffsets); @@ -3823,7 +3823,7 @@ static void LayDownRCTrackDiagBlockBrakes( int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; TrackPaintUtilDiagTilesPaint( - session, -3, height + 24, direction, trackSequence, kLaydownDiagBlockBrakeImages[trackElement.IsBrakeClosed()], + session, -3, height + 24, direction, trackSequence, kLaydownDiagBlockBrakeImages[trackElement.isBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); @@ -3844,7 +3844,7 @@ static void LayDownRCTrackDiag25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3875,7 +3875,7 @@ static void LayDownRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3906,7 +3906,7 @@ static void LayDownRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3938,7 +3938,7 @@ static void LayDownRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4104,7 +4104,7 @@ static void LayDownRCTrackDiagFlatTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4135,7 +4135,7 @@ static void LayDownRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4166,7 +4166,7 @@ static void LayDownRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4198,7 +4198,7 @@ static void LayDownRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4468,7 +4468,7 @@ static void LayDownRCTrackDiag25DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4499,7 +4499,7 @@ static void LayDownRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4530,7 +4530,7 @@ static void LayDownRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4562,7 +4562,7 @@ static void LayDownRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { diff --git a/src/openrct2/paint/track/coaster/LimLaunchedRollerCoaster.cpp b/src/openrct2/paint/track/coaster/LimLaunchedRollerCoaster.cpp index 301e890d16..fcd22ebecd 100644 --- a/src/openrct2/paint/track/coaster/LimLaunchedRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/LimLaunchedRollerCoaster.cpp @@ -55,9 +55,9 @@ static void LimLaunchedRCTrackStation( 15019, }; - if (trackElement.GetTrackType() == TrackElemType::endStation) + if (trackElement.getTrackType() == TrackElemType::endStation) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kLimLauncherBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); @@ -1821,7 +1821,7 @@ static void LimLaunchedRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kLimLauncherBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); diff --git a/src/openrct2/paint/track/coaster/LoopingRollerCoaster.cpp b/src/openrct2/paint/track/coaster/LoopingRollerCoaster.cpp index 6d64e7ef72..0fafd4ee9b 100644 --- a/src/openrct2/paint/track/coaster/LoopingRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/LoopingRollerCoaster.cpp @@ -40,7 +40,7 @@ static void LoopingRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -137,7 +137,7 @@ static void LoopingRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -214,7 +214,7 @@ static void LoopingRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -291,7 +291,7 @@ static void LoopingRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -368,7 +368,7 @@ static void LoopingRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -457,7 +457,7 @@ static void LoopingRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -546,7 +546,7 @@ static void LoopingRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5650,7 +5650,7 @@ static void LoopingRCTrackDiagFlat( }; TrackPaintUtilDiagTilesPaintExtra( - session, 3, height, direction, trackSequence, images[trackElement.HasChain()], supportType.metal); + session, 3, height, direction, trackSequence, images[trackElement.hasChain()], supportType.metal); } static constexpr CoordsXYZ diagBrakeBoundsOffsets[4] = { @@ -5691,7 +5691,7 @@ static void LoopingRCTrackDiag25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5722,7 +5722,7 @@ static void LoopingRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5753,7 +5753,7 @@ static void LoopingRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5785,7 +5785,7 @@ static void LoopingRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5854,7 +5854,7 @@ static void LoopingRCTrackDiag60DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5885,7 +5885,7 @@ static void LoopingRCTrackDiag60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5916,7 +5916,7 @@ static void LoopingRCTrackDiag60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5948,7 +5948,7 @@ static void LoopingRCTrackDiag60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6017,7 +6017,7 @@ static void LoopingRCTrackDiagFlatTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6048,7 +6048,7 @@ static void LoopingRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6079,7 +6079,7 @@ static void LoopingRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6111,7 +6111,7 @@ static void LoopingRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6180,7 +6180,7 @@ static void LoopingRCTrackDiag25DegUpTo60DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6211,7 +6211,7 @@ static void LoopingRCTrackDiag25DegUpTo60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6242,7 +6242,7 @@ static void LoopingRCTrackDiag25DegUpTo60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6274,7 +6274,7 @@ static void LoopingRCTrackDiag25DegUpTo60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6343,7 +6343,7 @@ static void LoopingRCTrackDiag60DegUpTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6374,7 +6374,7 @@ static void LoopingRCTrackDiag60DegUpTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6405,7 +6405,7 @@ static void LoopingRCTrackDiag60DegUpTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6437,7 +6437,7 @@ static void LoopingRCTrackDiag60DegUpTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6506,7 +6506,7 @@ static void LoopingRCTrackDiag25DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6537,7 +6537,7 @@ static void LoopingRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6568,7 +6568,7 @@ static void LoopingRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6600,7 +6600,7 @@ static void LoopingRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6669,7 +6669,7 @@ static void LoopingRCTrackDiag25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6700,7 +6700,7 @@ static void LoopingRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6731,7 +6731,7 @@ static void LoopingRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6763,7 +6763,7 @@ static void LoopingRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6832,7 +6832,7 @@ static void LoopingRCTrackDiag60DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6863,7 +6863,7 @@ static void LoopingRCTrackDiag60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6894,7 +6894,7 @@ static void LoopingRCTrackDiag60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6926,7 +6926,7 @@ static void LoopingRCTrackDiag60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6995,7 +6995,7 @@ static void LoopingRCTrackDiagFlatTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7025,7 +7025,7 @@ static void LoopingRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7055,7 +7055,7 @@ static void LoopingRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7086,7 +7086,7 @@ static void LoopingRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7156,7 +7156,7 @@ static void LoopingRCTrackDiag25DegDownTo60DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7187,7 +7187,7 @@ static void LoopingRCTrackDiag25DegDownTo60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7218,7 +7218,7 @@ static void LoopingRCTrackDiag25DegDownTo60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7250,7 +7250,7 @@ static void LoopingRCTrackDiag25DegDownTo60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7319,7 +7319,7 @@ static void LoopingRCTrackDiag60DegDownTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7350,7 +7350,7 @@ static void LoopingRCTrackDiag60DegDownTo25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7381,7 +7381,7 @@ static void LoopingRCTrackDiag60DegDownTo25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7413,7 +7413,7 @@ static void LoopingRCTrackDiag60DegDownTo25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7482,7 +7482,7 @@ static void LoopingRCTrackDiag25DegDownToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7513,7 +7513,7 @@ static void LoopingRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7544,7 +7544,7 @@ static void LoopingRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7576,7 +7576,7 @@ static void LoopingRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { diff --git a/src/openrct2/paint/track/coaster/MineTrainCoaster.cpp b/src/openrct2/paint/track/coaster/MineTrainCoaster.cpp index 53a090d71e..d7ec94274d 100644 --- a/src/openrct2/paint/track/coaster/MineTrainCoaster.cpp +++ b/src/openrct2/paint/track/coaster/MineTrainCoaster.cpp @@ -71,7 +71,7 @@ static void MineTrainRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -133,9 +133,9 @@ static void MineTrainRCTrackStation( 20064, 20065, }; - if (trackElement.GetTrackType() == TrackElemType::endStation) + if (trackElement.getTrackType() == TrackElemType::endStation) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kMineTrainBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height + 1 }, { 32, 20, 1 } }); @@ -165,7 +165,7 @@ static void MineTrainRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -282,7 +282,7 @@ static void MineTrainRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -455,7 +455,7 @@ static void MineTrainRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5238,7 +5238,7 @@ static void MineTrainRCTrackDiagFlat( }; TrackPaintUtilDiagTilesPaint( - session, 1, height, direction, trackSequence, images[trackElement.HasChain()], defaultDiagTileOffsets, + session, 1, height, direction, trackSequence, images[trackElement.hasChain()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); switch (trackSequence) @@ -5280,7 +5280,7 @@ static void MineTrainRCTrackDiagBlockBrakes( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilDiagTilesPaint( - session, 13, height, direction, trackSequence, kMinetrainRCDiagBlockBrakeImages[trackElement.IsBrakeClosed()], + session, 13, height, direction, trackSequence, kMinetrainRCDiagBlockBrakeImages[trackElement.isBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (MineTrainRCDiagonalSupports[trackSequence][direction] != WoodenSupportSubType::null) @@ -5303,7 +5303,7 @@ static void MineTrainRCTrackDiag25DegUp( case 0: if (direction == 3) { - ImageIndex imageIndex = trackElement.HasChain() ? 20401 : 20373; + ImageIndex imageIndex = trackElement.hasChain() ? 20401 : 20373; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5313,7 +5313,7 @@ static void MineTrainRCTrackDiag25DegUp( case 1: if (direction == 0) { - ImageIndex imageIndex = trackElement.HasChain() ? 20398 : 20370; + ImageIndex imageIndex = trackElement.hasChain() ? 20398 : 20370; PaintAddImageAsParent( session, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5323,7 +5323,7 @@ static void MineTrainRCTrackDiag25DegUp( case 2: if (direction == 2) { - ImageIndex imageIndex = trackElement.HasChain() ? 20400 : 20372; + ImageIndex imageIndex = trackElement.hasChain() ? 20400 : 20372; PaintAddImageAsParent( session, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5333,7 +5333,7 @@ static void MineTrainRCTrackDiag25DegUp( case 3: if (direction == 1) { - ImageIndex imageIndex = trackElement.HasChain() ? 20399 : 20371; + ImageIndex imageIndex = trackElement.hasChain() ? 20399 : 20371; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5417,7 +5417,7 @@ static void MineTrainRCTrackDiagFlatTo25DegUp( case 0: if (direction == 3) { - ImageIndex imageIndex = trackElement.HasChain() ? 20393 : 20365; + ImageIndex imageIndex = trackElement.hasChain() ? 20393 : 20365; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5429,7 +5429,7 @@ static void MineTrainRCTrackDiagFlatTo25DegUp( case 1: if (direction == 0) { - ImageIndex imageIndex = trackElement.HasChain() ? 20390 : 20362; + ImageIndex imageIndex = trackElement.hasChain() ? 20390 : 20362; PaintAddImageAsParent( session, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5444,7 +5444,7 @@ static void MineTrainRCTrackDiagFlatTo25DegUp( case 2: if (direction == 2) { - ImageIndex imageIndex = trackElement.HasChain() ? 20392 : 20364; + ImageIndex imageIndex = trackElement.hasChain() ? 20392 : 20364; PaintAddImageAsParent( session, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5459,7 +5459,7 @@ static void MineTrainRCTrackDiagFlatTo25DegUp( case 3: if (direction == 1) { - ImageIndex imageIndex = trackElement.HasChain() ? 20391 : 20363; + ImageIndex imageIndex = trackElement.hasChain() ? 20391 : 20363; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5602,7 +5602,7 @@ static void MineTrainRCTrackDiag25DegUpToFlat( case 0: if (direction == 3) { - ImageIndex imageIndex = trackElement.HasChain() ? 20397 : 20369; + ImageIndex imageIndex = trackElement.hasChain() ? 20397 : 20369; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5614,7 +5614,7 @@ static void MineTrainRCTrackDiag25DegUpToFlat( case 1: if (direction == 0) { - ImageIndex imageIndex = trackElement.HasChain() ? 20394 : 20366; + ImageIndex imageIndex = trackElement.hasChain() ? 20394 : 20366; PaintAddImageAsParent( session, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5629,7 +5629,7 @@ static void MineTrainRCTrackDiag25DegUpToFlat( case 2: if (direction == 2) { - ImageIndex imageIndex = trackElement.HasChain() ? 20396 : 20368; + ImageIndex imageIndex = trackElement.hasChain() ? 20396 : 20368; PaintAddImageAsParent( session, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5644,7 +5644,7 @@ static void MineTrainRCTrackDiag25DegUpToFlat( case 3: if (direction == 1) { - ImageIndex imageIndex = trackElement.HasChain() ? 20395 : 20367; + ImageIndex imageIndex = trackElement.hasChain() ? 20395 : 20367; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5666,7 +5666,7 @@ static void MineTrainRCTrackDiag25DegDown( case 0: if (direction == 3) { - ImageIndex imageIndex = trackElement.HasChain() ? 20399 : 20371; + ImageIndex imageIndex = trackElement.hasChain() ? 20399 : 20371; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5678,7 +5678,7 @@ static void MineTrainRCTrackDiag25DegDown( case 1: if (direction == 0) { - ImageIndex imageIndex = trackElement.HasChain() ? 20400 : 20372; + ImageIndex imageIndex = trackElement.hasChain() ? 20400 : 20372; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5693,7 +5693,7 @@ static void MineTrainRCTrackDiag25DegDown( case 2: if (direction == 2) { - ImageIndex imageIndex = trackElement.HasChain() ? 20398 : 20370; + ImageIndex imageIndex = trackElement.hasChain() ? 20398 : 20370; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5708,7 +5708,7 @@ static void MineTrainRCTrackDiag25DegDown( case 3: if (direction == 1) { - ImageIndex imageIndex = trackElement.HasChain() ? 20401 : 20373; + ImageIndex imageIndex = trackElement.hasChain() ? 20401 : 20373; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5790,7 +5790,7 @@ static void MineTrainRCTrackDiagFlatTo25DegDown( case 0: if (direction == 3) { - ImageIndex imageIndex = trackElement.HasChain() ? 20395 : 20367; + ImageIndex imageIndex = trackElement.hasChain() ? 20395 : 20367; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5801,7 +5801,7 @@ static void MineTrainRCTrackDiagFlatTo25DegDown( case 1: if (direction == 0) { - ImageIndex imageIndex = trackElement.HasChain() ? 20396 : 20368; + ImageIndex imageIndex = trackElement.hasChain() ? 20396 : 20368; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5815,7 +5815,7 @@ static void MineTrainRCTrackDiagFlatTo25DegDown( case 2: if (direction == 2) { - ImageIndex imageIndex = trackElement.HasChain() ? 20394 : 20366; + ImageIndex imageIndex = trackElement.hasChain() ? 20394 : 20366; PaintAddImageAsParent( session, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5829,7 +5829,7 @@ static void MineTrainRCTrackDiagFlatTo25DegDown( case 3: if (direction == 1) { - ImageIndex imageIndex = trackElement.HasChain() ? 20397 : 20369; + ImageIndex imageIndex = trackElement.hasChain() ? 20397 : 20369; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5972,7 +5972,7 @@ static void MineTrainRCTrackDiag25DegDownToFlat( case 0: if (direction == 3) { - ImageIndex imageIndex = trackElement.HasChain() ? 20391 : 20363; + ImageIndex imageIndex = trackElement.hasChain() ? 20391 : 20363; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5984,7 +5984,7 @@ static void MineTrainRCTrackDiag25DegDownToFlat( case 1: if (direction == 0) { - ImageIndex imageIndex = trackElement.HasChain() ? 20392 : 20364; + ImageIndex imageIndex = trackElement.hasChain() ? 20392 : 20364; PaintAddImageAsParent( session, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -5999,7 +5999,7 @@ static void MineTrainRCTrackDiag25DegDownToFlat( case 2: if (direction == 2) { - ImageIndex imageIndex = trackElement.HasChain() ? 20390 : 20362; + ImageIndex imageIndex = trackElement.hasChain() ? 20390 : 20362; PaintAddImageAsParent( session, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -6014,7 +6014,7 @@ static void MineTrainRCTrackDiag25DegDownToFlat( case 3: if (direction == 1) { - ImageIndex imageIndex = trackElement.HasChain() ? 20393 : 20365; + ImageIndex imageIndex = trackElement.hasChain() ? 20393 : 20365; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIndex), { -16, -16, height }, { { -16, -16, height }, { 32, 32, 1 } }); @@ -6916,7 +6916,7 @@ static void MineTrainRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kMineTrainBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); diff --git a/src/openrct2/paint/track/coaster/MiniRollerCoaster.cpp b/src/openrct2/paint/track/coaster/MiniRollerCoaster.cpp index d06900433f..44afc700a8 100644 --- a/src/openrct2/paint/track/coaster/MiniRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/MiniRollerCoaster.cpp @@ -48,7 +48,7 @@ static void MiniRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -113,9 +113,9 @@ static void MiniRCTrackStation( 18747, }; - if (trackElement.GetTrackType() == TrackElemType::endStation) + if (trackElement.getTrackType() == TrackElemType::endStation) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kMiniRCBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); @@ -145,7 +145,7 @@ static void MiniRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -264,7 +264,7 @@ static void MiniRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -440,7 +440,7 @@ static void MiniRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4995,7 +4995,7 @@ static void MiniRCTrackDiagFlat( }; TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, images[trackElement.HasChain()], defaultDiagTileOffsets, + session, 3, height, direction, trackSequence, images[trackElement.hasChain()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) @@ -5015,7 +5015,7 @@ static void MiniRCTrackDiag25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5046,7 +5046,7 @@ static void MiniRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5077,7 +5077,7 @@ static void MiniRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5109,7 +5109,7 @@ static void MiniRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5234,7 +5234,7 @@ static void MiniRCTrackDiagFlatTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5265,7 +5265,7 @@ static void MiniRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5296,7 +5296,7 @@ static void MiniRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5328,7 +5328,7 @@ static void MiniRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5533,7 +5533,7 @@ static void MiniRCTrackDiag25DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5564,7 +5564,7 @@ static void MiniRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5595,7 +5595,7 @@ static void MiniRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5627,7 +5627,7 @@ static void MiniRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5670,7 +5670,7 @@ static void MiniRCTrackDiag25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5701,7 +5701,7 @@ static void MiniRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5732,7 +5732,7 @@ static void MiniRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5764,7 +5764,7 @@ static void MiniRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5889,7 +5889,7 @@ static void MiniRCTrackDiagFlatTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5919,7 +5919,7 @@ static void MiniRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5949,7 +5949,7 @@ static void MiniRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5980,7 +5980,7 @@ static void MiniRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6186,7 +6186,7 @@ static void MiniRCTrackDiag25DegDownToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6217,7 +6217,7 @@ static void MiniRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6248,7 +6248,7 @@ static void MiniRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6280,7 +6280,7 @@ static void MiniRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7486,7 +7486,7 @@ static void MiniRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kMiniRCBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); diff --git a/src/openrct2/paint/track/coaster/MiniSuspendedCoaster.cpp b/src/openrct2/paint/track/coaster/MiniSuspendedCoaster.cpp index 9929605e61..9b9ebda32a 100644 --- a/src/openrct2/paint/track/coaster/MiniSuspendedCoaster.cpp +++ b/src/openrct2/paint/track/coaster/MiniSuspendedCoaster.cpp @@ -31,7 +31,7 @@ static void MiniSuspendedRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -108,7 +108,7 @@ static void MiniSuspendedRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -184,7 +184,7 @@ static void MiniSuspendedRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -260,7 +260,7 @@ static void MiniSuspendedRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1340,7 +1340,7 @@ static void MiniSuspendedRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - const auto* images = kMiniSuspendedRCFlatImages[trackElement.HasChain()]; + const auto* images = kMiniSuspendedRCFlatImages[trackElement.hasChain()]; TrackPaintUtilDiagTilesPaint( session, 1, height + 24, direction, trackSequence, images, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -1362,7 +1362,7 @@ static void MiniSuspendedRCTrackDiag25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1393,7 +1393,7 @@ static void MiniSuspendedRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1424,7 +1424,7 @@ static void MiniSuspendedRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1456,7 +1456,7 @@ static void MiniSuspendedRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1501,7 +1501,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1532,7 +1532,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1563,7 +1563,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1595,7 +1595,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1640,7 +1640,7 @@ static void MiniSuspendedRCTrackDiag25DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1671,7 +1671,7 @@ static void MiniSuspendedRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1702,7 +1702,7 @@ static void MiniSuspendedRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1734,7 +1734,7 @@ static void MiniSuspendedRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1779,7 +1779,7 @@ static void MiniSuspendedRCTrackDiag25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1810,7 +1810,7 @@ static void MiniSuspendedRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1841,7 +1841,7 @@ static void MiniSuspendedRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1873,7 +1873,7 @@ static void MiniSuspendedRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1918,7 +1918,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1948,7 +1948,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1978,7 +1978,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2009,7 +2009,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2054,7 +2054,7 @@ static void MiniSuspendedRCTrackDiag25DegDownToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2085,7 +2085,7 @@ static void MiniSuspendedRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2116,7 +2116,7 @@ static void MiniSuspendedRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2148,7 +2148,7 @@ static void MiniSuspendedRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { diff --git a/src/openrct2/paint/track/coaster/MultiDimensionRollerCoaster.cpp b/src/openrct2/paint/track/coaster/MultiDimensionRollerCoaster.cpp index 30f830e3b2..ffaf67e637 100644 --- a/src/openrct2/paint/track/coaster/MultiDimensionRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/MultiDimensionRollerCoaster.cpp @@ -70,7 +70,7 @@ static void MultiDimensionRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -142,9 +142,9 @@ static void MultiDimensionRCTrackStation( } }; - if (trackElement.GetTrackType() == TrackElemType::endStation) + if (trackElement.getTrackType() == TrackElemType::endStation) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); uint8_t offset = isClosed ? 2 : 1; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIds[noPlatforms][direction][offset]), { 0, 0, height }, @@ -200,7 +200,7 @@ static void MultiDimensionRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -321,7 +321,7 @@ static void MultiDimensionRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -498,7 +498,7 @@ static void MultiDimensionRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4181,7 +4181,7 @@ static void MultiDimensionRCTrackDiagFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4212,7 +4212,7 @@ static void MultiDimensionRCTrackDiagFlat( PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4243,7 +4243,7 @@ static void MultiDimensionRCTrackDiagFlat( PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4275,7 +4275,7 @@ static void MultiDimensionRCTrackDiagFlat( PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4361,7 +4361,7 @@ static void MultiDimensionRCTrackDiagBlockBrakes( { int32_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, MultidimDiagBlockBrakeImages[trackElement.IsBrakeClosed()], + session, 3, height, direction, trackSequence, MultidimDiagBlockBrakeImages[trackElement.isBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) @@ -4382,7 +4382,7 @@ static void MultiDimensionRCTrackDiag25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4413,7 +4413,7 @@ static void MultiDimensionRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4444,7 +4444,7 @@ static void MultiDimensionRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4476,7 +4476,7 @@ static void MultiDimensionRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4638,7 +4638,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4669,7 +4669,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4700,7 +4700,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4732,7 +4732,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4987,7 +4987,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5018,7 +5018,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5049,7 +5049,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5081,7 +5081,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5150,7 +5150,7 @@ static void MultiDimensionRCTrackDiag25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5181,7 +5181,7 @@ static void MultiDimensionRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5212,7 +5212,7 @@ static void MultiDimensionRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5244,7 +5244,7 @@ static void MultiDimensionRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5406,7 +5406,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5436,7 +5436,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5466,7 +5466,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5497,7 +5497,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5753,7 +5753,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5784,7 +5784,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5815,7 +5815,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5847,7 +5847,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7485,7 +7485,7 @@ static void MultiDimensionRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); static constexpr uint32_t imageIds[kNumOrthogonalDirections][2] = { { MULTI_DIM_NON_INVERTED_BLOCK_BRAKE_SW_NE_OPEN, MULTI_DIM_NON_INVERTED_BLOCK_BRAKE_SW_NE_CLOSED }, diff --git a/src/openrct2/paint/track/coaster/MultiDimensionRollerCoasterInverted.cpp b/src/openrct2/paint/track/coaster/MultiDimensionRollerCoasterInverted.cpp index 846ee259e7..76242e0a19 100644 --- a/src/openrct2/paint/track/coaster/MultiDimensionRollerCoasterInverted.cpp +++ b/src/openrct2/paint/track/coaster/MultiDimensionRollerCoasterInverted.cpp @@ -3105,7 +3105,7 @@ namespace OpenRCT2::MultiDimensionRCInverted switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3137,7 +3137,7 @@ namespace OpenRCT2::MultiDimensionRCInverted PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3168,7 +3168,7 @@ namespace OpenRCT2::MultiDimensionRCInverted PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3200,7 +3200,7 @@ namespace OpenRCT2::MultiDimensionRCInverted PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3262,7 +3262,7 @@ namespace OpenRCT2::MultiDimensionRCInverted switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3294,7 +3294,7 @@ namespace OpenRCT2::MultiDimensionRCInverted PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3325,7 +3325,7 @@ namespace OpenRCT2::MultiDimensionRCInverted PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3357,7 +3357,7 @@ namespace OpenRCT2::MultiDimensionRCInverted PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3521,7 +3521,7 @@ namespace OpenRCT2::MultiDimensionRCInverted switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3553,7 +3553,7 @@ namespace OpenRCT2::MultiDimensionRCInverted PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3584,7 +3584,7 @@ namespace OpenRCT2::MultiDimensionRCInverted PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3616,7 +3616,7 @@ namespace OpenRCT2::MultiDimensionRCInverted PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3882,7 +3882,7 @@ namespace OpenRCT2::MultiDimensionRCInverted switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3914,7 +3914,7 @@ namespace OpenRCT2::MultiDimensionRCInverted PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3945,7 +3945,7 @@ namespace OpenRCT2::MultiDimensionRCInverted PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3977,7 +3977,7 @@ namespace OpenRCT2::MultiDimensionRCInverted PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6302,7 +6302,7 @@ namespace OpenRCT2::MultiDimensionRCInverted PaintSession& session, const Ride& ride, const uint8_t trackSequence, const Direction direction, const int32_t height, const TrackElement& trackElement, const SupportType supportType) { - const bool isClosed = trackElement.IsBrakeClosed(); + const bool isClosed = trackElement.isBrakeClosed(); static constexpr uint32_t imageIds[kNumOrthogonalDirections][2] = { { MULTI_DIM_INVERTED_BLOCK_BRAKE_SW_NE_OPEN, MULTI_DIM_INVERTED_BLOCK_BRAKE_SW_NE_CLOSED }, { MULTI_DIM_INVERTED_BLOCK_BRAKE_NW_SE_OPEN, MULTI_DIM_INVERTED_BLOCK_BRAKE_NW_SE_CLOSED }, @@ -6546,7 +6546,7 @@ namespace OpenRCT2::MultiDimensionRCInverted const TrackElement& trackElement, const SupportType supportType) { TrackPaintUtilDiagTilesPaint( - session, -3, height + 24, direction, trackSequence, kMultidimDiagBlockBrakeImages[trackElement.IsBrakeClosed()], + session, -3, height + 24, direction, trackSequence, kMultidimDiagBlockBrakeImages[trackElement.isBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); const uint16_t blockedSegments = BlockedSegments::kDiagStraightFlat[trackSequence]; diff --git a/src/openrct2/paint/track/coaster/ReverserRollerCoaster.cpp b/src/openrct2/paint/track/coaster/ReverserRollerCoaster.cpp index 2b13f09ced..13d211348a 100644 --- a/src/openrct2/paint/track/coaster/ReverserRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/ReverserRollerCoaster.cpp @@ -24,7 +24,7 @@ static void ReverserRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -93,7 +93,7 @@ static void ReverserRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -164,7 +164,7 @@ static void ReverserRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -235,7 +235,7 @@ static void ReverserRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { diff --git a/src/openrct2/paint/track/coaster/SideFrictionRollerCoaster.cpp b/src/openrct2/paint/track/coaster/SideFrictionRollerCoaster.cpp index f0c7c14c5e..47d4833343 100644 --- a/src/openrct2/paint/track/coaster/SideFrictionRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/SideFrictionRollerCoaster.cpp @@ -71,7 +71,7 @@ static void SideFrictionRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -173,7 +173,7 @@ static void SideFrictionRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -268,7 +268,7 @@ static void SideFrictionRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -363,7 +363,7 @@ static void SideFrictionRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1724,7 +1724,7 @@ static void SideFrictionRCTrackDiagFlat( }; TrackPaintUtilDiagTilesPaint( - session, 2, height, direction, trackSequence, kImages[trackElement.HasChain()], defaultDiagTileOffsets, + session, 2, height, direction, trackSequence, kImages[trackElement.hasChain()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); switch (trackSequence) @@ -1733,7 +1733,7 @@ static void SideFrictionRCTrackDiagFlat( if (direction == 0) { PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(additionalImages[trackElement.HasChain()][direction]), + session, direction, session.TrackColours.WithIndex(additionalImages[trackElement.hasChain()][direction]), { -16, -16, height }, { { -16, -16, height + 24 }, { 32, 32, 0 } }); } break; @@ -1741,7 +1741,7 @@ static void SideFrictionRCTrackDiagFlat( if (direction == 2) { PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(additionalImages[trackElement.HasChain()][direction]), + session, direction, session.TrackColours.WithIndex(additionalImages[trackElement.hasChain()][direction]), { -16, -16, height }, { { -16, -16, height + 24 }, { 32, 32, 0 } }); } break; @@ -1761,7 +1761,7 @@ static void SideFrictionRCTrackDiag25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1785,7 +1785,7 @@ static void SideFrictionRCTrackDiag25DegUp( } break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1815,7 +1815,7 @@ static void SideFrictionRCTrackDiag25DegUp( } break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1845,7 +1845,7 @@ static void SideFrictionRCTrackDiag25DegUp( } break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1884,7 +1884,7 @@ static void SideFrictionRCTrackDiagFlatTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1910,7 +1910,7 @@ static void SideFrictionRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1944,7 +1944,7 @@ static void SideFrictionRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1978,7 +1978,7 @@ static void SideFrictionRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2014,7 +2014,7 @@ static void SideFrictionRCTrackDiag25DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2038,7 +2038,7 @@ static void SideFrictionRCTrackDiag25DegUpToFlat( } break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2068,7 +2068,7 @@ static void SideFrictionRCTrackDiag25DegUpToFlat( } break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2098,7 +2098,7 @@ static void SideFrictionRCTrackDiag25DegUpToFlat( } break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2137,7 +2137,7 @@ static void SideFrictionRCTrackDiag25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2161,7 +2161,7 @@ static void SideFrictionRCTrackDiag25DegDown( } break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2191,7 +2191,7 @@ static void SideFrictionRCTrackDiag25DegDown( } break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2221,7 +2221,7 @@ static void SideFrictionRCTrackDiag25DegDown( } break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2260,7 +2260,7 @@ static void SideFrictionRCTrackDiagFlatTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2284,7 +2284,7 @@ static void SideFrictionRCTrackDiagFlatTo25DegDown( } break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2314,7 +2314,7 @@ static void SideFrictionRCTrackDiagFlatTo25DegDown( } break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2344,7 +2344,7 @@ static void SideFrictionRCTrackDiagFlatTo25DegDown( } break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2383,7 +2383,7 @@ static void SideFrictionRCTrackDiag25DegDownToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2409,7 +2409,7 @@ static void SideFrictionRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2443,7 +2443,7 @@ static void SideFrictionRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2477,7 +2477,7 @@ static void SideFrictionRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { diff --git a/src/openrct2/paint/track/coaster/SingleRailRollerCoaster.cpp b/src/openrct2/paint/track/coaster/SingleRailRollerCoaster.cpp index 911db0c614..4ab7c38f34 100644 --- a/src/openrct2/paint/track/coaster/SingleRailRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/SingleRailRollerCoaster.cpp @@ -34,7 +34,7 @@ namespace OpenRCT2::SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -117,7 +117,7 @@ namespace OpenRCT2::SingleRailRC }, }; - if (trackElement.GetTrackType() == TrackElemType::endStation) + if (trackElement.getTrackType() == TrackElemType::endStation) { PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 0, height }, @@ -147,7 +147,7 @@ namespace OpenRCT2::SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -226,7 +226,7 @@ namespace OpenRCT2::SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -305,7 +305,7 @@ namespace OpenRCT2::SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -384,7 +384,7 @@ namespace OpenRCT2::SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -475,7 +475,7 @@ namespace OpenRCT2::SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -566,7 +566,7 @@ namespace OpenRCT2::SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1573,7 +1573,7 @@ namespace OpenRCT2::SingleRailRC }; TrackPaintUtilDiagTilesPaintExtra( - session, 3, height, direction, trackSequence, images[trackElement.HasChain()], supportType.metal); + session, 3, height, direction, trackSequence, images[trackElement.hasChain()], supportType.metal); } static void TrackDiagBrakes( @@ -1777,7 +1777,7 @@ namespace OpenRCT2::SingleRailRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1811,7 +1811,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1844,7 +1844,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1878,7 +1878,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1948,7 +1948,7 @@ namespace OpenRCT2::SingleRailRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1982,7 +1982,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2015,7 +2015,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2049,7 +2049,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2119,7 +2119,7 @@ namespace OpenRCT2::SingleRailRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2153,7 +2153,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2186,7 +2186,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2220,7 +2220,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2292,7 +2292,7 @@ namespace OpenRCT2::SingleRailRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2326,7 +2326,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2359,7 +2359,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2393,7 +2393,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2463,7 +2463,7 @@ namespace OpenRCT2::SingleRailRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2496,7 +2496,7 @@ namespace OpenRCT2::SingleRailRC 0xFFFF, 0); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2528,7 +2528,7 @@ namespace OpenRCT2::SingleRailRC 0xFFFF, 0); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2561,7 +2561,7 @@ namespace OpenRCT2::SingleRailRC 0xFFFF, 0); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2632,7 +2632,7 @@ namespace OpenRCT2::SingleRailRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2666,7 +2666,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2699,7 +2699,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2733,7 +2733,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2803,7 +2803,7 @@ namespace OpenRCT2::SingleRailRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2837,7 +2837,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2870,7 +2870,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2904,7 +2904,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2976,7 +2976,7 @@ namespace OpenRCT2::SingleRailRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3010,7 +3010,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3043,7 +3043,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3077,7 +3077,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3149,7 +3149,7 @@ namespace OpenRCT2::SingleRailRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3183,7 +3183,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3216,7 +3216,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3250,7 +3250,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3322,7 +3322,7 @@ namespace OpenRCT2::SingleRailRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3356,7 +3356,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3389,7 +3389,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3423,7 +3423,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3495,7 +3495,7 @@ namespace OpenRCT2::SingleRailRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3529,7 +3529,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3562,7 +3562,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3596,7 +3596,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3668,7 +3668,7 @@ namespace OpenRCT2::SingleRailRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3702,7 +3702,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3735,7 +3735,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3769,7 +3769,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -14452,7 +14452,7 @@ namespace OpenRCT2::SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -14561,7 +14561,7 @@ namespace OpenRCT2::SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -14673,7 +14673,7 @@ namespace OpenRCT2::SingleRailRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -14707,7 +14707,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -14740,7 +14740,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -14774,7 +14774,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -14844,7 +14844,7 @@ namespace OpenRCT2::SingleRailRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -14878,7 +14878,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -14911,7 +14911,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -14945,7 +14945,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -15017,7 +15017,7 @@ namespace OpenRCT2::SingleRailRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -15051,7 +15051,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -15084,7 +15084,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -15118,7 +15118,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -15190,7 +15190,7 @@ namespace OpenRCT2::SingleRailRC switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -15224,7 +15224,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -15257,7 +15257,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -15291,7 +15291,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { diff --git a/src/openrct2/paint/track/coaster/StandUpRollerCoaster.cpp b/src/openrct2/paint/track/coaster/StandUpRollerCoaster.cpp index 60330a1024..3aa61da7d5 100644 --- a/src/openrct2/paint/track/coaster/StandUpRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/StandUpRollerCoaster.cpp @@ -70,7 +70,7 @@ static void StandUpRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -133,9 +133,9 @@ static void StandUpRCTrackStation( 25568, }; - if (trackElement.GetTrackType() == TrackElemType::endStation) + if (trackElement.getTrackType() == TrackElemType::endStation) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kStandUpBlockBrakeImages[direction][isClosed]), { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); @@ -165,7 +165,7 @@ static void StandUpRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -234,7 +234,7 @@ static void StandUpRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -307,7 +307,7 @@ static void StandUpRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -376,7 +376,7 @@ static void StandUpRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -461,7 +461,7 @@ static void StandUpRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -546,7 +546,7 @@ static void StandUpRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1583,7 +1583,7 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1647,7 +1647,7 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1702,7 +1702,7 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1758,7 +1758,7 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1813,7 +1813,7 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1889,7 +1889,7 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1953,7 +1953,7 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2008,7 +2008,7 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2064,7 +2064,7 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 5: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2119,7 +2119,7 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 6: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3314,7 +3314,7 @@ static void StandUpRCTrackLeftQuarterTurn325DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3393,7 +3393,7 @@ static void StandUpRCTrackLeftQuarterTurn325DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3481,7 +3481,7 @@ static void StandUpRCTrackRightQuarterTurn325DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3560,7 +3560,7 @@ static void StandUpRCTrackRightQuarterTurn325DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6321,7 +6321,7 @@ static void StandUpRCTrackDiagFlat( { 25753, 25754, 25755, 25756 }, }; TrackPaintUtilDiagTilesPaintExtra( - session, 3, height, direction, trackSequence, images[trackElement.HasChain()], supportType.metal); + session, 3, height, direction, trackSequence, images[trackElement.hasChain()], supportType.metal); } static void StandUpRCTrackDiagBrakes( @@ -6337,7 +6337,7 @@ static void StandUpRCTrackDiagBlockBrakes( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilDiagTilesPaintExtra( - session, 3, height, direction, trackSequence, kStandupRCDiagBlockBrakeImages[trackElement.IsBrakeClosed()], + session, 3, height, direction, trackSequence, kStandupRCDiagBlockBrakeImages[trackElement.isBrakeClosed()], supportType.metal); } @@ -6349,7 +6349,7 @@ static void StandUpRCTrackDiag25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6380,7 +6380,7 @@ static void StandUpRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6411,7 +6411,7 @@ static void StandUpRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6443,7 +6443,7 @@ static void StandUpRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6512,7 +6512,7 @@ static void StandUpRCTrackDiag60DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6543,7 +6543,7 @@ static void StandUpRCTrackDiag60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6574,7 +6574,7 @@ static void StandUpRCTrackDiag60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6606,7 +6606,7 @@ static void StandUpRCTrackDiag60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6675,7 +6675,7 @@ static void StandUpRCTrackDiagFlatTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6706,7 +6706,7 @@ static void StandUpRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6737,7 +6737,7 @@ static void StandUpRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6769,7 +6769,7 @@ static void StandUpRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6838,7 +6838,7 @@ static void StandUpRCTrackDiag25DegUpTo60DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6869,7 +6869,7 @@ static void StandUpRCTrackDiag25DegUpTo60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6900,7 +6900,7 @@ static void StandUpRCTrackDiag25DegUpTo60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6932,7 +6932,7 @@ static void StandUpRCTrackDiag25DegUpTo60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7001,7 +7001,7 @@ static void StandUpRCTrackDiag60DegUpTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7032,7 +7032,7 @@ static void StandUpRCTrackDiag60DegUpTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7063,7 +7063,7 @@ static void StandUpRCTrackDiag60DegUpTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7095,7 +7095,7 @@ static void StandUpRCTrackDiag60DegUpTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7164,7 +7164,7 @@ static void StandUpRCTrackDiag25DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7195,7 +7195,7 @@ static void StandUpRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7226,7 +7226,7 @@ static void StandUpRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7258,7 +7258,7 @@ static void StandUpRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7327,7 +7327,7 @@ static void StandUpRCTrackDiag25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7358,7 +7358,7 @@ static void StandUpRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7389,7 +7389,7 @@ static void StandUpRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7421,7 +7421,7 @@ static void StandUpRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7490,7 +7490,7 @@ static void StandUpRCTrackDiag60DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7521,7 +7521,7 @@ static void StandUpRCTrackDiag60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7552,7 +7552,7 @@ static void StandUpRCTrackDiag60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7584,7 +7584,7 @@ static void StandUpRCTrackDiag60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7653,7 +7653,7 @@ static void StandUpRCTrackDiagFlatTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7683,7 +7683,7 @@ static void StandUpRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7713,7 +7713,7 @@ static void StandUpRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7744,7 +7744,7 @@ static void StandUpRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7814,7 +7814,7 @@ static void StandUpRCTrackDiag25DegDownTo60DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7845,7 +7845,7 @@ static void StandUpRCTrackDiag25DegDownTo60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7876,7 +7876,7 @@ static void StandUpRCTrackDiag25DegDownTo60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7908,7 +7908,7 @@ static void StandUpRCTrackDiag25DegDownTo60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7977,7 +7977,7 @@ static void StandUpRCTrackDiag60DegDownTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8008,7 +8008,7 @@ static void StandUpRCTrackDiag60DegDownTo25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8039,7 +8039,7 @@ static void StandUpRCTrackDiag60DegDownTo25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8071,7 +8071,7 @@ static void StandUpRCTrackDiag60DegDownTo25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8140,7 +8140,7 @@ static void StandUpRCTrackDiag25DegDownToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8171,7 +8171,7 @@ static void StandUpRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8202,7 +8202,7 @@ static void StandUpRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8234,7 +8234,7 @@ static void StandUpRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -9634,7 +9634,7 @@ static void StandUpRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kStandUpBlockBrakeImages[direction][isClosed]), { 0, 6, height }, { 32, 20, 3 }); diff --git a/src/openrct2/paint/track/coaster/Steeplechase.cpp b/src/openrct2/paint/track/coaster/Steeplechase.cpp index 63d07a45b6..7c9b334b78 100644 --- a/src/openrct2/paint/track/coaster/Steeplechase.cpp +++ b/src/openrct2/paint/track/coaster/Steeplechase.cpp @@ -39,7 +39,7 @@ static void SteeplechaseTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -110,7 +110,7 @@ static void SteeplechaseTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -173,7 +173,7 @@ static void SteeplechaseTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -237,7 +237,7 @@ static void SteeplechaseTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1316,7 +1316,7 @@ static void SteeplechaseTrackDiagFlat( { 28757, 28758, 28759, 28760 }, }; TrackPaintUtilDiagTilesPaintExtra( - session, 3, height, direction, trackSequence, images[trackElement.HasChain()], supportType.metal); + session, 3, height, direction, trackSequence, images[trackElement.hasChain()], supportType.metal); } static void SteeplechaseTrackDiagBrakes( @@ -1346,7 +1346,7 @@ static void SteeplechaseTrackDiag25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1377,7 +1377,7 @@ static void SteeplechaseTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1408,7 +1408,7 @@ static void SteeplechaseTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1440,7 +1440,7 @@ static void SteeplechaseTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1483,7 +1483,7 @@ static void SteeplechaseTrackDiagFlatTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1514,7 +1514,7 @@ static void SteeplechaseTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1545,7 +1545,7 @@ static void SteeplechaseTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1577,7 +1577,7 @@ static void SteeplechaseTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1620,7 +1620,7 @@ static void SteeplechaseTrackDiag25DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1651,7 +1651,7 @@ static void SteeplechaseTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1682,7 +1682,7 @@ static void SteeplechaseTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1714,7 +1714,7 @@ static void SteeplechaseTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1757,7 +1757,7 @@ static void SteeplechaseTrackDiag25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1788,7 +1788,7 @@ static void SteeplechaseTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1819,7 +1819,7 @@ static void SteeplechaseTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1851,7 +1851,7 @@ static void SteeplechaseTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1894,7 +1894,7 @@ static void SteeplechaseTrackDiagFlatTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1924,7 +1924,7 @@ static void SteeplechaseTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1954,7 +1954,7 @@ static void SteeplechaseTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -1985,7 +1985,7 @@ static void SteeplechaseTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2029,7 +2029,7 @@ static void SteeplechaseTrackDiag25DegDownToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2060,7 +2060,7 @@ static void SteeplechaseTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2091,7 +2091,7 @@ static void SteeplechaseTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -2123,7 +2123,7 @@ static void SteeplechaseTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { diff --git a/src/openrct2/paint/track/coaster/SuspendedSwingingCoaster.cpp b/src/openrct2/paint/track/coaster/SuspendedSwingingCoaster.cpp index b3702a88b3..2cc11bb260 100644 --- a/src/openrct2/paint/track/coaster/SuspendedSwingingCoaster.cpp +++ b/src/openrct2/paint/track/coaster/SuspendedSwingingCoaster.cpp @@ -30,7 +30,7 @@ static void SuspendedSwingingRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -110,7 +110,7 @@ static void SuspendedSwingingRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -243,7 +243,7 @@ static void SuspendedSwingingRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -382,7 +382,7 @@ static void SuspendedSwingingRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -487,7 +487,7 @@ static void SuspendedSwingingRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3128,7 +3128,7 @@ static void SuspendedSwingingRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - const auto* images = kSuspendedSwingingRCDiagFlatImages[trackElement.HasChain()]; + const auto* images = kSuspendedSwingingRCDiagFlatImages[trackElement.hasChain()]; TrackPaintUtilDiagTilesPaint( session, 3, height + 29, direction, trackSequence, images, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -3150,7 +3150,7 @@ static void SuspendedSwingingRCTrackDiag25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3181,7 +3181,7 @@ static void SuspendedSwingingRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3212,7 +3212,7 @@ static void SuspendedSwingingRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3244,7 +3244,7 @@ static void SuspendedSwingingRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3406,7 +3406,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3437,7 +3437,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3468,7 +3468,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3500,7 +3500,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3762,7 +3762,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3793,7 +3793,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3824,7 +3824,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3856,7 +3856,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3918,7 +3918,7 @@ static void SuspendedSwingingRCTrackDiag25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3949,7 +3949,7 @@ static void SuspendedSwingingRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -3980,7 +3980,7 @@ static void SuspendedSwingingRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4012,7 +4012,7 @@ static void SuspendedSwingingRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4153,7 +4153,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4183,7 +4183,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4213,7 +4213,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4244,7 +4244,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4506,7 +4506,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4537,7 +4537,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4568,7 +4568,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -4600,7 +4600,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { diff --git a/src/openrct2/paint/track/coaster/TwisterRollerCoaster.cpp b/src/openrct2/paint/track/coaster/TwisterRollerCoaster.cpp index 746129e297..37cdfd9194 100644 --- a/src/openrct2/paint/track/coaster/TwisterRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/TwisterRollerCoaster.cpp @@ -71,7 +71,7 @@ static void TwisterRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { static constexpr uint32_t imageIds[] = { 17486, @@ -122,9 +122,9 @@ static void TwisterRCTrackStation( 17155, }; - if (trackElement.GetTrackType() == TrackElemType::endStation) + if (trackElement.getTrackType() == TrackElemType::endStation) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kTwisterRCBlockBrakeImages[direction][isClosed]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); @@ -155,7 +155,7 @@ static void TwisterRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -231,7 +231,7 @@ static void TwisterRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -307,7 +307,7 @@ static void TwisterRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -383,7 +383,7 @@ static void TwisterRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -471,7 +471,7 @@ static void TwisterRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -559,7 +559,7 @@ static void TwisterRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5746,7 +5746,7 @@ static void TwisterRCTrackDiagFlat( }; TrackPaintUtilDiagTilesPaintExtra( - session, 3, height, direction, trackSequence, images[trackElement.HasChain()], supportType.metal); + session, 3, height, direction, trackSequence, images[trackElement.hasChain()], supportType.metal); } static void TwisterRCTrackDiag25DegUp( @@ -5756,7 +5756,7 @@ static void TwisterRCTrackDiag25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5787,7 +5787,7 @@ static void TwisterRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5818,7 +5818,7 @@ static void TwisterRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5850,7 +5850,7 @@ static void TwisterRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5918,7 +5918,7 @@ static void TwisterRCTrackDiag60DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5949,7 +5949,7 @@ static void TwisterRCTrackDiag60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -5980,7 +5980,7 @@ static void TwisterRCTrackDiag60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6012,7 +6012,7 @@ static void TwisterRCTrackDiag60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6080,7 +6080,7 @@ static void TwisterRCTrackDiagFlatTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6111,7 +6111,7 @@ static void TwisterRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6142,7 +6142,7 @@ static void TwisterRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6174,7 +6174,7 @@ static void TwisterRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6242,7 +6242,7 @@ static void TwisterRCTrackDiag25DegUpTo60DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6273,7 +6273,7 @@ static void TwisterRCTrackDiag25DegUpTo60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6304,7 +6304,7 @@ static void TwisterRCTrackDiag25DegUpTo60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6336,7 +6336,7 @@ static void TwisterRCTrackDiag25DegUpTo60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6404,7 +6404,7 @@ static void TwisterRCTrackDiag60DegUpTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6435,7 +6435,7 @@ static void TwisterRCTrackDiag60DegUpTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6466,7 +6466,7 @@ static void TwisterRCTrackDiag60DegUpTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6498,7 +6498,7 @@ static void TwisterRCTrackDiag60DegUpTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6566,7 +6566,7 @@ static void TwisterRCTrackDiag25DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6597,7 +6597,7 @@ static void TwisterRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6628,7 +6628,7 @@ static void TwisterRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6660,7 +6660,7 @@ static void TwisterRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6728,7 +6728,7 @@ static void TwisterRCTrackDiag25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6759,7 +6759,7 @@ static void TwisterRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6790,7 +6790,7 @@ static void TwisterRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6822,7 +6822,7 @@ static void TwisterRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6890,7 +6890,7 @@ static void TwisterRCTrackDiag60DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6921,7 +6921,7 @@ static void TwisterRCTrackDiag60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6952,7 +6952,7 @@ static void TwisterRCTrackDiag60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -6984,7 +6984,7 @@ static void TwisterRCTrackDiag60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 104); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7052,7 +7052,7 @@ static void TwisterRCTrackDiagFlatTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7082,7 +7082,7 @@ static void TwisterRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7112,7 +7112,7 @@ static void TwisterRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7143,7 +7143,7 @@ static void TwisterRCTrackDiagFlatTo25DegDown( 0xFFFF, 0); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7212,7 +7212,7 @@ static void TwisterRCTrackDiag25DegDownTo60DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7243,7 +7243,7 @@ static void TwisterRCTrackDiag25DegDownTo60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7274,7 +7274,7 @@ static void TwisterRCTrackDiag25DegDownTo60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7306,7 +7306,7 @@ static void TwisterRCTrackDiag25DegDownTo60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7374,7 +7374,7 @@ static void TwisterRCTrackDiag60DegDownTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7405,7 +7405,7 @@ static void TwisterRCTrackDiag60DegDownTo25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7436,7 +7436,7 @@ static void TwisterRCTrackDiag60DegDownTo25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7468,7 +7468,7 @@ static void TwisterRCTrackDiag60DegDownTo25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7536,7 +7536,7 @@ static void TwisterRCTrackDiag25DegDownToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7567,7 +7567,7 @@ static void TwisterRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7598,7 +7598,7 @@ static void TwisterRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7630,7 +7630,7 @@ static void TwisterRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7698,7 +7698,7 @@ static void TwisterRCTrackDiagFlatTo60DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7729,7 +7729,7 @@ static void TwisterRCTrackDiagFlatTo60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7760,7 +7760,7 @@ static void TwisterRCTrackDiagFlatTo60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7792,7 +7792,7 @@ static void TwisterRCTrackDiagFlatTo60DegUp( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7860,7 +7860,7 @@ static void TwisterRCTrackDiag60DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7891,7 +7891,7 @@ static void TwisterRCTrackDiag60DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7922,7 +7922,7 @@ static void TwisterRCTrackDiag60DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -7954,7 +7954,7 @@ static void TwisterRCTrackDiag60DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8022,7 +8022,7 @@ static void TwisterRCTrackDiagFlatTo60DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8053,7 +8053,7 @@ static void TwisterRCTrackDiagFlatTo60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8084,7 +8084,7 @@ static void TwisterRCTrackDiagFlatTo60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8116,7 +8116,7 @@ static void TwisterRCTrackDiagFlatTo60DegDown( PaintUtilSetGeneralSupportHeight(session, height + 72); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8184,7 +8184,7 @@ static void TwisterRCTrackDiag60DegDownToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8215,7 +8215,7 @@ static void TwisterRCTrackDiag60DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8246,7 +8246,7 @@ static void TwisterRCTrackDiag60DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8278,7 +8278,7 @@ static void TwisterRCTrackDiag60DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 64); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -10033,7 +10033,7 @@ static void TwisterRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); switch (direction) { case 0: @@ -11409,7 +11409,7 @@ static void TwisterRCTrackFlatTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -11491,7 +11491,7 @@ static void TwisterRCTrack60DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -13896,7 +13896,7 @@ void TwisterRCTrackDiagBlockBrakes( const TrackElement& trackElement, SupportType supportType) { TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, kTwisterRCDiagBlockBrakeImages[trackElement.IsBrakeClosed()], + session, 3, height, direction, trackSequence, kTwisterRCDiagBlockBrakeImages[trackElement.isBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); if (trackSequence == 3) diff --git a/src/openrct2/paint/track/coaster/VirginiaReel.cpp b/src/openrct2/paint/track/coaster/VirginiaReel.cpp index a7ca8f7b97..5969c9a840 100644 --- a/src/openrct2/paint/track/coaster/VirginiaReel.cpp +++ b/src/openrct2/paint/track/coaster/VirginiaReel.cpp @@ -160,7 +160,7 @@ static void PaintVirginiaReelTrackFlat( const TrackElement& trackElement, SupportType supportType) { const uint32_t* sprites = kPiecesFlat; - if (trackElement.HasChain()) + if (trackElement.hasChain()) { sprites = kPiecesFlatLiftHill; } @@ -190,7 +190,7 @@ static void PaintVirginiaReelTrack25DegUp( const TrackElement& trackElement, SupportType supportType) { const uint32_t* sprites = kPieces25DegUp; - if (trackElement.HasChain()) + if (trackElement.hasChain()) { sprites = kPieces25DegUpLiftHill; } @@ -240,7 +240,7 @@ static void PaintVirginiaReelTrackFlatTo25DegUp( const TrackElement& trackElement, SupportType supportType) { const uint32_t* sprites = kPiecesFlatTo25DegUp; - if (trackElement.HasChain()) + if (trackElement.hasChain()) { sprites = kPiecesFlatTo25DegUpLiftHill; } @@ -280,7 +280,7 @@ static void PaintVirginiaReelTrack25DegUpToFlat( const TrackElement& trackElement, SupportType supportType) { const uint32_t* sprites = kPieces25DegUpToFlat; - if (trackElement.HasChain()) + if (trackElement.hasChain()) { sprites = kPieces25DegUpToFlatLiftHill; } diff --git a/src/openrct2/paint/track/coaster/WildMouse.cpp b/src/openrct2/paint/track/coaster/WildMouse.cpp index 37a4e54a2d..d02626abc1 100644 --- a/src/openrct2/paint/track/coaster/WildMouse.cpp +++ b/src/openrct2/paint/track/coaster/WildMouse.cpp @@ -177,7 +177,7 @@ static void WildMouseTrackFlat( { SPR_WILD_MOUSE_FLAT_NW_SE, SPR_WILD_MOUSE_FLAT_CHAIN_SE_NW }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[direction][isChained]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -193,10 +193,10 @@ static void WildMouseTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto trackType = trackElement.GetTrackType(); + auto trackType = trackElement.getTrackType(); if (trackType == TrackElemType::endStation) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(_wild_mouse_block_brakes_image_ids[direction][isClosed]), { 0, 0, height }, { { 0, 6, height + 1 }, { 32, 20, 2 } }); @@ -233,7 +233,7 @@ static void WildMouseTrack25DegUp( { SPR_WILD_MOUSE_25_DEG_SE_NW, SPR_WILD_MOUSE_25_DEG_CHAIN_SE_NW }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[direction][isChained]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -264,7 +264,7 @@ static void WildMouseTrack60DegUp( { SPR_WILD_MOUSE_60_DEG_SE_NW, SPR_WILD_MOUSE_60_DEG_CHAIN_SE_NW }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[direction][isChained]); if (direction == 0 || direction == 3) { @@ -310,7 +310,7 @@ static void WildMouseTrackFlatTo25DegUp( { SPR_WILD_MOUSE_FLAT_TO_25_DEG_SE_NW, SPR_WILD_MOUSE_FLAT_TO_25_DEG_CHAIN_SE_NW }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[direction][isChained]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -347,7 +347,7 @@ static void WildMouseTrack25DegUpTo60DegUp( { 0, 0 }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[direction][isChained]); auto frontImageId = session.TrackColours.WithIndex(frontImageIds[direction][isChained]); if (direction == 0 || direction == 3) @@ -393,7 +393,7 @@ static void WildMouseTrack60DegUpTo25DegUp( { 0, 0 }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[direction][isChained]); auto frontImageId = session.TrackColours.WithIndex(frontImageIds[direction][isChained]); if (direction == 0 || direction == 3) @@ -433,7 +433,7 @@ static void WildMouseTrack25DegUpToFlat( { SPR_WILD_MOUSE_25_DEG_TO_FLAT_SE_NW, SPR_WILD_MOUSE_25_DEG_TO_FLAT_CHAIN_SE_NW }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[direction][isChained]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -782,7 +782,7 @@ static void WildMouseTrackFlatTo60DegUp( { 0, 0 }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[direction][isChained]); auto frontImageId = session.TrackColours.WithIndex(frontImageIds[direction][isChained]); if (direction == 0 || direction == 3) @@ -828,7 +828,7 @@ static void WildMouseTrack60DegUpToFlat( { 0, 0 }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[direction][isChained]); auto frontImageId = session.TrackColours.WithIndex(frontImageIds[direction][isChained]); if (direction == 0 || direction == 3) @@ -924,7 +924,7 @@ static void WildMouseTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - bool isClosed = trackElement.IsBrakeClosed(); + bool isClosed = trackElement.isBrakeClosed(); auto imageId = session.TrackColours.WithIndex(_wild_mouse_block_brakes_image_ids[direction][isClosed]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) diff --git a/src/openrct2/paint/track/coaster/WoodenRollerCoaster.cpp b/src/openrct2/paint/track/coaster/WoodenRollerCoaster.cpp index d2dfeb6282..20ddc0b0b3 100644 --- a/src/openrct2/paint/track/coaster/WoodenRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/WoodenRollerCoaster.cpp @@ -2030,7 +2030,7 @@ static void WoodenRCTrackFlat( { SPR_WOODEN_RC_FLAT_RAILS_NW_SE, SPR_WOODEN_RC_FLAT_CHAIN_RAILS_SE_NW }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; TrackPaint( session, direction, imageIds[direction][isChained], railsImageIds[direction][isChained], { 0, 2, height }, { { 0, 3, height }, { 32, 25, 2 } }); @@ -2063,9 +2063,9 @@ static void WoodenRCTrackStation( const bool drewStation = TrackPaintUtilDrawStation2( session, ride, direction, height, trackElement, StationBaseType::none, 0, 9, 11); const ImageId colours = isClassic ? session.TrackColours : session.SupportColours; - if (trackElement.GetTrackType() == TrackElemType::endStation) + if (trackElement.getTrackType() == TrackElemType::endStation) { - const ImageIndex imageIndex = kStationBlockBrakesImageIds[drewStation][direction][trackElement.IsBrakeClosed()]; + const ImageIndex imageIndex = kStationBlockBrakesImageIds[drewStation][direction][trackElement.isBrakeClosed()]; PaintAddImageAsParentRotated( session, direction, colours.WithIndex(imageIndex), { 0, 2, height }, { { 0, 2, height }, { 32, 27, 2 } }); } @@ -2143,7 +2143,7 @@ static void WoodenRCTrack25DegUp( }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; TrackPaint( session, direction, imageIds[isChained][direction][0], imageIds[isChained][direction][1], { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); @@ -2190,7 +2190,7 @@ static void WoodenRCTrack60DegUp( { SPR_WOODEN_RC_60_DEG_SE_NW, SPR_WOODEN_RC_60_DEG_RAILS_SE_NW }, }; - if (trackElement.HasChain()) + if (trackElement.hasChain()) { if (direction == 0 || direction == 3) { @@ -2299,7 +2299,7 @@ static void WoodenRCTrackFlatTo25DegUp( }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; TrackPaint( session, direction, imageIds[isChained][direction][0], imageIds[isChained][direction][1], { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); @@ -2385,7 +2385,7 @@ static void WoodenRCTrack25DegUpTo60DegUp( 0, }, }; - if (trackElement.HasChain()) + if (trackElement.hasChain()) { if (direction == 0 || direction == 3) { @@ -2499,7 +2499,7 @@ static void WoodenRCTrack60DegUpTo25DegUp( }, }; - if (trackElement.HasChain()) + if (trackElement.hasChain()) { if (direction == 0 || direction == 3) { @@ -2614,7 +2614,7 @@ static void WoodenRCTrack25DegUpToFlat( }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; TrackPaint( session, direction, imageIds[isChained][direction][0], imageIds[isChained][direction][1], { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); @@ -8039,8 +8039,8 @@ static void WoodenRCTrackDiagBlockBrakes( }, }; - WoodenRCTrackPaintBb(session, &imageIds[trackElement.IsBrakeClosed()][trackSequence][direction][0], height); - WoodenRCTrackPaintBb(session, &imageIds[trackElement.IsBrakeClosed()][trackSequence][direction][0], height); + WoodenRCTrackPaintBb(session, &imageIds[trackElement.isBrakeClosed()][trackSequence][direction][0], height); + WoodenRCTrackPaintBb(session, &imageIds[trackElement.isBrakeClosed()][trackSequence][direction][0], height); if (kDiagonalSupports[trackSequence][direction] != WoodenSupportSubType::null) { @@ -8061,7 +8061,7 @@ static void WoodenRCTrackDiagFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8092,7 +8092,7 @@ static void WoodenRCTrackDiagFlat( break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8138,7 +8138,7 @@ static void WoodenRCTrackDiagFlat( break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8184,7 +8184,7 @@ static void WoodenRCTrackDiagFlat( break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8229,7 +8229,7 @@ static void WoodenRCTrackDiag25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8261,7 +8261,7 @@ static void WoodenRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8309,7 +8309,7 @@ static void WoodenRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8357,7 +8357,7 @@ static void WoodenRCTrackDiag25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8489,7 +8489,7 @@ static void WoodenRCTrackDiagFlatTo25DegUp( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8521,7 +8521,7 @@ static void WoodenRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8593,7 +8593,7 @@ static void WoodenRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8665,7 +8665,7 @@ static void WoodenRCTrackDiagFlatTo25DegUp( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8884,7 +8884,7 @@ static void WoodenRCTrackDiag25DegUpToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8916,7 +8916,7 @@ static void WoodenRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -8964,7 +8964,7 @@ static void WoodenRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -9012,7 +9012,7 @@ static void WoodenRCTrackDiag25DegUpToFlat( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -9055,7 +9055,7 @@ static void WoodenRCTrackDiag25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -9087,7 +9087,7 @@ static void WoodenRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -9135,7 +9135,7 @@ static void WoodenRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -9183,7 +9183,7 @@ static void WoodenRCTrackDiag25DegDown( PaintUtilSetGeneralSupportHeight(session, height + 56); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -9313,7 +9313,7 @@ static void WoodenRCTrackDiagFlatTo25DegDown( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -9343,7 +9343,7 @@ static void WoodenRCTrackDiagFlatTo25DegDown( } break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -9389,7 +9389,7 @@ static void WoodenRCTrackDiagFlatTo25DegDown( } break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -9435,7 +9435,7 @@ static void WoodenRCTrackDiagFlatTo25DegDown( break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -9653,7 +9653,7 @@ static void WoodenRCTrackDiag25DegDownToFlat( switch (trackSequence) { case 0: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -9685,7 +9685,7 @@ static void WoodenRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 1: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -9757,7 +9757,7 @@ static void WoodenRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 2: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -9829,7 +9829,7 @@ static void WoodenRCTrackDiag25DegDownToFlat( PaintUtilSetGeneralSupportHeight(session, height + 48); break; case 3: - if (trackElement.HasChain()) + if (trackElement.hasChain()) { switch (direction) { @@ -10171,7 +10171,7 @@ static void WoodenRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - const auto brakeImg = trackElement.IsBrakeClosed() ? kBlockBrakesImageIds[direction][1] + const auto brakeImg = trackElement.isBrakeClosed() ? kBlockBrakesImageIds[direction][1] : kBlockBrakesImageIds[direction][0]; TrackPaint( session, direction, brakeImg, kBlockBrakesImageIds[direction][2], { 0, 2, height }, diff --git a/src/openrct2/paint/track/coaster/WoodenWildMouse.cpp b/src/openrct2/paint/track/coaster/WoodenWildMouse.cpp index 968b7cd749..250d7418d4 100644 --- a/src/openrct2/paint/track/coaster/WoodenWildMouse.cpp +++ b/src/openrct2/paint/track/coaster/WoodenWildMouse.cpp @@ -192,7 +192,7 @@ static void WoodenWildMouseTrack25DegUp( }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[isChained][direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 1 } }); @@ -232,7 +232,7 @@ static void WoodenWildMouseTrack60DegUp( }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[isChained][direction]); if (direction == 0 || direction == 3) { @@ -280,7 +280,7 @@ static void WoodenWildMouseTrackFlatTo25DegUp( }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[isChained][direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 1 } }); @@ -320,7 +320,7 @@ static void WoodenWildMouseTrack25DegUpTo60DegUp( }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; ImageId imageId; if (direction == 0 || direction == 3) { @@ -371,7 +371,7 @@ static void WoodenWildMouseTrack60DegTo25DegUp( }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; ImageId imageId; if (direction == 0 || direction == 3) { @@ -423,7 +423,7 @@ static void WoodenWildMouseTrack25DegUpToFlat( }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[isChained][direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 1 } }); @@ -613,7 +613,7 @@ static void WoodenWildMouseTrackFlatTo60DegUp( }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; ImageId imageId; if (direction == 0 || direction == 3) { @@ -664,7 +664,7 @@ static void WoodenWildMouseTrack60DegUpToFlat( }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; ImageId imageId; if (direction == 0 || direction == 3) { diff --git a/src/openrct2/paint/track/gentle/CrookedHouse.cpp b/src/openrct2/paint/track/gentle/CrookedHouse.cpp index 03a3d65cd9..837a782791 100644 --- a/src/openrct2/paint/track/gentle/CrookedHouse.cpp +++ b/src/openrct2/paint/track/gentle/CrookedHouse.cpp @@ -58,7 +58,7 @@ static void PaintCrookedHouseStructure( if (tileElement == nullptr) return; - auto ride = GetRide(tileElement->asTrack()->GetRideIndex()); + auto ride = GetRide(tileElement->asTrack()->getRideIndex()); if (ride == nullptr) return; diff --git a/src/openrct2/paint/track/gentle/GhostTrain.cpp b/src/openrct2/paint/track/gentle/GhostTrain.cpp index b014ea62a0..47e3a73ff4 100644 --- a/src/openrct2/paint/track/gentle/GhostTrain.cpp +++ b/src/openrct2/paint/track/gentle/GhostTrain.cpp @@ -159,13 +159,13 @@ static TunnelType GetTunnelDoorsImageStraightFlat(const TrackElement& trackEleme switch (direction) { case 0: - return kDoorOpeningInwardsToImage[trackElement.GetDoorAState()]; + return kDoorOpeningInwardsToImage[trackElement.getDoorAState()]; case 1: - return kDoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; + return kDoorOpeningOutwardsToImage[trackElement.getDoorBState()]; case 2: - return kDoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; + return kDoorOpeningOutwardsToImage[trackElement.getDoorBState()]; case 3: - return kDoorOpeningInwardsToImage[trackElement.GetDoorAState()]; + return kDoorOpeningInwardsToImage[trackElement.getDoorAState()]; } return TunnelType::doorClosed; } @@ -254,15 +254,15 @@ static void PaintGhostTrainTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - bool isBackwards = trackElement.GetTrackType() == TrackElemType::down25ToFlat; + bool isBackwards = trackElement.getTrackType() == TrackElemType::down25ToFlat; TunnelType doorImage; if (!isBackwards) { - doorImage = kDoorOpeningInwardsToImage[trackElement.GetDoorAState()]; + doorImage = kDoorOpeningInwardsToImage[trackElement.getDoorAState()]; } else { - doorImage = kDoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; + doorImage = kDoorOpeningOutwardsToImage[trackElement.getDoorBState()]; } auto imageId = session.TrackColours.WithIndex(kGhostTrainTrackPiecesFlatTo25DegUp[direction][0]); @@ -336,10 +336,10 @@ static void PaintGhostTrainTrack25DegUpToFlat( PaintUtilPushTunnelLeft(session, height - 8, kTunnelGroupIncline, TunnelSubType::flat); break; case 1: - PaintUtilPushTunnelRight(session, height + 8, kDoorFlatTo25DegOpeningOutwardsToImage[trackElement.GetDoorBState()]); + PaintUtilPushTunnelRight(session, height + 8, kDoorFlatTo25DegOpeningOutwardsToImage[trackElement.getDoorBState()]); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, kDoorFlatTo25DegOpeningOutwardsToImage[trackElement.GetDoorBState()]); + PaintUtilPushTunnelLeft(session, height + 8, kDoorFlatTo25DegOpeningOutwardsToImage[trackElement.getDoorBState()]); break; case 3: PaintUtilPushTunnelRight(session, height - 8, kTunnelGroupIncline, TunnelSubType::flat); @@ -369,10 +369,10 @@ static void PaintGhostTrainTrackFlatTo25DegDown( PaintUtilPushTunnelLeft(session, height - 8, kTunnelGroupIncline, TunnelSubType::flat); break; case 1: - PaintUtilPushTunnelRight(session, height + 8, kDoorFlatTo25DegOpeningInwardsToImage[trackElement.GetDoorAState()]); + PaintUtilPushTunnelRight(session, height + 8, kDoorFlatTo25DegOpeningInwardsToImage[trackElement.getDoorAState()]); break; case 2: - PaintUtilPushTunnelLeft(session, height + 8, kDoorFlatTo25DegOpeningInwardsToImage[trackElement.GetDoorAState()]); + PaintUtilPushTunnelLeft(session, height + 8, kDoorFlatTo25DegOpeningInwardsToImage[trackElement.getDoorAState()]); break; case 3: PaintUtilPushTunnelRight(session, height - 8, kTunnelGroupIncline, TunnelSubType::flat); @@ -420,10 +420,10 @@ static void PaintGhostTrainTrackRightQuarterTurn3Tiles( TrackPaintUtilRightQuarterTurn3TilesPaint( session, 3, height, direction, trackSequence, session.TrackColours, kGhostTrainTrackPiecesQuarterTurn3Tiles, nullptr, defaultRightQuarterTurn3TilesBoundLengths, defaultRightQuarterTurn3TilesBoundOffsets); - bool isBackwards = trackElement.GetTrackType() == TrackElemType::leftQuarterTurn3Tiles; + bool isBackwards = trackElement.getTrackType() == TrackElemType::leftQuarterTurn3Tiles; bool isDoorA = (!isBackwards && trackSequence == 0) || (isBackwards && trackSequence == 3); - auto tunnelType = isDoorA ? kDoorOpeningInwardsToImage[trackElement.GetDoorAState()] - : kDoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; + auto tunnelType = isDoorA ? kDoorOpeningInwardsToImage[trackElement.getDoorAState()] + : kDoorOpeningOutwardsToImage[trackElement.getDoorBState()]; TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, tunnelType); switch (trackSequence) @@ -470,17 +470,17 @@ static void PaintGhostTrainTrackLeftQuarterTurn1Tile( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - bool isBackwards = trackElement.GetTrackType() == TrackElemType::rightQuarterTurn1Tile; + bool isBackwards = trackElement.getTrackType() == TrackElemType::rightQuarterTurn1Tile; TunnelType tunnelStartImage, tunnelEndImage; if (!isBackwards) { - tunnelStartImage = kDoorOpeningInwardsToImage[trackElement.GetDoorAState()]; - tunnelEndImage = kDoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; + tunnelStartImage = kDoorOpeningInwardsToImage[trackElement.getDoorAState()]; + tunnelEndImage = kDoorOpeningOutwardsToImage[trackElement.getDoorBState()]; } else { - tunnelStartImage = kDoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; - tunnelEndImage = kDoorOpeningInwardsToImage[trackElement.GetDoorAState()]; + tunnelStartImage = kDoorOpeningOutwardsToImage[trackElement.getDoorBState()]; + tunnelEndImage = kDoorOpeningInwardsToImage[trackElement.getDoorAState()]; } TrackPaintUtilLeftQuarterTurn1TilePaint( diff --git a/src/openrct2/paint/track/gentle/Maze.cpp b/src/openrct2/paint/track/gentle/Maze.cpp index 477e233a47..2aeb73c96b 100644 --- a/src/openrct2/paint/track/gentle/Maze.cpp +++ b/src/openrct2/paint/track/gentle/Maze.cpp @@ -52,7 +52,7 @@ static void MazePaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - uint16_t mazeEntry = trackElement.GetMazeEntry(); + uint16_t mazeEntry = trackElement.getMazeEntry(); mazeEntry = Numerics::rol16(mazeEntry, direction * 4); uint32_t rotation = session.CurrentRotation; diff --git a/src/openrct2/paint/track/thrill/GoKarts.cpp b/src/openrct2/paint/track/thrill/GoKarts.cpp index 9c998c40b9..ca4621db7e 100644 --- a/src/openrct2/paint/track/thrill/GoKarts.cpp +++ b/src/openrct2/paint/track/thrill/GoKarts.cpp @@ -1566,7 +1566,7 @@ static void PaintGoKartsStation( ImageId imageId; const uint32_t (*sprites)[2] = go_karts_track_pieces_starting_grid; - if (trackElement.GetTrackType() == TrackElemType::endStation) + if (trackElement.getTrackType() == TrackElemType::endStation) { sprites = go_karts_track_pieces_starting_grid_end; } @@ -1618,9 +1618,9 @@ static void PaintGoKartsStation( TrackPaintUtilDrawStationCovers(session, EDGE_SW, hasFence, stationObj, height, stationColour); } - if (trackElement.GetTrackType() == TrackElemType::endStation) + if (trackElement.getTrackType() == TrackElemType::endStation) { - const bool hasGreenLight = trackElement.HasGreenLight(); + const bool hasGreenLight = trackElement.hasGreenLight(); switch (direction) { diff --git a/src/openrct2/paint/track/transport/Chairlift.cpp b/src/openrct2/paint/track/transport/Chairlift.cpp index 49e909d75c..2ae2ca7523 100644 --- a/src/openrct2/paint/track/transport/Chairlift.cpp +++ b/src/openrct2/paint/track/transport/Chairlift.cpp @@ -127,7 +127,7 @@ static const TrackElement* ChairliftPaintUtilMapGetTrackElementAtFromRideFuzzy( { for (auto* trackElement : TileElementsView(CoordsXY(x, y))) { - if (trackElement->GetRideIndex() != ride.id) + if (trackElement->getRideIndex() != ride.id) continue; if (trackElement->baseHeight != z && trackElement->baseHeight != z - 1) continue; @@ -141,7 +141,7 @@ static const TrackElement* ChairliftPaintUtilMapGetTrackElementAtFromRideFuzzy( static bool ChairliftPaintUtilIsFirstTrack( const Ride& ride, const TrackElement& trackElement, const CoordsXY& pos, TrackElemType trackType) { - if (trackElement.GetTrackType() != TrackElemType::beginStation) + if (trackElement.getTrackType() != TrackElemType::beginStation) { return false; } @@ -161,7 +161,7 @@ static bool ChairliftPaintUtilIsFirstTrack( static bool ChairliftPaintUtilIsLastTrack( const Ride& ride, const TrackElement& trackElement, const CoordsXY& pos, TrackElemType trackType) { - if (trackElement.GetTrackType() != TrackElemType::endStation) + if (trackElement.getTrackType() != TrackElemType::endStation) { return false; } @@ -183,7 +183,7 @@ static void ChairliftPaintStationNeSw( const TrackElement& trackElement, SupportType supportType) { const CoordsXY pos = session.MapPosition; - auto trackType = trackElement.GetTrackType(); + auto trackType = trackElement.getTrackType(); ImageId imageId; bool isStart = ChairliftPaintUtilIsFirstTrack(ride, trackElement, pos, trackType); @@ -274,7 +274,7 @@ static void ChairliftPaintStationSeNw( const TrackElement& trackElement, SupportType supportType) { const CoordsXY pos = session.MapPosition; - auto trackType = trackElement.GetTrackType(); + auto trackType = trackElement.getTrackType(); ImageId imageId; bool isStart = ChairliftPaintUtilIsFirstTrack(ride, trackElement, pos, trackType); diff --git a/src/openrct2/paint/track/transport/MiniatureRailway.cpp b/src/openrct2/paint/track/transport/MiniatureRailway.cpp index 486ccfc0a6..8c783ea744 100644 --- a/src/openrct2/paint/track/transport/MiniatureRailway.cpp +++ b/src/openrct2/paint/track/transport/MiniatureRailway.cpp @@ -1545,7 +1545,7 @@ static void PaintMiniatureRailwayTrackLeftEighthToDiag( }; bool isSupported = false; - bool isRightEighthToOrthog = trackElement.GetTrackType() == TrackElemType::rightEighthToOrthogonal; + bool isRightEighthToOrthog = trackElement.getTrackType() == TrackElemType::rightEighthToOrthogonal; // Right eighth to orthogonal calls this function but we do not want to have a support call for it // for track sequence 4 if (trackSequence != 4 || !isRightEighthToOrthog) @@ -1713,7 +1713,7 @@ static void PaintMiniatureRailwayTrackRightEighthToDiag( }; bool isSupported = false; - bool isLeftEighthToOrthog = trackElement.GetTrackType() == TrackElemType::leftEighthToOrthogonal; + bool isLeftEighthToOrthog = trackElement.getTrackType() == TrackElemType::leftEighthToOrthogonal; // Right eighth to orthogonal calls this function but we do not want to have a support call for it // for track sequence 4 if (trackSequence != 4 || !isLeftEighthToOrthog) diff --git a/src/openrct2/paint/track/water/DinghySlide.cpp b/src/openrct2/paint/track/water/DinghySlide.cpp index 7fbdb7328c..82c6706414 100644 --- a/src/openrct2/paint/track/water/DinghySlide.cpp +++ b/src/openrct2/paint/track/water/DinghySlide.cpp @@ -230,7 +230,7 @@ static void DinghySlideTrackFlat( }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[isChained][direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); @@ -308,7 +308,7 @@ static void DinghySlideTrack25DegUp( }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[isChained][direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); @@ -395,7 +395,7 @@ static void DinghySlideTrackFlatTo25DegUp( }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[isChained][direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); @@ -521,7 +521,7 @@ static void DinghySlideTrack25DegUpToFlat( }, }; - uint8_t isChained = trackElement.HasChain() ? 1 : 0; + uint8_t isChained = trackElement.hasChain() ? 1 : 0; auto imageId = session.TrackColours.WithIndex(imageIds[isChained][direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); diff --git a/src/openrct2/park/Legacy.cpp b/src/openrct2/park/Legacy.cpp index c9a17923c1..8879f8ce5b 100644 --- a/src/openrct2/park/Legacy.cpp +++ b/src/openrct2/park/Legacy.cpp @@ -2391,9 +2391,9 @@ std::string_view GetClimateObjectIdFromLegacyClimateType(RCT12::ClimateType clim bool TrackTypeMustBeMadeInvisible(const OpenRCT2::TrackElement& trackElement, const int32_t parkFileVersion) { - const auto rideType = trackElement.GetRideType(); - const auto trackType = trackElement.GetTrackType(); - const auto isInverted = trackElement.IsInverted(); + const auto rideType = trackElement.getRideType(); + const auto trackType = trackElement.getTrackType(); + const auto isInverted = trackElement.isInverted(); // Lots of Log Flumes exist where the downward slopes are simulated by using other track // types like the Splash Boats, but not actually made invisible, because they never needed diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index e787453070..a5f373f96f 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -1228,7 +1228,7 @@ namespace OpenRCT2 else if (it.element->getType() == TileElementType::track) { auto* trackElement = it.element->asTrack(); - auto trackType = trackElement->GetTrackType(); + auto trackType = trackElement->getTrackType(); if (TrackTypeMustBeMadeInvisible(*trackElement, os.getHeader().targetVersion)) { it.element->setInvisible(true); @@ -1236,9 +1236,9 @@ namespace OpenRCT2 if (os.getHeader().targetVersion < kBlockBrakeImprovementsVersion) { if (trackType == TrackElemType::brakes) - trackElement->SetBrakeClosed(true); + trackElement->setBrakeClosed(true); if (trackType == TrackElemType::blockBrakes) - trackElement->SetBrakeBoosterSpeed(kRCT2DefaultBlockBrakeSpeed); + trackElement->setBrakeBoosterSpeed(kRCT2DefaultBlockBrakeSpeed); } } else if (it.element->getType() == TileElementType::smallScenery && os.getHeader().targetVersion < 23) @@ -1275,10 +1275,10 @@ namespace OpenRCT2 { for (auto* trackElement : TileElementsView(TileCoordsXY{ x, y })) { - const auto* ride = GetRide(trackElement->GetRideIndex()); + const auto* ride = GetRide(trackElement->getRideIndex()); if (ride != nullptr) { - trackElement->SetRideType(ride->type); + trackElement->setRideType(ride->type); } } } diff --git a/src/openrct2/peep/GuestPathfinding.cpp b/src/openrct2/peep/GuestPathfinding.cpp index d5331f4863..461b09fdd7 100644 --- a/src/openrct2/peep/GuestPathfinding.cpp +++ b/src/openrct2/peep/GuestPathfinding.cpp @@ -412,7 +412,7 @@ namespace OpenRCT2::PathFinding { if (loc.z != tileElement->baseHeight) continue; - RideId rideIndex = tileElement->asTrack()->GetRideIndex(); + RideId rideIndex = tileElement->asTrack()->getRideIndex(); auto ride = GetRide(rideIndex); if (ride != nullptr && ride->getRideTypeDescriptor().flags.has(RtdFlag::isShopOrFacility)) { @@ -781,7 +781,7 @@ namespace OpenRCT2::PathFinding continue; /* For peeps heading for a shop, the goal is the shop * tile. */ - rideIndex = tileElement->asTrack()->GetRideIndex(); + rideIndex = tileElement->asTrack()->getRideIndex(); auto ride = GetRide(rideIndex); if (ride == nullptr || !ride->getRideTypeDescriptor().flags.has(RtdFlag::isShopOrFacility)) continue; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index d9b974fe81..f90a777d15 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1731,44 +1731,44 @@ namespace OpenRCT2::RCT1 auto rideType = (ride != nullptr) ? ride->type : kRideTypeNull; auto rct1RideType = _s4.Rides[src2->GetRideIndex()].type; - dst2->SetTrackType(RCT1TrackTypeToOpenRCT2(src2->GetTrackType(), rideType)); - dst2->SetRideType(rideType); - dst2->SetSequenceIndex(src2->GetSequenceIndex()); - dst2->SetRideIndex(RCT12RideIdToOpenRCT2RideId(src2->GetRideIndex())); - dst2->SetColourScheme(src2->GetColourScheme()); - dst2->SetHasChain(src2->HasChain()); - dst2->SetHasCableLift(false); - dst2->SetInverted(src2->IsInverted()); - dst2->SetStationIndex(StationIndex::FromUnderlying(src2->GetStationIndex())); - dst2->SetHasGreenLight(src2->HasGreenLight()); - dst2->SetIsIndestructible(src2->IsIndestructible()); + dst2->setTrackType(RCT1TrackTypeToOpenRCT2(src2->GetTrackType(), rideType)); + dst2->setRideType(rideType); + dst2->setSequenceIndex(src2->GetSequenceIndex()); + dst2->setRideIndex(RCT12RideIdToOpenRCT2RideId(src2->GetRideIndex())); + dst2->setColourScheme(src2->GetColourScheme()); + dst2->setHasChain(src2->HasChain()); + dst2->setHasCableLift(false); + dst2->setInverted(src2->IsInverted()); + dst2->setStationIndex(StationIndex::FromUnderlying(src2->GetStationIndex())); + dst2->setHasGreenLight(src2->HasGreenLight()); + dst2->setIsIndestructible(src2->IsIndestructible()); if (rct1RideType == RideType::ghostTrain) { - dst2->SetDoorAState(src2->GetDoorAState()); - dst2->SetDoorBState(src2->GetDoorBState()); + dst2->setDoorAState(src2->GetDoorAState()); + dst2->setDoorBState(src2->GetDoorBState()); } else { - dst2->SetSeatRotation(kDefaultSeatRotation); + dst2->setSeatRotation(kDefaultSeatRotation); } // Skipping IsHighlighted() - auto trackType = dst2->GetTrackType(); + auto trackType = dst2->getTrackType(); // Brakes import as closed to preserve legacy behaviour - dst2->SetBrakeClosed(trackType == TrackElemType::brakes); + dst2->setBrakeClosed(trackType == TrackElemType::brakes); if (trackTypeHasSpeedSetting(trackType)) { - dst2->SetBrakeBoosterSpeed(src2->GetBrakeBoosterSpeed()); + dst2->setBrakeBoosterSpeed(src2->GetBrakeBoosterSpeed()); } else if (trackType == TrackElemType::onRidePhoto) { - dst2->SetPhotoTimeout(src2->GetPhotoTimeout()); + dst2->setPhotoTimeout(src2->GetPhotoTimeout()); } // This has to be done last, since the maze entry shares fields with the colour and sequence fields. if (rct1RideType == RideType::hedgeMaze) { - dst2->SetMazeEntry(src2->GetMazeEntry()); + dst2->setMazeEntry(src2->GetMazeEntry()); } if (TrackTypeMustBeMadeInvisible(*dst2)) @@ -2661,10 +2661,10 @@ namespace OpenRCT2::RCT1 for (auto* trackElement : TileElementsView(TileCoordsXY(x, y))) { // Lift hill tops are the only pieces present in RCT1 that can count as a block brake. - if (!trackElement->HasChain()) + if (!trackElement->hasChain()) continue; - auto trackType = trackElement->GetTrackType(); + auto trackType = trackElement->getTrackType(); switch (trackType) { case TrackElemType::up25ToFlat: @@ -2676,7 +2676,7 @@ namespace OpenRCT2::RCT1 continue; } - RideId rideIndex = trackElement->GetRideIndex(); + RideId rideIndex = trackElement->getRideIndex(); auto ride = GetRide(rideIndex); if (ride != nullptr) { diff --git a/src/openrct2/rct12/ScenarioPatcher.cpp b/src/openrct2/rct12/ScenarioPatcher.cpp index 4cf652e76a..553c5058ea 100644 --- a/src/openrct2/rct12/ScenarioPatcher.cpp +++ b/src/openrct2/rct12/ScenarioPatcher.cpp @@ -339,10 +339,10 @@ static void ApplyTrackTypeFixes(const json_t& trackTilesFixes) { for (auto* trackElement : TileElementsView(tile)) { - if (trackElement->GetTrackType() != fromTrackType) + if (trackElement->getTrackType() != fromTrackType) continue; - trackElement->SetTrackType(destinationTrackType); + trackElement->setTrackType(destinationTrackType); } } } diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 19fe87703c..855a1bd4a0 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1392,49 +1392,49 @@ namespace OpenRCT2::RCT2 auto oldTrackType = src2->GetTrackType(); TrackElemType trackType = RCT2TrackTypeToOpenRCT2(oldTrackType, rideType, IsFlatRide(src2->GetRideIndex())); - dst2->SetTrackType(trackType); - dst2->SetRideType(rideType); - dst2->SetSequenceIndex(src2->GetSequenceIndex()); - dst2->SetRideIndex(RCT12RideIdToOpenRCT2RideId(src2->GetRideIndex())); - dst2->SetColourScheme(src2->GetColourScheme()); - dst2->SetHasChain(src2->HasChain()); - dst2->SetHasCableLift(src2->HasCableLift()); - dst2->SetInverted(src2->IsInverted()); - dst2->SetStationIndex(StationIndex::FromUnderlying(src2->GetStationIndex())); - dst2->SetHasGreenLight(src2->HasGreenLight()); + dst2->setTrackType(trackType); + dst2->setRideType(rideType); + dst2->setSequenceIndex(src2->GetSequenceIndex()); + dst2->setRideIndex(RCT12RideIdToOpenRCT2RideId(src2->GetRideIndex())); + dst2->setColourScheme(src2->GetColourScheme()); + dst2->setHasChain(src2->HasChain()); + dst2->setHasCableLift(src2->HasCableLift()); + dst2->setInverted(src2->IsInverted()); + dst2->setStationIndex(StationIndex::FromUnderlying(src2->GetStationIndex())); + dst2->setHasGreenLight(src2->HasGreenLight()); // Brakes import as closed to preserve legacy behaviour - dst2->SetBrakeClosed(src2->BlockBrakeClosed() || (trackType == TrackElemType::brakes)); - dst2->SetIsIndestructible(src2->IsIndestructible()); + dst2->setBrakeClosed(src2->BlockBrakeClosed() || (trackType == TrackElemType::brakes)); + dst2->setIsIndestructible(src2->IsIndestructible()); // Skipping IsHighlighted() // Import block brakes to keep legacy behaviour if (trackType == TrackElemType::blockBrakes) { - dst2->SetBrakeBoosterSpeed(kRCT2DefaultBlockBrakeSpeed); + dst2->setBrakeBoosterSpeed(kRCT2DefaultBlockBrakeSpeed); } else if (trackTypeHasSpeedSetting(trackType)) { - dst2->SetBrakeBoosterSpeed(src2->GetBrakeBoosterSpeed()); + dst2->setBrakeBoosterSpeed(src2->GetBrakeBoosterSpeed()); } else if (trackType == TrackElemType::onRidePhoto) { - dst2->SetPhotoTimeout(src2->GetPhotoTimeout()); + dst2->setPhotoTimeout(src2->GetPhotoTimeout()); } // This has to be done last, since the maze entry shares fields with the colour and sequence fields. const auto& rtd = GetRideTypeDescriptor(rideType); if (rtd.specialType == RtdSpecialType::maze) { - dst2->SetMazeEntry(src2->GetMazeEntry()); + dst2->setMazeEntry(src2->GetMazeEntry()); } else if (rideType == RIDE_TYPE_GHOST_TRAIN) { - dst2->SetDoorAState(src2->GetDoorAState()); - dst2->SetDoorBState(src2->GetDoorBState()); + dst2->setDoorAState(src2->GetDoorAState()); + dst2->setDoorBState(src2->GetDoorBState()); } else { - dst2->SetSeatRotation(src2->GetSeatRotation()); + dst2->setSeatRotation(src2->GetSeatRotation()); } if (TrackTypeMustBeMadeInvisible(*dst2)) diff --git a/src/openrct2/ride/CableLift.cpp b/src/openrct2/ride/CableLift.cpp index 325829222b..79bae839ee 100644 --- a/src/openrct2/ride/CableLift.cpp +++ b/src/openrct2/ride/CableLift.cpp @@ -264,12 +264,12 @@ bool Vehicle::CableLiftUpdateTrackMotionForwards() if (!trackBlockGetNext(&input, &output, &outputZ, &outputDirection)) return false; - if (TrackPitchAndRollEnd(trackType) != TrackPitchAndRollStart(output.element->asTrack()->GetTrackType())) + if (TrackPitchAndRollEnd(trackType) != TrackPitchAndRollStart(output.element->asTrack()->getTrackType())) return false; TrackLocation = { output, outputZ }; SetTrackDirection(outputDirection); - SetTrackType(output.element->asTrack()->GetTrackType()); + SetTrackType(output.element->asTrack()->getTrackType()); trackProgress = 0; } @@ -315,17 +315,17 @@ bool Vehicle::CableLiftUpdateTrackMotionBackwards() if (!trackBlockGetPrevious(input, &output)) return false; - if (TrackPitchAndRollStart(trackType) != TrackPitchAndRollEnd(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 }; SetTrackDirection(output.begin_direction); - SetTrackType(output.begin_element->asTrack()->GetTrackType()); + SetTrackType(output.begin_element->asTrack()->getTrackType()); // Doesn't check for diagonal block brakes because there is no diagonal cable lift piece, // no way for a cable lift to start from a diagonal brake. - if (output.begin_element->asTrack()->GetTrackType() == TrackElemType::endStation - || output.begin_element->asTrack()->GetTrackType() == TrackElemType::blockBrakes) + if (output.begin_element->asTrack()->getTrackType() == TrackElemType::endStation + || output.begin_element->asTrack()->getTrackType() == TrackElemType::blockBrakes) { _vehicleMotionTrackFlags = VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_AT_STATION; } diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index 28d6a6a2ef..60821e2f2b 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -492,16 +492,16 @@ namespace OpenRCT2 { if (it.element->getType() != TileElementType::track) continue; - if (it.element->asTrack()->GetRideIndex() != ride.id) + if (it.element->asTrack()->getRideIndex() != ride.id) continue; // Found a track piece for target ride // Check if it's not the station or ??? (but allow end piece of station) - const auto& ted = GetTrackElementDescriptor(it.element->asTrack()->GetTrackType()); + const auto& ted = GetTrackElementDescriptor(it.element->asTrack()->getTrackType()); bool specialTrackPiece - = (it.element->asTrack()->GetTrackType() != TrackElemType::beginStation - && it.element->asTrack()->GetTrackType() != TrackElemType::middleStation + = (it.element->asTrack()->getTrackType() != TrackElemType::beginStation + && it.element->asTrack()->getTrackType() != TrackElemType::middleStation && ted.sequenceData.sequences[0].flags.has(SequenceFlag::trackOrigin)); // Set result tile to this track piece if first found track or a ??? @@ -2093,7 +2093,7 @@ namespace OpenRCT2 { if (tileElement == nullptr) break; - if (tileElement->getType() == TileElementType::track && tileElement->asTrack()->GetRideIndex() == ride.id) + if (tileElement->getType() == TileElementType::track && tileElement->asTrack()->getRideIndex() == ride.id) { trackElement = tileElement->asTrack(); break; @@ -2103,8 +2103,8 @@ namespace OpenRCT2 if (trackElement == nullptr) return; - auto track_type = trackElement->GetTrackType(); - auto ride2 = GetRide(trackElement->GetRideIndex()); + auto track_type = trackElement->getTrackType(); + auto ride2 = GetRide(trackElement->getRideIndex()); if (ride2 == nullptr) return; @@ -2153,7 +2153,7 @@ namespace OpenRCT2 static void RideTrackSetMapTooltip(const TrackElement& trackElement) { - auto rideIndex = trackElement.GetRideIndex(); + auto rideIndex = trackElement.getRideIndex(); auto ride = GetRide(rideIndex); if (ride != nullptr) { @@ -2185,12 +2185,12 @@ namespace OpenRCT2 static void RideStationSetMapTooltip(const TrackElement& trackElement) { - auto rideIndex = trackElement.GetRideIndex(); + auto rideIndex = trackElement.getRideIndex(); auto ride = GetRide(rideIndex); if (ride == nullptr) return; - const auto stationIndex = trackElement.GetStationIndex(); + const auto stationIndex = trackElement.getStationIndex(); const auto stationNumber = ride->getStationNumber(stationIndex); auto ft = Formatter(); @@ -2278,7 +2278,7 @@ namespace OpenRCT2 else if (tileElement.getType() == TileElementType::track) { const auto* trackElement = tileElement.asTrack(); - if (trackElement->IsStation()) + if (trackElement->isStation()) { RideStationSetMapTooltip(*trackElement); } @@ -2454,7 +2454,7 @@ namespace OpenRCT2 if (input.element == nullptr || input.element->getType() != TileElementType::track) return { false }; - RideId rideIndex = input.element->asTrack()->GetRideIndex(); + RideId rideIndex = input.element->asTrack()->getRideIndex(); auto* windowMgr = Ui::GetWindowManager(); WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); @@ -2465,9 +2465,9 @@ namespace OpenRCT2 trackCircuitIteratorBegin(&it, input); while (trackCircuitIteratorNext(&it)) { - if (trackTypeIsBlockBrakes(it.current.element->asTrack()->GetTrackType())) + if (trackTypeIsBlockBrakes(it.current.element->asTrack()->getTrackType())) { - auto type = it.last.element->asTrack()->GetTrackType(); + auto type = it.last.element->asTrack()->getTrackType(); if (type == TrackElemType::endStation) { *output = it.current; @@ -2478,7 +2478,7 @@ namespace OpenRCT2 *output = it.current; return { false, STR_BLOCK_BRAKES_CANNOT_BE_USED_DIRECTLY_AFTER_EACH_OTHER }; } - if (it.last.element->asTrack()->HasChain() && type != TrackElemType::leftCurvedLiftHill + if (it.last.element->asTrack()->hasChain() && type != TrackElemType::leftCurvedLiftHill && type != TrackElemType::rightCurvedLiftHill) { *output = it.current; @@ -2512,7 +2512,7 @@ namespace OpenRCT2 if (trackElement == nullptr) return false; - RideId rideIndex = trackElement->GetRideIndex(); + RideId rideIndex = trackElement->getRideIndex(); auto ride = GetRide(rideIndex); if (ride != nullptr) { @@ -2535,7 +2535,7 @@ namespace OpenRCT2 while (trackCircuitIteratorNext(&it)) { - auto trackType = it.current.element->asTrack()->GetTrackType(); + auto trackType = it.current.element->asTrack()->getTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); if (ted.flags.has(TrackElementFlag::inversionToNormal)) { @@ -2573,7 +2573,7 @@ namespace OpenRCT2 if (trackElement == nullptr) return false; - auto rideIndex = trackElement->GetRideIndex(); + auto rideIndex = trackElement->getRideIndex(); auto ride = GetRide(rideIndex); if (ride == nullptr) return false; @@ -2596,7 +2596,7 @@ namespace OpenRCT2 while (trackCircuitIteratorNext(&it)) { - auto trackType = it.current.element->asTrack()->GetTrackType(); + auto trackType = it.current.element->asTrack()->getTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); if (ted.flags.has(TrackElementFlag::banked)) { @@ -2627,7 +2627,7 @@ namespace OpenRCT2 auto* windowMgr = Ui::GetWindowManager(); WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w != nullptr && _rideConstructionState != RideConstructionState::state0 - && _currentRideIndex == input.element->asTrack()->GetRideIndex()) + && _currentRideIndex == input.element->asTrack()->getRideIndex()) { RideConstructionInvalidateCurrentTrack(); } @@ -2648,7 +2648,7 @@ namespace OpenRCT2 do { - const auto& ted = GetTrackElementDescriptor(output->element->asTrack()->GetTrackType()); + const auto& ted = GetTrackElementDescriptor(output->element->asTrack()->getTrackType()); if (ted.sequenceData.sequences[0].flags.has(SequenceFlag::trackOrigin)) { num_station_elements++; @@ -2682,7 +2682,7 @@ namespace OpenRCT2 { CoordsXYE trackBack, trackFront; - RideId rideIndex = input.element->asTrack()->GetRideIndex(); + RideId rideIndex = input.element->asTrack()->getRideIndex(); auto ride = GetRide(rideIndex); if (ride == nullptr) return false; @@ -2696,7 +2696,7 @@ namespace OpenRCT2 // Check back of the track trackGetBack(input, &trackBack); - auto trackType = trackBack.element->asTrack()->GetTrackType(); + auto trackType = trackBack.element->asTrack()->getTrackType(); const auto& tedBack = GetTrackElementDescriptor(trackType); if (!tedBack.sequenceData.sequences[0].flags.has(SequenceFlag::trackOrigin)) { @@ -2707,7 +2707,7 @@ namespace OpenRCT2 // Check front of the track trackGetFront(input, &trackFront); - trackType = trackFront.element->asTrack()->GetTrackType(); + trackType = trackFront.element->asTrack()->getTrackType(); const auto& tedFront = GetTrackElementDescriptor(trackType); if (!tedFront.sequenceData.sequences[0].flags.has(SequenceFlag::trackOrigin)) { @@ -2737,14 +2737,14 @@ namespace OpenRCT2 auto trackCoords = CoordsXYZ{ trackBeginEnd.begin_x, trackBeginEnd.begin_y, trackBeginEnd.begin_z }; int32_t direction = trackBeginEnd.begin_direction; - trackType = trackBeginEnd.begin_element->asTrack()->GetTrackType(); + trackType = trackBeginEnd.begin_element->asTrack()->getTrackType(); auto newCoords = GetTrackElementOriginAndApplyChanges( { trackCoords, static_cast(direction) }, trackType, 0, &returnPos.element, {}); returnPos = newCoords.has_value() ? CoordsXYE{ newCoords.value(), returnPos.element } : CoordsXYE{ trackCoords, returnPos.element }; }; - trackType = returnPos.element->asTrack()->GetTrackType(); + trackType = returnPos.element->asTrack()->getTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); int32_t elementReturnDirection = ted.coordinates.rotationBegin; ride.boatHireReturnDirection = returnPos.element->getDirectionWithOffset(elementReturnDirection); @@ -2802,7 +2802,7 @@ namespace OpenRCT2 void SetBrakeClosedMultiTile(TrackElement& trackElement, const CoordsXY& trackLocation, bool isClosed) { - switch (trackElement.GetTrackType()) + switch (trackElement.getTrackType()) { case TrackElemType::diagUp25ToFlat: case TrackElemType::diagUp60ToFlat: @@ -2810,11 +2810,11 @@ namespace OpenRCT2 case TrackElemType::diagBrakes: case TrackElemType::diagBlockBrakes: GetTrackElementOriginAndApplyChanges( - { trackLocation, trackElement.getBaseZ(), trackElement.getDirection() }, trackElement.GetTrackType(), + { trackLocation, trackElement.getBaseZ(), trackElement.getDirection() }, trackElement.getTrackType(), isClosed, nullptr, { TrackElementSetFlag::brakeClosed }); break; default: - trackElement.SetBrakeClosed(isClosed); + trackElement.setBrakeClosed(isClosed); } } @@ -2827,7 +2827,7 @@ namespace OpenRCT2 CoordsXYE currentElement = startElement; do { - auto trackType = currentElement.element->asTrack()->GetTrackType(); + auto trackType = currentElement.element->asTrack()->getTrackType(); switch (trackType) { case TrackElemType::blockBrakes: @@ -2856,7 +2856,7 @@ namespace OpenRCT2 */ void BlockBrakeSetLinkedBrakesClosed(const CoordsXYZ& vehicleTrackLocation, TrackElement& trackElement, bool isClosed) { - uint8_t brakeSpeed = trackElement.GetBrakeBoosterSpeed(); + uint8_t brakeSpeed = trackElement.getBrakeBoosterSpeed(); auto tileElement = reinterpret_cast(&trackElement); auto location = vehicleTrackLocation; @@ -2881,11 +2881,11 @@ namespace OpenRCT2 location.z = trackBeginEnd.begin_z; tileElement = trackBeginEnd.begin_element; - if (trackTypeIsBrakes(tileElement->asTrack()->GetTrackType())) + if (trackTypeIsBrakes(tileElement->asTrack()->getTrackType())) { SetBrakeClosedMultiTile( *tileElement->asTrack(), { trackBeginEnd.begin_x, trackBeginEnd.begin_y }, - (tileElement->asTrack()->GetBrakeBoosterSpeed() >= brakeSpeed) || isClosed); + (tileElement->asTrack()->getBrakeBoosterSpeed() >= brakeSpeed) || isClosed); } // prevent infinite loop @@ -2903,7 +2903,7 @@ namespace OpenRCT2 return; } } - } while (trackTypeIsBrakes(trackBeginEnd.begin_element->asTrack()->GetTrackType())); + } while (trackTypeIsBrakes(trackBeginEnd.begin_element->asTrack()->getTrackType())); } /** @@ -3039,12 +3039,12 @@ namespace OpenRCT2 int32_t direction = trackElement->getDirection(); auto dodgemPos = carPosition + CoordsXYZ{ word_9A3AB4[direction], 0 }; vehicle->TrackLocation = dodgemPos; - vehicle->current_station = trackElement->GetStationIndex(); + vehicle->current_station = trackElement->getStationIndex(); dodgemPos.z += rtd.Heights.VehicleZOffset; vehicle->SetTrackDirection(0); - vehicle->SetTrackType(trackElement->GetTrackType()); + vehicle->SetTrackType(trackElement->getTrackType()); vehicle->track_progress = 0; vehicle->SetState(Vehicle::Status::movingToEndOfStation); vehicle->flags.clearAll(); @@ -3136,10 +3136,10 @@ namespace OpenRCT2 chosenLoc += CoordsXYZ{ word_9A2A60[direction], rtd.Heights.VehicleZOffset }; - vehicle->current_station = trackElement->GetStationIndex(); + vehicle->current_station = trackElement->getStationIndex(); vehicle->moveTo(chosenLoc); - vehicle->SetTrackType(trackElement->GetTrackType()); + vehicle->SetTrackType(trackElement->getTrackType()); vehicle->SetTrackDirection(vehicle->orientation >> 3); vehicle->track_progress = 31; if (carEntry.flags.has(CarEntryFlag::isMiniGolf)) @@ -3149,7 +3149,7 @@ namespace OpenRCT2 vehicle->flags = { VehicleFlag::collisionDisabled }; if (carEntry.flags.has(CarEntryFlag::hasInvertedSpriteSet)) { - if (trackElement->IsInverted()) + if (trackElement->isInverted()) { vehicle->flags.set(VehicleFlag::carIsInverted); } @@ -3284,12 +3284,12 @@ namespace OpenRCT2 break; } - auto trackType = trackElement->GetTrackType(); + auto trackType = trackElement->getTrackType(); switch (trackType) { case TrackElemType::diagUp25ToFlat: case TrackElemType::diagUp60ToFlat: - if (!trackElement->HasChain()) + if (!trackElement->hasChain()) { break; } @@ -3310,7 +3310,7 @@ namespace OpenRCT2 } case TrackElemType::up25ToFlat: case TrackElemType::up60ToFlat: - if (!trackElement->HasChain()) + if (!trackElement->hasChain()) { break; } @@ -3480,9 +3480,9 @@ namespace OpenRCT2 // remaining. This fixes the bug in #1122. if (cableLiftTileElement != nullptr && cableLiftPreviousBlock != nullptr) { - cableLiftPreviousBlock->SetBrakeClosed(cableLiftTileElement->IsBrakeClosed()); + cableLiftPreviousBlock->setBrakeClosed(cableLiftTileElement->isBrakeClosed()); } - firstBlock.SetBrakeClosed(true); + firstBlock.setBrakeClosed(true); for (Vehicle* car = train; car != nullptr; car = getGameState().entities.GetEntity(car->next_vehicle_on_train)) { @@ -3496,7 +3496,7 @@ namespace OpenRCT2 // All vehicles are in position, set the block brake directly before the station one last time and make sure the // brakes are set appropriately SetBrakeClosedMultiTile(firstBlock, firstBlockPosition, true); - if (trackTypeIsBlockBrakes(firstBlock.GetTrackType())) + if (trackTypeIsBlockBrakes(firstBlock.getTrackType())) { BlockBrakeSetLinkedBrakesClosed(firstBlockPosition, firstBlock, true); } @@ -3515,7 +3515,7 @@ namespace OpenRCT2 // After all trains are in position, set the block preceding the cable lift to open. if (cableLiftPreviousBlock != nullptr) { - cableLiftPreviousBlock->SetBrakeClosed(false); + cableLiftPreviousBlock->setBrakeClosed(false); } } @@ -3562,7 +3562,7 @@ namespace OpenRCT2 TileElement* tileElement = it.current.element; GetTrackElementOriginAndApplyChanges( { { it.current, tileElement->getBaseZ() }, tileElement->getDirection() }, - tileElement->asTrack()->GetTrackType(), 0, &tileElement, { TrackElementSetFlag::cableLiftOff }); + tileElement->asTrack()->getTrackType(), 0, &tileElement, { TrackElementSetFlag::cableLiftOff }); } } @@ -3577,7 +3577,7 @@ namespace OpenRCT2 while (trackCircuitIteratorPrevious(&it)) { TileElement* tileElement = it.current.element; - auto trackType = tileElement->asTrack()->GetTrackType(); + auto trackType = tileElement->asTrack()->getTrackType(); switch (trackType) { case TrackElemType::up25: @@ -3773,11 +3773,11 @@ namespace OpenRCT2 continue; auto* trackElement = tileElement->asTrack(); - const auto& ted = GetTrackElementDescriptor(trackElement->GetTrackType()); + const auto& ted = GetTrackElementDescriptor(trackElement->getTrackType()); if (!ted.sequenceData.sequences[0].flags.has(SequenceFlag::trackOrigin)) continue; - if (trackElement->GetRideIndex() == id) + if (trackElement->getRideIndex() == id) return trackElement; } while (!(tileElement++)->isLastForTile()); @@ -4379,7 +4379,7 @@ namespace OpenRCT2 { if (it.element->getType() != TileElementType::track) continue; - if (it.element->asTrack()->GetRideIndex() != ride.id) + if (it.element->asTrack()->getRideIndex() != ride.id) continue; if (it.element->isGhost()) continue; @@ -4759,7 +4759,7 @@ namespace OpenRCT2 if (tileElement->getType() != TileElementType::track) continue; - trackType = tileElement->asTrack()->GetTrackType(); + trackType = tileElement->asTrack()->getTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); if (!ted.sequenceData.sequences[0].flags.has(SequenceFlag::trackOrigin)) continue; @@ -4777,7 +4777,7 @@ namespace OpenRCT2 if (!foundTrack) return 0; - RideId rideIndex = tileElement->asTrack()->GetRideIndex(); + RideId rideIndex = tileElement->asTrack()->getRideIndex(); auto* windowMgr = Ui::GetWindowManager(); WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); @@ -4795,7 +4795,7 @@ namespace OpenRCT2 TrackCircuitIterator slowIt = it; while (trackCircuitIteratorNext(&it)) { - trackType = it.current.element->asTrack()->GetTrackType(); + trackType = it.current.element->asTrack()->getTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); result += ted.pieceLength; @@ -5126,7 +5126,7 @@ namespace OpenRCT2 if (tileElement->getType() != TileElementType::track) continue; /* Check if tileElement is a station platform. */ - if (!tileElement->asTrack()->IsStation()) + if (!tileElement->asTrack()->isStation()) continue; if (coords.baseZ > tileElement->getBaseZ() || coords.clearanceZ < tileElement->getBaseZ()) @@ -5164,7 +5164,7 @@ namespace OpenRCT2 { { adjX, adjY, stationCoords.z - 2 * kCoordsZStep }, stationCoords.z + 2 * kCoordsZStep }); if (stationElement != nullptr) { - auto rideIndex = stationElement->asTrack()->GetRideIndex(); + auto rideIndex = stationElement->asTrack()->getRideIndex(); auto ride = GetRide(rideIndex); if (ride != nullptr && (ride->departFlags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS)) { @@ -5550,10 +5550,10 @@ namespace OpenRCT2 continue; auto* trackElement = tileElement->asTrack(); - if (trackElement->GetRideIndex() != id) + if (trackElement->getRideIndex() != id) continue; - trackElement->SetRideType(type); + trackElement->setRideType(type); } while (!(tileElement++)->isLastForTile()); } @@ -5594,7 +5594,7 @@ namespace OpenRCT2 auto trackEl = it.element->asTrack(); if (trackEl != nullptr && !trackEl->isGhost()) { - auto rideId = trackEl->GetRideIndex().ToUnderlying(); + auto rideId = trackEl->getRideIndex().ToUnderlying(); if (rideId >= seen.size()) { seen.resize(rideId + 1); diff --git a/src/openrct2/ride/RideConstruction.cpp b/src/openrct2/ride/RideConstruction.cpp index c2112eaf0c..b82953ed63 100644 --- a/src/openrct2/ride/RideConstruction.cpp +++ b/src/openrct2/ride/RideConstruction.cpp @@ -558,7 +558,7 @@ namespace OpenRCT2 { for (auto* trackElement : TileElementsView(tilePos.ToCoordsXY())) { - if (trackElement->GetRideIndex() != ride.id) + if (trackElement->getRideIndex() != ride.id) continue; // Unblock footpath element that is at same position @@ -604,7 +604,7 @@ namespace OpenRCT2 const auto& ted = GetTrackElementDescriptor(type); // Now find all the elements that belong to this track piece - int32_t sequence = trackElement->GetSequenceIndex(); + int32_t sequence = trackElement->getSequenceIndex(); uint8_t mapDirection = trackElement->getDirection(); if (sequence >= ted.sequenceData.numSequences) return std::nullopt; @@ -643,16 +643,16 @@ namespace OpenRCT2 } if (flags.has(TrackElementSetFlag::highlightOff)) { - trackElement->SetHighlight(false); + trackElement->setHighlight(false); } if (flags.has(TrackElementSetFlag::highlightOn)) { - trackElement->SetHighlight(true); + trackElement->setHighlight(true); } if (flags.has(TrackElementSetFlag::colourScheme)) { auto newScheme = static_cast(extra_params & 0xFF); - trackElement->SetColourScheme(newScheme); + trackElement->setColourScheme(newScheme); if (_previousTrackPiece == retCoordsXYZ) { @@ -661,23 +661,23 @@ namespace OpenRCT2 } if (flags.has(TrackElementSetFlag::seatRotation)) { - trackElement->SetSeatRotation(static_cast(extra_params & 0xFF)); + trackElement->setSeatRotation(static_cast(extra_params & 0xFF)); } if (flags.has(TrackElementSetFlag::cableLiftOn)) { - trackElement->SetHasCableLift(true); + trackElement->setHasCableLift(true); } if (flags.has(TrackElementSetFlag::cableLiftOff)) { - trackElement->SetHasCableLift(false); + trackElement->setHasCableLift(false); } if (flags.has(TrackElementSetFlag::brakeClosed)) { - trackElement->SetBrakeClosed(extra_params != 0); + trackElement->setBrakeClosed(extra_params != 0); } if (flags.has(TrackElementSetFlag::brakeBoosterSpeed)) { - trackElement->SetBrakeBoosterSpeed(static_cast(extra_params & 0xFF)); + trackElement->setBrakeBoosterSpeed(static_cast(extra_params & 0xFF)); } } return retCoordsXYZ; @@ -809,7 +809,7 @@ namespace OpenRCT2 return; } tileElement = trackBeginEnd.begin_element; - trackType = tileElement->asTrack()->GetTrackType(); + trackType = tileElement->asTrack()->getTrackType(); if (!ride->getRideTypeDescriptor().flags.has(RtdFlag::hasTrack)) { @@ -821,7 +821,7 @@ namespace OpenRCT2 _currentTrackAlternative.unset(AlternativeTrackFlag::inverted); if (rtd.flags.has(RtdFlag::hasInvertedVariant)) { - if (tileElement->asTrack()->IsInverted()) + if (tileElement->asTrack()->isInverted()) { _currentTrackAlternative.set(AlternativeTrackFlag::inverted); } @@ -851,14 +851,14 @@ namespace OpenRCT2 // Set track slope and lift hill _currentTrackPitchEnd = slope; _previousTrackPitchEnd = slope; - _currentTrackHasLiftHill = trackElement->HasChain() + _currentTrackHasLiftHill = trackElement->hasChain() && ((slope != TrackPitch::down25 && slope != TrackPitch::down60) || getGameState().cheats.enableChainLiftOnAllTrack); - if (trackTypeHasSpeedSetting(trackElement->GetTrackType())) - _currentBrakeSpeed = trackElement->GetBrakeBoosterSpeed(); - _currentColourScheme = static_cast(trackElement->GetColourScheme()); - _currentSeatRotationAngle = trackElement->GetSeatRotation(); + if (trackTypeHasSpeedSetting(trackElement->getTrackType())) + _currentBrakeSpeed = trackElement->getBrakeBoosterSpeed(); + _currentColourScheme = static_cast(trackElement->getColourScheme()); + _currentSeatRotationAngle = trackElement->getSeatRotation(); _previousTrackPiece.x = trackBeginEnd.begin_x; _previousTrackPiece.y = trackBeginEnd.begin_y; @@ -874,13 +874,13 @@ namespace OpenRCT2 return; } tileElement = xyElement.element; - trackType = tileElement->asTrack()->GetTrackType(); + trackType = tileElement->asTrack()->getTrackType(); // Set whether track is covered _currentTrackAlternative.unset(AlternativeTrackFlag::inverted); if (rtd.flags.has(RtdFlag::hasInvertedVariant)) { - if (tileElement->asTrack()->IsInverted()) + if (tileElement->asTrack()->isInverted()) { _currentTrackAlternative.set(AlternativeTrackFlag::inverted); } @@ -912,13 +912,13 @@ namespace OpenRCT2 _previousTrackPitchEnd = slope; if (!getGameState().cheats.enableChainLiftOnAllTrack) { - _currentTrackHasLiftHill = trackElement->HasChain(); + _currentTrackHasLiftHill = trackElement->hasChain(); } - if (trackTypeHasSpeedSetting(trackElement->GetTrackType())) - _currentBrakeSpeed = trackElement->GetBrakeBoosterSpeed(); - _currentColourScheme = static_cast(trackElement->GetColourScheme()); - _currentSeatRotationAngle = trackElement->GetSeatRotation(); + if (trackTypeHasSpeedSetting(trackElement->getTrackType())) + _currentBrakeSpeed = trackElement->getBrakeBoosterSpeed(); + _currentColourScheme = static_cast(trackElement->getColourScheme()); + _currentSeatRotationAngle = trackElement->getSeatRotation(); _previousTrackPiece.x = xyElement.x; _previousTrackPiece.y = xyElement.y; @@ -962,7 +962,7 @@ namespace OpenRCT2 tileElement = outputElement.element; _currentTrackBegin = *newCoords; _currentTrackPieceDirection = tileElement->getDirection(); - _currentTrackPieceType = tileElement->asTrack()->GetTrackType(); + _currentTrackPieceType = tileElement->asTrack()->getTrackType(); _currentTrackSelectionFlags.clearAll(); WindowRideConstructionUpdateActiveElements(); } @@ -971,7 +971,7 @@ namespace OpenRCT2 _rideConstructionState = RideConstructionState::front; _currentTrackBegin = { outputElement, newCoords->z }; _currentTrackPieceDirection = direction; - _currentTrackPieceType = tileElement->asTrack()->GetTrackType(); + _currentTrackPieceType = tileElement->asTrack()->getTrackType(); _currentTrackSelectionFlags.clearAll(); RideConstructionSetDefaultNextPiece(); WindowRideConstructionUpdateActiveElements(); @@ -1016,7 +1016,7 @@ namespace OpenRCT2 _currentTrackBegin.y = trackBeginEnd.begin_y; _currentTrackBegin.z = trackBeginEnd.begin_z; _currentTrackPieceDirection = trackBeginEnd.begin_direction; - _currentTrackPieceType = trackBeginEnd.begin_element->asTrack()->GetTrackType(); + _currentTrackPieceType = trackBeginEnd.begin_element->asTrack()->getTrackType(); _currentTrackSelectionFlags.clearAll(); WindowRideConstructionUpdateActiveElements(); } @@ -1027,7 +1027,7 @@ namespace OpenRCT2 _currentTrackBegin.y = trackBeginEnd.end_y; _currentTrackBegin.z = trackBeginEnd.begin_z; _currentTrackPieceDirection = trackBeginEnd.end_direction; - _currentTrackPieceType = tileElement->asTrack()->GetTrackType(); + _currentTrackPieceType = tileElement->asTrack()->getTrackType(); _currentTrackSelectionFlags.clearAll(); RideConstructionSetDefaultNextPiece(); WindowRideConstructionUpdateActiveElements(); @@ -1138,7 +1138,7 @@ namespace OpenRCT2 auto trackElement = tileElement.element->asTrack(); if (trackElement != nullptr) { - _currentRideIndex = trackElement->GetRideIndex(); + _currentRideIndex = trackElement->getRideIndex(); _rideConstructionState = RideConstructionState::mazeBuild; _currentTrackBegin.x = tileElement.x; _currentTrackBegin.y = tileElement.y; @@ -1208,7 +1208,7 @@ namespace OpenRCT2 const auto tileCoords = CoordsXYZ{ tileElement, tileElement.element->getBaseZ() }; const auto direction = tileElement.element->getDirection(); - const auto type = tileElement.element->asTrack()->GetTrackType(); + const auto type = tileElement.element->asTrack()->getTrackType(); ride_create_or_find_construction_window(rideIndex); @@ -1335,7 +1335,7 @@ namespace OpenRCT2 do { auto trackRemoveAction = GameActions::TrackRemoveAction( - trackElement.element->asTrack()->GetTrackType(), trackElement.element->asTrack()->GetSequenceIndex(), + trackElement.element->asTrack()->getTrackType(), trackElement.element->asTrack()->getSequenceIndex(), { trackElement.x, trackElement.y, trackElement.element->getBaseZ(), direction }); trackRemoveAction.SetFlags(CommandFlag::allowDuringPaused); @@ -1422,12 +1422,12 @@ namespace OpenRCT2 continue; if (tileElement->getType() != TileElementType::track) continue; - if (tileElement->asTrack()->GetRideIndex() != id) + if (tileElement->asTrack()->getRideIndex() != id) continue; - if (tileElement->asTrack()->GetSequenceIndex() != 0) + if (tileElement->asTrack()->getSequenceIndex() != 0) continue; - const auto& ted = GetTrackElementDescriptor(tileElement->asTrack()->GetTrackType()); + const auto& ted = GetTrackElementDescriptor(tileElement->asTrack()->getTrackType()); // keep searching for a station piece (coaster station, tower ride base, shops, and flat ride base) if (!ted.sequenceData.sequences[0].flags.has(SequenceFlag::trackOrigin)) continue; @@ -1441,7 +1441,7 @@ namespace OpenRCT2 break; } // update the StationIndex, get the TrackElement's rotation - tileElement->asTrack()->SetStationIndex(getStationIndex(&station)); + tileElement->asTrack()->setStationIndex(getStationIndex(&station)); direction = tileElement->getDirection(); // In the future this could look at the TED and see if the station has a sequence longer than 1 @@ -1460,7 +1460,7 @@ namespace OpenRCT2 continue; } // update all the blocks with StationIndex - const auto& ted = GetTrackElementDescriptor(tileElement->asTrack()->GetTrackType()); + const auto& ted = GetTrackElementDescriptor(tileElement->asTrack()->getTrackType()); for (uint8_t i = 0; i < ted.sequenceData.numSequences; i++) { const auto& block = ted.sequenceData.sequences[i].clearance; @@ -1478,7 +1478,7 @@ namespace OpenRCT2 if (tileElement->getType() != TileElementType::track) continue; - const auto& ted2 = GetTrackElementDescriptor(tileElement->asTrack()->GetTrackType()); + const auto& ted2 = GetTrackElementDescriptor(tileElement->asTrack()->getTrackType()); if (!ted2.sequenceData.sequences[0].flags.has(SequenceFlag::trackOrigin)) continue; @@ -1492,7 +1492,7 @@ namespace OpenRCT2 break; } - tileElement->asTrack()->SetStationIndex(getStationIndex(&station)); + tileElement->asTrack()->setStationIndex(getStationIndex(&station)); } } } @@ -1568,18 +1568,18 @@ namespace OpenRCT2 { if (trackElement->getType() != TileElementType::track) continue; - if (trackElement->asTrack()->GetRideIndex() != id) + if (trackElement->asTrack()->getRideIndex() != id) continue; if (trackElement->baseHeight != tileElement->baseHeight) continue; - auto trackType = trackElement->asTrack()->GetTrackType(); + auto trackType = trackElement->asTrack()->getTrackType(); // get the StationIndex for the station StationIndex stationId = StationIndex::FromUnderlying(0); if (trackType != TrackElemType::maze) { - uint8_t trackSequence = trackElement->asTrack()->GetSequenceIndex(); + uint8_t trackSequence = trackElement->asTrack()->getSequenceIndex(); // determine where the ride entrance is relative to the station track Direction direction = (tileElement->getDirection() - DirectionReverse(trackElement->getDirection())) @@ -1593,7 +1593,7 @@ namespace OpenRCT2 continue; } - stationId = trackElement->asTrack()->GetStationIndex(); + stationId = trackElement->asTrack()->getStationIndex(); } auto& station = getStation(stationId); @@ -1649,7 +1649,7 @@ namespace OpenRCT2 _currentTrackBegin.y = trackBeginEnd.begin_y; _currentTrackBegin.z = trackBeginEnd.begin_z; _currentTrackPieceDirection = trackBeginEnd.begin_direction; - _currentTrackPieceType = trackBeginEnd.begin_element->asTrack()->GetTrackType(); + _currentTrackPieceType = trackBeginEnd.begin_element->asTrack()->getTrackType(); _currentTrackSelectionFlags.clearAll(); return true; } @@ -1674,7 +1674,7 @@ namespace OpenRCT2 _currentTrackBegin.y = next_track.y; _currentTrackBegin.z = z; _currentTrackPieceDirection = next_track.element->getDirection(); - _currentTrackPieceType = next_track.element->asTrack()->GetTrackType(); + _currentTrackPieceType = next_track.element->asTrack()->getTrackType(); _currentTrackSelectionFlags.clearAll(); return true; } diff --git a/src/openrct2/ride/RideRatings.cpp b/src/openrct2/ride/RideRatings.cpp index 34788f0807..3e0b940636 100644 --- a/src/openrct2/ride/RideRatings.cpp +++ b/src/openrct2/ride/RideRatings.cpp @@ -381,7 +381,7 @@ namespace OpenRCT2 continue; if (tileElement->getBaseZ() != loc.z) continue; - if (tileElement->asTrack()->GetRideIndex() != ride->id) + if (tileElement->asTrack()->getRideIndex() != ride->id) { // Only check that the track belongs to the same ride if ride does not have buildable track if (!ride->getRideTypeDescriptor().flags.has(RtdFlag::hasTrack)) @@ -389,11 +389,11 @@ namespace OpenRCT2 } if (trackType == TrackElemType::none - || (tileElement->asTrack()->GetSequenceIndex() == 0 && trackType == tileElement->asTrack()->GetTrackType())) + || (tileElement->asTrack()->getSequenceIndex() == 0 && trackType == tileElement->asTrack()->getTrackType())) { if (trackType == TrackElemType::endStation) { - auto entranceIndex = tileElement->asTrack()->GetStationIndex(); + auto entranceIndex = tileElement->asTrack()->getStationIndex(); state.StationFlags &= ~RIDE_RATING_STATION_FLAG_NO_ENTRANCE; if (ride->getStation(entranceIndex).Entrance.IsNull()) { @@ -419,7 +419,7 @@ namespace OpenRCT2 return; } state.Proximity = loc; - state.ProximityTrackType = tileElement->asTrack()->GetTrackType(); + state.ProximityTrackType = tileElement->asTrack()->getTrackType(); return; } } while (!(tileElement++)->isLastForTile()); @@ -486,14 +486,14 @@ namespace OpenRCT2 continue; if (tileElement->getBaseZ() != loc.z) continue; - if (tileElement->asTrack()->GetRideIndex() != ride->id) + if (tileElement->asTrack()->getRideIndex() != ride->id) { // Only check that the track belongs to the same ride if ride does not have buildable track if (!ride->getRideTypeDescriptor().flags.has(RtdFlag::hasTrack)) continue; } - if (trackType == TrackElemType::none || trackType == tileElement->asTrack()->GetTrackType()) + if (trackType == TrackElemType::none || trackType == tileElement->asTrack()->getTrackType()) { ride_ratings_score_close_proximity(state, tileElement); @@ -513,7 +513,7 @@ namespace OpenRCT2 return; } state.Proximity = loc; - state.ProximityTrackType = trackBeginEnd.begin_element->asTrack()->GetTrackType(); + state.ProximityTrackType = trackBeginEnd.begin_element->asTrack()->getTrackType(); return; } } while (!(tileElement++)->isLastForTile()); @@ -604,7 +604,7 @@ namespace OpenRCT2 } break; case TileElementType::track: - if (inputTileElement->asTrack()->GetRideIndex() != tileElement->asTrack()->GetRideIndex()) + if (inputTileElement->asTrack()->getRideIndex() != tileElement->asTrack()->getRideIndex()) { if (abs(inputTileElement->getBaseZ() - tileElement->getBaseZ()) <= 2 * kCoordsZStep) { @@ -662,8 +662,8 @@ namespace OpenRCT2 if (zDiff >= 0 && zDiff <= 16) { proximity_score_increment(state, PROXIMITY_TRACK_THROUGH_VERTICAL_LOOP); - if (tileElement->asTrack()->GetTrackType() == TrackElemType::leftVerticalLoop - || tileElement->asTrack()->GetTrackType() == TrackElemType::rightVerticalLoop) + if (tileElement->asTrack()->getTrackType() == TrackElemType::leftVerticalLoop + || tileElement->asTrack()->getTrackType() == TrackElemType::rightVerticalLoop) { proximity_score_increment(state, PROXIMITY_INTERSECTING_VERTICAL_LOOP); } @@ -679,7 +679,7 @@ namespace OpenRCT2 */ static void ride_ratings_score_close_proximity_loops(RideRating::UpdateState& state, TileElement* inputTileElement) { - auto trackType = inputTileElement->asTrack()->GetTrackType(); + auto trackType = inputTileElement->asTrack()->getTrackType(); if (trackType == TrackElemType::leftVerticalLoop || trackType == TrackElemType::rightVerticalLoop) { ride_ratings_score_close_proximity_loops_helper(state, { state.Proximity, inputTileElement }); @@ -773,10 +773,10 @@ namespace OpenRCT2 break; case TileElementType::track: { - auto trackType = tileElement->asTrack()->GetTrackType(); + auto trackType = tileElement->asTrack()->getTrackType(); if (trackType == TrackElemType::leftVerticalLoop || trackType == TrackElemType::rightVerticalLoop) { - int32_t sequence = tileElement->asTrack()->GetSequenceIndex(); + int32_t sequence = tileElement->asTrack()->getSequenceIndex(); if (sequence == 3 || sequence == 6) { if (tileElement->baseHeight - inputTileElement->clearanceHeight <= 10) @@ -785,7 +785,7 @@ namespace OpenRCT2 } } } - if (inputTileElement->asTrack()->GetRideIndex() != tileElement->asTrack()->GetRideIndex()) + if (inputTileElement->asTrack()->getRideIndex() != tileElement->asTrack()->getRideIndex()) { proximity_score_increment(state, PROXIMITY_FOREIGN_TRACK_ABOVE_OR_BELOW); if (tileElement->getClearanceZ() == inputTileElement->getBaseZ()) @@ -813,7 +813,7 @@ namespace OpenRCT2 } else { - bool isStation = tileElement->asTrack()->IsStation(); + bool isStation = tileElement->asTrack()->isStation(); if (tileElement->clearanceHeight == inputTileElement->baseHeight) { proximity_score_increment(state, PROXIMITY_OWN_TRACK_TOUCH_ABOVE); diff --git a/src/openrct2/ride/Station.cpp b/src/openrct2/ride/Station.cpp index e6ed391f8b..d4007c8dc7 100644 --- a/src/openrct2/ride/Station.cpp +++ b/src/openrct2/ride/Station.cpp @@ -65,11 +65,11 @@ namespace OpenRCT2 auto& station = ride.getStation(stationIndex); if ((ride.status == RideStatus::closed && ride.numRiders == 0) - || (tileElement != nullptr && tileElement->asTrack()->IsBrakeClosed())) + || (tileElement != nullptr && tileElement->asTrack()->isBrakeClosed())) { station.Depart &= ~kStationDepartFlag; - if ((station.Depart & kStationDepartFlag) || (tileElement != nullptr && tileElement->asTrack()->HasGreenLight())) + if ((station.Depart & kStationDepartFlag) || (tileElement != nullptr && tileElement->asTrack()->hasGreenLight())) RideInvalidateStationStart(ride, stationIndex, false); } else @@ -79,7 +79,7 @@ namespace OpenRCT2 station.Depart |= kStationDepartFlag; RideInvalidateStationStart(ride, stationIndex, true); } - else if (tileElement != nullptr && tileElement->asTrack()->HasGreenLight()) + else if (tileElement != nullptr && tileElement->asTrack()->hasGreenLight()) { RideInvalidateStationStart(ride, stationIndex, true); } @@ -333,9 +333,9 @@ namespace OpenRCT2 return; TrackElement* const trackElement = tileElement->asTrack(); - if (trackElement->HasGreenLight() != greenLight) + if (trackElement->hasGreenLight() != greenLight) { - trackElement->SetHasGreenLight(greenLight); + trackElement->setHasGreenLight(greenLight); MapInvalidateTileZoom1({ startPos, tileElement->getBaseZ(), tileElement->getClearanceZ() }); } } diff --git a/src/openrct2/ride/Track.cpp b/src/openrct2/ride/Track.cpp index b623eb440e..804b5a687b 100644 --- a/src/openrct2/ride/Track.cpp +++ b/src/openrct2/ride/Track.cpp @@ -33,13 +33,13 @@ using OpenRCT2::GameActions::CommandFlags; */ int32_t TrackIsConnectedByShape(TileElement* a, TileElement* b) { - auto trackType = a->asTrack()->GetTrackType(); + auto trackType = a->asTrack()->getTrackType(); const auto* ted = &GetTrackElementDescriptor(trackType); auto aBank = ted->definition.rollEnd; auto aAngle = ted->definition.pitchEnd; aBank = TrackGetActualBank(a, aBank); - trackType = b->asTrack()->GetTrackType(); + trackType = b->asTrack()->getTrackType(); ted = &GetTrackElementDescriptor(trackType); auto bBank = ted->definition.rollStart; auto bAngle = ted->definition.pitchStart; @@ -61,9 +61,9 @@ static TileElement* find_station_element(const CoordsXYZD& loc, RideId rideIndex continue; if (tileElement->getDirection() != loc.direction) continue; - if (tileElement->asTrack()->GetRideIndex() != rideIndex) + if (tileElement->asTrack()->getRideIndex() != rideIndex) continue; - if (!tileElement->asTrack()->IsStation()) + if (!tileElement->asTrack()->isStation()) continue; return tileElement; @@ -132,7 +132,7 @@ ResultWithMessage TrackAddStationElement(CoordsXYZD loc, RideId rideIndex, Comma stationElement = find_station_element(loc, rideIndex); if (stationElement != nullptr) { - if (stationElement->asTrack()->GetTrackType() == TrackElemType::endStation) + if (stationElement->asTrack()->getTrackType() == TrackElemType::endStation) { if (flags.has(CommandFlag::apply)) { @@ -154,7 +154,7 @@ ResultWithMessage TrackAddStationElement(CoordsXYZD loc, RideId rideIndex, Comma stationElement = find_station_element(loc, rideIndex); if (stationElement != nullptr) { - if (stationElement->asTrack()->GetTrackType() == TrackElemType::endStation) + if (stationElement->asTrack()->getTrackType() == TrackElemType::endStation) { if (flags.has(CommandFlag::apply)) { @@ -220,7 +220,7 @@ ResultWithMessage TrackAddStationElement(CoordsXYZD loc, RideId rideIndex, Comma { targetTrackType = TrackElemType::middleStation; } - stationElement->asTrack()->SetTrackType(targetTrackType); + stationElement->asTrack()->setTrackType(targetTrackType); MapInvalidateElement(loc, stationElement); @@ -270,7 +270,7 @@ ResultWithMessage TrackRemoveStationElement(const CoordsXYZD& loc, RideId rideIn CoordsXYZD currentLoc = stationBackLoc; while ((stationElement = find_station_element(currentLoc, rideIndex)) != nullptr) { - if (stationElement->asTrack()->GetTrackType() == TrackElemType::endStation) + if (stationElement->asTrack()->getTrackType() == TrackElemType::endStation) { if (flags.has(CommandFlag::apply)) { @@ -293,7 +293,7 @@ ResultWithMessage TrackRemoveStationElement(const CoordsXYZD& loc, RideId rideIn stationElement = find_station_element(currentLoc, rideIndex); if (stationElement != nullptr) { - if (stationElement->asTrack()->GetTrackType() == TrackElemType::endStation) + if (stationElement->asTrack()->getTrackType() == TrackElemType::endStation) { if (flags.has(CommandFlag::apply)) { @@ -365,7 +365,7 @@ ResultWithMessage TrackRemoveStationElement(const CoordsXYZD& loc, RideId rideIn } } } - stationElement->asTrack()->SetTrackType(targetTrackType); + stationElement->asTrack()->setTrackType(targetTrackType); MapInvalidateElement(currentLoc, stationElement); } @@ -383,10 +383,10 @@ ResultWithMessage TrackRemoveStationElement(const CoordsXYZD& loc, RideId rideIn TrackRoll TrackGetActualBank(TileElement* tileElement, TrackRoll bank) { - auto ride = GetRide(tileElement->asTrack()->GetRideIndex()); + auto ride = GetRide(tileElement->asTrack()->getRideIndex()); if (ride != nullptr) { - bool isInverted = tileElement->asTrack()->IsInverted(); + bool isInverted = tileElement->asTrack()->isInverted(); return TrackGetActualBank2(ride->type, isInverted, bank); } return bank; @@ -413,14 +413,14 @@ TrackRoll TrackGetActualBank2(ride_type_t rideType, bool isInverted, TrackRoll b TrackRoll TrackGetActualBank3(bool useInvertedSprites, TileElement* tileElement) { - auto trackType = tileElement->asTrack()->GetTrackType(); + auto trackType = tileElement->asTrack()->getTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); auto bankStart = ted.definition.rollStart; - auto ride = GetRide(tileElement->asTrack()->GetRideIndex()); + auto ride = GetRide(tileElement->asTrack()->getRideIndex()); if (ride == nullptr) return bankStart; - bool isInverted = useInvertedSprites ^ tileElement->asTrack()->IsInverted(); + bool isInverted = useInvertedSprites ^ tileElement->asTrack()->isInverted(); return TrackGetActualBank2(ride->type, isInverted, bankStart); } @@ -433,12 +433,12 @@ std::optional GetTrackSegmentOrigin(const CoordsXYE& posEl) if (trackEl == nullptr) return {}; - const auto& ted = GetTrackElementDescriptor(trackEl->GetTrackType()); + const auto& ted = GetTrackElementDescriptor(trackEl->getTrackType()); auto direction = trackEl->getDirection(); auto coords = CoordsXYZ(posEl.x, posEl.y, trackEl->getBaseZ()); // Subtract the current sequence's offset - auto sequenceIndex = trackEl->GetSequenceIndex(); + auto sequenceIndex = trackEl->getSequenceIndex(); if (sequenceIndex >= ted.sequenceData.numSequences) return {}; diff --git a/src/openrct2/ride/TrackDesign.cpp b/src/openrct2/ride/TrackDesign.cpp index c292c6ead7..94b3efacaf 100644 --- a/src/openrct2/ride/TrackDesign.cpp +++ b/src/openrct2/ride/TrackDesign.cpp @@ -185,7 +185,7 @@ ResultWithMessage TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, con RideGetStartOfTrack(&trackElement); int32_t z = trackElement.element->getBaseZ(); - auto trackType = trackElement.element->asTrack()->GetTrackType(); + auto trackType = trackElement.element->asTrack()->getTrackType(); uint8_t direction = trackElement.element->getDirection(); _saveDirection = direction; auto newCoords = GetTrackElementOriginAndApplyChanges( @@ -199,7 +199,7 @@ ResultWithMessage TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, con trackElement.y = newCoords->y; z = newCoords->z; - const auto& ted = GetTrackElementDescriptor(trackElement.element->asTrack()->GetTrackType()); + const auto& ted = GetTrackElementDescriptor(trackElement.element->asTrack()->getTrackType()); const TrackCoordinates* trackCoordinates = &ted.coordinates; // Used in the following loop to know when we have // completed all of the elements and are back at the @@ -214,27 +214,27 @@ ResultWithMessage TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, con { const auto& element = trackElement.element->asTrack(); - if (element->GetTrackType() > TrackElemType::highestAlias) + if (element->getTrackType() > TrackElemType::highestAlias) { version = RCT12::TD46Version::td7; } TrackDesignTrackElement track{}; - track.type = element->GetTrackType(); - track.colourScheme = element->GetColourScheme(); - track.stationIndex = element->GetStationIndex(); - track.brakeBoosterSpeed = element->GetBrakeBoosterSpeed(); - track.seatRotation = element->GetSeatRotation(); + track.type = element->getTrackType(); + track.colourScheme = element->getColourScheme(); + track.stationIndex = element->getStationIndex(); + track.brakeBoosterSpeed = element->getBrakeBoosterSpeed(); + track.seatRotation = element->getSeatRotation(); - if (track.type == TrackElemType::blockBrakes && element->GetBrakeBoosterSpeed() != kRCT2DefaultBlockBrakeSpeed) + if (track.type == TrackElemType::blockBrakes && element->getBrakeBoosterSpeed() != kRCT2DefaultBlockBrakeSpeed) { version = RCT12::TD46Version::td7; } - if (element->HasChain()) + if (element->hasChain()) track.flags.set(TrackDesignTrackElementFlag::hasChain); - if (ride.getRideTypeDescriptor().flags.has(RtdFlag::hasInvertedVariant) && element->IsInverted()) + if (ride.getRideTypeDescriptor().flags.has(RtdFlag::hasInvertedVariant) && element->isInverted()) { track.flags.set(TrackDesignTrackElementFlag::isInverted); } @@ -248,7 +248,7 @@ ResultWithMessage TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, con z = trackElement.element->getBaseZ(); direction = trackElement.element->getDirection(); - trackType = trackElement.element->asTrack()->GetTrackType(); + trackType = trackElement.element->asTrack()->getTrackType(); newCoords = GetTrackElementOriginAndApplyChanges( { trackElement, z, direction }, trackType, 0, &trackElement.element, {}); @@ -370,12 +370,12 @@ ResultWithMessage TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, cons break; if (tileElement->getType() != TileElementType::track) continue; - if (tileElement->asTrack()->GetRideIndex() != ride.id) + if (tileElement->asTrack()->getRideIndex() != ride.id) continue; TrackDesignMazeElement maze{}; - maze.mazeEntry = tileElement->asTrack()->GetMazeEntry(); + maze.mazeEntry = tileElement->asTrack()->getMazeEntry(); maze.location.x = (x - startLoc.x) / kCoordsXYStep; maze.location.y = (y - startLoc.y) / kCoordsXYStep; _saveDirection = tileElement->getDirection(); @@ -474,7 +474,7 @@ CoordsXYE TrackDesign::MazeGetFirstElement(const Ride& ride) if (tile.element->getType() != TileElementType::track) continue; - if (tile.element->asTrack()->GetRideIndex() == ride.id) + if (tile.element->asTrack()->getRideIndex() == ride.id) { return tile; } @@ -1359,7 +1359,7 @@ static std::optional TrackDesignPlaceEntrances( continue; } - auto stationIndex = tile_element->asTrack()->GetStationIndex(); + auto stationIndex = tile_element->asTrack()->getStationIndex(); CommandFlags flags = { CommandFlag::apply }; if (tds.placeOperation == TrackPlaceOperation::placeTrackPreview) { diff --git a/src/openrct2/ride/TrackDesignSave.cpp b/src/openrct2/ride/TrackDesignSave.cpp index d93f11a995..0f51bd20b0 100644 --- a/src/openrct2/ride/TrackDesignSave.cpp +++ b/src/openrct2/ride/TrackDesignSave.cpp @@ -559,7 +559,7 @@ static bool TrackDesignSaveShouldSelectSceneryAround(RideId rideIndex, TileEleme return true; break; case TileElementType::track: - if (tileElement->asTrack()->GetRideIndex() == rideIndex) + if (tileElement->asTrack()->getRideIndex() == rideIndex) return true; break; case TileElementType::entrance: diff --git a/src/openrct2/ride/TrackIteration.cpp b/src/openrct2/ride/TrackIteration.cpp index 38261e6659..90e680c2a9 100644 --- a/src/openrct2/ride/TrackIteration.cpp +++ b/src/openrct2/ride/TrackIteration.cpp @@ -167,12 +167,12 @@ namespace OpenRCT2 return nullptr; } } - } while (!(trackBeginEnd.begin_element->asTrack()->IsBlockStart())); + } while (!(trackBeginEnd.begin_element->asTrack()->isBlockStart())); // Get the start of the track block instead of the end location = { trackBeginEnd.begin_x, trackBeginEnd.begin_y, trackBeginEnd.begin_z }; auto trackOrigin = OpenRCT2::MapGetTrackElementAtOfTypeSeq( - location, trackBeginEnd.begin_element->asTrack()->GetTrackType(), 0); + location, trackBeginEnd.begin_element->asTrack()->getTrackType(), 0); if (trackOrigin == nullptr) { return nullptr; @@ -214,16 +214,16 @@ namespace OpenRCT2 if (trackElement == nullptr) continue; - if (trackElement->GetRideIndex() != ride.id) + if (trackElement->getRideIndex() != ride.id) continue; - if (trackElement->GetSequenceIndex() != 0) + if (trackElement->getSequenceIndex() != 0) continue; if (tileElement->isGhost() != isGhost) continue; - const auto& ted = TrackMetadata::GetTrackElementDescriptor(trackElement->GetTrackType()); + const auto& ted = TrackMetadata::GetTrackElementDescriptor(trackElement->getTrackType()); if (ted.sequenceData.numSequences == 0) continue; @@ -267,13 +267,13 @@ namespace OpenRCT2 if (inputElement == nullptr) return false; - auto rideIndex = inputElement->GetRideIndex(); + auto rideIndex = inputElement->getRideIndex(); const auto* ride = GetRide(rideIndex); if (ride == nullptr) return false; - const auto& ted = TrackMetadata::GetTrackElementDescriptor(inputElement->GetTrackType()); - auto sequenceIndex = inputElement->GetSequenceIndex(); + const auto& ted = TrackMetadata::GetTrackElementDescriptor(inputElement->getTrackType()); + auto sequenceIndex = inputElement->getSequenceIndex(); if (sequenceIndex >= ted.sequenceData.numSequences) return false; @@ -337,14 +337,14 @@ namespace OpenRCT2 if (trackElement == nullptr) continue; - if (trackElement->GetRideIndex() != ride.id) + if (trackElement->getRideIndex() != ride.id) continue; - const auto& ted = TrackMetadata::GetTrackElementDescriptor(trackElement->GetTrackType()); + const auto& ted = TrackMetadata::GetTrackElementDescriptor(trackElement->getTrackType()); if (ted.sequenceData.numSequences == 0) continue; - auto sequenceIndex = trackElement->GetSequenceIndex(); + auto sequenceIndex = trackElement->getSequenceIndex(); if ((sequenceIndex + 1) != ted.sequenceData.numSequences) continue; @@ -409,14 +409,14 @@ namespace OpenRCT2 if (trackElement == nullptr) return false; - const auto& ted = TrackMetadata::GetTrackElementDescriptor(trackElement->GetTrackType()); + const auto& ted = TrackMetadata::GetTrackElementDescriptor(trackElement->getTrackType()); - auto rideIndex = trackElement->GetRideIndex(); + auto rideIndex = trackElement->getRideIndex(); const auto* ride = GetRide(rideIndex); if (ride == nullptr) return false; - auto sequenceIndex = trackElement->GetSequenceIndex(); + auto sequenceIndex = trackElement->getSequenceIndex(); if (sequenceIndex >= ted.sequenceData.numSequences) return false; diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index c4af135267..162eaf0d09 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -107,7 +107,7 @@ bool TrackPaintUtilHasFence( } auto entranceLoc = TileCoordsXY(position) + offset; - auto entranceId = trackElement.GetStationIndex(); + auto entranceId = trackElement.getStationIndex(); const auto& station = ride.getStation(entranceId); return (entranceLoc != station.Entrance && entranceLoc != station.Exit); @@ -215,7 +215,7 @@ static bool TrackPaintUtilDrawStationImpl( { CoordsXY position = session.MapPosition; const auto* stationObj = ride.getStationObject(); - const bool hasGreenLight = trackElement.HasGreenLight(); + const bool hasGreenLight = trackElement.hasGreenLight(); if (stationObj != nullptr && stationObj->Flags & StationObjectFlags::noPlatforms) return false; @@ -234,7 +234,7 @@ static bool TrackPaintUtilDrawStationImpl( // height += 5 (height + 5); hasFence = TrackPaintUtilHasFence(EDGE_NW, position, trackElement, ride, session.CurrentRotation); - if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 0) + if (trackElement.getTrackType() == TrackElemType::endStation && direction == 0) { if (hasGreenLight) { @@ -247,7 +247,7 @@ static bool TrackPaintUtilDrawStationImpl( hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_SW_NE : SPR_STATION_PLATFORM_END_RED_LIGHT_SW_NE); } } - else if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 2) + else if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 2) { imageId = session.SupportColours.WithIndex( (hasFence ? SPR_STATION_PLATFORM_BEGIN_FENCED_SW_NE : SPR_STATION_PLATFORM_BEGIN_SW_NE)); @@ -262,12 +262,12 @@ static bool TrackPaintUtilDrawStationImpl( TrackPaintUtilDrawStationCovers(session, EDGE_NW, hasFence, stationObj, coverHeight, stationColourScheme); // height += 5 (height + 5) - if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 0) + if (trackElement.getTrackType() == TrackElemType::endStation && direction == 0) { imageId = session.SupportColours.WithIndex( (hasGreenLight ? SPR_STATION_PLATFORM_END_GREEN_LIGHT_SW_NE : SPR_STATION_PLATFORM_END_RED_LIGHT_SW_NE)); } - else if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 2) + else if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 2) { imageId = session.SupportColours.WithIndex(SPR_STATION_PLATFORM_BEGIN_SW_NE); } @@ -281,11 +281,11 @@ static bool TrackPaintUtilDrawStationImpl( hasFence = TrackPaintUtilHasFence(EDGE_SE, position, trackElement, ride, session.CurrentRotation); if (hasFence) { - if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 0) + if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 0) { imageId = session.SupportColours.WithIndex(SPR_STATION_BEGIN_ANGLE_FENCE_SW_NE); } - else if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 2) + else if (trackElement.getTrackType() == TrackElemType::endStation && direction == 2) { imageId = session.SupportColours.WithIndex(SPR_STATION_LIGHT_BACK_ANGLE_FENCED_NE_SW); } @@ -295,13 +295,13 @@ static bool TrackPaintUtilDrawStationImpl( } PaintAddImageAsParent(session, imageId, { 0, 31, height + fenceOffsetB }, { 32, 1, 7 }); } - else if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 0) + else if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 0) { // Addition: draw only small fence if there is an entrance/exit at the beginning imageId = session.SupportColours.WithIndex(SPR_STATION_FENCE_SMALL_NW_SE); PaintAddImageAsParent(session, imageId, { 31, 23, height + fenceOffsetB }, { 1, 8, 7 }); } - else if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 2) + else if (trackElement.getTrackType() == TrackElemType::endStation && direction == 2) { // Addition: draw only small fence if there is an entrance/exit at the end imageId = session.SupportColours.WithIndex(SPR_STATION_LIGHT_BACK_NE_SW); @@ -311,12 +311,12 @@ static bool TrackPaintUtilDrawStationImpl( TrackPaintUtilDrawStationCovers(session, EDGE_SE, hasFence, stationObj, coverHeight, stationColourScheme); // height += 7 (height + 7) - if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 0) + if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 0) { imageId = session.SupportColours.WithIndex(SPR_STATION_FENCE_SMALL_NW_SE); PaintAddImageAsParent(session, imageId, { 31, 0, height + fenceOffsetB }, { 1, 8, 7 }); } - else if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 2) + else if (trackElement.getTrackType() == TrackElemType::endStation && direction == 2) { imageId = session.SupportColours.WithIndex(SPR_STATION_LIGHT_BACK_NE_SW); PaintAddImageAsParent(session, imageId, { 31, 0, height + fenceOffsetB }, { 1, 8, 7 }); @@ -331,7 +331,7 @@ static bool TrackPaintUtilDrawStationImpl( // height += 5 (height + 5); hasFence = TrackPaintUtilHasFence(EDGE_NE, position, trackElement, ride, session.CurrentRotation); - if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 3) + if (trackElement.getTrackType() == TrackElemType::endStation && direction == 3) { if (hasGreenLight) { @@ -344,7 +344,7 @@ static bool TrackPaintUtilDrawStationImpl( hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_NW_SE : SPR_STATION_PLATFORM_END_RED_LIGHT_NW_SE); } } - else if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 1) + else if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 1) { imageId = session.SupportColours.WithIndex( (hasFence ? SPR_STATION_PLATFORM_BEGIN_FENCED_NW_SE : SPR_STATION_PLATFORM_BEGIN_NW_SE)); @@ -359,12 +359,12 @@ static bool TrackPaintUtilDrawStationImpl( TrackPaintUtilDrawStationCovers(session, EDGE_NE, hasFence, stationObj, coverHeight, stationColourScheme); // height += 5 (height + 5) - if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 3) + if (trackElement.getTrackType() == TrackElemType::endStation && direction == 3) { imageId = session.SupportColours.WithIndex( (hasGreenLight ? SPR_STATION_PLATFORM_END_GREEN_LIGHT_NW_SE : SPR_STATION_PLATFORM_END_RED_LIGHT_NW_SE)); } - else if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 1) + else if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 1) { imageId = session.SupportColours.WithIndex(SPR_STATION_PLATFORM_BEGIN_NW_SE); } @@ -378,11 +378,11 @@ static bool TrackPaintUtilDrawStationImpl( hasFence = TrackPaintUtilHasFence(EDGE_SW, position, trackElement, ride, session.CurrentRotation); if (hasFence) { - if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 3) + if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 3) { imageId = session.SupportColours.WithIndex(SPR_STATION_BEGIN_ANGLE_FENCE_NW_SE); } - else if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 1) + else if (trackElement.getTrackType() == TrackElemType::endStation && direction == 1) { imageId = session.SupportColours.WithIndex(SPR_STATION_LIGHT_BACK_ANGLE_FENCED_NW_SE); } @@ -392,13 +392,13 @@ static bool TrackPaintUtilDrawStationImpl( } PaintAddImageAsParent(session, imageId, { 31, 0, height + fenceOffsetB }, { 1, 32, 7 }); } - else if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 3) + else if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 3) { // Addition: draw only small fence if there is an entrance/exit at the beginning imageId = session.SupportColours.WithIndex(SPR_STATION_FENCE_SMALL_SW_NE); PaintAddImageAsParent(session, imageId, { 23, 31, height + fenceOffsetB }, { 8, 1, 7 }); } - else if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 1) + else if (trackElement.getTrackType() == TrackElemType::endStation && direction == 1) { // Addition: draw only small fence if there is an entrance/exit at the end imageId = session.SupportColours.WithIndex(SPR_STATION_LIGHT_BACK_NW_SE); @@ -409,12 +409,12 @@ static bool TrackPaintUtilDrawStationImpl( TrackPaintUtilDrawStationCovers(session, EDGE_SW, hasFence, stationObj, coverHeight, stationColourScheme); // height += 7 (height + 7) - if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 3) + if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 3) { imageId = session.SupportColours.WithIndex(SPR_STATION_FENCE_SMALL_SW_NE); PaintAddImageAsParent(session, imageId, { 0, 31, height + fenceOffsetB }, { 8, 1, 7 }); } - else if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 1) + else if (trackElement.getTrackType() == TrackElemType::endStation && direction == 1) { imageId = session.SupportColours.WithIndex(SPR_STATION_LIGHT_BACK_NW_SE); PaintAddImageAsParent(session, imageId, { 0, 31, height + fenceOffsetB }, { 8, 1, 7 }); @@ -429,7 +429,7 @@ bool TrackPaintUtilDrawStationInverted( { CoordsXY position = session.MapPosition; const auto* stationObj = ride.getStationObject(); - const bool hasGreenLight = trackElement.HasGreenLight(); + const bool hasGreenLight = trackElement.hasGreenLight(); if (stationObj != nullptr && stationObj->Flags & StationObjectFlags::noPlatforms) return false; @@ -447,7 +447,7 @@ bool TrackPaintUtilDrawStationInverted( // height += 5 (height + 5); hasFence = TrackPaintUtilHasFence(EDGE_NW, position, trackElement, ride, session.CurrentRotation); - if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 0) + if (trackElement.getTrackType() == TrackElemType::endStation && direction == 0) { if (hasGreenLight) { @@ -460,7 +460,7 @@ bool TrackPaintUtilDrawStationInverted( hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_SW_NE : SPR_STATION_PLATFORM_END_RED_LIGHT_SW_NE); } } - else if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 2) + else if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 2) { imageId = session.SupportColours.WithIndex( (hasFence ? SPR_STATION_PLATFORM_BEGIN_FENCED_SW_NE : SPR_STATION_PLATFORM_BEGIN_SW_NE)); @@ -475,12 +475,12 @@ bool TrackPaintUtilDrawStationInverted( TrackPaintUtilDrawStationCovers2(session, EDGE_NW, hasFence, stationObj, height, stationVariant, colour); // height += 5 (height + 5) - if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 0) + if (trackElement.getTrackType() == TrackElemType::endStation && direction == 0) { imageId = session.SupportColours.WithIndex( (hasGreenLight ? SPR_STATION_PLATFORM_END_GREEN_LIGHT_SW_NE : SPR_STATION_PLATFORM_END_RED_LIGHT_SW_NE)); } - else if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 2) + else if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 2) { imageId = session.SupportColours.WithIndex(SPR_STATION_PLATFORM_BEGIN_SW_NE); } @@ -494,11 +494,11 @@ bool TrackPaintUtilDrawStationInverted( hasFence = TrackPaintUtilHasFence(EDGE_SE, position, trackElement, ride, session.CurrentRotation); if (hasFence) { - if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 0) + if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 0) { imageId = session.SupportColours.WithIndex(SPR_STATION_INVERTED_BEGIN_ANGLE_FENCE_SW_NE); } - else if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 2) + else if (trackElement.getTrackType() == TrackElemType::endStation && direction == 2) { imageId = session.SupportColours.WithIndex(SPR_STATION_INVERTED_LIGHT_BACK_ANGLE_FENCED_NE_SW); } @@ -508,13 +508,13 @@ bool TrackPaintUtilDrawStationInverted( } PaintAddImageAsParent(session, imageId, { 0, 31, height + 8 }, { 32, 1, 7 }); } - else if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 0) + else if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 0) { // Addition: draw only small fence if there is an entrance/exit at the beginning imageId = session.SupportColours.WithIndex(SPR_STATION_FENCE_SMALL_NW_SE); PaintAddImageAsParent(session, imageId, { 31, 23, height + 8 }, { 1, 8, 7 }); } - else if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 2) + else if (trackElement.getTrackType() == TrackElemType::endStation && direction == 2) { // Addition: draw only small fence if there is an entrance/exit at the end imageId = session.SupportColours.WithIndex(SPR_STATION_LIGHT_BACK_NE_SW); @@ -524,12 +524,12 @@ bool TrackPaintUtilDrawStationInverted( TrackPaintUtilDrawStationCovers2(session, EDGE_SE, hasFence, stationObj, height, stationVariant, colour); // height += 7 (height + 7) - if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 0) + if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 0) { imageId = session.SupportColours.WithIndex(SPR_STATION_FENCE_SMALL_NW_SE); PaintAddImageAsParent(session, imageId, { 31, 0, height + 8 }, { 1, 8, 7 }); } - else if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 2) + else if (trackElement.getTrackType() == TrackElemType::endStation && direction == 2) { imageId = session.SupportColours.WithIndex(SPR_STATION_LIGHT_BACK_NE_SW); PaintAddImageAsParent(session, imageId, { 31, 0, height + 8 }, { 1, 8, 7 }); @@ -544,7 +544,7 @@ bool TrackPaintUtilDrawStationInverted( // height += 5 (height + 5); hasFence = TrackPaintUtilHasFence(EDGE_NE, position, trackElement, ride, session.CurrentRotation); - if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 3) + if (trackElement.getTrackType() == TrackElemType::endStation && direction == 3) { if (hasGreenLight) { @@ -557,7 +557,7 @@ bool TrackPaintUtilDrawStationInverted( hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_NW_SE : SPR_STATION_PLATFORM_END_RED_LIGHT_NW_SE); } } - else if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 1) + else if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 1) { imageId = session.SupportColours.WithIndex( (hasFence ? SPR_STATION_PLATFORM_BEGIN_FENCED_NW_SE : SPR_STATION_PLATFORM_BEGIN_NW_SE)); @@ -572,12 +572,12 @@ bool TrackPaintUtilDrawStationInverted( TrackPaintUtilDrawStationCovers2(session, EDGE_NE, hasFence, stationObj, height, stationVariant, colour); // height += 5 (height + 5) - if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 3) + if (trackElement.getTrackType() == TrackElemType::endStation && direction == 3) { imageId = session.SupportColours.WithIndex( (hasGreenLight ? SPR_STATION_PLATFORM_END_GREEN_LIGHT_NW_SE : SPR_STATION_PLATFORM_END_RED_LIGHT_NW_SE)); } - else if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 1) + else if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 1) { imageId = session.SupportColours.WithIndex(SPR_STATION_PLATFORM_BEGIN_NW_SE); } @@ -591,11 +591,11 @@ bool TrackPaintUtilDrawStationInverted( hasFence = TrackPaintUtilHasFence(EDGE_SW, position, trackElement, ride, session.CurrentRotation); if (hasFence) { - if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 3) + if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 3) { imageId = session.SupportColours.WithIndex(SPR_STATION_INVERTED_BEGIN_ANGLE_FENCE_NW_SE); } - else if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 1) + else if (trackElement.getTrackType() == TrackElemType::endStation && direction == 1) { imageId = session.SupportColours.WithIndex(SPR_STATION_INVERTED_LIGHT_BACK_ANGLE_FENCED_NW_SE); } @@ -605,13 +605,13 @@ bool TrackPaintUtilDrawStationInverted( } PaintAddImageAsParent(session, imageId, { 31, 0, height + 8 }, { 1, 32, 7 }); } - else if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 3) + else if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 3) { // Addition: draw only small fence if there is an entrance/exit at the beginning imageId = session.SupportColours.WithIndex(SPR_STATION_FENCE_SMALL_SW_NE); PaintAddImageAsParent(session, imageId, { 23, 31, height + 8 }, { 8, 1, 7 }); } - else if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 1) + else if (trackElement.getTrackType() == TrackElemType::endStation && direction == 1) { // Addition: draw only small fence if there is an entrance/exit at the end imageId = session.SupportColours.WithIndex(SPR_STATION_LIGHT_BACK_NW_SE); @@ -622,12 +622,12 @@ bool TrackPaintUtilDrawStationInverted( TrackPaintUtilDrawStationCovers2(session, EDGE_SW, hasFence, stationObj, height, stationVariant, colour); // height += 7 (height + 7) - if (trackElement.GetTrackType() == TrackElemType::beginStation && direction == 3) + if (trackElement.getTrackType() == TrackElemType::beginStation && direction == 3) { imageId = session.SupportColours.WithIndex(SPR_STATION_FENCE_SMALL_SW_NE); PaintAddImageAsParent(session, imageId, { 0, 31, height + 8 }, { 8, 1, 7 }); } - else if (trackElement.GetTrackType() == TrackElemType::endStation && direction == 1) + else if (trackElement.getTrackType() == TrackElemType::endStation && direction == 1) { imageId = session.SupportColours.WithIndex(SPR_STATION_LIGHT_BACK_NW_SE); PaintAddImageAsParent(session, imageId, { 0, 31, height + 8 }, { 8, 1, 7 }); @@ -1807,7 +1807,7 @@ void TrackPaintUtilOnridePhotoSmallPaint( { SPR_ON_RIDE_PHOTO_SIGN_SMALL_SE_NW, SPR_ON_RIDE_PHOTO_CAMERA_SMALL_E, SPR_ON_RIDE_PHOTO_CAMERA_FLASH_SMALL_E }, }; - bool takingPhoto = trackElement.IsTakingPhoto(); + bool takingPhoto = trackElement.isTakingPhoto(); ImageId imageId = GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][0]); ImageId flashImageId = GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][takingPhoto ? 2 : 1]); switch (direction) @@ -1845,7 +1845,7 @@ void TrackPaintUtilOnridePhotoPaint( { SPR_ON_RIDE_PHOTO_SIGN_SE_NW, SPR_ON_RIDE_PHOTO_CAMERA_E, SPR_ON_RIDE_PHOTO_CAMERA_FLASH_E }, }; - bool takingPhoto = trackElement.IsTakingPhoto(); + bool takingPhoto = trackElement.isTakingPhoto(); ImageId imageId = GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][0]); ImageId flashImageId = GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][takingPhoto ? 2 : 1]); switch (direction) @@ -1930,7 +1930,7 @@ ImageId GetStationColourScheme(PaintSession& session, const TrackElement& trackE { return ConstructionMarker; } - if (trackElement.IsHighlighted() || session.SelectedElement == reinterpret_cast(&trackElement)) + if (trackElement.isHighlighted() || session.SelectedElement == reinterpret_cast(&trackElement)) { return HighlightMarker; } @@ -1943,7 +1943,7 @@ ImageId GetShopSupportColourScheme(PaintSession& session, const TrackElement& tr { return ConstructionMarker; } - if (trackElement.IsHighlighted() || session.SelectedElement == reinterpret_cast(&trackElement)) + if (trackElement.isHighlighted() || session.SelectedElement == reinterpret_cast(&trackElement)) { return HighlightMarker; } @@ -1956,7 +1956,7 @@ ImageId GetShopSupportColourScheme(PaintSession& session, const TrackElement& tr */ void PaintTrack(PaintSession& session, Direction direction, int32_t height, const TrackElement& trackElement) { - RideId rideIndex = trackElement.GetRideIndex(); + RideId rideIndex = trackElement.getRideIndex(); auto ride = GetRide(rideIndex); if (ride == nullptr) { @@ -1967,9 +1967,9 @@ void PaintTrack(PaintSession& session, Direction direction, int32_t height, cons if ((!gTrackDesignSaveMode || rideIndex == gTrackDesignSaveRideIndex) && !(session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) { - auto trackType = trackElement.GetTrackType(); - int32_t trackSequence = trackElement.GetSequenceIndex(); - int32_t trackColourScheme = trackElement.GetColourScheme(); + auto trackType = trackElement.getTrackType(); + int32_t trackSequence = trackElement.getSequenceIndex(); + int32_t trackColourScheme = trackElement.getColourScheme(); if (PaintShouldShowHeightMarkers(session, VIEWPORT_FLAG_TRACK_HEIGHTS)) { @@ -1999,7 +1999,7 @@ void PaintTrack(PaintSession& session, Direction direction, int32_t height, cons zOffset = 23; const auto* originElement = ride->getOriginElement(StationIndex::FromUnderlying(0)); - if (originElement != nullptr && originElement->GetTrackType() == TrackElemType::flatTrack1x1B) + if (originElement != nullptr && originElement->getTrackType() == TrackElemType::flatTrack1x1B) LightFx::AddKioskLights(session.MapPosition, height, zOffset); else if (kRideTypeDescriptors[ride->type].flags.has(RtdFlag::isShopOrFacility)) LightFx::AddShopLights(session.MapPosition, trackElement.getDirection(), height, zOffset); @@ -2010,7 +2010,7 @@ void PaintTrack(PaintSession& session, Direction direction, int32_t height, cons 0, ride->trackColours[trackColourScheme].main, ride->trackColours[trackColourScheme].additional); session.SupportColours = ImageId( 0, ride->trackColours[trackColourScheme].supports, ride->trackColours[trackColourScheme].additional); - if (trackElement.IsHighlighted() || session.SelectedElement == reinterpret_cast(&trackElement)) + if (trackElement.isHighlighted() || session.SelectedElement == reinterpret_cast(&trackElement)) { session.TrackColours = HighlightMarker; session.SupportColours = HighlightMarker; @@ -2022,8 +2022,8 @@ void PaintTrack(PaintSession& session, Direction direction, int32_t height, cons session.SupportColours = ConstructionMarker; } - const auto& rtd = GetRideTypeDescriptor(trackElement.GetRideType()); - bool isInverted = trackElement.IsInverted() && rtd.flags.has(RtdFlag::hasInvertedVariant); + const auto& rtd = GetRideTypeDescriptor(trackElement.getRideType()); + bool isInverted = trackElement.isInverted() && rtd.flags.has(RtdFlag::hasInvertedVariant); const auto trackDrawerEntry = getTrackDrawerEntry(rtd, isInverted, trackTypeIsCovered(trackType)); trackType = uncoverTrackType(trackType); diff --git a/src/openrct2/ride/Vehicle.Animation.cpp b/src/openrct2/ride/Vehicle.Animation.cpp index e3fd8c7819..9de1ea7841 100644 --- a/src/openrct2/ride/Vehicle.Animation.cpp +++ b/src/openrct2/ride/Vehicle.Animation.cpp @@ -879,7 +879,7 @@ namespace OpenRCT2 { auto trackType = GetTrackType(); TileElement* trackElement = MapGetTrackElementAtOfTypeSeq(TrackLocation, trackType, 0); - if (trackElement != nullptr && trackElement->asTrack()->HasChain()) + if (trackElement != nullptr && trackElement->asTrack()->hasChain()) { // start flapping, bird animation_frame = 1; diff --git a/src/openrct2/ride/Vehicle.BoatHire.cpp b/src/openrct2/ride/Vehicle.BoatHire.cpp index 4c018935af..ca5b54c263 100644 --- a/src/openrct2/ride/Vehicle.BoatHire.cpp +++ b/src/openrct2/ride/Vehicle.BoatHire.cpp @@ -85,7 +85,7 @@ void Vehicle::TryReconnectBoatToTrack(const CoordsXY& currentBoatLocation, const { auto trackElement = MapGetTrackElementAt(TrackLocation); if (trackElement != nullptr) - SetTrackType(trackElement->GetTrackType()); + SetTrackType(trackElement->getTrackType()); SetTrackDirection(curRide->boatHireReturnDirection); BoatLocation.SetNull(); diff --git a/src/openrct2/ride/Vehicle.MiniGolf.cpp b/src/openrct2/ride/Vehicle.MiniGolf.cpp index df6c3e6af3..00b6fb0bef 100644 --- a/src/openrct2/ride/Vehicle.MiniGolf.cpp +++ b/src/openrct2/ride/Vehicle.MiniGolf.cpp @@ -284,9 +284,9 @@ void OpenRCT2::RideUpdateMeasurementsSpecialElements_MiniGolf(Ride& ride, const } flags.unset(VehicleFlag::onLiftHill); - SetTrackType(tileElement->asTrack()->GetTrackType()); + SetTrackType(tileElement->asTrack()->getTrackType()); SetTrackDirection(direction); - brake_speed = tileElement->asTrack()->GetBrakeBoosterSpeed(); + brake_speed = tileElement->asTrack()->getBrakeBoosterSpeed(); track_progress = 0; } else @@ -470,9 +470,9 @@ void OpenRCT2::RideUpdateMeasurementsSpecialElements_MiniGolf(Ride& ride, const } } - SetTrackType(tileElement->asTrack()->GetTrackType()); + SetTrackType(tileElement->asTrack()->getTrackType()); SetTrackDirection(direction); - brake_speed = tileElement->asTrack()->GetBrakeBoosterSpeed(); + brake_speed = tileElement->asTrack()->getBrakeBoosterSpeed(); // There are two bytes before the move info list track_progress = GetTrackProgress(); diff --git a/src/openrct2/ride/Vehicle.SceneryDoors.cpp b/src/openrct2/ride/Vehicle.SceneryDoors.cpp index 7ca3fb3640..e481f6a85e 100644 --- a/src/openrct2/ride/Vehicle.SceneryDoors.cpp +++ b/src/openrct2/ride/Vehicle.SceneryDoors.cpp @@ -129,13 +129,13 @@ static void AnimateLandscapeDoor( const CoordsXYZ& doorLocation, TrackElement& trackElement, const bool isLastVehicle, const DoorSoundType doorSound, const CoordsXYZ& soundLocation) { - const auto doorState = isBackwards ? trackElement.GetDoorAState() : trackElement.GetDoorBState(); + const auto doorState = isBackwards ? trackElement.getDoorAState() : trackElement.getDoorBState(); if (!isLastVehicle && doorState == kLandEdgeDoorFrameClosed) { if (isBackwards) - trackElement.SetDoorAState(kLandEdgeDoorFrameOpening); + trackElement.setDoorAState(kLandEdgeDoorFrameOpening); else - trackElement.SetDoorBState(kLandEdgeDoorFrameOpening); + trackElement.setDoorBState(kLandEdgeDoorFrameOpening); MapAnimations::CreateTemporary(doorLocation, MapAnimations::TemporaryType::landEdgeDoor); Play3D(kDoorOpenSoundIds[EnumValue(doorSound)], soundLocation); @@ -144,9 +144,9 @@ static void AnimateLandscapeDoor( if (isLastVehicle) { if (isBackwards) - trackElement.SetDoorAState(kLandEdgeDoorFrameClosing); + trackElement.setDoorAState(kLandEdgeDoorFrameClosing); else - trackElement.SetDoorBState(kLandEdgeDoorFrameClosing); + trackElement.setDoorBState(kLandEdgeDoorFrameClosing); MapAnimations::CreateTemporary(doorLocation, MapAnimations::TemporaryType::landEdgeDoor); Play3D(kDoorCloseSoundIds[EnumValue(doorSound)], soundLocation); diff --git a/src/openrct2/ride/Vehicle.Station.cpp b/src/openrct2/ride/Vehicle.Station.cpp index ecfee6fbe5..7317cc7d78 100644 --- a/src/openrct2/ride/Vehicle.Station.cpp +++ b/src/openrct2/ride/Vehicle.Station.cpp @@ -64,7 +64,7 @@ static bool try_add_synchronised_station(const CoordsXYZ& coords) return false; } - auto rideIndex = tileElement->asTrack()->GetRideIndex(); + auto rideIndex = tileElement->asTrack()->getRideIndex(); auto ride = GetRide(rideIndex); if (ride == nullptr || !(ride->departFlags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS)) { @@ -76,7 +76,7 @@ static bool try_add_synchronised_station(const CoordsXYZ& coords) * to sync with adjacent stations, so it will return true. * Still to determine if a vehicle to sync can be identified. */ - auto stationIndex = tileElement->asTrack()->GetStationIndex(); + auto stationIndex = tileElement->asTrack()->getStationIndex(); SynchronisedVehicle* sv = _lastSynchronisedVehicle; sv->ride_id = rideIndex; @@ -776,7 +776,7 @@ void Vehicle::UpdateWaitingToDepart() uint8_t trackDirection = GetTrackDirection(); if (trackBlockGetNextFromZero(TrackLocation, *curRide, trackDirection, &track, &zUnused, &direction, false)) { - if (track.element->asTrack()->HasCableLift()) + if (track.element->asTrack()->hasCableLift()) { SetState(Status::waitingForCableLift, sub_state); } @@ -1679,7 +1679,7 @@ void Vehicle::UpdateArriving() return; } - current_station = trackElement->GetStationIndex(); + current_station = trackElement->getStationIndex(); NumLaps++; if (sub_state != 0) diff --git a/src/openrct2/ride/Vehicle.TrackMotion.cpp b/src/openrct2/ride/Vehicle.TrackMotion.cpp index 6f9b68fb23..7ee44fca1a 100644 --- a/src/openrct2/ride/Vehicle.TrackMotion.cpp +++ b/src/openrct2/ride/Vehicle.TrackMotion.cpp @@ -239,22 +239,22 @@ namespace OpenRCT2 int32_t direction; if (trackBlockGetNextFromZero( TrackLocation, *curRide, GetTrackDirection(), &track, &zUnused, &direction, false) - && track.element != nullptr && track.element->asTrack()->HasCableLift()) + && track.element != nullptr && track.element->asTrack()->hasCableLift()) { - applyCableLiftBlockBrake(curRide->isBlockSectioned() && trackElement->asTrack()->IsBrakeClosed()); + applyCableLiftBlockBrake(curRide->isBlockSectioned() && trackElement->asTrack()->isBrakeClosed()); break; } } [[fallthrough]]; case TrackElemType::diagBlockBrakes: - if (curRide->isBlockSectioned() && trackElement->asTrack()->IsBrakeClosed()) + if (curRide->isBlockSectioned() && trackElement->asTrack()->isBrakeClosed()) applyStopBlockBrake(); else applyNonstopBlockBrake(); break; case TrackElemType::endStation: - if (trackElement->asTrack()->IsBrakeClosed()) + if (trackElement->asTrack()->isBrakeClosed()) _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_AT_BLOCK_BRAKE; break; @@ -265,9 +265,9 @@ namespace OpenRCT2 case TrackElemType::diagUp60ToFlat: if (curRide->isBlockSectioned()) { - if (trackType == TrackElemType::cableLiftHill || trackElement->asTrack()->HasChain()) + if (trackType == TrackElemType::cableLiftHill || trackElement->asTrack()->hasChain()) { - if (trackElement->asTrack()->IsBrakeClosed()) + if (trackElement->asTrack()->isBrakeClosed()) { applyStopBlockBrake(); } @@ -316,7 +316,7 @@ namespace OpenRCT2 SetBrakeClosedMultiTile(*trackElement, location, false); MapInvalidateElement(location, reinterpret_cast(trackElement)); - auto trackType = trackElement->GetTrackType(); + auto trackType = trackElement->getTrackType(); if (trackType == TrackElemType::endStation) { Play3D(SoundId::blockBrakeClose, location); @@ -450,7 +450,7 @@ namespace OpenRCT2 if (_vehicleStationIndex.IsNull()) { - _vehicleStationIndex = tileElement->asTrack()->GetStationIndex(); + _vehicleStationIndex = tileElement->asTrack()->getStationIndex(); } if (trackType == TrackElemType::towerBase && this == gCurrentVehicle) @@ -519,7 +519,7 @@ namespace OpenRCT2 auto trackElement = MapGetTrackElementAtOfTypeSeq(TrackLocation, GetTrackType(), 0); if (trackElement != nullptr) { - if (trackElement->asTrack()->IsBrakeClosed()) + if (trackElement->asTrack()->isBrakeClosed()) return brake_speed; else return std::max(brake_speed, BlockBrakeSpeed); @@ -532,9 +532,9 @@ namespace OpenRCT2 */ void Vehicle::populateBrakeSpeed(const CoordsXYZ& vehicleTrackLocation, TrackElement& brake) { - auto trackSpeed = brake.GetBrakeBoosterSpeed(); + auto trackSpeed = brake.getBrakeBoosterSpeed(); brake_speed = trackSpeed; - if (!trackTypeIsBrakes(brake.GetTrackType())) + if (!trackTypeIsBrakes(brake.getTrackType())) { BlockBrakeSpeed = trackSpeed; return; @@ -546,12 +546,12 @@ namespace OpenRCT2 uint16_t timeoutCount = 256; do { - if (trackTypeIsBlockBrakes(output.element->asTrack()->GetTrackType())) + if (trackTypeIsBlockBrakes(output.element->asTrack()->getTrackType())) { - BlockBrakeSpeed = output.element->asTrack()->GetBrakeBoosterSpeed(); + BlockBrakeSpeed = output.element->asTrack()->getBrakeBoosterSpeed(); return; } - if (!trackTypeIsBrakes(output.element->asTrack()->GetTrackType())) + if (!trackTypeIsBrakes(output.element->asTrack()->getTrackType())) { break; } @@ -583,7 +583,7 @@ namespace OpenRCT2 _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_11; } - if (tileElement->asTrack()->IsBlockStart()) + if (tileElement->asTrack()->isBlockStart()) { if (next_vehicle_on_train.IsNull()) { @@ -653,8 +653,8 @@ namespace OpenRCT2 tileElement = xyElement.element; location = { xyElement, curZ, static_cast(direction) }; } - if (tileElement->asTrack()->GetTrackType() == TrackElemType::leftReverser - || tileElement->asTrack()->GetTrackType() == TrackElemType::rightReverser) + if (tileElement->asTrack()->getTrackType() == TrackElemType::leftReverser + || tileElement->asTrack()->getTrackType() == TrackElemType::rightReverser) { if (IsHead() && velocity <= 3.0_mph) { @@ -671,10 +671,10 @@ namespace OpenRCT2 const auto previousCarIsInverted = flags.has(VehicleFlag::carIsInverted); flags.unset(VehicleFlag::carIsInverted); { - auto rideType = OpenRCT2::GetRide(tileElement->asTrack()->GetRideIndex())->type; + auto rideType = OpenRCT2::GetRide(tileElement->asTrack()->getRideIndex())->type; if (GetRideTypeDescriptor(rideType).flags.has(RtdFlag::hasInvertedVariant)) { - if (tileElement->asTrack()->IsInverted()) + if (tileElement->asTrack()->isInverted()) { flags.set(VehicleFlag::carIsInverted); } @@ -697,14 +697,14 @@ namespace OpenRCT2 } if (carEntry->flags.has(CarEntryFlag::isGoKart) && TrackSubposition < VehicleTrackSubposition::goKartsMovingToRightLane) { - trackType = tileElement->asTrack()->GetTrackType(); + trackType = tileElement->asTrack()->getTrackType(); if (trackType == TrackElemType::flat || trackType == TrackElemType::leftQuarterTurn3Tiles || trackType == TrackElemType::rightQuarterTurn3Tiles || trackType == TrackElemType::leftQuarterTurn5Tiles || trackType == TrackElemType::rightQuarterTurn5Tiles || trackType == TrackElemType::leftEighthToDiag || trackType == TrackElemType::rightEighthToDiag || trackType == TrackElemType::leftEighthToOrthogonal || trackType == TrackElemType::rightEighthToOrthogonal || trackType == TrackElemType::diagFlat || trackType == TrackElemType::sBendLeft || trackType == TrackElemType::sBendRight - || (curRide.flags.has(RideFlag::passStationNoStopping) && tileElement->asTrack()->IsStation())) + || (curRide.flags.has(RideFlag::passStationNoStopping) && tileElement->asTrack()->isStation())) { goKartAttemptLaneSwitch(); } @@ -728,15 +728,15 @@ namespace OpenRCT2 // Loc6DB500 // Update VehicleFlags::OnLiftHill flags.unset(VehicleFlag::onLiftHill); - if (tileElement->asTrack()->HasChain()) + if (tileElement->asTrack()->hasChain()) { flags.set(VehicleFlag::onLiftHill); } - trackType = tileElement->asTrack()->GetTrackType(); + trackType = tileElement->asTrack()->getTrackType(); if (trackType != TrackElemType::brakes) { - target_seat_rotation = tileElement->asTrack()->GetSeatRotation(); + target_seat_rotation = tileElement->asTrack()->getSeatRotation(); } SetTrackDirection(location.direction); SetTrackType(trackType); @@ -747,7 +747,7 @@ namespace OpenRCT2 } if (trackType == TrackElemType::onRidePhoto) { - tileElement->asTrack()->SetPhotoTimeout(); + tileElement->asTrack()->setPhotoTimeout(); MapAnimations::CreateTemporary(TrackLocation, MapAnimations::TemporaryType::onRidePhoto); } if (trackType == TrackElemType::rotationControlToggle) @@ -985,7 +985,7 @@ namespace OpenRCT2 static PitchAndRoll getPitchAndRollEnd( const Ride& curRide, bool useInvertedSprites, TrackElemType trackType, TileElement* tileElement) { - bool isInverted = useInvertedSprites ^ tileElement->asTrack()->IsInverted(); + bool isInverted = useInvertedSprites ^ tileElement->asTrack()->isInverted(); const auto& ted = GetTrackElementDescriptor(trackType); return { ted.definition.pitchEnd, TrackGetActualBank2(curRide.type, isInverted, ted.definition.rollEnd) }; } @@ -1037,7 +1037,7 @@ namespace OpenRCT2 } tileElement = trackBeginEnd.begin_element; - trackType = tileElement->asTrack()->GetTrackType(); + trackType = tileElement->asTrack()->getTrackType(); if (trackType == TrackElemType::leftReverser || trackType == TrackElemType::rightReverser) { return false; @@ -1053,7 +1053,7 @@ namespace OpenRCT2 flags.unset(VehicleFlag::carIsInverted); if (GetRideTypeDescriptor(curRide.type).flags.has(RtdFlag::hasInvertedVariant)) { - if (tileElement->asTrack()->IsInverted()) + if (tileElement->asTrack()->isInverted()) { flags.set(VehicleFlag::carIsInverted); } @@ -1102,13 +1102,13 @@ namespace OpenRCT2 } } - if (tileElement->asTrack()->HasChain()) + if (tileElement->asTrack()->hasChain()) { if (_vehicleVelocity < 0) { if (next_vehicle_on_train.IsNull()) { - trackType = tileElement->asTrack()->GetTrackType(); + trackType = tileElement->asTrack()->getTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); if (!ted.flags.has(TrackElementFlag::down)) { @@ -1133,10 +1133,10 @@ namespace OpenRCT2 } } - trackType = tileElement->asTrack()->GetTrackType(); + trackType = tileElement->asTrack()->getTrackType(); if (trackType != TrackElemType::brakes) { - target_seat_rotation = tileElement->asTrack()->GetSeatRotation(); + target_seat_rotation = tileElement->asTrack()->getSeatRotation(); } direction &= 3; SetTrackType(trackType); diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index 5f5b8870d5..02ccc606a7 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -64,7 +64,7 @@ namespace OpenRCT2 PitchAndRoll PitchAndRollStart(bool useInvertedSprites, TileElement* tileElement) { - auto trackType = tileElement->asTrack()->GetTrackType(); + auto trackType = tileElement->asTrack()->getTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); return PitchAndRoll{ ted.definition.pitchStart, TrackGetActualBank3(useInvertedSprites, tileElement) }; } @@ -1026,10 +1026,10 @@ namespace OpenRCT2 continue; const auto* trackElement = tileElement->asTrack(); - if (trackElement->GetRideIndex() != ride) + if (trackElement->getRideIndex() != ride) continue; - if (trackElement->GetTrackType() != TrackElemType::towerSection) + if (trackElement->getTrackType() != TrackElemType::towerSection) continue; return false; @@ -1403,7 +1403,7 @@ namespace OpenRCT2 // Ensure trains near a station don't block possible crossings after the stop, // except when they are departing - if (xyElement.element->asTrack()->IsStation() && status != Status::departing) + if (xyElement.element->asTrack()->isStation() && status != Status::departing) { break; } diff --git a/src/openrct2/scenario/Scenario.cpp b/src/openrct2/scenario/Scenario.cpp index 19566264ea..009e21b674 100644 --- a/src/openrct2/scenario/Scenario.cpp +++ b/src/openrct2/scenario/Scenario.cpp @@ -548,7 +548,7 @@ static ResultWithMessage ScenarioPrepareRidesForSave(GameState_t& gameState) if (isFiveCoasterObjective) { - auto ride = GetRide(it.element->asTrack()->GetRideIndex()); + auto ride = GetRide(it.element->asTrack()->getRideIndex()); // In the previous step, this flag was set on the first five roller coasters. if (ride != nullptr && ride->flags.has(RideFlag::indestructibleTrack)) @@ -557,7 +557,7 @@ static ResultWithMessage ScenarioPrepareRidesForSave(GameState_t& gameState) } } - it.element->asTrack()->SetIsIndestructible(markTrackAsIndestructible); + it.element->asTrack()->setIsIndestructible(markTrackAsIndestructible); } } while (TileElementIteratorNext(&it)); diff --git a/src/openrct2/scripting/bindings/entity/ScVehicle.cpp b/src/openrct2/scripting/bindings/entity/ScVehicle.cpp index 96fb76d9fc..3f4e6c84fb 100644 --- a/src/openrct2/scripting/bindings/entity/ScVehicle.cpp +++ b/src/openrct2/scripting/bindings/entity/ScVehicle.cpp @@ -609,7 +609,7 @@ namespace OpenRCT2::Scripting if (!origin) return JS_UNDEFINED; - const auto& trackType = el->asTrack()->GetTrackType(); + const auto& trackType = el->asTrack()->getTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); const auto& seq0 = ted.sequenceData.sequences[0].clearance; const auto trackLoc = CoordsXYZ(origin->x + seq0.x, origin->y + seq0.y, origin->z + seq0.z); diff --git a/src/openrct2/scripting/bindings/ride/ScTrackIterator.cpp b/src/openrct2/scripting/bindings/ride/ScTrackIterator.cpp index b4930cd94a..e5e80cf8e3 100644 --- a/src/openrct2/scripting/bindings/ride/ScTrackIterator.cpp +++ b/src/openrct2/scripting/bindings/ride/ScTrackIterator.cpp @@ -32,7 +32,7 @@ JSValue ScTrackIterator::FromElement(JSContext* ctx, const CoordsXY& position, i return JS_NULL; auto trackEl = el->asTrack(); - return gScTrackIterator.New(ctx, *origin, trackEl->GetTrackType()); + return gScTrackIterator.New(ctx, *origin, trackEl->getTrackType()); } void ScTrackIterator::Register(JSContext* ctx) @@ -142,7 +142,7 @@ JSValue ScTrackIterator::previous(JSContext* ctx, JSValue thisVal, int argc, JSV if (origin) { data->_position = *origin; - data->_type = prev.element->asTrack()->GetTrackType(); + data->_type = prev.element->asTrack()->getTrackType(); return JS_NewBool(ctx, true); } } @@ -171,7 +171,7 @@ JSValue ScTrackIterator::next(JSContext* ctx, JSValue thisVal, int argc, JSValue if (origin) { data->_position = *origin; - data->_type = next.element->asTrack()->GetTrackType(); + data->_type = next.element->asTrack()->getTrackType(); return JS_NewBool(ctx, true); } } diff --git a/src/openrct2/scripting/bindings/world/ScTileElement.cpp b/src/openrct2/scripting/bindings/world/ScTileElement.cpp index e8c92dff79..5c4900efb1 100644 --- a/src/openrct2/scripting/bindings/world/ScTileElement.cpp +++ b/src/openrct2/scripting/bindings/world/ScTileElement.cpp @@ -460,7 +460,7 @@ namespace OpenRCT2::Scripting auto* el = data->element->asTrack(); if (el != nullptr) { - return JS_NewUint32(ctx, EnumValue(el->GetTrackType())); + return JS_NewUint32(ctx, EnumValue(el->getTrackType())); } else { @@ -482,7 +482,7 @@ namespace OpenRCT2::Scripting return JS_UNDEFINED; } - el->SetTrackType(static_cast(value)); + el->setTrackType(static_cast(value)); Invalidate(data); return JS_UNDEFINED; } @@ -493,7 +493,7 @@ namespace OpenRCT2::Scripting auto* el = data->element->asTrack(); if (el != nullptr) { - return JS_NewUint32(ctx, el->GetRideType()); + return JS_NewUint32(ctx, el->getRideType()); } else { @@ -523,7 +523,7 @@ namespace OpenRCT2::Scripting return JS_UNDEFINED; } - el->SetRideType(value); + el->setRideType(value); Invalidate(data); return JS_UNDEFINED; } @@ -542,7 +542,7 @@ namespace OpenRCT2::Scripting case TileElementType::track: { auto* el = element->asTrack(); - auto* ride = GetRide(el->GetRideIndex()); + auto* ride = GetRide(el->getRideIndex()); if (ride != nullptr) { @@ -555,7 +555,7 @@ namespace OpenRCT2::Scripting } } - return JS_NewUint32(ctx, el->GetSequenceIndex()); + return JS_NewUint32(ctx, el->getSequenceIndex()); } case TileElementType::entrance: { @@ -593,7 +593,7 @@ namespace OpenRCT2::Scripting case TileElementType::track: { auto* el = element->asTrack(); - auto ride = GetRide(el->GetRideIndex()); + auto ride = GetRide(el->getRideIndex()); if (ride != nullptr) { @@ -606,7 +606,7 @@ namespace OpenRCT2::Scripting } } - el->SetSequenceIndex(value); + el->setSequenceIndex(value); Invalidate(data); break; } @@ -653,7 +653,7 @@ namespace OpenRCT2::Scripting case TileElementType::track: { auto* el = element->asTrack(); - return JS_NewUint32(ctx, el->GetRideIndex().ToUnderlying()); + return JS_NewUint32(ctx, el->getRideIndex().ToUnderlying()); } case TileElementType::entrance: { @@ -716,7 +716,7 @@ namespace OpenRCT2::Scripting JS_UNPACK_UINT32(value, ctx, jsValue); auto* el = element->asTrack(); - el->SetRideIndex(RideId::FromUnderlying(value)); + el->setRideIndex(RideId::FromUnderlying(value)); Invalidate(data); break; } @@ -777,14 +777,14 @@ namespace OpenRCT2::Scripting case TileElementType::track: { auto* el = element->asTrack(); - if (!el->IsStation()) + if (!el->isStation()) { auto& scriptEngine = GetContext()->GetScriptEngine(); scriptEngine.LogPluginInfo("Cannot read 'station' property, track is not a station."); return JS_NULL; } - return JS_NewUint32(ctx, el->GetStationIndex().ToUnderlying()); + return JS_NewUint32(ctx, el->getStationIndex().ToUnderlying()); } case TileElementType::entrance: { @@ -840,7 +840,7 @@ namespace OpenRCT2::Scripting JS_UNPACK_UINT32(value, ctx, jsValue); auto* el = element->asTrack(); - el->SetStationIndex(StationIndex::FromUnderlying(value)); + el->setStationIndex(StationIndex::FromUnderlying(value)); Invalidate(data); break; } @@ -871,7 +871,7 @@ namespace OpenRCT2::Scripting auto* el = data->element->asTrack(); if (el != nullptr) { - return JS_NewBool(ctx, el->HasChain()); + return JS_NewBool(ctx, el->hasChain()); } else { @@ -893,7 +893,7 @@ namespace OpenRCT2::Scripting return JS_UNDEFINED; } - el->SetHasChain(value); + el->setHasChain(value); Invalidate(data); return JS_UNDEFINED; } @@ -909,7 +909,7 @@ namespace OpenRCT2::Scripting return JS_NULL; } - Ride* ride = GetRide(el->GetRideIndex()); + Ride* ride = GetRide(el->getRideIndex()); if (ride == nullptr) { auto& scriptEngine = GetContext()->GetScriptEngine(); @@ -925,7 +925,7 @@ namespace OpenRCT2::Scripting return JS_NULL; } - return JS_NewUint32(ctx, el->GetMazeEntry()); + return JS_NewUint32(ctx, el->getMazeEntry()); } JSValue ScTileElement::mazeEntry_set(JSContext* ctx, JSValue thisValue, JSValue jsValue) { @@ -947,7 +947,7 @@ namespace OpenRCT2::Scripting return JS_UNDEFINED; } - auto* ride = GetRide(el->GetRideIndex()); + auto* ride = GetRide(el->getRideIndex()); if (ride == nullptr) { auto& scriptEngine = GetContext()->GetScriptEngine(); @@ -964,7 +964,7 @@ namespace OpenRCT2::Scripting } JS_UNPACK_UINT32(value, ctx, jsValue); - el->SetMazeEntry(value); + el->setMazeEntry(value); Invalidate(data); return JS_UNDEFINED; } @@ -980,7 +980,7 @@ namespace OpenRCT2::Scripting return JS_NULL; } - auto* ride = GetRide(el->GetRideIndex()); + auto* ride = GetRide(el->getRideIndex()); if (ride == nullptr) { auto& scriptEngine = GetContext()->GetScriptEngine(); @@ -996,7 +996,7 @@ namespace OpenRCT2::Scripting return JS_NULL; } - return JS_NewUint32(ctx, el->GetColourScheme()); + return JS_NewUint32(ctx, el->getColourScheme()); } JSValue ScTileElement::colourScheme_set(JSContext* ctx, JSValue thisValue, JSValue jsValue) { @@ -1018,7 +1018,7 @@ namespace OpenRCT2::Scripting return JS_UNDEFINED; } - auto* ride = GetRide(el->GetRideIndex()); + auto* ride = GetRide(el->getRideIndex()); if (ride == nullptr) { auto& scriptEngine = GetContext()->GetScriptEngine(); @@ -1035,7 +1035,7 @@ namespace OpenRCT2::Scripting } JS_UNPACK_UINT32(value, ctx, jsValue); - el->SetColourScheme(static_cast(value)); + el->setColourScheme(static_cast(value)); Invalidate(data); return JS_UNDEFINED; } @@ -1051,7 +1051,7 @@ namespace OpenRCT2::Scripting return JS_NULL; } - auto* ride = GetRide(el->GetRideIndex()); + auto* ride = GetRide(el->getRideIndex()); if (ride == nullptr) { auto& scriptEngine = GetContext()->GetScriptEngine(); @@ -1067,7 +1067,7 @@ namespace OpenRCT2::Scripting return JS_NULL; } - return JS_NewUint32(ctx, el->GetSeatRotation()); + return JS_NewUint32(ctx, el->getSeatRotation()); } JSValue ScTileElement::seatRotation_set(JSContext* ctx, JSValue thisValue, JSValue jsValue) { @@ -1089,7 +1089,7 @@ namespace OpenRCT2::Scripting return JS_UNDEFINED; } - auto* ride = GetRide(el->GetRideIndex()); + auto* ride = GetRide(el->getRideIndex()); if (ride == nullptr) { auto& scriptEngine = GetContext()->GetScriptEngine(); @@ -1106,7 +1106,7 @@ namespace OpenRCT2::Scripting } JS_UNPACK_UINT32(value, ctx, jsValue); - el->SetSeatRotation(value); + el->setSeatRotation(value); Invalidate(data); return JS_UNDEFINED; } @@ -1122,14 +1122,14 @@ namespace OpenRCT2::Scripting return JS_NULL; } - if (!trackTypeHasSpeedSetting(el->GetTrackType())) + if (!trackTypeHasSpeedSetting(el->getTrackType())) { auto& scriptEngine = GetContext()->GetScriptEngine(); scriptEngine.LogPluginInfo("Cannot read 'brakeBoosterSpeed' property, track element has no speed setting."); return JS_NULL; } - return JS_NewUint32(ctx, el->GetBrakeBoosterSpeed()); + return JS_NewUint32(ctx, el->getBrakeBoosterSpeed()); } JSValue ScTileElement::brakeBoosterSpeed_set(JSContext* ctx, JSValue thisValue, JSValue jsValue) { @@ -1151,7 +1151,7 @@ namespace OpenRCT2::Scripting return JS_UNDEFINED; } - if (!trackTypeHasSpeedSetting(el->GetTrackType())) + if (!trackTypeHasSpeedSetting(el->getTrackType())) { auto& scriptEngine = GetContext()->GetScriptEngine(); scriptEngine.LogPluginInfo("Cannot set 'brakeBoosterSpeed' property, track element has no speed setting."); @@ -1159,7 +1159,7 @@ namespace OpenRCT2::Scripting } JS_UNPACK_UINT32(value, ctx, jsValue); - el->SetBrakeBoosterSpeed(value); + el->setBrakeBoosterSpeed(value); Invalidate(data); return JS_UNDEFINED; } @@ -1170,7 +1170,7 @@ namespace OpenRCT2::Scripting auto* el = data->element->asTrack(); if (el != nullptr) { - return JS_NewBool(ctx, el->IsInverted()); + return JS_NewBool(ctx, el->isInverted()); } else { @@ -1192,7 +1192,7 @@ namespace OpenRCT2::Scripting return JS_UNDEFINED; } - el->SetInverted(value); + el->setInverted(value); Invalidate(data); return JS_UNDEFINED; } @@ -1203,7 +1203,7 @@ namespace OpenRCT2::Scripting auto* el = data->element->asTrack(); if (el != nullptr) { - return JS_NewBool(ctx, el->HasCableLift()); + return JS_NewBool(ctx, el->hasCableLift()); } else { @@ -1225,7 +1225,7 @@ namespace OpenRCT2::Scripting return JS_UNDEFINED; } - el->SetHasCableLift(value); + el->setHasCableLift(value); Invalidate(data); return JS_UNDEFINED; } @@ -1235,7 +1235,7 @@ namespace OpenRCT2::Scripting auto data = gScTileElement.GetOpaque(thisValue); auto el = data->element->asTrack(); if (el != nullptr) - return JS_NewBool(ctx, el->IsHighlighted()); + return JS_NewBool(ctx, el->isHighlighted()); else return JS_NULL; } @@ -1247,7 +1247,7 @@ namespace OpenRCT2::Scripting auto el = data->element->asTrack(); if (el != nullptr) { - el->SetHighlight(value); + el->setHighlight(value); Invalidate(data); } return JS_UNDEFINED; diff --git a/src/openrct2/world/Banner.cpp b/src/openrct2/world/Banner.cpp index 9e309f48eb..42c08e1dff 100644 --- a/src/openrct2/world/Banner.cpp +++ b/src/openrct2/world/Banner.cpp @@ -95,7 +95,7 @@ static RideId BannerGetRideIndexAt(const CoordsXYZ& bannerCoords) RideId resultRideIndex = RideId::GetNull(); for (auto* trackElement : TileElementsView(bannerCoords)) { - RideId rideIndex = trackElement->GetRideIndex(); + RideId rideIndex = trackElement->getRideIndex(); auto ride = GetRide(rideIndex); if (ride == nullptr || ride->getRideTypeDescriptor().flags.has(RtdFlag::isShopOrFacility)) continue; diff --git a/src/openrct2/world/ConstructionClearance.cpp b/src/openrct2/world/ConstructionClearance.cpp index 6948b13c96..4b8d3067a8 100644 --- a/src/openrct2/world/ConstructionClearance.cpp +++ b/src/openrct2/world/ConstructionClearance.cpp @@ -92,9 +92,9 @@ static bool landSlopeFitsUnderTrack(int32_t baseZ, uint8_t slope, const TrackEle { const auto [slopeNorthZ, slopeEastZ, slopeSouthZ, slopeWestZ] = GetSlopeCornerHeights(baseZ, slope); - const TrackElemType trackElemType = trackElement.GetTrackType(); + const TrackElemType trackElemType = trackElement.getTrackType(); const auto& ted = TrackMetadata::GetTrackElementDescriptor(trackElemType); - const uint8_t sequenceIndex = trackElemType == TrackElemType::maze ? 0 : trackElement.GetSequenceIndex(); + const uint8_t sequenceIndex = trackElemType == TrackElemType::maze ? 0 : trackElement.getSequenceIndex(); const auto& trackClearances = ted.sequenceData.sequences[sequenceIndex].clearance; const auto trackQuarters = trackClearances.quarterTile.Rotate(trackElement.getDirection()); const auto trackQuarterHeights = trackQuarters.GetQuarterHeights(trackElement.getBaseZ()); @@ -156,9 +156,9 @@ static bool MapLoc68BABCShouldContinue( else if ( crossingMode == CreateCrossingMode::pathOverTrack && canBuildCrossing && tileElement->getType() == TileElementType::track && tileElement->getBaseZ() == pos.baseZ - && tileElement->asTrack()->GetTrackType() == TrackElemType::flat) + && tileElement->asTrack()->getTrackType() == TrackElemType::flat) { - auto ride = GetRide(tileElement->asTrack()->GetRideIndex()); + auto ride = GetRide(tileElement->asTrack()->getRideIndex()); if (ride != nullptr && ride->getRideTypeDescriptor().flags.has(RtdFlag::supportsLevelCrossings)) { return true; @@ -215,7 +215,7 @@ GameActions::Result MapCanConstructWithClearAt( { // Skip track elements belonging to the ride that's being ignored for rides that intersect themselves. if (!ignoreRideId.IsNull() && tileElement->getType() == TileElementType::track - && tileElement->asTrack()->GetRideIndex() == ignoreRideId) + && tileElement->asTrack()->getRideIndex() == ignoreRideId) { continue; } @@ -344,7 +344,7 @@ void MapGetObstructionErrorText(TileElement* tileElement, GameActions::Result& r res.errorMessage = STR_FOOTPATH_IN_THE_WAY; break; case TileElementType::track: - ride = GetRide(tileElement->asTrack()->GetRideIndex()); + ride = GetRide(tileElement->asTrack()->getRideIndex()); if (ride != nullptr) { res.errorMessage = STR_X_IN_THE_WAY; diff --git a/src/openrct2/world/Entrance.cpp b/src/openrct2/world/Entrance.cpp index 8e47c9f42e..63a9d54012 100644 --- a/src/openrct2/world/Entrance.cpp +++ b/src/openrct2/world/Entrance.cpp @@ -135,19 +135,19 @@ void MazeEntranceHedgeReplacement(const CoordsXYE& entrance) { if (tileElement->getType() != TileElementType::track) continue; - if (tileElement->asTrack()->GetRideIndex() != rideIndex) + if (tileElement->asTrack()->getRideIndex() != rideIndex) continue; if (tileElement->getBaseZ() != z) continue; - if (tileElement->asTrack()->GetTrackType() != TrackElemType::maze) + if (tileElement->asTrack()->getTrackType() != TrackElemType::maze) continue; // Each maze element is split into 4 sections with 4 different walls uint8_t mazeSection = direction * 4; // Add the top outer wall - tileElement->asTrack()->MazeEntryAdd(1 << ((mazeSection + 9) & 0x0F)); + tileElement->asTrack()->mazeEntryAdd(1 << ((mazeSection + 9) & 0x0F)); // Add the bottom outer wall - tileElement->asTrack()->MazeEntryAdd(1 << ((mazeSection + 12) & 0x0F)); + tileElement->asTrack()->mazeEntryAdd(1 << ((mazeSection + 12) & 0x0F)); MapInvalidateTile({ hedgePos, tileElement->getBaseZ(), tileElement->getClearanceZ() }); return; @@ -172,25 +172,25 @@ void MazeEntranceHedgeRemoval(const CoordsXYE& entrance) { if (tileElement->getType() != TileElementType::track) continue; - if (tileElement->asTrack()->GetRideIndex() != rideIndex) + if (tileElement->asTrack()->getRideIndex() != rideIndex) continue; if (tileElement->getBaseZ() != z) continue; - if (tileElement->asTrack()->GetTrackType() != TrackElemType::maze) + if (tileElement->asTrack()->getTrackType() != TrackElemType::maze) continue; // Each maze element is split into 4 sections with 4 different walls uint8_t mazeSection = direction * 4; // Remove the top outer wall - tileElement->asTrack()->MazeEntrySubtract(1 << ((mazeSection + 9) & 0x0F)); + tileElement->asTrack()->mazeEntrySubtract(1 << ((mazeSection + 9) & 0x0F)); // Remove the bottom outer wall - tileElement->asTrack()->MazeEntrySubtract(1 << ((mazeSection + 12) & 0x0F)); + tileElement->asTrack()->mazeEntrySubtract(1 << ((mazeSection + 12) & 0x0F)); // Remove the intersecting wall - tileElement->asTrack()->MazeEntrySubtract(1 << ((mazeSection + 10) & 0x0F)); + tileElement->asTrack()->mazeEntrySubtract(1 << ((mazeSection + 10) & 0x0F)); // Remove the top hedge section - tileElement->asTrack()->MazeEntrySubtract(1 << ((mazeSection + 11) & 0x0F)); + tileElement->asTrack()->mazeEntrySubtract(1 << ((mazeSection + 11) & 0x0F)); // Remove the bottom hedge section - tileElement->asTrack()->MazeEntrySubtract(1 << ((mazeSection + 15) & 0x0F)); + tileElement->asTrack()->mazeEntrySubtract(1 << ((mazeSection + 15) & 0x0F)); MapInvalidateTile({ hedgePos, tileElement->getBaseZ(), tileElement->getClearanceZ() }); return; diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index bff3c4ba03..cd73e22d98 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -582,7 +582,7 @@ namespace OpenRCT2 case TileElementType::track: if (initialTileElementPos.z == tileElement->getBaseZ()) { - auto ride = GetRide(tileElement->asTrack()->GetRideIndex()); + auto ride = GetRide(tileElement->asTrack()->getRideIndex()); if (ride == nullptr) { continue; @@ -593,8 +593,8 @@ namespace OpenRCT2 continue; } - const auto trackType = tileElement->asTrack()->GetTrackType(); - const uint8_t trackSequence = tileElement->asTrack()->GetSequenceIndex(); + const auto trackType = tileElement->asTrack()->getTrackType(); + const uint8_t trackSequence = tileElement->asTrack()->getSequenceIndex(); const auto& ted = GetTrackElementDescriptor(trackType); if (!ted.sequenceData.sequences[trackSequence].flags.has(SequenceFlag::connectsToPath)) { @@ -610,7 +610,7 @@ namespace OpenRCT2 if (query) { FootpathNeighbourListPush( - neighbourList, 1, direction, tileElement->asTrack()->GetRideIndex(), + neighbourList, 1, direction, tileElement->asTrack()->getRideIndex(), StationIndex::GetNull()); } Loc6A6FD2(initialTileElementPos, direction, initialTileElement, query); @@ -671,7 +671,7 @@ namespace OpenRCT2 if (tileElementPos.element->getType() == TileElementType::track) { - auto ride = GetRide(tileElementPos.element->asTrack()->GetRideIndex()); + auto ride = GetRide(tileElementPos.element->asTrack()->getRideIndex()); if (ride == nullptr) { return; @@ -682,8 +682,8 @@ namespace OpenRCT2 return; } - const auto trackType = tileElementPos.element->asTrack()->GetTrackType(); - const uint8_t trackSequence = tileElementPos.element->asTrack()->GetSequenceIndex(); + const auto trackType = tileElementPos.element->asTrack()->getTrackType(); + const uint8_t trackSequence = tileElementPos.element->asTrack()->getSequenceIndex(); const auto& ted = GetTrackElementDescriptor(trackType); if (!ted.sequenceData.sequences[trackSequence].flags.has(SequenceFlag::connectsToPath)) { @@ -1701,15 +1701,15 @@ namespace OpenRCT2 case TileElementType::track: if (tileElement->baseHeight == coords.z) { - auto ride = GetRide(tileElement->asTrack()->GetRideIndex()); + auto ride = GetRide(tileElement->asTrack()->getRideIndex()); if (ride == nullptr) continue; if (!ride->getRideTypeDescriptor().flags.has(RtdFlag::isFlatRide)) break; - const auto trackType = tileElement->asTrack()->GetTrackType(); - const uint8_t trackSequence = tileElement->asTrack()->GetSequenceIndex(); + const auto trackType = tileElement->asTrack()->getTrackType(); + const uint8_t trackSequence = tileElement->asTrack()->getSequenceIndex(); const auto& ted = GetTrackElementDescriptor(trackType); if (ted.sequenceData.sequences[trackSequence].flags.has(SequenceFlag::connectsToPath)) { @@ -1752,7 +1752,7 @@ namespace OpenRCT2 { if (tileElement->getType() == TileElementType::track) { - auto rideIndex = tileElement->asTrack()->GetRideIndex(); + auto rideIndex = tileElement->asTrack()->getRideIndex(); auto ride = GetRide(rideIndex); if (ride == nullptr) return; @@ -1875,12 +1875,12 @@ namespace OpenRCT2 return false; } - if (trackElement->GetTrackType() != TrackElemType::flat) + if (trackElement->getTrackType() != TrackElemType::flat) { return false; } - auto ride = GetRide(trackElement->GetRideIndex()); + auto ride = GetRide(trackElement->getRideIndex()); if (ride == nullptr) { return false; diff --git a/src/openrct2/world/Map.cpp b/src/openrct2/world/Map.cpp index 81020040f9..4c1a40b9b5 100644 --- a/src/openrct2/world/Map.cpp +++ b/src/openrct2/world/Map.cpp @@ -1877,7 +1877,7 @@ namespace OpenRCT2 continue; if (tileElement->baseHeight != trackTilePos.z) continue; - if (tileElement->asTrack()->GetTrackType() != trackType) + if (tileElement->asTrack()->getTrackType() != trackType) continue; return tileElement; @@ -1904,9 +1904,9 @@ namespace OpenRCT2 continue; if (tileElement->baseHeight != trackTilePos.z) continue; - if (tileElement->asTrack()->GetTrackType() != trackType) + if (tileElement->asTrack()->getTrackType() != trackType) continue; - if (tileElement->asTrack()->GetSequenceIndex() != sequence) + if (tileElement->asTrack()->getSequenceIndex() != sequence) continue; return tileElement; @@ -1929,7 +1929,7 @@ namespace OpenRCT2 continue; if (trackElement->getDirection() != location.direction) continue; - if (trackElement->GetTrackType() != trackType) + if (trackElement->getTrackType() != trackType) continue; return trackElement; } @@ -1952,9 +1952,9 @@ namespace OpenRCT2 continue; if (trackElement->getDirection() != location.direction) continue; - if (trackElement->GetTrackType() != trackType) + if (trackElement->getTrackType() != trackType) continue; - if (trackElement->GetSequenceIndex() != sequence) + if (trackElement->getSequenceIndex() != sequence) continue; return trackElement; } @@ -1981,9 +1981,9 @@ namespace OpenRCT2 continue; if (tileElement->baseHeight != trackTilePos.z) continue; - if (tileElement->asTrack()->GetRideIndex() != rideIndex) + if (tileElement->asTrack()->getRideIndex() != rideIndex) continue; - if (tileElement->asTrack()->GetTrackType() != trackType) + if (tileElement->asTrack()->getTrackType() != trackType) continue; return tileElement; @@ -2010,7 +2010,7 @@ namespace OpenRCT2 continue; if (tileElement->baseHeight != trackTilePos.z) continue; - if (tileElement->asTrack()->GetRideIndex() != rideIndex) + if (tileElement->asTrack()->getRideIndex() != rideIndex) continue; return tileElement; @@ -2033,7 +2033,7 @@ namespace OpenRCT2 } if (tileElement->getType() == TileElementType::track && tileElement->getBaseZ() == trackPos.z - && tileElement->asTrack()->GetRideIndex() == rideIndex) + && tileElement->asTrack()->getRideIndex() == rideIndex) { return tileElement; } @@ -2061,7 +2061,7 @@ namespace OpenRCT2 continue; if (tileElement->baseHeight != trackTilePos.z) continue; - if (tileElement->asTrack()->GetRideIndex() != rideIndex) + if (tileElement->asTrack()->getRideIndex() != rideIndex) continue; if (tileElement->getDirection() != trackPos.direction) continue; diff --git a/src/openrct2/world/MapAnimation.cpp b/src/openrct2/world/MapAnimation.cpp index ef61d883cc..251e1b813d 100644 --- a/src/openrct2/world/MapAnimation.cpp +++ b/src/openrct2/world/MapAnimation.cpp @@ -200,7 +200,7 @@ static std::optional UpdateSmallSceneryAnimation( template static bool UpdateTrackAnimation(TrackElement& track, const CoordsXYZ& loc, const int32_t baseZ, const Viewport* const viewport) { - switch (track.GetTrackType()) + switch (track.getTrackType()) { case TrackElemType::waterfall: if constexpr (invalidate) @@ -397,9 +397,9 @@ static std::optional UpdateTile(const TileCoordsXY& coords, const Vi template static bool UpdateOnRidePhotoAnimation(TrackElement& track, const CoordsXYZ& coords) { - if (track.IsTakingPhoto()) + if (track.isTakingPhoto()) { - track.DecrementPhotoTimeout(); + track.decrementPhotoTimeout(); if constexpr (invalidate) { ViewportsInvalidate(coords.x, coords.y, coords.z, track.getClearanceZ(), kMaxZoom); @@ -419,10 +419,10 @@ static bool UpdateLandEdgeDoorsAnimation(TrackElement& track, const CoordsXYZ& c bool isAnimating = false; - const auto doorAState = track.GetDoorAState(); + const auto doorAState = track.getDoorAState(); if (doorAState >= kLandEdgeDoorFrameEnd) { - track.SetDoorAState(kLandEdgeDoorFrameClosed); + track.setDoorAState(kLandEdgeDoorFrameClosed); if constexpr (invalidate) { ViewportsInvalidate(coords.x, coords.y, coords.z, coords.z + 32, kMaxZoom); @@ -430,7 +430,7 @@ static bool UpdateLandEdgeDoorsAnimation(TrackElement& track, const CoordsXYZ& c } else if (doorAState != kLandEdgeDoorFrameClosed && doorAState != kLandEdgeDoorFrameOpen) { - track.SetDoorAState(doorAState + 1); + track.setDoorAState(doorAState + 1); if constexpr (invalidate) { ViewportsInvalidate(coords.x, coords.y, coords.z, coords.z + 32, kMaxZoom); @@ -438,10 +438,10 @@ static bool UpdateLandEdgeDoorsAnimation(TrackElement& track, const CoordsXYZ& c isAnimating = true; } - const auto doorBState = track.GetDoorBState(); + const auto doorBState = track.getDoorBState(); if (doorBState >= kLandEdgeDoorFrameEnd) { - track.SetDoorBState(kLandEdgeDoorFrameClosed); + track.setDoorBState(kLandEdgeDoorFrameClosed); if constexpr (invalidate) { ViewportsInvalidate(coords.x, coords.y, coords.z, coords.z + 32, kMaxZoom); @@ -449,7 +449,7 @@ static bool UpdateLandEdgeDoorsAnimation(TrackElement& track, const CoordsXYZ& c } else if (doorBState != kLandEdgeDoorFrameClosed && doorBState != kLandEdgeDoorFrameOpen) { - track.SetDoorBState(doorBState + 1); + track.setDoorBState(doorBState + 1); if constexpr (invalidate) { ViewportsInvalidate(coords.x, coords.y, coords.z, coords.z + 32, kMaxZoom); @@ -478,7 +478,7 @@ static bool UpdateTemporaryAnimation(const TemporaryMapAnimation& animation) case MapAnimations::TemporaryType::onRidePhoto: { if (tileElement->getType() == TileElementType::track && tileElement->baseHeight == tileCoords.z - && tileElement->asTrack()->GetTrackType() == TrackElemType::onRidePhoto) + && tileElement->asTrack()->getTrackType() == TrackElemType::onRidePhoto) { isAnimating |= UpdateOnRidePhotoAnimation(*tileElement->asTrack(), animation.location); } @@ -572,7 +572,7 @@ static std::optional IsElementAnimated(const TileElementBase& elemen case TileElementType::track: { const auto* const track = element.asTrack(); - switch (track->GetTrackType()) + switch (track->getTrackType()) { case TrackElemType::waterfall: case TrackElemType::rapids: diff --git a/src/openrct2/world/TileInspector.cpp b/src/openrct2/world/TileInspector.cpp index ad3bbdf855..3f2cae2489 100644 --- a/src/openrct2/world/TileInspector.cpp +++ b/src/openrct2/world/TileInspector.cpp @@ -714,19 +714,19 @@ namespace OpenRCT2::TileInspector if (isExecuting) { - auto type = trackElement->asTrack()->GetTrackType(); + auto type = trackElement->asTrack()->getTrackType(); int16_t originX = loc.x; int16_t originY = loc.y; int16_t originZ = trackElement->getBaseZ(); uint8_t rotation = trackElement->getDirection(); - auto rideIndex = trackElement->asTrack()->GetRideIndex(); + auto rideIndex = trackElement->asTrack()->getRideIndex(); auto ride = GetRide(rideIndex); if (ride == nullptr) return GameActions::Result( GameActions::Status::invalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_RIDE_NOT_FOUND); const auto& ted = GetTrackElementDescriptor(type); - auto sequenceIndex = trackElement->asTrack()->GetSequenceIndex(); + auto sequenceIndex = trackElement->asTrack()->getSequenceIndex(); if (sequenceIndex >= ted.sequenceData.numSequences) return GameActions::Result( GameActions::Status::invalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_TRACK_BLOCK_NOT_FOUND); @@ -790,27 +790,27 @@ namespace OpenRCT2::TileInspector if (!entireTrackBlock) { // Set chain for only the selected piece - if (trackElement->asTrack()->HasChain() != setChain) + if (trackElement->asTrack()->hasChain() != setChain) { - trackElement->asTrack()->SetHasChain(setChain); + trackElement->asTrack()->setHasChain(setChain); } return GameActions::Result(); } - auto type = trackElement->asTrack()->GetTrackType(); + auto type = trackElement->asTrack()->getTrackType(); int16_t originX = loc.x; int16_t originY = loc.y; int16_t originZ = trackElement->getBaseZ(); uint8_t rotation = trackElement->getDirection(); - auto rideIndex = trackElement->asTrack()->GetRideIndex(); + auto rideIndex = trackElement->asTrack()->getRideIndex(); auto ride = GetRide(rideIndex); if (ride == nullptr) return GameActions::Result( GameActions::Status::invalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_RIDE_NOT_FOUND); const auto& ted = GetTrackElementDescriptor(type); - auto sequenceIndex = trackElement->asTrack()->GetSequenceIndex(); + auto sequenceIndex = trackElement->asTrack()->getSequenceIndex(); if (sequenceIndex >= ted.sequenceData.numSequences) return GameActions::Result( GameActions::Status::invalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_TRACK_BLOCK_NOT_FOUND); @@ -848,9 +848,9 @@ namespace OpenRCT2::TileInspector // Keep? // invalidate_test_results(ride); - if (nextTrackElement->asTrack()->HasChain() != setChain) + if (nextTrackElement->asTrack()->hasChain() != setChain) { - nextTrackElement->asTrack()->SetHasChain(setChain); + nextTrackElement->asTrack()->setHasChain(setChain); } MapInvalidateTileFull(elem); @@ -869,7 +869,7 @@ namespace OpenRCT2::TileInspector if (isExecuting) { - trackElement->asTrack()->SetBrakeClosed(isClosed); + trackElement->asTrack()->setBrakeClosed(isClosed); } return GameActions::Result(); @@ -885,7 +885,7 @@ namespace OpenRCT2::TileInspector if (isExecuting) { - trackElement->asTrack()->SetIsIndestructible(isIndestructible); + trackElement->asTrack()->setIsIndestructible(isIndestructible); } return GameActions::Result(); diff --git a/src/openrct2/world/tile_element/TileElement.cpp b/src/openrct2/world/tile_element/TileElement.cpp index 3f63f7e805..66c6a61a56 100644 --- a/src/openrct2/world/tile_element/TileElement.cpp +++ b/src/openrct2/world/tile_element/TileElement.cpp @@ -87,7 +87,7 @@ namespace OpenRCT2 switch (getType()) { case TileElementType::track: - return asTrack()->GetRideIndex(); + return asTrack()->getRideIndex(); case TileElementType::entrance: return asEntrance()->getRideIndex(); case TileElementType::path: diff --git a/src/openrct2/world/tile_element/TrackElement.cpp b/src/openrct2/world/tile_element/TrackElement.cpp index ca68f8c39f..7d54d74516 100644 --- a/src/openrct2/world/tile_element/TrackElement.cpp +++ b/src/openrct2/world/tile_element/TrackElement.cpp @@ -15,20 +15,20 @@ namespace OpenRCT2 { - bool TrackElement::HasChain() const + bool TrackElement::hasChain() const { - return Flags2 & TRACK_ELEMENT_FLAGS2_CHAIN_LIFT; + return flags2 & TRACK_ELEMENT_FLAGS2_CHAIN_LIFT; } - void TrackElement::SetHasChain(bool on) + void TrackElement::setHasChain(bool on) { if (on) { - Flags2 |= TRACK_ELEMENT_FLAGS2_CHAIN_LIFT; + flags2 |= TRACK_ELEMENT_FLAGS2_CHAIN_LIFT; } else { - Flags2 &= ~TRACK_ELEMENT_FLAGS2_CHAIN_LIFT; + flags2 &= ~TRACK_ELEMENT_FLAGS2_CHAIN_LIFT; } } @@ -37,9 +37,9 @@ namespace OpenRCT2 * A beginning of a block can be the end of a station, the end of a lift hill, * or a block brake. */ - bool TrackElement::IsBlockStart() const + bool TrackElement::isBlockStart() const { - switch (GetTrackType()) + switch (getTrackType()) { case TrackElemType::endStation: case TrackElemType::cableLiftHill: @@ -50,256 +50,256 @@ namespace OpenRCT2 case TrackElemType::up60ToFlat: case TrackElemType::diagUp25ToFlat: case TrackElemType::diagUp60ToFlat: - return HasChain(); + return hasChain(); default: return false; } } - bool TrackElement::IsStation() const + bool TrackElement::isStation() const { - return trackTypeIsStation(GetTrackType()); + return trackTypeIsStation(getTrackType()); } - uint8_t TrackElement::GetSeatRotation() const + uint8_t TrackElement::getSeatRotation() const { - const auto* ride = GetRide(GetRideIndex()); + const auto* ride = GetRide(getRideIndex()); if (ride != nullptr && ride->getRideTypeDescriptor().flags.has(RtdFlag::hasLandscapeDoors)) return kDefaultSeatRotation; - return URide.ColourScheme >> 4; + return uRide.colourScheme >> 4; } - void TrackElement::SetSeatRotation(uint8_t newSeatRotation) + void TrackElement::setSeatRotation(uint8_t newSeatRotation) { - URide.ColourScheme &= ~TRACK_ELEMENT_COLOUR_SEAT_ROTATION_MASK; - URide.ColourScheme |= (newSeatRotation << 4); + uRide.colourScheme &= ~TRACK_ELEMENT_COLOUR_SEAT_ROTATION_MASK; + uRide.colourScheme |= (newSeatRotation << 4); } - bool TrackElement::IsTakingPhoto() const + bool TrackElement::isTakingPhoto() const { - return URide.OnridePhotoBits != 0; + return uRide.onridePhotoBits != 0; } - void TrackElement::SetPhotoTimeout() + void TrackElement::setPhotoTimeout() { - URide.OnridePhotoBits = 3; + uRide.onridePhotoBits = 3; } - void TrackElement::SetPhotoTimeout(uint8_t value) + void TrackElement::setPhotoTimeout(uint8_t value) { - URide.OnridePhotoBits = value; + uRide.onridePhotoBits = value; } - uint8_t TrackElement::GetPhotoTimeout() const + uint8_t TrackElement::getPhotoTimeout() const { - return URide.OnridePhotoBits; + return uRide.onridePhotoBits; } - void TrackElement::DecrementPhotoTimeout() + void TrackElement::decrementPhotoTimeout() { - URide.OnridePhotoBits = std::max(0, URide.OnridePhotoBits - 1); + uRide.onridePhotoBits = std::max(0, uRide.onridePhotoBits - 1); } - uint16_t TrackElement::GetMazeEntry() const + uint16_t TrackElement::getMazeEntry() const { - return UMaze.MazeEntry; + return uMaze.mazeEntry; } - void TrackElement::SetMazeEntry(uint16_t newMazeEntry) + void TrackElement::setMazeEntry(uint16_t newMazeEntry) { - UMaze.MazeEntry = newMazeEntry; + uMaze.mazeEntry = newMazeEntry; } - void TrackElement::MazeEntryAdd(uint16_t addVal) + void TrackElement::mazeEntryAdd(uint16_t addVal) { - UMaze.MazeEntry |= addVal; + uMaze.mazeEntry |= addVal; } - void TrackElement::MazeEntrySubtract(uint16_t subVal) + void TrackElement::mazeEntrySubtract(uint16_t subVal) { - UMaze.MazeEntry &= ~subVal; + uMaze.mazeEntry &= ~subVal; } - TrackElemType TrackElement::GetTrackType() const + TrackElemType TrackElement::getTrackType() const { - return TrackType; + return trackType; } - void TrackElement::SetTrackType(TrackElemType newType) + void TrackElement::setTrackType(TrackElemType newType) { - TrackType = newType; + trackType = newType; } - ride_type_t TrackElement::GetRideType() const + ride_type_t TrackElement::getRideType() const { - return RideType; + return rideType; } - void TrackElement::SetRideType(const ride_type_t rideType) + void TrackElement::setRideType(const ride_type_t newRideType) { - RideType = rideType; + rideType = newRideType; } - uint8_t TrackElement::GetSequenceIndex() const + uint8_t TrackElement::getSequenceIndex() const { - return URide.Sequence; + return uRide.sequence; } - void TrackElement::SetSequenceIndex(uint8_t newSequenceIndex) + void TrackElement::setSequenceIndex(uint8_t newSequenceIndex) { - URide.Sequence = newSequenceIndex; + uRide.sequence = newSequenceIndex; } - StationIndex TrackElement::GetStationIndex() const + StationIndex TrackElement::getStationIndex() const { - return URide.stationIndex; + return uRide.stationIndex; } - void TrackElement::SetStationIndex(StationIndex newStationIndex) + void TrackElement::setStationIndex(StationIndex newStationIndex) { - URide.stationIndex = newStationIndex; + uRide.stationIndex = newStationIndex; } - uint8_t TrackElement::GetDoorAState() const + uint8_t TrackElement::getDoorAState() const { - return (URide.ColourScheme & TRACK_ELEMENT_COLOUR_DOOR_A_MASK) >> 2; + return (uRide.colourScheme & TRACK_ELEMENT_COLOUR_DOOR_A_MASK) >> 2; } - uint8_t TrackElement::GetDoorBState() const + uint8_t TrackElement::getDoorBState() const { - return (URide.ColourScheme & TRACK_ELEMENT_COLOUR_DOOR_B_MASK) >> 5; + return (uRide.colourScheme & TRACK_ELEMENT_COLOUR_DOOR_B_MASK) >> 5; } - void TrackElement::SetDoorAState(uint8_t newState) + void TrackElement::setDoorAState(uint8_t newState) { - URide.ColourScheme &= ~TRACK_ELEMENT_COLOUR_DOOR_A_MASK; - URide.ColourScheme |= ((newState << 2) & TRACK_ELEMENT_COLOUR_DOOR_A_MASK); + uRide.colourScheme &= ~TRACK_ELEMENT_COLOUR_DOOR_A_MASK; + uRide.colourScheme |= ((newState << 2) & TRACK_ELEMENT_COLOUR_DOOR_A_MASK); } - void TrackElement::SetDoorBState(uint8_t newState) + void TrackElement::setDoorBState(uint8_t newState) { - URide.ColourScheme &= ~TRACK_ELEMENT_COLOUR_DOOR_B_MASK; - URide.ColourScheme |= ((newState << 5) & TRACK_ELEMENT_COLOUR_DOOR_B_MASK); + uRide.colourScheme &= ~TRACK_ELEMENT_COLOUR_DOOR_B_MASK; + uRide.colourScheme |= ((newState << 5) & TRACK_ELEMENT_COLOUR_DOOR_B_MASK); } - RideId TrackElement::GetRideIndex() const + RideId TrackElement::getRideIndex() const { - return RideIndex; + return rideIndex; } - void TrackElement::SetRideIndex(RideId newRideIndex) + void TrackElement::setRideIndex(RideId newRideIndex) { - RideIndex = newRideIndex; + rideIndex = newRideIndex; } - uint8_t TrackElement::GetColourScheme() const + uint8_t TrackElement::getColourScheme() const { - return URide.ColourScheme & TRACK_ELEMENT_COLOUR_SCHEME_MASK; + return uRide.colourScheme & TRACK_ELEMENT_COLOUR_SCHEME_MASK; } - void TrackElement::SetColourScheme(RideColourScheme newColourScheme) + void TrackElement::setColourScheme(RideColourScheme newColourScheme) { - URide.ColourScheme &= ~TRACK_ELEMENT_COLOUR_SCHEME_MASK; - URide.ColourScheme |= (EnumValue(newColourScheme) & TRACK_ELEMENT_COLOUR_SCHEME_MASK); + uRide.colourScheme &= ~TRACK_ELEMENT_COLOUR_SCHEME_MASK; + uRide.colourScheme |= (EnumValue(newColourScheme) & TRACK_ELEMENT_COLOUR_SCHEME_MASK); } - bool TrackElement::HasCableLift() const + bool TrackElement::hasCableLift() const { - return Flags2 & TRACK_ELEMENT_FLAGS2_CABLE_LIFT; + return flags2 & TRACK_ELEMENT_FLAGS2_CABLE_LIFT; } - void TrackElement::SetHasCableLift(bool on) + void TrackElement::setHasCableLift(bool on) { - Flags2 &= ~TRACK_ELEMENT_FLAGS2_CABLE_LIFT; + flags2 &= ~TRACK_ELEMENT_FLAGS2_CABLE_LIFT; if (on) - Flags2 |= TRACK_ELEMENT_FLAGS2_CABLE_LIFT; + flags2 |= TRACK_ELEMENT_FLAGS2_CABLE_LIFT; } - bool TrackElement::IsInverted() const + bool TrackElement::isInverted() const { - return Flags2 & TRACK_ELEMENT_FLAGS2_INVERTED; + return flags2 & TRACK_ELEMENT_FLAGS2_INVERTED; } - void TrackElement::SetInverted(bool inverted) + void TrackElement::setInverted(bool inverted) { if (inverted) { - Flags2 |= TRACK_ELEMENT_FLAGS2_INVERTED; + flags2 |= TRACK_ELEMENT_FLAGS2_INVERTED; } else { - Flags2 &= ~TRACK_ELEMENT_FLAGS2_INVERTED; + flags2 &= ~TRACK_ELEMENT_FLAGS2_INVERTED; } } - bool TrackElement::IsBrakeClosed() const + bool TrackElement::isBrakeClosed() const { - return (Flags2 & TRACK_ELEMENT_FLAGS2_BRAKE_CLOSED) != 0; + return (flags2 & TRACK_ELEMENT_FLAGS2_BRAKE_CLOSED) != 0; } - void TrackElement::SetBrakeClosed(bool isClosed) + void TrackElement::setBrakeClosed(bool isClosed) { if (isClosed) { - Flags2 |= TRACK_ELEMENT_FLAGS2_BRAKE_CLOSED; + flags2 |= TRACK_ELEMENT_FLAGS2_BRAKE_CLOSED; } else { - Flags2 &= ~TRACK_ELEMENT_FLAGS2_BRAKE_CLOSED; + flags2 &= ~TRACK_ELEMENT_FLAGS2_BRAKE_CLOSED; } } - bool TrackElement::IsIndestructible() const + bool TrackElement::isIndestructible() const { - return (Flags2 & TRACK_ELEMENT_FLAGS2_INDESTRUCTIBLE_TRACK_PIECE) != 0 && !getGameState().cheats.makeAllDestructible; + return (flags2 & TRACK_ELEMENT_FLAGS2_INDESTRUCTIBLE_TRACK_PIECE) != 0 && !getGameState().cheats.makeAllDestructible; } - void TrackElement::SetIsIndestructible(bool isIndestructible) + void TrackElement::setIsIndestructible(bool isIndestructible) { if (isIndestructible) { - Flags2 |= TRACK_ELEMENT_FLAGS2_INDESTRUCTIBLE_TRACK_PIECE; + flags2 |= TRACK_ELEMENT_FLAGS2_INDESTRUCTIBLE_TRACK_PIECE; } else { - Flags2 &= ~TRACK_ELEMENT_FLAGS2_INDESTRUCTIBLE_TRACK_PIECE; + flags2 &= ~TRACK_ELEMENT_FLAGS2_INDESTRUCTIBLE_TRACK_PIECE; } } - uint8_t TrackElement::GetBrakeBoosterSpeed() const + uint8_t TrackElement::getBrakeBoosterSpeed() const { - return URide.BrakeBoosterSpeed << 1; + return uRide.brakeBoosterSpeed << 1; } - void TrackElement::SetBrakeBoosterSpeed(uint8_t speed) + void TrackElement::setBrakeBoosterSpeed(uint8_t speed) { - URide.BrakeBoosterSpeed = (speed >> 1); + uRide.brakeBoosterSpeed = (speed >> 1); } - bool TrackElement::HasGreenLight() const + bool TrackElement::hasGreenLight() const { - return (Flags2 & TRACK_ELEMENT_FLAGS2_HAS_GREEN_LIGHT) != 0; + return (flags2 & TRACK_ELEMENT_FLAGS2_HAS_GREEN_LIGHT) != 0; } - void TrackElement::SetHasGreenLight(bool on) + void TrackElement::setHasGreenLight(bool on) { - Flags2 &= ~TRACK_ELEMENT_FLAGS2_HAS_GREEN_LIGHT; + flags2 &= ~TRACK_ELEMENT_FLAGS2_HAS_GREEN_LIGHT; if (on) { - Flags2 |= TRACK_ELEMENT_FLAGS2_HAS_GREEN_LIGHT; + flags2 |= TRACK_ELEMENT_FLAGS2_HAS_GREEN_LIGHT; } } - bool TrackElement::IsHighlighted() const + bool TrackElement::isHighlighted() const { - return (Flags2 & TRACK_ELEMENT_FLAGS2_HIGHLIGHT); + return (flags2 & TRACK_ELEMENT_FLAGS2_HIGHLIGHT); } - void TrackElement::SetHighlight(bool on) + void TrackElement::setHighlight(bool on) { - Flags2 &= ~TRACK_ELEMENT_FLAGS2_HIGHLIGHT; + flags2 &= ~TRACK_ELEMENT_FLAGS2_HIGHLIGHT; if (on) - Flags2 |= TRACK_ELEMENT_FLAGS2_HIGHLIGHT; + flags2 |= TRACK_ELEMENT_FLAGS2_HIGHLIGHT; } } // namespace OpenRCT2 diff --git a/src/openrct2/world/tile_element/TrackElement.h b/src/openrct2/world/tile_element/TrackElement.h index 8169edbfb6..41e6b34059 100644 --- a/src/openrct2/world/tile_element/TrackElement.h +++ b/src/openrct2/world/tile_element/TrackElement.h @@ -54,99 +54,99 @@ namespace OpenRCT2 static constexpr TileElementType kElementType = TileElementType::track; private: - TrackElemType TrackType; + TrackElemType trackType; union { struct { - uint8_t Sequence; - uint8_t ColourScheme; + uint8_t sequence; + uint8_t colourScheme; union { // - Bits 3 and 4 are never set // - Bits 1 and 2 are set when a vehicle triggers the on-ride photo and act like a countdown from 3. // - If any of the bits 1-4 are set, the game counts it as a photo being taken. - uint8_t OnridePhotoBits; + uint8_t onridePhotoBits; // Contains the brake/booster speed, divided by 2. - uint8_t BrakeBoosterSpeed; + uint8_t brakeBoosterSpeed; }; StationIndex stationIndex; - } URide; + } uRide; struct { - uint16_t MazeEntry; // 6 - } UMaze; + uint16_t mazeEntry; // 6 + } uMaze; }; - uint8_t Flags2; - RideId RideIndex; - ride_type_t RideType; + uint8_t flags2; + RideId rideIndex; + ride_type_t rideType; public: - TrackElemType GetTrackType() const; - void SetTrackType(TrackElemType newType); + TrackElemType getTrackType() const; + void setTrackType(TrackElemType newType); - ride_type_t GetRideType() const; - void SetRideType(ride_type_t rideType); + ride_type_t getRideType() const; + void setRideType(ride_type_t rideType); - uint8_t GetSequenceIndex() const; - void SetSequenceIndex(uint8_t newSequenceIndex); + uint8_t getSequenceIndex() const; + void setSequenceIndex(uint8_t newSequenceIndex); - RideId GetRideIndex() const; - void SetRideIndex(RideId newRideIndex); + RideId getRideIndex() const; + void setRideIndex(RideId newRideIndex); - uint8_t GetColourScheme() const; - void SetColourScheme(RideColourScheme newColourScheme); + uint8_t getColourScheme() const; + void setColourScheme(RideColourScheme newColourScheme); - StationIndex GetStationIndex() const; - void SetStationIndex(StationIndex newStationIndex); + StationIndex getStationIndex() const; + void setStationIndex(StationIndex newStationIndex); - bool HasChain() const; - void SetHasChain(bool on); + bool hasChain() const; + void setHasChain(bool on); - bool HasCableLift() const; - void SetHasCableLift(bool on); + bool hasCableLift() const; + void setHasCableLift(bool on); - bool IsInverted() const; - void SetInverted(bool inverted); + bool isInverted() const; + void setInverted(bool inverted); - bool IsBrakeClosed() const; - void SetBrakeClosed(bool isClosed); + bool isBrakeClosed() const; + void setBrakeClosed(bool isClosed); - bool IsIndestructible() const; - void SetIsIndestructible(bool isIndestructible); + bool isIndestructible() const; + void setIsIndestructible(bool isIndestructible); - uint8_t GetBrakeBoosterSpeed() const; - void SetBrakeBoosterSpeed(uint8_t speed); + uint8_t getBrakeBoosterSpeed() const; + void setBrakeBoosterSpeed(uint8_t speed); - bool HasGreenLight() const; - void SetHasGreenLight(bool on); + bool hasGreenLight() const; + void setHasGreenLight(bool on); - uint8_t GetSeatRotation() const; - void SetSeatRotation(uint8_t newSeatRotation); + uint8_t getSeatRotation() const; + void setSeatRotation(uint8_t newSeatRotation); - uint16_t GetMazeEntry() const; - void SetMazeEntry(uint16_t newMazeEntry); - void MazeEntryAdd(uint16_t addVal); - void MazeEntrySubtract(uint16_t subVal); + uint16_t getMazeEntry() const; + void setMazeEntry(uint16_t newMazeEntry); + void mazeEntryAdd(uint16_t addVal); + void mazeEntrySubtract(uint16_t subVal); - bool IsTakingPhoto() const; - void SetPhotoTimeout(); - void SetPhotoTimeout(uint8_t newValue); - void DecrementPhotoTimeout(); - uint8_t GetPhotoTimeout() const; + bool isTakingPhoto() const; + void setPhotoTimeout(); + void setPhotoTimeout(uint8_t newValue); + void decrementPhotoTimeout(); + uint8_t getPhotoTimeout() const; - bool IsHighlighted() const; - void SetHighlight(bool on); + bool isHighlighted() const; + void setHighlight(bool on); // Used by ghost train, RCT1 feature, will be reintroduced at some point. // (See https://github.com/OpenRCT2/OpenRCT2/issues/7059) - uint8_t GetDoorAState() const; - uint8_t GetDoorBState() const; - void SetDoorAState(uint8_t newState); - void SetDoorBState(uint8_t newState); + uint8_t getDoorAState() const; + uint8_t getDoorBState() const; + void setDoorAState(uint8_t newState); + void setDoorBState(uint8_t newState); - bool IsStation() const; - bool IsBlockStart() const; + bool isStation() const; + bool isBlockStart() const; }; static_assert(sizeof(TrackElement) == kTileElementSize);