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);
 }
 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;
 }
 void Parse(Stream s)
 {
     var br = new BinaryReader(s);
     this.version = br.ReadUInt32();
     this.commonA = new CatalogCommon(kRecommendedApiVersion, this.OnResourceChanged, s);
     this.trimRef = new TGIBlock(kRecommendedApiVersion, this.OnResourceChanged, TGIBlock.Order.ITG, s);
     this.materialVariant = br.ReadUInt32();
     this.modlRef = new TGIBlock(kRecommendedApiVersion, this.OnResourceChanged, TGIBlock.Order.ITG, s);
     this.swatchGrouping = br.ReadUInt64();
     this.colors = new ColorList(this.OnResourceChanged, s);
     this.unk02 = br.ReadUInt32();
 }
 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.trimRef == null) { this.trimRef = new TGIBlock(kRecommendedApiVersion, this.OnResourceChanged, TGIBlock.Order.ITG); }
     this.trimRef.UnParse(s);
     bw.Write(this.materialVariant);
     if (this.modlRef == null) { this.modlRef = new TGIBlock(kRecommendedApiVersion, this.OnResourceChanged, TGIBlock.Order.ITG); }
     this.modlRef.UnParse(s);
     bw.Write(this.swatchGrouping);
     if (this.colors == null) { this.colors = new ColorList(this.OnResourceChanged); }
     this.colors.UnParse(s);
     bw.Write(this.unk02);
     return s;
 }
 void Parse(Stream s)
 {
     var br = new BinaryReader(s);
     this.version = br.ReadUInt32();
     this.commonA = new CatalogCommon(kRecommendedApiVersion, this.OnResourceChanged, s);
     this.refList = new Gp8references(kRecommendedApiVersion,this.OnResourceChanged,s);
     this.materialVariant = br.ReadUInt32();
     this.swatchGrouping = br.ReadUInt64();
     this.unk02 = br.ReadUInt32();
     this.colors = new ColorList(this.OnResourceChanged, s);
 }
 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.refList == null) { this.refList = new Gp8references(kRecommendedApiVersion, this.OnResourceChanged); }
     this.refList.UnParse(s);
     bw.Write(this.materialVariant);
     bw.Write(this.swatchGrouping);
     bw.Write(this.unk02);
     if (this.colors == null) { this.colors = new ColorList(this.OnResourceChanged); }
     this.colors.UnParse(s);
     return s;
 }
 void Parse(Stream s)
 {
     var br = new BinaryReader(s);
     this.version = br.ReadUInt32();
     this.commonBlock = new CatalogCommon(kRecommendedApiVersion, this.OnResourceChanged, s);
     this.hashIndicator = br.ReadUInt32();
     this.hash01 = br.ReadUInt32();
     this.hash02 = br.ReadUInt32();
     this.hash03 = br.ReadUInt32();
     int count = Convert.ToUInt16(br.ReadUInt32());
     this.matdList = new CountedTGIBlockList(this.OnResourceChanged, TGIBlock.Order.ITG, count, s);
 }
 protected override Stream UnParse()
 {
     var s = new MemoryStream();
     var bw = new BinaryWriter(s);
     bw.Write(this.version);
     if (this.commonBlock == null) { this.commonBlock = new CatalogCommon(kRecommendedApiVersion, this.OnResourceChanged); }
     this.commonBlock.UnParse(s);
     bw.Write(this.hashIndicator);
     bw.Write(this.hash01);
     bw.Write(this.hash02);
     bw.Write(this.hash03);
     bw.Write(Convert.ToUInt32(matdList.Count));
     if (this.matdList == null) { this.matdList = new CountedTGIBlockList(this.OnResourceChanged, TGIBlock.Order.ITG); }
     this.matdList.UnParse(s);
     return s;
 }
 void Parse(Stream s)
 {
     var br = new BinaryReader(s);
     this.version = br.ReadUInt32();
     this.commonA = new CatalogCommon(kRecommendedApiVersion, this.OnResourceChanged, s);
     this.unk01 = br.ReadUInt32();
     this.unk02 = br.ReadUInt32();
     this.unk03 = br.ReadUInt32();
     this.unk04 = br.ReadUInt32();
     this.unk05 = br.ReadUInt32();
     this.swatchGrouping = br.ReadUInt64();
     this.colors = new ColorList(this.OnResourceChanged, s);
     this.unkRef1 = new TGIBlock(kRecommendedApiVersion, this.OnResourceChanged, TGIBlock.Order.ITG, s);
     this.unk06 = br.ReadUInt32();
     this.unk07 = br.ReadUInt32();
 }
 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);
     bw.Write(this.hashIndicator);
     bw.Write(this.hash01);
     bw.Write(this.hash02);
     bw.Write(this.hash03);
     bw.Write(this.unk02);
     bw.Write(this.hash04);
     bw.Write(this.hash05);
     bw.Write(this.unkFlags01);
     bw.Write(this.categoryFlags);
     bw.Write(this.unkFlags03);
     bw.Write(this.unkFlags04);
     bw.Write(this.placementFlags);
     bw.Write(this.unkIID01);
     bw.Write(this.unk03);
     bw.Write(this.unkIID02);
     bw.Write(this.unk04);
     if (this.colors == null) { this.colors = new ColorList(this.OnResourceChanged); }
     this.colors.UnParse(s);
     bw.Write(this.unk05);
     bw.Write(this.unk06);
     bw.Write(this.unk07);
     bw.Write(this.unk08);
     bw.Write(this.unk09);
     bw.Write(this.build_buy);
     if (this.version >= 0x19)
     {
         bw.Write(this.unk10);
         bw.Write(this.unk11);
         bw.Write(this.unk12);
         bw.Write(this.unk13);
     }
     bw.Write(this.unk14);
     bw.Write(this.refIndicator);
     if (refIndicator == 0)
     {
         if (this.nullRefs == null) { this.nullRefs = new Gp4references(kRecommendedApiVersion, this.OnResourceChanged); }
         this.nullRefs.UnParse(s); 
     }
     else
     {
         if (this.modlRefs == null) { this.modlRefs = new Gp9references(kRecommendedApiVersion, this.OnResourceChanged); }
         this.modlRefs.UnParse(s);
         if (this.ftptRefs == null) { this.ftptRefs = new Gp9references(kRecommendedApiVersion, this.OnResourceChanged); }
         this.ftptRefs.UnParse(s);
     }
     return s;
 }
 void Parse(Stream s)
 {
     var br = new BinaryReader(s);
     this.version = br.ReadUInt32();
     this.commonA = new CatalogCommon(kRecommendedApiVersion, this.OnResourceChanged, s);
     this.hashIndicator = br.ReadUInt32();
     this.hash01 = br.ReadUInt32();
     this.hash02 = br.ReadUInt32();
     this.hash03 = br.ReadUInt32();
     this.unk02 = br.ReadUInt32();
     this.hash04 = br.ReadUInt32();
     this.hash05 = br.ReadUInt32();
     this.unkFlags01 = br.ReadUInt32();
     this.categoryFlags = br.ReadUInt32();
     this.unkFlags03 = br.ReadUInt32();
     this.unkFlags04 = br.ReadUInt32();
     this.placementFlags = br.ReadUInt32();
     this.unkIID01 = br.ReadUInt64();
     this.unk03 = br.ReadByte();
     this.unkIID02 = br.ReadUInt64();
     this.unk04 = br.ReadByte();
     this.colors = new ColorList(this.OnResourceChanged, s);
     this.unk05 = br.ReadByte();
     this.unk06 = br.ReadByte();
     this.unk07 = br.ReadByte();
     this.unk08 = br.ReadByte();
     this.unk09 = br.ReadByte();
     this.build_buy = br.ReadByte();
     if (this.version >= 0x19)
     {
         this.unk10 = br.ReadUInt32();
         this.unk11 = br.ReadUInt32();
         this.unk12 = br.ReadUInt32();
         this.unk13 = br.ReadUInt32();
     }
     this.unk14 = br.ReadUInt32();
     this.refIndicator = br.ReadUInt32();
     if (this.refIndicator == 0)
     {
         this.nullRefs = new Gp4references(kRecommendedApiVersion, this.OnResourceChanged, s);
     }
     else
     {
         this.modlRefs = new Gp9references(kRecommendedApiVersion, this.OnResourceChanged, s);
         this.ftptRefs = new Gp9references(kRecommendedApiVersion, this.OnResourceChanged, s);
     }
 }
 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);
     bw.Write(this.unk01);
     if (this.matdRef == null) { this.matdRef = new TGIBlock(kRecommendedApiVersion, this.OnResourceChanged, TGIBlock.Order.ITG); }
     this.matdRef.UnParse(s);
     if (this.floorRef == null) { this.floorRef = new TGIBlock(kRecommendedApiVersion, this.OnResourceChanged, TGIBlock.Order.ITG); }
     this.floorRef.UnParse(s);
     bw.Write(this.unkIID01);
     if (this.colors == null) { this.colors = new ColorList(this.OnResourceChanged); }
     this.colors.UnParse(s);
     return s;
 }
 void Parse(Stream s)
 {
     var br = new BinaryReader(s);
     this.version = br.ReadUInt32();
     this.commonA = new CatalogCommon(kRecommendedApiVersion, this.OnResourceChanged, s);
     this.unk01 = br.ReadUInt32();
     this.matdRef = new TGIBlock(kRecommendedApiVersion, this.OnResourceChanged, TGIBlock.Order.ITG,s);
     this.floorRef = new TGIBlock(kRecommendedApiVersion, this.OnResourceChanged, TGIBlock.Order.ITG, s);
     this.unkIID01 = br.ReadUInt64();
     this.colors = new ColorList(this.OnResourceChanged, s);
 }