diff --git a/grafproc.asm b/grafproc.asm index e3d51df..3afe18f 100644 --- a/grafproc.asm +++ b/grafproc.asm @@ -262,8 +262,7 @@ CheckCollisionDraw sbc #1 sta YHit sty YHit+1 - ;mwa ydraw YHit - mva #1 HitFlag + mva #$ff HitFlag StopHitChecking jmp ContinueDraw @ @@ -798,10 +797,10 @@ ShieldVisible ; this proc draws a little "horns" on shield. ; Symbol of defensive but aggressive :) weapon ;-------------------------------------------------- - dew xdraw ; 1 pixel left +.nowarn dew xdraw ; 1 pixel left sbw ydraw #$0a ; 10 pixels up jsr plot - dew ydraw +.nowarn dew ydraw inw xdraw jsr plot sbw xdraw #$0d ; 13 pixels left diff --git a/scorch.xex b/scorch.xex index 89c2d03..752f219 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/variables.asm b/variables.asm index bafa6ce..e53732e 100644 --- a/variables.asm +++ b/variables.asm @@ -118,7 +118,7 @@ MaxWind .ds 1 ; WindOrientation .DS 1 ;(0-right,1-left) ;---------------------------------------------------- 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) .DS [MaxPlayers] diff --git a/weapons.asm b/weapons.asm index 76419c3..6fca2d8 100644 --- a/weapons.asm +++ b/weapons.asm @@ -765,7 +765,7 @@ UpNotYet sbc #1 sta ydraw ;check tank collision prior to PLOT - sty HitFlag + sty HitFlag ; set to 0 jsr CheckCollisionWithTank @@ -1306,7 +1306,7 @@ AfterStrongShoot ShotUnderGround mwa xtraj+1 xdraw ; but why not XHit and YHit !!!??? mwa ytraj+1 ydraw - mva #1 HitFlag + mva #$ff HitFlag rts .endp @@ -2200,7 +2200,7 @@ MIRValreadyAll mva tempor2 TankNr mva #0 Erase jsr SoilDown2 - mva #1 HitFlag + mva #$ff HitFlag ; but why ?? ;jsr drawtanks rts .endp @@ -2211,7 +2211,7 @@ MIRValreadyAll ; Check collision with Tank :) ; xdraw , ydraw - coordinates of the checked point ; 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 ; X - index of the hit tank @@ -2243,7 +2243,9 @@ Condition02 sbc #4 cmp ydraw bcs OverTheTank - mva #1 HitFlag + inx + stx HitFlag ; index of hit tank+1 + dex mwa xdraw XHit mwa ydraw YHit rts ; in X there is an index of the hit tank