Prev: C898 Up: Map Next: C8CA
C8B2: Fill a rectangle of the play area's attributes
Used by the routine at ENDING_PIT_FRONT.
As Pentagram's FILL_RECT, but for the attribute buffer, 24 bytes a row, and with the play area's paper this turn (LAST_FLASH) mixed into the colour. The ending's pictures are coloured with it (ENDING_PIT_FRONT).
Input
A the colour
HL the top-left cell's address in the attribute buffer
B the width, in cells
C the height, in rows
FILL_ATTR_RECT C8B2 LD E,A the colour with this turn's paper
C8B3 LD A,(LAST_FLASH)
C8B6 OR E
C8B7 EX AF,AF' DE = 24 - B, from the end of one row to the start of the next
C8B8 LD A,$18
C8BA SUB B
C8BB LD E,A
C8BC LD D,$00
C8BE EX AF,AF'
FILL_ATTR_RECT_0 C8BF PUSH BC B cells a row, C rows
FILL_ATTR_RECT_1 C8C0 LD (HL),A
C8C1 INC HL
C8C2 DJNZ FILL_ATTR_RECT_1
C8C4 ADD HL,DE
C8C5 POP BC
C8C6 DEC C
C8C7 JR NZ,FILL_ATTR_RECT_0
C8C9 RET
Prev: C898 Up: Map Next: C8CA