Removed obsolete code
This commit is contained in:
parent
9c982b6083
commit
7b5b8ee6e4
@ -1,37 +0,0 @@
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using TrueCraft.Core;
|
||||
using Ionic.Zip;
|
||||
|
||||
namespace TrueCraft.Client.Rendering
|
||||
{
|
||||
public static class TexturePackExtensions
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="instance"></param>
|
||||
/// <param name="entryName"></param>
|
||||
/// <returns></returns>
|
||||
public static Texture2D GetTexture(this TexturePack instance, GraphicsDevice graphicsDevice, string entryName)
|
||||
{
|
||||
ZipEntry entry = null;
|
||||
foreach (var item in instance.Archive.Entries)
|
||||
{
|
||||
if (item.FileName == entryName)
|
||||
{
|
||||
entry = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (entry == null)
|
||||
return null;
|
||||
|
||||
Texture2D texture = null;
|
||||
using (var reader = entry.OpenReader())
|
||||
texture = Texture2D.FromStream(graphicsDevice, reader);
|
||||
return texture;
|
||||
}
|
||||
}
|
||||
}
|
@ -105,7 +105,6 @@
|
||||
<Compile Include="Rendering\Font.cs" />
|
||||
<Compile Include="Rendering\FontRenderer.cs" />
|
||||
<Compile Include="Rendering\FontStyle.cs" />
|
||||
<Compile Include="Rendering\TexturePackExtensions.cs" />
|
||||
<Compile Include="Rendering\TextureMapper.cs" />
|
||||
<Compile Include="TrueCraftGame.cs" />
|
||||
<Compile Include="MultiplayerClient.cs" />
|
||||
|
Reference in New Issue
Block a user