Prev: B272 Up: Map Next: B2D8
B29F: 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 B29F CALL HallOfFame_Clear Clear the panel.
B2A2 LD DE,$B32E Point DE at the attributes of the lines of text at HallOfFame_Attributes.
B2A5 EXX Switch to the shadow registers.
B2A6 LD HL,$B336 Point HL' at the positions of the lines of text at HallOfFame_Position.
B2A9 LD DE,$B346 Point DE' at the lines of text at HallOfFame_Text.
There are eight lines of text.
B2AC LD B,$08 Set the number of lines of text in the shadow B register to 08.
B2AE CALL GameMenu_Loop Print the lines of text.
Print the scores. C is the counter for the six positions.
B2B1 LD BC,$0306 Set the number of scores in C to 06 (and B to 03).
B2B4 LD DE,$B304 Point DE at the first high score at Top_HighScore_1.
B2B7 LD HL,$4868 HL=4868 (the Y position of the first score is 48 and the X position is 68).
HallOfFame_Loop B2BA PUSH BC Stash the score counter on the stack.
B2BB PUSH HL Stash the position of the score on the stack.
B2BC CALL ScreenAddress Convert the position into a screen address.
B2BF CALL PrintScore_Loop Print the score.
B2C2 LD B,$03 Set the number of initials in B to 03.
B2C4 INC L Move three characters to the right.
B2C5 INC L
B2C6 INC L
Print the three initials.
HallOfFame_Initials B2C7 LD A,(DE) Fetch an initial.
B2C8 INC DE Move onto the next initial.
B2C9 CALL PrintScreen Print the initial.
B2CC DJNZ HallOfFame_Initials Decrease the initial counter by one and loop back to HallOfFame_Initials until all three initials have been printed.
B2CE POP HL Restore the position of the score from the stack.
B2CF LD A,H Fetch the Y position.
B2D0 ADD A,$10 Add 10 to move down two lines of text.
B2D2 LD H,A Set the new Y position.
B2D3 POP BC Restore the score counter from the stack.
B2D4 DEC C Decrease the score counter by one and loop back to HallOfFame_Loop until all six scores have been printed.
B2D5 JR NZ,HallOfFame_Loop
B2D7 RET Return.
View the equivalent code in;
Prev: B272 Up: Map Next: B2D8