[Contents] [index] [Help] [Retrace] [browse <] [Browse >]

During the operation of the docollision() routine, if you have enabled
boundary collisions for a GEL (by setting the least significant bit of its
hitmask) and it has crossed a boundary, the system calls the boundary
routine you have defined.  The system will call the routine once for every
GEL that has hit, or gone outside of the boundary.  The system will call
your routine with the following two arguments:

  * A pointer to the vsprite structure of the gel that hit the boundary

  * A flag word containing one to four bits set, representing top,
    bottom, left and right boundaries, telling you which of the
    boundaries it has hit or exceeded. To test these bits, compare to the
    constants TOPHIT, BOTTOMHIT, LEFTHIT, and RIGHTHIT.

See the vsprite example given earlier for an example of using boundary
collision.