![]() |
Routines |
| Prev: F4EE | Up: Map | Next: F52A |
|
Used by the routine at lose_life.
Called by lose_life when the last life has gone. Prints the player's name and GAME OVER (both messages at messages_and_players), puts the score in the high score if it beats it (check_high_score), plays the game-over tune (game_over_tune), waits twelve delays or until 0 is pressed, clears the play area and, with two players, hands over to the other one (swap_players does nothing if that one has no lives either). play then finds the current player with no lives and goes back to the menu.
|
||||
| game_over | F4FC | CALL show_player | PLAYER n, GAME OVER | |
| F4FF | LD DE,messages_and_players | |||
| F502 | CALL print_string | |||
| F505 | CALL check_high_score | A new high score? | ||
| F508 | LD DE,game_over_tune | The game-over tune | ||
| F50B | CALL play_tune | |||
| F50E | LD B,$0C | Wait twelve delays, or until 0 is pressed | ||
| game_over_0 | F510 | CALL delay | ||
| F513 | LD A,$EF | |||
| F515 | OUT ($FD),A | |||
| F517 | IN A,($FE) | |||
| F519 | AND $01 | |||
| F51B | JR Z,game_over_1 | |||
| F51D | DJNZ game_over_0 | |||
| game_over_1 | F51F | CALL clear_play_area | Clear the play area | |
| F522 | LD A,(player_count) | Two players: the other one's turn, if they have lives | ||
| F525 | AND A | |||
| F526 | CALL NZ,swap_players | |||
| F529 | RET | |||
| Prev: F4EE | Up: Map | Next: F52A |