cleaned up pipeline code for atlas
This commit is contained in:
parent
4136b1ca22
commit
dde2c3dadf
@ -21,6 +21,7 @@ namespace RecrownedAthenaeum.Pipeline.TextureAtlas
|
||||
{
|
||||
atlas = JsonConvert.DeserializeObject<TextureAtlasData>(stream.ReadToEnd());
|
||||
}
|
||||
context.AddDependency(atlas.textureName);
|
||||
return atlas;
|
||||
}
|
||||
}
|
||||
|
@ -20,16 +20,15 @@ namespace RecrownedAthenaeum.Pipeline.TextureAtlas
|
||||
string serialized = JsonConvert.SerializeObject(input);
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(serialized);
|
||||
|
||||
MemoryStream outStream = new MemoryStream();
|
||||
GZipStream gZStream = new GZipStream(outStream, CompressionLevel.Optimal);
|
||||
|
||||
gZStream.Write(bytes, 0, bytes.Length);
|
||||
|
||||
byte[] compressed = outStream.ToArray();
|
||||
|
||||
gZStream.Dispose();
|
||||
outStream.Dispose();
|
||||
return compressed;
|
||||
using (MemoryStream outStream = new MemoryStream())
|
||||
{
|
||||
using (GZipStream gZipStream = new GZipStream(outStream, CompressionLevel.Optimal))
|
||||
{
|
||||
gZipStream.Write(bytes, 0, bytes.Length);
|
||||
byte[] compressed = outStream.ToArray();
|
||||
return compressed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,8 +41,6 @@ namespace RecrownedAthenaeum.DataTypes
|
||||
|
||||
public void Draw(SpriteBatch batch, Rectangle destination)
|
||||
{
|
||||
|
||||
|
||||
Rectangle sourceRectangle;
|
||||
Rectangle drawnRectangle;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user