Prev: 62349 Up: Map Next: 62554
62382: 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 39 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 62382 LD HL,62168 Call PrintMessaging using Messaging_RobotronHeroes.
62385 CALL PrintMessaging
62388 LD A,1 Set the starting score index and screen position.
62390 LD D,26
62392 LD E,28
62394 LD HL,61797 Point to Table_RobotronHeroes.
Display_High_Score_Screen_Loop1 62397 LD (50435),A Set the current score entry index.
62400 PUSH AF Stash the entry index on the stack.
62401 CALL Draw_Score_Entry Draw this score entry.
62404 POP AF Restore the entry index from the stack.
62405 INC A Advance to the next score entry.
62406 CP 6 Repeat until all five entries have been drawn.
62408 JR NZ,Display_High_Score_Screen_Loop1
Print the second group of five current game scores.
62410 LD D,137 Set the screen position for the second group of five scores.
62412 LD E,28
Display_High_Score_Screen_Loop2 62414 PUSH AF Stash the entry index on the stack.
62415 CP 10 Skip the score index remap if not at the tenth entry.
62417 JR NZ,Display_High_Score_Screen_Remap
62419 LD A,16 Remap the tenth entry index for display.
Display_High_Score_Screen_Remap 62421 LD (50435),A Set the (possibly remapped) entry index.
62424 CALL Draw_Score_Entry Draw this score entry.
62427 POP AF Restore the entry index from the stack.
62428 INC A Advance to the next score entry.
62429 CP 11 Repeat until all ten entries have been drawn.
62431 JR NZ,Display_High_Score_Screen_Loop2
Print the All Time Heroes rankings.
62433 LD HL,62349 Call PrintMessaging using Messaging_AllTimeHeroes.
62436 CALL PrintMessaging
62439 LD HL,61867 Call PrintMessaging using Messaging_HighScoreName.
62442 CALL PrintMessaging
62445 INC HL Advance past the message and load the top record score.
62446 LD DE,(32768)
62450 LD A,D Adjust the display row for the top score entry.
62451 ADD A,6
62453 LD D,A
62454 LD C,6 Print the top score position label.
62456 CALL Print_BCD_Score
62459 LD A,40 Print the opening parenthesis of the record holder name.
62461 CALL PrintDispatch
62464 LD B,3 Set the name character loop counter.
Display_High_Score_Screen_Name_Loop 62466 LD A,(HL) Load and print each character of the record holder's name.
62467 INC HL
62468 CALL PrintDispatch
62471 DJNZ Display_High_Score_Screen_Name_Loop Repeat for the three-character name.
62473 LD A,41 Print the closing parenthesis.
62475 CALL PrintDispatch
62478 LD A,26 Send the font select control code.
62480 CALL PrintDispatch
62483 LD A,0 Send the font parameter byte.
62485 CALL PrintDispatch
Print the all-time score entries across three columns.
62488 LD A,2 Set the starting BCD index and position for the first column.
62490 LD D,20
62492 LD E,89
Display_High_Score_Screen_Col1 62494 LD (50435),A Set the score entry index.
62497 PUSH AF Stash the entry index on the stack.
62498 CALL Draw_Score_Entry_Compact Draw this all-time score entry.
62501 POP AF Restore the entry index from the stack.
62502 ADD A,1 Advance the BCD index; check if the first column is complete.
62504 DAA
62505 CP 21
62507 JR NZ,Display_High_Score_Screen_Col1 Repeat for the next entry until the first column is done.
62509 LD D,94 Set the screen position for the second score column.
62511 LD E,89
Display_High_Score_Screen_Col2 62513 LD (50435),A Set the score entry index.
62516 PUSH AF Stash the entry index on the stack.
62517 CALL Draw_Score_Entry_Compact Draw this all-time score entry.
62520 POP AF Restore the entry index from the stack.
62521 ADD A,1 Advance the BCD index; check if the second column is complete.
62523 DAA
62524 CP 40
62526 JR NZ,Display_High_Score_Screen_Col2 Repeat for the next entry until the second column is done.
62528 LD D,170 Set the screen position for the third score column.
62530 LD E,89
Display_High_Score_Screen_Col3 62532 LD (50435),A Set the score entry index.
62535 PUSH AF Stash the entry index on the stack.
62536 CALL Draw_Score_Entry_Compact Draw this all-time score entry.
62539 POP AF Restore the entry index from the stack.
62540 ADD A,1 Advance the BCD index; check if the third column is complete.
62542 DAA
62543 CP 65
62545 JR NZ,Display_High_Score_Screen_Col3 Repeat for the next entry until the third column is done.
62547 LD HL,62554 Call PrintMessaging using Messaging_SaveLoad.
62550 CALL PrintMessaging
62553 RET Return.
Prev: 62349 Up: Map Next: 62554