#include "config.hpp"
#include "map.hpp"
#include "race.hpp"
#include "team.hpp"
#include "unit_types.hpp"
#include "unit_map.hpp"
#include "formula_callable.hpp"
#include <set>
#include <string>
#include <vector>
Go to the source code of this file.
Classes | |
class | unit_ability_list |
class | unit |
struct | unit_movement_resetter |
Object which temporarily resets a unit's movement. More... | |
struct | team_data |
struct | temporary_unit_placer |
This object is used to temporary place a unit in the unit map, swapping out any unit that is already there. More... | |
Functions | |
void | sort_units (std::vector< unit > &) |
int | team_units (const unit_map &units, unsigned int team_num) |
Returns the number of units of the given side (team). | |
int | team_upkeep (const unit_map &units, unsigned int team_num) |
unit_map::const_iterator | team_leader (unsigned int side, const unit_map &units) |
unit_map::iterator | find_visible_unit (unit_map &units, const gamemap::location loc, const gamemap &map, const std::vector< team > &teams, const team ¤t_team, bool see_all=false) |
unit_map::const_iterator | find_visible_unit (const unit_map &units, const gamemap::location loc, const gamemap &map, const std::vector< team > &teams, const team ¤t_team, bool see_all=false) |
team_data | calculate_team_data (const class team &tm, int side, const unit_map &units) |
std::string | get_checksum (const unit &u) |
Gets a checksum for a unit. |
Definition in file unit.hpp.
unit_map::const_iterator find_visible_unit | ( | const unit_map & | units, | |
const gamemap::location | loc, | |||
const gamemap & | map, | |||
const std::vector< team > & | teams, | |||
const team & | current_team, | |||
bool | see_all = false | |||
) |
Definition at line 2887 of file unit.cpp.
References unit_map::end(), unit_map::find(), team::fogged(), team::is_enemy(), and gamemap::on_board().
unit_map::iterator find_visible_unit | ( | unit_map & | units, | |
const gamemap::location | loc, | |||
const gamemap & | map, | |||
const std::vector< team > & | teams, | |||
const team & | current_team, | |||
bool | see_all = false | |||
) |
Definition at line 2866 of file unit.cpp.
References unit_map::end(), unit_map::find(), team::fogged(), team::is_enemy(), and gamemap::on_board().
Referenced by shortest_path_calculator::cost(), events::menu_handler::current_unit(), ai::desperate_attack(), game_display::display_unit_hex(), game_display::draw(), game_display::draw_sidebar(), enemy_zoc(), find_routes(), events::mouse_handler::find_unit(), reports::generate_report(), game_display::highlight_hex(), and ai::move_to_targets().
std::string get_checksum | ( | const unit & | u | ) |
Gets a checksum for a unit.
In MP games the descriptions are locally generated and might differ, so it should be possible to discard them. Not sure whether replays suffer the same problem.
u | the unit |
Definition at line 2990 of file unit.cpp.
References config::add_child(), unit::attacks(), config::clear_children(), DBG_UT, config::get_children(), config::hash(), config::recursive_clear_value(), and unit::write().
Referenced by replay::add_unit_checksum(), check_checksums(), and recruit_unit().
void sort_units | ( | std::vector< unit > & | ) |
Definition at line 84 of file unit.cpp.
References compare_unit_values().
Referenced by do_replay_handle(), and events::menu_handler::recall().
unit_map::const_iterator team_leader | ( | unsigned int | side, | |
const unit_map & | units | |||
) |
Definition at line 2855 of file unit.cpp.
References unit_map::begin(), and unit_map::end().
Referenced by events::menu_handler::get_title_suffix(), formula_ai::get_value(), events::menu_handler::goto_leader(), play_controller::in_context_menu(), events::menu_handler::scenario_settings_table(), and events::menu_handler::status_table().
int team_units | ( | const unit_map & | units, | |
unsigned int | team_num | |||
) |
Returns the number of units of the given side (team).
Definition at line 2831 of file unit.cpp.
References unit_map::begin(), and unit_map::end().
Referenced by calculate_team_data(), reports::generate_report(), and playsingle_controller::play_turn().
int team_upkeep | ( | const unit_map & | units, | |
unsigned int | team_num | |||
) |
Definition at line 2843 of file unit.cpp.
References unit_map::begin(), and unit_map::end().
Referenced by calculate_team_data(), and play_controller::init_side().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |