Display units performing various actions: moving, attacking, and dying. More...
Go to the source code of this file.
Classes | |
class | unit_display::unit_mover |
A class to encapsulate the steps of drawing a unit's move. More... | |
Namespaces | |
unit_display | |
Contains a number of free functions which display units. | |
Functions | |
void | unit_display::move_unit (const std::vector< map_location > &path, unit_ptr u, bool animate, map_location::DIRECTION dir, bool force_scroll) |
Display a unit moving along a given path. More... | |
void | unit_display::unit_draw_weapon (const map_location &loc, unit &u, const attack_type *attack=nullptr, const attack_type *secondary_attack=nullptr, const map_location &defender_loc=map_location::null_location(), unit *defender=nullptr) |
Play a pre-fight animation First unit is the attacker, second unit the defender. More... | |
void | unit_display::unit_sheath_weapon (const map_location &loc, unit *u=nullptr, const attack_type *attack=nullptr, const attack_type *secondary_attack=nullptr, const map_location &defender_loc=map_location::null_location(), unit *defender=nullptr) |
Play a post-fight animation Both unit can be set to null, only valid units will play their animation. More... | |
void | unit_display::unit_die (const map_location &loc, unit &u, const attack_type *attack=nullptr, const attack_type *secondary_attack=nullptr, const map_location &winner_loc=map_location::null_location(), unit *winner=nullptr) |
Show a unit fading out. More... | |
void | unit_display::unit_attack (display *disp, game_board &board,const map_location &a, const map_location &b, int damage, const attack_type &attack, const attack_type *secondary_attack, int swing, std::string hit_text, int drain_amount, std::string att_text, const std::vector< std::string > *extra_hit_sounds=nullptr) |
Make the unit on tile 'a' attack the unit on tile 'b'. More... | |
void | unit_display::unit_recruited (const map_location &loc, const map_location &leader_loc) |
void | unit_display::unit_healing (unit &healed, const std::vector< unit * > &healers, int healing, const std::string &extra_text="") |
This will use a poisoning anim if healing<0. More... | |
void | unit_display::wml_animation (const vconfig &cfg, const map_location &default_location=map_location::null_location()) |
Parse a standard WML for animations and play the corresponding animation. More... | |
Display units performing various actions: moving, attacking, and dying.
Definition in file udisplay.hpp.