Prev: B8DD Up: Map Next: B902
B8F5: Remove Entity
Used by the routine at UpdateActor.
Removes an entity from the screen, by drawing the sprite at the old position that was saved by StoreEntity. The sprites are drawn with XOR so this erases the sprite. No new sprite is drawn, so the row count of the new sprite is zero.
Before After RemoveEntity
remove-entity-before remove-entity-after
RemoveEntity B8F5 CALL PrepDraw23 Prepare the registers for the sprite at its old position.
B8F8 EXX Switch to the shadow registers.
B8F9 XOR A Set A and C to 00.
B8FA LD C,A
B8FB LD ($96A4),A Write 00 to New_Sprite_Row_Count.
B8FE EXX Switch back to the normal registers.
B8FF JP XORSpriteLoop Jump to XORSpriteLoop.
View the equivalent code in;
Prev: B8DD Up: Map Next: B902