CLEAR ALL
BITMAP 1 LOAD "Floyd3.bmp"
SPRITE 1 BIND BITMAP 1
SPRITE 1 SHOW
SPRITE 1 TINT RGB(255,255,255)
SPRITE 1 CIRCLE ,RGB(255,255,0)
SPRITE 2 BIND BITMAP 1
SPRITE 2 SHOW
SPRITE 2 TINT RGB(255,255,255,128)
SPRITE 2 CIRCLE ,RGB(255,255,0)
x=640:y=400
dx=5:dy=5
DO
    SPRITE 2 MOVE x,y
    x=x+dx
    y=y+dy
    IF x<0 OR x>1280 THEN dx=-dx
    IF y<0 OR y>800 THEN dy=-dy
    LOCATE 1,1
    h=SPRITE.HIT(1,2)
    PRINT "Inside    : ";BIT.GET(h,3);"    "
    PRINT "Intersect : ";BIT.GET(h,2);"    "
    PRINT "Touch     : ";BIT.GET(h,1);"    "
    PAUSE
LOOP WHILE INKEY$=""
