# animated_tile.cpp File Reference

Everything related to animated tiles. More...

`#include "stdafx.h"`
`#include "core/alloc_func.hpp"`
`#include "functions.h"`

Go to the source code of this file.

## Functions
void | DeleteAnimatedTile (TileIndex tile)
| Removes the given tile from the animated tile table.
void | AddAnimatedTile (TileIndex tile)
| Add the given tile to the animated tile table (if it does not exist on that table yet).
void | AnimateAnimatedTiles ()
| Animate all tiles in the animated tile list, i.e. call AnimateTile on them.
void | InitializeAnimatedTiles ()
| Initialize all animated tile variables to some known begin point.
## Variables
TileIndex * | _animated_tile_list = NULL
| The table/list with animated tiles.
uint | _animated_tile_count = 0
| The number of animated tiles in the current state.
uint | _animated_tile_allocated = 0
| The number of slots for animated tiles allocated currently.

## Detailed Description

Everything related to animated tiles.

Definition in file animated_tile.cpp.

## Function Documentation

void AddAnimatedTile | ( | TileIndex | tile | ) |

Add the given tile to the animated tile table (if it does not exist on that table yet).

Also increases the size of the table if necessary.

Parameters:

  | tile | the tile to make animated

Definition at line 41 of file animated_tile.cpp.

References _animated_tile_allocated, _animated_tile_count, _animated_tile_list, and MarkTileDirtyByTile().

Referenced by ClearMakeHouseTile(), and TileLoop_Town().

void DeleteAnimatedTile | ( | TileIndex | tile | ) |

Removes the given tile from the animated tile table.

Parameters:

  | tile | the tile to remove

Definition at line 20 of file animated_tile.cpp.

References _animated_tile_count, _animated_tile_list, and MarkTileDirtyByTile().

Referenced by AnimateTile_Town(), CmdBuildRailroadStation(), and DoClearTownHouseHelper().

## Variable Documentation

uint _animated_tile_allocated = 0

The number of slots for animated tiles allocated currently.

Definition at line 14 of file animated_tile.cpp.

Referenced by AddAnimatedTile(), InitializeAnimatedTiles(), and Load_ANIT().

uint _animated_tile_count = 0

The number of animated tiles in the current state.

Definition at line 12 of file animated_tile.cpp.

Referenced by AddAnimatedTile(), AnimateAnimatedTiles(), DeleteAnimatedTile(), InitializeAnimatedTiles(), Load_ANIT(), and Save_ANIT().

TileIndex* _animated_tile_list = NULL

The table/list with animated tiles.

Definition at line 10 of file animated_tile.cpp.

Referenced by AddAnimatedTile(), AnimateAnimatedTiles(), DeleteAnimatedTile(), InitializeAnimatedTiles(), Load_ANIT(), and Save_ANIT().