drawbox (0, 0, 30, 20, 7)
takepic (0, 0, 100, 100, enterprise)
loop
Input.KeyDown (chars)
locate (1, 1)
if chars ('w') then
cls
drawpic (enterprise_move_lr, enterprise_move_ud, enterprise, 0)
enterprise_move_ud += 5
if enterprise_move_ud > 449 then
enterprise_move_ud := 449
end if
delay (10)
end if
if chars ('s') then
cls
drawpic (enterprise_move_lr, enterprise_move_ud, enterprise, 0)
enterprise_move_ud -= 5
if enterprise_move_ud < 10 then
enterprise_move_ud := 10
end if
delay (10)
end if
if chars ('d') then
cls
drawpic (enterprise_move_lr, enterprise_move_ud, enterprise, 0)
enterprise_move_lr += 5
if enterprise_move_lr > 605 then
enterprise_move_lr := 605
end if
delay (10)
end if
if chars ('a') then
cls
drawpic (enterprise_move_lr, enterprise_move_ud, enterprise, 0)
enterprise_move_lr -= 5
if enterprise_move_lr < 0 then
enterprise_move_lr := 0
end if
delay (10)
end if
mousewhere (click_x, click_y, click_c)
if click_c = 1 then
drawline (enterprise_move_lr + 10, enterprise_move_ud + 15, click_x, click_y, 4)
delay (15)
cls
drawpic (enterprise_move_lr, enterprise_move_ud, enterprise, 0)
end if
if chars('e') then
photon_x := enterprise_move_lr
photon_y := enterprise_move_ud - 5
photon_x2 := enterprise_move_lr + 5
photon_y2 := enterprise_move_ud
var photon : array 1 .. sizepic (photon_x, photon_y, photon_x2, photon_y2) of int
drawbox (photon_x, photon_y, photon_x2, photon_y2, 7)
takepic (photon_x, photon_y, photon_x2, photon_y2, photon)
loop
photon_x += 5
photon_x2 += 5
drawpic (photon_x, photon_y, photon, 0)
delay (10)
cls
drawpic (enterprise_move_lr, enterprise_move_ud, enterprise, 0)
delay (10)
exit when photon_x > 640
end loop
end if |