mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-21 14:49:46 +02:00
defensives activate #26
This commit is contained in:
+2
-1
@@ -1567,7 +1567,8 @@ EndPut4x4
|
||||
rts
|
||||
.endp
|
||||
|
||||
.proc SetMainScreen
|
||||
.proc SetMainScreen
|
||||
mva #0 dmactl
|
||||
VDLI DLIinterruptGraph ; jsr SetDLI for graphics (game) screen
|
||||
mwa #dl dlptrs ; issue #72 (glitches when switches)
|
||||
lda dmactls
|
||||
|
||||
+1
-5
@@ -145,11 +145,7 @@ MainGameLoop
|
||||
|
||||
; issue #72 (glitches when switches)
|
||||
mva #0 dmactl
|
||||
lda dmactls
|
||||
and #$fc
|
||||
;ora #$02 ; 2=normal, 3 = wide screen width, 0 = no screen
|
||||
sta dmactls
|
||||
|
||||
|
||||
jsr GetRandomWind
|
||||
|
||||
jsr RoundInit
|
||||
|
||||
BIN
Binary file not shown.
+39
-3
@@ -226,11 +226,14 @@ AfterManualPurchase
|
||||
;--------------------------------------------------
|
||||
.proc Purchase ;
|
||||
;--------------------------------------------------
|
||||
; TODO: when round ends with a weapon depleted the pointer points to an empty line
|
||||
|
||||
; In tanknr there is a number of the tank (player)
|
||||
; that is buying weapons now (from 0).
|
||||
; Rest of the data is taken from appropriate tables
|
||||
; and during the purchase these tables are modified.
|
||||
|
||||
mva #0 dmactl
|
||||
VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen
|
||||
jsr PMoutofScreen
|
||||
mwa #PurchaseDL dlptrs
|
||||
@@ -572,8 +575,11 @@ DoNotIncHigher2
|
||||
|
||||
bit isInventory ;
|
||||
bpl ChoosingItemForPurchase
|
||||
|
||||
lda whichList
|
||||
bne calcPosDefensive
|
||||
|
||||
; calculate positionOnTheList from the activeWeapon
|
||||
; calculate positionOnTheList from the activeWeapon (offensives)
|
||||
ldx tankNr
|
||||
lda activeWeapon,x
|
||||
ldy #0
|
||||
@@ -581,7 +587,24 @@ DoNotIncHigher2
|
||||
cmp IndexesOfWeaponsL1,y
|
||||
beq weaponfound
|
||||
iny
|
||||
cpy #40 ; maxOffensiveWeapons
|
||||
cpy #48 ; maxOffensiveWeapons
|
||||
bne @-
|
||||
; not found apparently?
|
||||
; TODO: check border case (the last weapon)
|
||||
ldy #0
|
||||
beq weaponFound ; jmp
|
||||
|
||||
|
||||
calcPosDefensive
|
||||
; calculate positionOnTheList from the activeWeapon (defensives)
|
||||
ldx tankNr
|
||||
lda ActiveDefenceWeapon,x
|
||||
ldy #48 ; min defensive weapon
|
||||
@
|
||||
cmp IndexesOfWeaponsL2,y
|
||||
beq weaponfound
|
||||
iny
|
||||
cpy #64 ; maxDefensiveWeapon+1
|
||||
bne @-
|
||||
; not found apparently?
|
||||
; TODO: check border case (the last weapon)
|
||||
@@ -589,6 +612,7 @@ DoNotIncHigher2
|
||||
weaponFound
|
||||
; weapon index in Y
|
||||
sty positionOnTheList
|
||||
|
||||
; Here we have all we need
|
||||
; So choose the weapon for purchase ......
|
||||
;--------------------------------------------------
|
||||
@@ -691,7 +715,7 @@ SecondSelected
|
||||
;--------------------------------------------------
|
||||
.proc PurchaseWeaponNow
|
||||
;--------------------------------------------------
|
||||
weaponPtr = temp
|
||||
weaponPtr = temp ; could be weaponPointer... we have this
|
||||
isPriceZero = tempXRoller
|
||||
bit isInventory
|
||||
bmi inventorySelect
|
||||
@@ -758,11 +782,23 @@ LessThan100
|
||||
jmp Purchase.AfterPurchase
|
||||
|
||||
inventorySelect
|
||||
lda whichList
|
||||
bne invSelectDef
|
||||
|
||||
ldy PositionOnTheList
|
||||
lda IndexesOfWeaponsL1,y
|
||||
ldx tankNr
|
||||
sta activeWeapon,x
|
||||
rts
|
||||
|
||||
invSelectDef
|
||||
ldy PositionOnTheList
|
||||
lda IndexesOfWeaponsL2,y
|
||||
tay
|
||||
ldx tankNr
|
||||
sta ActiveDefenceWeapon,x
|
||||
lda DefensiveEnergy,y
|
||||
sta ShieldEnergy,x
|
||||
rts
|
||||
|
||||
.endp
|
||||
|
||||
Reference in New Issue
Block a user