![]() |
Routines |
| Prev: 35885 | Up: Map | Next: 35939 |
|
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 | 35893 | CALL ClearPlayArea | Call ClearPlayArea to clear the play area. | |||||||
| 35896 | LD HL,48716 | Write 48716 (the main font, see MainFont) to FontPointer. | ||||||||
| 35899 | LD (24065),HL | |||||||||
|
Handle printing "Game Over" messaging.
|
||||||||||
| 35902 | LD HL,12352 | HL=12352 (a Y position of 48 and an X position of 64). | ||||||||
| 35905 | LD DE,35929 | Point DE at the "Game Over" text at StringGameOver. | ||||||||
| 35908 | CALL PrintStringColour | Call PrintStringColour to print the string. | ||||||||
|
Handle printing the game statistics.
|
||||||||||
| 35911 | 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 | 35914 | LD B,20 | B=20 (the number of times to run the delay loop). | |||||||
| 35916 | LD HL,0 | HL=0000 (the delay counter). | ||||||||
|
From HL being set above (and for each loop), decrementing 0000 by one gives 65535.
|
||||||||||
| GameOverDelay_Loop | 35919 | DEC HL | Count the delay down by one. | |||||||
| 35920 | LD A,H | Loop back to GameOverDelay_Loop until the delay has counted down to zero. | ||||||||
| 35921 | OR L | |||||||||
| 35922 | JR NZ,GameOverDelay_Loop | |||||||||
| 35924 | DJNZ GameOverDelay_Loop | Decrease the delay counter by one and loop back to GameOverDelay_Loop until the delay has finished. | ||||||||
| 35926 | JP Game_Restart | Jump to Game_Restart to go back to the menu. | ||||||||
|
"Game Over" messaging.
|
||||||||||
| StringGameOver | 35929 | DEFM 71 | Attribute: INK:WHITE, PAPER:BLACK (BRIGHT) + "GAME OVER". | |||||||
| 35930 | DEFM "GAME OVE","R"+128 | |||||||||
|
View the equivalent code in;
|
||||||||||
| Prev: 35885 | Up: Map | Next: 35939 |