Prev: AAC4 Up: Map Next: AB08
AAE7: Print Right Half Of Character
Used by the routine at PrintLargeText.
Draws the right half of four rows of a character in double size, in the same way as PrintLeftHalfOfCharacter does for the left half, and then moves down to the cell below on the left.
Input
DE The address of the pixels of the character
HL The screen address
Output
DE The address of the pixels of the next four rows
HL The screen address of the cell below on the left
Swap the pixels and the screen address.
PrintRightHalfOfCharacter AAE7 PUSH HL Stash the screen address on the stack.
AAE8 EX DE,HL Swap the pixels into HL and the screen address into DE.
AAE9 LD B,$04 Set the number of rows to four.
Widen the right four pixels of each row.
PrintRightHalf_Loop AAEB LD A,(HL) Fetch a row of pixels.
AAEC INC HL Move on to the next row.
AAED AND %00001111 Keep the right four pixels.
AAEF PUSH HL Stash the address of the pixels on the stack.
AAF0 LD HL,$AB08 Point HL at WidenedPixels.
AAF3 CALL AddAToHL Point HL at the entry for the four pixels.
AAF6 LD A,(HL) Fetch the widened pixels.
AAF7 LD (DE),A Write them to the screen.
AAF8 INC D Move down a pixel row.
AAF9 LD (DE),A Write them again.
AAFA INC D Move down a pixel row.
AAFB POP HL Retrieve the address of the pixels.
AAFC DJNZ PrintRightHalf_Loop Loop back until four rows have been drawn.
Colour the cell and move down on the left.
AAFE EX DE,HL Swap the screen address back into HL and the pixels into DE.
AAFF POP HL Retrieve the screen address.
AB00 CALL SetTileAttribute Set the attribute of the cell.
AB03 CALL MoveDownRow Move down to the next row of cells.
AB06 DEC L Move back to the left.
AB07 RET Return.
Prev: AAC4 Up: Map Next: AB08