Prev: 45682 Up: Map Next: 45784
45727: Show Hall Of Fame
Used by the routine at HandlerHallOfFame.
Clears the panel in the middle of the screen, prints the eight lines of text of the hall of fame (the title, the six positions and the copyright message) and then prints the six scores and initials from Top_HighScore_1, one under the other.
Before After HallOfFame
hall-of-fame-before hall-of-fame-after
HallOfFame 45727 CALL HallOfFame_Clear Clear the panel.
45730 LD DE,45870 Point DE at the attributes of the lines of text at HallOfFame_Attributes.
45733 EXX Switch to the shadow registers.
45734 LD HL,45878 Point HL' at the positions of the lines of text at HallOfFame_Position.
45737 LD DE,45894 Point DE' at the lines of text at HallOfFame_Text.
There are eight lines of text.
45740 LD B,8 Set the number of lines of text in the shadow B register to 8.
45742 CALL GameMenu_Loop Print the lines of text.
Print the scores. C is the counter for the six positions.
45745 LD BC,774 Set the number of scores in C to 6 (and B to 3).
45748 LD DE,45828 Point DE at the first high score at Top_HighScore_1.
45751 LD HL,18536 HL=18536 (the Y position of the first score is 72 and the X position is 104).
HallOfFame_Loop 45754 PUSH BC Stash the score counter on the stack.
45755 PUSH HL Stash the position of the score on the stack.
45756 CALL ScreenAddress Convert the position into a screen address.
45759 CALL PrintScore_Loop Print the score.
45762 LD B,3 Set the number of initials in B to 3.
45764 INC L Move three characters to the right.
45765 INC L
45766 INC L
Print the three initials.
HallOfFame_Initials 45767 LD A,(DE) Fetch an initial.
45768 INC DE Move onto the next initial.
45769 CALL PrintScreen Print the initial.
45772 DJNZ HallOfFame_Initials Decrease the initial counter by one and loop back to HallOfFame_Initials until all three initials have been printed.
45774 POP HL Restore the position of the score from the stack.
45775 LD A,H Fetch the Y position.
45776 ADD A,16 Add 16 to move down two lines of text.
45778 LD H,A Set the new Y position.
45779 POP BC Restore the score counter from the stack.
45780 DEC C Decrease the score counter by one and loop back to HallOfFame_Loop until all six scores have been printed.
45781 JR NZ,HallOfFame_Loop
45783 RET Return.
View the equivalent code in;
Prev: 45682 Up: Map Next: 45784