mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Move door state functions to struct methods
This commit is contained in:
@@ -2330,12 +2330,12 @@ void TrackElement::SetTrackType(uint8_t newType)
|
||||
trackType = newType;
|
||||
}
|
||||
|
||||
uint8_t track_element_get_door_a_state(const rct_tile_element* tileElement)
|
||||
uint8_t TrackElement::GetDoorAState() const
|
||||
{
|
||||
return (tileElement->properties.track.colour & TRACK_ELEMENT_DOOR_A_MASK) >> 2;
|
||||
return (colour & TRACK_ELEMENT_DOOR_A_MASK) >> 2;
|
||||
}
|
||||
|
||||
uint8_t track_element_get_door_b_state(const rct_tile_element* tileElement)
|
||||
uint8_t TrackElement::GetDoorBState() const
|
||||
{
|
||||
return (tileElement->properties.track.colour & TRACK_ELEMENT_DOOR_B_MASK) >> 5;
|
||||
return (colour & TRACK_ELEMENT_DOOR_B_MASK) >> 5;
|
||||
}
|
||||
|
||||
@@ -259,6 +259,11 @@ public:
|
||||
|
||||
uint8_t GetSequenceIndex() const;
|
||||
void SetSequenceIndex(uint8_t newSequenceIndex);
|
||||
|
||||
// Used in RCT1, will be reintroduced at some point.
|
||||
// (See https://github.com/OpenRCT2/OpenRCT2/issues/7059)
|
||||
uint8_t GetDoorAState() const;
|
||||
uint8_t GetDoorBState() const;
|
||||
};
|
||||
assert_struct_size(TrackElement, 8);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user