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