![]() |
Routines |
| Prev: 8C2D | Up: Map | Next: 8C63 |
|
Used by the routine at LoseLife.
Clears the play area, prints "GAME OVER" and the game statistics, waits for a while and then returns to the game selection menu.
|
||||||||||
|
||||||||||
| GameOver | 8C35 | CALL ClearPlayArea | Call ClearPlayArea to clear the play area. | |||||||
| 8C38 | LD HL,$BE4C | Write BE4C (the main font, see MainFont) to FontPointer. | ||||||||
| 8C3B | LD ($5E01),HL | |||||||||
|
Handle printing "Game Over" messaging.
|
||||||||||
| 8C3E | LD HL,$3040 | HL=3040 (a Y position of 30 and an X position of 40). | ||||||||
| 8C41 | LD DE,$8C59 | Point DE at the "Game Over" text at StringGameOver. | ||||||||
| 8C44 | CALL PrintStringColour | Call PrintStringColour to print the string. | ||||||||
|
Handle printing the game statistics.
|
||||||||||
| 8C47 | CALL GameStats | Call GameStats to show the game statistics. | ||||||||
|
This entry point is used by the routine at GameComplete.
Provide a pause for us to reflect that the game has now ended.
|
||||||||||
| GameOverDelay | 8C4A | LD B,$14 | B=14 (the number of times to run the delay loop). | |||||||
| 8C4C | LD HL,$0000 | HL=0000 (the delay counter). | ||||||||
|
From HL being set above (and for each loop), decrementing 0000 by one gives FFFF.
|
||||||||||
| GameOverDelay_Loop | 8C4F | DEC HL | Count the delay down by one. | |||||||
| 8C50 | LD A,H | Loop back to GameOverDelay_Loop until the delay has counted down to zero. | ||||||||
| 8C51 | OR L | |||||||||
| 8C52 | JR NZ,GameOverDelay_Loop | |||||||||
| 8C54 | DJNZ GameOverDelay_Loop | Decrease the delay counter by one and loop back to GameOverDelay_Loop until the delay has finished. | ||||||||
| 8C56 | JP Game_Restart | Jump to Game_Restart to go back to the menu. | ||||||||
|
"Game Over" messaging.
|
||||||||||
| StringGameOver | 8C59 | DEFM $47 | Attribute: INK:WHITE, PAPER:BLACK (BRIGHT) + "GAME OVER". | |||||||
| 8C5A | DEFM "GAME OVE","R"+$80 | |||||||||
|
View the equivalent code in;
|
||||||||||
| Prev: 8C2D | Up: Map | Next: 8C63 |