diff --git a/scorch.xex b/scorch.xex index eaf32bd..6950da8 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/textproc.asm b/textproc.asm index 0d557e8..3f8065b 100644 --- a/textproc.asm +++ b/textproc.asm @@ -203,6 +203,7 @@ OptionsYLoop .proc CallPurchaseForEveryTank mva #0 TankNr + sta isInventory @ ldx TankNr lda SkillTable,x @@ -295,6 +296,10 @@ CreateList ; checking if the weapon of the given number is present lda WeaponUnits,x jeq NoWeapon + + bit isInventory + ;bmi itIsInventory + ; checking if we can afford buying this weapon ldy tanknr lda moneyH,y @@ -304,7 +309,11 @@ CreateList cmp WeaponPriceL,x @ jcc TooLittleCash + bcs notInventory +itIsInventory + +notInventory ; we have enough cash and the weapon can be ; added to the list stx temp ; number of weapon will be necessary later diff --git a/variables.asm b/variables.asm index e53732e..7397073 100644 --- a/variables.asm +++ b/variables.asm @@ -30,6 +30,8 @@ RoundNrDisplay ;===================================================== variablesStart ; zeroing starts here ;===================================================== +isInventory .ds 1 ; 0 - purchase, $ff - inventory +;-------------- drawFunction .ds 1 ; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V) ;-------------- sfx_effect .ds 1 diff --git a/weapons.asm b/weapons.asm index 91ccf4a..3de553e 100644 --- a/weapons.asm +++ b/weapons.asm @@ -1058,6 +1058,7 @@ notpressed @ cmp #$0d ; I bne @+ + mva #$ff isInventory jsr Purchase mva #0 escFlag jsr SetMainScreen