![]() |
Routines |
| Prev: 8B8A | Up: Map | Next: 8C63 |
|
Used by the routine at HandlerKnight.
|
||||
| GameOver | 8C35 | CALL ClearPlayArea | Call ClearPlayArea. | |
| 8C38 | LD HL,$BE4C | Write MainFont to FontPointer. | ||
| 8C3B | LD ($5E01),HL | |||
|
Handle printing "Game Over" messaging.
|
||||
| 8C3E | LD HL,$3040 | HL=3040 (screen buffer location). | ||
| 8C41 | LD DE,$8C59 | DE=StringGameOver. | ||
| 8C44 | CALL PrintStringColour | Call PrintStringColour. | ||
|
Handle printing the game statistics.
|
||||
| 8C47 | CALL GameStats | Call GameStats. | ||
|
Provide a pause for us to reflect that the game has now ended.
|
||||
| GameOverDelay | 8C4A | LD B,$14 | B=14. | |
| 8C4C | LD HL,$0000 | HL=0000. | ||
|
From HL being set above (and for each loop), decrementing 0000 by one gives FFFF.
|
||||
| GameOverDelay_Loop | 8C4F | DEC HL | Decrease HL by one. | |
| 8C50 | LD A,H | Loop back to GameOverDelay_Loop until HL is zero. | ||
| 8C51 | OR L | |||
| 8C52 | JR NZ,GameOverDelay_Loop | |||
| 8C54 | DJNZ GameOverDelay_Loop | Decrease counter by one and loop back to GameOverDelay_Loop until counter is zero. | ||
| 8C56 | JP Game_Restart | Jump to Game_Restart. | ||
|
"Game Over" messaging.
|
||||
| StringGameOver | 8C59 | DEFM $47 | Attribute: 47 + "GAME OVER". | |
| 8C5A | DEFM "GAME OVE","R"+$80 | |||
| Prev: 8B8A | Up: Map | Next: 8C63 |