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 ;
2018-12-05 08:28:09 +00:00
using Newtonsoft.Json ;
2019-03-21 00:28:16 +00:00
using RecrownedAthenaeum.Data ;
using System.IO ;
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-03-21 00:28:16 +00:00
class TextureAtlasProcessor : ContentProcessor < TextureAtlasData , TextureAtlasData >
2018-12-05 01:19:31 +00:00
{
2019-03-21 00:28:16 +00:00
public override TextureAtlasData Process ( TextureAtlasData input , ContentProcessorContext context )
2018-12-05 01:19:31 +00:00
{
2019-03-21 00:28:16 +00:00
if ( context . SourceIdentity . SourceFilename = = input . textureName ) throw new InvalidContentException ( "Texture atlas data and texture file for the atlas can't have the same name." ) ;
context . AddDependency ( input . textureName ) ;
return input ;
2018-12-05 01:19:31 +00:00
}
}
}