![]() |
Routines |
| Prev: 36588 | Up: Map | Next: 36781 |
|
Used by the routine at Event_TheBarrel.
Leaves through an exit when the way is open and the object's volume is not zero, then runs the move. Reached through the action lists of 1 - "Heavy Rock Door", 5 - "Round Green Door", 6 - "Small Insignificant Crack", 7 - "Spider Web", 8 - "Red Door", 10 - "Goblins Back Door", 11 - "Mountains Side Door", 12 - "Large Trap Door", 13 - "Magic Door", 17 - "Goblins Door" and 39 - "Strong Portcullis" for action 30, dispatched by TriggerAction.
|
||||
|
Find the exit through the current object.
|
||||
| Action_LeaveIfTheWayIsOpen | 36667 | CALL ExitsFindTheExitThroughAnObject | Call ExitsFindTheExitThroughAnObject to find the exit through the current object. | |
|
This entry point is used by the routines at Action_Enter and Action_Follow.
|
||||
| Action_LeaveIfTheWayIsOpen_0 | 36670 | CP 255 | Jump to ResponseThatWillNotWork if the exit search returned 255. | |
| 36672 | JP Z,ResponseThatWillNotWork | |||
| 36675 | LD A,(IX+2) | Read this exit's destination. | ||
| 36678 | CP 0 | Jump to ResponseThatWillNotWork if this exit's destination is zero. | ||
| 36680 | JP Z,ResponseThatWillNotWork | |||
| 36683 | LD A,(IX+1) | Read the object this exit goes via. | ||
| 36686 | PUSH IX | Call Action_CheckTheObjectFlags to check whether the character can pass via the object this exit goes through. | ||
| 36688 | CALL Action_CheckTheObjectFlags | |||
| 36691 | POP IX | Jump to ResponseThatWillNotWork if Action_CheckTheObjectFlags did not return zero. | ||
| 36693 | JP NZ,ResponseThatWillNotWork | |||
|
If the message is held back, the character does not leave.
|
||||
| 36696 | CALL ConditionSuppressTheMessage | Call ConditionSuppressTheMessage. If the message is held back, the character does not leave. | ||
| 36699 | LD A,(IX+0) | Read this exit's direction. | ||
| 36702 | LD (46823),A | Update *CurrentAction. | ||
| 36705 | LD A,255 | Write 255 to *CurrentObject. | ||
| 36707 | LD (46824),A | |||
| 36710 | JP Action_Direction_TestIfInside | Jump back to Action_Direction_TestIfInside to carry on with the move. | ||
|
Reached through the action list of 19 - "Barrel" for action 35, dispatched by TriggerAction.
|
||||
| 36713 | LD IX,(46856) | Read *46856. | ||
|
Test the second object.
|
||||
| 36717 | LD A,(46825) | Jump to Action_LeaveIfTheWayIsOpen_UseTheWater if *46825 is 23. | ||
| 36720 | CP 23 | |||
| 36722 | JR Z,Action_LeaveIfTheWayIsOpen_UseTheWater | |||
| 36724 | CP 24 | Jump to Action_LeaveIfTheWayIsOpen_UseTheBlackWater if the second object is 24. | ||
| 36726 | JR Z,Action_LeaveIfTheWayIsOpen_UseTheBlackWater | |||
| Action_LeaveIfTheWayIsOpen_TestTheFluid | 36728 | LD IY,(46858) | Read *46858. | |
| 36732 | BIT 1,(IY+7) | Jump to ResponseThatWillNotWork if the object is not a fluid. | ||
| 36736 | JP Z,ResponseThatWillNotWork | |||
| 36739 | BIT 2,(IX+7) | Take 130, and jump to Message_NameFromThisRecord if the object is full. | ||
| 36743 | LD A,130 | |||
| 36745 | JP NZ,Message_NameFromThisRecord | |||
| 36748 | LD HL,37455 | Point HL at the fixed-object check at 37455. | ||
| 36751 | JP ActionHandAnObjectOver | Jump to ActionHandAnObjectOver to hand an object over. | ||
| Action_LeaveIfTheWayIsOpen_UseTheWater | 36754 | LD A,21 | Pass object id 21. | |
| 36756 | LD IY,50260 | Point IY at 21 - "Water". | ||
| 36760 | JR Action_LeaveIfTheWayIsOpen_StoreTheSecondObject | Jump to Action_LeaveIfTheWayIsOpen_StoreTheSecondObject to update the second object. | ||
| Action_LeaveIfTheWayIsOpen_UseTheBlackWater | 36762 | LD A,22 | Pass object id 22. | |
| 36764 | LD IY,50281 | Point IY at 22 - "Black Water". | ||
| Action_LeaveIfTheWayIsOpen_StoreTheSecondObject | 36768 | LD (46825),A | Update *46825. | |
| 36771 | LD (46858),IY | Update *46858. | ||
| 36775 | LD (IY+1),255 | Mark where this object is as unset. | ||
| 36779 | JR Action_LeaveIfTheWayIsOpen_TestTheFluid | Jump back to Action_LeaveIfTheWayIsOpen_TestTheFluid to test the second object. | ||
| Prev: 36588 | Up: Map | Next: 36781 |