Prev: CB5B Up: Map Next: CBA8
CB96: Check if servant has moved away from Maroc after retrieving an item
Used by the routine at CB00.
When the servant retrieves objects from Maroc's backpack, the byte at EBB1 is set to 2. Once it's moved out of the backpack area, this is set to the 'standard' value of 1 which indicates the servant is carrying an object.
This stops the item collection cycle quickly cycling through all of Maroc's items if the servant hovers over Maroc's backpack.
CB96 LD C,$00 Type of collision/event check (collision with Maroc)
CB98 CALL $DFCD Run collision check
CB9B CP $00 Is there a collision (A register returned = 1)?
CB9D JP NZ,$CC27 If so, servant is still within Maroc's backpack 'hit box' after collecting the object - take no action and jump to the next routine
CBA0 LD A,$01 Servant has moved out of Maroc's backpack area after picking up an object
CBA2 LD ($EBB1),A Set servant object status to 1 to indicate that the servant is now carrying an object - OK to swap object again now if it moves back.
CBA5 JP $CC27
Prev: CB5B Up: Map Next: CBA8