public void DownloadItems(AsyncDownloader downloader, Action <string> setStatus) { this.downloader = downloader; byte fetchFlags = ResourceList.GetFetchFlags(); if ((fetchFlags & ResourceList.mask_classic) != 0) { QueueItem(jarClassicUri, "classic jar"); } if ((fetchFlags & ResourceList.mask_modern) != 0) { QueueItem(jar162Uri, "1.6.2 jar"); } if ((fetchFlags & ResourceList.mask_gui) != 0) { QueueItem(pngGuiPatchUri, "gui.png patch"); } if ((fetchFlags & ResourceList.mask_terrain) != 0) { QueueItem(pngTerrainPatchUri, "terrain.png patch"); } DownloadMusicFiles(); digPatcher = new SoundPatcher(ResourceList.DigSounds, "dig_"); digPatcher.FetchFiles(digSoundsUri, altDigSoundsUri, this, DigSoundsExist); stepPatcher = new SoundPatcher(ResourceList.StepSounds, "step_"); stepPatcher.FetchFiles(stepSoundsUri, altStepSoundsUri, this, StepSoundsExist); setStatus(MakeNext()); }
public void DownloadItems(AsyncDownloader downloader, Action <string> setStatus) { this.downloader = downloader; DownloadMusicFiles(); digPatcher = new SoundPatcher(ResourceList.DigSounds, "dig_", "step_cloth1"); digPatcher.FetchFiles(digSoundsUri, altDigSoundsUri, this, DigSoundsExist); stepPatcher = new SoundPatcher(ResourceList.StepSounds, "step_", "classic jar"); stepPatcher.FetchFiles(stepSoundsUri, altStepSoundsUri, this, StepSoundsExist); flags = 0; foreach (var entry in ResourceList.Files) { flags |= entry.Value; } if ((flags & ResourceList.cMask) != 0) { downloader.DownloadData(jarClassicUri, false, "classic_jar"); } if ((flags & ResourceList.mMask) != 0) { downloader.DownloadData(jar162Uri, false, "162_jar"); } if ((flags & ResourceList.gMask) != 0) { downloader.DownloadData(pngGuiPatchUri, false, "gui_patch"); } if ((flags & ResourceList.tMask) != 0) { downloader.DownloadData(pngTerrainPatchUri, false, "terrain_patch"); } SetFirstStatus(setStatus); }
public void DownloadItems( AsyncDownloader downloader, Action<string> setStatus ) { this.downloader = downloader; DownloadMusicFiles(); digPatcher = new SoundPatcher( ResourceList.DigSounds, "dig_", "step_cloth1" ); digPatcher.FetchFiles( digSoundsUri, altDigSoundsUri, this, DigSoundsExist ); stepPatcher = new SoundPatcher( ResourceList.StepSounds, "step_", "classic jar" ); stepPatcher.FetchFiles( stepSoundsUri, altStepSoundsUri, this, StepSoundsExist ); flags = 0; foreach( var entry in ResourceList.Files ) flags |= entry.Value; if( (flags & ResourceList.cMask) != 0 ) downloader.DownloadData( jarClassicUri, false, "classic_jar" ); if( (flags & ResourceList.mMask) != 0 ) downloader.DownloadData( jar162Uri, false, "162_jar" ); if( (flags & ResourceList.gMask) != 0 ) downloader.DownloadData( pngGuiPatchUri, false, "gui_patch" ); if( (flags & ResourceList.tMask) != 0 ) downloader.DownloadData( pngTerrainPatchUri, false, "terrain_patch" ); SetFirstStatus( setStatus ); }