![]() |
Routines |
| Prev: 83EF | Up: Map | Next: 842E |
|
Prints the score as a percentage of the adventure, taken from the percentage complete, and finishes the game-over text.
|
||||
|
Actions "game over".
|
||||
| GameOver_Start | 83F5 | PUSH HL | Write 00 to WaitCountdown. | |
| 83F6 | PUSH DE | |||
| 83F7 | XOR A | |||
| 83F8 | LD ($B701),A | |||
| 83FB | LD HL,$B454 | Point at the message "you have mastered [0x16]" (B454). | ||
| 83FE | CALL PrintMessage | Call PrintMessage to print message. | ||
| 8401 | LD HL,($B6F7) | Read the percentage complete from PercentageComplete. | ||
| 8404 | LD DE,$0064 | Divide by 0064 (100). | ||
| 8407 | CALL PercentageAscii | Call PercentageAscii to make the hundreds digit. | ||
| 840A | CALL NZ,Print_Character | Call Print_Character if PercentageAscii made a hundreds digit other than zero. | ||
| 840D | LD DE,$000A | Divide by 000A (10). | ||
| 8410 | CALL PercentageAscii | Call PercentageAscii to make the tens digit. | ||
| 8413 | CALL Print_Character | Call Print_Character to print one character. | ||
| 8416 | LD A,$2E | Use the character '.'. | ||
| 8418 | CALL Print_Character | Call Print_Character to print one character. | ||
| 841B | LD A,L | Copy the remainder into A as the percentage digit. | ||
| 841C | ADD A,$30 | Add 30 to make the ASCII digit. | ||
| 841E | CALL Print_Character | Call Print_Character to print one character. | ||
| 8421 | XOR A | Clear the capitalise-the-next-letter flag. | ||
| 8422 | LD ($B704),A | |||
| 8425 | LD HL,$B462 | Point at the message "% of this adventure" (B462). | ||
| 8428 | CALL PrintMessage | Call PrintMessage to print message. | ||
| 842B | POP DE | Restore DE and HL from the stack. | ||
| 842C | POP HL | |||
| 842D | RET | Return. | ||
| Prev: 83EF | Up: Map | Next: 842E |