Beispiel #1
0
        public void Read(SerializedReader reader)
        {
            if (IsLongID(reader.Generation))
            {
                reader.AlignStream();
                PathID = reader.ReadInt64();
            }
            else
            {
                PathID = reader.ReadInt32();
            }

            Offset = reader.ReadUInt32();
            Size   = reader.ReadInt32();
            if (HasTypeIndex(reader.Generation))
            {
                TypeIndex = reader.ReadInt32();
            }
            else
            {
                TypeID   = reader.ReadInt32();
                ClassID  = (ClassIDType)reader.ReadInt16();
                ScriptID = reader.ReadInt16();
            }

            if (HasStripped(reader.Generation))
            {
                IsStripped = reader.ReadBoolean();
            }
        }
        public void Read(SerializedReader reader)
        {
            if (IsLongID(reader.Generation))
            {
                reader.AlignStream();
                FileID = reader.ReadInt64();
            }
            else
            {
                FileID = reader.ReadInt32();
            }

            ByteStart = reader.ReadUInt32();
            ByteSize  = reader.ReadInt32();
            TypeID    = reader.ReadInt32();
            if (HasClassID(reader.Generation))
            {
                ClassID = (ClassIDType)reader.ReadInt16();
            }
            if (HasScriptID(reader.Generation))
            {
                ScriptTypeIndex = reader.ReadInt16();
            }
            else if (HasIsDestroyed(reader.Generation))
            {
                IsDestroyed = reader.ReadUInt16();
            }
            if (HasStripped(reader.Generation))
            {
                Stripped = reader.ReadBoolean();
            }
        }