mirror of
https://github.com/Pecusx/dino-game.git
synced 2026-05-21 06:39:38 +02:00
HiScore
This commit is contained in:
@@ -64,6 +64,7 @@ line:1_addr
|
|||||||
status_line
|
status_line
|
||||||
dta d" l-hi 00000 r-hi 00000 00000 "
|
dta d" l-hi 00000 r-hi 00000 00000 "
|
||||||
score=status_line+33
|
score=status_line+33
|
||||||
|
rhiscore=status_line+19
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
; World table without dino
|
; World table without dino
|
||||||
WorldTable
|
WorldTable
|
||||||
@@ -102,6 +103,7 @@ EndLoop
|
|||||||
jmp EndLoop
|
jmp EndLoop
|
||||||
EndGame
|
EndGame
|
||||||
key
|
key
|
||||||
|
jsr HiScoreR
|
||||||
jmp NewGame
|
jmp NewGame
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@@ -587,6 +589,46 @@ Down
|
|||||||
rts
|
rts
|
||||||
.endp
|
.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
|
.proc FadeColors
|
||||||
ldy #0
|
ldy #0
|
||||||
sty COLOR1
|
sty COLOR1
|
||||||
|
|||||||
+44
-8
@@ -64,6 +64,7 @@ line:1_addr
|
|||||||
status_line
|
status_line
|
||||||
dta d" l-hi 00000 r-hi 00000 00000 "
|
dta d" l-hi 00000 r-hi 00000 00000 "
|
||||||
score=status_line+33
|
score=status_line+33
|
||||||
|
rhiscore=status_line+19
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
; World table without dino
|
; World table without dino
|
||||||
WorldTable
|
WorldTable
|
||||||
@@ -85,24 +86,16 @@ EndLoop
|
|||||||
;lda #$5f
|
;lda #$5f
|
||||||
;sta COLBAK
|
;sta COLBAK
|
||||||
jsr CheckJoy
|
jsr CheckJoy
|
||||||
;waitRTC ; or waitRTC ?
|
|
||||||
;key
|
|
||||||
mva #>font2 chbas
|
mva #>font2 chbas
|
||||||
waitRTC ; or waitRTC ?
|
waitRTC ; or waitRTC ?
|
||||||
mva #3 hscrol
|
mva #3 hscrol
|
||||||
;waitRTC ; or waitRTC ?
|
|
||||||
;key
|
|
||||||
mva #>font3 chbas
|
mva #>font3 chbas
|
||||||
waitRTC ; or waitRTC ?
|
waitRTC ; or waitRTC ?
|
||||||
mva #2 hscrol
|
mva #2 hscrol
|
||||||
jsr WorldShift ; better place (flickering)
|
jsr WorldShift ; better place (flickering)
|
||||||
;waitRTC ; or waitRTC ?
|
|
||||||
;key
|
|
||||||
mva #>font4 chbas
|
mva #>font4 chbas
|
||||||
waitRTC ; or waitRTC ?
|
waitRTC ; or waitRTC ?
|
||||||
mva #1 hscrol
|
mva #1 hscrol
|
||||||
;waitRTC ; or waitRTC ?
|
|
||||||
;key
|
|
||||||
jsr Animate
|
jsr Animate
|
||||||
mva #>font1 chbas
|
mva #>font1 chbas
|
||||||
waitRTC ; or waitRTC ?
|
waitRTC ; or waitRTC ?
|
||||||
@@ -110,6 +103,7 @@ EndLoop
|
|||||||
jmp EndLoop
|
jmp EndLoop
|
||||||
EndGame
|
EndGame
|
||||||
key
|
key
|
||||||
|
jsr HiScoreR
|
||||||
jmp NewGame
|
jmp NewGame
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@@ -585,6 +579,48 @@ Down
|
|||||||
sta DinoState
|
sta DinoState
|
||||||
sta diff_level
|
sta diff_level
|
||||||
sta Hit
|
sta Hit
|
||||||
|
; clear score
|
||||||
|
lda #$10
|
||||||
|
sta score
|
||||||
|
sta score+1
|
||||||
|
sta score+2
|
||||||
|
sta score+3
|
||||||
|
sta score+4
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
;-----------------------------------------------
|
||||||
|
.proc HiScoreR
|
||||||
|
lda rhiscore
|
||||||
|
cmp score
|
||||||
|
bcc higher1
|
||||||
|
lda rhiscore+1
|
||||||
|
cmp score+1
|
||||||
|
bcc higher2
|
||||||
|
lda rhiscore+2
|
||||||
|
cmp score+2
|
||||||
|
bcc higher3
|
||||||
|
lda rhiscore+3
|
||||||
|
cmp score+3
|
||||||
|
bcc higher4
|
||||||
|
lda rhiscore+4
|
||||||
|
cmp score+4
|
||||||
|
bcc higher5
|
||||||
|
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
|
rts
|
||||||
.endp
|
.endp
|
||||||
;-----------------------------------------------
|
;-----------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user