36 static void add_anims(std::vector<unit_animation>& animations,
const config& cfg);
40 int value2 = 0)
const;
88 ,
const std::string& text =
""
89 ,
const color_t text_color = {0,0,0}
90 ,
const bool accelerate =
true);
103 std::string
debug()
const;
119 ,
const std::string& event =
""
134 explicit particle(
const config& cfg,
const std::string& frame_string =
"frame");
140 void override(
int start_time
143 ,
const std::string& highlight =
""
144 ,
const std::string& blend_ratio =
""
145 ,
color_t blend_color = {0,0,0}
146 ,
const std::string& offset =
""
147 ,
const std::string& layer =
""
148 ,
const std::string& modifiers =
"");
177 std::vector<strike_result::type>
hits_;
196 ,
bool with_bars =
false
197 ,
const std::string& text =
""
198 ,
const color_t text_color = {0,0,0});
201 ,
const std::string& event
204 ,
const int value = 0
205 ,
bool with_bars =
false
206 ,
const std::string& text =
""
207 ,
const color_t text_color = {0,0,0}
226 ,
const std::string& event
229 ,
const int value = 0
233 ,
int value2 = 0)
const;
236 ,
const std::string& event
239 ,
const int value = 0
240 ,
bool with_bars =
false
241 ,
const std::string& text =
""
242 ,
const color_t text_color = {0,0,0}
int get_current_frame_begin_time() const
int time_to_tick(int animation_time) const
int get_animation_time_potential() const
void set_max_animation_time(int time)
int get_begin_time() const
const T & get_last_frame() const
int get_current_frame_time() const
const unit_frame & get_current_frame() const
int get_animation_time() const
void add_frame(int duration, const T &value, bool force_change=false)
Adds a frame to an animation.
A config object defines a single node in a WML file, with access to child nodes.
Easily build frame parameters with the serialized constructors.
Keep most parameters in a separate class to simplify the handling of the large number of parameters b...
frame_parameters parameters(int current_time) const
Getters for the different parameters.
void start_animation(int start_time)
std::set< map_location > get_overlaped_hex(const frame_parameters &value, const map_location &src, const map_location &dst)
frame_parsed_parameters parameters_
bool need_minimal_update() const
int last_frame_begin_time_
particle(int start_time=0, const frame_builder &builder=frame_builder())
frame_parameters parameters(const frame_parameters &default_val) const
void redraw(const frame_parameters &value, const map_location &src, const map_location &dst, halo::manager &halo_man)
bool invalidate(frame_parameters &value)
void set_max_animation_time(int time)
int get_animation_time_potential() const
std::vector< config > primary_attack_filter_
std::vector< map_location::direction > directions_
std::vector< int > value2_
bool need_minimal_update() 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 color_t text_color={0, 0, 0}, const bool accelerate=true)
int get_animation_time() const
bool animation_finished_potential() const
std::vector< config > secondary_unit_filter_
void add_frame(int duration, const unit_frame &value, bool force_change=false)
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
t_translation::ter_list terrain_types_
frame_parameters get_current_params(const frame_parameters &default_val=frame_parameters()) const
std::vector< std::string > event_
int get_current_frame_begin_time() const
std::vector< int > value_
std::string debug() const
void update_last_draw_time()
std::map< std::string, particle > sub_anims_
void update_parameters(const map_location &src, const map_location &dst)
std::vector< std::string > get_flags() const
int get_begin_time() const
void redraw(frame_parameters &value, halo::manager &halo_man)
std::set< map_location > overlaped_hex_
const unit_frame & get_last_frame() const
friend std::ostream & operator<<(std::ostream &outstream, const unit_animation &u_animation)
static void fill_initial_animations(std::vector< unit_animation > &animations, const config &cfg)
std::vector< config > secondary_attack_filter_
std::vector< config > unit_filter_
static void add_anims(std::vector< unit_animation > &animations, const config &cfg)
std::vector< strike_result::type > hits_
int time_to_tick(int animation_time) const
bool animation_finished() const
void replace_anim_if_invalid(unit_const_ptr 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 color_t text_color={0, 0, 0}, const strike_result::type hit_type=strike_result::type::invalid, const_attack_ptr attack=nullptr, const_attack_ptr second_attack=nullptr, int value2=0)
void wait_until(int animation_time) const
int get_animation_time() const
bool has_animation(unit_const_ptr 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, const strike_result::type hit_type=strike_result::type::invalid, const_attack_ptr attack=nullptr, const_attack_ptr second_attack=nullptr, int value2=0) const
has_animation : return an boolean value if animated unit present and have animation specified,...
std::vector< anim_elem > animated_units_
void wait_for_end() const
void add_animation(unit_const_ptr animated_unit, const unit_animation *animation, const map_location &src=map_location::null_location(), bool with_bars=false, const std::string &text="", const color_t text_color={0, 0, 0})
int get_animation_time_potential() const
Describes a unit's animation sequence.
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:
This class represents a single unit of a specific type.
Definitions for the interface to Wesnoth Markup Language (WML).
Frame for unit's animation sequence.
std::shared_ptr< halo_record > handle
std::vector< terrain_code > ter_list
std::shared_ptr< const unit > unit_const_ptr
std::shared_ptr< const attack_type > const_attack_ptr
rect dst
Location on the final composed sheet.
rect src
Non-transparent portion of the surface to compose.
The basic class for representing 8-bit RGB or RGBA colour values.
All parameters from a frame at a given instant.
Encapsulates the map of the game.
static const map_location & null_location()
const unit_animation * animation