diff --git a/scorch.xex b/scorch.xex index afee461..0309e8a 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/variables.asm b/variables.asm index 93ed69f..6278679 100644 --- a/variables.asm +++ b/variables.asm @@ -178,7 +178,7 @@ xcircle .DS 2 ycircle .DS 2 tempcir .DS 2 ;TankFalls -IfFallDown .DS 1 +FallingSoundBit .DS 1 PreviousFall .DS 1 EndOfTheFallFlag .DS 1 ; in case of the infinite fall Parachute .DS 1 ; are you insured with parachute? diff --git a/weapons.asm b/weapons.asm index 4587347..e1765a3 100644 --- a/weapons.asm +++ b/weapons.asm @@ -1357,11 +1357,11 @@ ShotUnderGround ;-------------------------------------------------- .proc TankFalls; ;-------------------------------------------------- - mva #sfx_shield_off sfx_effect lda #0 sta PreviousFall ; bit 7 - left, bit 6 - right sta EndOfTheFallFlag sta Parachute + mva #2 FallingSoundBit ; another trick for only one sfx initialization in loop ; let's check if the given tank has got the parachute ldx TankNr @@ -1375,6 +1375,13 @@ ShotUnderGround ParachuteActive inc Parachute TankFallsX + ; sound only if really falls + lda Parachute + and FallingSoundBit ; bit 1 + beq NoFallingSound + mva #0 FallingSoundBit + mva #sfx_shield_off sfx_effect +NoFallingSound ; clear previous position mva #1 Erase jsr DrawTankNr @@ -1472,6 +1479,7 @@ NoFallingDown bpl @- bmi NoLeftOrRight FallingLeft + ; tank is falling left bit PreviousFall ; bit 6 - right bvs EndLeftFall ; we finish falling left if the tank reached the edge of the screen @@ -1491,6 +1499,7 @@ NotLeftEdge mva #%10000000 PreviousFall ; set bit 7 - left bne EndOfFCycle FallingRight + ; tank is falling right bit PreviousFall ; bit 7 - left bmi EndRightFall ; we finish falling right if the tank reached the edge of the screen