The Battle for Wesnoth  1.19.5+dev
Namespaces | Macros | Functions
udisplay.cpp File Reference
#include "units/udisplay.hpp"
#include "fake_unit_ptr.hpp"
#include "game_board.hpp"
#include "game_display.hpp"
#include "preferences/preferences.hpp"
#include "log.hpp"
#include "mouse_events.hpp"
#include "resources.hpp"
#include "play_controller.hpp"
#include "color.hpp"
#include "sound.hpp"
#include "units/unit.hpp"
#include "units/animation_component.hpp"
#include "units/map.hpp"
#include "utils/scope_exit.hpp"
#include "video.hpp"
Include dependency graph for udisplay.cpp:

Go to the source code of this file.

Namespaces

 unit_display
 Contains a number of free functions which display units.
 

Macros

#define LOG_DP   LOG_STREAM(info, display)
 

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::reset_helpers (const unit *attacker, const unit *defender)
 
void unit_display::unit_draw_weapon (const map_location &loc, unit &u, const_attack_ptr attack=nullptr, const_attack_ptr secondary_attack=nullptr, const map_location &defender_loc=map_location::null_location(), unit_ptr defender=unit_ptr())
 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_ptr u=unit_ptr(), const_attack_ptr attack=nullptr, const_attack_ptr secondary_attack=nullptr, const map_location &defender_loc=map_location::null_location(), unit_ptr defender=unit_ptr())
 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_ptr attack=nullptr, const_attack_ptr secondary_attack=nullptr, const map_location &winner_loc=map_location::null_location(), unit_ptr winner=unit_ptr())
 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_ptr secondary_attack, int swing, const std::string &hit_text, int drain_amount, const std::string &att_text, const std::vector< std::string > *extra_hit_sounds=nullptr, bool attacking=true)
 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...
 

Macro Definition Documentation

◆ LOG_DP

#define LOG_DP   LOG_STREAM(info, display)

Definition at line 34 of file udisplay.cpp.