static void SetMipmaps(Game g, string v) { g.Graphics.Mipmaps = SetBool(v, OptionsKey.Mipmaps); string url = g.World.TextureUrl; if (url == null) { TexturePack.ExtractDefault(g); return; } using (Stream data = TextureCache.GetStream(url)) { if (data == null) { TexturePack.ExtractDefault(g); return; } if (url.Contains(".zip")) { TexturePack extractor = new TexturePack(); extractor.Extract(data, g); } else { TexturePack.ExtractTerrainPng(g, data, url); } } }
protected void CheckAsyncResources() { DownloadedItem item; if (game.AsyncDownloader.TryGetItem("terrain", out item)) { TexturePack.ExtractTerrainPng(game, item); } if (game.AsyncDownloader.TryGetItem("texturePack", out item)) { TexturePack.ExtractTexturePack(game, item); } }