Prev: 962A Up: Map Next: 9643
9636: Remove Entity
Draws the sprite of the object at the position that was stored by StoreEntity, which removes it from the screen because the drawing uses XOR. Nothing new is drawn, so the row count of the new sprite is zero.
Before After RemoveEntity
remove-entity-before remove-entity-after
Input
IX Object record
RemoveEntity 9636 CALL PrepDraw23 Prepare the registers for the sprite at its old position.
9639 EXX Switch to the registers of the new sprite.
963A XOR A Write 00 to New_Sprite_Row_Count as there are no rows of the new sprite to draw.
963B LD C,A
963C LD ($8EE3),A Store A in the second row counter (New_Sprite_Row_Count).
963F EXX Switch back to the registers of the old sprite.
9640 JP XORSpriteLoop Jump to XORSpriteLoop to draw the sprite.
View the equivalent code in;
Prev: 962A Up: Map Next: 9643