Force-dependent Punch radius - but no memory!

This commit is contained in:
Pecusx
2023-06-01 19:19:57 +02:00
parent e7d24e82c1
commit d81e619562
3 changed files with 32 additions and 7 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+32 -7
View File
@@ -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