mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +02:00
Index of hit tank in HitFlag
For future use. Easier to check whether the hit tank or ground.
This commit is contained in:
+3
-4
@@ -262,8 +262,7 @@ CheckCollisionDraw
|
|||||||
sbc #1
|
sbc #1
|
||||||
sta YHit
|
sta YHit
|
||||||
sty YHit+1
|
sty YHit+1
|
||||||
;mwa ydraw YHit
|
mva #$ff HitFlag
|
||||||
mva #1 HitFlag
|
|
||||||
StopHitChecking
|
StopHitChecking
|
||||||
jmp ContinueDraw
|
jmp ContinueDraw
|
||||||
@
|
@
|
||||||
@@ -798,10 +797,10 @@ ShieldVisible
|
|||||||
; this proc draws a little "horns" on shield.
|
; this proc draws a little "horns" on shield.
|
||||||
; Symbol of defensive but aggressive :) weapon
|
; Symbol of defensive but aggressive :) weapon
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
dew xdraw ; 1 pixel left
|
.nowarn dew xdraw ; 1 pixel left
|
||||||
sbw ydraw #$0a ; 10 pixels up
|
sbw ydraw #$0a ; 10 pixels up
|
||||||
jsr plot
|
jsr plot
|
||||||
dew ydraw
|
.nowarn dew ydraw
|
||||||
inw xdraw
|
inw xdraw
|
||||||
jsr plot
|
jsr plot
|
||||||
sbw xdraw #$0d ; 13 pixels left
|
sbw xdraw #$0d ; 13 pixels left
|
||||||
|
|||||||
BIN
Binary file not shown.
+1
-1
@@ -118,7 +118,7 @@ MaxWind .ds 1 ;
|
|||||||
WindOrientation .DS 1 ;(0-right,1-left)
|
WindOrientation .DS 1 ;(0-right,1-left)
|
||||||
;----------------------------------------------------
|
;----------------------------------------------------
|
||||||
Counter .DS 1 ;temporary Counter for outside loops
|
Counter .DS 1 ;temporary Counter for outside loops
|
||||||
HitFlag .DS 1 ;1 when missile hit anything
|
HitFlag .DS 1 ;$ff when missile hit ground, $00 when no hit, $01-$06 tank index+1 when hit tank
|
||||||
;----------------------------------------------------
|
;----------------------------------------------------
|
||||||
xtankstableL ;X positions of tanks (lower left point)
|
xtankstableL ;X positions of tanks (lower left point)
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
|
|||||||
+7
-5
@@ -765,7 +765,7 @@ UpNotYet
|
|||||||
sbc #1
|
sbc #1
|
||||||
sta ydraw
|
sta ydraw
|
||||||
;check tank collision prior to PLOT
|
;check tank collision prior to PLOT
|
||||||
sty HitFlag
|
sty HitFlag ; set to 0
|
||||||
|
|
||||||
jsr CheckCollisionWithTank
|
jsr CheckCollisionWithTank
|
||||||
|
|
||||||
@@ -1306,7 +1306,7 @@ AfterStrongShoot
|
|||||||
ShotUnderGround
|
ShotUnderGround
|
||||||
mwa xtraj+1 xdraw ; but why not XHit and YHit !!!???
|
mwa xtraj+1 xdraw ; but why not XHit and YHit !!!???
|
||||||
mwa ytraj+1 ydraw
|
mwa ytraj+1 ydraw
|
||||||
mva #1 HitFlag
|
mva #$ff HitFlag
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
@@ -2200,7 +2200,7 @@ MIRValreadyAll
|
|||||||
mva tempor2 TankNr
|
mva tempor2 TankNr
|
||||||
mva #0 Erase
|
mva #0 Erase
|
||||||
jsr SoilDown2
|
jsr SoilDown2
|
||||||
mva #1 HitFlag
|
mva #$ff HitFlag ; but why ??
|
||||||
;jsr drawtanks
|
;jsr drawtanks
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
@@ -2211,7 +2211,7 @@ MIRValreadyAll
|
|||||||
; Check collision with Tank :)
|
; Check collision with Tank :)
|
||||||
; xdraw , ydraw - coordinates of the checked point
|
; xdraw , ydraw - coordinates of the checked point
|
||||||
; results:
|
; results:
|
||||||
; HitFlag - 1 - hit, 0 - no hit
|
; HitFlag - $ff - hit ground, 0 - no hit, 1-6 - hit tank (index+1)
|
||||||
; XHit , YHit - coordinates of hit
|
; XHit , YHit - coordinates of hit
|
||||||
; X - index of the hit tank
|
; X - index of the hit tank
|
||||||
|
|
||||||
@@ -2243,7 +2243,9 @@ Condition02
|
|||||||
sbc #4
|
sbc #4
|
||||||
cmp ydraw
|
cmp ydraw
|
||||||
bcs OverTheTank
|
bcs OverTheTank
|
||||||
mva #1 HitFlag
|
inx
|
||||||
|
stx HitFlag ; index of hit tank+1
|
||||||
|
dex
|
||||||
mwa xdraw XHit
|
mwa xdraw XHit
|
||||||
mwa ydraw YHit
|
mwa ydraw YHit
|
||||||
rts ; in X there is an index of the hit tank
|
rts ; in X there is an index of the hit tank
|
||||||
|
|||||||
Reference in New Issue
Block a user