Exemplo n.º 1
0
        void Parse(Stream s)
        {
            var br = new BinaryReader(s);

            this.version         = br.ReadUInt32();
            this.commonA         = new CatalogCommon(kRecommendedApiVersion, this.OnResourceChanged, s);
            this.modlEntryList01 = new SpnFenMODLEntryList(this.OnResourceChanged, s);
            this.modlEntryList02 = new SpnFenMODLEntryList(this.OnResourceChanged, s);
            this.modlEntryList03 = new SpnFenMODLEntryList(this.OnResourceChanged, s);
            this.modlEntryList04 = new SpnFenMODLEntryList(this.OnResourceChanged, s);
            this.refList         = new Gp7references(kRecommendedApiVersion, this.OnResourceChanged, s);
            this.materialVariant = br.ReadUInt32();
            this.unkIID01        = br.ReadUInt64();
            this.colors          = new ColorList(this.OnResourceChanged, s);
        }
Exemplo n.º 2
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 (modlEntryList01 == null)
            {
                modlEntryList01 = new SpnFenMODLEntryList(this.OnResourceChanged);
            }
            this.modlEntryList01.UnParse(s);
            if (modlEntryList02 == null)
            {
                modlEntryList02 = new SpnFenMODLEntryList(this.OnResourceChanged);
            }
            this.modlEntryList02.UnParse(s);
            if (modlEntryList03 == null)
            {
                modlEntryList03 = new SpnFenMODLEntryList(this.OnResourceChanged);
            }
            this.modlEntryList03.UnParse(s);
            if (modlEntryList04 == null)
            {
                modlEntryList04 = new SpnFenMODLEntryList(this.OnResourceChanged);
            }
            this.modlEntryList04.UnParse(s);
            if (this.refList == null)
            {
                this.refList = new Gp7references(kRecommendedApiVersion, this.OnResourceChanged);
            }
            this.refList.UnParse(s);
            bw.Write(this.materialVariant);
            bw.Write(this.unkIID01);
            if (this.colors == null)
            {
                this.colors = new ColorList(this.OnResourceChanged);
            }
            this.colors.UnParse(s);
            return(s);
        }
Exemplo n.º 3
0
        void Parse(Stream s)
        {
            var br = new BinaryReader(s);

            this.version         = br.ReadUInt32();
            this.commonA         = new CatalogCommon(kRecommendedApiVersion, this.OnResourceChanged, s);
            this.modlEntryList01 = new SpnFenMODLEntryList(this.OnResourceChanged, s);
            this.modlEntryList02 = new SpnFenMODLEntryList(this.OnResourceChanged, s);
            this.modlEntryList03 = new SpnFenMODLEntryList(this.OnResourceChanged, s);
            this.modlEntryList04 = new SpnFenMODLEntryList(this.OnResourceChanged, s);
            this.refList         = new Gp7references(kRecommendedApiVersion, this.OnResourceChanged, s);
            this.unk01           = br.ReadByte();
            this.unk02           = br.ReadUInt32();
            this.materialVariant = br.ReadUInt32();
            this.swatchGrouping  = br.ReadUInt64();
            this.slot            = new TGIBlock(kRecommendedApiVersion, this.OnResourceChanged, TGIBlock.Order.ITG, s);
            this.unkList01       = new WhateverList(this.OnResourceChanged, s);
            this.unkList02       = new WhateverList(this.OnResourceChanged, s);
            this.unkList03       = new WhateverList(this.OnResourceChanged, s);
            this.colors          = new ColorList(this.OnResourceChanged, s);
            this.unk04           = br.ReadUInt32();
        }
Exemplo n.º 4
0
        protected override Stream UnParse()
        {
            var s  = new MemoryStream();
            var bw = new BinaryWriter(s);

            bw.Write(this.version);
            if (this.commonA == null)
            {
                commonA = new CatalogCommon(kRecommendedApiVersion, this.OnResourceChanged);
            }
            this.commonA.UnParse(s);
            if (this.modlEntryList01 == null)
            {
                this.modlEntryList01 = new SpnFenMODLEntryList(this.OnResourceChanged);
            }
            this.modlEntryList01.UnParse(s);
            if (this.modlEntryList02 == null)
            {
                this.modlEntryList02 = new SpnFenMODLEntryList(this.OnResourceChanged);
            }
            this.modlEntryList02.UnParse(s);
            if (this.modlEntryList03 == null)
            {
                this.modlEntryList03 = new SpnFenMODLEntryList(this.OnResourceChanged);
            }
            this.modlEntryList03.UnParse(s);
            if (this.modlEntryList04 == null)
            {
                this.modlEntryList04 = new SpnFenMODLEntryList(this.OnResourceChanged);
            }
            this.modlEntryList04.UnParse(s);
            if (this.refList == null)
            {
                this.refList = new Gp7references(kRecommendedApiVersion, this.OnResourceChanged);
            }
            this.refList.UnParse(s);
            bw.Write(this.unk01);
            bw.Write(this.unk02);
            bw.Write(this.materialVariant);
            bw.Write(this.swatchGrouping);
            if (this.slot == null)
            {
                this.slot = new TGIBlock(kRecommendedApiVersion, this.OnResourceChanged, TGIBlock.Order.ITG);
            }
            this.slot.UnParse(s);
            if (this.unkList01 == null)
            {
                unkList01 = new WhateverList(this.OnResourceChanged);
            }
            this.unkList01.UnParse(s);
            if (this.unkList02 == null)
            {
                unkList02 = new WhateverList(this.OnResourceChanged);
            }
            this.unkList02.UnParse(s);
            if (this.unkList03 == null)
            {
                unkList03 = new WhateverList(this.OnResourceChanged);
            }
            this.unkList03.UnParse(s);
            if (this.colors == null)
            {
                this.colors = new ColorList(this.OnResourceChanged);
            }
            this.colors.UnParse(s);
            bw.Write(this.unk04);
            return(s);
        }