Beispiel #1
0
        public override unsafe void Export(string outPath)
        {
            StringTable table = new StringTable();

            table.Add(_name);

            int dataLen  = OnCalculateSize(true);
            int totalLen = dataLen + table.GetTotalSize();

            using (FileStream stream = new FileStream(outPath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None, 8, FileOptions.RandomAccess))
            {
                stream.SetLength(totalLen);
                using (FileMap map = FileMap.FromStream(stream))
                {
                    AnimationConverter.EncodeKeyframes(Keyframes, map.Address, map.Address + _entryLen);
                    table.WriteTable(map.Address + dataLen);
                    PostProcess(map.Address, table);
                }
            }
        }
Beispiel #2
0
 protected internal override void OnRebuild(VoidPtr address, int length, bool force)
 {
     AnimationConverter.EncodeKeyframes(_keyframes, address, _dataAddr);
 }