Prev: CD21 Up: Map Next: CD88
CD66: Check for servant picking up an object
Used by the routine at CD21.
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
CD66 LD A,($EBB1) Servant-object-carrying status
CD69 CP $00 0 = servant is not carrying an object
CD6B JR NZ,$CD85 Jump out here if the servant IS carrying an object, as it can't carry more than one
CD6D LD C,$05 Collision event value to check = 5 (servant picking up object)
CD6F CALL $DFCD Run event/collision check
CD72 CP $00 A register returned with 0 (no collision) or 1 (collision detected)
CD74 JR Z,$CD85 Jump out here if no event match/collision
Servant has picked up an object:
CD76 LD A,$01 Set servant object-carrying status to 1 (servant is carrying an object)
CD78 LD ($EBB1),A
CD7B LD A,($EB4E) Item properties byte
CD7E AND %11110101 Reset:
  • bit 1 - item is NOT hidden
  • bit 3 - item is NOT falling/flying, as servant now holds it
CD80 OR %00010101 Set:
  • bit 0 - item is visible
  • bit 2 - item graphic will need erasing
  • bit 4 - item is being carried by the servant
CD82 LD ($EB4E),A ...and re-store.
This entry point is used by the routines at CC72, CCDD and CD21.
CD85 JP $D27D Includes jumps to here from earlier routines
Prev: CD21 Up: Map Next: CD88