44 static void add_anims(std::vector<unit_animation>& animations,
const config& cfg);
94 ,
const std::string& text =
"" 95 ,
const color_t text_color = {0,0,0}
96 ,
const bool accelerate =
true);
109 std::string
debug()
const;
125 ,
const std::string& event =
"" 140 explicit particle(
const config& cfg,
const std::string& frame_string =
"frame");
146 void override(
int start_time
149 ,
const std::string& highlight =
"" 150 ,
const std::string& blend_ratio =
"" 151 ,
color_t blend_color = {0,0,0}
152 ,
const std::string& offset =
"" 153 ,
const std::string& layer =
"" 154 ,
const std::string& modifiers =
"");
207 ,
bool with_bars =
false 208 ,
const std::string& text =
"" 209 ,
const color_t text_color = {0,0,0});
212 ,
const std::string& event
215 ,
const int value = 0
216 ,
bool with_bars =
false 217 ,
const std::string& text =
"" 218 ,
const color_t text_color = {0,0,0}
219 ,
const unit_animation::hit_type hit_type =
220 unit_animation::hit_type::INVALID
238 ,
const std::string& event
241 ,
const int value = 0
242 ,
const unit_animation::hit_type hit_type =
243 unit_animation::hit_type::INVALID
246 ,
int value2 = 0)
const;
249 ,
const std::string& event
252 ,
const int value = 0
253 ,
bool with_bars =
false 254 ,
const std::string& text =
"" 255 ,
const color_t text_color = {0,0,0}
256 ,
const unit_animation::hit_type hit_type = unit_animation::hit_type::INVALID
260 void start_animations();
266 start_time_ = INT_MIN;
267 animated_units_.clear();
270 void set_all_standing();
272 bool would_end()
const;
276 void wait_for_end()
const;
277 void wait_until(
int animation_time)
const;
const frame_parameters parameters(int current_time) const
Getters for the different parameters.
Describes a unit's animation sequence.
int time_to_tick(int animation_time) const
All parameters from a frame at a given instant.
int get_animation_time() const
std::vector< hit_type > hits_
This class represents a single unit of a specific type.
int last_frame_begin_time_
Keep most parameters in a separate class to simplify the handling of the large number of parameters b...
int get_current_frame_begin_time() const
const T & get_last_frame() const
void set_max_animation_time(int time)
std::vector< map_location::DIRECTION > directions_
frame_parsed_parameters parameters_
Frame for unit's animation sequence.
static void add_anims(std::vector< unit_animation > &animations, const config &cfg)
std::vector< config > secondary_attack_filter_
int get_current_frame_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_begin_time() const
Definitions for the interface to Wesnoth Markup Language (WML).
bool need_minimal_update() const
void add_frame(int duration, const T &value, bool force_change=false)
Adds a frame to an animation.
std::vector< anim_elem > animated_units_
int get_animation_time_potential() const
std::shared_ptr< const unit > unit_const_ptr
int get_begin_time() const
int get_current_frame_time() const
particle(int start_time=0, const frame_builder &builder=frame_builder())
int get_animation_time_potential() const
void start_animation(int start_time)
MAKE_ENUM(hit_type,(HIT, "hit")(MISS, "miss")(KILL, "kill")(INVALID, "invalid"))
std::set< map_location > overlaped_hex_
std::vector< config > secondary_unit_filter_
std::vector< std::string > event_
int time_to_tick(int animation_time) const
void redraw(const frame_parameters &value, const map_location &src, const map_location &dst, halo::manager &halo_man)
std::vector< std::string > get_flags() const
const unit_frame & get_last_frame() const
Encapsulates the map of the game.
const unit_frame & get_current_frame() const
friend std::ostream & operator<<(std::ostream &outstream, const unit_animation &u_animation)
std::vector< int > value2_
static void fill_initial_animations(std::vector< unit_animation > &animations, const config &cfg)
std::vector< config > unit_filter_
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 color_t text_color={0, 0, 0}, const bool accelerate=true)
std::vector< config > primary_attack_filter_
void update_parameters(const map_location &src, const map_location &dst)
std::map< std::string, particle > sub_anims_
std::string debug() const
const frame_parameters parameters(const frame_parameters &default_val) const
void set_max_animation_time(int time)
std::vector< terrain_code > ter_list
static const map_location & null_location()
void redraw(frame_parameters &value, halo::manager &halo_man)
void update_last_draw_time()
bool need_minimal_update() const
bool animation_finished_potential() const
A config object defines a single node in a WML file, with access to child nodes.
int matches(const display &disp, const map_location &loc, const map_location &second_loc, unit_const_ptr my_unit, const std::string &event="", const int value=0, hit_type hit=hit_type::INVALID, const_attack_ptr attack=nullptr, const_attack_ptr second_attack=nullptr, int value2=0) const
std::shared_ptr< const attack_type > const_attack_ptr
std::shared_ptr< halo_record > handle
t_translation::ter_list terrain_types_
const frame_parameters get_current_params(const frame_parameters &default_val=frame_parameters()) const
Defines the MAKE_ENUM macro.
const frame_parameters merge_parameters(int current_time, const frame_parameters &animation_val, const frame_parameters &engine_val=frame_parameters()) const
This function merges the value provided by:
std::set< map_location > get_overlaped_hex(const frame_parameters &value, const map_location &src, const map_location &dst)
bool invalidate(frame_parameters &value)
bool animation_finished() const
int get_animation_time() const