| ← B59C | Map | B5E0 → |
B5B3: Draw the high-score table screen
|
Repaints the whole high-score screen: the heading and all ten records in double-height text.
|
|||
| draw_highscore_table | B5B3 | CALL clear_screen | |
| B5B6 | LD A,$47 | Fill the attributes with bright white ink on black paper. | |
| B5B8 | CALL fill_attrs | ||
| B5BB | LD HL,SCREEN_BASE+$9 | Print the " HIGH SCORES" heading double-height at character row 0, column 9, in bright yellow ink on blue paper. | |
| B5BE | LD DE,msg_high_scores | ||
| B5C1 | LD C,$4E | ||
| B5C3 | CALL print_string_2x | ||
| B5C6 | INC C | The 10 record rows use bright white ink on blue paper. | |
| B5C7 | LD HL,SCREEN_BASE+$65 | First record's screen cell is character row 3, column 5. B counts the ten entries. | |
| B5CA | LD DE,highscore_entries | ||
| B5CD | LD B,$0A | ||
| highscore_row_loop | B5CF | PUSH BC | Print this record, and keep the loop counter and this row's screen cell. |
| B5D0 | PUSH HL | ||
| B5D1 | CALL print_string_2x | ||
| B5D4 | INC DE | Step the source past the record's terminator to the next entry – the table runs 22 bytes per record – then restore this row's screen cell. | |
| B5D5 | POP HL | ||
| B5D6 | CALL display_down_char | Drop the screen cell 2 character rows: each record is double-height, 16 pixels tall. | |
| B5D9 | CALL display_down_char | ||
| B5DC | POP BC | ||
| B5DD | DJNZ highscore_row_loop | ||
| B5DF | RET | ||
| ← B59C | Map | B5E0 → |
