Prev: 48597 Up: Map Next: 48632
48606: Print Sprites
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.
Input
B Number of times
D Step along the y axis in pixels
E Step along the x axis in pixels
IX The address of the object
Print one sprite and step the position.
PrintSprites 48606 PUSH BC Stash BC, DE and HL on the stack.
48607 PUSH DE
48608 PUSH HL
48609 CALL DrawObject_Sprite Call DrawObject_Sprite.
48612 POP HL Restore HL, DE and BC from the stack.
48613 POP DE
48614 POP BC
48615 LD A,(IX+26) Fetch the pixel x position of the object.
48618 ADD A,E Add the step along the x axis.
48619 LD (IX+26),A Set the pixel x position of the object.
48622 LD A,(IX+27) Fetch the pixel y position of the object.
48625 ADD A,D Add the step along the y axis.
48626 LD (IX+27),A Set the pixel y position of the object.
48629 DJNZ PrintSprites Jump to PrintSprites until all of the sprites have been printed.
48631 RET Return.
View the equivalent code in;
Prev: 48597 Up: Map Next: 48632