37 static void add_anims(std::vector<unit_animation>& animations,
const config& cfg);
41 int value2 = 0)
const;
89 ,
const std::string& text =
"" 90 ,
const color_t text_color = {0,0,0}
91 ,
const bool accelerate =
true);
104 std::string
debug()
const;
120 ,
const std::string& event =
"" 135 explicit particle(
const config& cfg,
const std::string& frame_string =
"frame");
141 void override(
int start_time
144 ,
const std::string& highlight =
"" 145 ,
const std::string& blend_ratio =
"" 146 ,
color_t blend_color = {0,0,0}
147 ,
const std::string& offset =
"" 148 ,
const std::string& layer =
"" 149 ,
const std::string& modifiers =
"");
178 std::vector<strike_result::type>
hits_;
202 ,
bool with_bars =
false 203 ,
const std::string& text =
"" 204 ,
const color_t text_color = {0,0,0});
207 ,
const std::string& event
210 ,
const int value = 0
211 ,
bool with_bars =
false 212 ,
const std::string& text =
"" 213 ,
const color_t text_color = {0,0,0}
232 ,
const std::string& event
235 ,
const int value = 0
239 ,
int value2 = 0)
const;
242 ,
const std::string& event
245 ,
const int value = 0
246 ,
bool with_bars =
false 247 ,
const std::string& text =
"" 248 ,
const color_t text_color = {0,0,0}
253 void start_animations();
259 start_time_ = INT_MIN;
260 animated_units_.clear();
263 void set_all_standing();
265 bool would_end()
const;
269 void wait_for_end()
const;
270 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
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
int matches(const map_location &loc, const map_location &second_loc, unit_const_ptr my_unit, const std::string &event="", const int value=0, strike_result::type hit=strike_result::type::invalid, const_attack_ptr attack=nullptr, const_attack_ptr second_attack=nullptr, int value2=0) 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)
std::set< map_location > overlaped_hex_
The basic class for representing 8-bit RGB or RGBA colour values.
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
std::vector< strike_result::type > hits_
bool animation_finished_potential() const
A config object defines a single node in a WML file, with access to child nodes.
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
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