mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-21 06:39:40 +02:00
Force-dependent Punch radius - but no memory!
This commit is contained in:
BIN
Binary file not shown.
BIN
Binary file not shown.
+32
-7
@@ -1056,22 +1056,41 @@ EndOfTheDirt
|
|||||||
.proc punch ;
|
.proc punch ;
|
||||||
; --------------------------------------------------
|
; --------------------------------------------------
|
||||||
;
|
;
|
||||||
|
ldx TankNr
|
||||||
|
|
||||||
|
; calculate radius from Force
|
||||||
|
/* lda ForceTableL,x
|
||||||
|
sta temp
|
||||||
|
lda ForceTableH,x
|
||||||
|
sta temp+1
|
||||||
|
ldy #3 ; ExplosionRadius = Force/16
|
||||||
|
@ lsr temp+1
|
||||||
|
ror temp
|
||||||
|
dey
|
||||||
|
bpl @-
|
||||||
|
|
||||||
|
clc
|
||||||
|
lda temp
|
||||||
|
pha ; store radius
|
||||||
|
adc #4 ; add margins for SoliDown
|
||||||
|
sta ExplosionRadius */
|
||||||
|
|
||||||
|
; fixed radius
|
||||||
mva #36 ExplosionRadius
|
mva #36 ExplosionRadius
|
||||||
|
|
||||||
jsr CalculateExplosionRange
|
jsr CalculateExplosionRange
|
||||||
|
|
||||||
mva #sfx_baby_missile sfx_effect
|
mva #sfx_baby_missile sfx_effect
|
||||||
|
|
||||||
mva #15 ExplosionRadius
|
|
||||||
|
|
||||||
lda ytankstable,x
|
lda ytankstable,x
|
||||||
cmp #13+15 ; Check if tank is too high (13 - tank with shield, 15 - Jump)
|
cmp #13+15 ; Check if tank is too high (13 - tank with shield, 15 - Jump)
|
||||||
bcs TooHighNoJump
|
bcs TooHighNoJump
|
||||||
; Jump
|
; Jump
|
||||||
; 15 pixels up
|
; 15 pixels up
|
||||||
|
mva #15 ExplosionRadius
|
||||||
@ jsr ClearTankNr
|
@ jsr ClearTankNr
|
||||||
dec ytankstable,x
|
dec ytankstable,x
|
||||||
jsr PutTankNr
|
jsr PutTankNr
|
||||||
; jsr WaitOneFrame
|
|
||||||
lda ExplosionRadius
|
lda ExplosionRadius
|
||||||
cmp #5
|
cmp #5
|
||||||
bcs Physics
|
bcs Physics
|
||||||
@@ -1079,7 +1098,7 @@ EndOfTheDirt
|
|||||||
Physics
|
Physics
|
||||||
dec ExplosionRadius
|
dec ExplosionRadius
|
||||||
bne @-
|
bne @-
|
||||||
; ans down
|
; and down
|
||||||
mva #15 ExplosionRadius
|
mva #15 ExplosionRadius
|
||||||
@ jsr ClearTankNr
|
@ jsr ClearTankNr
|
||||||
inc ytankstable,x
|
inc ytankstable,x
|
||||||
@@ -1089,8 +1108,14 @@ Physics
|
|||||||
|
|
||||||
TooHighNoJump
|
TooHighNoJump
|
||||||
mva #sfx_dirt_chrg_s sfx_effect
|
mva #sfx_dirt_chrg_s sfx_effect
|
||||||
|
|
||||||
|
; calculate radius from Force
|
||||||
|
/* pla ; restore radius
|
||||||
|
sta ExplosionRadius */
|
||||||
|
|
||||||
|
; fixed radius
|
||||||
mva #32 ExplosionRadius
|
mva #32 ExplosionRadius
|
||||||
|
|
||||||
CheckRange
|
CheckRange
|
||||||
; punch all (not dead :) tanks in range
|
; punch all (not dead :) tanks in range
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
@@ -1168,7 +1193,7 @@ DeadTank
|
|||||||
jpl CheckingNextTank
|
jpl CheckingNextTank
|
||||||
;jsr WaitOneFrame
|
;jsr WaitOneFrame
|
||||||
sbb ExplosionRadius #2
|
sbb ExplosionRadius #2
|
||||||
jne CheckRange
|
jcs CheckRange
|
||||||
ldy #10
|
ldy #10
|
||||||
jsr PauseYFrames
|
jsr PauseYFrames
|
||||||
rts
|
rts
|
||||||
|
|||||||
Reference in New Issue
Block a user