Prev: 9F40 Up: Map Next: 9F56
9F4A: Draw Entity
Draws the sprite of an entity at its position. Only the pixels are drawn; the attributes are set by SetEntityAttributes. The old sprite is given no rows, so only the new sprite is drawn.
Input
IX The entity
Before After
draw-entity-before draw-entity-after
DrawEntity 9F4A CALL PrepDraw2 Prepare the sprite of the entity with PrepDraw2.
DrawEntity_Prepared 9F4D EXX Switch to the shadow registers.
9F4E XOR A Write 00 to Old_Sprite_Row_Count.
9F4F LD ($5E18),A
9F52 LD C,A Keep zero as the number of rows of the old sprite in C.
9F53 JP XORSpriteLoop Jump to XORSpriteLoop to draw the sprites onto the screen.
View the equivalent code in;
Prev: 9F40 Up: Map Next: 9F56