Amos Professional Manual  Contents  Index

Icons and Blocks


MAKE ICON MASK
instruction: set colour zero to transparent
Make Icon Mask
Make Icon Mask number

Normally, any Icons that are drawn on screen completely replace the existing background image, and the Icon appears in a rectangular box filled with colour zero. If you prefer to overlay Icons on top of the current graphics, a mask must be created. This is achieved by the MAKE ICON MASK command, and sets colour zero to transparent. All Icons in Bank 2 will be affected by this instruction, unless an optional Icon number is given, in which case only that Icon will be masked.

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

This command performs exactly the same task as the NO MASK instruction, explained in Chapter 7.2, except that it is used with Icons instead of Bobs.

Screen Blocks
Unlike Icons, graphic Blocks are not saved along with your programs, and the following BLOCK Instructions are used to hold and manipulate temporary graphics data. Blocks are extremely useful for setting up items such as dialogue boxes, by saving background pictures before new graphics are displayed. They can be used to create "tiles" for all sorts of entertainment programs, such as visual puzzles, as well as practical programs like identi-kits and architectural planners.

GET BLOCK
instruction: grab a screen Block into memory
Get Block number,x,y,width,height
Get Block number,x,y,width,height,mask

The GET BLOCK command is used to grab a rectangular area from the graphics on the current screen. First specify a Block number from 1 up to 65535, then set the coordinates of the top left- hand corner of the rectangle to be grabbed, followed by the number of pixels making up the width and height of the Block.

An optional mask code can be added after these parameters. If this code is set to zero, the Block will destroy and replace any graphics that used to occupy its position on screen. If the mask code is set to 1, the block is given a background mask, and colour zero becomes transparent.

PUT BLOCK
instruction: copy Block onto screen
Put Block number
Put Block number,x,y
Put Block number,x,y,bit-planes
Put Block number,x,y,bit-planes,blitter mode

To re-draw a Block at its original coordinates on the current screen, simply add the Block's identification number after the PUT BLOCK command.

Back    Next
07.07.03