doxygen, comments

This commit is contained in:
Hans Joachim Gurt 2007-08-21 23:34:34 +00:00
parent d9c02756e9
commit bd016f3e0a
2 changed files with 17 additions and 9 deletions

View file

@ -12,6 +12,9 @@
See the COPYING file for more details.
*/
//! @file animated.hpp
//! Animate units.
#ifndef ANIMATED_IMAGE_H_INCLUDED
#define ANIMATED_IMAGE_H_INCLUDED
@ -44,11 +47,12 @@ public:
animated(const std::vector<frame_description> &cfg, int start_time = 0,bool force_change =false);
// Adds a frame
//! Adds a frame to an animation.
void add_frame(int duration, const T& value,bool force_change =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
//! 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.
void start_animation(int start_time, bool cycles=false, double acceleration=1);
int get_begin_time() const;
@ -57,14 +61,15 @@ public:
void update_last_draw_time();
bool need_update() const;
//True if the current animation was finished
//! Returns true if the current animation was finished.
bool animation_finished() const;
bool animation_would_finish() const;
int get_animation_time() const;
//For the moment, all the following functions dont't use (or incorrectly) acceleration
//! @todo For the moment, all the following functions dont't use (or incorrectly use) acceleration
const int get_animation_duration() const;
const T& get_current_frame() const;
// get the next frame (or the current + shift frames)
//! Get the next frame (or the current + shift frames)
const T& get_next_frame(int shift = 1) const;
const int get_current_frame_begin_time() const;
const int get_current_frame_end_time() const;
@ -97,11 +102,11 @@ private:
int start_time_;
};
bool does_not_change_; // optimization for 1-frame permanent animations
bool does_not_change_; // Optimization for 1-frame permanent animations
bool started_;
std::vector<frame> frames_;
//these are only valid when anim is started
// These are only valid when anim is started
int start_tick_; // time at which we started
bool cycles_;
double acceleration_;

View file

@ -11,7 +11,10 @@
but WITHOUT ANY WARRANTY.
See the COPYING file for more details.
*/
*/
//! @file animated.i
//! Templates related to animations.
#include "global.hpp"