![]() |
Routines |
| Prev: 41540 | Up: Map | Next: 41652 |
|
Ties the current object to the second object. Reached through the action list of 18 - "Rope" for action 46, dispatched by TriggerAction. Reached through the action table at ActionTable, dispatched by Turn_RunTheHandlerIfPresent.
|
||||
|
Test the current object.
|
||||
| ActionTie | 41544 | LD A,(46824) | Jump to ActionTie_PointAtTheTieAction if *CurrentObject is 18. | |
| 41547 | CP 18 | |||
| 41549 | JR Z,ActionTie_PointAtTheTieAction | |||
|
Test the second object.
|
||||
| 41551 | LD A,(46825) | Jump to ResponseThatWillNotWork if *46825 is not 18. | ||
| 41554 | CP 18 | |||
| 41556 | JP NZ,ResponseThatWillNotWork | |||
| 41559 | LD IX,(46856) | Read *46856. | ||
| 41563 | BIT 1,(IX+7) | Jump back to ResponseThatWillNotWork if the object is a fluid. | ||
| 41567 | JP NZ,ResponseThatWillNotWork | |||
|
Count the objects being held.
|
||||
| 41570 | CALL ObjectCount | Call ObjectCount to count the visible objects. | ||
| 41573 | CP 0 | Point HL at the message, and jump back to PrintMessage if ObjectCount counted any visible objects inside it. | ||
| 41575 | LD HL,45181 | |||
| 41578 | JP NZ,PrintMessage | |||
| 41581 | BIT 3,(IX+7) | Jump to ActionTie_StartTheTie if the object is broken. | ||
| 41585 | JR NZ,ActionTie_StartTheTie | |||
| 41587 | BIT 6,(IX+7) | Jump back to ResponseThatWillNotWork if the object is an animal. | ||
| 41591 | JP NZ,ResponseThatWillNotWork | |||
|
If the message is held back, the object is not tied.
|
||||
| ActionTie_StartTheTie | 41594 | CALL ConditionSuppressTheMessage | Call ConditionSuppressTheMessage. If the message is held back, the object is not tied. | |
| 41597 | LD IY,(46858) | Read *46858. | ||
|
Test whether the object is being carried.
|
||||
| 41601 | CALL ConditionIsTheObjectCarried | Call ConditionIsTheObjectCarried to test whether the object is carried. | ||
| 41604 | LD A,(46825) | Read *46825. | ||
| 41607 | LD (IX+1),A | Update where this object is. | ||
| 41610 | JR C,ActionTie_ReadTheCurrentCharacter | Jump to ActionTie_ReadTheCurrentCharacter if ConditionIsTheObjectCarried found the object carried (carry set). | ||
| 41612 | SUB A | Clear the message gate before the object is picked up. | ||
| 41613 | LD (46842),A | Update *46842. | ||
| 41616 | CALL Action_Pickup | Call Action_Pickup to pick the object up. | ||
| 41619 | LD A,(46843) | Read the message-suppressed flag left by the pick-up. | ||
| 41622 | CP 0 | Compare the message-suppressed flag with zero. | ||
|
Update the message gate.
|
||||
| 41624 | LD A,1 | Hold later messages back. | ||
| 41626 | LD (46842),A | |||
| 41629 | LD (46843),A | |||
| 41632 | JR Z,ActionTie_MarkWhereThisObjectIsAsUnset | Jump to ActionTie_MarkWhereThisObjectIsAsUnset if the message-suppressed flag is zero. | ||
| ActionTie_ReadTheCurrentCharacter | 41634 | LD A,(46826) | Read *CurrentCharacter. | |
| 41637 | LD (IY+1),A | Update where this object is. | ||
| 41640 | RET | Return. | ||
| ActionTie_MarkWhereThisObjectIsAsUnset | 41641 | LD (IY+1),255 | Mark where this object is as unset. | |
| 41645 | RET | Return. | ||
| ActionTie_PointAtTheTieAction | 41646 | LD HL,41544 | Point HL at the tie action. | |
| 41649 | JP ActionHandAnObjectOver | Jump to ActionHandAnObjectOver to hand an object over. | ||
| Prev: 41540 | Up: Map | Next: 41652 |