0x0042E4D4
| 193 | |
| 194 | // 0x0042E4D4 |
| 195 | bool updateBuildingAnimation1(const Animation& anim) |
| 196 | { |
| 197 | auto tile = TileManager::get(anim.pos); |
| 198 | BuildingElement* elBuilding = nullptr; |
| 199 | for (auto& el : tile) |
| 200 | { |
| 201 | elBuilding = el.as<BuildingElement>(); |
| 202 | if (elBuilding == nullptr) |
| 203 | { |
| 204 | continue; |
| 205 | } |
| 206 | if (elBuilding->baseZ() != anim.baseZ) |
| 207 | { |
| 208 | continue; |
| 209 | } |
| 210 | break; |
| 211 | } |
| 212 | |
| 213 | if (elBuilding == nullptr) |
| 214 | { |
| 215 | return true; |
| 216 | } |
| 217 | // Animations are controlled from index 0 |
| 218 | if (elBuilding->sequenceIndex() != 0) |
| 219 | { |
| 220 | return true; |
| 221 | } |
| 222 | |
| 223 | auto* buildingObj = elBuilding->getObject(); |
| 224 | if (buildingObj->numElevatorSequences == 0) |
| 225 | { |
| 226 | return true; |
| 227 | } |
| 228 | |
| 229 | if (ScenarioManager::getScenarioTicks() & 0b1) |
| 230 | { |
| 231 | return false; |
| 232 | } |
| 233 | |
| 234 | bool isMultiTile = buildingObj->hasFlags(BuildingObjectFlags::largeTile); |
| 235 | |
| 236 | applyToMultiTile(*elBuilding, anim.pos, isMultiTile, [](World::BuildingElement& elBuilding, const World::Pos2& pos) { |
| 237 | Ui::ViewportManager::invalidate(pos, elBuilding.baseHeight(), elBuilding.clearHeight(), ZoomLevel::half); |
| 238 | }); |
| 239 | return false; |
| 240 | } |
| 241 | |
| 242 | // 0x0042E646 |
| 243 | bool updateBuildingAnimation2(const Animation& anim) |
no test coverage detected