Prev: E4A7 Up: Map Next: E4F1
E4CF: Draw a two-byte-wide terrain step
Directions 1 and 8 at shift 0 (here), the one-byte slopes shifted by 2, 4 or 6 (directions 2, 3, 9 and 10, at the second INC L), and the wall shifted (direction 14, at the LD B,A). Two POPs a pair of rows: a row left to right, up, a row right to left, up; about 105 T-states a pair.
Input
A the number of pairs of rows
HL the screen address of the bottom row's first byte, less one or two
SP the graphic
blit_two E4CF INC L Step right into the column; B counts the pairs of rows
E4D0 INC L
E4D1 LD B,A
blit_two_0 E4D2 POP DE Pop two bytes: a row left to right; up a row
E4D3 LD (HL),E
E4D4 INC L
E4D5 LD (HL),D
E4D6 DEC H
E4D7 POP DE Pop two more: the row above, right to left; up a row
E4D8 LD (HL),E
E4D9 DEC L
E4DA LD (HL),D
E4DB DEC H
E4DC LD A,H Into the next character row up if this one is done; the next pair; leave HL as the column for the next step
E4DD INC A
E4DE AND $07
E4E0 JR NZ,blit_two_1
E4E2 LD A,L
E4E3 SUB $20
E4E5 LD L,A
E4E6 JR C,blit_two_1
E4E8 LD A,H
E4E9 ADD A,$08
E4EB LD H,A
blit_two_1 E4EC DJNZ blit_two_0
E4EE JP after_step_drawn
Prev: E4A7 Up: Map Next: E4F1