1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-30 18:25:16 +01:00

Add private fields

This commit is contained in:
Michael Steenbeek
2018-09-26 12:02:41 +02:00
committed by Gymnasiast
parent 149ad183b8
commit 757d705e13
2 changed files with 8 additions and 4 deletions

View File

@@ -633,11 +633,11 @@ void fix_park_entrance_locations(void)
uint8_t EntranceElement::GetStationIndex() const
{
return (temp.index & MAP_ELEM_TRACK_SEQUENCE_STATION_INDEX_MASK) >> 4;
return (index & MAP_ELEM_TRACK_SEQUENCE_STATION_INDEX_MASK) >> 4;
}
void EntranceElement::SetStationIndex(uint8_t stationIndex)
{
temp.index &= ~MAP_ELEM_TRACK_SEQUENCE_STATION_INDEX_MASK;
temp.index |= (stationIndex << 4);
index &= ~MAP_ELEM_TRACK_SEQUENCE_STATION_INDEX_MASK;
index |= (stationIndex << 4);
}

View File

@@ -374,7 +374,11 @@ assert_struct_size(WallElement, 8);
struct EntranceElement : TileElementBase
{
rct_tile_element_entrance_properties temp;
private:
uint8_t entranceType; // 4
uint8_t index; // 5
uint8_t pathType; // 6
uint8_t rideIndex; // 7
public:
uint8_t GetStationIndex() const;