Prev: 95E8 Up: Map Next: 9643
960F: Draw the coal in the room
Used by the routines at 95B3 and 96AA.
Input
IX Pointer to coal information (offset from C53F)
960F LD B,(IX+$02) Convert the Y co-ordinate to a screen address and put it in HL.
9612 LD A,$18
9614 SUB B
9615 RLCA
9616 RLCA
9617 RLCA
9618 DEC A
9619 LD L,A
961A LD H,$00
961C ADD HL,HL Double it to get an appropriate entry in the screen address table.
961D LD DE,$EA60 Add the basic address of the screen address table to get the right entry.
9620 ADD HL,DE
9621 LD A,(HL) Put the actual screen address in HL.
9622 INC HL
9623 LD H,(HL)
9624 LD L,A
9625 LD E,(IX+$01) Add the X co-ordinate.
9628 LD D,$00
962A ADD HL,DE
962B EX DE,HL Add an offset to give an address in the screen buffer from D260.
962C LD HL,$9260
962F ADD HL,DE
9630 LD IY,$C537 Point IY at the coal UDG.
9634 LD B,$08 8 rows to draw.
9636 LD A,(IY+$00) Get the graphic data.
9639 CPL Invert it.
963A LD (HL),A Store it on the screen and in the screen buffer.
963B LD (DE),A
963C INC D Move to the next row on screen.
963D INC H Move to the next row in the screen buffer.
963E INC IY Move to the next graphic data.
9640 DJNZ $9636 Loop while there are more rows to draw.
9642 RET
Prev: 95E8 Up: Map Next: 9643