mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-21 21:34:20 +02:00
no prices in inventory #26
This commit is contained in:
+7
-7
@@ -130,13 +130,13 @@ START
|
|||||||
; for the round #1 shooting sequence is random
|
; for the round #1 shooting sequence is random
|
||||||
|
|
||||||
; activate mag deflector for all players (test)
|
; activate mag deflector for all players (test)
|
||||||
ldx numberOfPlayers
|
; ldx numberOfPlayers
|
||||||
dex
|
; dex
|
||||||
@
|
;@
|
||||||
mva #55 ActiveDefenceWeapon,x
|
; mva #55 ActiveDefenceWeapon,x
|
||||||
mva #99 ShieldEnergy,x ; set energy of shield
|
; mva #99 ShieldEnergy,x ; set energy of shield
|
||||||
dex
|
; dex
|
||||||
bpl @-
|
; bpl @-
|
||||||
; mag deflector activated! (test)
|
; mag deflector activated! (test)
|
||||||
MainGameLoop
|
MainGameLoop
|
||||||
jsr CallPurchaseForEveryTank
|
jsr CallPurchaseForEveryTank
|
||||||
|
|||||||
BIN
Binary file not shown.
+36
-29
@@ -300,7 +300,7 @@ CreateList
|
|||||||
ldy tanknr
|
ldy tanknr
|
||||||
|
|
||||||
bit isInventory
|
bit isInventory
|
||||||
bmi itIsInventory
|
jmi itIsInventory
|
||||||
|
|
||||||
; put "Purchase" on the screen
|
; put "Purchase" on the screen
|
||||||
ldx #[purchaseTextEnd-purchaseText-1]
|
ldx #[purchaseTextEnd-purchaseText-1]
|
||||||
@@ -318,26 +318,7 @@ CreateList
|
|||||||
cmp WeaponPriceL,x
|
cmp WeaponPriceL,x
|
||||||
@
|
@
|
||||||
jcc TooLittleCash
|
jcc TooLittleCash
|
||||||
bcs notInventory ; jmp
|
|
||||||
|
|
||||||
itIsInventory
|
|
||||||
; put "Activate" on the screen
|
|
||||||
ldx #[purchaseTextEnd-purchaseText-1]
|
|
||||||
@ lda activateText,x
|
|
||||||
sta purchaseActivate,x
|
|
||||||
dex
|
|
||||||
bpl @-
|
|
||||||
|
|
||||||
ldx temp
|
|
||||||
lda TanksWeaponsTableL,y
|
|
||||||
sta weaponPointer
|
|
||||||
lda TanksWeaponsTableH,y
|
|
||||||
sta weaponPointer+1
|
|
||||||
ldy temp
|
|
||||||
lda (weaponPointer),y
|
|
||||||
jeq noWeapon
|
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
@@ -359,18 +340,12 @@ notInventory
|
|||||||
lda #16 ; "0"
|
lda #16 ; "0"
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
|
|
||||||
; now symbol of the weapon
|
|
||||||
lda WeaponSymbols,x
|
|
||||||
ldy #$4 ; 4 chars from the beginning of the line
|
|
||||||
sta (xbyte),y
|
|
||||||
|
|
||||||
;now number of units (shells) to be purchased
|
;now number of units (shells) to be purchased
|
||||||
|
|
||||||
adw xbyte #23 displayposition ; 23 chars from the beginning of the line
|
adw xbyte #23 displayposition ; 23 chars from the beginning of the line
|
||||||
lda WeaponUnits,x
|
lda WeaponUnits,x
|
||||||
sta decimal
|
sta decimal
|
||||||
jsr displaybyte
|
jsr displaybyte
|
||||||
ldx temp ;getting back number of the weapon
|
ldx temp ;getting back index of the weapon
|
||||||
|
|
||||||
; and now price of the weapon
|
; and now price of the weapon
|
||||||
adw xbyte #27 displayposition ; 27 chars from the beginning of the line
|
adw xbyte #27 displayposition ; 27 chars from the beginning of the line
|
||||||
@@ -380,15 +355,47 @@ notInventory
|
|||||||
sta decimal+1
|
sta decimal+1
|
||||||
jsr displaydec
|
jsr displaydec
|
||||||
|
|
||||||
lda temp ; weapon number again
|
lda temp ; weapon index again
|
||||||
jsr HowManyBullets
|
jsr HowManyBullets
|
||||||
sta decimal
|
sta decimal
|
||||||
|
|
||||||
adw xbyte #1 displayposition
|
adw xbyte #1 displayposition
|
||||||
jsr displaybyte
|
jsr displaybyte
|
||||||
|
jmp notInventory
|
||||||
|
|
||||||
|
itIsInventory
|
||||||
|
; put "Activate" on the screen
|
||||||
|
ldx #[purchaseTextEnd-purchaseText-1]
|
||||||
|
@ lda activateText,x
|
||||||
|
sta purchaseActivate,x
|
||||||
|
dex
|
||||||
|
bpl @-
|
||||||
|
|
||||||
|
ldx temp
|
||||||
|
lda TanksWeaponsTableL,y
|
||||||
|
sta weaponPointer
|
||||||
|
lda TanksWeaponsTableH,y
|
||||||
|
sta weaponPointer+1
|
||||||
|
ldy temp
|
||||||
|
lda (weaponPointer),y
|
||||||
|
jeq noWeapon
|
||||||
|
|
||||||
|
; clear price area
|
||||||
|
ldy #22 ; beginning of the price area
|
||||||
|
lda #0
|
||||||
|
@ sta (XBYTE),y
|
||||||
|
iny
|
||||||
|
cpy #32+1 ; end of price
|
||||||
|
bne @-
|
||||||
|
|
||||||
|
notInventory
|
||||||
|
ldx temp ;weapon index
|
||||||
|
; now symbol of the weapon
|
||||||
|
lda WeaponSymbols,x
|
||||||
|
ldy #$4 ; 4 chars from the beginning of the line
|
||||||
|
sta (xbyte),y
|
||||||
|
|
||||||
; and now name of the weapon and finisheeeedd !!!!
|
; and now name of the weapon and finisheeeedd !!!!
|
||||||
ldx temp ;weapon index
|
|
||||||
mva #0 temp+1 ; this number is only in X
|
mva #0 temp+1 ; this number is only in X
|
||||||
; times 16 (it's length of the names of weapons)
|
; times 16 (it's length of the names of weapons)
|
||||||
ldy #3 ; Rotate 4 times
|
ldy #3 ; Rotate 4 times
|
||||||
|
|||||||
Reference in New Issue
Block a user