This commit is contained in:
Pecusx
2024-08-12 10:40:36 +02:00
parent 16ceb903f9
commit b3c2ed1cba
3 changed files with 86 additions and 8 deletions
+42
View File
@@ -64,6 +64,7 @@ line:1_addr
status_line
dta d" l-hi 00000 r-hi 00000 00000 "
score=status_line+33
rhiscore=status_line+19
;---------------------------------------------------
; World table without dino
WorldTable
@@ -102,6 +103,7 @@ EndLoop
jmp EndLoop
EndGame
key
jsr HiScoreR
jmp NewGame
rts
@@ -587,6 +589,46 @@ Down
rts
.endp
;-----------------------------------------------
.proc HiScoreR
lda rhiscore
cmp score
bcc higher1
bne lower
lda rhiscore+1
cmp score+1
bcc higher2
bne lower
lda rhiscore+2
cmp score+2
bcc higher3
bne lower
lda rhiscore+3
cmp score+3
bcc higher4
bne lower
lda rhiscore+4
cmp score+4
bcc higher5
lower
rts
higher1
lda score
sta rhiscore
higher2
lda score+1
sta rhiscore+1
higher3
lda score+2
sta rhiscore+2
higher4
lda score+3
sta rhiscore+3
higher5
lda score+4
sta rhiscore+4
rts
.endp
;-----------------------------------------------
.proc FadeColors
ldy #0
sty COLOR1