home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_26_1988_Transactor_Publishing.d64
/
enepnt.pal
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
847b
|
45 lines
100 sys 700 ;pal 64
110 .opt oo
120 ; "enepnt"
130 ; this routine can be used to
140 ; show a player's energy level
150 ;
160 enepnt =*
170 lda energy
180 sta ecount
190 eploop =*
200 lda ecount
210 sec
220 sbc #8
230 bcc pntpar
240 sta ecount
250 lda #<sbox
260 ldy #>sbox
270 jsr $ab1e; print a solid square
280 jmp eploop
290 pntpar =*
300 lda ecount
310 beq enpnt ;done printing
320 asl: tax ;index into table
330 lda pntab+1,x
340 tay
350 lda pntab,x
360 jsr $ab1e ;print bar char
370 ;
380 enpnt =*
410 rts
420 ;
430 energy .byte 21 ;player energy
440 ecount .byte 0
450 sbox .asc " [146]":.byte 0
460 pnte1 .asc "[165]":.byte 0
470 pnte2 .asc "[181]":.byte 0
480 pnte3 .asc "[161]":.byte 0
490 pnte4 .asc "[161]":.byte 0
500 pnte5 .asc "[182][146]":.byte 0
510 pnte6 .asc "[170][146]":.byte 0
520 pnte7 .asc "[167][146]":.byte 0
530 ;
540 pntab .word 0, pnte1, pnte2, pnte3
550 .word pnte4, pnte5, pnte6, pnte7