mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-04 13:42:55 +01:00
Make room for 255 station indexes in Entrance Element
This commit is contained in:
@@ -216,13 +216,12 @@ void fix_park_entrance_locations(void)
|
||||
|
||||
uint8_t EntranceElement::GetStationIndex() const
|
||||
{
|
||||
return (index & MAP_ELEM_TRACK_SEQUENCE_STATION_INDEX_MASK) >> 4;
|
||||
return StationIndex;
|
||||
}
|
||||
|
||||
void EntranceElement::SetStationIndex(uint8_t stationIndex)
|
||||
void EntranceElement::SetStationIndex(uint8_t newStationIndex)
|
||||
{
|
||||
index &= ~MAP_ELEM_TRACK_SEQUENCE_STATION_INDEX_MASK;
|
||||
index |= (stationIndex << 4);
|
||||
StationIndex = newStationIndex;
|
||||
}
|
||||
|
||||
uint8_t EntranceElement::GetEntranceType() const
|
||||
@@ -235,25 +234,25 @@ void EntranceElement::SetEntranceType(uint8_t newType)
|
||||
entranceType = newType;
|
||||
}
|
||||
|
||||
ride_id_t EntranceElement::GetRideIndex() const
|
||||
ride_idnew_t EntranceElement::GetRideIndex() const
|
||||
{
|
||||
return rideIndex;
|
||||
}
|
||||
|
||||
void EntranceElement::SetRideIndex(ride_id_t newRideIndex)
|
||||
void EntranceElement::SetRideIndex(ride_idnew_t newRideIndex)
|
||||
{
|
||||
rideIndex = newRideIndex;
|
||||
}
|
||||
|
||||
uint8_t EntranceElement::GetSequenceIndex() const
|
||||
{
|
||||
return index & 0xF;
|
||||
return SequenceIndex & 0xF;
|
||||
}
|
||||
|
||||
void EntranceElement::SetSequenceIndex(uint8_t newSequenceIndex)
|
||||
{
|
||||
index &= ~0xF;
|
||||
index |= (newSequenceIndex & 0xF);
|
||||
SequenceIndex &= ~0xF;
|
||||
SequenceIndex |= (newSequenceIndex & 0xF);
|
||||
}
|
||||
|
||||
uint8_t EntranceElement::GetPathType() const
|
||||
|
||||
@@ -465,24 +465,25 @@ assert_struct_size(WallElement, 16);
|
||||
struct EntranceElement : TileElementBase
|
||||
{
|
||||
private:
|
||||
uint8_t entranceType; // 4
|
||||
uint8_t index; // 5. 0bUSSS????, S = station index.
|
||||
uint8_t pathType; // 6
|
||||
ride_id_t rideIndex; // 7
|
||||
uint8_t entranceType; // 4
|
||||
uint8_t SequenceIndex; // 5. Only uses the lower nibble.
|
||||
uint8_t StationIndex; // 6
|
||||
uint8_t pathType; // 7
|
||||
ride_idnew_t rideIndex; // 8
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-private-field"
|
||||
uint8_t pad_08[8];
|
||||
uint8_t pad_0A[6];
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
public:
|
||||
uint8_t GetEntranceType() const;
|
||||
void SetEntranceType(uint8_t newType);
|
||||
|
||||
ride_id_t GetRideIndex() const;
|
||||
void SetRideIndex(ride_id_t newRideIndex);
|
||||
ride_idnew_t GetRideIndex() const;
|
||||
void SetRideIndex(ride_idnew_t newRideIndex);
|
||||
|
||||
uint8_t GetStationIndex() const;
|
||||
void SetStationIndex(uint8_t stationIndex);
|
||||
void SetStationIndex(uint8_t newStationIndex);
|
||||
|
||||
uint8_t GetSequenceIndex() const;
|
||||
void SetSequenceIndex(uint8_t newSequenceIndex);
|
||||
|
||||
Reference in New Issue
Block a user