pathutils.hpp File Reference

#include "map.hpp"

Include dependency graph for pathutils.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool tiles_adjacent (const gamemap::location &a, const gamemap::location &b)
 Function which tells if two locations are adjacent.
void get_adjacent_tiles (const gamemap::location &a, gamemap::location *res)
 Function which, given a location, will place all adjacent locations in res.
void get_tile_ring (const gamemap::location &a, const int r, std::vector< gamemap::location > &res)
 Function which, given a location, will place all locations in a ring of distance r in res.
void get_tiles_in_radius (const gamemap::location &a, const int r, std::vector< gamemap::location > &res)
 Function which, given a location, will place all locations in the radius of r in res res must be a std::vector of location.
size_t distance_between (const gamemap::location &a, const gamemap::location &b)
 Function which gives the number of hexes between two tiles (i.e.


Detailed Description

Definition in file pathutils.hpp.


Function Documentation

size_t distance_between ( const gamemap::location a,
const gamemap::location b 
)

void get_adjacent_tiles ( const gamemap::location a,
gamemap::location res 
)

void get_tile_ring ( const gamemap::location a,
const int  r,
std::vector< gamemap::location > &  res 
)

Function which, given a location, will place all locations in a ring of distance r in res.

res must be a std::vector of location

Definition at line 60 of file pathutils.cpp.

References gamemap::location::get_direction(), loc, and gamemap::location::SOUTH_WEST.

Referenced by get_tiles_in_radius().

void get_tiles_in_radius ( const gamemap::location a,
const int  r,
std::vector< gamemap::location > &  res 
)

Function which, given a location, will place all locations in the radius of r in res res must be a std::vector of location.

Definition at line 77 of file pathutils.cpp.

References get_tile_ring().

bool tiles_adjacent ( const gamemap::location a,
const gamemap::location b 
)

Function which tells if two locations are adjacent.

Definition at line 84 of file pathutils.cpp.

References is_even(), gamemap::location::x, and gamemap::location::y.

Referenced by game_display::footsteps_images(), unit::invisible(), unit_display::move_unit(), and move_unit().


Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs