Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include once "fbgfx.bi"
- screenres 640,480, 32
- dim as integer mx, my, mb
- dim as single posX, posY, dx,dy,steps
- dim as integer x1, x2, y1, y2
- do
- getmouse(mx,my,,mb)
- if mb and fb.button_left then
- x1 = mx
- y1 = my
- end if
- if mb and fb.button_right then
- x2 = mx
- y2 = my
- end if
- dx = (x2 - x1)
- dy = (y2 - y1)
- if abs(dx)>=abs(dy) then
- steps = abs(dx)
- else
- steps = abs(dy)
- end if
- dx = dx / steps
- dy = dy / steps
- posX = x1
- posY = y1
- screenlock
- cls
- for i as integer = 1 to steps
- pset(posX, posY)
- posX += dx
- posY += dy
- next
- screenunlock
- sleep(3, 1)
- loop until multikey(fb.sc_escape)
- sleep
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement