Go to the documentation of this file.
353 must_upt_label_status =
true;
366 must_upt_label_status =
true;
424 surface * target = NULL)
const;
502 return frame.size ();
513 return t_frame.size ();
524 return currentframe_;
534 currentframe_ = framenbr;
592 return &(frame[nbr]);
708 void calculate_dimensions ();
710 mutable vector <image *> t_frame;
711 mutable vector <animationframe> frame;
718 friend class win_anim;
s_int8 put(ogzstream &file) const
Saves an animation into an opened file, in game format, with alpha and mask values.
void clear()
Resets an animationframe to it's initial (i.e post-constructor) state.
s_int8 delete_frame(u_int16 pos)
Removes a frame at a given position.
Handles images properties in an animation.
s_int16 yoffset() const
Returns the global Y offset of the animation.
play_state playstate() const
Returns whether the animation is currently being played.
bool is_masked() const
Returns whether this frame is masked or not.
s_int8 delete_image(u_int16 pos)
Removes an image at a given position.
void zoom(u_int16 sx, u_int16 sy, const animation *src)
Zooms an animation.
void set_image_nbr(u_int16 imnbr)
Sets the image this frame should point to.
void draw(s_int16 x, s_int16 y, const drawing_area *da_opt=NULL, surface *target=NULL) const
Draw the object on the screen.
Class where drawables can actually be drawn to.
void set_offset(u_int16 ox, u_int16 oy)
Sets the offset for this frame.
Class to read data from a Gzip compressed file.
s_int8 load(string fname)
Loads an animation from it's filename.
u_int16 image_nbr() const
Returns the image number this frame points to.
void clear()
Clears an animation, that is put it back into the original (constructor) state.
s_int8 get(igzstream &file)
Loads an animationframe from an opened file.
Abstract class for drawable objects manipulation.
Class to write data from a Gzip compressed file.
void set_alpha(u_int8 a)
Sets the alpha value for this frame.
#define u_int8
8 bits long unsigned integer
void set_delay(u_int16 d)
Sets the duration of this frame.
#define s_int16
16 bits long signed integer
animation()
Default constructor.
void play()
Starts the playback of the animation.
void rewind()
Rewinds the animation to it's beginning.
~animationframe()
Destructor.
#define s_int8
8 bits long signed integer
u_int16 nbr_of_frames() const
Returns the number of frames in this animation.
u_int16 currentframe() const
Returns the index of the currently displayed frame.
u_int8 alpha() const
Returns the alpha value the this frame.
u_int16 nbr_of_images() const
Returns the number of images in this animation.
s_int8 insert_image(const image *im, u_int16 pos)
Inserts an image at a given position of the image array.
u_int16 nextframe() const
Returns the index of the frame that will be displayed once the delay of this one expired.
Declares the image class.
u_int16 delay() const
Returns the duration of this frame.
Image manipulation class.
Implements "drawing zones" for drawing operations.
void set_mask(bool mask)
Sets the mask parameter of this frame.
u_int16 offx() const
Returns the X offset (i.e position relative to the animation's position) of this frame.
animationframe * get_frame(u_int16 nbr)
Returns a pointer to a desired frame.
s_int8 put(ogzstream &file) const
Saves an animationframe into an opened file.
bool update()
Updates the animation state.
#define u_int16
16 bits long unsigned integer
void set_offset(s_int16 x, s_int16 y)
Set the global offsets of this animation.
void stop()
Stops the playback of the animation.
u_int16 offy() const
Returns the Y offset (i.e position relative to the animation's position) of this frame.
void next_frame()
Directly jumps to the next frame.
void set_currentframe(u_int16 framenbr)
Sets the current frame.
image * get_image(u_int16 nbr)
Returns a pointer to a desired image.
void copy(const animation &src)
Synonym of operator = to guarantee its access from Python.
s_int8 insert_frame(const animationframe af, u_int16 pos)
Inserts a frame at a given position of the animationframe array.
animationframe()
Default constructor.
void set_nextframe(u_int16 nf)
Sets the index of the frame that will be displayed right after this one.
animation & operator=(const animation &src)
Animation copy (similar to copy ()).
s_int16 xoffset() const
Returns the global X offset of the animation.
s_int8 save(string fname) const
Saves an animation into an file, in game format, with alpha and mask values.
s_int8 get(igzstream &file)
Loads an animation from an opened file.
Class that handles animated elements, their update and their playback.
play_state
Whether the animation is currently playing or not.