Cache animated tile speed, use btree map for animated tiles

This commit is contained in:
Jonathan G Rennison
2020-11-24 19:02:38 +00:00
parent 72a7ae25e8
commit 2ad446369d
23 changed files with 267 additions and 56 deletions

View File

@@ -300,6 +300,14 @@ bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigge
return ret;
}
uint8 GetNewIndustryTileAnimationSpeed(TileIndex tile)
{
const IndustryTileSpec *itspec = GetIndustryTileSpec(GetIndustryGfx(tile));
if (itspec == nullptr) return 0;
return IndustryAnimationBase::GetAnimationSpeed(itspec);
}
/**
* Trigger random triggers for an industry tile and reseed its random bits.
* @param tile Industry tile to trigger.