Prev: CAE7 Up: Map Next: CC2B
CBD0: Draw Text
TwoTone_Attributes_Buffer CBD0 DEFW $0705 Stores the attributes; top attribute/ bottom attribute.
This entry point is used by the routines at Print_TwoToneText_Alias and Prep_Display_Phase.
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
CBDC JR NZ,TwoTone_Attributes_Buffer_0
CBDE LD A,$3A
TwoTone_Attributes_Buffer_0 CBE0 PUSH HL
CBE1 PUSH DE
CBE2 CALL Print_TwoToneText_SpaceCheck
CBE5 POP DE
CBE6 POP HL
CBE7 INC HL
CBE8 INC E
CBE9 LD A,E
CBEA AND $1F
CBEC JR NZ,Print_TwoToneText_Loop
CBEE LD A,E
CBEF ADD A,$20
CBF1 LD E,A
CBF2 AND $E0
CBF4 JR NZ,Print_TwoToneText_Loop
CBF6 LD A,D
CBF7 ADD A,$08
CBF9 LD D,A
CBFA JR Print_TwoToneText_Loop
This entry point is used by the routine at 5B9B.
Print_TwoToneText_SpaceCheck CBFC CP $20 If the character is a space then jump forward to TwoTone_Attributes_Buffer_1.
CBFE JR NZ,TwoTone_Attributes_Buffer_1
CC00 LD HL,$5B00
CC03 LD BC,$1001
CC06 EX DE,HL
CC07 PUSH HL
CC08 CALL Copy_Routine
CC0B POP HL
CC0C JR TwoTone_Attributes_Buffer_3
TwoTone_Attributes_Buffer_1 CC0E CP $41
CC10 JR NC,TwoTone_Attributes_Buffer_2
CC12 ADD A,$2A
TwoTone_Attributes_Buffer_2 CC14 SUB $41
CC16 ADD A,$0A
CC18 PUSH DE
CC19 CALL Draw_Number
CC1C POP HL
TwoTone_Attributes_Buffer_3 CC1D CALL $CC2B
CC20 LD BC,($CBD0) Load the stored top/ bottom attribute bytes back into BC and write them to the screen.
CC24 LD (HL),B
CC25 LD DE,$0020
CC28 ADD HL,DE
CC29 LD (HL),C
CC2A RET Return.
Prev: CAE7 Up: Map Next: CC2B