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