Prev: 41324 Up: Map Next: 41416
41356: 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 41356 PUSH IX Call LocateObject to locate the object.
Find the object's record.
41358 CALL LocateObject
41361 LD (IX+12),0 Clear byte 12 of this object.
41365 LD (IX+13),0 Clear byte 13 of this object.
41369 LD DE,205 Keep BROKEN and jump to Action_ClearTheTie_StoreTheTie if the object is not an animal.
41372 BIT 6,(IX+7)
41376 JR Z,Action_ClearTheTie_StoreTheTie
41378 LD DE,402 Use the token DEAD.
Action_ClearTheTie_StoreTheTie 41381 LD (IX+10),E Update byte 10 of this object.
41384 LD (IX+11),D Update byte 11 of this object.
41387 POP IX Restore IX from the stack.
41389 RET Return.
41390 PUSH IY Start the object search one slot before ObjectTable.
41392 PUSH IX
41394 LD IX,49248
Action_ClearTheTie_FindTheRecord 41398 CALL Table_FindTheRecord Call Table_FindTheRecord to find the record.
41401 JR Z,Action_ClearTheTie_ReadTheIdFromTheIndexEntry Jump to Action_ClearTheTie_ReadTheIdFromTheIndexEntry if the index has ended.
41403 CP (IY+1) Jump back to Action_ClearTheTie_FindTheRecord if where this object is is not the id in A.
41406 JR NZ,Action_ClearTheTie_FindTheRecord
Action_ClearTheTie_ReadTheIdFromTheIndexEntry 41408 LD A,(IX+0) Read the id from the index entry.
41411 POP IX Restore IX and IY from the stack.
41413 POP IY
41415 RET Return.
Prev: 41324 Up: Map Next: 41416