CRM32Pro SDK  v5.22
Classes | Macros
MODULE 12: CSprite v4.22, sprite engine class.

Detailed Description


CSprite supports all stuff related to manage and draw sprites:
- sprites with independent number of animations and frames
- animation features
- frame features
- easy to set a position
- auto animation
- special effects: flip,mirror,rotate and scale
- alpha per surface and colorkey
- alpha per pixel

We advice you to use EditorDPF to modify/add/delete sprites and its features.

Classes

class  CRM32Pro_CSprite
 CSprite. More...
 

Macros

#define GetSpriteHighState(x)   (x & ~0x00FF)
 Macro to get the sprite animation high-state. See above SPRSTATE_xx.
 
#define GetSpriteLowState(x)   (x & ~0xFF00)
 Macro to get the sprite animation low-state. Each high-state can have until 256 low-states defined by the user.
 
#define SPRANIM_KEEP_PROPERTIES   0xAAA
 To maintain current value. See SetAnimProperties() to further information.
 
#define SPREFFECT_FLIP   1
 Sprite is rendered using flip effect.
 
#define SPREFFECT_MIRROR   2
 Sprite is rendered using mirror effect.
 
#define SPREFFECT_NONE   0
 Sprite is rendered without any special effect.
 
#define SPREFFECT_RESIZE   3
 Sprite is rendered using resize effect.
 
#define SPREFFECT_ROTATE   4
 Sprite is rendered using rotation effect.
 
#define SPREFFECT_ROTATERESIZE   5
 Sprite is rendered using rotation and resize effect.
 
#define SPRSTATE_DOWN   0x2000
 Sprite animation high-state: down (00100000-00000000)
 
#define SPRSTATE_DOWNLEFT   0x0100
 Sprite animation high-state: down-left (00000001-00000000)
 
#define SPRSTATE_DOWNRIGHT   0xC000
 Sprite animation high-state: down-right (11000000-00000000)
 
#define SPRSTATE_LEFT   0x1000
 Sprite animation high-state: left (00010000-00000000)
 
#define SPRSTATE_NORMAL   0x8000
 Sprite animation high-state: normal (10000000-00000000)
 
#define SPRSTATE_RIGHT   0x0800
 Sprite animation high-state: right (00001000-00000000)
 
#define SPRSTATE_UP   0x4000
 Sprite animation high-state: up (01000000-00000000)
 
#define SPRSTATE_UPLEFT   0x0400
 Sprite animation high-state: up-left (00000100-00000000)
 
#define SPRSTATE_UPRIGHT   0x0200
 Sprite animation high-state: up-right (00000010-00000000)
 
#define SPRTYPE_LOOP   2
 Sprite animation type: loop.
 
#define SPRTYPE_ONESHOT   8
 Sprite animation type: one shot.
 
#define SPRTYPE_PINGPONG   4
 Sprite animation type: ping-pong.