API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

ISPRITE_SETDESTINATION()

Brew Release
Brew MP 1.0.2
See Also
ISPRITE_DrawSprites(), ISPRITE_DrawTiles()
Description
This function is used to tell the sprite engine where to render sprites and tiles. ISPRITE_DrawSprites() and ISPRITE_DrawTiles both use this bitmap for the destination.
Passing NULL for pbmDst will force the sprite engine to release the existing destination bitmap.
Params
po
[in]:
Pointer to ISprite interface.
pbmDst
[in]:
Bitmap to be used for destination in drawing operations.
Interface
  • ISPRITE
Prototype
  •    int ISPRITE_SetDestination(ISprite *po, IBitmap *pbmDst);
    
Return
  • SUCCESS: if successful.
Side Effect
  • None
Comments
The sprite engine will call AddRef and Release appropriately on the bitmap. This way, the caller is free to call Release on the bitmap and forget about it. The bitmap will be deallocated when the sprite engine is done with the bitmap. The destination bitmap must support the ITranform interface in order for any sort of transformation to be applied. Typically, the destination bitmap is either the device bitmap or another bitmap that is compatible with the device bitmap.