Prev: 8E4E Up: Map Next: 8E9D
8E5A: LOOK ACROSS (a river)
Finds the exit that passes through the target (9E6E). If it leads anywhere, and the room on the other side is lit, the actor is moved there for a moment, the room is described ('you see ...', 9589), and the actor is put back. If the far side is dark: 'it is dark.' This is how you can see what is on the other bank of the river, or behind a door, without going there.
8E5A LD A,($B5DB) A = the current actor
8E5D CALL $8E34 Is the actor shut inside something (rather than free to look around)?
8E60 RET NZ Yes: cannot look through anything from in there
8E61 CALL $9E6E Find the exit that passes through the target (the door, window or river)
8E64 CP $FF
8E66 JP Z,$9EBF No such exit: fail with the usual message
8E69 LD A,(IX+$02) A = where that exit leads
8E6C CP $00
8E6E JP Z,$9EBF Leads nowhere: fail
8E71 CALL $9C99 Dry run? Then stop here: it would work
8E74 PUSH IX Save the exit
8E76 CALL $9B0C IX = the room on the far side
8E79 BIT 7,(IX+$00) Is it lit?
8E7D POP IX Restore the exit
8E7F JR Z,$8E97 Dark over there: "it is dark." (below)
8E81 LD IY,($B5FC) IY = the actor's own record
8E85 LD A,(IY+$10) Save the actor's TRUE room for a moment...
8E88 PUSH AF
8E89 LD A,(IX+$02) ...and pretend, just for a moment, that they are on the far side
8E8C LD (IY+$10),A
8E8F CALL $9589 Describe what can be seen from there ("you see ...")
8E92 POP AF Put the actor back in their real room
8E93 LD (IY+$10),A
8E96 RET
8E97 LD HL,$AD12 "it is dark."
8E9A JP $72D4
Prev: 8E4E Up: Map Next: 8E9D