diff --git a/src/openrct2-ui/interface/ViewportInteraction.cpp b/src/openrct2-ui/interface/ViewportInteraction.cpp index 12f059663c..84133a7af4 100644 --- a/src/openrct2-ui/interface/ViewportInteraction.cpp +++ b/src/openrct2-ui/interface/ViewportInteraction.cpp @@ -317,7 +317,7 @@ namespace OpenRCT2::Ui return info; } - ride = GetRide(tileElement->GetRideIndex()); + ride = GetRide(tileElement->getRideIndex()); if (ride == nullptr) { info.interactionType = ViewportInteractionItem::none; diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index f19309f950..652dbcbd19 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -7296,7 +7296,7 @@ namespace OpenRCT2::Ui::Windows WindowBase* RideOpenTrack(TileElement* tileElement) { assert(tileElement != nullptr); - auto rideIndex = tileElement->GetRideIndex(); + auto rideIndex = tileElement->getRideIndex(); if (!rideIndex.IsNull()) { auto ride = GetRide(rideIndex); diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index 6d267d988a..6492e7a684 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -1914,7 +1914,7 @@ namespace OpenRCT2::Ui::Windows // Copy value, in case the element gets moved _copiedElement = *tileElement; _copiedBanner = {}; - auto bannerIndex = _copiedElement.GetBannerIndex(); + auto bannerIndex = _copiedElement.getBannerIndex(); if (bannerIndex != BannerIndex::GetNull()) { auto banner = GetBanner(bannerIndex); diff --git a/src/openrct2/actions/scenery/BannerRemoveAction.cpp b/src/openrct2/actions/scenery/BannerRemoveAction.cpp index 3bc2c8feda..7e44f02d01 100644 --- a/src/openrct2/actions/scenery/BannerRemoveAction.cpp +++ b/src/openrct2/actions/scenery/BannerRemoveAction.cpp @@ -129,7 +129,7 @@ namespace OpenRCT2::GameActions res.cost = -((bannerEntry->price * 3) / 4); } - reinterpret_cast(bannerElement)->RemoveBannerEntry(); + reinterpret_cast(bannerElement)->removeBannerEntry(); MapInvalidateTileZoom1({ _loc, _loc.z, _loc.z + 32 }); bannerElement->remove(); diff --git a/src/openrct2/actions/scenery/LargeSceneryRemoveAction.cpp b/src/openrct2/actions/scenery/LargeSceneryRemoveAction.cpp index 79683d22e2..21244e99aa 100644 --- a/src/openrct2/actions/scenery/LargeSceneryRemoveAction.cpp +++ b/src/openrct2/actions/scenery/LargeSceneryRemoveAction.cpp @@ -151,7 +151,7 @@ namespace OpenRCT2::GameActions return Result(Status::unknown, STR_CANT_REMOVE_THIS, kStringIdNone); } - tileElement->RemoveBannerEntry(); + tileElement->removeBannerEntry(); auto rotatedFirstTile = CoordsXYZ{ CoordsXY{ sceneryEntry->tiles[_tileIndex].offset }.Rotate(_loc.direction), sceneryEntry->tiles[_tileIndex].offset.z }; diff --git a/src/openrct2/actions/scenery/WallRemoveAction.cpp b/src/openrct2/actions/scenery/WallRemoveAction.cpp index f638f4e6c1..3f0ee4e1af 100644 --- a/src/openrct2/actions/scenery/WallRemoveAction.cpp +++ b/src/openrct2/actions/scenery/WallRemoveAction.cpp @@ -84,7 +84,7 @@ namespace OpenRCT2::GameActions res.position.y = _loc.y + 16; res.position.z = _loc.z; - wallElement->RemoveBannerEntry(); + wallElement->removeBannerEntry(); MapInvalidateTileZoom1({ _loc, wallElement->getBaseZ(), (wallElement->getBaseZ()) + 72 }); TileElementRemove(wallElement); diff --git a/src/openrct2/core/DataSerialiserTraits.h b/src/openrct2/core/DataSerialiserTraits.h index 231716de06..e63d5784f5 100644 --- a/src/openrct2/core/DataSerialiserTraits.h +++ b/src/openrct2/core/DataSerialiserTraits.h @@ -461,11 +461,11 @@ namespace OpenRCT2 stream->WriteValue(tileElement.baseHeight); stream->WriteValue(tileElement.clearanceHeight); stream->WriteValue(tileElement.owner); - for (auto v : tileElement.Pad05) + for (auto v : tileElement.pad05) { stream->WriteValue(v); } - for (auto v : tileElement.Pad08) + for (auto v : tileElement.pad08) { stream->WriteValue(v); } @@ -477,11 +477,11 @@ namespace OpenRCT2 tileElement.baseHeight = stream->ReadValue(); tileElement.clearanceHeight = stream->ReadValue(); tileElement.owner = stream->ReadValue(); - for (auto& v : tileElement.Pad05) + for (auto& v : tileElement.pad05) { v = stream->ReadValue(); } - for (auto& v : tileElement.Pad08) + for (auto& v : tileElement.pad08) { v = stream->ReadValue(); } diff --git a/src/openrct2/entity/Litter.cpp b/src/openrct2/entity/Litter.cpp index 3471d2cd8c..5bcd7be2ec 100644 --- a/src/openrct2/entity/Litter.cpp +++ b/src/openrct2/entity/Litter.cpp @@ -38,7 +38,7 @@ namespace OpenRCT2 if (!(pathBaseZ <= mapPos.z && pathTopZ >= mapPos.z)) continue; - return !TileElementIsUnderground(tileElement); + return !tileElementIsUnderground(tileElement); } while (!(tileElement++)->isLastForTile()); return false; } diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index e12643a193..68f6a650ca 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1614,7 +1614,7 @@ namespace OpenRCT2::RCT1 { // Add a default surface element, we always need at least one element per tile auto& dstElement = tileElements.emplace_back(); - dstElement.ClearAs(TileElementType::surface); + dstElement.clearAs(TileElementType::surface); dstElement.setLastForTile(true); } @@ -1635,7 +1635,7 @@ namespace OpenRCT2::RCT1 { const auto rct12type = src->getType(); const auto tileElementType = ToOpenRCT2TileElementType(rct12type); - dst->ClearAs(tileElementType); + dst->clearAs(tileElementType); dst->setDirection(src->getDirection()); // All saved in "flags" diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 9b23ef2310..cbccc12939 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1297,7 +1297,7 @@ namespace OpenRCT2::RCT2 { // Add a default surface element, we always need at least one element per tile auto& dstElement = tileElements.emplace_back(); - dstElement.ClearAs(TileElementType::surface); + dstElement.clearAs(TileElementType::surface); dstElement.setLastForTile(true); } @@ -1314,7 +1314,7 @@ namespace OpenRCT2::RCT2 void ImportTileElement(TileElement* dst, const RCT12TileElement* src, bool invisible) { const auto rct12Type = src->getType(); - dst->ClearAs(ToOpenRCT2TileElementType(rct12Type)); + dst->clearAs(ToOpenRCT2TileElementType(rct12Type)); dst->setDirection(src->getDirection()); dst->setBaseZ(src->baseHeight * kCoordsZStep); dst->setClearanceZ(src->clearanceHeight * kCoordsZStep); diff --git a/src/openrct2/ride/RideConstruction.cpp b/src/openrct2/ride/RideConstruction.cpp index bce2f95da4..d453ce8eda 100644 --- a/src/openrct2/ride/RideConstruction.cpp +++ b/src/openrct2/ride/RideConstruction.cpp @@ -1165,7 +1165,7 @@ namespace OpenRCT2 if (tileElement.element == nullptr) return false; - auto rideIndex = tileElement.element->GetRideIndex(); + auto rideIndex = tileElement.element->getRideIndex(); auto ride = GetRide(rideIndex); if (ride == nullptr) { diff --git a/src/openrct2/ride/TrackDesign.cpp b/src/openrct2/ride/TrackDesign.cpp index 1db5863ce4..c556027431 100644 --- a/src/openrct2/ride/TrackDesign.cpp +++ b/src/openrct2/ride/TrackDesign.cpp @@ -2170,7 +2170,7 @@ static void TrackDesignPreviewClearMap() for (int32_t i = 0; i < numTiles; i++) { auto* element = &tileElements.emplace_back(); - element->ClearAs(TileElementType::surface); + element->clearAs(TileElementType::surface); element->setLastForTile(true); element->asSurface()->SetSlope(kTileSlopeFlat); element->asSurface()->SetWaterHeight(0); diff --git a/src/openrct2/scripting/bindings/world/ScTile.cpp b/src/openrct2/scripting/bindings/world/ScTile.cpp index 4c4bbb08e5..f6bcf1f203 100644 --- a/src/openrct2/scripting/bindings/world/ScTile.cpp +++ b/src/openrct2/scripting/bindings/world/ScTile.cpp @@ -191,7 +191,7 @@ namespace OpenRCT2::Scripting || element->asLargeScenery()->GetEntry()->scrolling_mode == kScrollingModeNone || ScTileElement::GetOtherLargeSceneryElement(coords, element->asLargeScenery()) == nullptr) { - element->RemoveBannerEntry(); + element->removeBannerEntry(); } TileElementRemove(&first[index]); MapInvalidateTileFull(coords); diff --git a/src/openrct2/scripting/bindings/world/ScTileElement.cpp b/src/openrct2/scripting/bindings/world/ScTileElement.cpp index 85e94a2952..e1d12ddda3 100644 --- a/src/openrct2/scripting/bindings/world/ScTileElement.cpp +++ b/src/openrct2/scripting/bindings/world/ScTileElement.cpp @@ -1666,7 +1666,7 @@ namespace OpenRCT2::Scripting JSValue ScTileElement::bannerIndex_get(JSContext* ctx, JSValue thisValue) { auto data = gScTileElement.GetOpaque(thisValue); - BannerIndex idx = data->element->GetBannerIndex(); + BannerIndex idx = data->element->getBannerIndex(); if (idx == BannerIndex::GetNull()) return JS_NULL; else @@ -2249,7 +2249,7 @@ namespace OpenRCT2::Scripting JSValue ScTileElement::bannerText_get(JSContext* ctx, JSValue thisValue) { auto data = gScTileElement.GetOpaque(thisValue); - BannerIndex idx = data->element->GetBannerIndex(); + BannerIndex idx = data->element->getBannerIndex(); if (idx == BannerIndex::GetNull()) return JS_NULL; else @@ -2261,7 +2261,7 @@ namespace OpenRCT2::Scripting JS_THROW_IF_GAME_STATE_NOT_MUTABLE(); auto data = gScTileElement.GetOpaque(thisValue); auto element = data->element; - BannerIndex idx = element->GetBannerIndex(); + BannerIndex idx = element->getBannerIndex(); if (idx != BannerIndex::GetNull()) { auto banner = GetBanner(idx); @@ -2356,7 +2356,7 @@ namespace OpenRCT2::Scripting && GetOtherLargeSceneryElement(coords, element->asLargeScenery()) != nullptr) return; // remove banner entry (if one exists) - element->RemoveBannerEntry(); + element->removeBannerEntry(); } void ScTileElement::CreateBannerEntryIfNeeded(TileElement* element, CoordsXY& coords) @@ -2420,7 +2420,7 @@ namespace OpenRCT2::Scripting } } - element->SetBannerIndex(banner->id); + element->setBannerIndex(banner->id); } } diff --git a/src/openrct2/world/Banner.cpp b/src/openrct2/world/Banner.cpp index 2899c684f7..948e6815fc 100644 --- a/src/openrct2/world/Banner.cpp +++ b/src/openrct2/world/Banner.cpp @@ -149,7 +149,7 @@ TileElement* BannerGetTileElement(BannerIndex bannerIndex) { do { - if (tileElement->GetBannerIndex() == bannerIndex) + if (tileElement->getBannerIndex() == bannerIndex) { return tileElement; } diff --git a/src/openrct2/world/Map.cpp b/src/openrct2/world/Map.cpp index 1fdadd6d4a..7376906b2a 100644 --- a/src/openrct2/world/Map.cpp +++ b/src/openrct2/world/Map.cpp @@ -136,7 +136,7 @@ namespace OpenRCT2 static TileElement GetDefaultSurfaceElement() { TileElement el; - el.ClearAs(TileElementType::surface); + el.clearAs(TileElementType::surface); el.setLastForTile(true); el.baseHeight = 14; el.clearanceHeight = 14; @@ -1152,8 +1152,8 @@ namespace OpenRCT2 newTileElement->setOccupiedQuadrants(occupiedQuadrants); newTileElement->setClearanceZ(loc.z); newTileElement->owner = 0; - std::memset(&newTileElement->Pad05, 0, sizeof(newTileElement->Pad05)); - std::memset(&newTileElement->Pad08, 0, sizeof(newTileElement->Pad08)); + std::memset(&newTileElement->pad05, 0, sizeof(newTileElement->pad05)); + std::memset(&newTileElement->pad08, 0, sizeof(newTileElement->pad08)); newTileElement++; // Insert rest of map elements above insert height diff --git a/src/openrct2/world/TileInspector.cpp b/src/openrct2/world/TileInspector.cpp index f1842fa8fc..ec296db4ad 100644 --- a/src/openrct2/world/TileInspector.cpp +++ b/src/openrct2/world/TileInspector.cpp @@ -154,13 +154,13 @@ namespace OpenRCT2::TileInspector // Only delete the banner entry if there are no other parts of the large scenery to delete if (NumLargeScenerySequences(loc, largeScenery) == 1) { - tileElement->RemoveBannerEntry(); + tileElement->removeBannerEntry(); } } else { // Removes any potential banners from the entry - tileElement->RemoveBannerEntry(); + tileElement->removeBannerEntry(); } TileElementRemove(tileElement); @@ -313,7 +313,7 @@ namespace OpenRCT2::TileInspector if (isExecuting) { // Check if the element to be pasted has a banner - if (element.GetBannerIndex() != BannerIndex::GetNull()) + if (element.getBannerIndex() != BannerIndex::GetNull()) { // The element to be pasted has a banner - make a copy of it from the banner provided auto newBanner = CreateBanner(); @@ -337,7 +337,7 @@ namespace OpenRCT2::TileInspector } // Use the new banner index - element.SetBannerIndex(newBanner->id); + element.setBannerIndex(newBanner->id); } // The occupiedQuadrants will be automatically set when the element is copied over, so it's not necessary to set diff --git a/src/openrct2/world/Wall.cpp b/src/openrct2/world/Wall.cpp index bbc421e379..87b3a9c6f4 100644 --- a/src/openrct2/world/Wall.cpp +++ b/src/openrct2/world/Wall.cpp @@ -23,7 +23,7 @@ void WallRemoveAt(const CoordsXYRangedZ& wallPos) { for (auto wallElement = MapGetWallElementAt(wallPos); wallElement != nullptr; wallElement = MapGetWallElementAt(wallPos)) { - reinterpret_cast(wallElement)->RemoveBannerEntry(); + reinterpret_cast(wallElement)->removeBannerEntry(); MapInvalidateTileZoom1({ wallPos, wallElement->getBaseZ(), wallElement->getBaseZ() + 72 }); TileElementRemove(reinterpret_cast(wallElement)); } @@ -58,7 +58,7 @@ void WallRemoveIntersectingWalls(const CoordsXYRangedZ& wallPos, Direction direc if (direction != tileElement->getDirection()) continue; - tileElement->RemoveBannerEntry(); + tileElement->removeBannerEntry(); MapInvalidateTileZoom1({ wallPos, tileElement->getBaseZ(), tileElement->getBaseZ() + 72 }); TileElementRemove(tileElement); tileElement--; diff --git a/src/openrct2/world/tile_element/TileElement.cpp b/src/openrct2/world/tile_element/TileElement.cpp index e6a2a4aa27..8267016123 100644 --- a/src/openrct2/world/tile_element/TileElement.cpp +++ b/src/openrct2/world/tile_element/TileElement.cpp @@ -24,7 +24,7 @@ namespace OpenRCT2 { - BannerIndex TileElement::GetBannerIndex() const + BannerIndex TileElement::getBannerIndex() const { switch (getType()) { @@ -51,7 +51,7 @@ namespace OpenRCT2 } } - void TileElement::SetBannerIndex(BannerIndex bannerIndex) + void TileElement::setBannerIndex(BannerIndex bannerIndex) { switch (getType()) { @@ -70,9 +70,9 @@ namespace OpenRCT2 } } - void TileElement::RemoveBannerEntry() + void TileElement::removeBannerEntry() { - auto bannerIndex = GetBannerIndex(); + auto bannerIndex = getBannerIndex(); auto banner = GetBanner(bannerIndex); if (banner != nullptr) { @@ -82,7 +82,7 @@ namespace OpenRCT2 } } - RideId TileElement::GetRideIndex() const + RideId TileElement::getRideIndex() const { switch (getType()) { @@ -97,7 +97,7 @@ namespace OpenRCT2 } } - void TileElement::ClearAs(TileElementType newType) + void TileElement::clearAs(TileElementType newType) { type = 0; setType(newType); @@ -105,11 +105,11 @@ namespace OpenRCT2 baseHeight = kMinimumLandHeight; clearanceHeight = kMinimumLandHeight; owner = 0; - std::fill_n(Pad05, sizeof(Pad05), 0x00); - std::fill_n(Pad08, sizeof(Pad08), 0x00); + std::fill_n(pad05, sizeof(pad05), 0x00); + std::fill_n(pad08, sizeof(pad08), 0x00); } - bool TileElementIsUnderground(TileElement* tileElement) + bool tileElementIsUnderground(TileElement* tileElement) { do { diff --git a/src/openrct2/world/tile_element/TileElement.h b/src/openrct2/world/tile_element/TileElement.h index a0e2afc500..2b4c59419c 100644 --- a/src/openrct2/world/tile_element/TileElement.h +++ b/src/openrct2/world/tile_element/TileElement.h @@ -21,20 +21,20 @@ namespace OpenRCT2 */ struct TileElement : public TileElementBase { - uint8_t Pad05[3]; - uint8_t Pad08[8]; + uint8_t pad05[3]; + uint8_t pad08[8]; - void ClearAs(TileElementType newType); + void clearAs(TileElementType newType); - RideId GetRideIndex() const; + RideId getRideIndex() const; - void SetBannerIndex(BannerIndex newIndex); - void RemoveBannerEntry(); - BannerIndex GetBannerIndex() const; + void setBannerIndex(BannerIndex newIndex); + void removeBannerEntry(); + BannerIndex getBannerIndex() const; }; static_assert(sizeof(TileElement) == kTileElementSize); - bool TileElementIsUnderground(TileElement* tileElement); + bool tileElementIsUnderground(TileElement* tileElement); #pragma pack(pop) } // namespace OpenRCT2