mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 08:12:53 +01:00
Use ObjectEntryIndex for edge object index
This commit is contained in:
@@ -28,9 +28,9 @@ TerrainSurfaceObject* SurfaceElement::GetSurfaceStyleObject() const
|
||||
return static_cast<TerrainSurfaceObject*>(objManager.GetLoadedObject(ObjectType::TerrainSurface, GetSurfaceObjectIndex()));
|
||||
}
|
||||
|
||||
uint32_t SurfaceElement::GetEdgeStyle() const
|
||||
ObjectEntryIndex SurfaceElement::GetEdgeStyle() const
|
||||
{
|
||||
return EdgeStyle;
|
||||
return EdgeObjectIndex;
|
||||
}
|
||||
|
||||
TerrainEdgeObject* SurfaceElement::GetEdgeStyleObject() const
|
||||
@@ -44,9 +44,9 @@ void SurfaceElement::SetSurfaceObjectIndex(ObjectEntryIndex newStyle)
|
||||
SurfaceStyle = static_cast<ObjectEntryIndex>(newStyle);
|
||||
}
|
||||
|
||||
void SurfaceElement::SetEdgeStyle(uint32_t newStyle)
|
||||
void SurfaceElement::SetEdgeStyle(ObjectEntryIndex newIndex)
|
||||
{
|
||||
EdgeStyle = newStyle;
|
||||
EdgeObjectIndex = static_cast<ObjectEntryIndex>(newIndex);
|
||||
}
|
||||
|
||||
int32_t SurfaceElement::GetWaterHeight() const
|
||||
|
||||
@@ -195,7 +195,7 @@ private:
|
||||
uint8_t GrassLength;
|
||||
uint8_t Ownership;
|
||||
uint8_t SurfaceStyle;
|
||||
uint8_t EdgeStyle;
|
||||
uint8_t EdgeObjectIndex;
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-private-field"
|
||||
uint8_t Pad0B[5];
|
||||
@@ -209,9 +209,9 @@ public:
|
||||
TerrainSurfaceObject* GetSurfaceStyleObject() const;
|
||||
void SetSurfaceObjectIndex(ObjectEntryIndex newStyle);
|
||||
|
||||
uint32_t GetEdgeStyle() const;
|
||||
ObjectEntryIndex GetEdgeStyle() const;
|
||||
TerrainEdgeObject* GetEdgeStyleObject() const;
|
||||
void SetEdgeStyle(uint32_t newStyle);
|
||||
void SetEdgeStyle(ObjectEntryIndex newStyle);
|
||||
|
||||
bool CanGrassGrow() const;
|
||||
uint8_t GetGrassLength() const;
|
||||
|
||||
Reference in New Issue
Block a user