Prev: 43160 Up: Map Next: 43215
43186: Condition: Group Item Differs
Succeeds when the active item in the group operand is not the second operand.
Stores the active item ID at ScriptMatchedItem.
Input
IX Pointer to the script entry (opcode, group, item)
Output
F The zero flag is set when the item differs
The first operand selects a group from Table_ItemGrouping.
Condition_GroupItemDiffers 43186 PUSH IX Stash IX on the stack.
43188 LD E,(IX+1) Fetch the group number (the operand) from *IX+1 into E.
43191 LD IX,46606 Point IX at the item-group table at Table_ItemGrouping.
43195 CALL GetTableEntry Call GetTableEntry to fetch the address of the group's item list into HL.
43198 POP IX Restore the script pointer from the stack.
Remember the group's active item at ScriptMatchedItem, and succeed when it is not the second operand.
43200 CALL CheckActiveScenicEvents Call CheckActiveScenicEvents to find the first present item in that list.
43203 LD (43013),A Store the active item ID at ScriptMatchedItem.
43206 CP (IX+2) Compare it with the second operand.
43209 CALL RunScript_InvertConditionResult Call RunScript_InvertConditionResult so the condition succeeds when the items differ.
43212 JP RunScript_SkipCondition_ThreeBytes Jump to RunScript_SkipCondition_ThreeBytes.
Prev: 43160 Up: Map Next: 43215