#include <unit_frame.hpp>
Public Member Functions | |
unit_frame (const frame_builder builder=frame_builder()) | |
void | redraw (const int frame_time, bool first_time, const gamemap::location &src, const gamemap::location &dst, int *halo_id, 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(), bool primary=false) const |
const frame_parameters | parameters (int current_time) const |
int | duration () const |
bool | does_not_change () const |
bool | need_update () const |
void | invalidate (const int frame_time, const gamemap::location &src, const gamemap::location &dst, const frame_parameters &animation_val, const frame_parameters &engine_val, const bool primary) const |
Private Attributes | |
frame_builder | builder_ |
Definition at line 176 of file unit_frame.hpp.
unit_frame::unit_frame | ( | const frame_builder | builder = frame_builder() |
) | [inline] |
Definition at line 179 of file unit_frame.hpp.
void unit_frame::redraw | ( | const int | frame_time, | |
bool | first_time, | |||
const gamemap::location & | src, | |||
const gamemap::location & | dst, | |||
int * | halo_id, | |||
const frame_parameters & | animation_val, | |||
const frame_parameters & | engine_val | |||
) | const |
Definition at line 320 of file unit_frame.cpp.
References halo::add(), frame_parameters::blend_ratio, frame_parameters::blend_with, game_display::float_label(), ftofxp, gamemap::get_drawing_order(), image::locator::get_filename(), image::get_image(), display::get_location_x(), display::get_location_y(), gamemap::location::get_relative_dir(), game_display::get_singleton(), display::get_zoom_factor(), frame_parameters::halo, 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, image::locator::is_void(), merge_parameters(), gamemap::location::NDIRECTIONS, halo::NO_HALO, halo::NORMAL, gamemap::location::NORTH, gamemap::location::NORTH_EAST, gamemap::location::NORTH_WEST, frame_parameters::offset, sound::play_sound(), halo::remove(), display::render_unit_image(), image::SCALED_TO_ZOOM, frame_parameters::sound, gamemap::location::SOUTH, gamemap::location::SOUTH_EAST, gamemap::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().
const frame_parameters unit_frame::merge_parameters | ( | int | current_time, | |
const frame_parameters & | animation_val, | |||
const frame_parameters & | engine_val = frame_parameters() , |
|||
bool | primary = false | |||
) | const |
this function merges the value provided by * the frame * the engine (poison, flying unit...) * the animation as a whole there is no absolute rule for merging, so creativity is the rule if a value is never provided by the engine, assert. (this way if it becomes used, people will easily find the right place to look)
Definition at line 459 of file unit_frame.cpp.
References frame_parameters::blend_ratio, frame_parameters::blend_with, builder_, frame_parameters::duration, image::locator::get_filename(), frame_parameters::halo, 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(), frame_parameters::offset, frame_builder::parameters(), frame_parameters::sound, frame_parameters::submerge, frame_parameters::text, frame_parameters::text_color, frame_parameters::x, and frame_parameters::y.
Referenced by invalidate(), unit_animation::particule::parameters(), and redraw().
const frame_parameters unit_frame::parameters | ( | int | current_time | ) | const [inline] |
Definition at line 182 of file unit_frame.hpp.
References builder_, and frame_builder::parameters().
int unit_frame::duration | ( | ) | const [inline] |
Definition at line 184 of file unit_frame.hpp.
References builder_, and frame_builder::duration().
Referenced by unit_animation::particule::particule(), and unit_animation::unit_animation().
bool unit_frame::does_not_change | ( | ) | const [inline] |
Definition at line 185 of file unit_frame.hpp.
References builder_, and frame_builder::does_not_change().
Referenced by unit_animation::particule::particule(), and unit_animation::unit_animation().
bool unit_frame::need_update | ( | ) | const [inline] |
Definition at line 186 of file unit_frame.hpp.
References builder_, and frame_builder::need_update().
void unit_frame::invalidate | ( | const int | frame_time, | |
const gamemap::location & | src, | |||
const gamemap::location & | dst, | |||
const frame_parameters & | animation_val, | |||
const frame_parameters & | engine_val, | |||
const bool | primary | |||
) | const |
Definition at line 410 of file unit_frame.cpp.
References image::locator::get_filename(), image::get_image(), display::get_location_x(), display::get_location_y(), gamemap::location::get_relative_dir(), game_display::get_singleton(), display::hex_size(), frame_parameters::image, frame_parameters::image_diagonal, game_display::invalidate(), display::invalidate_zone(), image::locator::is_void(), merge_parameters(), gamemap::location::NORTH, frame_parameters::offset, image::SCALED_TO_ZOOM, gamemap::location::SOUTH, frame_parameters::x, and frame_parameters::y.
Referenced by unit_animation::particule::invalidate().
frame_builder unit_frame::builder_ [private] |
Definition at line 189 of file unit_frame.hpp.
Referenced by does_not_change(), duration(), merge_parameters(), need_update(), and parameters().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |