Functions | |
bool | unit_visible_on_path (const std::vector< gamemap::location > &path, const unit &u, const unit_map &units, const std::vector< team > &teams) |
void | move_unit (const std::vector< gamemap::location > &path, unit &u, const std::vector< team > &teams) |
Display a unit moving along a given path. | |
void | unit_die (const gamemap::location &loc, unit &u, const attack_type *attack=NULL, const attack_type *secondary_attack=NULL, unit *winner=NULL) |
Show a unit fading out. | |
void | unit_attack (const gamemap::location &a, const gamemap::location &b, int damage, const attack_type &attack, const attack_type *secondary_attack, int swing, std::string hit_text, bool drain, std::string att_text) |
Make the unit on tile 'a' attack the unit on tile 'b'. | |
void | unit_recruited (gamemap::location &loc) |
void | unit_healing (unit &healed, gamemap::location &healed_loc, std::vector< unit_map::iterator > healers, int healing) |
Set healer_loc to an invalid location if there are no healers. |
performing various on-screen actions - moving, attacking, and dying.
void unit_display::move_unit | ( | const std::vector< gamemap::location > & | path, | |
unit & | u, | |||
const std::vector< team > & | teams | |||
) |
Display a unit moving along a given path.
Definition at line 119 of file unit_display.cpp.
References preferences::disp, game_display::draw(), unit::get_hidden(), events::mouse_handler::get_singleton(), game_display::get_singleton(), game_display::get_units(), events::mouse_handler::invalidate_reachmap(), game_display::invalidate_unit_after_move(), unit::invisible(), move_unit_between(), display::ONSCREEN, game_display::place_temporary_unit(), game_display::remove_temporary_unit(), display::scroll_to_tiles(), unit::set_facing(), unit::set_hidden(), unit::set_standing(), unit::side(), teleport_unit_between(), display::tile_on_screen(), tiles_adjacent(), units, and game_display::viewing_team().
Referenced by do_replay_handle(), move_unit(), ai_interface::move_unit_partial(), events::menu_handler::redo(), and events::menu_handler::undo().
void unit_display::unit_attack | ( | const gamemap::location & | a, | |
const gamemap::location & | b, | |||
int | damage, | |||
const attack_type & | attack, | |||
const attack_type * | secondary_attack, | |||
int | swing, | |||
std::string | hit_text, | |||
bool | drain, | |||
std::string | att_text | |||
) |
Make the unit on tile 'a' attack the unit on tile 'b'.
The 'damage' will be subtracted from the unit's hitpoints, and a die effect will be displayed if the unit dies.
true | if the defending unit is dead, should be removed from the playing field. |
Definition at line 205 of file unit_display.cpp.
References unit_animator::add_animation(), preferences::disp, unit_map::end(), unit_map::find(), display::fogged(), gamemap::location::get_relative_dir(), game_display::get_singleton(), game_display::get_units(), unit_animation::HIT, unit_animation::KILL, leader_loc, lexical_cast(), log_scope, unit_animation::MISS, gamemap::location::null_location, display::ONSCREEN, display::rgb(), display::scroll_to_tiles(), game_display::select_hex(), preferences::show_combat(), unit_animator::start_animations(), text, under_leadership(), units, CVideo::update_locked(), gamemap::location::valid(), display::video(), and unit_animator::wait_for_end().
Referenced by attack::attack().
void unit_display::unit_die | ( | const gamemap::location & | loc, | |
unit & | u, | |||
const attack_type * | attack = NULL , |
|||
const attack_type * | secondary_attack = NULL , |
|||
unit * | winner = NULL | |||
) |
Show a unit fading out.
Note: this only shows the effect, it doesn't actually kill the unit.
Definition at line 182 of file unit_display.cpp.
References unit_animator::add_animation(), preferences::disp, unit::facing(), display::fogged(), gamemap::location::get_direction(), events::mouse_handler::get_singleton(), game_display::get_singleton(), events::mouse_handler::invalidate_reachmap(), unit_animation::KILL, preferences::show_combat(), unit_animator::start_animations(), CVideo::update_locked(), display::video(), and unit_animator::wait_for_end().
Referenced by attack::attack().
void unit_display::unit_healing | ( | unit & | healed, | |
gamemap::location & | healed_loc, | |||
std::vector< unit_map::iterator > | healers, | |||
int | healing | |||
) |
Set healer_loc to an invalid location if there are no healers.
This will use a poisoning anim if healing<0.
Definition at line 302 of file unit_display.cpp.
References unit_animator::add_animation(), preferences::disp, game_display::display_unit_hex(), display::fogged(), game_display::get_singleton(), display::ONSCREEN, display::rgb(), display::scroll_to_tile(), unit::set_standing(), unit_animator::start_animations(), CVideo::update_locked(), display::video(), and unit_animator::wait_for_end().
Referenced by calculate_healing().
void unit_display::unit_recruited | ( | gamemap::location & | loc | ) |
Definition at line 282 of file unit_display.cpp.
References unit_animator::add_animation(), preferences::disp, game_display::draw(), unit_map::end(), unit_map::find(), display::fogged(), game_display::get_singleton(), game_display::get_units(), game_display::invalidate_unit(), display::mouseover_hex(), gamemap::location::NDIRECTIONS, display::ONSCREEN, display::scroll_to_tile(), unit_animator::start_animations(), CVideo::update_locked(), display::video(), and unit_animator::wait_for_end().
Referenced by recruit_unit().
bool unit_display::unit_visible_on_path | ( | const std::vector< gamemap::location > & | path, | |
const unit & | u, | |||
const unit_map & | units, | |||
const std::vector< team > & | teams | |||
) |
Definition at line 103 of file unit_display.cpp.
References preferences::disp, game_display::get_singleton(), unit::invisible(), unit::side(), and game_display::viewing_team().
Referenced by ai_interface::move_unit_partial().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |