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.
Find this room's exits.
TakeExit 5FF1 CALL FindExits Call FindExits.
5FF4 DEC HL Step back one byte so the walk starts at the first exit.
Each exit is a verb byte with bit 7 clear, then the destination room. Bit 7 ends the room.
TakeExit_Next 5FF5 INC HL Advance to the next exit.
5FF6 INC HL
5FF7 BIT 7,(HL) Jump to TakeExit_Done if bit 7 is set.
5FF9 JR NZ,TakeExit_Done
5FFB LD A,($5B7F) Jump to TakeExit_Next if this exit is not the typed verb.
5FFE CP (HL)
5FFF JR NZ,TakeExit_Next
6001 XOR A Write 00 to Last_Matched_Verb.
6002 LD ($5BCF),A
6005 INC A Write 01 to SearchHit.
6006 LD ($5B7A),A
6009 INC HL Fetch the destination room.
600A LD A,(HL)
600B LD ($5D87),A Write it to CurrentRoom.
No more exits, or the move is done.
TakeExit_Done 600E RET Return.
Prev: 5FCE Up: Map Next: 600F