Amos Professional Manual  Contents  Index

Blitter Objects


Unlike Sprites, which use complex hardware coordinates, Bobs are displayed using standard screen coordinates, measured from the top left-hand corner of the current screen. Set the position of your new Bob by giving it screen coordinates relative to the hot spot of your chosen image number. Hot spots are explained at the end of the last Chapter.

If the coordinates lie outside of the existing screen area, the Bob will not be displayed. So objects can be initialised off screen, ready to be moved into place during the course of your program.

Once a Bob has been positioned on screen, the coordinate values become optional. The values of any coordinate parameters that are omitted will be remembered from the last time they were set. In Chapter 7.6 it is explained how this technique is valuable for animating Bobs with AMAL, because it allows objects to be moved effortlessly, without disturbing any existing animation sequences. It is vital to include all commas in their normal positions if coordinate values are omitted, or a syntax error will be reported. For example:

D> Bob 1,160,100,1 : Rem Position Bob 1 at 160,100 using image1
   Bob 1,,150,1 : Rem Move Bob 1 down 50 pixels
   Bob 1,110,,1 : Rem Move Bob 1 50 pixels left
   Bob 1,,,2 : Rem Display new image 2 at Bob 1 current position

Before examining the next instant demonstration program, here is a step-by-step technique for correctly displaying a Bob.

X> Load Iff "Picture.IFF"

Alternatively, the default screen can be prepared by removing the flashing cursor from the display and filling the display with a large block of colour, usually black. For example:

X> Curs Off: Flash Off : Cls 0
Back    Next
07.02.02