Public Member Functions | |
XFCIMPORT | ~XFcRLESprite () |
Destructor. | |
XFCEXPORT void | blit (XFcGLSurface *aSurface, XFcRectangle *aClipRect, INT32 aXPos, INT32 aYPos, INT32 aBlendMode=XFCBLEND_NONE, INT32 aBlendValue=255) |
Blits the RLE sprite to a surface. | |
XFCIMPORT void | blitAdditive (XFcGLSurface *aSurface, XFcRectangle *aClipRect, INT32 aXPos, INT32 aYPos, INT32 aAlpha=32) |
Blits the RLE sprite to a surface using additive blending. aAlpha should be in the range of 0-32. | |
XFCIMPORT void | blitMultiplicative (XFcGLSurface *aSurface, XFcRectangle *aClipRect, INT32 aXPos, INT32 aYPos, INT32 aAlpha=32) |
Blits the RLE sprite to a surface using multiplicative blending. | |
XFCIMPORT void | blitInverseMultiplicative (XFcGLSurface *aSurface, XFcRectangle *aClipRect, INT32 aXPos, INT32 aYPos, INT32 aAlpha=32) |
Blits the RLE sprite to a surface using inverse multiplicative blending. | |
XFCIMPORT INT32 | getWidth () |
Returns the width of actual image in this sprite. | |
XFCIMPORT INT32 | getHeight () |
Returns the height of actual image in this sprite. | |
XFCIMPORT INT32 | getXOffset () |
Returns the offset to the first colmn from the top left corner. | |
XFCIMPORT INT32 | getYOffset () |
Returns the offset to the first row from the top left corner. | |
XFCIMPORT void | setXOffset (INT32 aXOffset) |
Sets the offset to the first colmn from the top left corner. | |
XFCIMPORT void | setYOffset (INT32 aYOffset) |
Sets the offset to the first row from the top left corner. | |
XFCIMPORT INT32 * | getLineTable () |
Returns a pointer to the line table. | |
XFCIMPORT UINT16 * | getData () |
Returns a pointer to the compressed data. | |
XFCIMPORT INT32 | getDataLength () |
Returns the length of the compressed data. | |
Static Public Member Functions | |
XFCIMPORT XFcRLESprite * | create (XFcGLSurface *aSurface, UINT32 aBaseMask, UINT32 aBaseColor) |
Creates a RLE-compressed sprite from a surface. | |
XFCIMPORT XFcRLESprite * | create (INT32 aWidth, INT32 aHeight, INT32 aXOffset, INT32 aYOffset, INT32 *aLineTable, UINT16 *aData, INT32 aDataLength) |
Creates a RLE-compressed sprite from stored data. | |
Protected Member Functions | |
XFcRLESprite () | |
Protected constructor. | |
XFCIMPORT void | blitFast55X5 (XFcGLSurface *aSurface, XFcRectangle *aClipRect, INT32 aXPos, INT32 aYPos) |
Blits the RLE sprite to a surface, fast blitting for 55X5 format, no blending. | |
XFCIMPORT void | blitGeneric (XFcGLSurface *aSurface, XFcRectangle *aClipRect, INT32 aXPos, INT32 aYPos, INT32 aBlend, UINT32 aBlendValue) |
Blits the RLE sprite to a surface, supports all formats. | |
XFCIMPORT INT | initBlit (XFcRectangle *aClipRect, INT32 aYPos, INT32 aXPos, INT32 &aXs, INT32 &aXe, INT32 &aXt, INT32 &aYs, INT32 &aYe, INT32 &aYt) |
Inits the blitting of a RLESprite and calculates clipping extents. | |
Static Protected Member Functions | |
XFCIMPORT void | getExtents (XFcGLSurface *aSurface, XFcRectangle *aRectangle, UINT32 aBaseMask, UINT32 aBaseColor) |
Find the extents for RLE compression. | |
XFCIMPORT UINT32 | compressLine (UINT8 *aSource, UINT16 *aDestination, UINT32 aBaseMask, UINT32 aBaseColor, UINT32 aLineLength, INT32 aFormat, INT32 aBpp) |
Compresses a line from source to destination. | |
XFCIMPORT UINT32 | getSourceColor (UINT8 *aSource, INT32 aFormat, INT32 aBpp) |
Reads an UINT32 color value from UINT8 * buffer. | |
Protected Attributes | |
INT32 | mWidth |
Width of the sprite. | |
INT32 | mHeight |
Height of the sprite. | |
INT32 | mXOffset |
Offset to the first column from the top left corner. | |
INT32 | mYOffset |
Offset to the first row from the top left corner. | |
INT32 * | mLineTable |
Table of line start indices in the data. | |
UINT16 * | mData |
Compressed data. | |
INT32 | mDataLength |
Length of the compressed data (size in UINT16's). |
|
Destructor.
|
|
Protected constructor.
|
|
Blits the RLE sprite to a surface.
|
|
Blits the RLE sprite to a surface using additive blending. aAlpha should be in the range of 0-32.
|
|
Blits the RLE sprite to a surface, fast blitting for 55X5 format, no blending.
|
|
Blits the RLE sprite to a surface, supports all formats.
|
|
Blits the RLE sprite to a surface using inverse multiplicative blending.
|
|
Blits the RLE sprite to a surface using multiplicative blending.
|
|
Compresses a line from source to destination. Returns the amount of bytes in the compressed data. |
|
Creates a RLE-compressed sprite from stored data. This can be used for loading the XFcRLESprite from existing data.
|
|
Creates a RLE-compressed sprite from a surface. aBaseColor is the color that is compressed as transparent. aBaseMask defines which componets of the color are used in the comparison process, for instance aBaseMask 0xff000000 and aBaseColor 0 will compress (in ARGB color space) all those pixels whose alpha value is zero. To compress based on color (in RGB space), use aBaseMask 0xffffff and aBaseColor of any color you want to compress away. Also subsequent runs of the same color are compressed away, so simple images compress really well.
|
|
Returns a pointer to the compressed data.
|
|
Returns the length of the compressed data.
|
|
Find the extents for RLE compression. Areas outside these extents would be compressed away, so there's no point in storing them. |
|
Returns the height of actual image in this sprite.
|
|
Returns a pointer to the line table.
|
|
Reads an UINT32 color value from UINT8 * buffer.
|
|
Returns the width of actual image in this sprite.
|
|
Returns the offset to the first colmn from the top left corner.
|
|
Returns the offset to the first row from the top left corner.
|
|
Inits the blitting of a RLESprite and calculates clipping extents.
|
|
Sets the offset to the first colmn from the top left corner.
|
|
Sets the offset to the first row from the top left corner.
|
|
Compressed data.
|
|
Length of the compressed data (size in UINT16's).
|
|
Height of the sprite.
|
|
Table of line start indices in the data.
|
|
Width of the sprite.
|
|
Offset to the first column from the top left corner.
|
|
Offset to the first row from the top left corner.
|
![]() | ||||
![]() |
Confidential Copyright © 2002-2003 Fathammer | with doxygen by Dimitri van Heesch |