public static BflanSerializer Serialize(BflanFile file) { BflanSerializer res = new BflanSerializer() { LittleEndian = file.byteOrder == Syroot.BinaryData.ByteOrder.LittleEndian, Version = file.Version }; Pat1Section pat1 = file.patData; res.pat1 = new Pat1Serializer() { AnimationOrder = pat1.AnimationOrder, ChildBinding = pat1.ChildBinding, Groups = pat1.Groups, Name = pat1.Name, Unk_EndOfFile = pat1.Unk_EndOfFile, Unk_StartOfFile = pat1.Unk_StartOfFile, Unk_EndOfHeader = pat1.Unk_EndOfHeader }; res.pai1 = Pai1Serializer.Serialize(file.paiData); return(res); }
public BflanFile Deserialize() { BflanFile res = new BflanFile(); res.byteOrder = LittleEndian ? Syroot.BinaryData.ByteOrder.LittleEndian : Syroot.BinaryData.ByteOrder.BigEndian; res.Version = Version; Pat1Section _pat1 = new Pat1Section() { AnimationOrder = pat1.AnimationOrder, ChildBinding = pat1.ChildBinding, Groups = pat1.Groups, Name = pat1.Name, Unk_EndOfFile = pat1.Unk_EndOfFile, Unk_StartOfFile = pat1.Unk_StartOfFile, Unk_EndOfHeader = pat1.Unk_EndOfHeader }; res.Sections.Add(_pat1); res.Sections.Add(pai1.Deserialize()); return(res); }