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

Function AnimateOilWell

src/industry_cmd.cpp:644–657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

642}
643
644static void AnimateOilWell(TileIndex tile, IndustryGfx gfx)
645{
646 bool b = Chance16(1, 7);
647 uint8_t m = GetAnimationFrame(tile) + 1;
648 if (m == 4 && (m = 0, ++gfx) == GFX_OILWELL_ANIMATED_3 + 1 && (gfx = GFX_OILWELL_ANIMATED_1, b)) {
649 SetIndustryGfx(tile, GFX_OILWELL_NOT_ANIMATED);
650 SetIndustryConstructionStage(tile, 3);
651 DeleteAnimatedTile(tile);
652 } else {
653 SetAnimationFrame(tile, m);
654 SetIndustryGfx(tile, gfx);
655 }
656 MarkTileDirtyByTile(tile);
657}
658
659static void AnimateMineTower(TileIndex tile)
660{

Callers 1

AnimateTile_IndustryFunction · 0.85

Calls 7

Chance16Function · 0.85
GetAnimationFrameFunction · 0.85
SetIndustryGfxFunction · 0.85
DeleteAnimatedTileFunction · 0.85
SetAnimationFrameFunction · 0.85
MarkTileDirtyByTileFunction · 0.70

Tested by

no test coverage detected