Prev: F280 Up: Map Next: F2A7
F293: Check whether the door that a character is standing next to is closed
Used by the routines at 76BC, F2A8, F308, F359 and F383. Returns with the zero flag set if the door is closed, and with HL pointing at the door status flags.
Input
H Character number (0xD7-0xE6)
F293 LD L,$01 Point HL at byte 0x01 of the character's buffer
F295 LD A,(HL) A=character's x-coordinate
F296 LD HL,$FFB5 Find the first entry in the door location table at FFB6 that is greater than the character's x-coordinate
F299 INC L
F29A CP (HL)
F29B JR NC,$F299
F29D LD A,L A=LSB of the entry (0xB6-0xBF)
F29E ADD A,$3A Point HL at one of the 10 door status flag bytes at at 7FF0
F2A0 LD L,A
F2A1 LD H,$7F
F2A3 LD A,(HL) Pick up the door status flags
F2A4 AND $07 Set the zero flag if the door is closed
F2A6 RET
Prev: F280 Up: Map Next: F2A7