mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-09-28 02:55:03 +00:00
peasant: fix displaying three digit scores if middle digit is 0
This commit is contained in:
parent
9e6faefc88
commit
bc788d0d4a
@ -21,9 +21,14 @@ update_score:
|
|||||||
ldx #9 ; offset of first digit in string
|
ldx #9 ; offset of first digit in string
|
||||||
sed ; set decimal mode
|
sed ; set decimal mode
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta update_leading_zero_smc+1
|
||||||
|
|
||||||
update_hundreds:
|
update_hundreds:
|
||||||
lda SCORE_HUNDREDS
|
lda SCORE_HUNDREDS
|
||||||
beq update_tens
|
beq update_tens
|
||||||
|
|
||||||
|
inc update_leading_zero_smc+1
|
||||||
clc
|
clc
|
||||||
adc #'0'
|
adc #'0'
|
||||||
sta score_text,X
|
sta score_text,X
|
||||||
@ -35,7 +40,13 @@ update_tens:
|
|||||||
lsr
|
lsr
|
||||||
lsr
|
lsr
|
||||||
lsr
|
lsr
|
||||||
|
bne update_go_tens
|
||||||
|
|
||||||
|
update_leading_zero_smc:
|
||||||
|
cmp #0
|
||||||
beq update_ones
|
beq update_ones
|
||||||
|
|
||||||
|
update_go_tens:
|
||||||
clc
|
clc
|
||||||
adc #'0'
|
adc #'0'
|
||||||
sta score_text,X
|
sta score_text,X
|
||||||
|
Loading…
Reference in New Issue
Block a user