#include <SpriteEngine.h>
Collaboration diagram for Sprite:
Public Methods | |
Sprite (DmResID bitmapID, DmResID maskID = -1, Coord hotSpotX = 0, Coord hotSpotY = 0, Boolean visible = true, AnimFrames::OptimizationMode optimizationMode = AnimFrames::optNONE) | |
Create a Sprite with no animation. More... | |
Sprite (AnimFrames& animFrames, Boolean visible = true) | |
Create an animated sprite with the specified AnimFrames. More... | |
~Sprite () | |
Destroy the Sprite and deallocate all used resources. More... | |
void | show () |
Show the sprite during subsequent draws. More... | |
void | hide () |
Hide the sprite during subsequent draws. More... | |
Boolean | setVisibility (Boolean visible) |
Set the visibility of the sprite through a flag. More... | |
Boolean | isVisible () const |
Will the sprite be drawn during subsequent draws? More... | |
void | setFrame (UInt16 frameIndex) |
Set the displayed frame of the Sprite. More... | |
void | move (Coord x, Coord y) |
Move the sprite (i.e. More... | |
void | draw (RectangleType *bounds = NULL) const |
Draw the sprite at its current location. More... | |
void | getBounds (RectangleType *bounds) const |
Get the screen space filled by the sprite. More... | |
Friends | |
class | SpriteGroup |
a movable graphical object with a transparent background.
Definition at line 149 of file SpriteEngine.h.
|
Create a Sprite with no animation. The required AnimFrames object will be created implicitly, and will automatically be destroyed when the sprite is destroyed.
Definition at line 253 of file SpriteEngine.cpp. |
|
Create an animated sprite with the specified AnimFrames. Ownership of the AnimFrames object is NOT transferred to the Sprite. It will not automatically be destroyed when the Sprite is destroyed.
Definition at line 264 of file SpriteEngine.cpp. |
|
Destroy the Sprite and deallocate all used resources.
Definition at line 275 of file SpriteEngine.cpp. |
|
Draw the sprite at its current location. Inquire the current draw window and allocate draw buffers as neccessary.
Definition at line 322 of file SpriteEngine.cpp. |
|
Get the screen space filled by the sprite.
Definition at line 341 of file SpriteEngine.cpp. Referenced by SpriteGroup::addSprite(). |
|
Hide the sprite during subsequent draws.
Definition at line 288 of file SpriteEngine.cpp. |
|
Will the sprite be drawn during subsequent draws?
Definition at line 303 of file SpriteEngine.cpp. Referenced by DemoActionEngine::nextPeriod(). |
|
Move the sprite (i.e. its hotspot) to the specified coordinates. Definition at line 315 of file SpriteEngine.cpp. Referenced by Sprite(), DemoActionEngine::nextPeriod(), and DemoActionEngine::restoreState(). |
|
Set the displayed frame of the Sprite.
Definition at line 309 of file SpriteEngine.cpp. Referenced by Sprite(), and DemoActionEngine::nextPeriod(). |
|
Set the visibility of the sprite through a flag.
Definition at line 294 of file SpriteEngine.cpp. Referenced by DemoActionEngine::nextPeriod(). |
|
Show the sprite during subsequent draws.
Definition at line 282 of file SpriteEngine.cpp. |
|
Definition at line 266 of file SpriteEngine.h. |