예제 #1
0
        public override void Perform(MHEngine engine)
        {
            MHObjectRef target = new MHObjectRef();

            m_Target.GetValue(target, engine); // Get the target
            if (m_fIsIncluded)
            {                                  // Included content
                MHOctetString included = new MHOctetString();
                m_Included.GetValue(included, engine);
                engine.FindObject(target).SetData(included, engine);
            }
            else
            {
                MHContentRef referenced = new MHContentRef();
                int          size, cc;
                m_Referenced.GetValue(referenced, engine);
                if (m_fSizePresent)
                {
                    size = m_ContentSize.GetValue(engine);
                }
                else
                {
                    size = 0;
                }
                if (m_fCCPriorityPresent)
                {
                    cc = m_CCPriority.GetValue(engine);
                }
                else
                {
                    cc = 0;
                }
                engine.FindObject(target).SetData(referenced, m_fSizePresent, size, m_fCCPriorityPresent, cc, engine);
            }
        }
예제 #2
0
        public override void Perform(MHEngine engine)
        {
            MHObjectRef target = new MHObjectRef();

            m_Target.GetValue(target, engine); // Get the item to set.
            MHColour newColour = new MHColour();

            switch (m_ColourType)
            {
            case CT_None:
            {
                // If the colour is not specified use "transparent".
                newColour.SetFromString("\u0000\u0000\u0000\u00FF");
                break;
            }

            case CT_Absolute:
            {
                MHOctetString colour = new MHOctetString();
                m_Absolute.GetValue(colour, engine);
                newColour.ColStr.Copy(colour);
                break;
            }

            case CT_Indexed:
                newColour.SetFromIndex(m_Indexed.GetValue(engine));
                break;
            }
            SetColour(newColour, engine); // Set the colour of the appropriate portion of the visible
        }
예제 #3
0
        public override void Perform(MHEngine engine)
        {
            MHObjectRef item = new MHObjectRef();

            m_Item.GetValue(item, engine);
            Target(engine).AddItem(m_Index.GetValue(engine), engine.FindObject(item), engine);
        }
예제 #4
0
        public override void Perform(MHEngine engine)
        {
            int  nTimerId  = m_TimerId.GetValue(engine);
            bool fAbsolute = false; // Defaults to relative time.
            int  newTime   = -1;

            switch (m_TimerType)
            {
            case ST_NoNewTimer:
                fAbsolute = true;     // We treat an absolute time of -1 as "cancel"
                newTime   = -1;
                break;

            case ST_TimerAbsolute:
                fAbsolute = m_AbsFlag.GetValue(engine);
                newTime   = m_TimerValue.GetValue(engine);
                break;

            case ST_TimerRelative:
                newTime = m_TimerValue.GetValue(engine);
                break;
            }
            Target(engine).SetTimer(nTimerId, fAbsolute, newTime, engine);
        }
예제 #5
0
        public override void Perform(MHEngine engine)
        {
            MHUnion targetVal = new MHUnion();
            // Find the target and get its current value.  The target can be an indirect reference.
            MHObjectRef parm = new MHObjectRef();

            m_Target.GetValue(parm, engine);
            MHRoot pTarget = engine.FindObject(parm);

            pTarget.GetVariableValue(targetVal, engine);
            targetVal.CheckType(MHUnion.U_Int);
            // Get the value of the operand.
            int nOperand = m_Operand.GetValue(engine);

            // Set the value of targetVal to the new value and store it.
            targetVal.Int = DoOp(targetVal.Int, nOperand);
            pTarget.SetVariableValue(targetVal);
        }
예제 #6
0
 public override void Perform(MHEngine engine)
 {
     CallAction(engine, Target(engine), m_Argument1.GetValue(engine), m_Argument2.GetValue(engine));
 }