2018-12-05 01:19:31 +00:00
|
|
|
|
using Microsoft.Xna.Framework.Content.Pipeline;
|
2018-12-05 08:28:09 +00:00
|
|
|
|
using Newtonsoft.Json;
|
2018-12-05 01:19:31 +00:00
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
|
|
|
|
|
{
|
2019-01-13 23:09:27 +00:00
|
|
|
|
[ContentProcessor(DisplayName = "Texture Atlas Processor - RecrownedAthenaeum")]
|
2018-12-05 08:28:09 +00:00
|
|
|
|
class TextureAtlasProcessor : ContentProcessor<TextureAtlasData, byte[]>
|
2018-12-05 01:19:31 +00:00
|
|
|
|
{
|
2018-12-05 08:28:09 +00:00
|
|
|
|
public override byte[] Process(TextureAtlasData input, ContentProcessorContext context)
|
2018-12-05 01:19:31 +00:00
|
|
|
|
{
|
2018-12-05 08:28:09 +00:00
|
|
|
|
string serialized = JsonConvert.SerializeObject(input);
|
2018-12-23 17:04:11 +00:00
|
|
|
|
return Encoding.UTF8.GetBytes(serialized);
|
2018-12-05 01:19:31 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|