LOCKSPRITE |
Top Previous Next |
Syntax INT = LOCKSPRITE(sprite as POINTER) Description Locks a sprites buffer to allow direct memory access to the sprites image data. Parameters sprite - Sprite pointer returned by LoadSprite. Return value Returns the current lock count if the sprite could be locked or -1 on error. The lock count is incremented by 1 every time LOCKSPRITE is called and decremented by 1 every time UNLOCKSPRITE is called. If the lock count is greater then zero then this function simply returns the lock count for performance reasons. Remarks A locked sprite allows direct access to the image memory using standard pointers. Every call to LOCKSPRITE must be paired with a call to UNLOCKSPRITE or sprite drawing will fail. See Also: UNLOCKSPRITE, LOADSPRITE, GETSPRITEPITCH, GETSPRITEPOINTER Example usage DEF pBuffer as POINTER |