![]() |
Routines |
| Prev: 961B | Up: Map | Next: 96AF |
|
Used by the routines at GameOver and GameComplete.
Prints the time, score and percentage of rooms visited, each with its label, on the game over screen.
|
||||||||
| GameStats | 9641 | CALL CalculateRoomsVisited | Call CalculateRoomsVisited to calculate the percentage of rooms visited. | |||||
|
Handle printing the time.
|
||||||||
| 9644 | LD HL,$4040 | HL=4040 (screen buffer location). | ||||||
| 9647 | LD DE,$967F | Point DE at the label for the time at StringTime. | ||||||
| 964A | CALL PrintStringColour | Call PrintStringColour to print the string. | ||||||
|
Handle printing the score.
|
||||||||
| 964D | LD HL,$5040 | HL=5040 (screen buffer location). | ||||||
| 9650 | LD DE,$968F | Point DE at the label for the score at StringScore. | ||||||
| 9653 | CALL PrintStringColour | Call PrintStringColour to print the string. | ||||||
|
Handle printing the percentage label.
|
||||||||
| 9656 | LD HL,$6040 | HL=6040 (screen buffer location). | ||||||
| 9659 | LD DE,$969F | Point DE at the label for the percentage at StringPercentage. | ||||||
| 965C | CALL PrintStringColour | Call PrintStringColour to print the string. | ||||||
|
Handle printing the clock.
|
||||||||
| 965F | LD HL,$BFCC | Write main font "0" to FontPointer. | ||||||
| 9662 | LD ($5E01),HL | |||||||
| 9665 | LD HL,$4080 | HL=4080 (screen buffer location). | ||||||
| 9668 | CALL PrintClock | Call PrintClock to print the clock. | ||||||
|
Handle printing the score.
|
||||||||
| 966B | LD HL,$5080 | HL=5080 (screen buffer location). | ||||||
| 966E | CALL PrintScore | Call PrintScore to print the score. | ||||||
|
Handle printing the percentage of rooms visited.
|
||||||||
| 9671 | LD HL,$6080 | HL=6080 (screen buffer location). | ||||||
| 9674 | CALL ScreenAddress | Call ScreenAddress to get the screen address. | ||||||
| 9677 | LD DE,$5E54 | Point DE at the visited percentage at VisitedPercentage. | ||||||
| 967A | LD B,$01 | B=01. | ||||||
| 967C | JP PrintScore_Loop | Jump to PrintScore_Loop to print the score. | ||||||
|
The strings for the three labels. Each is in the format that PrintStringColour prints: an attribute, followed by the characters, with bit 7 set on the last character.
|
||||||||
| StringTime | 967F | DEFM $45 | Attribute: INK:CYAN, PAPER:BLACK (BRIGHT) + "TIME" and a colon (character code 23 is drawn as ":" in the font). | |||||
| 9680 | DEFM "TIME # "," "+$80 | |||||||
| StringScore | 968F | DEFM $45 | Attribute: INK:CYAN, PAPER:BLACK (BRIGHT) + "SCORE". | |||||
| 9690 | DEFM "SCORE "," "+$80 | |||||||
| StringPercentage | 969F | DEFM $45 | Attribute: INK:CYAN, PAPER:BLACK (BRIGHT) + a percent sign (character code 24 is drawn as "%" in the font). | |||||
| 96A0 | DEFM "$ "," "+$80 | |||||||
| Prev: 961B | Up: Map | Next: 96AF |