0x00459D43
| 645 | |
| 646 | // 0x00459D43 |
| 647 | void Industry::createMapAnimations() |
| 648 | { |
| 649 | for (size_t i = 0; i < numTiles; i++) |
| 650 | { |
| 651 | auto& tilePos = tiles[i]; |
| 652 | auto baseZ = (tilePos.z & ~Location::null) / 4; |
| 653 | auto tile = TileManager::get(tilePos); |
| 654 | |
| 655 | for (auto& el : tile) |
| 656 | { |
| 657 | auto* industryEl = el.as<IndustryElement>(); |
| 658 | if (industryEl == nullptr) |
| 659 | { |
| 660 | continue; |
| 661 | } |
| 662 | |
| 663 | if (industryEl->baseZ() != baseZ) |
| 664 | { |
| 665 | continue; |
| 666 | } |
| 667 | |
| 668 | auto tileIndustry = industryEl->industry(); |
| 669 | if (tileIndustry != nullptr) |
| 670 | { |
| 671 | const auto* industryObject = tileIndustry->getObject(); |
| 672 | if (industryObject != nullptr) |
| 673 | { |
| 674 | auto animOffsets = getBuildingTileOffsets(industryObject->buildingSizeFlags & (1U << industryEl->buildingType())); |
| 675 | for (auto animOffset : animOffsets) |
| 676 | { |
| 677 | AnimationManager::createAnimation(3, animOffset.pos + tilePos, baseZ); |
| 678 | } |
| 679 | } |
| 680 | } |
| 681 | } |
| 682 | } |
| 683 | } |
| 684 | |
| 685 | // 0x004574F7 |
| 686 | void Industry::updateProducedCargoStats() |
no test coverage detected