Prev: 7834 Up: Map Next: 7A64
7A35: Insert charcter bitmap into a sprite bitmap. (Key icon on a door).
Used by the routines at Vector_Main and Screen_DrawColumn.
Input
A Ascii character of icon.
HL -
DE -
BC - Width of bitmap (being written too).
Char_InsertIntoBitmap 7A35 ADD HL,DE Calculate
7A36 LD DE,$3C00
7A39 CP $51
7A3B JR C,Char_InsertIntoBitmap_0
7A3D LD DE,Charset_StartPtr
Char_InsertIntoBitmap_0 7A40 PUSH HL Work out character bitmap address.
7A41 LD L,A
7A42 LD H,$00
7A44 ADD HL,HL
7A45 ADD HL,HL
7A46 ADD HL,HL
7A47 ADD HL,DE
7A48 EX DE,HL
7A49 POP HL
7A4A DEC BC
7A4B LD A,$08
Char_InsertIntoBitmap_1 7A4D EX AF,AF' Insert char bitmap into main bitmap by rotating nibbles around.
7A4E LD A,(DE)
7A4F RRD
7A51 RRA
7A52 RRA
7A53 RRA
7A54 RRA
7A55 RLD
7A57 INC HL
7A58 RLD
7A5A LD A,(HL)
7A5B RRD
7A5D ADD HL,BC
7A5E INC DE
7A5F EX AF,AF'
7A60 DEC A
7A61 JR NZ,Char_InsertIntoBitmap_1
7A63 RET
Prev: 7834 Up: Map Next: 7A64