MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Animation_Stop_ByTile

Function Animation_Stop_ByTile

src/animation.c:252–267  ·  view source on GitHub ↗

* Stop an Animation on a tile, if any. * @param packed The tile to check for animation on. */

Source from the content-addressed store, hash-verified

250 * @param packed The tile to check for animation on.
251 */
252void 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.

Callers 3

Structure_RemoveFunction · 0.85
Animation_StartFunction · 0.85

Calls 1

Animation_Func_StopFunction · 0.85

Tested by

no test coverage detected