[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.