#include <unit_animation.hpp>
Public Member Functions | |
unit_animator () | |
void | add_animation (unit *animated_unit, const std::string &event, const gamemap::location &src=gamemap::location::null_location, const int value=0, bool with_bars=false, bool cycles=false, const std::string text="", const Uint32 text_color=0, const unit_animation::hit_type hit_type=unit_animation::INVALID, const attack_type *attack=NULL, const attack_type *second_attack=NULL, int swing_num=0) |
void | replace_anim_if_invalid (unit *animated_unit, const std::string &event, const gamemap::location &src=gamemap::location::null_location, const int value=0, bool with_bars=false, bool cycles=false, const std::string text="", const Uint32 text_color=0, const unit_animation::hit_type hit_type=unit_animation::INVALID, const attack_type *attack=NULL, const attack_type *second_attack=NULL, int swing_num=0) |
void | start_animations () |
void | pause_animation () |
void | restart_animation () |
void | empty () |
bool | would_end () const |
int | get_animation_time () const |
int | get_animation_time_potential () const |
int | get_end_time () const |
void | wait_for_end () const |
void | wait_until (int animation_time) const |
Private Attributes | |
std::vector< anim_elem > | animated_units_ |
int | start_time_ |
Classes | |
struct | anim_elem |
Definition at line 116 of file unit_animation.hpp.
unit_animator::unit_animator | ( | ) | [inline] |
Definition at line 119 of file unit_animation.hpp.
void unit_animator::add_animation | ( | unit * | animated_unit, | |
const std::string & | event, | |||
const gamemap::location & | src = gamemap::location::null_location , |
|||
const int | value = 0 , |
|||
bool | with_bars = false , |
|||
bool | cycles = false , |
|||
const std::string | text = "" , |
|||
const Uint32 | text_color = 0 , |
|||
const unit_animation::hit_type | hit_type = unit_animation::INVALID , |
|||
const attack_type * | attack = NULL , |
|||
const attack_type * | second_attack = NULL , |
|||
int | swing_num = 0 | |||
) |
Definition at line 790 of file unit_animation.cpp.
References animated_units_, unit_animator::anim_elem::animation, unit::choose_animation(), unit_animator::anim_elem::cycles, preferences::disp, unit_animation::get_begin_time(), game_display::get_singleton(), unit_animator::anim_elem::my_unit, unit_animator::anim_elem::src, start_time_, unit_animator::anim_elem::text, unit_animator::anim_elem::text_color, and unit_animator::anim_elem::with_bars.
Referenced by dialogs::animate_unit_advancement(), replace_anim_if_invalid(), teleport_unit_between(), unit_display::unit_attack(), unit_display::unit_die(), unit_display::unit_healing(), and unit_display::unit_recruited().
void unit_animator::replace_anim_if_invalid | ( | unit * | animated_unit, | |
const std::string & | event, | |||
const gamemap::location & | src = gamemap::location::null_location , |
|||
const int | value = 0 , |
|||
bool | with_bars = false , |
|||
bool | cycles = false , |
|||
const std::string | text = "" , |
|||
const Uint32 | text_color = 0 , |
|||
const unit_animation::hit_type | hit_type = unit_animation::INVALID , |
|||
const attack_type * | attack = NULL , |
|||
const attack_type * | second_attack = NULL , |
|||
int | swing_num = 0 | |||
) |
Definition at line 813 of file unit_animation.cpp.
References add_animation(), animated_units_, unit_animator::anim_elem::animation, unit_animation::animation_finished_potential(), unit_animator::anim_elem::cycles, preferences::disp, unit::get_animation(), game_display::get_singleton(), unit_animation::MATCH_FAIL, unit_animation::matches(), unit_animator::anim_elem::my_unit, unit_animator::anim_elem::src, unit_animator::anim_elem::text, unit_animator::anim_elem::text_color, and unit_animator::anim_elem::with_bars.
Referenced by move_unit_between().
void unit_animator::start_animations | ( | ) |
Definition at line 837 of file unit_animation.cpp.
References animated_units_.
Referenced by dialogs::animate_unit_advancement(), move_unit_between(), teleport_unit_between(), unit_display::unit_attack(), unit_display::unit_die(), unit_display::unit_healing(), and unit_display::unit_recruited().
void unit_animator::pause_animation | ( | ) |
Definition at line 916 of file unit_animation.cpp.
References animated_units_.
Referenced by move_unit_between().
void unit_animator::restart_animation | ( | ) |
Definition at line 924 of file unit_animation.cpp.
References animated_units_.
Referenced by move_unit_between().
void unit_animator::empty | ( | ) | [inline] |
bool unit_animator::would_end | ( | ) | const |
int unit_animator::get_animation_time | ( | ) | const |
Definition at line 898 of file unit_animation.cpp.
References animated_units_.
Referenced by wait_until().
int unit_animator::get_animation_time_potential | ( | ) | const |
Definition at line 902 of file unit_animation.cpp.
References animated_units_.
Referenced by move_unit_between().
int unit_animator::get_end_time | ( | ) | const |
void unit_animator::wait_for_end | ( | ) | const |
Definition at line 883 of file unit_animation.cpp.
References animated_units_, display::delay(), preferences::disp, game_display::draw(), game_display::get_singleton(), game_config::no_delay, and events::pump().
Referenced by dialogs::animate_unit_advancement(), teleport_unit_between(), unit_display::unit_attack(), unit_display::unit_die(), unit_display::unit_healing(), and unit_display::unit_recruited().
void unit_animator::wait_until | ( | int | animation_time | ) | const |
Definition at line 867 of file unit_animation.cpp.
References animated_units_, display::delay(), preferences::disp, game_display::draw(), get_animation_time(), game_display::get_singleton(), new_animation_frame(), events::pump(), and display::turbo_speed().
Referenced by move_unit_between().
std::vector<anim_elem> unit_animator::animated_units_ [private] |
Definition at line 156 of file unit_animation.hpp.
Referenced by add_animation(), empty(), get_animation_time(), get_animation_time_potential(), get_end_time(), pause_animation(), replace_anim_if_invalid(), restart_animation(), start_animations(), wait_for_end(), wait_until(), and would_end().
int unit_animator::start_time_ [private] |
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |