Prev: 51316 Up: Map Next: 51354
51335: Test Passage Along Plus Y
Finds out if the player is far enough through the wall on the side of high y, 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.
TestPassageAlongPlusY 51335 POP HL Restore the limits of the room from the stack.
51336 LD A,H Fetch the limit along y.
51337 ADD A,128 Add 128 to it, to get the position of the wall.
51339 LD H,A Keep the position of the wall.
51340 LD A,(IY+2) Fetch the y position of the player.
51343 SUB (IY+5) Take away the half size along y.
51346 CP H Return if the player is not through the wall.
51347 RET C
51348 LD (IY+2),255 Put the player at the highest y position, ready for the next room.
51352 JR TestPassageAlongMinusX_Done Jump to TestPassageAlongMinusX_Done.
Prev: 51316 Up: Map Next: 51354