14 #ifndef UNIT_ANIMATION_H_INCLUDED
15 #define UNIT_ANIMATION_H_INCLUDED
37 static void add_anims( std::vector<unit_animation> & animations,
const config & cfg);
59 ,
const Uint32 text_color = 0
60 ,
const bool accelerate =
true);
104 void override(
int start_time
109 , Uint32 blend_color = 0
164 ,
bool with_bars =
false
166 ,
const Uint32 text_color = 0);
171 ,
const int value = 0
172 ,
bool with_bars =
false
174 ,
const Uint32 text_color = 0
184 ,
const int value = 0
185 ,
bool with_bars =
false
187 ,
const Uint32 text_color = 0
Describe a unit's animation sequence.
particule(int start_time=0, const frame_builder &builder=frame_builder())
void wait_until(int animation_time) const
std::vector< hit_type > hits_
keep most parameters in a separate class to simplify handling of large number of parameters handling ...
int get_animation_time_potential() const
std::string debug() const
int time_to_tick(int animation_time) const
std::vector< map_location::DIRECTION > directions_
Frame for unit's animation sequence.
static void add_anims(std::vector< unit_animation > &animations, const config &cfg)
int get_current_frame_begin_time() const
std::vector< config > secondary_attack_filter_
void start_animation(int start_time)
int get_current_frame_time() const
int get_begin_time() const
void add_frame(int duration, const unit_frame &value, bool force_change=false)
const unit_animation * animation
std::vector< int > value_
int get_animation_time() const
void add_frame(int duration, const T &value, bool force_change=false)
Adds a frame to an animation.
int time_to_tick(int animation_time) const
bool animation_finished_potential() const
int get_animation_time() const
All parameters from a frame at a given instant.
Definitions for the interface to Wesnoth Markup Language (WML).
const frame_parameters parameters(int current_time) const
getters for the different parameters
int get_begin_time() const
std::vector< anim_elem > animated_units_
int last_frame_begin_time_
const frame_parameters merge_parameters(int current_time, const frame_parameters &animation_val, const frame_parameters &engine_val=frame_parameters()) const
int get_animation_time_potential() const
const T & get_last_frame() const
unit_animation()
Shouldn't be used so only declared.
GLenum GLenum GLuint GLint GLint layer
static const std::vector< std::string > & all_tag_names()
void replace_anim_if_invalid(const unit *animated_unit, const std::string &event, const map_location &src=map_location::null_location(), const map_location &dst=map_location::null_location(), const int value=0, bool with_bars=false, const std::string &text="", const Uint32 text_color=0, const unit_animation::hit_type hit_type=unit_animation::INVALID, const attack_type *attack=nullptr, const attack_type *second_attack=nullptr, int value2=0)
GLsizei const GLfloat * value
std::set< map_location > overlaped_hex_
const unit_frame & get_current_frame() const
int get_current_frame_begin_time() const
const frame_parameters parameters(const frame_parameters &default_val) const
std::vector< config > secondary_unit_filter_
std::vector< std::string > event_
static const map_location & null_location()
int matches(const display &disp, const map_location &loc, const map_location &second_loc, const unit *my_unit, const std::string &event="", const int value=0, hit_type hit=INVALID, const attack_type *attack=nullptr, const attack_type *second_attack=nullptr, int value2=0) const
int get_animation_time_potential() const
Encapsulates the map of the game.
friend std::ostream & operator<<(std::ostream &outstream, const unit_animation &u_animation)
std::set< map_location > get_overlaped_hex(const frame_parameters &value, const map_location &src, const map_location &dst)
std::vector< int > value2_
static void fill_initial_animations(std::vector< unit_animation > &animations, const config &cfg)
void add_animation(const unit *animated_unit, const unit_animation *animation, const map_location &src=map_location::null_location(), bool with_bars=false, const std::string &text="", const Uint32 text_color=0)
std::vector< config > unit_filter_
const unit_frame & get_last_frame() const
std::vector< config > primary_attack_filter_
std::map< std::string, particule > sub_anims_
void update_parameters(const map_location &src, const map_location &dst)
frame_parsed_parameters parameters_
void redraw(frame_parameters &value, halo::manager &halo_man)
void update_last_draw_time()
void redraw(const frame_parameters &value, const map_location &src, const map_location &dst, halo::manager &halo_man)
int get_animation_time() const
A config object defines a single node in a WML file, with access to child nodes.
t_translation::t_list terrain_types_
bool animation_finished() const
GLsizei const GLcharARB ** string
bool need_minimal_update() const
const frame_parameters get_current_params(const frame_parameters &default_val=frame_parameters()) const
void wait_for_end() const
void start_animation(int start_time, const map_location &src=map_location::null_location(), const map_location &dst=map_location::null_location(), const std::string &text="", const Uint32 text_color=0, const bool accelerate=true)
std::vector< t_terrain > t_list
bool need_minimal_update() const
bool invalidate(frame_parameters &value)