![]() |
Routines |
| Prev: 24526 | Up: Map | Next: 24591 |
|
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 | 24561 | CALL FindExits | Call FindExits. | |
| 24564 | 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 | 24565 | INC HL | Advance to the next exit. | |
| 24566 | INC HL | |||
| 24567 | BIT 7,(HL) | Jump to TakeExit_Done if bit 7 is set. | ||
| 24569 | JR NZ,TakeExit_Done | |||
| 24571 | LD A,(23423) | Jump to TakeExit_Next if this exit is not the typed verb. | ||
| 24574 | CP (HL) | |||
| 24575 | JR NZ,TakeExit_Next | |||
| 24577 | XOR A | Write 0 to Last_Matched_Verb. | ||
| 24578 | LD (23503),A | |||
| 24581 | INC A | Write 1 to SearchHit. | ||
| 24582 | LD (23418),A | |||
| 24585 | INC HL | Fetch the destination room. | ||
| 24586 | LD A,(HL) | |||
| 24587 | LD (23943),A | Write it to CurrentRoom. | ||
|
No more exits, or the move is done.
|
||||
| TakeExit_Done | 24590 | RET | Return. | |
| Prev: 24526 | Up: Map | Next: 24591 |