Optimizations and fix for lonely weapon pointer
This commit is contained in:
BIN
Binary file not shown.
+10
-20
@@ -704,7 +704,7 @@ WeHaveOffset
|
|||||||
ClearList1
|
ClearList1
|
||||||
cpw xbyte #ListOfWeapons1End
|
cpw xbyte #ListOfWeapons1End
|
||||||
beq ListCleared1
|
beq ListCleared1
|
||||||
tya
|
tya ; now there is zero here
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
inw xbyte
|
inw xbyte
|
||||||
jmp ClearList1
|
jmp ClearList1
|
||||||
@@ -724,26 +724,16 @@ ListCleared1
|
|||||||
bne @-
|
bne @-
|
||||||
|
|
||||||
; add to the address of the list
|
; add to the address of the list
|
||||||
clc
|
adw xbyte #ListOfDefensiveWeapons
|
||||||
lda xbyte
|
ldy #0
|
||||||
adc #<ListOfDefensiveWeapons
|
|
||||||
tay
|
|
||||||
lda xbyte+1
|
|
||||||
adc #>ListOfDefensiveWeapons
|
|
||||||
sta xbyte+1
|
|
||||||
stx xbyte
|
|
||||||
txa ; now there is zero here
|
|
||||||
ClearList2
|
ClearList2
|
||||||
|
cpw xbyte #ListOfDefensiveWeaponsEnd
|
||||||
|
beq ListCleared2
|
||||||
|
tya ; now there is zero here
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
iny
|
inw xbyte
|
||||||
bne DoNotIncHigher2
|
jmp ClearList2
|
||||||
inc xbyte+1
|
ListCleared2
|
||||||
DoNotIncHigher2
|
|
||||||
cpy #<ListOfDefensiveWeaponsEnd
|
|
||||||
bne ClearList2
|
|
||||||
ldx xbyte+1
|
|
||||||
cpx #>ListOfDefensiveWeaponsEnd
|
|
||||||
bne ClearList2
|
|
||||||
|
|
||||||
; here we have pretty cool lists and there is no brute force
|
; here we have pretty cool lists and there is no brute force
|
||||||
; screen clearing at each list refresh
|
; screen clearing at each list refresh
|
||||||
@@ -951,7 +941,7 @@ EraseLoop
|
|||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
adw xbyte #32 ; narrow screen
|
adw xbyte #32 ; narrow screen
|
||||||
dex
|
dex
|
||||||
bne EraseLoop
|
bpl EraseLoop
|
||||||
|
|
||||||
; now let's check which list is active now
|
; now let's check which list is active now
|
||||||
bit WhichList
|
bit WhichList
|
||||||
|
|||||||
Reference in New Issue
Block a user