Пример #1
0
        private void SyncSongAssetsToCache(string rhDir, RhSongAssets assets)
        {
            var cachePath = Path.Combine(rhDir, "cache");
            var cacheFile = IBinarySerializableExtensions.Deserialize(cachePath, CacheFile.Deserialize);

            var songSynchronizer = new RhSongAssetsSynchronizer(cacheFile, assets);

            songSynchronizer.Sync();

            cacheFile.SerializeToFile(cachePath);
        }
        // TODO: Consider making all converters override a Convert<T>() method
        public RhSongAssets Convert()
        {
            var assets = new RhSongAssets();

            assets.oggGuid = ConvertOgg();
            // TODO: Force pngs to power of 2 dimensions
            assets.pngGuid  = new RhGuid();           //ConvertPng();
            assets.rhsFile  = ConvertRhs(assets.oggGuid, assets.pngGuid);
            assets.rhcFiles = ConvertRhc(assets.rhsFile.rhsGuid);

            return(assets);
        }