Prev: 8D25 Up: Map Next: 8D6E
8D33: Action: Pick Up
Used by the routine at ActionTie.
Picks the current object up, when it is here and can be carried. Reached through the action table at ActionTable, dispatched by Turn_RunTheHandlerIfPresent.
Test whether the object is being carried.
Action_Pickup 8D33 CALL ConditionIsTheObjectCarried Call ConditionIsTheObjectCarried to test whether the object is carried.
8D36 LD HL,$AE11 Point at the message "You are already carrying[0x07][0x15]" (AE11).
8D39 JP C,PrintMessage Jump back to PrintMessage if ConditionIsTheObjectCarried found the object carried, to print "You are already carrying[0x07]".
This entry point is used by the routine at Action_Putdown.
Action_Pickup_0 8D3C CALL Action_AddTheObjectMass Call Action_AddTheObjectMass to add the object's mass.
8D3F LD A,($B6EA) Read *CurrentCharacter.
Find the object's record.
Action_Pickup_Loop 8D42 CALL LocateObject Call LocateObject to locate object.
8D45 LD A,($B6E8) Read *CurrentObject.
8D48 CP (IX+$01) Jump to ResponseThatWillNotWork if the character is inside the current object.
8D4B JP Z,ResponseThatWillNotWork
8D4E LD A,(IX+$01) Read where this object is from the object record.
8D51 CP $FF Jump back to Action_Pickup_Loop if where this object is is not FF.
8D53 JR NZ,Action_Pickup_Loop
8D55 LD IX,($B708) Read *B708.
If the message is held back, the object is not picked up.
8D59 CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the object is not picked up.
8D5C LD A,(IX+$01) Read where this object is from the object record.
8D5F CP $12 Compare where this object is with 12.
8D61 LD A,($B6EA) Read *CurrentCharacter.
8D64 JR Z,Action_Pickup_TakeTheRopeInstead Jump to Action_Pickup_TakeTheRopeInstead if where this object is is 12.
8D66 LD (IX+$01),A Update where this object is.
8D69 RET Return.
Action_Pickup_TakeTheRopeInstead 8D6A LD ($C367),A The object is tied to the rope, so give the rope (12) to the character instead.
8D6D RET Return.
Prev: 8D25 Up: Map Next: 8D6E