Amos Professional Manual  Contents  Index

Hardware Sprites


For example:

E> Load "AMOSPro Tutorial:Objects/Sprites.Abk"
   Flash Off : Get Sprite Palette
   Curs Off : Cls 0
   Sprite 8,200,100,1
   Wait Key
   Sprite 8,,150,1
   Wait Key
   Sprite 8,250,,1
   Wait Key
   Sprite 8,,,2

DEL SPRITE
instruction: delete an image from the Object Bank
Del Sprite number
Del Sprite first To last

The DEL SPRITE command permanently deletes one or more Sprite images from the Object Bank. To erase a single image, simply give the image number to be deleted, like this:

X> Del Sprite 2

Whenever an image is deleted, all the subsequent images in the Bank are moved up one place in the numerical order. For instance, if the Bank originally contained four images, the above example would remove image number 2 from memory, leaving a gap between images 1 and 3. This gap would be filled immediately, as the old image numbers 3 and 4 were shunted up one place, to become the new image numbers 2 and 3.

If more than one image is to be removed from the Bank, you can set the range from the first image to the last after a DEL SPRITE command. The following example would delete Sprite images 4,5,6 and 7:

X> Del Sprite 4 To 7

After the last image has been deleted from the Object Bank, the entire Bank is erased automatically.

INS SPRITE
instruction: insert a blank Sprite image into the Object bank
Ins Sprite number
Ins Sprite first To last

INS SPRITE inserts a blank image at the numbered position in the current Object Bank. All of the images after this numbered position will then be moved down one place in the numerical order. The second version of this command allows you to create several spaces in a single operation, by giving the range of new gaps between the first and last image numbers that you specify.

Back    Next
07.01.05