home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1993 January / 64er_Magazin_93-01_1993_Markt__Technik_de.d64 / basicmaus (.txt) next >
Encoding:
Commodore BASIC  |  1993-01-01  |  389 b   |  22 lines

  1. 6 px=0
  2. 7 py=0
  3. 10 ox=x
  4. 20 oy=y
  5. 30 x=(peek(54297) and 127)
  6. 40 y=(peek(54298) and 127)
  7. 50 x = x - (x and 1)
  8. 60 y = y - (y and 1)
  9. 70 x=x/2
  10. 80 y=y/2
  11. 90 dx=x-ox
  12. 100 dy=y-oy
  13. 110 ifdx<-31 then px=px+64-dx:goto200
  14. 120 ifdy<-31 then py=py+64-dy:goto200
  15. 130 ifdx>31 then px=px-(64-dx):goto200
  16. 140 ifdy>31 then py=py-(64-dy):goto200
  17. 150 px=px+dx
  18. 160 py=py+dy
  19. 200 rem koordinaten stehen in px und py
  20. 910 printx,y,dx,dy,px,py
  21. 920 goto10
  22.