Faster AI (and fixed)

Correcion for barrel wider tjan tank (2 pixels)
This commit is contained in:
Pecusx
2022-08-01 21:54:41 +02:00
parent 2f1f016ce0
commit 9eb0f8adff
3 changed files with 35 additions and 28 deletions
+4 -3
View File
@@ -1028,9 +1028,10 @@ FallingLeft
bit PreviousFall ; bit 6 - right
bvs EndLeftFall
; we finish falling left if the tank reached the edge of the screen
lda XtanksTableL,x
bne NotLeftEdge
lda XtanksTableH,x
bne NotLeftEdge
lda XtanksTableL,x
cmp #2 ; 2 pixels correction due to a barrel wider than tank
beq EndLeftFall
NotLeftEdge
; tank is falling left - modify coorinates
@@ -1055,7 +1056,7 @@ FallingRight
lda XtanksTableH,x
adc #0
sta temp+1
cpw temp #screenwidth
cpw temp #screenwidth-2 ; 2 pixels correction due to a barrel wider than tank
beq EndRightFall
; tank is falling right - modify coorinates
sec