Prev: D04F Up: Map Next: D082
D063: Colour a column of attribute cells two wide
Entered through IY from colour_piece for pieces with a column step of one byte (and for walls). Each row upwards: the two cells at HL, wherever they are inside the play area and its columns 1-28.
Input
B The number of rows
C The attribute
DE $0020
HL The attribute address of the bottom row
colour_two_cells D063 CALL in_play_area The first cell.
D066 JR Z,colour_two_cells_2
D068 LD A,L
D069 AND $1F
D06B DEC A
D06C CP $1C
D06E JR NC,colour_two_cells_0
D070 LD (HL),C
colour_two_cells_0 D071 INC HL The second.
D072 LD A,L
D073 AND $1F
D075 DEC A
D076 CP $1C
D078 JR NC,colour_two_cells_1
D07A LD (HL),C
colour_two_cells_1 D07B DEC HL
colour_two_cells_2 D07C AND A Up a row.
D07D SBC HL,DE
D07F DJNZ colour_two_cells
D081 RET
Prev: D04F Up: Map Next: D082