Prev: 988B Up: Map Next: 98D3
98AE: Clear Entity
Used by the routines at CreatePickup, CreateSpawnedEntity and UpdateSaucerEntity.
Sets all of the bytes of an entity to zero, using the stack.
Input
IX The entity
ClearEntity 98AE PUSH IX Copy the address of the entity into HL (using the stack).
98B0 POP HL
98B1 LD DE,$0026 DE is 26 the size of an entity.
98B4 ADD HL,DE Point HL at the end of the entity.
98B5 LD ($98D0),SP Save the stack pointer in the operand of the instruction at 98CF.
98B9 LD SP,HL Point the stack at the end of the entity.
98BA LD E,$00 DE is 00.
98BC PUSH DE Write 00 to the 26 bytes of the entity, 02 bytes at a time.
98BD PUSH DE
98BE PUSH DE
98BF PUSH DE
98C0 PUSH DE
98C1 PUSH DE
98C2 PUSH DE
98C3 PUSH DE
98C4 PUSH DE
98C5 PUSH DE
98C6 PUSH DE
98C7 PUSH DE
98C8 PUSH DE
98C9 PUSH DE
98CA PUSH DE
98CB PUSH DE
98CC PUSH DE
98CD PUSH DE
98CE PUSH DE
98CF LD SP,$0000 Restore the stack pointer.
98D2 RET Return.
Prev: 988B Up: Map Next: 98D3