Prev: CF0A Up: Map Next: CF6E
CF3D: Draw a 3x3 grid attribute color into attribute file if tile is background
Used by the routine at CF9B.
Input
C Attribute color
HL Address into the attribute file
DE Address into the attribute buffer
CF3D CALL $CF47 Draw a row of attribute color to attribute file
CF40 CALL $CF47 Draw a row of attribute color to attribute file
CF43 CALL $CF47 Draw a row of attribute color to attribute file
CF46 RET
Draw a row of attribute color into attribute file
CF47 LD A,(DE) Is attribute byte from attribute buffer a 'background' tile?
CF48 CP $47
CF4A JP NZ,$CF4E Jump and not draw
CF4D LD (HL),C Save attribute color into attribute file
CF4E INC HL Increment address into attribute file and buffer
CF4F INC DE
CF50 LD A,(DE) Is attribute byte from attribute buffer a 'background' tile?
CF51 CP $47
CF53 JP NZ,$CF57 Jump and not draw
CF56 LD (HL),C Save attribute color into attribute file
CF57 INC HL Increment address into attribute file and buffer
CF58 INC DE
CF59 LD A,(DE) Is attribute byte from attribute buffer a 'background' tile?
CF5A CP $47
CF5C JP NZ,$CF60 Jump and not draw
CF5F LD (HL),C Save attribute color into attribute file
CF60 PUSH DE Save DE
CF61 LD DE,$001E Point address into attribute file and buffer to the next row
CF64 ADD HL,DE
CF65 POP DE
CF66 PUSH HL
CF67 LD HL,$001E
CF6A ADD HL,DE
CF6B EX DE,HL
CF6C POP HL
CF6D RET
Prev: CF0A Up: Map Next: CF6E