Tank dropping error at the right edge definitely corrected!

This commit is contained in:
Pecusx
2022-08-29 18:55:20 +02:00
parent ddc8c5b414
commit da52beb2bb
3 changed files with 9 additions and 11 deletions
+8 -10
View File
@@ -1129,16 +1129,13 @@ FallingRight
bit PreviousFall ; bit 6 - left
bvs EndRightFall
; we finish falling right if the tank reached the edge of the screen
clc
lda XtanksTableL,x
adc #$08 ; we'll check right side of the char
sta temp
lda XtanksTableH,x
adc #0
sta temp+1
cpw temp #screenwidth-2 ; 2 pixels correction due to a barrel wider than tank
bcs EndRightFall
NotLeftEdge
cmp #>(screenwidth-8-2) ; 2 pixels correction due to a barrel wider than tank
bne @+
lda XtanksTableL,x
cmp #<(screenwidth-8-2) ; 2 pixels correction due to a barrel wider than tank
@ bcs EndRightFall
NotRightEdge
; tank is falling right - modify coorinates
clc
lda XtankstableL,x
@@ -1159,6 +1156,7 @@ FallingLeft
lda XtanksTableL,x
cmp #3 ; 2 pixels correction due to a barrel wider than tank
bcc EndLeftFall
NotLeftEdge
; tank is falling left - modify coorinates
sec
lda XtankstableL,x
@@ -1206,7 +1204,7 @@ DoNotDrawParachute
ForceFallLeft
sta UnderTank1
sty UnderTank2
jne TankFallsX
jmp TankFallsX
EndOfFall
mva #1 Erase
; ldx TankNr
+1 -1
View File
@@ -36,7 +36,7 @@
;we decided it must go in 'English' to let other people work on it
.macro build
dta d"1.12" ; number of this build (3 bytes)
dta d"1.13" ; number of this build (3 bytes)
.endm
icl 'definitions.asm'
BIN
View File
Binary file not shown.