Prev: 5FCE Up: Map Next: 600F
5FF1: Take Exit
Used by the routine at ObeyCommand.
If the verb is one of the directions listed for this room, move to the destination that follows it.
TakeExit 5FF1 CALL FindExits Call FindExits to find this room's exits.
5FF4 DEC HL
Each exit is a verb byte with bit 7 clear, then the destination room. Bit 7 ends the room.
TakeExit_Next 5FF5 INC HL Bit 7 ends this room's exits.
5FF6 INC HL
5FF7 BIT 7,(HL)
5FF9 JR NZ,TakeExit_Done
5FFB LD A,($5B7F) Keep the exit whose verb is the one just typed.
5FFE CP (HL)
5FFF JR NZ,TakeExit_Next
6001 XOR A Remember the match and clear the last-matched verb.
6002 LD ($5BCF),A
6005 INC A
6006 LD ($5B7A),A
6009 INC HL Move to the destination room.
600A LD A,(HL)
600B LD ($5D87),A
TakeExit_Done 600E RET Return.
Prev: 5FCE Up: Map Next: 600F