Public Member Functions | |
tilemap (int x, int y) | |
Constructs a tilemap of dimensions x * y. | |
tile & | operator[] (const gamemap::location &loc) |
Returns a reference to the tile which is at the position pointed by loc. | |
const tile & | operator[] (const gamemap::location &loc) const |
a const variant of operator[] | |
bool | on_map (const gamemap::location &loc) const |
Tests if a location is on the map. | |
void | reset () |
Resets the whole tile map. | |
Private Attributes | |
std::vector< tile > | map_ |
The map. | |
int | x_ |
The x dimension of the map. | |
int | y_ |
The y dimension of the map. |
Definition at line 342 of file builder.hpp.
terrain_builder::tilemap::tilemap | ( | int | x, | |
int | y | |||
) | [inline] |
terrain_builder::tile & terrain_builder::tilemap::operator[] | ( | const gamemap::location & | loc | ) |
Returns a reference to the tile which is at the position pointed by loc.
The location MUST be on the map!
loc | The location of the tile |
Definition at line 131 of file builder.cpp.
References map_, on_map(), gamemap::location::x, x_, and gamemap::location::y.
const terrain_builder::tile & terrain_builder::tilemap::operator[] | ( | const gamemap::location & | loc | ) | const |
a const variant of operator[]
Definition at line 138 of file builder.cpp.
References map_, on_map(), gamemap::location::x, x_, and gamemap::location::y.
bool terrain_builder::tilemap::on_map | ( | const gamemap::location & | loc | ) | const |
Tests if a location is on the map.
loc | The location to test |
Definition at line 121 of file builder.cpp.
References gamemap::location::x, x_, gamemap::location::y, and y_.
Referenced by terrain_builder::apply_rule(), terrain_builder::get_terrain_at(), operator[](), terrain_builder::rebuild_terrain(), terrain_builder::rule_matches(), and terrain_builder::update_animation().
void terrain_builder::tilemap::reset | ( | ) |
Resets the whole tile map.
Definition at line 115 of file builder.cpp.
References map_.
Referenced by terrain_builder::rebuild_all().
std::vector<tile> terrain_builder::tilemap::map_ [private] |
int terrain_builder::tilemap::x_ [private] |
The x dimension of the map.
Definition at line 386 of file builder.hpp.
Referenced by on_map(), and operator[]().
int terrain_builder::tilemap::y_ [private] |
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |