![]() |
Routines |
| Prev: 41524 | Up: Map | Next: 41574 |
|
Used by the routines at PrepareDraw and UpdateStarLayer.
Sets up the second sprite, which is the sprite that is drawn by DrawSprites.
|
||||||||||||||||||
| SelectDrawSprite | 41543 | LD A,B | Fetch the number of rows. | |||||||||||||||
| 41544 | LD (41432),A | Store it. | ||||||||||||||||
| 41547 | LD A,H | Fetch the width. | ||||||||||||||||
| 41548 | LD (23593),A | Store it. | ||||||||||||||||
| 41551 | LD HL,41642 | Use the table of routines that draw sprites. | ||||||||||||||||
| 41554 | CALL GetTableEntry | Fetch the address of the routine. | ||||||||||||||||
| 41557 | PUSH HL | Put it in IX. | ||||||||||||||||
| 41558 | POP IX | |||||||||||||||||
| 41560 | LD A,(41429) | Fetch the horizontal position of the second sprite. | ||||||||||||||||
| 41563 | JR SelectEraseSprite_Shift | Jump to SelectEraseSprite_Shift. | ||||||||||||||||
|
This entry point is used by the routine at SelectEraseSprite.
|
||||||||||||||||||
| SelectEraseSprite_Position | 41565 | LD A,(41427) | Fetch the horizontal position of the first sprite. | |||||||||||||||
| SelectEraseSprite_Shift | 41568 | AND %00000110 | Only bits 1 and 2, which are the number of pixels to shift by. | |||||||||||||||
| 41570 | ADD A,248 | Add the high byte of the shift table that does no shifting. | ||||||||||||||||
| 41572 | LD B,A | Store it in B. | ||||||||||||||||
| 41573 | RET | Return. | ||||||||||||||||
| Prev: 41524 | Up: Map | Next: 41574 |