![]() |
Routines |
| Prev: A244 | Up: Map | Next: A2B4 |
|
Ties the current object to the second object. Reached through the action list of $12 - "Rope" for action 2E, dispatched by TriggerAction. Reached through the action table at ActionTable, dispatched by Turn_RunTheHandlerIfPresent.
|
||||
|
Test the current object.
|
||||
| ActionTie | A248 | LD A,($B6E8) | Jump to ActionTie_PointAtTheTieAction if *CurrentObject is 12. | |
| A24B | CP $12 | |||
| A24D | JR Z,ActionTie_PointAtTheTieAction | |||
|
Test the second object.
|
||||
| A24F | LD A,($B6E9) | Jump to ResponseThatWillNotWork if *B6E9 is not 12. | ||
| A252 | CP $12 | |||
| A254 | JP NZ,ResponseThatWillNotWork | |||
| A257 | LD IX,($B708) | Read *B708. | ||
| A25B | BIT 1,(IX+$07) | Jump back to ResponseThatWillNotWork if the object is a fluid. | ||
| A25F | JP NZ,ResponseThatWillNotWork | |||
|
Count the objects being held.
|
||||
| A262 | CALL ObjectCount | Call ObjectCount to count the visible objects. | ||
| A265 | CP $00 | Point HL at the message, and jump back to PrintMessage if ObjectCount counted any visible objects inside it. | ||
| A267 | LD HL,$B07D | |||
| A26A | JP NZ,PrintMessage | |||
| A26D | BIT 3,(IX+$07) | Jump to ActionTie_StartTheTie if the object is broken. | ||
| A271 | JR NZ,ActionTie_StartTheTie | |||
| A273 | BIT 6,(IX+$07) | Jump back to ResponseThatWillNotWork if the object is an animal. | ||
| A277 | JP NZ,ResponseThatWillNotWork | |||
|
If the message is held back, the object is not tied.
|
||||
| ActionTie_StartTheTie | A27A | CALL ConditionSuppressTheMessage | Call ConditionSuppressTheMessage. If the message is held back, the object is not tied. | |
| A27D | LD IY,($B70A) | Read *B70A. | ||
|
Test whether the object is being carried.
|
||||
| A281 | CALL ConditionIsTheObjectCarried | Call ConditionIsTheObjectCarried to test whether the object is carried. | ||
| A284 | LD A,($B6E9) | Read *B6E9. | ||
| A287 | LD (IX+$01),A | Update where this object is. | ||
| A28A | JR C,ActionTie_ReadTheCurrentCharacter | Jump to ActionTie_ReadTheCurrentCharacter if ConditionIsTheObjectCarried found the object carried (carry set). | ||
| A28C | SUB A | Clear the message gate before the object is picked up. | ||
| A28D | LD ($B6FA),A | Update *B6FA. | ||
| A290 | CALL Action_Pickup | Call Action_Pickup to pick the object up. | ||
| A293 | LD A,($B6FB) | Read the message-suppressed flag left by the pick-up. | ||
| A296 | CP $00 | Compare the message-suppressed flag with zero. | ||
|
Update the message gate.
|
||||
| A298 | LD A,$01 | Hold later messages back. | ||
| A29A | LD ($B6FA),A | |||
| A29D | LD ($B6FB),A | |||
| A2A0 | JR Z,ActionTie_MarkWhereThisObjectIsAsUnset | Jump to ActionTie_MarkWhereThisObjectIsAsUnset if the message-suppressed flag is zero. | ||
| ActionTie_ReadTheCurrentCharacter | A2A2 | LD A,($B6EA) | Read *CurrentCharacter. | |
| A2A5 | LD (IY+$01),A | Update where this object is. | ||
| A2A8 | RET | Return. | ||
| ActionTie_MarkWhereThisObjectIsAsUnset | A2A9 | LD (IY+$01),$FF | Mark where this object is as unset. | |
| A2AD | RET | Return. | ||
| ActionTie_PointAtTheTieAction | A2AE | LD HL,$A248 | Point HL at the tie action. | |
| A2B1 | JP ActionHandAnObjectOver | Jump to ActionHandAnObjectOver to hand an object over. | ||
| Prev: A244 | Up: Map | Next: A2B4 |