2018-12-05 01:19:31 +00:00
|
|
|
|
using Microsoft.Xna.Framework.Content.Pipeline;
|
|
|
|
|
using Microsoft.Xna.Framework.Graphics;
|
2018-12-05 08:28:09 +00:00
|
|
|
|
using Newtonsoft.Json;
|
2018-12-05 01:19:31 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
2018-12-05 08:28:09 +00:00
|
|
|
|
using System.IO.Compression;
|
2018-12-05 01:19:31 +00:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
|
|
|
|
|
{
|
2018-12-05 08:28:09 +00:00
|
|
|
|
[ContentProcessor(DisplayName = "Texture Atlas Processor")]
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|