home *** CD-ROM | disk | FTP | other *** search
/ Transactor / Transactor_26_1988_Transactor_Publishing.d64 / seam.pal (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  854b  |  47 lines

  1. 100 sys 700 ;pal 64
  2. 110 .opt oo
  3. 120 ;  "seam"
  4. 130 ; puts a sprite anywhere
  5. 140 ; on the screen
  6. 150 ; put x/2 in xpos,
  7. 160 ; y in ylo,
  8. 170 ; and sprite # in xpsnum.
  9. 180 ;
  10. 190 seam =* ;uses xpos, ylo, xpsnum
  11. 200 lda #0
  12. 210 sta xhi
  13. 220 lda xpos
  14. 230 asl
  15. 240 rol xhi ;holds high bit
  16. 250 seam2 =* ;uses xlo, xhi, ylo, xpsnum
  17. 260 sta xlo
  18. 270 lda xpsnum
  19. 280 asl: tax
  20. 290 lda ylo
  21. 300 sta 53249,x
  22. 310 lda xlo
  23. 320 sta 53248,x
  24. 330 lda xhi
  25. 340 bne xpn1
  26. 350 ;clear high bit
  27. 360 ldx xpsnum
  28. 370 lda #255
  29. 380 sec
  30. 390 sbc xpnum,x
  31. 400 and 53264
  32. 410 sta 53264
  33. 420 rts
  34. 430 xpn1 =* ;set high bit
  35. 440 ldx xpsnum
  36. 450 lda 53264
  37. 460 ora xpnum,x
  38. 470 sta 53264
  39. 480 rts
  40. 490 ;
  41. 500 xpos   .byte 80  ;sprite x pos / 2
  42. 510 ylo    .byte 120 ;y position
  43. 520 xlo    .byte 100 ;sprite x pos low
  44. 530 xhi    .byte 0   ;sprite x high bit
  45. 540 xpsnum .byte 0   ;sprite # (0-7)
  46. 550 xpnum  .byte 1,2,4,8,16,32,64,128
  47.