Prev: 62654 Up: Map Next: 62788
62704: Print Score
Used by the routine at Draw_StatusIcons_Target2.
Prints the score digits and copies a new high score when the stored score is lower.
Draw_StatusIcons_Branch 62704 LD DE,0 Write 0000 to *TemporaryPair.
62707 LD (25623),DE
62711 LD HL,15360 Write 15360 to *CHARS.
62714 LD (23606),HL
62717 LD A,7 Write WHITE to *ATTR_T.
62719 LD (23695),A
62722 LD BC,1051 Print the five digits at 25787.
62725 LD HL,25787
62728 CALL Draw_StatusIcons_Target5
62731 LD B,5 Compare those digits with 25781.
62733 LD HL,25787
62736 LD DE,25781
Draw_StatusIcons_Target3 62739 LD A,(DE) Jump to Draw_StatusIcons_Skip2 if this pair matches.
62740 CP (HL)
62741 JR Z,Draw_StatusIcons_Skip2
62743 JR C,Draw_StatusIcons_Branch2 Jump to Draw_StatusIcons_Branch2 if the stored score is lower.
62745 JR Draw_StatusIcons_Target4 Jump to Draw_StatusIcons_Target4.
Draw_StatusIcons_Skip2 62747 INC HL Advance both pointers and loop back to Draw_StatusIcons_Target3.
62748 INC DE
62749 DJNZ Draw_StatusIcons_Target3
Draw_StatusIcons_Target4 62751 LD BC,1040 Print the five digits at 25781.
62754 LD HL,25781
62757 JP Draw_StatusIcons_Target5
Draw_StatusIcons_Branch2 62760 LD DE,25781 Copy the new score over the stored score.
62763 LD HL,25787
62766 LD BC,5
62769 LDIR
62771 JR Draw_StatusIcons_Target4 Jump to Draw_StatusIcons_Target4.
Draw_StatusIcons_Target5 62773 CALL Set_PrintPosition Call Set_PrintPosition.
62776 LD B,5 B=5.
Draw_StatusIcons_Target6 62778 LD A,(HL) Convert the digit into a character.
62779 ADD A,10
62781 CALL Print_Character Call Print_Character.
62784 INC HL Advance the digit pointer and loop back to Draw_StatusIcons_Target6 until all five digits are printed.
62785 DJNZ Draw_StatusIcons_Target6
62787 RET Return.
Prev: 62654 Up: Map Next: 62788