Hi everyone,

I want to check if a line intersects with a rectangle so I can make a beam weapon for my game.

Does anyone have any nice little function or something?

something like..

TestLineIntersection( X1,Y1,X2,Y2 : integer; TestRect : trect ) : boolean;

once I've done this, I need to write a line pixel test routine against the image of the sprite in question and a quick bit of Bresenham's to tell me which pixels to test.