![]() |
CRM64Pro GDK v0.18.0
A free cross-platform game development kit built on top of SDL 3.0
|
Sprite Object class.
Public Member Functions | |
| bool | info (Sint32 iMode=0) override |
| Request Sprite object information. | |
| const string & | getName () const override |
| Get the name. | |
| Sint32 | getID () const override |
| Get the ID. | |
| Sint32 | assignImage (Sint32 idImage, Sint32 iOwnership=0) |
| Assign an Image to this sprite. | |
| Sint32 | getImage () const |
| Get the assigned Image of this sprite. | |
| bool | setOffset (Sint32 iX, Sint32 iY) |
| Set the sprite offsets for creating the animations and frames. | |
| bool | getOffset (Sint32 *iX, Sint32 *iY) const |
| Get the sprite offsets (frames and animations). | |
| bool | pause () |
| Pause the sprite animation. | |
| bool | resume () |
| Resume from a previous paused sprite animation. | |
| eGeneralStatus | status () const |
| Get the sprite status. | |
| bool | setSpeed (float fSpeed) |
| Set the sprite speed. | |
| Sint32 | getAnimCount () const |
| Get number of animations. | |
| Sint32 | getAnimCurrent () const |
| Get current animation state. | |
| Sint32 | getAnimCurrentIndex () const |
| Get current animation index. | |
| bool | selectAnim (Uint16 iState) |
| Select an animation by state. | |
| bool | selectAnimIndex (Sint32 iIndex) |
| Select an animation by index. | |
| bool | setAnimType (Uint16 iState, eSpriteType eType) |
| Set the animation type by state. | |
| bool | setAnimTypeIndex (Sint32 iIndex, eSpriteType eType) |
| Set the animation type by index. | |
| Sint32 | getAnimType (Uint16 iState, eSpriteType *pType) const |
| Get the animation type by state. | |
| Sint32 | getAnimTypeIndex (Sint32 iIndex, eSpriteType *pType) const |
| Get the animation type by index. | |
| bool | setAnimStateIndex (Sint32 iIndex, Uint16 iState) |
| Set the animation state by index. | |
| Sint32 | getAnimStateIndex (Sint32 iIndex, Uint16 *iState) const |
| Get the animation state by index. | |
| bool | orderAnimState (Sint32 iState=-1) |
| Sequentially re-indexes the low-state IDs for animations to ensure a contiguous sequence. | |
| bool | setAnimHotSpot (Uint16 iState, Sint32 iHotX, Sint32 iHotY) |
| Set the animation hotspot by state. | |
| bool | setAnimHotSpotIndex (Sint32 iIndex, Sint32 iHotX, Sint32 iHotY) |
| Set the animation hotspot by index. | |
| Sint32 | getAnimHotSpot (Uint16 iState, Sint32 *iHotX, Sint32 *iHotY) const |
| Get the animation hotspot by state. | |
| Sint32 | getAnimHotSpotIndex (Sint32 iIndex, Sint32 *iHotX, Sint32 *iHotY) const |
| Get the animation hotspot by index. | |
| bool | setAnimRange (Uint16 iState, Sint32 iFrameStart, Sint32 iFrameEnd) |
| Set the animation frame range by state. | |
| bool | setAnimRangeIndex (Sint32 iIndex, Sint32 iFrameStart, Sint32 iFrameEnd) |
| Set the animation frame range by index. | |
| Sint32 | getAnimRange (Uint16 iState, Sint32 *iFrameStart, Sint32 *iFrameEnd) const |
| Get the animation frame range by state. | |
| Sint32 | getAnimRangeIndex (Sint32 iIndex, Sint32 *iFrameStart, Sint32 *iFrameEnd) const |
| Get the animation frame range by index. | |
| Sint32 | getFrameCount (Uint16 iState) const |
| Get number of frames for the given animation by state. | |
| Sint32 | getFrameCountIndex (Sint32 iIndex) const |
| Get number of frames for the given animation by index. | |
| Sint32 | getFrameCurrent () const |
| Get current frame number for the given animation. | |
| bool | selectFrame (Uint16 iState, Sint32 iFrame) |
| Select a frame for the given animation by state. | |
| bool | selectFrameIndex (Sint32 iIndex, Sint32 iFrame) |
| Select a frame for the given animation by index. | |
| bool | setFrameTime (Uint16 iState, Sint32 iFrame, Uint16 iTime) |
| Set the frame time duration by state. | |
| bool | setFrameTimeIndex (Sint32 iIndex, Sint32 iFrame, Uint16 iTime) |
| Set the frame time duration by index. | |
| Sint32 | getFrameTime (Uint16 iState, Sint32 iFrame, Uint16 *iTime) const |
| Get the frame time duration by state. | |
| Sint32 | getFrameTimeIndex (Sint32 iIndex, Sint32 iFrame, Uint16 *iTime) const |
| Get the frame time duration by index. | |
| bool | setPosition (float fX, float fY, bool bInterpolate=false) |
| Set the sprite position. | |
| float | getX () const |
| Get the sprite X position. | |
| float | getY () const |
| Get the sprite Y position. | |
| Sint32 | render (Sint32 idRes=0) |
| Render the sprite. | |
| Sint32 | renderEx (float fScaleX=1.0f, float fScaleY=1.0f, double dAngle=0.0, const SDL_FPoint *pCenter=nullptr, SDL_FlipMode rf=SDL_FLIP_NONE, Sint32 idRes=0) |
| Render the sprite with extended options. | |
| Sint32 | save (const string &sCDCFile, const string &sResourceName="") |
| Save the sprite to a CDC file. | |
| Sint32 | save (Sint32 idCDC, const string &sResourceName="") |
| Save the sprite to a CDC file. | |