Prev: D671 Up: Map Next: D6B8
D68C: Print Location Exits With Formatting
Used by the routine at D178.
Prints the exit lead-in and then each valid way out of the room.
Input
A Room ID
PrintLocationExitsWithFormatting D68C PUSH IX Call GetLocationExitData to get location exit data.
D68E PUSH IY
D690 PUSH DE
D691 PUSH BC
D692 CALL GetLocationExitData
D695 CALL FindNextValidExit Go to PrintLocationExitsWithFormatting_Next if there is no further exit.
D698 JR Z,PrintLocationExitsWithFormatting_Next
D69A LD HL,$68F1 Take the exits message, then call PrintTextAndHandleControlCharacters to print the exits message.
D69D CALL PrintTextAndHandleControlCharacters
PrintLocationExitsWithFormatting_Loop D6A0 LD A,(IX+$00) Call GetDirectionToken to get direction token.
D6A3 CALL GetDirectionToken
D6A6 CALL PrintTextToken Jump back to PrintLocationExitsWithFormatting_Loop while another exit is valid.
D6A9 CALL FindNextValidExit
D6AC JR NZ,PrintLocationExitsWithFormatting_Loop
D6AE CALL PrintFullStop Call PrintFullStop to print a full stop.
PrintLocationExitsWithFormatting_Next D6B1 POP BC Restore the saved count, the saved source, the saved schedule entry and the saved character record from the stack.
D6B2 POP DE
D6B3 POP IY
D6B5 POP IX
D6B7 RET Return.
View the equivalent code in;
Prev: D671 Up: Map Next: D6B8