| Gyruss | Routines |
| Prev: 8139 | Up: Map | Next: 81AE |
|
Used by the routine at died.
|
||||
| lose_life | 8170 | CALL reset_outcoming_enemies | Reset outcoming enemies | |
| 8173 | LD HL,stage_death_count | Increase number of times died within stage | ||
| 8176 | INC (HL) | ... | ||
| 8177 | LD HL,lives | Lives | ||
| 817A | DEC (HL) | Lose life | ||
| 817B | JR NZ,switch_player | Jump if lives left | ||
|
Game over
|
||||
| 817D | LD DE,$1C00 | |||
| 8180 | LD A,$D0 | |||
| 8182 | RST $10 | Write VDP byte | ||
| 8183 | CALL display_player | Display player | ||
| 8186 | LD HL,game_over_msg | Display GAME OVER | ||
| 8189 | LD DE,$19CB | ... | ||
| 818C | LD BC,$0009 | ... | ||
| 818F | RST $38 | WRITE_VRAM | ||
| 8190 | LD B,$00 | Stars for 256 frames | ||
| lose_life_0 | 8192 | PUSH BC | ... | |
| 8193 | HALT | ... | ||
| 8194 | CALL display_stars | Display stars | ||
| 8197 | POP BC | ... | ||
| 8198 | DJNZ lose_life_0 | ... | ||
| 819A | CALL clear_rows_9_and_14 | Clear rows 9 and 14 | ||
| 819D | LD HL,status_flags | Test for two players | ||
| 81A0 | BIT 7,(HL) | ... | ||
| 81A2 | JP Z,wait_for_restart | If not, wait for restart | ||
| 81A5 | BIT 5,(HL) | Is one player already game over? | ||
| 81A7 | JP NZ,wait_for_restart | If so, wait for restart | ||
| 81AA | SET 5,(HL) | Else flag that one player game over | ||
| 81AC | JR switch_player_0 | And switch player | ||
| Prev: 8139 | Up: Map | Next: 81AE |