OpenTTD: src/animated_tile.cpp File Reference

OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

Functions | Variables
animated_tile.cpp File Reference

Everything related to animated tiles. More...

`#include "stdafx.h"`
`#include "core/alloc_func.hpp"`
`#include "tile_cmd.h"`
`#include "viewport_func.h"`
`#include "safeguards.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 51 of file animated_tile.cpp.

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

Referenced by AnimationBase< IndustryAnimationBase, IndustryTileSpec, Industry, int, GetSimpleIndustryCallback >::ChangeAnimationFrame(), ClearMakeHouseTile(), CmdBuildAirport(), DoCreateNewIndustry(), 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 30 of file animated_tile.cpp.

References _animated_tile_count, _animated_tile_list, and MarkTileDirtyByTile().

Referenced by AfterLoadGame(), AnimationBase< IndustryAnimationBase, IndustryTileSpec, Industry, int, GetSimpleIndustryCallback >::AnimateTile(), AnimateTile_Town(), AnimationBase< IndustryAnimationBase, IndustryTileSpec, Industry, int, GetSimpleIndustryCallback >::ChangeAnimationFrame(), CmdBuildRailStation(), DoClearTownHouseHelper(), and RemoveAirport().

## Variable Documentation

uint _animated_tile_allocated = 0

The number of slots for animated tiles allocated currently.

Definition at line 24 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 22 of file animated_tile.cpp.

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

TileIndex* _animated_tile_list = NULL

The table/list with animated tiles.

Definition at line 20 of file animated_tile.cpp.

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