Fix for underground falling

This commit is contained in:
Pecusx
2022-08-21 19:35:48 +02:00
parent a609a1b331
commit fa5451e646
2 changed files with 27 additions and 23 deletions
+25 -21
View File
@@ -1073,6 +1073,9 @@ ROLPoint2
bne ByteBelowTank bne ByteBelowTank
NoGroundCheck NoGroundCheck
ldx TankNr ldx TankNr
lda Ytankstable,x
cmp #screenheight-1 ; tank on lowest position (no falling down)
jcs EndOfFall
lda UnderTank1 lda UnderTank1
bne NoFallingDown bne NoFallingDown
; Tank falling down ---- ; Tank falling down ----
@@ -1522,27 +1525,6 @@ EndDrawing
rts rts
.endp .endp
;--------------------------------------------------
.proc CheckMaxMountain
; in A return y coordinate of highest mountain
;--------------------------------------------------
mwa #mountaintable modify
ldy #0
ldx #screenheight-1
nextPointChecking
txa
cmp (modify),y
bcc NotHigher
lda (modify),y
tax
NotHigher
inw modify
cpw modify #(mountaintable+screenwidth)
bne nextPointChecking
txa
rts
.endp
/* /*
;-------------------------------------------------- ;--------------------------------------------------
.proc calculatemountains0 .proc calculatemountains0
@@ -1570,6 +1552,28 @@ SetYofNextTank
.endp .endp
*/ */
;--------------------------------------------------
.proc CheckMaxMountain
; in A return y coordinate of highest mountain
;--------------------------------------------------
mwa #mountaintable modify
ldy #0
ldx #screenheight-1
nextPointChecking
txa
cmp (modify),y
bcc NotHigher
lda (modify),y
tax
NotHigher
inw modify
cpw modify #(mountaintable+screenwidth)
bne nextPointChecking
txa
rts
.endp
; ----------------------------------------- ; -----------------------------------------
.proc unPlot .proc unPlot
; plots a point and saves the plotted byte, reverts the previous plot. ; plots a point and saves the plotted byte, reverts the previous plot.
BIN
View File
Binary file not shown.