mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
Simple shield added
Only for test. Now all players has active Shield before game.
This commit is contained in:
+60
-1
@@ -690,7 +690,13 @@ ZeroesToGo
|
|||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
dey
|
dey
|
||||||
bne ClearPM
|
bne ClearPM
|
||||||
|
; draw defensive weapons like shield ( tank number in X )
|
||||||
|
; in xdraw, ydraw we have coordinates left LOWER corner of Tank char
|
||||||
|
lda ActiveDefenceWeapon,x
|
||||||
|
cmp #56 ; check shield activation
|
||||||
|
bne NoShieldDraw
|
||||||
|
jsr DrawTankShield
|
||||||
|
NoShieldDraw
|
||||||
NoPlayerMissile
|
NoPlayerMissile
|
||||||
DoNotDrawTankNr
|
DoNotDrawTankNr
|
||||||
rts
|
rts
|
||||||
@@ -718,6 +724,59 @@ tankflash_loop
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
;--------------------------------------------------
|
||||||
|
.proc DrawTankShield
|
||||||
|
; xdraw, ydraw - coordinates left LOWER corner of Tank char
|
||||||
|
; values remain there after a DrawTankNr proc.
|
||||||
|
; this proc change xdraw, ydraw and temp!
|
||||||
|
;--------------------------------------------------
|
||||||
|
|
||||||
|
mva #1 color
|
||||||
|
lda erase
|
||||||
|
beq ShieldVisible
|
||||||
|
dec color
|
||||||
|
ShieldVisible
|
||||||
|
sbw xdraw #$03 ; 3 pixels to left
|
||||||
|
; draw left vertical line of scheld ( | )
|
||||||
|
mva #6 temp ; strange !!!
|
||||||
|
@
|
||||||
|
jsr plot
|
||||||
|
.nowarn dew ydraw
|
||||||
|
dec temp
|
||||||
|
bne @-
|
||||||
|
; draw left oblique line of shield ( / )
|
||||||
|
mva #4 temp
|
||||||
|
@
|
||||||
|
jsr plot
|
||||||
|
.nowarn dew ydraw
|
||||||
|
inw xdraw
|
||||||
|
dec temp
|
||||||
|
bne @-
|
||||||
|
; draw top horizontal line of shield ( _ )
|
||||||
|
mva #5 temp
|
||||||
|
@
|
||||||
|
jsr plot
|
||||||
|
inw xdraw
|
||||||
|
dec temp
|
||||||
|
bne @-
|
||||||
|
; draw right oblique line of shield ( \ )
|
||||||
|
mva #4 temp
|
||||||
|
@
|
||||||
|
jsr plot
|
||||||
|
inw ydraw
|
||||||
|
inw xdraw
|
||||||
|
dec temp
|
||||||
|
bne @-
|
||||||
|
; draw right vertical line of shield ( | )
|
||||||
|
mva #7 temp
|
||||||
|
@
|
||||||
|
jsr plot
|
||||||
|
inw ydraw
|
||||||
|
dec temp
|
||||||
|
bne @-
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.proc drawmountains
|
.proc drawmountains
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
|||||||
+3
-3
@@ -129,15 +129,15 @@ START
|
|||||||
jsr RandomizeSequence
|
jsr RandomizeSequence
|
||||||
; for the round #1 shooting sequence is random
|
; for the round #1 shooting sequence is random
|
||||||
|
|
||||||
; activate parachutes for all players (test)
|
; activate shield for all players (test)
|
||||||
lda #$35
|
lda #56
|
||||||
ldx numberOfPlayers
|
ldx numberOfPlayers
|
||||||
dex
|
dex
|
||||||
@
|
@
|
||||||
sta ActiveDefenceWeapon,x
|
sta ActiveDefenceWeapon,x
|
||||||
dex
|
dex
|
||||||
bpl @-
|
bpl @-
|
||||||
; parachutes activated! (test)
|
; shield activated! (test)
|
||||||
MainGameLoop
|
MainGameLoop
|
||||||
VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen
|
VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen
|
||||||
|
|
||||||
|
|||||||
BIN
Binary file not shown.
+7
-1
@@ -665,8 +665,14 @@ DistanceCheckLoop
|
|||||||
adc #1
|
adc #1
|
||||||
:3 asl
|
:3 asl
|
||||||
tay
|
tay
|
||||||
|
; check shields
|
||||||
|
lda ActiveDefenceWeapon,x
|
||||||
|
cmp #56 ; shield
|
||||||
|
beq UseShield
|
||||||
jsr DecreaseEnergyX
|
jsr DecreaseEnergyX
|
||||||
|
jmp EndOfDistanceCheckLoop
|
||||||
|
UseShield
|
||||||
|
mva #0 ActiveDefenceWeapon,x ; deactivate defense weapons
|
||||||
TankIsNotWithinTheRange
|
TankIsNotWithinTheRange
|
||||||
EndOfDistanceCheckLoop
|
EndOfDistanceCheckLoop
|
||||||
txa
|
txa
|
||||||
|
|||||||
Reference in New Issue
Block a user