Beispiel #1
0
        public override void Write(BinaryWriter file)
        {
            if (elements.Count == 0)
            {
                file.Write((byte)0x80);
            }
            else
            {
                CVLQInt32 count = new CVLQInt32(cr2w, null, "");
                count.val = elements.Count;
                count.Write(file);
            }

            base.Write(file);
        }
Beispiel #2
0
        public override void Write(BinaryWriter file)
        {
            //Write the 8 unknown bytes.
            Unknown1.Write(file);
            Unknown2.Write(file);

            Resources.Write(file);
            Objects.Write(file);

            byte[] buffer;
            using (var ms = new MemoryStream())
                using (var bw = new BinaryWriter(ms))
                {
                    BlockData.Write(bw);
                    blocksize.val = (int)ms.Length;
                    buffer        = ms.ToArray();
                }

            blocksize.Write(file);
            file.Write(buffer);
        }