OpenTTD Source 20241224-master-gf74b0cf984
animated_tile_map.h File Reference

Maps accessors for animated tiles. More...

#include "core/bitmath_func.hpp"
#include "map_func.h"

Go to the source code of this file.

Enumerations

enum class  AnimatedTileState : uint8_t { None = 0 , Deleted = 1 , Animated = 3 }
 Animation state of a possibly-animated tile. More...
 

Functions

AnimatedTileState GetAnimatedTileState (Tile t)
 Get the animated state of a tile.
 
void SetAnimatedTileState (Tile t, AnimatedTileState state)
 Set the animated state of a tile.
 

Detailed Description

Maps accessors for animated tiles.

Definition in file animated_tile_map.h.

Enumeration Type Documentation

◆ AnimatedTileState

enum class AnimatedTileState : uint8_t
strong

Animation state of a possibly-animated tile.

Enumerator
None 

Tile is not animated.

Deleted 

Tile was animated but should be removed.

Animated 

Tile is animated.

Definition at line 19 of file animated_tile_map.h.

Function Documentation

◆ GetAnimatedTileState()

AnimatedTileState GetAnimatedTileState ( Tile  t)
inline

Get the animated state of a tile.

Parameters
tThe tile.
Returns
true iff the tile is animated.

Definition at line 30 of file animated_tile_map.h.

References GB(), and Tile::m6().

Referenced by AddAnimatedTile(), AnimateAnimatedTiles(), and DeleteAnimatedTile().

◆ SetAnimatedTileState()

void SetAnimatedTileState ( Tile  t,
AnimatedTileState  state 
)
inline

Set the animated state of a tile.

Parameters
tThe tile.

Definition at line 39 of file animated_tile_map.h.

References Tile::m6(), SB(), and to_underlying().

Referenced by AddAnimatedTile(), AfterLoadGame(), AnimateAnimatedTiles(), and DeleteAnimatedTile().