Defenses first to be activated after purchase

This commit is contained in:
Pecusx
2022-08-21 22:23:46 +02:00
parent 514638e1ca
commit bd2239e434
2 changed files with 22 additions and 13 deletions
BIN
View File
Binary file not shown.
+20 -11
View File
@@ -255,8 +255,7 @@ ManualPurchase
jsr Purchase ; purchase weapons jsr Purchase ; purchase weapons
bit escFlag bit escFlag
spl:rts spl:rts
mva #$ff isInventory jsr DefensivesActivate ; activate weapons
jsr Purchase ; activate weapons
bit escFlag bit escFlag
spl:rts spl:rts
AfterManualPurchase AfterManualPurchase
@@ -265,7 +264,17 @@ AfterManualPurchase
bne @- bne @-
rts rts
.endp .endp
;--------------------------------------------------
.proc DefensivesActivate
;--------------------------------------------------
; This proc call Inventory and set Defensives activation first
mwa #ListOfDefensiveWeapons WeaponsListDL ;switch to the list of offensive weapons
mva #$ff IsInventory
mva #$01 WhichList
; offensive weapon - 0, deffensive - 1
jmp Purchase.GoToActivation
.endp
;-------------------------------------------------- ;--------------------------------------------------
.proc Purchase ; .proc Purchase ;
;-------------------------------------------------- ;--------------------------------------------------
@@ -274,6 +283,14 @@ AfterManualPurchase
; Rest of the data is taken from appropriate tables ; Rest of the data is taken from appropriate tables
; and during the purchase these tables are modified. ; and during the purchase these tables are modified.
mwa #ListOfWeapons WeaponsListDL ;switch to the list of offensive weapons
; we are clearing list of the weapons
mva #$00 WhichList
; offensive weapon - 0, deffensive - 1
GoToActivation
mva #$ff LastWeapon
; mva #0 dmactl ; mva #0 dmactl
VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen
jsr PMoutofScreen jsr PMoutofScreen
@@ -287,21 +304,13 @@ AfterManualPurchase
lda #song_inventory lda #song_inventory
@ jsr RmtSongSelect @ jsr RmtSongSelect
mwa #ListOfWeapons WeaponsListDL ;switch to the list of offensive weapons
ldx tankNr ldx tankNr
lda TankStatusColoursTable,x lda TankStatusColoursTable,x
sta COLOR2 sta COLOR2
; we are clearing list of the weapons
mva #$ff LastWeapon
mva #$00 WhichList
; offensive weapon - 0, deffensive - 1
; there is a tank (player) number in tanknr ; there is a tank (player) number in tanknr
; we are displaying name of the player ; we are displaying name of the player
tay ; 0 to y ldy #0
lda tanknr lda tanknr
:3 asl ; 8 chars per name :3 asl ; 8 chars per name
tax tax