示例#1
0
 public TransitionRule()
 {
     Sources              = new List <TransitionSrcRule>();
     Destinations         = new List <TransitionDstRule>();
     SourceID             = 0;
     DestinationID        = 0;
     AllocTransObjectFlag = 0;
     TransitionObject     = new TransitionObject();
 }
示例#2
0
        public TransitionRule(BinaryReader br, HIRCObject ParentObject)
        {
            Parent       = ParentObject;
            Sources      = new List <TransitionSrcRule>();
            Destinations = new List <TransitionDstRule>();
            uint numSrcs = br.ReadUInt32();

            SourceID = br.ReadInt32();
            uint numDsts = br.ReadUInt32();

            DestinationID = br.ReadInt32();

            for (int i = 0; i < numSrcs; i++)
            {
                Sources.Add(new TransitionSrcRule(br));
            }

            for (int i = 0; i < numDsts; i++)
            {
                Destinations.Add(new TransitionDstRule(br, Parent));
            }

            AllocTransObjectFlag = br.ReadByte();

            if (AllocTransObjectFlag == 1)
            {
                TransitionObject = new TransitionObject(br);
            }
            else if (AllocTransObjectFlag != 1 && AllocTransObjectFlag != 0)
            {
                long testOffset = br.BaseStream.Position;
                MessageBox.Show("AllocTransObjectFlag != 0 nor 1 at: " + testOffset.ToString("X"));
            }
            else
            {
                TransitionObject = new TransitionObject();
            }
        }