Prev: A75C Up: Map Next: A7D6
A7A4: Erase Mirrored Row Directly
Erases one row of a sprite that is flipped from left to right from the screen. Each byte of the sprite has its bits reversed by the table that B points to, and the screen is filled from right to left. The entry point depends on the width of the sprite in bytes, from six bytes at EraseMirroredRowDirectly to one byte at EraseMirroredRowDirectly_Sixth.
Input
B High byte of the table that reverses bits
DE' Address of the data of the sprite
HL' Screen address of the right of the row
EraseMirroredRowDirectly A7A4 LD A,(DE) Fetch a byte of the sprite.
A7A5 LD C,A Use it to look up the byte with the bits reversed.
A7A6 LD A,(BC) Fetch it.
A7A7 CPL Invert it.
A7A8 AND (HL) Clear the pixels of the screen.
A7A9 LD (HL),A Store the byte.
A7AA DEC L Move on to the next byte of the screen to the left.
A7AB INC DE Move on to the next byte of the sprite.
EraseMirroredRowDirectly_Second A7AC LD A,(DE) Fetch a byte of the sprite.
A7AD LD C,A Use it to look up the byte with the bits reversed.
A7AE LD A,(BC) Fetch it.
A7AF CPL Invert it.
A7B0 AND (HL) Clear the pixels of the screen.
A7B1 LD (HL),A Store the byte.
A7B2 DEC L Move on to the next byte of the screen to the left.
A7B3 INC DE Move on to the next byte of the sprite.
EraseMirroredRowDirectly_Third A7B4 LD A,(DE) Fetch a byte of the sprite.
A7B5 LD C,A Use it to look up the byte with the bits reversed.
A7B6 LD A,(BC) Fetch it.
A7B7 CPL Invert it.
A7B8 AND (HL) Clear the pixels of the screen.
A7B9 LD (HL),A Store the byte.
A7BA DEC L Move on to the next byte of the screen to the left.
A7BB INC DE Move on to the next byte of the sprite.
EraseMirroredRowDirectly_Fourth A7BC LD A,(DE) Fetch a byte of the sprite.
A7BD LD C,A Use it to look up the byte with the bits reversed.
A7BE LD A,(BC) Fetch it.
A7BF CPL Invert it.
A7C0 AND (HL) Clear the pixels of the screen.
A7C1 LD (HL),A Store the byte.
A7C2 DEC L Move on to the next byte of the screen to the left.
A7C3 INC DE Move on to the next byte of the sprite.
EraseMirroredRowDirectly_Fifth A7C4 LD A,(DE) Fetch a byte of the sprite.
A7C5 LD C,A Use it to look up the byte with the bits reversed.
A7C6 LD A,(BC) Fetch it.
A7C7 CPL Invert it.
A7C8 AND (HL) Clear the pixels of the screen.
A7C9 LD (HL),A Store the byte.
A7CA DEC L Move on to the next byte of the screen to the left.
A7CB INC DE Move on to the next byte of the sprite.
EraseMirroredRowDirectly_Sixth A7CC LD A,(DE) Fetch a byte of the sprite.
A7CD LD C,A Use it to look up the byte with the bits reversed.
A7CE LD A,(BC) Fetch it.
A7CF CPL Invert it.
A7D0 AND (HL) Clear the pixels of the screen.
A7D1 LD (HL),A Store the byte.
A7D2 INC DE Move on to the next byte of the sprite.
A7D3 JP EraseAlignedRowDirectly_Next Jump to EraseAlignedRowDirectly_Next.
Prev: A75C Up: Map Next: A7D6