Prev: 52513 Up: Map Next: 52616
52582: Check for servant picking up an object
Used by the routine at 52513.
Check if the servant is picking up an object - either:
  • picking up an item in the room, or
  • retrieving an item from Maroc's backpack
52582 LD A,(60337) Servant-object-carrying status
52585 CP 0 0 = servant is not carrying an object
52587 JR NZ,52613 Jump out here if the servant IS carrying an object, as it can't carry more than one
52589 LD C,5 Collision event value to check = 5 (servant picking up object)
52591 CALL 57293 Run event/collision check
52594 CP 0 A register returned with 0 (no collision) or 1 (collision detected)
52596 JR Z,52613 Jump out here if no event match/collision
Servant has picked up an object:
52598 LD A,1 Set servant object-carrying status to 1 (servant is carrying an object)
52600 LD (60337),A
52603 LD A,(60238) Item properties byte
52606 AND %11110101 Reset:
  • bit 1 - item is NOT hidden
  • bit 3 - item is NOT falling/flying, as servant now holds it
52608 OR %00010101 Set:
  • bit 0 - item is visible
  • bit 2 - item graphic will need erasing
  • bit 4 - item is being carried by the servant
52610 LD (60238),A ...and re-store.
This entry point is used by the routines at 52338, 52445 and 52513.
52613 JP 53885 Includes jumps to here from earlier routines
Prev: 52513 Up: Map Next: 52616