Overview Chapter

class CDXSprite

Constructors and Destructors
CDXSpriteAdded by janni.
CDXSpriteCreates a sprite object from a pointer to a CDXTile object holding the sprite's bitmap data.
CDXSpriteCreates the sprite object.
~CDXSpriteDestroys the surface and frees the memory.
Operations
BlkAlpha BlkAlpha.
BlkAlphaFast BlkAlphaFast.
BlkBlt Draws a Block sprite, no transparency.
BlkHFlip Flips the sprite horizontally.
BlkScaled BlkScaled - Draws a scaled sprite, no transparency.
BlkShadow BlkShadow.
BlkShadowFast BlkShadowFast.
BlkStretched BlkStretched - Draws a stretched transparent sprite.
BlkVFlip Vertically flips the sprite.
Create Creates a sprite object from a pointer to a CDXTile object holding the sprite's bitmap data.
Create Creates the sprite object.
Draw Staging area for all blit types.
Lock
SetAlphaValue
SetColorKey
SetColorKey
SetDelay
SetFrame
SetPos
SetShadowOffset Sets the offset of the shadow to use when bltting.
SetShadowValue
SetState
SetType
SetVel
SpriteHit Checks for collisions between sprites.
SpriteHitPixel CDXSprite::SpriteHitPixel - This function first performs a bounding box collision detection check and if the 2 bounding boxes are coliding it then performs a pixel level collision detection check.
TileHit Checks for collisions between the source sprite and tiles in a map.
TransAlpha TransAlpha.
TransAlphaFast TransAlphaFast.
TransAlphaMask Draws a transparent sprite.
TransBlt Draws a transparent sprite.
TransHFlip Transparently horizontally flips the sprite.
TransScaled TransScaled - Draws a scaled transparent sprite.
TransShadow TransShadow.
TransShadowFast TransShadowFast.
TransStretched TransStretched - Draws a stretched transparent sprite.
TransVFlip Transparently vertically flips the sprite.
UnLock
Init Initializes the class.
Overridables
   
                      
Data Members
public
WORD m_AlphaValue;
int m_Angle;The sprite's angle of rotation.
int m_Delay;Used for game timing, the time till the next frame.
BOOL m_Flipped;Is the sprite flipped?
int m_Frame;The current frame.
CDXSprite* m_Next;A CDXSprite pointer to the next sprite in a CDXSpriteList.
int m_PosX;The sprite's X position.
int m_PosY;The sprite's Y position.
int m_PosZ;
CDXSprite* m_Prev;A CDXSprite pointer to the previous sprite in a CDXSpriteList.
float m_ScaleFactor;The amount by which to scale the sprite if Drawing with CDXBLT_XXXSCALED.
LONG m_ShadowOffsetX;
LONG m_ShadowOffsetY;
WORD m_ShadowValue;
int m_State;User defined state. Walking, jumping, etc.
WORD m_StretchedHeight;Used to define the height of the stretched sprite.
WORD m_StretchedWidth;Used to define the width of the stretched sprite.
CDXTile* m_Tile;A CDXTile pointer to the sprite's bitmap data.
BOOL m_TileCreated;
int m_Type;User defined type. Health, weapon, etc.
int m_VelX;The sprite's X velocity.
int m_VelY;The sprite's Y velocity.