1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Define RCT12TileElement fields as private

This commit is contained in:
Michael Steenbeek
2018-11-05 10:50:16 +01:00
parent d4801e139d
commit 00ba0c1f51

View File

@@ -170,11 +170,12 @@ struct RCT12TileElement : public RCT12TileElementBase
assert_struct_size(RCT12TileElement, 8);
struct RCT12SurfaceElement : RCT12TileElementBase
{
private:
uint8_t slope; // 4 0xE0 Edge Style, 0x1F Slope
uint8_t terrain; // 5 0xE0 Terrain Style, 0x1F Water height
uint8_t grass_length; // 6
uint8_t ownership; // 7
public:
uint8_t GetSlope() const;
uint32_t GetSurfaceStyle() const;
uint32_t GetEdgeStyle() const;
@@ -187,6 +188,7 @@ struct RCT12SurfaceElement : RCT12TileElementBase
assert_struct_size(RCT12SurfaceElement, 8);
struct RCT12PathElement : RCT12TileElementBase
{
private:
uint8_t entryIndex; // 4, 0xF0 Path type, 0x08 Ride sign, 0x04 Set when path is sloped, 0x03 Rotation
uint8_t additions; // 5, 0bGSSSAAAA: G = Ghost, S = station index, A = addition (0 means no addition)
uint8_t edges; // 6
@@ -196,6 +198,7 @@ struct RCT12PathElement : RCT12TileElementBase
uint8_t rideIndex;
};
public:
uint8_t GetEntryIndex() const;
uint8_t GetQueueBannerDirection() const;
bool IsSloped() const;
@@ -218,6 +221,7 @@ struct RCT12PathElement : RCT12TileElementBase
assert_struct_size(RCT12PathElement, 8);
struct RCT12TrackElement : RCT12TileElementBase
{
private:
uint8_t trackType; // 4
union
{
@@ -240,7 +244,7 @@ struct RCT12TrackElement : RCT12TileElementBase
uint16_t mazeEntry; // 5
};
uint8_t rideIndex; // 7
public:
uint8_t GetTrackType() const;
uint8_t GetSequenceIndex() const;
uint8_t GetRideIndex() const;
@@ -264,11 +268,12 @@ struct RCT12TrackElement : RCT12TileElementBase
assert_struct_size(RCT12TrackElement, 8);
struct RCT12SmallSceneryElement : RCT12TileElementBase
{
private:
uint8_t entryIndex; // 4
uint8_t age; // 5
uint8_t colour_1; // 6
uint8_t colour_2; // 7
public:
uint8_t GetEntryIndex() const;
uint8_t GetAge() const;
uint8_t GetSceneryQuadrant() const;
@@ -279,9 +284,10 @@ struct RCT12SmallSceneryElement : RCT12TileElementBase
assert_struct_size(RCT12SmallSceneryElement, 8);
struct RCT12LargeSceneryElement : RCT12TileElementBase
{
private:
uint16_t entryIndex; // 4
uint8_t colour[2]; // 6
public:
uint32_t GetEntryIndex() const;
uint16_t GetSequenceIndex() const;
colour_t GetPrimaryColour() const;
@@ -291,6 +297,7 @@ struct RCT12LargeSceneryElement : RCT12TileElementBase
assert_struct_size(RCT12LargeSceneryElement, 8);
struct RCT12WallElement : RCT12TileElementBase
{
private:
uint8_t entryIndex; // 4
union
{
@@ -299,7 +306,7 @@ struct RCT12WallElement : RCT12TileElementBase
};
uint8_t colour_1; // 6 0b_2221_1111 2 = colour_2 (uses flags for rest of colour2), 1 = colour_1
uint8_t animation; // 7 0b_dfff_ft00 d = direction, f = frame num, t = across track flag (not used)
public:
uint8_t GetEntryIndex() const;
uint8_t GetSlope() const;
colour_t GetPrimaryColour() const;
@@ -315,11 +322,12 @@ struct RCT12WallElement : RCT12TileElementBase
assert_struct_size(RCT12WallElement, 8);
struct RCT12EntranceElement : RCT12TileElementBase
{
private:
uint8_t entranceType; // 4
uint8_t index; // 5. 0bUSSS????, S = station index.
uint8_t pathType; // 6
uint8_t rideIndex; // 7
public:
uint8_t GetEntranceType() const;
uint8_t GetRideIndex() const;
uint8_t GetStationIndex() const;
@@ -329,11 +337,15 @@ struct RCT12EntranceElement : RCT12TileElementBase
assert_struct_size(RCT12EntranceElement, 8);
struct RCT12BannerElement : RCT12TileElementBase
{
private:
BannerIndex index; // 4
uint8_t position; // 5
uint8_t flags; // 6
uint8_t unused; // 7
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
uint8_t unused; // 7
#pragma clang diagnostic pop
public:
BannerIndex GetIndex() const;
uint8_t GetPosition() const;
uint8_t GetAllowedEdges() const;