Hovercraft fly high and low

This commit is contained in:
Pecusx
2022-08-21 16:53:07 +02:00
parent 1c55872935
commit b67c3230be
3 changed files with 38 additions and 7 deletions
+22
View File
@@ -1521,6 +1521,28 @@ EndDrawing
rts
.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