Prev: A678 Up: Map Next: A6E1
A6B2: Erase Aligned Row In Buffer
Erases one row of a sprite that is aligned to a byte from the buffer used by DrawSprites. The entry point depends on the width of the sprite in bytes, from six bytes at EraseAlignedRowInBuffer to one byte at A6D0.
Input
DE' Address of the data of the sprite
HL' Address in the buffer
EraseAlignedRowInBuffer A6B2 LD A,(DE) Fetch a byte of the sprite.
A6B3 CPL Invert it.
A6B4 AND (HL) Clear the pixels of the buffer.
A6B5 LD (HL),A Store the byte.
A6B6 INC DE Move on to the next byte of the sprite.
A6B7 INC L Move on to the next byte of the buffer.
A6B8 LD A,(DE) Fetch a byte of the sprite.
A6B9 CPL Invert it.
A6BA AND (HL) Clear the pixels of the buffer.
A6BB LD (HL),A Store the byte.
A6BC INC DE Move on to the next byte of the sprite.
A6BD INC L Move on to the next byte of the buffer.
A6BE LD A,(DE) Fetch a byte of the sprite.
A6BF CPL Invert it.
A6C0 AND (HL) Clear the pixels of the buffer.
A6C1 LD (HL),A Store the byte.
A6C2 INC DE Move on to the next byte of the sprite.
A6C3 INC L Move on to the next byte of the buffer.
A6C4 LD A,(DE) Fetch a byte of the sprite.
A6C5 CPL Invert it.
A6C6 AND (HL) Clear the pixels of the buffer.
A6C7 LD (HL),A Store the byte.
A6C8 INC DE Move on to the next byte of the sprite.
A6C9 INC L Move on to the next byte of the buffer.
A6CA LD A,(DE) Fetch a byte of the sprite.
A6CB CPL Invert it.
A6CC AND (HL) Clear the pixels of the buffer.
A6CD LD (HL),A Store the byte.
A6CE INC DE Move on to the next byte of the sprite.
A6CF INC L Move on to the next byte of the buffer.
A6D0 LD A,(DE) Fetch a byte of the sprite.
A6D1 CPL Invert it.
A6D2 AND (HL) Clear the pixels of the buffer.
A6D3 LD (HL),A Store the byte.
A6D4 INC DE Move on to the next byte of the sprite.
A6D5 LD A,$00 Fetch the amount to skip, which was set at A45D.
A6D7 ADD A,L Add it to the address in the buffer.
A6D8 LD L,A Store it in L.
A6D9 EX AF,AF' Switch to the count of rows.
A6DA DEC A Take one off.
A6DB JP Z,DrawSprites_Draw Jump to DrawSprites_Draw to draw the second sprite when there are none left.
A6DE EX AF,AF' Switch back.
A6DF JP (IY) Erase the next row.
Prev: A678 Up: Map Next: A6E1