![]() |
Routines |
| Prev: BDD5 | Up: Map | Next: BDF8 |
|
Used by the routines at DrawFrame 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.
|
||||||||||||||
|
Print one sprite and step the position.
|
||||||||||||||
| PrintSprites | BDDE | PUSH BC | Stash BC, DE and HL on the stack. | |||||||||||
| BDDF | PUSH DE | |||||||||||||
| BDE0 | PUSH HL | |||||||||||||
| BDE1 | CALL DrawObject_Sprite | Call DrawObject_Sprite. | ||||||||||||
| BDE4 | POP HL | Restore HL, DE and BC from the stack. | ||||||||||||
| BDE5 | POP DE | |||||||||||||
| BDE6 | POP BC | |||||||||||||
| BDE7 | LD A,(IX+$1A) | Fetch the pixel x position of the object. | ||||||||||||
| BDEA | ADD A,E | Add the step along the x axis. | ||||||||||||
| BDEB | LD (IX+$1A),A | Set the pixel x position of the object. | ||||||||||||
| BDEE | LD A,(IX+$1B) | Fetch the pixel y position of the object. | ||||||||||||
| BDF1 | ADD A,D | Add the step along the y axis. | ||||||||||||
| BDF2 | LD (IX+$1B),A | Set the pixel y position of the object. | ||||||||||||
| BDF5 | DJNZ PrintSprites | Jump to PrintSprites until all of the sprites have been printed. | ||||||||||||
| BDF7 | RET | Return. | ||||||||||||
|
View the equivalent code in;
|
||||||||||||||
| Prev: BDD5 | Up: Map | Next: BDF8 |