Prev: A541 Up: Map Next: A5CA
A55F: CLIMB INTO, carried by the barrel, the boat and the chest
Not what the actor is in already, and only what it can reach. If the actor is carrying it, it is put down first. It must be open, and big enough for the actor and all it carries, unless its size is $FF ("the ... is too big.").
DO_CLIMB_INTO A55F LD IY,(ACTOR) Already in it: refused
A563 LD A,(TARGET)
A566 CP (IY+$01)
A569 JP Z,REFUSE
A56C LD IY,(TARGET_RECORD) Out of reach: refused
A570 CALL IN_REACH
A573 JP Z,REFUSE
A576 LD A,(TARGET) Carrying it? Put it down first
DO_CLIMB_INTO_0 A579 CALL GET_OBJECT
A57C LD A,(IX+$01)
A57F CP $FF
A581 JR Z,DO_CLIMB_INTO_1
A583 LD A,(ACTING)
A586 CP (IX+$01)
A589 LD A,(IX+$01)
A58C JR NZ,DO_CLIMB_INTO_0
A58E LD IX,(TARGET_RECORD)
A592 LD (IX+$01),$FF
DO_CLIMB_INTO_1 A596 LD IY,(ACTOR) The actor's size, with its load
A59A LD A,(ACTING)
A59D CALL SIZE_HELD
A5A0 ADD A,(IY+$02)
A5A3 JR C,DO_CLIMB_INTO_2
A5A5 LD A,$FF
DO_CLIMB_INTO_2 A5A7 LD B,A
A5A8 LD IX,(TARGET_RECORD) Shut: "the ... is closed."
A5AC CALL IS_SHUT
A5AF JP Z,SAY_STATE
A5B2 LD A,(IX+$02) Too small: "the ... is too big."
A5B5 CP $FF
A5B7 JR Z,DO_CLIMB_INTO_3
A5B9 SUB B
A5BA LD HL,MSG_TOO_BIG
A5BD JP NC,RUN_MESSAGE_HL
DO_CLIMB_INTO_3 A5C0 CALL FOR_REAL The test ends here
A5C3 LD A,(TARGET) In
A5C6 LD (IY+$01),A
A5C9 RET
Prev: A541 Up: Map Next: A5CA