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
|
||||
dey
|
||||
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
|
||||
DoNotDrawTankNr
|
||||
rts
|
||||
@@ -718,6 +724,59 @@ tankflash_loop
|
||||
rts
|
||||
.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
|
||||
;--------------------------------------------------
|
||||
|
||||
+3
-3
@@ -129,15 +129,15 @@ START
|
||||
jsr RandomizeSequence
|
||||
; for the round #1 shooting sequence is random
|
||||
|
||||
; activate parachutes for all players (test)
|
||||
lda #$35
|
||||
; activate shield for all players (test)
|
||||
lda #56
|
||||
ldx numberOfPlayers
|
||||
dex
|
||||
@
|
||||
sta ActiveDefenceWeapon,x
|
||||
dex
|
||||
bpl @-
|
||||
; parachutes activated! (test)
|
||||
; shield activated! (test)
|
||||
MainGameLoop
|
||||
VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen
|
||||
|
||||
|
||||
BIN
Binary file not shown.
+7
-1
@@ -665,8 +665,14 @@ DistanceCheckLoop
|
||||
adc #1
|
||||
:3 asl
|
||||
tay
|
||||
; check shields
|
||||
lda ActiveDefenceWeapon,x
|
||||
cmp #56 ; shield
|
||||
beq UseShield
|
||||
jsr DecreaseEnergyX
|
||||
|
||||
jmp EndOfDistanceCheckLoop
|
||||
UseShield
|
||||
mva #0 ActiveDefenceWeapon,x ; deactivate defense weapons
|
||||
TankIsNotWithinTheRange
|
||||
EndOfDistanceCheckLoop
|
||||
txa
|
||||
|
||||
Reference in New Issue
Block a user