protected override Stream UnParse()
        {
            Stream       s = base.UnParse();
            BinaryWriter w = new BinaryWriter(s);

            w.Write(brushVersion);
            if (common == null)
            {
                common = new Common(requestedApiVersion, OnResourceChanged);
            }
            common.UnParse(s);
            w.Write((uint)normalOperation);
            w.Write((uint)oppositeOperation);
            if (profileTexture == null)
            {
                profileTexture = new TGIBlock(requestedApiVersion, OnResourceChanged);
            }
            profileTexture.UnParse(s);
            w.Write((uint)orientation);
            w.Write(width);
            w.Write(strength);
            w.Write(baseTextureValue);
            w.Write(wiggleAmount);

            w.Flush();

            return(s);
        }
Example #2
0
        public void UnParse(Stream s)
        {
            var bw = new BinaryWriter(s);

            bw.Write(modlLabel);
            modlRef.UnParse(s);
        }
Example #3
0
            public void UnParse(Stream s)
            {
                var bw = new BinaryWriter(s);

                //bw.Write(mlodLabel);
                matdRef.UnParse(s);
            }
Example #4
0
 protected override void UnParse(Stream s)
 {
     if (data == null)
     {
         data = new TGIBlock(handler, "ITG");
     }
     data.UnParse(s); WriteZeros(s, 4);
 }
Example #5
0
        public void UnParse(Stream s)
        {
            var bw = new BinaryWriter(s);

            ref01.UnParse(s);
            ref02.UnParse(s);
            ref03.UnParse(s);
            ref04.UnParse(s);
        }
            public void UnParse(Stream s)
            {
                var bw = new BinaryWriter(s);

                bw.Write(imgGroupLabel);
                imgRef01.UnParse(s);
                imgRef02.UnParse(s);
                imgRef03.UnParse(s);
            }
Example #7
0
            public void UnParse(Stream s)
            {
                var bw = new BinaryWriter(s);

                modlRef01.UnParse(s);
                modlRef02.UnParse(s);
                modlRef03.UnParse(s);
                unkRef01.UnParse(s);
                wallRef.UnParse(s);
                objRef.UnParse(s);
            }
Example #8
0
        public void UnParse(Stream s)
        {
            if (parsed == false)
            {
                MakeNew();
            }
            var bw = new BinaryWriter(s);

            ref01.UnParse(s);
            ref02.UnParse(s);
            ref03.UnParse(s);
            ref04.UnParse(s);
            ref05.UnParse(s);
            ref06.UnParse(s);
            ref07.UnParse(s);
            ref08.UnParse(s);
        }
Example #9
0
        protected override Stream UnParse()
        {
            Stream s = base.UnParse();

            if (brushTexture == null)
            {
                brushTexture = new TGIBlock(OnResourceChanged);
            }
            brushTexture.UnParse(s);

            if (version >= 4)
            {
                BinaryWriter w = new BinaryWriter(s);
                w.Write((uint)terrain);
                w.Write((uint)category);
            }

            return(s);
        }
Example #10
0
            public void UnParse(Stream s)
            {
                var bw = new BinaryWriter(s);

                bw.Write(Convert.ToByte(imgGroupType));
                if (imgRef01 == null)
                {
                    this.imgRef01 = new TGIBlock(kRecommendedApiVersion, null, TGIBlock.Order.ITG);
                }
                imgRef01.UnParse(s);
                if (imgRef02 == null)
                {
                    this.imgRef02 = new TGIBlock(kRecommendedApiVersion, null, TGIBlock.Order.ITG);
                }
                imgRef02.UnParse(s);
                if (imgRef03 == null)
                {
                    this.imgRef03 = new TGIBlock(kRecommendedApiVersion, null, TGIBlock.Order.ITG);
                }
                imgRef03.UnParse(s);
            }
Example #11
0
        protected override Stream UnParse()
        {
            long         posn;
            MemoryStream s = new MemoryStream();
            BinaryWriter w = new BinaryWriter(s);

            w.Write(version);

            posn = s.Position;
            w.Write((uint)0);
            w.Write((uint)0);

            BigEndianUnicodeString.Write(s, partName);
            w.Write(unknown1);

            if (version >= 8)
            {
                if (blendGeometry == null)
                {
                    blendGeometry = new TGIBlock(requestedApiVersion, OnResourceChanged);
                }
                blendGeometry.UnParse(s);
            }

            if (tgiBlocks == null)
            {
                tgiBlocks = new TGIBlockList(OnResourceChanged, true);
            }
            if (casEntries == null)
            {
                casEntries = new CASEntryList(OnResourceChanged, tgiBlocks);
            }
            casEntries.UnParse(s);

            tgiBlocks.UnParse(s, posn);

            s.Flush();

            return(s);
        }