Prev: A16C Up: Map Next: A1C8
A18C: Action: Clear The Tie
Clears the tie on the object. An animal's name bytes are overwritten with DEAD, and the object record is returned.
Action_ClearTheTie A18C PUSH IX Call LocateObject to locate the object.
Find the object's record.
A18E CALL LocateObject
A191 LD (IX+$0C),$00 Clear byte 0C of this object.
A195 LD (IX+$0D),$00 Clear byte 0D of this object.
A199 LD DE,$00CD Keep BROKEN and jump to Action_ClearTheTie_StoreTheTie if the object is not an animal.
A19C BIT 6,(IX+$07)
A1A0 JR Z,Action_ClearTheTie_StoreTheTie
A1A2 LD DE,$0192 Use the token DEAD.
Action_ClearTheTie_StoreTheTie A1A5 LD (IX+$0A),E Update byte 0A of this object.
A1A8 LD (IX+$0B),D Update byte 0B of this object.
A1AB POP IX Restore IX from the stack.
A1AD RET Return.
A1AE PUSH IY Start the object search one slot before ObjectTable.
A1B0 PUSH IX
A1B2 LD IX,$C060
Action_ClearTheTie_FindTheRecord A1B6 CALL Table_FindTheRecord Call Table_FindTheRecord to find the record.
A1B9 JR Z,Action_ClearTheTie_ReadTheIdFromTheIndexEntry Jump to Action_ClearTheTie_ReadTheIdFromTheIndexEntry if the index has ended.
A1BB CP (IY+$01) Jump back to Action_ClearTheTie_FindTheRecord if where this object is is not the id in A.
A1BE JR NZ,Action_ClearTheTie_FindTheRecord
Action_ClearTheTie_ReadTheIdFromTheIndexEntry A1C0 LD A,(IX+$00) Read the id from the index entry.
A1C3 POP IX Restore IX and IY from the stack.
A1C5 POP IY
A1C7 RET Return.
Prev: A16C Up: Map Next: A1C8