Prev: 55839 Up: Map Next: 55941
55868: Routine at DA3C
Used by the routines at 55951 and 55985.
Input
B Pixel y-coordinate
C Pixel x-coordinate
55868 CALL 8874 Call PIXEL_ADD.
55871 LD E,A E=A.
55872 LD D,8 D=8.
55874 AND A Jump to 55904 if A is zero.
55875 JP Z,55904
55878 LD B,E B=E.
55879 LD A,(IX+0) A=*IX+0.
55882 LD C,0 C=0.
55884 SRL A Shift A right.
55886 RR C Rotate C right.
55888 DJNZ 55884 Decrease counter by one and loop back to 55884 until counter is zero.
55890 LD (HL),A Write A to *HL.
55891 INC HL Increment HL by one.
55892 LD A,C A=C.
55893 LD (HL),A Write A to *HL.
55894 DEC HL Decrease HL by one.
55895 INC IX Increment IX by one.
55897 CALL 55917 Call 55917.
55900 DEC D Decrease D by one.
55901 JR NZ,55878 Jump to 55878 if D is not zero.
55903 RET Return.
55904 LD B,D B=D.
55905 LD A,(IX+0) A=*IX+0.
55908 LD (HL),A Write A to *HL.
55909 CALL 55917 Call 55917.
55912 INC IX Increment IX by one.
55914 DJNZ 55905 Decrease counter by one and loop back to 55905 until counter is zero.
55916 RET Return.
55917 INC H Increment H by one.
55918 LD A,H A=H.
55919 AND %00000111 Keep only bits 0-2.
55921 RET NZ Return if H is not zero.
55922 LD A,H A=H.
55923 SUB 8 A-=8.
55925 LD H,A H=A.
55926 LD A,L A=L.
55927 ADD A,32 A+=32.
55929 LD L,A L=A.
55930 RET NC Return if H is higher.
55931 LD A,H A=H.
55932 ADD A,8 A+=8.
55934 LD H,A H=A.
55935 XOR %01011000 Flip bits 3-4, 6.
55937 RET NZ Return if H is not zero.
55938 LD H,64 H=64.
55940 RET Return.
Prev: 55839 Up: Map Next: 55941