WoopsiUI::Animation Class Reference
#include <animation.h>
List of all members.
Detailed Description
Class for creating sequences of bitmaps.
Member Enumeration Documentation
Animation loop type enum.
- Enumerator:
ANIMATION_LOOPTYPE_NONE |
Animation will not loop
|
ANIMATION_LOOPTYPE_LOOP |
Animation will loop
|
ANIMATION_LOOPTYPE_PINGPONG |
Animation will loop ping-pong style
|
Constructor & Destructor Documentation
Animation::Animation |
( |
const u8 |
speed, |
|
|
const LoopType |
loopType, |
|
|
const u16 |
loops | |
|
) |
| | |
Constructor.
- Parameters:
-
| speed | Default speed of the animation. |
| loopType | The loop type used by the animation. |
| loops | The number of loops the animation should play through. |
WoopsiUI::Animation::~Animation |
( |
|
) |
[inline] |
Member Function Documentation
void Animation::addFrame |
( |
const u16 * |
bitmap, |
|
|
const u16 |
width, |
|
|
const u16 |
height, |
|
|
const u8 |
delay | |
|
) |
| | |
Add a new frame to the animation.
- Parameters:
-
| bitmap | Pointer to the bitmap to use in the new frame. |
| width | The width of the bitmap. |
| height | The height of the bitmap. |
| delay | A frame-specific delay to make this frame appear longer than other frames (measured in VBLs). |
const u16* WoopsiUI::Animation::getCurrentBitmap |
( |
|
) |
const [inline] |
Get the bitmap from the current animation frame.
- Returns:
- The current frame's bitmap.
const AnimFrame* WoopsiUI::Animation::getCurrentFrame |
( |
|
) |
const [inline] |
Get the current animation frame.
- Returns:
- The current animation frame.
const u16 WoopsiUI::Animation::getFrameCount |
( |
|
) |
const [inline] |
Gets the total number of frames in the animation.
- Returns:
- The total number of frames.
const LoopType WoopsiUI::Animation::getLoopType |
( |
|
) |
const [inline] |
Get the animation's loop type.
- Returns:
- The animation's loop type.
const u8 WoopsiUI::Animation::getSpeed |
( |
|
) |
const [inline] |
Get the speed of the animation.
- Returns:
- The animation speed.
const Status WoopsiUI::Animation::getStatus |
( |
|
) |
const [inline] |
Get the current status of the animation - stopped, playing or paused.
- Returns:
- The current animation status.
const u16 WoopsiUI::Animation::getTimeToNextFrame |
( |
|
) |
const [inline] |
Get the number of VBLs until the next frame is displayed. This includes any delay that the current frame specifies.
- Returns:
- The number of VBLs until the next frame.
void Animation::goToFrame |
( |
u16 |
frame |
) |
|
Jump to the specified frame.
- Parameters:
-
| frame | The frame to jump to. |
void WoopsiUI::Animation::pause |
( |
|
) |
[inline] |
Run the animation. Should be called every frame.
void WoopsiUI::Animation::setLoopType |
( |
const LoopType |
loopType |
) |
[inline] |
Set the loop type of the animation.
- Parameters:
-
| loopType | The new loop type. |
void WoopsiUI::Animation::setSpeed |
( |
const u8 |
speed |
) |
[inline] |
Set the speed of the animation.
- Parameters:
-
| speed | The new speed of the animation. |
Stop the animation - does not reset the current frame as doing so will cause the animation to jump back to the first frame when it ends.
The documentation for this class was generated from the following files:
- C:/Documents and Settings/Administrator/Desktop/woopsi-src-0.39/Woopsi/woopsi/animation.h
- C:/Documents and Settings/Administrator/Desktop/woopsi-src-0.39/Woopsi/woopsi/animation.cpp