Attempt to get a sprite for the simple sprite manager.
Source position: agraphics.pas line 2361
function GetSprite( |
Sprite: PSimpleSprite; |
Num: LongInt |
):LongInt; |
Sprite |
|
A Pointer to programmers SimpleSprite structure. |
If pick is 0-7 attempt to allocate the sprite. If the sprite is already allocated then return -1. If pick -1 allocate the next sprite starting search at 0. If no sprites are available return -1 and fill -1 in num entry of SimpleSprite structure. If the sprite is available for allocation, mark it allocated and fill in the 'num' entry of the SimpleSprite structure. If successful return the sprite number.
Attempt to allocate one of the eight sprites for private use with the simple sprite manager. This must be done before using further calls to the simple sprite machine. If the programmer wants to use 15 color sprites, they must allocate both sprites and set the SPRITE_ATTACHED bit in the odd sprite's posctldata array.
On some machines this will never return anything else than -1!
|
Return sprite for use by others and virtual sprite machine. |
|
|
Change the sprite image pointer. |
|
|
Move sprite to a point relative to top of viewport. |