![]() |
Routines |
| Prev: BC31 | Up: Map | Next: BC70 |
|
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 | BC56 | PUSH BC | Stash BC, DE and HL on the stack. | |||||||||||
| BC57 | PUSH DE | |||||||||||||
| BC58 | PUSH HL | |||||||||||||
| BC59 | CALL PrintSprite | Call PrintSprite. | ||||||||||||
| BC5C | POP HL | Restore HL, DE and BC from the stack. | ||||||||||||
| BC5D | POP DE | |||||||||||||
| BC5E | POP BC | |||||||||||||
| BC5F | LD A,(IX+$1A) | Fetch the pixel x position of the object. | ||||||||||||
| BC62 | ADD A,E | Add the step along the x axis. | ||||||||||||
| BC63 | LD (IX+$1A),A | Set the pixel x position of the object. | ||||||||||||
| BC66 | LD A,(IX+$1B) | Fetch the pixel y position of the object. | ||||||||||||
| BC69 | ADD A,D | Add the step along the y axis. | ||||||||||||
| BC6A | LD (IX+$1B),A | Set the pixel y position of the object. | ||||||||||||
| BC6D | DJNZ PrintSprites | Jump to PrintSprites until all of the sprites have been printed. | ||||||||||||
| BC6F | RET | Return. | ||||||||||||
|
View the equivalent code in;
|
||||||||||||||
| Prev: BC31 | Up: Map | Next: BC70 |