Prev: 40768 Up: Map Next: 40790
40778: 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 40778 CALL PrepDraw2 Prepare the sprite of the entity with PrepDraw2.
DrawEntity_Prepared 40781 EXX Switch to the shadow registers.
40782 XOR A Write 0 to Old_Sprite_Row_Count.
40783 LD (24088),A
40786 LD C,A Keep zero as the number of rows of the old sprite in C.
40787 JP XORSpriteLoop Jump to XORSpriteLoop to draw the sprites onto the screen.
View the equivalent code in;
Prev: 40768 Up: Map Next: 40790