* Stop an Animation on a tile, if any. * @param packed The tile to check for animation on. */
| 250 | * @param packed The tile to check for animation on. |
| 251 | */ |
| 252 | void Animation_Stop_ByTile(uint16 packed) |
| 253 | { |
| 254 | Animation *animation = g_animations; |
| 255 | Tile *t = &g_map[packed]; |
| 256 | int i; |
| 257 | |
| 258 | if (!t->hasAnimation) return; |
| 259 | |
| 260 | for (i = 0; i < ANIMATION_MAX; i++, animation++) { |
| 261 | if (animation->commands == NULL) continue; |
| 262 | if (Tile_PackTile(animation->tile) != packed) continue; |
| 263 | |
| 264 | Animation_Func_Stop(animation, 0); |
| 265 | return; |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | /** |
| 270 | * Check all Animations if they need changing. |
no test coverage detected