예제 #1
0
        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);
        }
예제 #2
0
        public static Pai1Serializer Serialize(Pai1Section p)
        {
            var res = new Pai1Serializer()
            {
                Textures  = p.Textures,
                Flags     = p.Flags,
                FrameSize = p.FrameSize
            };

            res.Entries = new List <PaiEntrySerializer>();
            foreach (var e in p.Entries)
            {
                res.Entries.Add(PaiEntrySerializer.Serialize(e));
            }
            return(res);
        }