Esempio n. 1
0
        public void WriteToStream(Stream stream)
        {
            BinaryWriter bw = new BinaryWriter(stream);

            bw.Write(Type);
            bw.Write(Index);
            bw.Write(AssociatedIndex);
            bw.Write(Unknown);

            for (int i = 0; i < TransformationMatrix.Length; i++)
            {
                bw.WriteBig(TransformationMatrix[i]);
            }

            YkdOffsets.WriteToStream(stream, ref Offsets, ref Entries, b => b.CalcSize());
            stream.WriteContent(Entries);

            if (ZeroTail != null)
            {
                stream.WriteContent(ZeroTail);
            }
            else if (Tails4 != null)
            {
                stream.WriteContent(Tails4);
            }
            else if (Tail56 != null)
            {
                for (int i = 0; i < Tail56.Length; i++)
                {
                    bw.Write(Tail56[i]);
                }
            }
        }
Esempio n. 2
0
 public void WriteToStream(Stream stream)
 {
     stream.WriteContent(Header);
     stream.WriteContent(Background);
     YkdOffsets.WriteToStream(stream, ref Offsets, ref Blocks, b => b.CalcSize());
     stream.WriteContent(Blocks);
     stream.WriteContent(Resources);
 }
Esempio n. 3
0
        public void WriteToStream(Stream stream)
        {
            byte[] name = new byte[NameSize];
            YkdFile.NamesEncoding.GetBytes(Name, 0, Name.Length, name, 0);
            stream.Write(name, 0, name.Length);

            YkdOffsets.WriteToStream(stream, ref Offsets, ref Frames, b => b.CalcSize());
            stream.WriteContent(Frames);
        }
Esempio n. 4
0
 public void WriteToStream(Stream stream)
 {
     YkdOffsets.WriteToStream(stream, ref Offsets, ref Resources, b => b.CalcSize());
     stream.WriteContent(Resources);
 }