![]() |
Routines |
| Prev: 47333 | Up: Map | Next: 47472 |
|
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 | 47448 | LD HL,38427 | Point HL at the score of player 1. | |
| 47451 | LD DE,38430 | Point DE at Scores_Player2. | ||
| 47454 | CALL NewHighScore_Compare | Compare the scores using NewHighScore_Compare. | ||
| 47457 | LD A,0 | Clear the flag that says that a name has been entered. | ||
| 47459 | LD (38451),A | |||
| 47462 | JR Z,NewHighScore_Process | Jump to insert player 1 first if the scores are the same... | ||
| 47464 | JR C,NewHighScore_Process | ...or if player 1 has the higher score. | ||
| 47466 | CPL | Otherwise swap the scores, so that the higher one is first. | ||
| 47467 | EX DE,HL | Swap the two scores. | ||
| NewHighScore_Process | 47468 | CALL NewHighScore_Enter | Insert the first score using NewHighScore_Enter. | |
| 47471 | EX DE,HL | Swap the scores back, and insert the other one. | ||
|
View the equivalent code in;
|
||||
| Prev: 47333 | Up: Map | Next: 47472 |