Amos Professional Manual  Contents  Index

Detecting Collisions


HZONE
function: return the zone number under the specified hardware coordinates
number=Hzone(x,y)
number=Hzone(screen number,x,y)

The HZONE function is identical to ZONE, except for the fact that the position on screen is measured in hardware coordinates. This means that this function can be used to detect the presence of a hardware Sprite in one of the screen zones, in this format:

X> N=Hzone(X Sprite(n),Y Sprite(n))

MOUSE ZONE
function: test if mouse pointer has entered a zone
number=Mouse Zone

This is a short reminder that the MOUSE ZONE function is used to check whether the mouse pointer has entered a zone, as outlined in Chapter 5.8.

RESET ZONE
instruction: erase screen zone
Reset Zone
Reset Zone number

This command is used to nullify a zone created by the SET ZONE instruction. On its own, RESET ZONE permanently de-activates all zone settings, but if it is qualified by a zone number, only that zone will be erased. The RESET ZONE instruction does not return the memory allocated by RESERVE ZONE to the main program.

Back    Next
07.04.07