Prev: 51943 Up: Map Next: 52267
52176: Draw Text
TwoTone_Attributes_Buffer 52176 DEFW 1797 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 52178 LD (52176),BC Stash the attributes at TwoTone_Attributes_Buffer.
Print_TwoToneText_Loop 52182 LD A,(HL) Grab the next character in the string, if it's 255 then return.
52183 CP 255
52185 RET Z
52186 CP 48
52188 JR NZ,TwoTone_Attributes_Buffer_0
52190 LD A,58
TwoTone_Attributes_Buffer_0 52192 PUSH HL
52193 PUSH DE
52194 CALL Print_TwoToneText_SpaceCheck
52197 POP DE
52198 POP HL
52199 INC HL
52200 INC E
52201 LD A,E
52202 AND 31
52204 JR NZ,Print_TwoToneText_Loop
52206 LD A,E
52207 ADD A,32
52209 LD E,A
52210 AND 224
52212 JR NZ,Print_TwoToneText_Loop
52214 LD A,D
52215 ADD A,8
52217 LD D,A
52218 JR Print_TwoToneText_Loop
This entry point is used by the routine at 23451.
Print_TwoToneText_SpaceCheck 52220 CP 32 If the character is a space then jump forward to TwoTone_Attributes_Buffer_1.
52222 JR NZ,TwoTone_Attributes_Buffer_1
52224 LD HL,23296
52227 LD BC,4097
52230 EX DE,HL
52231 PUSH HL
52232 CALL Copy_Routine
52235 POP HL
52236 JR TwoTone_Attributes_Buffer_3
TwoTone_Attributes_Buffer_1 52238 CP 65
52240 JR NC,TwoTone_Attributes_Buffer_2
52242 ADD A,42
TwoTone_Attributes_Buffer_2 52244 SUB 65
52246 ADD A,10
52248 PUSH DE
52249 CALL Draw_Number
52252 POP HL
TwoTone_Attributes_Buffer_3 52253 CALL 52267
52256 LD BC,(52176) Load the stored top/ bottom attribute bytes back into BC and write them to the screen.
52260 LD (HL),B
52261 LD DE,32
52264 ADD HL,DE
52265 LD (HL),C
52266 RET Return.
Prev: 51943 Up: Map Next: 52267