![]() |
Routines |
| Prev: 44408 | Up: Map | Next: 44449 |
|
Commits a move into the destination room held in A. It stashes the room in TemporaryRoom, runs the pre-move script at Data_ArrivalScript, abandons the move when flag bit 0 says the player is dead, then calls MovePlayerToRoom, describes the room, and runs the post-move script at Data_RoomSetupScript.
|
||||||||
|
Remember the destination and run the pre-move script.
|
||||||||
| ChangeRoom | 44409 | LD (44408),A | Store the destination room ID at TemporaryRoom. | |||||
| 44412 | PUSH IX | Stash IX on the stack. | ||||||
| 44414 | LD IX,48088 | Point IX at the pre-move script at Data_ArrivalScript. | ||||||
| 44418 | CALL Handler_RunScript | Call Handler_RunScript to run that script. | ||||||
|
Abort the move when flag bit 0 (player dead) is set.
|
||||||||
| 44421 | LD A,0 | Load flag bit 0 into A. | ||||||
| 44423 | CALL TestFlag | Call TestFlag to test that flag bit. | ||||||
| 44426 | JR NZ,ChangeRoom_Return | Jump to ChangeRoom_Return if the player is dead. | ||||||
|
Enter the room, describe it, and run the post-move script.
|
||||||||
| 44428 | LD A,(44408) | Fetch the destination room ID from *TemporaryRoom into A. | ||||||
| 44431 | CALL MovePlayerToRoom | Call MovePlayerToRoom to move the player into that room. | ||||||
| 44434 | LD E,0 | Set E to 0 so the room picture is not forced. | ||||||
| 44436 | CALL Handler_RoomExits | Call Handler_RoomExits to describe the current room. | ||||||
| 44439 | LD IX,48204 | Point IX at the post-move script at Data_RoomSetupScript. | ||||||
| 44443 | CALL Handler_RunScript | Call Handler_RunScript to run that script. | ||||||
| ChangeRoom_Return | 44446 | POP IX | Restore IX from the stack. | |||||
| 44448 | RET | Return. | ||||||
| Prev: 44408 | Up: Map | Next: 44449 |