Prev: C9EF Up: Map Next: CA1B
C9FC: Print a string whose first byte is its colour
Used by the routines at NEW_GAME and GAME_OVER.
As PRINT_TEXT_SINGLE_COLOUR, but the colour is the string's own first byte. The panel's heading (SCORE_TEXT) and the four lines after a game (END_TEXT) are printed with it.
Input
HL the position: L = x, H = y, in pixels, y counting up from the bottom
DE the colour byte, then the string, bit 7 set on its last character
Output
DE the byte after the string
PRINT_TEXT C9FC PUSH HL the text font; HL = the screen address
C9FD LD HL,$6B5E
CA00 LD (FONT_BASE),HL
CA03 POP HL
CA04 CALL CALC_VRAM_ADDR
CA07 LD A,(DE) the colour, from the string's first byte, into A'
CA08 INC DE
CA09 EX AF,AF'
This entry point is used by the routine at PRINT_TEXT_SINGLE_COLOUR.
PRINT_TEXT_CHAR CA0A LD A,(DE) bit 7 marks the last character
CA0B INC DE
CA0C BIT 7,A
CA0E JR NZ,PRINT_TEXT_LAST
CA10 CALL PRINT_CHAR_COLOURED print it and colour its cell; one cell right
CA13 INC L
CA14 JR PRINT_TEXT_CHAR
PRINT_TEXT_LAST CA16 AND $7F the last character, without its end marker
CA18 JP PRINT_CHAR_COLOURED
Prev: C9EF Up: Map Next: CA1B