diff --git a/scorch.asm b/scorch.asm index c01a24c..47c3954 100644 --- a/scorch.asm +++ b/scorch.asm @@ -26,7 +26,7 @@ ;--------------------------------------------------- icl 'definitions.asm' ;--------------------------------------------------- -FirstZpageVariable = $60 +FirstZpageVariable = $5E .zpvar DliColorBack .byte = FirstZpageVariable .zpvar Gradient .byte .zpvar JoystickNumber .byte @@ -71,10 +71,12 @@ FirstZpageVariable = $60 .zpvar pressTimer .byte .zpvar NTSCcounter .byte .zpvar IsEndOfTheFallFlag .byte ; for small speedup ground falling - .zpvar sfx_effect .byte - .zpvar RMT_blocked .byte - .zpvar ScrollFlag .byte + .zpvar sfx_effect .byte + .zpvar RMT_blocked .byte + .zpvar ScrollFlag .byte .zpvar SkStatSimulator .byte + .zpvar FloatingAlt .byte ; floating tank altitude + .zpvar OverTankDir .byte ; (0 go right, $ff go left) direction of bypassing tanks on screen ; --------------OPTIMIZATION VARIABLES-------------- .zpvar Force .word diff --git a/scorch.bin b/scorch.bin index 253e9f1..f115fa0 100644 Binary files a/scorch.bin and b/scorch.bin differ diff --git a/scorch.xex b/scorch.xex index 63de6f1..4bcfd74 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/variables.asm b/variables.asm index 4abdf3c..a3922f5 100644 --- a/variables.asm +++ b/variables.asm @@ -220,7 +220,7 @@ FallingSoundBit .DS 1 PreviousFall .DS 1 EndOfTheFallFlag .DS 1 ; in case of the infinite fall ;Parachute .DS 1 ; are you insured with parachute? -FloatingAlt .DS 1 ; floating tank altitude +;FloatingAlt .DS 1 ; floating tank altitude FunkyWallFlag = FloatingAlt ; reuse this variable in different weapon (Funky Bomb)! PreferHumansFlag = FloatingAlt ; second reuse in AI Aim proc ;---------------------------------------------------- diff --git a/weapons.asm b/weapons.asm index 26e438e..bdb1dde 100644 --- a/weapons.asm +++ b/weapons.asm @@ -2772,7 +2772,7 @@ pressedSpace TankOnRightSide dey TankOnLeftSide - sty FloatingAlt ; I know, not elegant byt this variable it's free now (0 go right, $ff go left) + sty OverTankDir ; (0 go right, $ff go left) ; now we have direction of bypassing tanks on screen ; clear "engine pixels" under tank @@ -2823,7 +2823,7 @@ TankBelow mva #1 Erase jsr DrawTankNr mva #0 Erase - bit FloatingAlt + bit OverTankDir bmi PassLeft PassRight inc XtankstableL,x @@ -2867,10 +2867,10 @@ GoDown adw temp #4 ; center of the tank ldy #0 lda (temp),y - sta FloatingAlt + sta OverTankDir ; not elegant!!! Reuse as height of tank flight FloatDown lda ytankstable,x - cmp FloatingAlt + cmp OverTankDir bcs OnGround ; first erase old tank position mva #1 Erase @@ -2890,6 +2890,12 @@ OnGround mva #0 Erase jsr WaitForKeyRelease ; and Soildown at the end (for correct mountaintable) + ; If tank did not fly at maximum altitude there is no need to soildown to much + lda FloatingAlt + cmp #18 + beq NotHighest + jsr ClearScreenSoilRange +NotHighest ; calculate range jsr CalculateSoildown ; hide tanks and ...