#include <SpriteEngine.h>
Collaboration diagram for AnimFrames:
Public Types | |
enum | OptimizationMode { optNONE = 0, optBUFFER = 1, optNO_MASK = 2 } |
Public Methods | |
AnimFrames (UInt16 numFrames, DmResID bitmapID, DmResID maskID = -1, Coord hotSpotX = 0, Coord hotSpotY = 0, OptimizationMode optimizationMode = optNONE) | |
Create an instance of AnimFrames. More... | |
~AnimFrames () | |
Destroy the AnimFrames and deallocate all used resources. More... | |
void | getBounds (Coord x, Coord y, RectangleType *bounds) const |
Get the screen space filled by the AnimFrames when it is placed at the specified coordinates. More... | |
Friends | |
class | Sprite |
Each Sprite is associated with an instance of AnimFrames. Several Sprites may share the same instance of AnimFrames if they have the same appearance. This is recommended, since it saves valuable resources.
All frames within an AnimFrames object share the same size, the same hotspot and the same mode of optimization.
Definition at line 45 of file SpriteEngine.h.
|
Definition at line 49 of file SpriteEngine.h. |
|
Create an instance of AnimFrames. The frames will be constructed from bitmap resources in a resource database. The bitmap families for the frames need to be stored at IDs bitmapID..(bitmapID + numFrames) - 1. The 1bpp bitmaps for the transparency masks need to be stored at IDs maskID..(maskID + numFrames) - 1.
Definition at line 31 of file SpriteEngine.cpp. |
|
Destroy the AnimFrames and deallocate all used resources.
Definition at line 111 of file SpriteEngine.cpp. |
|
Get the screen space filled by the AnimFrames when it is placed at the specified coordinates.
Definition at line 130 of file SpriteEngine.cpp. Referenced by Sprite::getBounds(). |
|
Definition at line 140 of file SpriteEngine.h. |