Prev: 51335 Up: Map Next: 51373
51354: Test Passage Along Minus Y
Finds out if the player is far enough through the wall on the side of low 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.
TestPassageAlongMinusY 51354 POP HL Restore the limits of the room from the stack.
51355 LD A,128 Set A to 128, the middle of the room.
51357 SUB H Take the limit along y away from it, to get the position of the wall.
51358 LD H,A Keep the position of the wall.
51359 LD A,(IY+2) Fetch the y position of the player.
51362 ADD A,(IY+5) Add the half size along y.
51365 CP H Return if the player is not through the wall.
51366 RET NC
51367 LD (IY+2),0 Put the player at the lowest y position, ready for the next room.
51371 JR TestPassageAlongMinusX_Done Jump to TestPassageAlongMinusX_Done.
Prev: 51335 Up: Map Next: 51373