![]() |
Routines |
| Prev: 96BE | Up: Map | Next: 975A |
|
Open the named door, airlock or container.
|
||||
| ActionOpen | 96E7 | CALL Parser_ValidateDirectObject | Return if the command does not name a single object. | |
| 96EA | RET C | |||
| 96EB | JR ActionOpen_Step1 | Continue at ActionOpen_Step1 to match what the player wants to open. | ||
| ActionOpen_Loop1 | 96ED | LD HL,$645B | Print "You can't." and start a new line. | |
| ActionOpen_Loop2 | 96F0 | CALL PrintStringAndANewline | ||
| 96F3 | RET | Return. | ||
| ActionOpen_Step1 | 96F4 | LD HL,$8AC9 | Jump to ActionOpen_Step3 unless the command matches the phrase at 8AC9 (The airlock is closed. (0E)). | |
| 96F7 | CALL Parser_AdvanceToSeparator | |||
| 96FA | JR NZ,ActionOpen_Step3 | |||
| 96FC | LD A,$0E | |||
| 96FE | CALL IsObjectInCurrentRoom | |||
| 9701 | JR Z,ActionOpen_Step2 | |||
| 9703 | LD A,$0F | Jump to ActionOpen_Step2 when The airlock is closed. (0F) is here or being carried. | ||
| 9705 | CALL IsObjectInCurrentRoom | |||
| 9708 | JR Z,ActionOpen_Step2 | |||
| 970A | LD HL,$77DC | Print "It's already open." and start a new line. | ||
| 970D | JR ActionOpen_Loop2 | |||
| ActionOpen_Step2 | 970F | LD BC,$0E00 | Move The airlock is closed. (0E) to nowhere (00). | |
| 9712 | CALL UpdateObjectLocation | |||
| 9715 | LD BC,$0F00 | Move The airlock is closed. (0F) to nowhere (00). | ||
| 9718 | CALL UpdateObjectLocation | |||
| 971B | LD BC,$1004 | Move The airlock is open. (10) to In the Galaxy at rest,on a landing pad. (04). | ||
| 971E | CALL UpdateObjectLocation | |||
| 9721 | LD BC,$1105 | Move The airlock is open. (11) to The Landing Pad. (05). | ||
| 9724 | CALL UpdateObjectLocation | |||
| 9727 | CALL ResponseOK | Call ResponseOK to say the player is not carrying it. | ||
| 972A | RET | Return. | ||
| ActionOpen_Step3 | 972B | LD HL,$8ACB | Jump to ActionOpen_Step5 unless the command matches the phrase at 8ACB (An open door. (1D)). | |
| 972E | CALL Parser_AdvanceToSeparator | |||
| 9731 | JR NZ,ActionOpen_Step5 | |||
| 9733 | LD A,$1D | |||
| 9735 | CALL IsObjectInCurrentRoom | |||
| 9738 | JR NZ,ActionOpen_Step4 | |||
| 973A | LD HL,$77DC | Print "It's already open." and start a new line. | ||
| 973D | JP ActionOpen_Loop2 | |||
| ActionOpen_Step4 | 9740 | LD BC,$1C00 | Move A closed door. (1C) to nowhere (00). | |
| 9743 | CALL UpdateObjectLocation | |||
| 9746 | LD BC,$1D2B | Move An open door. (1D) to The Lower Store Room. (2B). | ||
| 9749 | CALL UpdateObjectLocation | |||
| 974C | LD A,$31 | Open the way down from The Lower Store Room.. | ||
| 974E | LD ($8C61),A | |||
| 9751 | LD HL,$7EB6 | Print "The door opens,revealing a passage leading down." and start a new line. | ||
| 9754 | JP ActionOpen_Loop2 | |||
| ActionOpen_Step5 | 9757 | JP ActionOpen_Loop1 | Continue at ActionOpen_Loop1 to say the player can't. | |
| Prev: 96BE | Up: Map | Next: 975A |