mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
Soildown after Hovercraft optimization.
This commit is contained in:
+6
-4
@@ -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
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+1
-1
@@ -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
|
||||
;----------------------------------------------------
|
||||
|
||||
+10
-4
@@ -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 ...
|
||||
|
||||
Reference in New Issue
Block a user