![]() |
Routines |
| Prev: 48177 | Up: Map | Next: 48240 |
|
Used by the routines at DrawPanel and PrintBorder.
Prints the sprite of an object a number of times, moving the pixel position of the object by a step each time, so that it makes a row of sprites. BC, DE and HL are preserved while each sprite is printed.
|
||||||||||||||
|
Print one sprite and step the position.
|
||||||||||||||
| PrintSprites | 48214 | PUSH BC | Stash BC, DE and HL on the stack. | |||||||||||
| 48215 | PUSH DE | |||||||||||||
| 48216 | PUSH HL | |||||||||||||
| 48217 | CALL PrintSprite | Call PrintSprite. | ||||||||||||
| 48220 | POP HL | Restore HL, DE and BC from the stack. | ||||||||||||
| 48221 | POP DE | |||||||||||||
| 48222 | POP BC | |||||||||||||
| 48223 | LD A,(IX+26) | Fetch the pixel x position of the object. | ||||||||||||
| 48226 | ADD A,E | Add the step along the x axis. | ||||||||||||
| 48227 | LD (IX+26),A | Set the pixel x position of the object. | ||||||||||||
| 48230 | LD A,(IX+27) | Fetch the pixel y position of the object. | ||||||||||||
| 48233 | ADD A,D | Add the step along the y axis. | ||||||||||||
| 48234 | LD (IX+27),A | Set the pixel y position of the object. | ||||||||||||
| 48237 | DJNZ PrintSprites | Jump to PrintSprites until all of the sprites have been printed. | ||||||||||||
| 48239 | RET | Return. | ||||||||||||
|
View the equivalent code in;
|
||||||||||||||
| Prev: 48177 | Up: Map | Next: 48240 |