(C) 1998 AROS - The Amiga Research OS


NAME
#include <proto/graphics.h>

WORD GetSprite (sprite , pick )

LOCATION
In GfxBase at offset 68

SYNOPSIS
struct SimpleSprite * sprite
WORD pick

FUNCTION
Try to get a hardware sprite for the simple sprite manager. There are eight sprites available in the system and by calling this function you can allocate one for yourself. You have to call this function before talking to other sprite routines. If you want a 15 color sprite, you must allocate both sprites (see the manual!) and set the SPRITE_ATTACHED bit in the odd sprite's posctldata array.

INPUTS
sprite
pointer to a SimpleSprite structure
pick
number of the sprite (0-7) of -1 if you just want the next available sprite

RESULT
-1 - if the selected sprite is not available (pick was 0-7) or no further sprites are available (pick was -1). -1 will also be found in the SimpleSprite structure. 0-7: The sprite number of your allocated sprite. The number will also be foung in the SimpleSprite structure.

EXAMPLE

SEE ALSO
FreeSprite() ChangeSprite() MoveSprite() GetSprite() graphics/sprite.h

NOTES

BUGS
On some machines this will never return anything else than -1!

INTERNALS

HISTORY