Prev: 9613 Up: Map Next: 9636
962A: Draw Entity
Draws the sprite of the object that IX points at, using XOR. Nothing is erased.
The XORSpriteLoop routine works through two sets of registers: the set that is current when it is entered belongs to the sprite at the old position and the other set belongs to the sprite at the new position. Here there is no old sprite, so its row count is zero.
Before After DrawEntity
draw-entity-before draw-entity-after
Input
IX Object record
DrawEntity 962A CALL PrepDraw2 Prepare the registers for the sprite at its new position.
962D EXX Switch to the registers of the old sprite.
962E XOR A Write 00 to Old_Sprite_Row_Count as there are no rows of the old sprite to draw.
962F LD ($8EE2),A
9632 LD C,A C=00.
9633 JP XORSpriteLoop Jump to XORSpriteLoop to draw the sprite.
View the equivalent code in;
Prev: 9613 Up: Map Next: 9636