Exemple #1
0
        protected override Stream UnParse()
        {
            var s  = new MemoryStream();
            var bw = new BinaryWriter(s);

            bw.Write(this.version);
            if (this.commonA == null)
            {
                this.commonA = new CatalogCommon(kRecommendedApiVersion, this.OnResourceChanged);
            }
            this.commonA.UnParse(s);
            if (this.matdList == null)
            {
                this.matdList = new WallMATDEntryList(this.OnResourceChanged);
            }
            this.matdList.UnParse(s);
            if (this.imgGroupList == null)
            {
                this.imgGroupList = new WallImgGroupList(this.OnResourceChanged);
            }
            this.imgGroupList.UnParse(s);
            bw.Write(this.unk01);
            if (this.colors == null)
            {
                this.colors = new ColorList(this.OnResourceChanged);
            }
            this.colors.UnParse(s);
            bw.Write(this.unkIID01);
            return(s);
        }
Exemple #2
0
        void Parse(Stream s)
        {
            var br = new BinaryReader(s);

            this.version      = br.ReadUInt32();
            this.commonA      = new CatalogCommon(kRecommendedApiVersion, this.OnResourceChanged, s);
            this.matdList     = new WallMATDEntryList(this.OnResourceChanged, s);
            this.imgGroupList = new WallImgGroupList(this.OnResourceChanged, s);
            this.unk01        = br.ReadUInt32();
            this.colors       = new ColorList(this.OnResourceChanged, s);
            this.unkIID01     = br.ReadUInt64();
        }