Ejemplo n.º 1
0
 public override void Read(OsiReader reader)
 {
     base.Read(reader);
     Index   = reader.ReadSByte();
     Unused  = reader.ReadBoolean();
     Adapted = reader.ReadBoolean();
 }
Ejemplo n.º 2
0
 public override void Read(OsiReader reader)
 {
     base.Read(reader);
     IsValid  = reader.ReadBoolean();
     OutParam = reader.ReadBoolean();
     IsAType  = reader.ReadBoolean();
 }
Ejemplo n.º 3
0
        public void Read(OsiReader reader)
        {
            Name = reader.ReadString();
            if (Name.Length > 0)
            {
                var hasParams = reader.ReadByte();
                if (hasParams > 0)
                {
                    Parameters = new List <TypedValue>();
                    var numParams = reader.ReadByte();
                    while (numParams-- > 0)
                    {
                        TypedValue param;
                        var        type = reader.ReadByte();
                        if (type == 1)
                        {
                            param = new Variable();
                        }
                        else
                        {
                            param = new TypedValue();
                        }
                        param.Read(reader);
                        Parameters.Add(param);
                    }
                }

                Negate = reader.ReadBoolean();
            }

            GoalIdOrDebugHook = reader.ReadInt32();
        }
Ejemplo n.º 4
0
        public void Read(OsiReader reader)
        {
            reader.ReadByte();
            Version      = reader.ReadString();
            MajorVersion = reader.ReadByte();
            MinorVersion = reader.ReadByte();
            BigEndian    = reader.ReadBoolean();
            Unused       = reader.ReadByte();

            if (Ver >= OsiVersion.VerAddVersionString)
            {
                reader.ReadBytes(0x80); // Version string buffer
            }
            if (Ver >= OsiVersion.VerAddDebugFlags)
            {
                DebugFlags = reader.ReadUInt32();
            }
            else
            {
                DebugFlags = 0;
            }
        }
Ejemplo n.º 5
0
        public void Read(OsiReader reader)
        {
            reader.ReadByte();
            Version      = reader.ReadString();
            MajorVersion = reader.ReadByte();
            MinorVersion = reader.ReadByte();
            BigEndian    = reader.ReadBoolean();
            Unused       = reader.ReadByte();

            if (MajorVersion > 1 || (MajorVersion == 1 && MinorVersion >= 2))
            {
                reader.ReadBytes(0x80); // Version string buffer
            }
            if (MajorVersion > 1 || (MajorVersion == 1 && MinorVersion >= 3))
            {
                DebugFlags = reader.ReadUInt32();
            }
            else
            {
                DebugFlags = 0;
            }
        }
Ejemplo n.º 6
0
        public override void Read(OsiReader reader)
        {
            base.Read(reader);
            Calls = reader.ReadList <Call>();

            Variables = new List <Variable>();
            var variables = reader.ReadByte();

            while (variables-- > 0)
            {
                var type = reader.ReadByte();
                if (type != 1)
                {
                    throw new InvalidDataException("Illegal value type in rule variable list");
                }
                var variable = new Variable();
                variable.Read(reader);
                if (variable.Adapted)
                {
                    variable.VariableName = String.Format("_Var{0}", Variables.Count + 1);
                }

                Variables.Add(variable);
            }

            Line = reader.ReadUInt32();

            if (reader.Ver >= OsiVersion.VerAddQuery)
            {
                IsQuery = reader.ReadBoolean();
            }
            else
            {
                IsQuery = false;
            }
        }