Prev: F67E Up: Map Next: F6C6
F6A6: Update High Score Display
Used by the routine at GameRestart.
Print the current score into the menu score stream at F504, and if it beats the high score at HighScore update that too (printed at F516).
Print score; promote it to high score when larger.
Update_HighScoreDisplay F6A6 LD IX,$F504 Point IX at F504.
F6AA LD HL,($72DD) Fetch the current score.
Keep the current score while the high-score digits are printed.
F6AD PUSH HL Stash HL on the stack.
F6AE CALL Print_ScoreDigits Call Print_ScoreDigits to print the score digits.
F6B1 POP HL Restore HL from the stack.
F6B2 LD DE,($72F3) Fetch the high score. Clear the success marker. Is the current score below the high score? If so, return.
F6B6 AND A
F6B7 SBC HL,DE
F6B9 RET C
F6BA ADD HL,DE Restore the current score (add back the high score).
F6BB LD ($72F3),HL Store it as the new high score.
F6BE LD IX,$F516 Point IX at F516.
F6C2 CALL Print_ScoreDigits Call Print_ScoreDigits to print the high-score digits.
F6C5 RET Return.
Prev: F67E Up: Map Next: F6C6