![]() |
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. | ||
|
Print "You can't.".
|
||||
| ActionOpen_Loop1 | 96ED | LD HL,$645B | HL=Messaging_YouCanT. | |
| ActionOpen_Loop2 | 96F0 | CALL PrintStringAndANewline | Call PrintStringAndANewline. | |
| 96F3 | RET | Return. | ||
|
Was the player trying to open the airlock?
|
||||
| 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 | |||
|
Print "It's already open.".
|
||||
| 970A | LD HL,$77DC | HL=Messaging_ItSAlreadyOpen. | ||
| 970D | JR ActionOpen_Loop2 | Jump to 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 room 04: " In the Galaxy at rest". | ||
| 971E | CALL UpdateObjectLocation | |||
| 9721 | LD BC,$1105 | Move The airlock is open. (11) to room 05: " The Landing Pad". | ||
| 9724 | CALL UpdateObjectLocation | |||
| 9727 | CALL ResponseOK | Call ResponseOK to say the player is not carrying it. | ||
| 972A | RET | Return. | ||
|
Was the player trying to open the door?
|
||||
| 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 | |||
|
Print "It's already open.".
|
||||
| 973A | LD HL,$77DC | HL=Messaging_ItSAlreadyOpen. | ||
| 973D | JP ActionOpen_Loop2 | Jump to 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 room 2B: " The Lower Store Room". | ||
| 9749 | CALL UpdateObjectLocation | |||
|
This action changes the map:
|
||||
| 974C | LD A,$31 | Open the way down from The Lower Store Room. | ||
| 974E | LD ($8C61),A | |||
|
Print "The door opens,revealing a
passage leading down.".
|
||||
| 9751 | LD HL,$7EB6 | HL=Messaging_TheDoorOpensRevealingAPassageLeadingDown. | ||
| 9754 | JP ActionOpen_Loop2 | Jump to ActionOpen_Loop2. | ||
| ActionOpen_Step5 | 9757 | JP ActionOpen_Loop1 | Continue at ActionOpen_Loop1 to say the player can't. | |
|
View the equivalent code in;
|
||||
| Prev: 96BE | Up: Map | Next: 975A |