Prev: 9565 Up: Map Next: 95A9
957D: Note whether the player is standing in a doorway
Used by the routine at MOVE_PLAYER.
Compares the player's position with the room's half-extents at $5E1D, one more than the limit on each axis, and stores the number of axes on which it is outside in IN_DOORWAY ($5E2D). Non-zero means the player is outside the walk rectangle, in a doorway: the three fire routines refuse to fire, and an open timed door will not shut.
CHECK_IN_DOORWAY 957D PUSH DE
957E LD B,$00
9580 LD HL,($5E1D)
9583 INC L
9584 INC H
9585 LD E,(IX+$03)
9588 LD D,(IX+$04)
958B LD A,E
958C SUB $58
958E JP P,CHECK_IN_DOORWAY_0
9591 NEG
CHECK_IN_DOORWAY_0 9593 CP L
9594 JR C,CHECK_IN_DOORWAY_1
9596 INC B
CHECK_IN_DOORWAY_1 9597 LD A,D
9598 SUB $68
959A JP P,CHECK_IN_DOORWAY_2
959D NEG
CHECK_IN_DOORWAY_2 959F CP H
95A0 JR C,CHECK_IN_DOORWAY_3
95A2 INC B
CHECK_IN_DOORWAY_3 95A3 LD A,B
95A4 LD ($5E2D),A
95A7 POP DE
95A8 RET
Prev: 9565 Up: Map Next: 95A9