2018-12-05 01:19:31 +00:00
|
|
|
|
using Microsoft.Xna.Framework.Content.Pipeline;
|
2019-03-21 00:28:16 +00:00
|
|
|
|
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
|
|
|
|
|
using Microsoft.Xna.Framework.Content.Pipeline.Processors;
|
2019-01-22 01:56:51 +00:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using RecrownedAthenaeum.Data;
|
2018-12-05 01:19:31 +00:00
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
|
|
|
|
|
{
|
2019-03-21 00:28:16 +00:00
|
|
|
|
[ContentImporter(".tatlas", DisplayName = "Texture Atlas Importer - RecrownedAthenaeum", DefaultProcessor = "TextureAtlasProcessor")]
|
|
|
|
|
internal class TextureAtlasImporter : ContentImporter<TextureAtlasData>
|
2018-12-05 01:19:31 +00:00
|
|
|
|
{
|
2019-03-21 00:28:16 +00:00
|
|
|
|
public override TextureAtlasData Import(string filename, ContentImporterContext context)
|
2018-12-05 01:19:31 +00:00
|
|
|
|
{
|
2019-03-21 00:28:16 +00:00
|
|
|
|
return JsonConvert.DeserializeObject<TextureAtlasData>(File.ReadAllText(filename));
|
2018-12-05 01:19:31 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|