Describe a unit's animation sequence. More...
#include <frame.hpp>
Public Member Functions | |
unit_frame (const frame_builder &builder=frame_builder()) | |
void | redraw (const int frame_time, bool on_start_time, bool in_scope_of_frame, const map_location &src, const map_location &dst, halo::handle &halo_id, halo::manager &halo_man, const frame_parameters &animation_val, const frame_parameters &engine_val) const |
const frame_parameters | merge_parameters (int current_time, const frame_parameters &animation_val, const frame_parameters &engine_val=frame_parameters()) const |
const frame_parameters | parameters (int current_time) const |
const frame_parameters | end_parameters () const |
int | duration () const |
bool | does_not_change () const |
bool | need_update () const |
std::set< map_location > | get_overlaped_hex (const int frame_time, const map_location &src, const map_location &dst, const frame_parameters &animation_val, const frame_parameters &engine_val) const |
std::vector< std::string > | debug_strings () const |
Private Attributes | |
frame_parsed_parameters | builder_ |
|
inline |
|
inline |
Definition at line 217 of file frame.hpp.
References builder_, and frame_parsed_parameters::debug_strings().
Referenced by operator<<().
|
inline |
Definition at line 214 of file frame.hpp.
References builder_, and frame_parsed_parameters::does_not_change().
Referenced by unit_animation::particule::particule(), and unit_animation::unit_animation().
|
inline |
Definition at line 213 of file frame.hpp.
References builder_, and frame_parsed_parameters::duration().
Referenced by end_parameters(), unit_animation::particule::particule(), and unit_animation::unit_animation().
|
inline |
Definition at line 211 of file frame.hpp.
References builder_, duration(), and frame_parsed_parameters::parameters().
std::set< map_location > unit_frame::get_overlaped_hex | ( | const int | frame_time, |
const map_location & | src, | ||
const map_location & | dst, | ||
const frame_parameters & | animation_val, | ||
const frame_parameters & | engine_val | ||
) | const |
Definition at line 751 of file frame.cpp.
References frame_parameters::auto_hflip, frame_parameters::auto_vflip, display::rect_of_hexes::begin(), sdl::create_rect(), frame_parameters::directional_x, frame_parameters::directional_y, display::rect_of_hexes::end(), map_location::get_direction(), image::locator::get_filename(), image::get_image(), display::get_location_x(), display::get_location_y(), map_location::get_relative_dir(), game_display::get_singleton(), display::get_singleton(), display::hex_size(), display::hexes_under_rect(), frame_parameters::image, frame_parameters::image_diagonal, frame_parameters::image_mod, image::is_in_hex(), image::locator::is_void(), merge_parameters(), map_location::NORTH, map_location::NORTH_EAST, map_location::NORTH_WEST, frame_parameters::offset, image::SCALED_TO_ZOOM, map_location::SOUTH, map_location::SOUTH_EAST, map_location::SOUTH_WEST, frame_parameters::x, and frame_parameters::y.
Referenced by unit_animation::particule::get_overlaped_hex().
const frame_parameters unit_frame::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
engine provides a default image to use for the unit when none is available
engine provides a default image to use for the unit when none is available
engine provides a string for "petrified" and "team color" modifications note that image_mod is the complete modification and halo_mod is only the TC part see unit.cpp, we know that and use it
the engine provide y modification for terrain with height adjust and flying units
engine provide a blend color for poisoned units
engine provide a blend color for poisoned units
engine provide a highlight ratio for selected units and visible "invisible" units
engine provides a submerge for units in water
the engine provide y modification for terrain with height adjust and flying units
the engine provide us with default value to compare with, we update if different
Definition at line 857 of file frame.cpp.
References frame_parameters::auto_hflip, frame_parameters::auto_vflip, frame_parameters::blend_ratio, frame_parameters::blend_with, builder_, frame_parameters::directional_x, frame_parameters::directional_y, frame_parameters::drawing_layer, frame_parameters::duration, image::locator::get_filename(), frame_parameters::halo, frame_parameters::halo_mod, frame_parameters::halo_x, frame_parameters::halo_y, frame_parameters::highlight_ratio, frame_parameters::image, frame_parameters::image_diagonal, frame_parameters::image_mod, image::locator::is_void(), display::LAYER_UNIT_DEFAULT, display::LAYER_UNIT_FIRST, display::max_rgb(), frame_parameters::offset, frame_parsed_parameters::parameters(), frame_parameters::primary_frame, frame_parameters::sound, frame_parameters::submerge, t_false, t_true, t_unset, frame_parameters::text, frame_parameters::text_color, tristate_to_bool(), frame_parameters::x, and frame_parameters::y.
Referenced by get_overlaped_hex(), unit_animation::particule::parameters(), and redraw().
|
inline |
Definition at line 215 of file frame.hpp.
References builder_, and frame_parsed_parameters::need_update().
|
inline |
Definition at line 210 of file frame.hpp.
References builder_, and frame_parsed_parameters::parameters().
void unit_frame::redraw | ( | const int | frame_time, |
bool | on_start_time, | ||
bool | in_scope_of_frame, | ||
const map_location & | src, | ||
const map_location & | dst, | ||
halo::handle & | halo_id, | ||
halo::manager & | halo_man, | ||
const frame_parameters & | animation_val, | ||
const frame_parameters & | engine_val | ||
) | const |
Definition at line 630 of file frame.cpp.
References halo::manager::add(), frame_parameters::auto_hflip, frame_parameters::auto_vflip, frame_parameters::blend_ratio, frame_parameters::blend_with, frame_parameters::directional_x, frame_parameters::directional_y, frame_parameters::drawing_layer, game_display::float_label(), ftofxp, image::locator::get_filename(), image::get_image(), display::get_location_x(), display::get_location_y(), map_location::get_relative_dir(), game_display::get_singleton(), display::get_singleton(), display::get_zoom_factor(), frame_parameters::halo, frame_parameters::halo_mod, frame_parameters::halo_x, frame_parameters::halo_y, display::hex_size(), frame_parameters::highlight_ratio, halo::HREVERSE, halo::HVREVERSE, frame_parameters::image, frame_parameters::image_diagonal, frame_parameters::image_mod, int_to_color(), image::locator::is_void(), display::LAYER_UNIT_FIRST, merge_parameters(), map_location::NDIRECTIONS, halo::NORMAL, map_location::NORTH, map_location::NORTH_EAST, map_location::NORTH_WEST, frame_parameters::offset, sound::play_sound(), display::render_image(), image::SCALED_TO_ZOOM, frame_parameters::sound, map_location::SOUTH, map_location::SOUTH_EAST, map_location::SOUTH_WEST, frame_parameters::submerge, frame_parameters::text, frame_parameters::text_color, halo::VREVERSE, frame_parameters::x, and frame_parameters::y.
Referenced by unit_animation::particule::redraw().
|
private |
Definition at line 219 of file frame.hpp.
Referenced by debug_strings(), does_not_change(), duration(), end_parameters(), merge_parameters(), need_update(), and parameters().