Clear weapon list before redraw

Better descriptions of new procedures and fix for bug in drawmountains (C64)
This commit is contained in:
Pecusx
2023-06-13 10:56:52 +02:00
parent acec79fee7
commit 54c627b3b5
7 changed files with 57 additions and 17 deletions
+21
View File
@@ -343,6 +343,7 @@ AfterPurchase
; in xbyte there is the address of the line that
; is being processed now
mwa #ListOfWeapons xbyte
jsr ClearLists ; fast lists clear
ldx #$00 ; index of the checked weapon
stx HowManyOnTheListOff ; amounts of weapons (shells, bullets) in both lists
stx HowManyOnTheListDef
@@ -1015,6 +1016,26 @@ NoArrowDown
sty MoreDowndl+1
rts
.endp
;--------------------------------------------------
.proc ClearLists
;--------------------------------------------------
ldy #<ListOfWeapons
lda #0
sta temp2
lda #>ListOfWeapons
sta temp2+1
Go lda #$0
loop sta (temp2),y
iny
bne @+
inc temp2+1
@ cpy #<ListOfDefensiveWeaponsEnd
bne loop
ldx temp2+1
cpx #>ListOfDefensiveWeaponsEnd
bne loop
rts
.endp
; -----------------------------------------------------
.proc EnterPlayerNames
;entering names of players