Prev: 69E5 Up: Map Next: 6A07
69E6: Place a font character bitmap into a message graphic buffer
Used by the routines at 6B1B and 6A08. Appends a font character bitmap (corresponding to the ASCII code in A) to the existing contents of a message graphic buffer.
Input
A ASCII code
C Pixel columns remaining in the buffer
HL' Buffer address
69E6 LD E,A E=ASCII code (0x20-0x7F)
69E7 LD D,$D7 Point DE at the appropriate entry in the table of font character bitmap widths at D720
69E9 LD A,(DE) A=width of the font character in pixels (1-5)
69EA LD B,A Store this in B
69EB INC D
69EC LD A,(DE) A=bit pattern for one pixel column of the font character
69ED CALL $69F5 Slide this into the message buffer
69F0 DEC C One fewer pixel column remaining in the message buffer
69F1 DJNZ $69EB Jump back until all pixel columns for the font character have been copied into the message buffer
69F3 DEC C One fewer pixel column remaining in the message buffer
This entry point is used by the routine at 6B1B.
69F4 XOR A A=0 (blank pixel column)
69F5 EXX
69F6 PUSH HL
69F7 LD C,$08 8 pixels per column
69F9 LD B,$20 32 (during startup) or 8 bytes per pixel row (this instruction is set to LD B,$08 before the game starts; see 53A0)
69FB RRCA Push a pixel into the carry flag
69FC RL (HL) Drag the pixel into the message buffer and shove the existing pixels one place to the left
69FE DEC HL
69FF DJNZ $69FC
6A01 DEC C
6A02 JR NZ,$69F9 Jump back to collect the next pixel up
6A04 POP HL Restore the address of the last byte in the message buffer to HL'
6A05 EXX
6A06 RET
Prev: 69E5 Up: Map Next: 6A07