OpenTTD Source: src/animated_tile_func.h File Reference

OpenTTD Source 15.3

Functions
animated_tile_func.h File Reference

Tile animation! More...

`#include "tile_type.h"`

Go to the source code of this file.

## Functions
void | AddAnimatedTile (TileIndex tile, bool mark_dirty=true)
| Add the given tile to the animated tile table (if it does not exist yet).
void | DeleteAnimatedTile (TileIndex tile, bool immediate=false)
| Stops animation on the given tile.
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.

## Detailed Description

Tile animation!

Definition in file animated_tile_func.h.

## Function Documentation

## ◆ AddAnimatedTile()

void AddAnimatedTile | ( | TileIndex | tile,
|  | bool | mark_dirty
| ) |  |

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

Parameters

  tile | the tile to make animated
  mark_dirty | whether to also mark the tile dirty.

Definition at line 56 of file animated_tile.cpp.

References _animated_tiles, Animated, GetAnimatedTileState(), MarkTileDirtyByTile(), None, and SetAnimatedTileState().

Referenced by AnimationBase< Tbase, Tspec, Tobj, Textra, GetCallback, Tframehelper >::ChangeAnimationFrame(), ClearMakeHouseTile(), CmdBuildAirport(), DoCreateNewIndustry(), and TileLoop_Town().

## ◆ AnimateAnimatedTiles()

void AnimateAnimatedTiles | ( |  | ) |

Animate all tiles in the animated tile list, i.e. call AnimateTile on them.

Definition at line 75 of file animated_tile.cpp.

References _animated_tiles, Animated, GetAnimatedTileState(), None, PFE_GL_LANDSCAPE, and SetAnimatedTileState().

Referenced by StateGameLoop().

## ◆ DeleteAnimatedTile()

void DeleteAnimatedTile | ( | TileIndex | tile,
|  | bool | immediate
| ) |  |

Stops animation on the given tile.

Parameters

  tile | the tile to remove
  immediate | immediately delete the tile from the animated tile list instead of waiting for the next tick.

Definition at line 27 of file animated_tile.cpp.

References _animated_tiles, Animated, Deleted, GetAnimatedTileState(), None, and SetAnimatedTileState().

Referenced by AnimationBase< Tbase, Tspec, Tobj, Textra, GetCallback, Tframehelper >::AnimateTile(), AnimateTile_Town(), AnimationBase< Tbase, Tspec, Tobj, Textra, GetCallback, Tframehelper >::ChangeAnimationFrame(), CmdBuildRailStation(), and RemoveRoadStop().

## ◆ InitializeAnimatedTiles()

void InitializeAnimatedTiles | ( |  | ) |

Initialize all animated tile variables to some known begin point.

Definition at line 106 of file animated_tile.cpp.

References _animated_tiles.