Prev: A88F Up: Map Next: A8B2
A898: 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 A898 PUSH IX Stash IX on the stack.
A89A LD E,(IX+$01) Fetch the group number (the operand) from *IX+01 into E.
A89D LD IX,$B60E Point IX at the item-group table at Table_ItemGrouping.
A8A1 CALL GetTableEntry Call GetTableEntry to fetch the address of the group's item list into HL.
A8A4 POP IX Restore the script pointer from the stack.
Find the active item in that group and compare it with the second operand.
A8A6 CALL CheckActiveScenicEvents Call CheckActiveScenicEvents to find the first present item in that list.
A8A9 JP NZ,RunScript_SkipCondition_ThreeBytes Jump to RunScript_SkipCondition_ThreeBytes if none of the group's items is present.
A8AC CP (IX+$02) Set the zero flag when the active item equals the second operand.
A8AF JP RunScript_SkipCondition_ThreeBytes Jump to RunScript_SkipCondition_ThreeBytes.
Prev: A88F Up: Map Next: A8B2