animated_tile.cpp File Reference

Everything related to animated tiles. More...

#include "stdafx.h"
#include "openttd.h"
#include "saveload.h"
#include "landscape.h"
#include "core/alloc_func.hpp"
#include "functions.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.
static void Save_ANIT ()
 Save the ANIT chunk.
static void Load_ANIT ()
 Load the ANIT chunk; the chunk containing the animated tiles.

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.
static uint _animated_tile_allocated = 0
 The number of slots for animated tiles allocated currently.
const ChunkHandler _animated_tile_chunk_handlers []
 "Definition" imported by the saveload code to be able to load and save the animated tile table.


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 44 of file animated_tile.cpp.

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

Referenced by ClearMakeHouseTile(), 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 23 of file animated_tile.cpp.

References _animated_tile_count, _animated_tile_list, and MarkTileDirtyByTile().

Referenced by AnimateTile_Town(), and DoClearTownHouseHelper().


Variable Documentation

uint _animated_tile_allocated = 0 [static]

The number of slots for animated tiles allocated currently.

Definition at line 17 of file animated_tile.cpp.

Referenced by AddAnimatedTile(), InitializeAnimatedTiles(), and Load_ANIT().

const ChunkHandler _animated_tile_chunk_handlers[]

Initial value:

 {
  { 'ANIT', Save_ANIT, Load_ANIT, CH_RIFF | CH_LAST},
}
"Definition" imported by the saveload code to be able to load and save the animated tile table.

The number of animated tiles in the current state.

Definition at line 15 of file animated_tile.cpp.

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

The table/list with animated tiles.

Definition at line 13 of file animated_tile.cpp.

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


Generated on Fri Nov 21 19:01:38 2008 for openttd by  doxygen 1.5.6