Prev: 9BDD Up: Map Next: 9C41
9C17: Put everything held by object A in location B
Used by the routine at MOVE_CONTENTS.
Recursively, so what is inside those goes too; if one of them is the player, PLAYER_MOVED is cleared to say so.
MOVE_HELD 9C17 PUSH IY
9C19 PUSH IX
9C1B LD IX,$C060
MOVE_HELD_0 9C1F CALL NEXT_OBJECT_KEEP_A Next object held by A
9C22 JR Z,MOVE_HELD_2
9C24 CP (IY+$01)
9C27 JR NZ,MOVE_HELD_0
9C29 LD (IY+$10),B Its location becomes B
9C2C PUSH AF The player? Note it
9C2D LD A,(IX+$00)
9C30 AND A
9C31 JR NZ,MOVE_HELD_1
9C33 LD (PLAYER_MOVED),A
MOVE_HELD_1 9C36 CALL MOVE_HELD And the same for what it holds
9C39 POP AF
9C3A JR MOVE_HELD_0
MOVE_HELD_2 9C3C POP IX
9C3E POP IY
9C40 RET
Prev: 9BDD Up: Map Next: 9C41