Prev: D063 Up: Map Next: D0AC
D082: Colour a column of attribute cells three wide
As colour_two_cells for three cells: pieces with a column step of two bytes or more, and flat pieces.
Input
B The number of rows
C The attribute
DE $0020
HL The attribute address of the bottom row
colour_three_cells D082 CALL in_play_area The first cell.
D085 JR Z,colour_three_cells_3
D087 LD A,L
D088 AND $1F
D08A DEC A
D08B CP $1C
D08D JR NC,colour_three_cells_0
D08F LD (HL),C
colour_three_cells_0 D090 INC HL The second.
D091 LD A,L
D092 AND $1F
D094 DEC A
D095 CP $1C
D097 JR NC,colour_three_cells_1
D099 LD (HL),C
colour_three_cells_1 D09A INC HL The third.
D09B LD A,L
D09C AND $1F
D09E DEC A
D09F CP $1C
D0A1 JR NC,colour_three_cells_2
D0A3 LD (HL),C
colour_three_cells_2 D0A4 DEC HL
D0A5 DEC HL
colour_three_cells_3 D0A6 AND A Up a row.
D0A7 SBC HL,DE
D0A9 DJNZ colour_three_cells
D0AB RET
Prev: D063 Up: Map Next: D0AC