graphics/collision.bi

Summary
graphics/collision.bi
LicenseCopyright © 2007-2011, FreeBASIC Extended Library Development Group
ext.gfx
Functions
collision_rectQuickly determine if two FB.IMAGEs overlap or collide.

License

Copyright © 2007-2011, FreeBASIC Extended Library Development Group

Distributed under the FreeBASIC Extended Library Group license.  See accompanying file LICENSE.txt or copy at http://code.google.com/p/fb-extended-lib/wiki/License

ext.gfx

Summary
Functions
collision_rectQuickly determine if two FB.IMAGEs overlap or collide.

Functions

collision_rect

declare function collision_rect (byval img1 as const FB.IMAGE ptr,
byval x1 as integer,
byval y1 as integer,
byval img2 as const FB.IMAGE ptr,
byval x2 as integer,
byval y2 as integer) as ext.bool

Quickly determine if two FB.IMAGEs overlap or collide.

Parameters

img1the first image.
x1the x coordinate of the first image.
y1the y coordinate of the first image.
img2the second image.
x2the x coordinate of the second image.
y2the y coordinate of the second image.

Returns

ext.bool value, false means no collision, true is collision

declare function collision_rect (byval img1 as const FB.IMAGE ptr,
byval x1 as integer,
byval y1 as integer,
byval img2 as const FB.IMAGE ptr,
byval x2 as integer,
byval y2 as integer) as ext.bool
Quickly determine if two FB.IMAGEs overlap or collide.