mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 15:52:55 +01:00
Rename GetSurfaceStyleObject to GetSurfaceObject
This commit is contained in:
@@ -1059,7 +1059,7 @@ private:
|
||||
return 0;
|
||||
|
||||
uint16_t colour = MapColour(PALETTE_INDEX_0);
|
||||
const auto* surfaceObject = surfaceElement->GetSurfaceStyleObject();
|
||||
const auto* surfaceObject = surfaceElement->GetSurfaceObject();
|
||||
if (surfaceObject != nullptr)
|
||||
colour = MapColour2(surfaceObject->MapColours[0], surfaceObject->MapColours[1]);
|
||||
|
||||
|
||||
@@ -1055,7 +1055,7 @@ public:
|
||||
// Details
|
||||
// Terrain texture name
|
||||
StringId terrainNameId = STR_EMPTY;
|
||||
auto surfaceStyle = tileElement->AsSurface()->GetSurfaceStyleObject();
|
||||
auto surfaceStyle = tileElement->AsSurface()->GetSurfaceObject();
|
||||
if (surfaceStyle != nullptr)
|
||||
terrainNameId = surfaceStyle->NameStringId;
|
||||
auto ft = Formatter();
|
||||
|
||||
@@ -998,7 +998,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
|
||||
const CornerHeight& cornerHeights = corner_heights[surfaceShape];
|
||||
const TileElement* elementPtr = &reinterpret_cast<const TileElement&>(tileElement);
|
||||
|
||||
const auto* surfaceObject = tileElement.GetSurfaceStyleObject();
|
||||
const auto* surfaceObject = tileElement.GetSurfaceObject();
|
||||
const auto* edgeObject = tileElement.GetEdgeObject();
|
||||
|
||||
TileDescriptor selfDescriptor = {
|
||||
@@ -1042,7 +1042,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
|
||||
|
||||
descriptor.tile_coords = TileCoordsXY{ position };
|
||||
descriptor.tile_element = reinterpret_cast<TileElement*>(surfaceElement);
|
||||
descriptor.surfaceObject = surfaceElement->GetSurfaceStyleObject();
|
||||
descriptor.surfaceObject = surfaceElement->GetSurfaceObject();
|
||||
descriptor.slope = surfaceSlope;
|
||||
descriptor.corner_heights.top = baseHeight + ch.top;
|
||||
descriptor.corner_heights.right = baseHeight + ch.right;
|
||||
|
||||
@@ -22,7 +22,7 @@ ObjectEntryIndex SurfaceElement::GetSurfaceObjectIndex() const
|
||||
return SurfaceStyle;
|
||||
}
|
||||
|
||||
TerrainSurfaceObject* SurfaceElement::GetSurfaceStyleObject() const
|
||||
TerrainSurfaceObject* SurfaceElement::GetSurfaceObject() const
|
||||
{
|
||||
auto& objManager = OpenRCT2::GetContext()->GetObjectManager();
|
||||
return static_cast<TerrainSurfaceObject*>(objManager.GetLoadedObject(ObjectType::TerrainSurface, GetSurfaceObjectIndex()));
|
||||
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
void SetSlope(uint8_t newSlope);
|
||||
|
||||
ObjectEntryIndex GetSurfaceObjectIndex() const;
|
||||
TerrainSurfaceObject* GetSurfaceStyleObject() const;
|
||||
TerrainSurfaceObject* GetSurfaceObject() const;
|
||||
void SetSurfaceObjectIndex(ObjectEntryIndex newStyle);
|
||||
|
||||
ObjectEntryIndex GetEdgeObjectIndex() const;
|
||||
|
||||
Reference in New Issue
Block a user