MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / AnimateTile_Industry

Function AnimateTile_Industry

src/industry_cmd.cpp:691–740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689}
690
691static void AnimateTile_Industry(TileIndex tile)
692{
693 IndustryGfx gfx = GetIndustryGfx(tile);
694
695 if (GetIndustryTileSpec(gfx)->animation.status != AnimationStatus::NoAnimation) {
696 AnimateNewIndustryTile(tile);
697 return;
698 }
699
700 switch (gfx) {
701 case GFX_SUGAR_MINE_SIEVE:
702 if ((TimerGameTick::counter & 1) == 0) AnimateSugarSieve(tile);
703 break;
704
705 case GFX_TOFFEE_QUARRY:
706 if ((TimerGameTick::counter & 3) == 0) AnimateToffeeQuarry(tile);
707 break;
708
709 case GFX_BUBBLE_CATCHER:
710 if ((TimerGameTick::counter & 1) == 0) AnimateBubbleCatcher(tile);
711 break;
712
713 case GFX_POWERPLANT_SPARKS:
714 if ((TimerGameTick::counter & 3) == 0) AnimatePowerPlantSparks(tile);
715 break;
716
717 case GFX_TOY_FACTORY:
718 if ((TimerGameTick::counter & 1) == 0) AnimateToyFactory(tile);
719 break;
720
721 case GFX_PLASTIC_FOUNTAIN_ANIMATED_1: case GFX_PLASTIC_FOUNTAIN_ANIMATED_2:
722 case GFX_PLASTIC_FOUNTAIN_ANIMATED_3: case GFX_PLASTIC_FOUNTAIN_ANIMATED_4:
723 case GFX_PLASTIC_FOUNTAIN_ANIMATED_5: case GFX_PLASTIC_FOUNTAIN_ANIMATED_6:
724 case GFX_PLASTIC_FOUNTAIN_ANIMATED_7: case GFX_PLASTIC_FOUNTAIN_ANIMATED_8:
725 if ((TimerGameTick::counter & 3) == 0) AnimatePlasticFountain(tile, gfx);
726 break;
727
728 case GFX_OILWELL_ANIMATED_1:
729 case GFX_OILWELL_ANIMATED_2:
730 case GFX_OILWELL_ANIMATED_3:
731 if ((TimerGameTick::counter & 7) == 0) AnimateOilWell(tile, gfx);
732 break;
733
734 case GFX_COAL_MINE_TOWER_ANIMATED:
735 case GFX_COPPER_MINE_TOWER_ANIMATED:
736 case GFX_GOLD_MINE_TOWER_ANIMATED:
737 AnimateMineTower(tile);
738 break;
739 }
740}
741
742static void CreateChimneySmoke(TileIndex tile)
743{

Callers

nothing calls this directly

Calls 11

GetIndustryGfxFunction · 0.85
GetIndustryTileSpecFunction · 0.85
AnimateNewIndustryTileFunction · 0.85
AnimateSugarSieveFunction · 0.85
AnimateToffeeQuarryFunction · 0.85
AnimateBubbleCatcherFunction · 0.85
AnimatePowerPlantSparksFunction · 0.85
AnimateToyFactoryFunction · 0.85
AnimatePlasticFountainFunction · 0.85
AnimateOilWellFunction · 0.85
AnimateMineTowerFunction · 0.85

Tested by

no test coverage detected