keep most parameters in a separate class to simplify handling of large number of parameters handling is common for frame level and animation level More...
#include <frame.hpp>
Public Member Functions | |
frame_parsed_parameters (const frame_builder &builder=frame_builder(), int override_duration=0) | |
void | override (int duration, const std::string &highlight="", const std::string &blend_ratio="", Uint32 blend_color=0, const std::string &offset="", const std::string &layer="", const std::string &modifiers="") |
allow easy chained modifications will raised assert if used after initialization More... | |
const frame_parameters | parameters (int current_time) const |
getters for the different parameters More... | |
int | duration () const |
bool | does_not_change () const |
bool | need_update () const |
std::vector< std::string > | debug_strings () const |
keep most parameters in a separate class to simplify handling of large number of parameters handling is common for frame level and animation level
frame_parsed_parameters::frame_parsed_parameters | ( | const frame_builder & | builder = frame_builder() , |
int | override_duration = 0 |
||
) |
std::vector< std::string > frame_parsed_parameters::debug_strings | ( | ) | const |
Definition at line 593 of file frame.cpp.
References auto_hflip_, auto_vflip_, blend_ratio_, blend_with_, directional_x_, directional_y_, drawing_layer_, duration_, progressive_string::get_original(), progressive_image::get_original(), progressive_< T >::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_, t_false, t_true, text_, text_color_, x_, and y_.
Referenced by unit_frame::debug_strings().
bool frame_parsed_parameters::does_not_change | ( | ) | const |
Definition at line 478 of file frame.cpp.
References blend_ratio_, directional_x_, directional_y_, progressive_string::does_not_change(), progressive_image::does_not_change(), progressive_< 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(), and unit_animation::particule::particule().
|
inline |
Definition at line 173 of file frame.hpp.
References duration_.
Referenced by unit_frame::duration(), and override().
bool frame_parsed_parameters::need_update | ( | ) | const |
Definition at line 495 of file frame.cpp.
References blend_ratio_, directional_x_, directional_y_, progressive_string::does_not_change(), progressive_image::does_not_change(), progressive_< 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::need_update().
void frame_parsed_parameters::override | ( | int | duration, |
const std::string & | highlight = "" , |
||
const std::string & | blend_ratio = "" , |
||
Uint32 | blend_color = 0 , |
||
const std::string & | offset = "" , |
||
const std::string & | layer = "" , |
||
const std::string & | modifiers = "" |
||
) |
allow easy chained modifications will raised assert if used after initialization
Definition at line 546 of file frame.cpp.
References blend_ratio_, blend_with_, directional_x_, directional_y_, drawing_layer_, duration(), duration_, progressive_string::get_original(), progressive_image::get_original(), progressive_< T >::get_original(), halo_, halo_x_, halo_y_, highlight_ratio_, image_, image_diagonal_, image_mod_, offset_, submerge_, x_, and y_.
Referenced by unit_animation::particule::override().
const frame_parameters frame_parsed_parameters::parameters | ( | int | current_time | ) | const |
getters for the different parameters
Definition at line 516 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_, progressive_string::get_current_element(), progressive_image::get_current_element(), progressive_< 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_, display::LAYER_UNIT_DEFAULT, display::LAYER_UNIT_FIRST, 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_, frame_parameters::x, x_, frame_parameters::y, and y_.
Referenced by unit_frame::end_parameters(), unit_frame::merge_parameters(), unit_animation::particule::parameters(), and unit_frame::parameters().
|
private |
Definition at line 199 of file frame.hpp.
Referenced by debug_strings(), and parameters().
|
private |
Definition at line 198 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(), need_update(), override(), and parameters().
|
private |
Definition at line 189 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(), need_update(), override(), and parameters().
|
private |
Definition at line 197 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), need_update(), override(), and parameters().
|
private |
Definition at line 201 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), need_update(), override(), and parameters().
|
private |
Definition at line 178 of file frame.hpp.
Referenced by debug_strings(), duration(), override(), and parameters().
|
private |
Definition at line 182 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), need_update(), override(), and parameters().
|
private |
Definition at line 185 of file frame.hpp.
Referenced by debug_strings(), and parameters().
|
private |
Definition at line 183 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), need_update(), override(), and parameters().
|
private |
Definition at line 184 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), need_update(), override(), and parameters().
|
private |
Definition at line 191 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), need_update(), override(), and parameters().
|
private |
Definition at line 179 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), need_update(), override(), and parameters().
|
private |
Definition at line 180 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), need_update(), override(), and parameters().
|
private |
Definition at line 181 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(), need_update(), override(), and parameters().
|
private |
Definition at line 200 of file frame.hpp.
Referenced by debug_strings(), and parameters().
|
private |
Definition at line 186 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(), need_update(), override(), and parameters().
|
private |
Definition at line 187 of file frame.hpp.
Referenced by debug_strings(), and parameters().
|
private |
Definition at line 188 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(), need_update(), override(), and parameters().
|
private |
Definition at line 195 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), need_update(), override(), and parameters().