Amos Professional Manual  Contents  Index

Hardware Sprites


Any of these new image spaces are completely empty, and so cannot be allocated to a Sprite Or displayed directly on screen while they are still blank. An actual image must first be grabbed into the Object Bank, using a GET SPRITE or GET BOB command. If this is not done, the appropriate error message will be given as soon as you try to access the empty image.

Both DEL SPRITE and INS SPRITE are provided to be used with the GET BOB and GET SPRITE commands. They allow you to modify and adjust your Sprite images from inside AMOS Professional programs, with complete freedom.

The Sprite Palette
Although Sprites are independent of the screen, the colours that they use are definitely not! So before displaying a Sprite image it is essential to grab the correct colours. All colours are taken from the standard 32 colour registers provided by the Amiga's hardware, but the precise registers to be used depend on the type of Sprite.

15-colour Sprites. These use colour registers 16 to 31, which may not be needed by 16-colour screens, but are vital when 32-colour and 64-colour modes are in use, ensuring that these Sprite images are.totally consistent with the screen background.

If you employ background screen graphics created with a commercial drawing package such as Deluxe Paint, you must ensure that your Sprite images use exactly the same colour values as the screen image. This presents no problem to AMOS Professional, and is achieved as follows.

Load the colour palette from an IFF file of the screen image directly into the AMOS Professional Object Editor, using the [Grabber] option to select any part of the picture. Please see Chapter 13.2 for full details. The correct colour values are copied directly to the Sprite Bank, and will be saved along with your images automatically.

It is also possible to display 32-colour image files on a 16-colour screen. Because the Bob and Sprite palettes are completely separate, colours 0 to 15 can be reserved for Bobs and colours 16 to 31 for Sprites.

3-colour Sprites. Things are a little more complex when using these, because each pair of Sprites uses its own set of colour registers, as follows:

Hardware Sprites    Transparent    Colour registers
0 and 1             16             17,18,19
2 and 3             20             21,22,23 
4 and 5             24             25,26,27 
6 and 7             28             29,30,31

Note that for each pair of Sprites there is one register that is assumed to be transparent, and three colour registers.

As has been explained, the hardware sprites used to create computed sprites will vary during the course of your program, so it is vital that the three colours used by each pair of hardware

Back    Next
07.01.06