Prev: 40765 Up: Map Next: 40832
40784: Unused routine
This is a room drawing routine. It draws a horizontal line.
40784 INC HL Advance data pointer by three bytes...
40785 INC HL ...
40786 INC HL ...
40787 PUSH HL Transfer current position in room layout data from HL to IX...
40788 POP IX ...
40790 LD L,(IX+0) Load HL with y-coordinate (pixels)...
40793 LD H,0 ...
40795 ADD HL,HL ...and double
40796 LD BC,65140 Point BC at table of display file addresses of start of each pixel row...
40799 ADD HL,BC ...and add doubled y-coordinate as offset in HL
40800 CALL 64632 Load address corresponding to start of pixel row at this coordinate into HL
40803 INC IX Advance layout data pointer to next byte
40805 LD C,(IX+0) Load BC with x-coordinate of start of line (characters)...
40808 LD B,0 ...
40810 ADD HL,BC ...and add to HL as offset
40811 INC IX Advance layout data pointer to next byte
40813 LD A,(IX+0) Load A with x-coordinate of end of line (characters)
40816 SUB C Subtract start coordinate from end coordinate and add one to get width...
40817 INC A ...
40818 LD B,A ...and load into B
40819 LD A,255 Load A with 255 (i.e. all bits set)
40821 LD (HL),A Write a row of eight set pixels to the display file...
40822 INC HL ...and advance to next character to the right
40823 DJNZ 40821 Decrease B (remaining number of character blocks to draw to) and loop back to 40821
40825 PUSH IX Transfer current position in room layout data from IX to HL...
40827 POP HL ...
40828 INC HL Advance room layout data pointer to next instruction in layout data
40829 JP 38977 Jump back to 38977 for next byte of room layout data
Prev: 40765 Up: Map Next: 40832