Prev: F665 Up: Map Next: F6FD
F68C: Action: Close
Close the named door, gate or chest.
Action_Close F68C CALL Parser_ValidateDirectObject Return if the words after the verb are not valid for this command.
F68F RET C
F690 LD HL,$E8EA Jump to Handler_CloseTheChest unless the player named the door.
F693 CALL Parser_AdvanceToSeparator
F696 JP NZ,Handler_CloseTheChest
F699 LD HL,$E797 Call Parser_SkipToken to skip to the object named by this phrase.
F69C CALL Parser_SkipToken
F69F BIT 0,A Jump to Action_Close_Next when the named door is open.
F6A1 JR NZ,Action_Close_Next
Reply with "It's already closed.".
F6A3 LD HL,$E185 Print "It's already closed." and return to the game loop.
F6A6 JP PrintResponse
Action_Close_Next F6A9 LD A,($BA9B) Jump to Action_Close_Farmhouse when the player is in room 02 (Inside the Farmhouse).
F6AC CP $02
F6AE JR Z,Action_Close_Farmhouse
F6B0 CP $03 Jump to Action_Close_WoodmansHutCheck unless the player is in room 03 (At a large Farmhouse).
F6B2 JR NZ,Action_Close_WoodmansHutCheck
Action_Close_Farmhouse F6B4 LD BC,$3536 Replace object 35 (an open door) with object 36 (a closed door).
F6B7 CALL TransformItem
F6BA LD BC,$3738 Replace object 37 with object 38.
F6BD CALL TransformItem
F6C0 XOR A Jump back to Response_OK to confirm.
F6C1 LD ($E941),A
F6C4 JP Response_OK
Action_Close_WoodmansHutCheck F6C7 CP $0F Jump to Action_Close_WoodmansHut when the player is in room 0F (At the Woodman's Hut).
F6C9 JR Z,Action_Close_WoodmansHut
F6CB CP $10 Jump to Action_Close_WitchsHovelCheck unless the player is in room 10 (Inside the Woodman's Hut).
F6CD JR NZ,Action_Close_WitchsHovelCheck
Action_Close_WoodmansHut F6CF LD BC,$393A Replace object 39 with object 3A.
F6D2 CALL TransformItem
F6D5 LD BC,$3B3C Replace object 3B with object 3C.
F6D8 CALL TransformItem
F6DB XOR A Jump back to Response_OK to confirm.
F6DC LD ($E996),A
F6DF JP Response_OK
Action_Close_WitchsHovelCheck F6E2 CP $3C Jump to Action_Close_WitchsHovel when the player is in room 3C (At the Witch's Hovel).
F6E4 JR Z,Action_Close_WitchsHovel
F6E6 CP $3D Jump to Handler_CloseTheChest unless the player is in room 3D (Inside the Witch's Hovel).
F6E8 JR NZ,Handler_CloseTheChest
Action_Close_WitchsHovel F6EA LD BC,$3D3E Replace object 3D with object 3E.
F6ED CALL TransformItem
F6F0 LD BC,$3F40 Replace object 3F with object 40.
F6F3 CALL TransformItem
F6F6 XOR A Jump back to Response_OK to confirm.
F6F7 LD ($EAA4),A
F6FA JP Response_OK
Prev: F665 Up: Map Next: F6FD