Prev: F38D Up: Map Next: F45A
F3AE: Display High Score Screen
Used by the routine at Display_High_Score_Entry_Screen.
Displays the high score screen. Prints the five current game scores as Robotron Heroes using Draw_Score_Entry, then a second group of five using the same routine. Next prints the All Time Heroes table: the top record holder name and score are shown at the top, followed by 27 all-time entries printed in three BCD-indexed columns via Draw_Score_Entry_Compact. Ends with the save and load prompt from Messaging_SaveLoad.
Display_High_Score_Screen F3AE LD HL,$F2D8 Call PrintMessaging using Messaging_RobotronHeroes.
F3B1 CALL PrintMessaging
F3B4 LD A,$01 Set the starting score index and screen position.
F3B6 LD D,$1A
F3B8 LD E,$1C
F3BA LD HL,$F165 Point to Table_RobotronHeroes.
Display_High_Score_Screen_Loop1 F3BD LD ($C503),A Set the current score entry index.
F3C0 PUSH AF Stash the entry index on the stack.
F3C1 CALL Draw_Score_Entry Draw this score entry.
F3C4 POP AF Restore the entry index from the stack.
F3C5 INC A Advance to the next score entry.
F3C6 CP $06 Repeat until all five entries have been drawn.
F3C8 JR NZ,Display_High_Score_Screen_Loop1
Print the second group of five current game scores.
F3CA LD D,$89 Set the screen position for the second group of five scores.
F3CC LD E,$1C
Display_High_Score_Screen_Loop2 F3CE PUSH AF Stash the entry index on the stack.
F3CF CP $0A Skip the score index remap if not at the tenth entry.
F3D1 JR NZ,Display_High_Score_Screen_Remap
F3D3 LD A,$10 Remap the tenth entry index for display.
Display_High_Score_Screen_Remap F3D5 LD ($C503),A Set the (possibly remapped) entry index.
F3D8 CALL Draw_Score_Entry Draw this score entry.
F3DB POP AF Restore the entry index from the stack.
F3DC INC A Advance to the next score entry.
F3DD CP $0B Repeat until all ten entries have been drawn.
F3DF JR NZ,Display_High_Score_Screen_Loop2
Print the All Time Heroes rankings.
F3E1 LD HL,$F38D Call PrintMessaging using Messaging_AllTimeHeroes.
F3E4 CALL PrintMessaging
F3E7 LD HL,$F1AB Call PrintMessaging using Messaging_HighScoreName.
F3EA CALL PrintMessaging
F3ED INC HL Advance past the message and load the top record score.
F3EE LD DE,($8000)
F3F2 LD A,D Adjust the display row for the top score entry.
F3F3 ADD A,$06
F3F5 LD D,A
F3F6 LD C,$06 Print the top score position label.
F3F8 CALL Print_BCD_Score
F3FB LD A,$28 Print the opening parenthesis of the record holder name.
F3FD CALL PrintDispatch
F400 LD B,$03 Set the name character loop counter.
Display_High_Score_Screen_Name_Loop F402 LD A,(HL) Load and print each character of the record holder's name.
F403 INC HL
F404 CALL PrintDispatch
F407 DJNZ Display_High_Score_Screen_Name_Loop Repeat for the three-character name.
F409 LD A,$29 Print the closing parenthesis.
F40B CALL PrintDispatch
F40E LD A,$1A Send the font select control code.
F410 CALL PrintDispatch
F413 LD A,$00 Send the font parameter byte.
F415 CALL PrintDispatch
Print the all-time score entries across three columns.
F418 LD A,$02 Set the starting BCD index and position for the first column.
F41A LD D,$14
F41C LD E,$59
Display_High_Score_Screen_Col1 F41E LD ($C503),A Set the score entry index.
F421 PUSH AF Stash the entry index on the stack.
F422 CALL Draw_Score_Entry_Compact Draw this all-time score entry.
F425 POP AF Restore the entry index from the stack.
F426 ADD A,$01 Advance the BCD index; check if the first column is complete.
F428 DAA
F429 CP $15
F42B JR NZ,Display_High_Score_Screen_Col1 Repeat for the next entry until the first column is done.
F42D LD D,$5E Set the screen position for the second score column.
F42F LD E,$59
Display_High_Score_Screen_Col2 F431 LD ($C503),A Set the score entry index.
F434 PUSH AF Stash the entry index on the stack.
F435 CALL Draw_Score_Entry_Compact Draw this all-time score entry.
F438 POP AF Restore the entry index from the stack.
F439 ADD A,$01 Advance the BCD index; check if the second column is complete.
F43B DAA
F43C CP $28
F43E JR NZ,Display_High_Score_Screen_Col2 Repeat for the next entry until the second column is done.
F440 LD D,$AA Set the screen position for the third score column.
F442 LD E,$59
Display_High_Score_Screen_Col3 F444 LD ($C503),A Set the score entry index.
F447 PUSH AF Stash the entry index on the stack.
F448 CALL Draw_Score_Entry_Compact Draw this all-time score entry.
F44B POP AF Restore the entry index from the stack.
F44C ADD A,$01 Advance the BCD index; check if the third column is complete.
F44E DAA
F44F CP $41
F451 JR NZ,Display_High_Score_Screen_Col3 Repeat for the next entry until the third column is done.
F453 LD HL,$F45A Call PrintMessaging using Messaging_SaveLoad.
F456 CALL PrintMessaging
F459 RET Return.
Prev: F38D Up: Map Next: F45A