Prev: C843 Up: Map Next: C887
C874: Test Passage Along Plus X
Finds out if the player is far enough through the wall on the side of high x, in the same way as TestPassageAlongMinusX.
Input
IX Door record
IY Record of the legs of the player
Return unless the player is through the wall.
TestPassageAlongPlusX C874 POP HL Restore the limits of the room from the stack.
C875 LD A,L Fetch the limit along x.
C876 ADD A,$80 Add 80 to it, to get the position of the wall.
C878 LD L,A Keep the position of the wall.
C879 LD A,(IY+$01) Fetch the x position of the player.
C87C SUB (IY+$04) Take away the half size along x.
C87F CP L Return if the player is not through the wall.
C880 RET C
C881 LD (IY+$01),$FF Put the player at the highest x position, ready for the next room.
C885 JR TestPassageAlongMinusX_Done Jump to TestPassageAlongMinusX_Done.
Prev: C843 Up: Map Next: C887