![]() |
Routines |
| Prev: A234 | Up: Map | Next: A266 |
|
Used by the routines at PrepareDraw and UpdateStarLayer.
Sets up the second sprite, which is the sprite that is drawn by DrawSprites.
|
||||||||||||||||||
| SelectDrawSprite | A247 | LD A,B | Fetch the number of rows. | |||||||||||||||
| A248 | LD ($A1D8),A | Store it. | ||||||||||||||||
| A24B | LD A,H | Fetch the width. | ||||||||||||||||
| A24C | LD ($5C29),A | Store it. | ||||||||||||||||
| A24F | LD HL,$A2AA | Use the table of routines that draw sprites. | ||||||||||||||||
| A252 | CALL GetTableEntry | Fetch the address of the routine. | ||||||||||||||||
| A255 | PUSH HL | Put it in IX. | ||||||||||||||||
| A256 | POP IX | |||||||||||||||||
| A258 | LD A,($A1D5) | Fetch the horizontal position of the second sprite. | ||||||||||||||||
| A25B | JR SelectEraseSprite_Shift | Jump to SelectEraseSprite_Shift. | ||||||||||||||||
|
This entry point is used by the routine at SelectEraseSprite.
|
||||||||||||||||||
| SelectEraseSprite_Position | A25D | LD A,($A1D3) | Fetch the horizontal position of the first sprite. | |||||||||||||||
| SelectEraseSprite_Shift | A260 | AND %00000110 | Only bits 1 and 2, which are the number of pixels to shift by. | |||||||||||||||
| A262 | ADD A,$F8 | Add the high byte of the shift table that does no shifting. | ||||||||||||||||
| A264 | LD B,A | Store it in B. | ||||||||||||||||
| A265 | RET | Return. | ||||||||||||||||
| Prev: A234 | Up: Map | Next: A266 |