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

  1. 100 sys 700 ;pal 64
  2. 110 .opt oo
  3. 120 ; "enepnt"
  4. 130 ; this routine can be used to
  5. 140 ; show a player's energy level
  6. 150 ;
  7. 160 enepnt =*
  8. 170 lda energy
  9. 180 sta ecount
  10. 190 eploop =*
  11. 200 lda ecount
  12. 210 sec
  13. 220 sbc #8
  14. 230 bcc pntpar
  15. 240 sta ecount
  16. 250 lda #<sbox
  17. 260 ldy #>sbox
  18. 270 jsr $ab1e; print a solid square
  19. 280 jmp eploop
  20. 290 pntpar =*
  21. 300 lda ecount
  22. 310 beq enpnt ;done printing
  23. 320 asl: tax  ;index into table
  24. 330 lda pntab+1,x
  25. 340 tay
  26. 350 lda pntab,x
  27. 360 jsr $ab1e ;print bar char
  28. 370 ;
  29. 380 enpnt =*
  30. 410 rts
  31. 420 ;
  32. 430 energy .byte 21 ;player energy
  33. 440 ecount .byte 0
  34. 450 sbox .asc " [146]":.byte 0
  35. 460 pnte1 .asc "[165]":.byte 0
  36. 470 pnte2 .asc "[181]":.byte 0
  37. 480 pnte3 .asc "[161]":.byte 0
  38. 490 pnte4 .asc "[161]":.byte 0
  39. 500 pnte5 .asc "[182][146]":.byte 0
  40. 510 pnte6 .asc "[170][146]":.byte 0
  41. 520 pnte7 .asc "[167][146]":.byte 0
  42. 530 ;
  43. 540 pntab .word 0, pnte1, pnte2, pnte3
  44. 550 .word pnte4, pnte5, pnte6, pnte7
  45.