* Stop with this Animation. * @param animation The Animation to stop. * @param parameter Not used. */
| 38 | * @param parameter Not used. |
| 39 | */ |
| 40 | static 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 | /** |
no test coverage detected