![]() |
Routines |
| Prev: C357 | Up: Map | Next: C386 |
|
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.
|
||||||||
|
Return unless near an arch and not entering.
|
||||||||
| HandleRoomExit | C36D | LD A,(IX+$0C) | Fetch the collision flags. | |||||
| C370 | AND %11110000 | Keep only bits 4-7. | ||||||
| C372 | RET NZ | Return if the player is entering the room. | ||||||
| C373 | BIT 0,(IX+$07) | Return if the player is not near an arch. | ||||||
| C377 | RET Z | |||||||
| C378 | RES 0,(IX+$07) | Clear the near-an-arch flag. | ||||||
| C37C | LD BC,$C38F | Point BC at RoomExitTable. | ||||||
| C37F | LD HL,($5B0B) | Fetch RoomSize_X and RoomSize_Y. | ||||||
| C382 | PUSH HL | Stash HL on the stack. | ||||||
| C383 | JP SetPlayerSpeed_Direction | Jump to SetPlayerSpeed_Direction. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: C357 | Up: Map | Next: C386 |