Prev: B8E5 Up: Map Next: B970
B958: New High Score
Used by the routine at GameOver.
Puts the scores of the two players into the hall of fame, if they are high enough, starting with the higher of the two. If a score gets a place then the player is asked for their initials.
NewHighScore B958 LD HL,$961B Point HL at the score of player 1.
B95B LD DE,$961E Point DE at Scores_Player2.
B95E CALL NewHighScore_Compare Compare the scores using NewHighScore_Compare.
B961 LD A,$00 Clear the flag that says that a name has been entered.
B963 LD ($9633),A
B966 JR Z,NewHighScore_Process Jump to insert player 1 first if the scores are the same...
B968 JR C,NewHighScore_Process ...or if player 1 has the higher score.
B96A CPL Otherwise swap the scores, so that the higher one is first.
B96B EX DE,HL Swap the two scores.
NewHighScore_Process B96C CALL NewHighScore_Enter Insert the first score using NewHighScore_Enter.
B96F EX DE,HL Swap the scores back, and insert the other one.
View the equivalent code in;
Prev: B8E5 Up: Map Next: B970