diff --git a/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasImporter.cs b/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasImporter.cs index c687e1c..5c68361 100644 --- a/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasImporter.cs +++ b/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasImporter.cs @@ -21,6 +21,7 @@ namespace RecrownedAthenaeum.Pipeline.TextureAtlas { atlas = JsonConvert.DeserializeObject(stream.ReadToEnd()); } + context.AddDependency(atlas.textureName); return atlas; } } diff --git a/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasProcessor.cs b/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasProcessor.cs index bf18fda..2f03dd6 100644 --- a/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasProcessor.cs +++ b/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasProcessor.cs @@ -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; + } + } } } } diff --git a/RecrownedAthenaeum/DataTypes/NinePatch.cs b/RecrownedAthenaeum/DataTypes/NinePatch.cs index c5116b7..57a1aab 100644 --- a/RecrownedAthenaeum/DataTypes/NinePatch.cs +++ b/RecrownedAthenaeum/DataTypes/NinePatch.cs @@ -41,8 +41,6 @@ namespace RecrownedAthenaeum.DataTypes public void Draw(SpriteBatch batch, Rectangle destination) { - - Rectangle sourceRectangle; Rectangle drawnRectangle;