Prev: CC27 Up: Map Next: CCA8
CC72: Check if Maroc has picked up (or been given) a spell or item
Used by the routine at CC27.
Jump from CC3C (objects with state value = 15 = 'collectable'), or follow on from previous instructions.
Check if Maroc has picked up this item (or given it by servant). "Acted-upon-item" event byte value at EB8E = 15 = object collection by Maroc.
CC72 LD A,($EB4E) Get item properties byte
CC75 LD C,A
CC76 AND $10 Is the item carried by the servant (bit 4 set)?
CC78 JR Z,$CC82
CC7A LD A,($EBB1) If so, check if the servant is currently carrying an object
CC7D CP $01
CC7F JP NZ,$CD85 If not, jump to the next routine to check for servant based pick-ups/interactions
CC82 LD A,C Get item properties byte
CC83 AND $40 Bit 6 (64) = the item is collectable (e.g. inventory object, spell)
CC85 JP Z,$CD85 If it isn't, skip to next routine for servant interactions
CC88 LD C,$00 Collision type to check = 0 (collision with Maroc)
CC8A CALL $DFCD Check for Maroc related events/collisions to see if Maroc is collecting the object
CC8D CP $00
CC8F JP Z,$CD21 Jump to CD21 if no events/collisions
Maroc has picked up or been given a spell or item
CC92 LD A,($EB4E) Item properties byte
CC95 OR $05 Set bits 0 (item is visible) and 2 (item will need to be erased before re-drawing)
CC97 LD ($EB4E),A ...and re-store
CC9A CALL $E5FE Trigger pick-up sound effect
CC9D LD A,($EB8A) Get item spell number
CCA0 CP $00 If it's 0, it's not a spell, so skip the following "spell collected" routine
CCA2 JR Z,$CCDD
The next two instructions send any spell number over 224 is sent down the 'item' (rather than spell) route here. These may be special sorts of item originally been designed to restore or drain energy (e.g. food).
However, no spell number value gets anywhere near number 224. A later check remains in the code (at CCDD), but will never occur. It's likely that this is a remnant of old code before game design relating to restorative/draining objects was changed.
CCA4 CP $E0 -
CCA6 JR NC,$CCDD -
Prev: CC27 Up: Map Next: CCA8