OpenTTD Source 20241224-master-gf74b0cf984
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
tilethe tile to make animated
mark_dirtywhether 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
tilethe tile to remove
immediateimmediately 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.