0x0048950F
| 52 | |
| 53 | // 0x0048950F |
| 54 | bool updateSignalAnimation(const Animation& anim) |
| 55 | { |
| 56 | AnimResult result{}; |
| 57 | auto tile = TileManager::get(anim.pos); |
| 58 | // It's possible to have multiple signal elements on the same tile/baseZ ??? |
| 59 | // Unsure why |
| 60 | for (auto& el : tile) |
| 61 | { |
| 62 | auto* elSignal = el.as<SignalElement>(); |
| 63 | if (elSignal == nullptr) |
| 64 | { |
| 65 | continue; |
| 66 | } |
| 67 | if (elSignal->baseZ() != anim.baseZ) |
| 68 | { |
| 69 | continue; |
| 70 | } |
| 71 | result |= updateSignalAnimationSide(elSignal->getLeft()); |
| 72 | result |= updateSignalAnimationSide(elSignal->getRight()); |
| 73 | } |
| 74 | |
| 75 | if (result.shouldInvalidate) |
| 76 | { |
| 77 | Ui::ViewportManager::invalidate(anim.pos, anim.baseZ * kSmallZStep, anim.baseZ * kSmallZStep + 32, ZoomLevel::half); |
| 78 | } |
| 79 | |
| 80 | return !result.hasAnimation; |
| 81 | } |
| 82 | } |
no test coverage detected