![]() |
Routines |
| Prev: 37613 | Up: Map | Next: 37850 |
|
Used by the routine at Event_GiveTheLunch.
Gives the current object to the second character. Reached through the action table at ActionTable, dispatched by Turn_RunTheHandlerIfPresent.
|
||||
| Action_Give | 37790 | LD IY,(46858) | Read *46858. | |
|
Test whether the object is being carried.
|
||||
| 37794 | CALL ConditionIsTheObjectCarried | Call ConditionIsTheObjectCarried to test whether the object is carried. | ||
| 37797 | LD HL,44529 | Point at the message "You are not carrying it[0x15]" (44529). | ||
| 37800 | JP NC,PrintMessage | Jump back to PrintMessage if ConditionIsTheObjectCarried found the object not carried, to print "You are not carrying it". | ||
| 37803 | LD A,(46825) | Read *46825. | ||
| 37806 | CALL Condition_TotalTheMassInside | Call Condition_TotalTheMassInside to total the mass inside the object. | ||
| 37809 | LD IX,(46856) | Read *46856. | ||
| 37813 | ADD A,(IX+3) | Add the object's mass onto the second object. | ||
| 37816 | PUSH AF | Read the mass from IY. | ||
| 37817 | POP BC | |||
| 37818 | LD A,(IY+3) | |||
| 37821 | SUB B | Point HL at 44556 and jump to PrintMessage if the total in B is more than the mass of the object at IY. | ||
| 37822 | LD HL,44556 | |||
| 37825 | JP C,PrintMessage | |||
| 37828 | CALL ConditionSuppressTheMessage | Call ConditionSuppressTheMessage. If the message is held back, the object is not given. | ||
| 37831 | LD A,(46825) | Read *46825. | ||
| 37834 | LD (IX+1),A | Update where this object is. | ||
| 37837 | LD A,(IY+16) | Read the location from IY. | ||
| 37840 | LD (IX+16),A | Copy the second object's location. | ||
| 37843 | LD B,A | Copy the result into B. | ||
| 37844 | LD A,(46824) | Read *CurrentObject. | ||
| 37847 | JP Object_MoveContents_0 | Jump to Object_MoveContents_0 to move what is inside the current object to the other character's location. | ||
| Prev: 37613 | Up: Map | Next: 37850 |