Prev: 9D8D Up: Map Next: 9DC0
9D9D: Update Disc Entity
Updates an entity of the type 0C in the same way as UpdateSpiderEntity but with a different value to test.
Input
IX The entity
UpdateDiscEntity 9D9D LD BC,$0018 Set the value to test to 18.
9DA0 CALL TestEntityVisible Call TestEntityVisible.
9DA3 JR Z,FreeLinkedEntity Jump to FreeLinkedEntity if the zero flag is set.
9DA5 CALL ProjectEntity Call ProjectEntity.
9DA8 JP UpdateEntity_Done Jump to UpdateEntity_Done.
This entry point is used by the routine at UpdateSpiderEntity.
Frees an entity, and resets bit 7 of the third byte of the record that field 1A of the entity points to.
FreeLinkedEntity 9DAB LD (IX+$00),$00 Set the type of the entity to 00 to free it.
9DAF LD H,(IX+$1A) Fetch the first byte of the address of the record from field 1A.
9DB2 LD L,(IX+$1B) Fetch the second byte of the address of the record from field 1B.
9DB5 INC HL Move onto the second byte of the record.
9DB6 INC HL Move onto the third byte of the record.
9DB7 RES 7,(HL) Reset bit 7 of the third byte of the record.
9DB9 LD (IX+$01),$80 Set the frame of the entity to 80 to hide it.
9DBD JP UpdateEntity_Done Jump to UpdateEntity_Done.
Prev: 9D8D Up: Map Next: 9DC0