Prev: 9728 Up: Map Next: 97AD
977C: Turn: The Player Has Died
Used by the routine at ActionBurn.
The player has died. The current object is marked broken, its copies are cleared, the tie is cut, and the character slots are walked.
Test the current object.
Turn_ThePlayerHasDied 977C LD A,($B6E8) Jump to YouAreDead if *CurrentObject is zero.
Turn_ThePlayerHasDied_0 977F AND A
9780 JP Z,YouAreDead }
9783 PUSH BC Save BC, IY and IX, and keep the object id in C.
9784 PUSH IY
9786 PUSH IX
9788 LD C,A
Find the object's record.
9789 CALL LocateObject Call LocateObject to locate object.
978C SET 3,(IX+$07) Mark the object broken.
9790 CALL Condition_WhereTheObjectIs_0 Call Condition_WhereTheObjectIs_0 to find where the object is.
9793 LD A,C Use the current object again.
9794 CALL TableFindASpecialObject Call TableFindASpecialObject to find the special-object record.
9797 CP $FF Jump to Turn_ThePlayerHasDied_ClearTheTieOnTheObject if this object has no special-object record.
9799 LD A,C
979A JR Z,Turn_ThePlayerHasDied_ClearTheTieOnTheObject
979C LD (IY+$00),$00 Clear the special-object id.
Turn_ThePlayerHasDied_ClearTheTieOnTheObject 97A0 CALL Action_ClearTheTie Call Action_ClearTheTie to clear the tie on the object.
97A3 LD A,C Use the current object again.
97A4 CALL Inglish_WalkTheCharacterSlots Call Inglish_WalkTheCharacterSlots to walk the character slots.
97A7 POP IX Restore IX, IY and BC from the stack.
97A9 POP IY
97AB POP BC
97AC RET Return.
Prev: 9728 Up: Map Next: 97AD