Amos Professional Manual  Contents  Index

Blitter Objects


The PRIORITY REVERSE ON command changes around the entire priority table based on Bob numbers. Not only does it give a lower Bob number priority over a higher Bob number, when used with PRIORITY ON it also gives priority to a Bob with the lowest y-coordinate. As you would expect, PRIORITY REVERSE OFF sets the priority system back to normal.

Bobs and screens
AMOS Professional offers a full range of commands to allow Bobs and screens to interact.

LIMIT BOB
instruction: limit Bob to part of screen
Limit Bob x1 ,y1 To x2,y2
Limit Bob number,x1,y1 To x2,y2
Limit Bob

This command keeps all Bobs restricted to moving inside an invisible rectangular area of the screen, whose coordinates are set by the usual top left to bottom right-hand corner coordinates. If LIMIT BOB is followed with a Bob number, then only that Bob becomes restricted by the boundaries of the rectangle.

Note that the width of the rectangle must always be wider than the width of the Bob, and that the x -coordinates are always rounded up to the nearest 16-pixel boundary. To keep Bob number 1 trapped inside an area, you would use something like this:

X> Limit Bob 1,10,0 To 320,100

Remember that a Bob must be called up with the BOB command before LIMIT BOB is used, otherwise the limitation will have no effect. To restore a Bob's freedom to move around the whole screen, use the command without any coordinates, like this:

X> Limit Bob

DOUBLE BUFFER
instruction: activate Double Buffering system
Double Buffer

Throughout this Chapter, extensive reference is made to the technique known as "double buffering". The DOUBLE BUFFER command creates an invisible copy of the current screen and stores it as a "logical screen". All graphics operations, including Bob movements, are now performed directly on this logical screen, without disturbing your existing display at all. This is because the existing display on your television screen is taken straight from the original screen area, now called the "physical screen".

Once the image has been re-drawn, the logical screen and physical screen are swapped over. The old logical screen is flicked onto the display, and the old physical screen is hidden away to become the new logical screen. The entire process now cycles continuously, producing a solid, smooth display, even when dozens of Bobs are moving on the same screen.

Back    Next
07.02.06