mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
Final Shields fix
Now shields are draw ONLY in DrawTankNr proc.
This commit is contained in:
+5
-5
@@ -723,6 +723,11 @@ ZeroesToGo6
|
|||||||
|
|
||||||
NoPlayerMissile
|
NoPlayerMissile
|
||||||
|
|
||||||
|
ldy #$01
|
||||||
|
lda Erase
|
||||||
|
beq @+
|
||||||
|
dey
|
||||||
|
@ sty color
|
||||||
; draw defensive weapons like shield ( tank number in X )
|
; draw defensive weapons like shield ( tank number in X )
|
||||||
; in xdraw, ydraw we have coordinates left LOWER corner of Tank char
|
; in xdraw, ydraw we have coordinates left LOWER corner of Tank char
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
@@ -803,11 +808,6 @@ tankflash_loop
|
|||||||
;
|
;
|
||||||
; this proc change xdraw, ydraw and temp!
|
; this proc change xdraw, ydraw and temp!
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
mva #1 color
|
|
||||||
lda erase
|
|
||||||
beq ShieldVisible
|
|
||||||
dec color
|
|
||||||
ShieldVisible
|
|
||||||
sbw xdraw #$03 ; 3 pixels to left
|
sbw xdraw #$03 ; 3 pixels to left
|
||||||
; draw left vertical line of shield ( | )
|
; draw left vertical line of shield ( | )
|
||||||
mva #6 temp ; strange !!!
|
mva #6 temp ; strange !!!
|
||||||
|
|||||||
BIN
Binary file not shown.
+24
-13
@@ -767,7 +767,7 @@ ExplosionLoop2
|
|||||||
DistanceCheckLoop
|
DistanceCheckLoop
|
||||||
dex
|
dex
|
||||||
lda eXistenZ,x
|
lda eXistenZ,x
|
||||||
beq EndOfDistanceCheckLoop
|
jeq EndOfDistanceCheckLoop
|
||||||
;here the tank exist
|
;here the tank exist
|
||||||
lda XtankstableL,x
|
lda XtankstableL,x
|
||||||
clc
|
clc
|
||||||
@@ -825,10 +825,17 @@ ShieldCoveredTank
|
|||||||
ShieldEnergy0 ; deactivate if no energy. it's like use one hit shield :)
|
ShieldEnergy0 ; deactivate if no energy. it's like use one hit shield :)
|
||||||
UseShield
|
UseShield
|
||||||
mva #1 Erase
|
mva #1 Erase
|
||||||
phx
|
lda TankNr
|
||||||
jsr DrawTankShield
|
pha ; store TankNr
|
||||||
plx
|
stx TankNr ; store X in TankNr :)
|
||||||
mva #0 ActiveDefenceWeapon,x ; deactivate defense weapons
|
jsr DrawTankNr ; now erase tank with shield (to erase shield)
|
||||||
|
lda #0
|
||||||
|
sta ActiveDefenceWeapon,x ; deactivate defense weapons
|
||||||
|
sta Erase
|
||||||
|
jsr DrawTankNr ; draw tank without shield
|
||||||
|
ldx TankNr ; restore X value :)
|
||||||
|
pla
|
||||||
|
sta TankNr ; restore TankNr value :)
|
||||||
TankIsNotWithinTheRange
|
TankIsNotWithinTheRange
|
||||||
EndOfDistanceCheckLoop
|
EndOfDistanceCheckLoop
|
||||||
txa
|
txa
|
||||||
@@ -1900,19 +1907,23 @@ AutoDefence
|
|||||||
; now run defensive-aggressive weapon - Auto Defence!
|
; now run defensive-aggressive weapon - Auto Defence!
|
||||||
sbb #180 LeapFrogAngle Angle ; swap angle (LeapFrogAngle - because we have strored angle in this variable)
|
sbb #180 LeapFrogAngle Angle ; swap angle (LeapFrogAngle - because we have strored angle in this variable)
|
||||||
lsrw Force ; Force = Force / 2 - becouse earlier we multiplied by 2
|
lsrw Force ; Force = Force / 2 - becouse earlier we multiplied by 2
|
||||||
mva #1 Erase ; now erase shield
|
mva #1 Erase
|
||||||
phx
|
lda TankNr
|
||||||
jsr DrawTankShield
|
pha ; store TankNr
|
||||||
jsr DrawTankShieldHorns
|
stx TankNr ; store X in TankNr :)
|
||||||
plx
|
jsr DrawTankNr ; now erase tank with shield (to erase shield)
|
||||||
lda #$00
|
lda #0
|
||||||
sta Erase
|
sta ActiveDefenceWeapon,x ; deactivate used auto defense weapon
|
||||||
sta ActiveDefenceWeapon,x ; deactivate used Auto Defence
|
|
||||||
sta ShieldEnergy,x
|
sta ShieldEnergy,x
|
||||||
sta xtraj ; prepare coordinates
|
sta xtraj ; prepare coordinates
|
||||||
sta ytraj
|
sta ytraj
|
||||||
sta xtraj+2
|
sta xtraj+2
|
||||||
sta ytraj+2
|
sta ytraj+2
|
||||||
|
sta Erase
|
||||||
|
jsr DrawTankNr ; draw tank without shield
|
||||||
|
ldx TankNr ; restore X value :)
|
||||||
|
pla
|
||||||
|
sta TankNr ; restore TankNr value :)
|
||||||
mwa XHit xtraj+1
|
mwa XHit xtraj+1
|
||||||
sbw YHit #5 ytraj+1
|
sbw YHit #5 ytraj+1
|
||||||
mva #1 color
|
mva #1 color
|
||||||
|
|||||||
Reference in New Issue
Block a user