Prev: 52176 Up: Map Next: 52220
52178: 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 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 Swap 48 (ASCII '0') for 58 ('0' in the custom characer set)
52188 JR NZ,Print_TwoToneText_0
52190 LD A,58
Print_TwoToneText_0 52192 PUSH HL Remember these values
52193 PUSH DE
52194 CALL Print_TwoToneText_SpaceCheck
52197 POP DE Restore values
52198 POP HL
52199 INC HL Onto the next character
52200 INC E Move to next row
52201 LD A,E Have we reached an 8 row boundary?
52202 AND 31
52204 JR NZ,Print_TwoToneText_Loop Loop back if not.
52206 LD A,E Adjust the screen address for the next row
52207 ADD A,32
52209 LD E,A
52210 AND 224 Have we reached a 64 row boundary?
52212 JR NZ,Print_TwoToneText_Loop Loop back if not.
52214 LD A,D Adjust for the next third of the screen
52215 ADD A,8
52217 LD D,A
52218 JR Print_TwoToneText_Loop Back for next character
Prev: 52176 Up: Map Next: 52220