mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +02:00
Collision with tank now checks the shield
We must rewvite CheckCollisionWithTank procedure !!!! In future :)
This commit is contained in:
+4
-2
@@ -514,7 +514,8 @@ EndOfTheBarrelY
|
||||
.by 6,6,6,6,6,6,6,6,6
|
||||
.by 5,5,5,5,5,5,5,5,5,5
|
||||
.by 4,4,4,4,4,4,4,4,4,4,4,4,4
|
||||
.by 3,3,3,3,3,3,3,3,3,3,3,3,3,3
|
||||
.by 4,4,4,4,4,4,4,4,4,4,4,4,4,4 ; one pixel Up for fix problems with colision check
|
||||
; .by 3,3,3,3,3,3,3,3,3,3,3,3,3,3
|
||||
|
||||
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||
@@ -526,7 +527,8 @@ EndOfTheBarrelY
|
||||
.by 0,0,0,0 ; not used
|
||||
|
||||
; left angles from 90 (horizontally to the left) to 1 (vertically up)
|
||||
.by 3,3,3,3,3,3,3,3,3,3,3,3,3,3
|
||||
; .by 3,3,3,3,3,3,3,3,3,3,3,3,3,3
|
||||
.by 4,4,4,4,4,4,4,4,4,4,4,4,4,4 ; one pixel Up for fix problems with colision check
|
||||
.by 4,4,4,4,4,4,4,4,4,4,4,4,4
|
||||
.by 5,5,5,5,5,5,5,5,5,5
|
||||
.by 6,6,6,6,6,6,6,6,6
|
||||
|
||||
BIN
Binary file not shown.
+35
@@ -2288,6 +2288,8 @@ MIRValreadyAll
|
||||
CheckCollisionWithTankLoop
|
||||
lda eXistenZ,x
|
||||
beq DeadTank
|
||||
lda ShieldEnergy,x
|
||||
bne CheckCollisionWithShieldedTank ; tank with shield is bigger :)
|
||||
lda xtankstableH,x
|
||||
cmp xdraw+1
|
||||
bne Condition01
|
||||
@@ -2327,6 +2329,39 @@ DeadTank
|
||||
cpx NumberOfPlayers
|
||||
bne CheckCollisionWithTankLoop
|
||||
rts
|
||||
CheckCollisionWithShieldedTank
|
||||
lda xtankstableH,x
|
||||
cmp xdraw+1
|
||||
bne Condition01a
|
||||
lda xtankstableL,x
|
||||
sec
|
||||
sbc #4 ; 5 pixels more on left side
|
||||
cmp xdraw
|
||||
Condition01a
|
||||
bcs LeftFromTheTank ;add 8 double byte
|
||||
clc
|
||||
adc #16
|
||||
tay
|
||||
lda xtankstableH,x
|
||||
adc #0
|
||||
cmp xdraw+1
|
||||
bne Condition02a
|
||||
cpy xdraw
|
||||
Condition02a
|
||||
bcc RightFromTheTank
|
||||
|
||||
lda ytankstable,x
|
||||
cmp ydraw ; check range
|
||||
bcc BelowTheTank ;(ytankstable,ytankstable+3)
|
||||
sbc #4 ; we must rewrite EndOfTheBarrelY table or remove Y correction completely to "bold" tank !!!
|
||||
cmp ydraw
|
||||
bcs OverTheTank
|
||||
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
|
||||
.endp
|
||||
;--------------------------------------------------
|
||||
CalculateExplosionRange0
|
||||
|
||||
Reference in New Issue
Block a user