mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-19 21:13:05 +01:00
Refactor Entrance painting to use ImageId
This commit is contained in:
@@ -65,3 +65,20 @@ void EntranceObject::ReadJson(IReadObjectContext* context, json_t& root)
|
||||
|
||||
PopulateTablesFromJson(context, root);
|
||||
}
|
||||
|
||||
ImageIndex EntranceObject::GetImage(uint8_t sequence, Direction direction) const
|
||||
{
|
||||
if (sequence > 2)
|
||||
return ImageIndexUndefined;
|
||||
return _legacyType.image_id + ((direction & 3) * 3) + sequence;
|
||||
}
|
||||
|
||||
uint8_t EntranceObject::GetScrollingMode() const
|
||||
{
|
||||
return _legacyType.scrolling_mode;
|
||||
}
|
||||
|
||||
uint8_t EntranceObject::GetTextHeight() const
|
||||
{
|
||||
return _legacyType.text_height;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user