![]() |
Routines |
| Prev: 42607 | Up: Map | Next: 42674 |
|
Draws one row of a sprite that is aligned to a byte on the screen. The entry point depends on the width of the sprite in bytes, from six bytes at DrawAlignedRowDirectly to one byte at DrawAlignedRowDirectly_Sixth.
|
||||||||||
| DrawAlignedRowDirectly | 42616 | LD A,(DE) | Fetch a byte of the sprite. | |||||||
| 42617 | OR (HL) | Set the pixels of the screen. | ||||||||
| 42618 | LD (HL),A | Store the byte. | ||||||||
| 42619 | INC L | Move on to the next byte of the screen. | ||||||||
| 42620 | INC DE | Move on to the next byte of the sprite. | ||||||||
| DrawAlignedRowDirectly_Second | 42621 | LD A,(DE) | Fetch a byte of the sprite. | |||||||
| 42622 | OR (HL) | Set the pixels of the screen. | ||||||||
| 42623 | LD (HL),A | Store the byte. | ||||||||
| 42624 | INC L | Move on to the next byte of the screen. | ||||||||
| 42625 | INC DE | Move on to the next byte of the sprite. | ||||||||
| DrawAlignedRowDirectly_Third | 42626 | LD A,(DE) | Fetch a byte of the sprite. | |||||||
| 42627 | OR (HL) | Set the pixels of the screen. | ||||||||
| 42628 | LD (HL),A | Store the byte. | ||||||||
| 42629 | INC L | Move on to the next byte of the screen. | ||||||||
| 42630 | INC DE | Move on to the next byte of the sprite. | ||||||||
| DrawAlignedRowDirectly_Fourth | 42631 | LD A,(DE) | Fetch a byte of the sprite. | |||||||
| 42632 | OR (HL) | Set the pixels of the screen. | ||||||||
| 42633 | LD (HL),A | Store the byte. | ||||||||
| 42634 | INC L | Move on to the next byte of the screen. | ||||||||
| 42635 | INC DE | Move on to the next byte of the sprite. | ||||||||
| DrawAlignedRowDirectly_Fifth | 42636 | LD A,(DE) | Fetch a byte of the sprite. | |||||||
| 42637 | OR (HL) | Set the pixels of the screen. | ||||||||
| 42638 | LD (HL),A | Store the byte. | ||||||||
| 42639 | INC L | Move on to the next byte of the screen. | ||||||||
| 42640 | INC DE | Move on to the next byte of the sprite. | ||||||||
| DrawAlignedRowDirectly_Sixth | 42641 | LD A,(DE) | Fetch a byte of the sprite. | |||||||
| 42642 | OR (HL) | Set the pixels of the screen. | ||||||||
| 42643 | LD (HL),A | Store the byte. | ||||||||
| 42644 | INC DE | Move on to the next byte of the sprite. | ||||||||
|
This entry point is used by the routine at DrawMirroredRowDirectly.
|
||||||||||
| DrawAlignedRowDirectly_Next | 42645 | LD A,(23593) | Fetch the low byte of the screen address of the start of the row. | |||||||
| 42648 | LD L,A | Restore it. | ||||||||
| 42649 | DEC H | Move up a pixel row. | ||||||||
| 42650 | LD A,H | Fetch the high byte. | ||||||||
| 42651 | INC A | Add one. | ||||||||
| 42652 | AND %00000111 | Keep the bits that give the pixel row. | ||||||||
| 42654 | JP NZ,DrawSpritesDirectly_Row | Jump to DrawSpritesDirectly_Row if the row is still in the same cell. | ||||||||
| 42657 | LD A,L | Fetch the low byte. | ||||||||
| 42658 | SUB 32 | Move up a row of cells. | ||||||||
| 42660 | LD L,A | Store it. | ||||||||
| 42661 | LD (23593),A | Store it as the start of the row. | ||||||||
| 42664 | JP C,DrawSpritesDirectly_Row | Jump to DrawSpritesDirectly_Row if that crossed a third of the screen. | ||||||||
| 42667 | LD A,H | Fetch the high byte. | ||||||||
| 42668 | ADD A,8 | Add eight to correct it. | ||||||||
| 42670 | LD H,A | Store it. | ||||||||
| 42671 | JP DrawSpritesDirectly_Row | Jump to DrawSpritesDirectly_Row. | ||||||||
| Prev: 42607 | Up: Map | Next: 42674 |