コード例 #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);
        }
コード例 #2
0
        // 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);
        }