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;
|
2019-01-22 01:56:51 +00:00
|
|
|
|
using System.Text;
|
2018-12-05 01:19:31 +00:00
|
|
|
|
|
|
|
|
|
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
|
|
|
|
|
{
|
2019-01-14 04:05:34 +00:00
|
|
|
|
[ContentProcessor(DisplayName = "Texture Atlas - RecrownedAthenaeum")]
|
2019-01-22 01:56:51 +00:00
|
|
|
|
class TextureAtlasProcessor : ContentProcessor<TextureAtlasImporter.Package, TextureAtlasProcessor.Package>
|
2018-12-05 01:19:31 +00:00
|
|
|
|
{
|
2019-01-22 01:56:51 +00:00
|
|
|
|
public override Package Process(TextureAtlasImporter.Package input, ContentProcessorContext context)
|
2018-12-05 01:19:31 +00:00
|
|
|
|
{
|
2019-01-22 01:56:51 +00:00
|
|
|
|
Package package;
|
|
|
|
|
package.textureBytes = input.textureBytes;
|
|
|
|
|
package.textureAtlasDataBytes = Encoding.ASCII.GetBytes(JsonConvert.SerializeObject(input.textureAtlasData));
|
|
|
|
|
return package;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal struct Package
|
|
|
|
|
{
|
|
|
|
|
public byte[] textureBytes;
|
|
|
|
|
public byte[] textureAtlasDataBytes;
|
2018-12-05 01:19:31 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|