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