MReboundParticles CoordinateList.l,NumPoints.l,DirectionList.l,DetectSize.w ; Bounce off edges (NOT Ptr.l!!!)

This command will attempt to bounce moving particles off of the edges of the
bitmap or clip window. The size of the border of detection is defined with
DetectSize.w. This is how close to the edge a pixel must be before its direction
will be reversed. Note that pixels need to be at least within the border in order
to cause this action, and care should be taken to ensure the border is wide
enough to trap even the fastest moving particles. CoordinateList.l points to a
list of X.w,Y.w or X.q,Y.q pairs of coordinates and DirectionList.l points to a
list of Xmove.w,Ymove.w or xmove.q,ymove.q pairs of movement adders. If the
routie detects that a pixel is close enough to the edge of the bitmap or clip
window, the corresponding Xmove and Ymove will be negated, which brings about a
reversing of direction. Not that there is NO support for Ptr.l particles with
rebound because you need seperate X and Y positions in order for the rebound to
work properly, so if you are in Ptr.l mode nothing will happen. Please refer to
MParticleFormat which you should call before performing your particle operations
to be sure of the list format.



converted with guide2html by Kochtopf