isInventory var

This commit is contained in:
2022-06-11 13:08:49 -04:00
parent c3f6e2399d
commit 7df1d5eff9
4 changed files with 12 additions and 0 deletions
BIN
View File
Binary file not shown.
+9
View File
@@ -203,6 +203,7 @@ OptionsYLoop
.proc CallPurchaseForEveryTank .proc CallPurchaseForEveryTank
mva #0 TankNr mva #0 TankNr
sta isInventory
@ @
ldx TankNr ldx TankNr
lda SkillTable,x lda SkillTable,x
@@ -295,6 +296,10 @@ CreateList
; checking if the weapon of the given number is present ; checking if the weapon of the given number is present
lda WeaponUnits,x lda WeaponUnits,x
jeq NoWeapon jeq NoWeapon
bit isInventory
;bmi itIsInventory
; checking if we can afford buying this weapon ; checking if we can afford buying this weapon
ldy tanknr ldy tanknr
lda moneyH,y lda moneyH,y
@@ -304,7 +309,11 @@ CreateList
cmp WeaponPriceL,x cmp WeaponPriceL,x
@ @
jcc TooLittleCash jcc TooLittleCash
bcs notInventory
itIsInventory
notInventory
; we have enough cash and the weapon can be ; we have enough cash and the weapon can be
; added to the list ; added to the list
stx temp ; number of weapon will be necessary later stx temp ; number of weapon will be necessary later
+2
View File
@@ -30,6 +30,8 @@ RoundNrDisplay
;===================================================== ;=====================================================
variablesStart ; zeroing starts here variablesStart ; zeroing starts here
;===================================================== ;=====================================================
isInventory .ds 1 ; 0 - purchase, $ff - inventory
;--------------
drawFunction .ds 1 ; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V) drawFunction .ds 1 ; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V)
;-------------- ;--------------
sfx_effect .ds 1 sfx_effect .ds 1
+1
View File
@@ -1058,6 +1058,7 @@ notpressed
@ @
cmp #$0d ; I cmp #$0d ; I
bne @+ bne @+
mva #$ff isInventory
jsr Purchase jsr Purchase
mva #0 escFlag mva #0 escFlag
jsr SetMainScreen jsr SetMainScreen