Prev: 961B Up: Map Next: 967F
9641: Print the three end-of-game figures
Used by the routines at GAME_OVER and SHOW_END_SCREEN.
Three labels and three numbers, stacked at the left of the cleared play area. The labels carry their own colour in their first byte and their own punctuation: the one for the clock ends with the font's colon glyph, so TIME's digits print either side of a colon that was drawn with the word.
It assumes the text font is already selected, which is why GAME_OVER repoints $5E01 before calling. Halfway through it switches to the digit-biased copy for the numbers.
The third line is a percent sign -- "$" in this font -- and the rooms-explored figure: the share of the castle seen.
DRAW_SUMMARY 9641 CALL COUNT_ROOMS_EXPLORED Work out the proportion of the castle seen before printing it.
9644 LD HL,$4040 "TIME", with the colon.
9647 LD DE,END_LABELS
964A CALL PRINT_STRING
964D LD HL,$5040
9650 LD DE,SCORE_LABEL
9653 CALL PRINT_STRING
9656 LD HL,$6040
9659 LD DE,PERCENT_LABEL
965C CALL PRINT_STRING
965F LD HL,FONT_DIGITS From here on the numbers, so bias the tile source to the digits.
9662 LD ($5E01),HL
9665 LD HL,$4080 The clock, then the score.
9668 CALL PRINT_CLOCK
966B LD HL,$5080
966E CALL DRAW_SCORE_AT
9671 LD HL,$6080 And the rooms-explored figure.
9674 CALL PIXEL_TO_SCREEN One byte, two digits.
9677 LD DE,$5E54
967A LD B,$01
967C JP DRAW_DIGITS
Prev: 961B Up: Map Next: 967F