Prev: 43151 Up: Map Next: 43186
43160: Condition: Group Item Equals
Succeeds when the active item in the group operand equals the second operand.
Input
IX Pointer to the script entry (opcode, group, item)
Output
F The zero flag is set when the item matches
The first operand selects a group from Table_ItemGrouping.
Condition_GroupItemEquals 43160 PUSH IX Stash IX on the stack.
43162 LD E,(IX+1) Fetch the group number (the operand) from *IX+1 into E.
43165 LD IX,46606 Point IX at the item-group table at Table_ItemGrouping.
43169 CALL GetTableEntry Call GetTableEntry to fetch the address of the group's item list into HL.
43172 POP IX Restore the script pointer from the stack.
Find the active item in that group and compare it with the second operand.
43174 CALL CheckActiveScenicEvents Call CheckActiveScenicEvents to find the first present item in that list.
43177 JP NZ,RunScript_SkipCondition_ThreeBytes Jump to RunScript_SkipCondition_ThreeBytes if none of the group's items is present.
43180 CP (IX+2) Set the zero flag when the active item equals the second operand.
43183 JP RunScript_SkipCondition_ThreeBytes Jump to RunScript_SkipCondition_ThreeBytes.
Prev: 43151 Up: Map Next: 43186