Keep most parameters in a separate class to simplify the handling of the large number of parameters between the frame level and animation level. More...
#include <frame.hpp>
Public Member Functions | |
frame_parsed_parameters (const frame_builder &builder=frame_builder(), const std::chrono::milliseconds &override_duration=std::chrono::milliseconds{0}) | |
void | override (const std::chrono::milliseconds &duration, const std::string &highlight="", const std::string &blend_ratio="", color_t blend_color={0, 0, 0}, const std::string &offset="", const std::string &layer="", const std::string &modifiers="") |
frame_parameters | parameters (const std::chrono::milliseconds ¤t_time) const |
Getters for the different parameters. More... | |
const std::chrono::milliseconds & | duration () const |
bool | does_not_change () const |
bool | need_update () const |
std::vector< std::string > | debug_strings () const |
Contents of frame in strings. More... | |
Private Attributes | |
std::chrono::milliseconds | duration_ |
progressive_image | image_ |
progressive_image | image_diagonal_ |
std::string | image_mod_ |
progressive_string | halo_ |
progressive_int | halo_x_ |
progressive_int | halo_y_ |
std::string | halo_mod_ |
std::string | sound_ |
std::string | text_ |
utils::optional< color_t > | text_color_ |
utils::optional< color_t > | blend_with_ |
progressive_double | blend_ratio_ |
progressive_double | highlight_ratio_ |
progressive_double | offset_ |
progressive_double | submerge_ |
progressive_int | x_ |
progressive_int | y_ |
progressive_int | directional_x_ |
progressive_int | directional_y_ |
boost::tribool | auto_vflip_ |
boost::tribool | auto_hflip_ |
boost::tribool | primary_frame_ |
progressive_int | drawing_layer_ |
Keep most parameters in a separate class to simplify the handling of the large number of parameters between the frame level and animation level.
frame_parsed_parameters::frame_parsed_parameters | ( | const frame_builder & | builder = frame_builder() , |
const std::chrono::milliseconds & | override_duration = std::chrono::milliseconds{0} |
||
) |
std::vector< std::string > frame_parsed_parameters::debug_strings | ( | ) | const |
Contents of frame in strings.
Definition at line 388 of file frame.cpp.
References auto_hflip_, auto_vflip_, blend_ratio_, blend_with_, utils::bool_string(), directional_x_, directional_y_, drawing_layer_, duration_, progressive_base< T, D >::get_original(), utils::half_signed_value(), halo_, halo_mod_, halo_x_, halo_y_, highlight_ratio_, image_, image_diagonal_, image_mod_, offset_, primary_frame_, sound_, submerge_, text_, text_color_, x_, and y_.
Referenced by unit_frame::debug_strings().
bool frame_parsed_parameters::does_not_change | ( | ) | const |
Definition at line 253 of file frame.cpp.
References blend_ratio_, directional_x_, directional_y_, progressive_base< T, D >::does_not_change(), progressive_pair< T >::does_not_change(), drawing_layer_, halo_, halo_x_, halo_y_, highlight_ratio_, image_, image_diagonal_, offset_, submerge_, x_, and y_.
Referenced by unit_frame::does_not_change(), need_update(), and unit_animation::particle::particle().
|
inline |
Definition at line 164 of file frame.hpp.
References duration_.
Referenced by unit_frame::duration(), and override().
bool frame_parsed_parameters::need_update | ( | ) | const |
Definition at line 272 of file frame.cpp.
References does_not_change().
Referenced by unit_frame::need_update().
void frame_parsed_parameters::override | ( | const std::chrono::milliseconds & | duration, |
const std::string & | highlight = "" , |
||
const std::string & | blend_ratio = "" , |
||
color_t | blend_color = {0,0,0} , |
||
const std::string & | offset = "" , |
||
const std::string & | layer = "" , |
||
const std::string & | modifiers = "" |
||
) |
Definition at line 336 of file frame.cpp.
References blend_ratio_, blend_with_, directional_x_, directional_y_, drawing_layer_, duration(), duration_, progressive_base< T, D >::get_original(), halo_, halo_x_, halo_y_, highlight_ratio_, image_, image_diagonal_, image_mod_, offset_, submerge_, x_, and y_.
Referenced by unit_animation::particle::override().
frame_parameters frame_parsed_parameters::parameters | ( | const std::chrono::milliseconds & | current_time | ) | const |
Getters for the different parameters.
Definition at line 277 of file frame.cpp.
References frame_parameters::auto_hflip, auto_hflip_, frame_parameters::auto_vflip, auto_vflip_, frame_parameters::blend_ratio, blend_ratio_, frame_parameters::blend_with, blend_with_, frame_parameters::directional_x, directional_x_, frame_parameters::directional_y, directional_y_, frame_parameters::drawing_layer, drawing_layer_, frame_parameters::duration, duration_, get_abs_frame_layer(), progressive_pair< T >::get_current_element(), progressive_single< T >::get_current_element(), frame_parameters::halo, halo_, frame_parameters::halo_mod, halo_mod_, frame_parameters::halo_x, halo_x_, frame_parameters::halo_y, halo_y_, frame_parameters::highlight_ratio, highlight_ratio_, frame_parameters::image, image_, frame_parameters::image_diagonal, image_diagonal_, frame_parameters::image_mod, image_mod_, frame_parameters::offset, offset_, frame_parameters::primary_frame, primary_frame_, frame_parameters::sound, sound_, frame_parameters::submerge, submerge_, frame_parameters::text, text_, frame_parameters::text_color, text_color_, unit_default, frame_parameters::x, x_, frame_parameters::y, and y_.
Referenced by unit_frame::end_parameters(), unit_frame::merge_parameters(), unit_animation::particle::parameters(), and unit_frame::parameters().
|
private |
Definition at line 200 of file frame.hpp.
Referenced by debug_strings(), and parameters().
|
private |
Definition at line 199 of file frame.hpp.
Referenced by debug_strings(), and parameters().
|
private |
Definition at line 190 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), override(), and parameters().
|
private |
Definition at line 188 of file frame.hpp.
Referenced by debug_strings(), override(), and parameters().
|
private |
Definition at line 196 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), override(), and parameters().
|
private |
Definition at line 197 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), override(), and parameters().
|
private |
Definition at line 203 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), override(), and parameters().
|
private |
Definition at line 172 of file frame.hpp.
Referenced by debug_strings(), duration(), override(), and parameters().
|
private |
Definition at line 179 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), override(), and parameters().
|
private |
Definition at line 183 of file frame.hpp.
Referenced by debug_strings(), and parameters().
|
private |
Definition at line 180 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), override(), and parameters().
|
private |
Definition at line 181 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), override(), and parameters().
|
private |
Definition at line 191 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), override(), and parameters().
|
private |
Definition at line 174 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), override(), and parameters().
|
private |
Definition at line 175 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), override(), and parameters().
|
private |
Definition at line 177 of file frame.hpp.
Referenced by debug_strings(), override(), and parameters().
|
private |
Definition at line 192 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), override(), and parameters().
|
private |
Definition at line 201 of file frame.hpp.
Referenced by debug_strings(), and parameters().
|
private |
Definition at line 184 of file frame.hpp.
Referenced by debug_strings(), and parameters().
|
private |
Definition at line 193 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), override(), and parameters().
|
private |
Definition at line 185 of file frame.hpp.
Referenced by debug_strings(), and parameters().
|
private |
Definition at line 187 of file frame.hpp.
Referenced by debug_strings(), and parameters().
|
private |
Definition at line 194 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), override(), and parameters().
|
private |
Definition at line 195 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), override(), and parameters().