Prev: CBD0 Up: Map Next: CBFC
CBD2: Draw Text in two colours
Used by the routines at Print_TwoToneText_Alias and Prep_Display_Phase.
Input
HL Pointer to string to print
DE Location on screen to draw
B Attribute for top of character
C Attribute for bottom of character
Print_TwoToneText CBD2 LD ($CBD0),BC Stash the attributes at TwoTone_Attributes_Buffer.
Print_TwoToneText_Loop CBD6 LD A,(HL) Grab the next character in the string, if it's FF then return.
CBD7 CP $FF
CBD9 RET Z
CBDA CP $30 Swap 30 (ASCII '0') for 3A ('0' in the custom characer set)
CBDC JR NZ,Print_TwoToneText_0
CBDE LD A,$3A
Print_TwoToneText_0 CBE0 PUSH HL Remember these values
CBE1 PUSH DE
CBE2 CALL Print_TwoToneText_SpaceCheck
CBE5 POP DE Restore values
CBE6 POP HL
CBE7 INC HL Onto the next character
CBE8 INC E Move to next row
CBE9 LD A,E Have we reached an 8 row boundary?
CBEA AND $1F
CBEC JR NZ,Print_TwoToneText_Loop Loop back if not.
CBEE LD A,E Adjust the screen address for the next row
CBEF ADD A,$20
CBF1 LD E,A
CBF2 AND $E0 Have we reached a 64 row boundary?
CBF4 JR NZ,Print_TwoToneText_Loop Loop back if not.
CBF6 LD A,D Adjust for the next third of the screen
CBF7 ADD A,$08
CBF9 LD D,A
CBFA JR Print_TwoToneText_Loop Back for next character
Prev: CBD0 Up: Map Next: CBFC