#include <aniobject.h>
Public Types | |
enum | Mode { kModeContinuous, kModeOnce } |
Public Member Functions | |
ANIObject (const ANIFile &ani) | |
ANIObject (const CMPFile &cmp) | |
void | setVisible (bool visible) |
bool | isVisible () const |
void | setPause (bool pause) |
bool | isPaused () const |
void | setMode (Mode mode) |
virtual void | setPosition () |
virtual void | setPosition (int16 x, int16 y) |
void | getPosition (int16 &x, int16 &y) const |
void | getFramePosition (int16 &x, int16 &y, uint16 n=0) const |
void | getFrameSize (int16 &width, int16 &height, uint16 n=0) const |
bool | isIn (int16 x, int16 y) const |
bool | isIn (const ANIObject &obj) const |
void | setAnimation (uint16 animation) |
void | rewind () |
void | setFrame (uint16 frame) |
uint16 | getAnimation () const |
uint16 | getFrame () const |
bool | lastFrame () const |
virtual bool | draw (Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) |
virtual bool | clear (Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) |
virtual void | advance () |
Additional Inherited Members | |
Protected Member Functions inherited from Gob::BackBuffer | |
void | trashBuffer () |
void | resizeBuffer (uint16 width, uint16 height) |
bool | saveScreen (const Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) |
bool | restoreScreen (Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) |
bool | hasBuffer () const |
bool | hasSavedBackground () const |
An ANI object, controlling an animation within an ANI file.
enum Gob::ANIObject::Mode |
Gob::ANIObject::ANIObject | ( | const ANIFile & | ani | ) |
Create an animation object from an ANI file.
Gob::ANIObject::ANIObject | ( | const CMPFile & | cmp | ) |
Create an animation object from a CMP sprite.
void Gob::ANIObject::setVisible | ( | bool | visible | ) |
Make the object visible/invisible.
bool Gob::ANIObject::isVisible | ( | ) | const |
Is the object currently visible?
void Gob::ANIObject::setPause | ( | bool | pause | ) |
Pause/Unpause the animation.
bool Gob::ANIObject::isPaused | ( | ) | const |
Is the animation currently paused?
void Gob::ANIObject::setMode | ( | Mode | mode | ) |
Set the animation mode.
|
virtual |
Set the current position to the animation's default.
|
virtual |
Set the current position.
Reimplemented in Gob::Geisha::Mouth.
void Gob::ANIObject::getPosition | ( | int16 & | x, |
int16 & | y | ||
) | const |
Return the current position.
void Gob::ANIObject::getFramePosition | ( | int16 & | x, |
int16 & | y, | ||
uint16 | n = 0 |
||
) | const |
Return the frame position after another n frames.
void Gob::ANIObject::getFrameSize | ( | int16 & | width, |
int16 & | height, | ||
uint16 | n = 0 |
||
) | const |
Return the current frame size after another n frames.
bool Gob::ANIObject::isIn | ( | int16 | x, |
int16 | y | ||
) | const |
Are there coordinates within the animation sprite?
bool Gob::ANIObject::isIn | ( | const ANIObject & | obj | ) | const |
Is this object within the animation sprite?
void Gob::ANIObject::setAnimation | ( | uint16 | animation | ) |
Set the animation number.
void Gob::ANIObject::rewind | ( | ) |
Rewind the current animation to the first frame.
void Gob::ANIObject::setFrame | ( | uint16 | frame | ) |
Set the animation to a specific frame.
uint16 Gob::ANIObject::getAnimation | ( | ) | const |
Return the current animation number.
uint16 Gob::ANIObject::getFrame | ( | ) | const |
Return the current frame number.
bool Gob::ANIObject::lastFrame | ( | ) | const |
Is this the last frame within this animation cycle?
|
virtual |
Draw the current frame onto the surface and return the affected rectangle.
Reimplemented in Gob::OnceUpon::Stork, and Gob::Geisha::Mouth.
|
virtual |
Draw the current frame from the surface and return the affected rectangle.
Reimplemented in Gob::OnceUpon::Stork, and Gob::Geisha::Mouth.
|
virtual |
Advance the animation to the next frame.
Reimplemented in Gob::OnceUpon::Stork, Gob::Geisha::Submarine, Gob::Geisha::EvilFish, Gob::Geisha::Oko, Gob::OnceUpon::CharGenChild, and Gob::Geisha::Mouth.