Exemplo n.º 1
0
        public object Deserialize(IFileStream stream)
        {
            var transform = new Game.EngineTransform();
            stream.SerializeValue(ref transform.Flags);

            if ((transform.Flags & 1) == 1)
            {
                stream.SerializeValue(ref transform.Unknown1);
                stream.SerializeValue(ref transform.Unknown2);
                stream.SerializeValue(ref transform.Unknown3);
            }

            if ((transform.Flags & 2) == 2)
            {
                stream.SerializeValue(ref transform.Unknown4);
                stream.SerializeValue(ref transform.Unknown5);
                stream.SerializeValue(ref transform.Unknown6);
            }

            if ((transform.Flags & 4) == 4)
            {
                stream.SerializeValue(ref transform.Unknown7);
                stream.SerializeValue(ref transform.Unknown8);
                stream.SerializeValue(ref transform.Unknown9);
            }

            return transform;
        }
Exemplo n.º 2
0
        public object Deserialize(IFileStream stream)
        {
            var transform = new Game.EngineTransform();

            stream.SerializeValue(ref transform.Flags);

            if ((transform.Flags & 1) == 1)
            {
                stream.SerializeValue(ref transform.Unknown1);
                stream.SerializeValue(ref transform.Unknown2);
                stream.SerializeValue(ref transform.Unknown3);
            }

            if ((transform.Flags & 2) == 2)
            {
                stream.SerializeValue(ref transform.Unknown4);
                stream.SerializeValue(ref transform.Unknown5);
                stream.SerializeValue(ref transform.Unknown6);
            }

            if ((transform.Flags & 4) == 4)
            {
                stream.SerializeValue(ref transform.Unknown7);
                stream.SerializeValue(ref transform.Unknown8);
                stream.SerializeValue(ref transform.Unknown9);
            }

            return(transform);
        }