OpenTTD
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. More...
 
void AddAnimatedTile (TileIndex tile)
 Add the given tile to the animated tile table (if it does not exist on that table yet). More...
 
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. More...
 
uint _animated_tile_count = 0
 The number of animated tiles in the current state. More...
 
uint _animated_tile_allocated = 0
 The number of slots for animated tiles allocated currently. More...
 

Detailed Description

Everything related to animated tiles.

Definition in file animated_tile.cpp.

Function Documentation

◆ AddAnimatedTile()

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
tilethe 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().

◆ DeleteAnimatedTile()

void DeleteAnimatedTile ( TileIndex  tile)

Removes the given tile from the animated tile table.

Parameters
tilethe tile to remove

Definition at line 30 of file animated_tile.cpp.

References _animated_tile_count, _animated_tile_list, and MarkTileDirtyByTile().

Referenced by AnimationBase< IndustryAnimationBase, IndustryTileSpec, Industry, int, GetSimpleIndustryCallback >::ChangeAnimationFrame().

Variable Documentation

◆ _animated_tile_allocated

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(), and InitializeAnimatedTiles().

◆ _animated_tile_count

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(), AnimateAnimatedTiles(), DeleteAnimatedTile(), InitializeAnimatedTiles(), and Save_ANIT().

◆ _animated_tile_list

TileIndex* _animated_tile_list = NULL

The table/list with animated tiles.

Definition at line 20 of file animated_tile.cpp.

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