1
0
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:
Ted John
2021-12-03 19:55:25 +00:00
parent b270688635
commit f8431d2b2e
6 changed files with 243 additions and 229 deletions

View File

@@ -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;
}