Prev: A631 Up: Map Next: A678
A655: Handler for the window: OPEN and CLOSE
Bilbo cannot reach the window if he is not being held up (byte 1 of his record is $FF): 'you cannot reach the window'. Characters can open and close it normally.
A655 LD A,($B5DB) Is the actor Bilbo?
A658 CP $00
A65A JR NZ,$A66A No (a character): they can always reach the window, below
A65C LD A,($C00C) Yes - is Bilbo currently being held up by something?
A65F LD HL,$B00D "you cannot reach the window."
A662 CP $FF
A664 JP Z,$72D4 Held by nobody: he cannot reach it - say so and stop
A667 JP $9EBF Held by something, but the action still failed some other way: fail normally
A66A LD A,($B5D8) Is this CLOSE (action 12)?
A66D CP $0C
A66F JP Z,$90A2 Yes: close it as usual
A672 CP $10 Is it OPEN (action 16)?
A674 JP Z,$9078 Yes: open it as usual
A677 RET Anything else: do nothing further here
Prev: A631 Up: Map Next: A678