Amos Professional Manual  Contents  Index

Blitter Objects


AMOS Professional provides many alternative methods of moving Bobs, and each Bob can display a sequence of different images to create animation. When animating Bobs with AMAL, it is possible to loose track of the precise image currently displayed, so the next function has been supplied to rectify this.

I BOB
function: get image number used by a Bob
image=IBob(number)

I BOB returns the number of the image currently assigned to the specified Bob number. If the Bob number you want to examine does not exist, an illegal function error will be given, so it is vital to define the Bob correctly before calling I BOB. Here is an example:

E> Load "AMOSPro Tutorial:Objects/Bobs.abk"
   Flash Off : Get Bob Palette : Double Buffer : Autoback 0
   Bob 1,160,100,1: Rem Display Bob 1 at centre of screen
   Do
    For IMAGE=1 To Length(1) : Rem Create simple animation
     Rem Move Bob 1 with the mouse
     Bob 1,X Screen(X Mouse),Y Screen(Y Mouse),IMAGE
     For W=0 To 3 : Wait Vbl : Next W
     Rem Display image number on screen
     Locate 0,0 : Print "Image ";I Bob(1);" ";
    Next IMAGE
   Loop

GET BOB PALETTE
instruction: load image colours into current screen
Get Bob Palette
Get Bob Palette mask

This command loads the whole colour palette used for your Bobs into the current screen. A mask can be added if you like, which will load a selection of these colours only. Each individual colour is represented by one "bit" of the mask being set to a zero (off) or a one (on). Colours run from right to left, so that colour zero is represented by the bit at the right-hand end of the mask, colour 1 is second from the right, and so on. Supposing there are 16 colours in your Bob palette, you would copy the first four colours like this:

X> Get Bob Palette %0000000000001111

Unmasking Bobs

NO MASK
instruction: remove colour zero mask from Bob
No Mask number

Back    Next
07.02.04