Prev: 9EF5 Up: Map Next: 9F2C
9EFE: Dissolve the play area to black
Used by the routine at dissolve_and_clear.
The play area is 28 bytes by 160 lines from x=8 at its bottom line $B7, walked from the bottom up (line_up_hl). Sixteen times over, every byte is ANDed with the next of the nine masks at dissolve_masks, each clearing one bit (one clears none), the masks running on from byte to byte and line to line, so the picture loses its pixels in a scattered pattern rather than line by line.
Input
HL The bottom left corner, as x and line
dissolve_play_area 9EFE CALL pixel_to_screen Its screen address; sixteen times
9F01 LD DE,dissolve_masks
9F04 LD (box_x),HL
9F07 LD A,$10
dissolve_play_area_0 9F09 EX AF,AF' Each line, 28 bytes
9F0A LD HL,(box_x)
9F0D LD C,$A0
dissolve_play_area_1 9F0F LD B,$1C
9F11 PUSH HL
dissolve_play_area_2 9F12 LD A,(DE) AND the bytes with the masks, round and round
9F13 AND (HL)
9F14 LD (HL),A
9F15 INC L
9F16 INC DE
9F17 LD A,(DE)
9F18 AND A
9F19 JR NZ,dissolve_play_area_3
9F1B LD DE,dissolve_masks
dissolve_play_area_3 9F1E DJNZ dissolve_play_area_2
9F20 POP HL The line above
9F21 CALL line_up_hl
9F24 DEC C
9F25 JR NZ,dissolve_play_area_1
9F27 EX AF,AF' Again
9F28 DEC A
9F29 JR NZ,dissolve_play_area_0
9F2B RET
Prev: 9EF5 Up: Map Next: 9F2C