Prev: 50007 Up: Map Next: 50054
50029: Handle Room Exit
Used by the routine at MovePlayer.
Sends the player to the next room if it has walked out through an arch. Only a player that is near an arch can leave the room, and not while it is still entering the room. The edge that counts is the one in the direction that the player is facing.
Input
IX The address of the object
Return unless near an arch and not entering.
HandleRoomExit 50029 LD A,(IX+12) Fetch the collision flags.
50032 AND %11110000 Keep only bits 4-7.
50034 RET NZ Return if the player is entering the room.
50035 BIT 0,(IX+7) Return if the player is not near an arch.
50039 RET Z
50040 RES 0,(IX+7) Clear the near-an-arch flag.
50044 LD BC,50063 Point BC at RoomExitTable.
50047 LD HL,(23307) Fetch RoomSize_X and RoomSize_Y.
50050 PUSH HL Stash HL on the stack.
50051 JP SetPlayerSpeed_Direction Jump to SetPlayerSpeed_Direction.
View the equivalent code in;
Prev: 50007 Up: Map Next: 50054