* Call the tile loop animation trigger for houses, if enabled. * @param tile House tile * @param sync Whether to call the synchronized or the unsynchronized trigger. * @param random_bits Shared random bits for the synchronized trigger. */
| 610 | * @param random_bits Shared random bits for the synchronized trigger. |
| 611 | */ |
| 612 | static void TriggerHouseAnimation_TileLoop(TileIndex tile, bool sync, uint16_t random_bits) |
| 613 | { |
| 614 | const HouseSpec *hs = HouseSpec::Get(GetHouseType(tile)); |
| 615 | |
| 616 | /* Check whether the matching trigger is enabled */ |
| 617 | if (hs->callback_mask.Test(HouseCallbackMask::AnimationTriggerTileLoop) && |
| 618 | hs->extra_flags.Test(HouseExtraFlag::SynchronisedCallback1B) == sync) { |
| 619 | uint32_t param = sync ? (GB(Random(), 0, 16) | random_bits << 16) : Random(); |
| 620 | HouseAnimationBase::ChangeAnimationFrame(CBID_HOUSE_ANIMATION_TRIGGER_TILE_LOOP, hs, Town::GetByTile(tile), tile, param, 0); |
| 621 | } |
| 622 | } |
| 623 | |
| 624 | bool NewHouseTileLoop(TileIndex tile) |
| 625 | { |
no test coverage detected