Prev: 48831 Up: Map Next: 48894
48868: Print Sprites
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.
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 48868 PUSH BC Stash BC, DE and HL on the stack.
48869 PUSH DE
48870 PUSH HL
48871 CALL PrintSprite Call PrintSprite.
48874 POP HL Restore HL, DE and BC from the stack.
48875 POP DE
48876 POP BC
48877 LD A,(IX+26) Fetch the pixel x position of the object.
48880 ADD A,E Add the step along the x axis.
48881 LD (IX+26),A Set the pixel x position of the object.
48884 LD A,(IX+27) Fetch the pixel y position of the object.
48887 ADD A,D Add the step along the y axis.
48888 LD (IX+27),A Set the pixel y position of the object.
48891 DJNZ PrintSprites Jump to PrintSprites until all of the sprites have been printed.
48893 RET Return.
View the equivalent code in;
Prev: 48831 Up: Map Next: 48894