#include <animated.hpp>
Classes | |
| struct | frame |
Public Types | |
| typedef std::pair< int, T > | frame_description |
| typedef std::vector < frame_description > | anim_description |
Public Member Functions | |
| animated (int start_time=0) | |
| virtual | ~animated () |
| animated (const std::vector< frame_description > &cfg, int start_time=0, bool force_change=false) | |
| void | add_frame (int duration, const T &value, bool force_change=false) |
| Adds a frame to an animation. More... | |
| void | start_animation (int start_time, bool cycles=false) |
| Starts an animation cycle. More... | |
| void | pause_animation () |
| void | restart_animation () |
| int | get_begin_time () const |
| int | get_end_time () const |
| void | set_begin_time (int new_begin_time) |
| int | time_to_tick (int animation_time) const |
| int | tick_to_time (int animation_tick) const |
| void | update_last_draw_time (double acceleration=0) |
| bool | need_update () const |
| bool | cycles () const |
| bool | animation_finished () const |
| Returns true if the current animation was finished. More... | |
| bool | animation_finished_potential () const |
| int | get_animation_time () const |
| int | get_animation_time_potential () const |
| void | set_animation_time (int time) |
| int | get_animation_duration () const |
| const T & | get_current_frame () const |
| int | get_current_frame_begin_time () const |
| int | get_current_frame_end_time () const |
| int | get_current_frame_duration () const |
| int | get_current_frame_time () const |
| const T & | get_first_frame () const |
| const T & | get_frame (size_t n) const |
| const T & | get_last_frame () const |
| size_t | get_frames_count () const |
| void | force_change () |
| bool | does_not_change () const |
Static Public Attributes | |
| static const T | void_value_ |
Protected Member Functions | |
| void | remove_frames_until (int starting_time) |
| void | set_end_time (int ending_time) |
Protected Attributes | |
| int | starting_frame_time_ |
Private Attributes | |
| bool | does_not_change_ |
| bool | started_ |
| bool | force_next_update_ |
| std::vector< frame > | frames_ |
| int | start_tick_ |
| bool | cycles_ |
| double | acceleration_ |
| int | last_update_tick_ |
| int | current_frame_key_ |
Friends | |
| class | unit_animation |
Definition at line 39 of file animated.hpp.
| typedef std::vector<frame_description> animated< T, T_void_value >::anim_description |
Definition at line 48 of file animated.hpp.
| typedef std::pair<int,T> animated< T, T_void_value >::frame_description |
Definition at line 47 of file animated.hpp.
| animated< T, T_void_value >::animated | ( | int | start_time = 0 | ) |
|
inlinevirtual |
Definition at line 44 of file animated.hpp.
| animated< T, T_void_value >::animated | ( | const std::vector< frame_description > & | cfg, |
| int | start_time = 0, |
||
| bool | force_change = false |
||
| ) |
| void animated< T, T_void_value >::add_frame | ( | int | duration, |
| const T & | value, | ||
| bool | force_change = false |
||
| ) |
Adds a frame to an animation.
Referenced by unit_animation::add_frame(), display::init_flags_for_side_internal(), terrain_builder::load_images(), terrain_builder::rebuild_terrain(), and unit_animation::start_animation().
| bool animated< T, T_void_value >::animation_finished | ( | ) | const |
Returns true if the current animation was finished.
Referenced by unit_animation::animation_finished(), and halo::halo_impl::effect::expired().
| bool animated< T, T_void_value >::animation_finished_potential | ( | ) | const |
Referenced by unit_animation::animation_finished_potential().
|
inline |
Definition at line 75 of file animated.hpp.
Referenced by halo::halo_impl::effect::expired().
|
inline |
Definition at line 95 of file animated.hpp.
Referenced by halo::halo_impl::effect::does_change().
|
inline |
Definition at line 94 of file animated.hpp.
| int animated< T, T_void_value >::get_animation_duration | ( | ) | const |
| int animated< T, T_void_value >::get_animation_time | ( | ) | const |
Referenced by unit_animation::get_animation_time().
| int animated< T, T_void_value >::get_animation_time_potential | ( | ) | const |
Referenced by unit_animation::get_animation_time_potential().
| int animated< T, T_void_value >::get_begin_time | ( | ) | const |
Referenced by unit_animation::get_begin_time().
| const T& animated< T, T_void_value >::get_current_frame | ( | ) | const |
Referenced by halo::halo_impl::effect::current_image().
| int animated< T, T_void_value >::get_current_frame_begin_time | ( | ) | const |
Referenced by unit_animation::get_current_frame_begin_time().
| int animated< T, T_void_value >::get_current_frame_duration | ( | ) | const |
| int animated< T, T_void_value >::get_current_frame_end_time | ( | ) | const |
| int animated< T, T_void_value >::get_current_frame_time | ( | ) | const |
| int animated< T, T_void_value >::get_end_time | ( | ) | const |
Referenced by unit_animation::get_end_time(), and display::init_flags_for_side_internal().
| const T& animated< T, T_void_value >::get_first_frame | ( | ) | const |
| const T& animated< T, T_void_value >::get_frame | ( | size_t | n | ) | const |
Referenced by operator<<(), and terrain_builder::tile::rebuild_cache().
| size_t animated< T, T_void_value >::get_frames_count | ( | ) | const |
Referenced by terrain_builder::load_images(), operator<<(), and terrain_builder::tile::rebuild_cache().
| const T& animated< T, T_void_value >::get_last_frame | ( | ) | const |
Referenced by unit_animation::get_last_frame().
| bool animated< T, T_void_value >::need_update | ( | ) | const |
Referenced by halo::halo_impl::effect::need_update(), and terrain_builder::update_animation().
|
inline |
Definition at line 62 of file animated.hpp.
Referenced by unit_animation::pause_animation().
|
protected |
|
inline |
Definition at line 63 of file animated.hpp.
Referenced by unit_animation::restart_animation().
| void animated< T, T_void_value >::set_animation_time | ( | int | time | ) |
| void animated< T, T_void_value >::set_begin_time | ( | int | new_begin_time | ) |
|
protected |
| void animated< T, T_void_value >::start_animation | ( | int | start_time, |
| bool | cycles = false |
||
| ) |
Starts an animation cycle.
The first frame of the animation to start may be set to any value by using a start_time different to 0.
Referenced by halo::halo_impl::effect::effect(), display::init_flags_for_side_internal(), terrain_builder::load_images(), terrain_builder::rebuild_terrain(), and unit_animation::particule::start_animation().
| int animated< T, T_void_value >::tick_to_time | ( | int | animation_tick | ) | const |
| int animated< T, T_void_value >::time_to_tick | ( | int | animation_time | ) | const |
Referenced by unit_animation::time_to_tick().
| void animated< T, T_void_value >::update_last_draw_time | ( | double | acceleration = 0 | ) |
Referenced by terrain_builder::update_animation(), and unit_animation::update_last_draw_time().
|
friend |
Definition at line 100 of file animated.hpp.
|
private |
Definition at line 130 of file animated.hpp.
|
private |
Definition at line 132 of file animated.hpp.
|
private |
Definition at line 129 of file animated.hpp.
Referenced by animated< unit_frame >::cycles().
|
private |
Definition at line 122 of file animated.hpp.
Referenced by animated< unit_frame >::does_not_change(), and animated< unit_frame >::force_change().
|
private |
Definition at line 124 of file animated.hpp.
|
private |
Definition at line 125 of file animated.hpp.
|
private |
Definition at line 131 of file animated.hpp.
|
private |
Definition at line 128 of file animated.hpp.
Referenced by animated< unit_frame >::restart_animation().
|
private |
Definition at line 123 of file animated.hpp.
Referenced by animated< unit_frame >::pause_animation(), and animated< unit_frame >::restart_animation().
|
protected |
Definition at line 101 of file animated.hpp.
|
static |
Definition at line 97 of file animated.hpp.
1.8.8