mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-21 06:39:46 +02:00
Nicer Lazy targeting amd "visual Debug" for Lazy Boys
This commit is contained in:
+4
-2
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
.macro build
|
.macro build
|
||||||
dta d"1.26" ; number of this build (4 bytes)
|
dta d"1.27" ; number of this build (4 bytes)
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro RMTSong
|
.macro RMTSong
|
||||||
@@ -27,12 +27,14 @@
|
|||||||
icl 'definitions.asm'
|
icl 'definitions.asm'
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
|
|
||||||
FirstZpageVariable = $59
|
FirstZpageVariable = $57
|
||||||
.zpvar DliColorBack .byte = FirstZpageVariable
|
.zpvar DliColorBack .byte = FirstZpageVariable
|
||||||
.zpvar GradientNr .byte
|
.zpvar GradientNr .byte
|
||||||
.zpvar GradientColors .word
|
.zpvar GradientColors .word
|
||||||
.zpvar WindChangeInRound .byte ; wind change after each turn (not round only) flag - (0 - round only, >0 - each turn)
|
.zpvar WindChangeInRound .byte ; wind change after each turn (not round only) flag - (0 - round only, >0 - each turn)
|
||||||
.zpvar JoystickNumber .byte
|
.zpvar JoystickNumber .byte
|
||||||
|
.zpvar LazyFlag .byte ; 7 bit - run Lazy Darwin, 6 bit - run Lazy Boy or Darwin (!) after inventory, 0 - nothing
|
||||||
|
.zpvar SpyHardFlag .byte ; >$7f - run SpyHard after inventory
|
||||||
.zpvar Vdebug .byte ; "visual debug" flag ($00 - off, $ff - on)
|
.zpvar Vdebug .byte ; "visual debug" flag ($00 - off, $ff - on)
|
||||||
.zpvar xdraw .word ;= $64 ;variable X for plot
|
.zpvar xdraw .word ;= $64 ;variable X for plot
|
||||||
.zpvar ydraw .word ;variable Y for plot (like in Atari Basic - Y=0 in upper right corner of the screen)
|
.zpvar ydraw .word ;variable Y for plot (like in Atari Basic - Y=0 in upper right corner of the screen)
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+2
-32
@@ -908,27 +908,13 @@ NoAutoDefense
|
|||||||
cmp #ind_Lazy_Boy_______
|
cmp #ind_Lazy_Boy_______
|
||||||
bne NoLazyBoy
|
bne NoLazyBoy
|
||||||
; Lazy Boy - do it like battery
|
; Lazy Boy - do it like battery
|
||||||
mva #sfx_lazy_boys sfx_effect
|
mva #%01000000 LazyFlag
|
||||||
phy
|
|
||||||
jsr PrepareAIShoot
|
|
||||||
jsr FindBestTarget2 ; find nearest tank neighbour
|
|
||||||
jsr LazyAim
|
|
||||||
ply
|
|
||||||
lda #%00000000
|
|
||||||
sta TestFlightFlag ; set "visual aiming" off
|
|
||||||
jmp DecreaseDefensive ; bypass activation
|
jmp DecreaseDefensive ; bypass activation
|
||||||
NoLazyBoy
|
NoLazyBoy
|
||||||
cmp #ind_Lazy_Darwin____
|
cmp #ind_Lazy_Darwin____
|
||||||
bne NoLazyDarwin
|
bne NoLazyDarwin
|
||||||
; Lazy Darwin - do it like battery
|
; Lazy Darwin - do it like battery
|
||||||
mva #sfx_lazy_boys sfx_effect
|
mva #%11000000 LazyFlag
|
||||||
phy
|
|
||||||
jsr PrepareAIShoot
|
|
||||||
jsr FindBestTarget3 ; find target with lowest energy
|
|
||||||
jsr LazyAim
|
|
||||||
ply
|
|
||||||
lda #%10000000
|
|
||||||
sta TestFlightFlag ; set "visual aiming" on
|
|
||||||
jmp DecreaseDefensive ; bypass activation
|
jmp DecreaseDefensive ; bypass activation
|
||||||
NoLazyDarwin
|
NoLazyDarwin
|
||||||
cmp #ind_Spy_Hard_______
|
cmp #ind_Spy_Hard_______
|
||||||
@@ -974,22 +960,6 @@ DefActivationEnd
|
|||||||
jmp WaitForKeyRelease ; rts
|
jmp WaitForKeyRelease ; rts
|
||||||
|
|
||||||
.endp
|
.endp
|
||||||
.proc LazyAim
|
|
||||||
; aiming proc for Lazy ... weapons
|
|
||||||
; as proc for memory optimisation
|
|
||||||
; Y - target tan nr
|
|
||||||
; A - target direction
|
|
||||||
sty TargetTankNr
|
|
||||||
; aiming
|
|
||||||
jsr TakeAim ; direction still in A (0 - left, >0 - right)
|
|
||||||
lda Force
|
|
||||||
sta ForceTableL,x
|
|
||||||
lda Force+1
|
|
||||||
sta ForceTableH,x
|
|
||||||
lda NewAngle
|
|
||||||
sta AngleTable,x
|
|
||||||
rts
|
|
||||||
.endp
|
|
||||||
; -----------------------------------------------------
|
; -----------------------------------------------------
|
||||||
.proc calcPosDefensive
|
.proc calcPosDefensive
|
||||||
; calculate positionOnTheList from the activeWeapon (defensives)
|
; calculate positionOnTheList from the activeWeapon (defensives)
|
||||||
|
|||||||
@@ -168,8 +168,6 @@ TargetTankNr ; Target tank index (for AI routines)
|
|||||||
.DS 1
|
.DS 1
|
||||||
SecondTryFlag ; For precise AI aiming
|
SecondTryFlag ; For precise AI aiming
|
||||||
.DS 1
|
.DS 1
|
||||||
SpyHardFlag ; >$7f - run SpyHard after inventory
|
|
||||||
.DS 1
|
|
||||||
;----------------------------------------------------
|
;----------------------------------------------------
|
||||||
;Erase .DS 1 ; if 1 only mask of the character is printed
|
;Erase .DS 1 ; if 1 only mask of the character is printed
|
||||||
; on the graphics screen. if 0 character is printed normally
|
; on the graphics screen. if 0 character is printed normally
|
||||||
|
|||||||
+40
-1
@@ -1149,8 +1149,12 @@ afterInventory
|
|||||||
jsr MakeDarkScreen
|
jsr MakeDarkScreen
|
||||||
jsr DisplayStatus
|
jsr DisplayStatus
|
||||||
jsr SetMainScreen
|
jsr SetMainScreen
|
||||||
;jsr WaitOneFrame ; not necessary
|
|
||||||
jsr DrawTanks
|
jsr DrawTanks
|
||||||
|
;jsr WaitOneFrame ; not necessary
|
||||||
|
bit LazyFlag
|
||||||
|
bvc NoLazy
|
||||||
|
jsr LazyBoys
|
||||||
|
NoLazy
|
||||||
bit SpyHardFlag
|
bit SpyHardFlag
|
||||||
bpl NoSpyHard
|
bpl NoSpyHard
|
||||||
jsr SpyHard
|
jsr SpyHard
|
||||||
@@ -2508,6 +2512,41 @@ SpyHardEnd
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
; -------------------------------------------------
|
; -------------------------------------------------
|
||||||
|
.proc LazyBoys
|
||||||
|
; -------------------------------------------------
|
||||||
|
mva #sfx_lazy_boys sfx_effect
|
||||||
|
jsr PrepareAIShoot
|
||||||
|
ldx TankNr
|
||||||
|
bit LazyFlag
|
||||||
|
bmi GoDarwin
|
||||||
|
jsr FindBestTarget2 ; find nearest tank neighbour
|
||||||
|
jsr LazyAim
|
||||||
|
lda #%00000000 ; set "visual aiming" off
|
||||||
|
beq EndLazy
|
||||||
|
GoDarwin
|
||||||
|
jsr FindBestTarget3 ; find target with lowest energy
|
||||||
|
jsr LazyAim
|
||||||
|
lda #%10000000
|
||||||
|
EndLazy
|
||||||
|
sta TestFlightFlag ; set "visual aiming" on
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
.proc LazyAim
|
||||||
|
; aiming proc for Lazy ... weapons
|
||||||
|
; as proc for memory optimisation
|
||||||
|
; Y - target tan nr
|
||||||
|
; A - target direction
|
||||||
|
sty TargetTankNr
|
||||||
|
; aiming
|
||||||
|
jsr TakeAim ; direction still in A (0 - left, >0 - right)
|
||||||
|
lda Force
|
||||||
|
sta ForceTableL,x
|
||||||
|
lda Force+1
|
||||||
|
sta ForceTableH,x
|
||||||
|
jsr MoveBarrelToNewPosition
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
; -------------------------------------------------
|
||||||
.proc TankFlying
|
.proc TankFlying
|
||||||
; -------------------------------------------------
|
; -------------------------------------------------
|
||||||
; This routine is run from inside of the main loop
|
; This routine is run from inside of the main loop
|
||||||
|
|||||||
Reference in New Issue
Block a user