![]() |
Routines |
| Prev: CA5A | Up: Map | Next: CA89 |
|
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.
|
||||||||
|
Leave through the arch the player is facing, if it is near one.
|
||||||||
| HandleRoomExit | CA70 | LD A,(IX+$0C) | Fetch the flags of the player. | |||||
| CA73 | AND %11110000 | Keep the counter of the player entering the room. | ||||||
| CA75 | RET NZ | Return if the player is entering the room. | ||||||
| CA76 | BIT 0,(IX+$07) | Test whether the player is near an arch. | ||||||
| CA7A | RET Z | Return if it is not. | ||||||
| CA7B | RES 0,(IX+$07) | Clear the flag. | ||||||
| CA7F | LD BC,$CA92 | Point BC at RoomExitTable. | ||||||
| CA82 | LD HL,($5BAB) | Fetch the size of the room in X and Y from RoomSizeX. | ||||||
| CA85 | PUSH HL | Stack it for the routine to take off. | ||||||
| CA86 | JP SetPlayerSpeed_Direction | Jump to the routine for the direction the player is facing. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: CA5A | Up: Map | Next: CA89 |