![]() |
Routines |
| Prev: 42399 | Up: Map | Next: 42601 |
|
Erases one row of a sprite that is aligned to a byte from the screen. The entry point depends on the width of the sprite in bytes, from six bytes at EraseAlignedRowDirectly to one byte at EraseAlignedRowDirectly_Sixth. Each byte clears the pixels of the screen that are set in the sprite.
|
||||||||||
| EraseAlignedRowDirectly | 42537 | LD A,(DE) | Fetch a byte of the sprite. | |||||||
| 42538 | CPL | Invert it. | ||||||||
| 42539 | AND (HL) | Clear the pixels of the screen. | ||||||||
| 42540 | LD (HL),A | Store the byte. | ||||||||
| 42541 | INC L | Move on to the next byte of the screen. | ||||||||
| 42542 | INC DE | Move on to the next byte of the sprite. | ||||||||
| EraseAlignedRowDirectly_Second | 42543 | LD A,(DE) | Fetch a byte of the sprite. | |||||||
| 42544 | CPL | Invert it. | ||||||||
| 42545 | AND (HL) | Clear the pixels of the screen. | ||||||||
| 42546 | LD (HL),A | Store the byte. | ||||||||
| 42547 | INC L | Move on to the next byte of the screen. | ||||||||
| 42548 | INC DE | Move on to the next byte of the sprite. | ||||||||
| EraseAlignedRowDirectly_Third | 42549 | LD A,(DE) | Fetch a byte of the sprite. | |||||||
| 42550 | CPL | Invert it. | ||||||||
| 42551 | AND (HL) | Clear the pixels of the screen. | ||||||||
| 42552 | LD (HL),A | Store the byte. | ||||||||
| 42553 | INC L | Move on to the next byte of the screen. | ||||||||
| 42554 | INC DE | Move on to the next byte of the sprite. | ||||||||
| EraseAlignedRowDirectly_Fourth | 42555 | LD A,(DE) | Fetch a byte of the sprite. | |||||||
| 42556 | CPL | Invert it. | ||||||||
| 42557 | AND (HL) | Clear the pixels of the screen. | ||||||||
| 42558 | LD (HL),A | Store the byte. | ||||||||
| 42559 | INC L | Move on to the next byte of the screen. | ||||||||
| 42560 | INC DE | Move on to the next byte of the sprite. | ||||||||
| EraseAlignedRowDirectly_Fifth | 42561 | LD A,(DE) | Fetch a byte of the sprite. | |||||||
| 42562 | CPL | Invert it. | ||||||||
| 42563 | AND (HL) | Clear the pixels of the screen. | ||||||||
| 42564 | LD (HL),A | Store the byte. | ||||||||
| 42565 | INC L | Move on to the next byte of the screen. | ||||||||
| 42566 | INC DE | Move on to the next byte of the sprite. | ||||||||
| EraseAlignedRowDirectly_Sixth | 42567 | LD A,(DE) | Fetch a byte of the sprite. | |||||||
| 42568 | CPL | Invert it. | ||||||||
| 42569 | AND (HL) | Clear the pixels of the screen. | ||||||||
| 42570 | LD (HL),A | Store the byte. | ||||||||
| 42571 | INC DE | Move on to the next byte of the sprite. | ||||||||
|
This entry point is used by the routine at EraseMirroredRowDirectly.
|
||||||||||
| EraseAlignedRowDirectly_Next | 42572 | LD A,(23592) | Fetch the low byte of the screen address of the start of the row. | |||||||
| 42575 | LD L,A | Restore it. | ||||||||
| 42576 | DEC H | Move up a pixel row. | ||||||||
| 42577 | LD A,H | Fetch the high byte. | ||||||||
| 42578 | INC A | Add one. | ||||||||
| 42579 | AND %00000111 | Keep the bits that give the pixel row. | ||||||||
| 42581 | JP NZ,DrawNextRow | Jump to DrawNextRow if the row is still in the same cell. | ||||||||
| 42584 | LD A,L | Fetch the low byte. | ||||||||
| 42585 | SUB 32 | Move up a row of cells. | ||||||||
| 42587 | LD L,A | Store it. | ||||||||
| 42588 | LD (23592),A | Store it as the start of the row. | ||||||||
| 42591 | JP C,DrawNextRow | Jump to DrawNextRow if that crossed a third of the screen. | ||||||||
| 42594 | LD A,H | Fetch the high byte. | ||||||||
| 42595 | ADD A,8 | Add eight to correct it. | ||||||||
| 42597 | LD H,A | Store it. | ||||||||
| 42598 | JP DrawNextRow | Jump to DrawNextRow. | ||||||||
| Prev: 42399 | Up: Map | Next: 42601 |