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

Function Animation_Func_Stop

src/animation.c:40–65  ·  view source on GitHub ↗

* Stop with this Animation. * @param animation The Animation to stop. * @param parameter Not used. */

Source from the content-addressed store, hash-verified

38 * @param parameter Not used.
39 */
40static void Animation_Func_Stop(Animation *animation, int16 parameter)
41{
42 const uint16 *layout = g_table_structure_layoutTiles[animation->tileLayout];
43 uint16 layoutTileCount = g_table_structure_layoutTileCount[animation->tileLayout];
44 uint16 packed = Tile_PackTile(animation->tile);
45 int i;
46 VARIABLE_NOT_USED(parameter);
47
48 g_map[packed].hasAnimation = false;
49 animation->commands = NULL;
50
51 for (i = 0; i < layoutTileCount; i++) {
52 uint16 position = packed + (*layout++);
53 Tile *t = &g_map[position];
54
55 if (animation->tileLayout != 0) {
56 t->groundTileID = g_mapTileID[position];
57 }
58
59 if (Map_IsPositionUnveiled(position)) {
60 t->overlayTileID = 0;
61 }
62
63 Map_Update(position, 0, false);
64 }
65}
66
67
68/**

Callers 2

Animation_Stop_ByTileFunction · 0.85
Animation_TickFunction · 0.85

Calls 2

Map_IsPositionUnveiledFunction · 0.85
Map_UpdateFunction · 0.85

Tested by

no test coverage detected