2018-12-04 19:19:31 -06:00
using Microsoft.Xna.Framework.Content.Pipeline ;
2019-03-20 19:28:16 -05:00
using Microsoft.Xna.Framework.Content.Pipeline.Graphics ;
using Microsoft.Xna.Framework.Content.Pipeline.Processors ;
2018-12-05 02:28:09 -06:00
using Newtonsoft.Json ;
2019-03-20 19:28:16 -05:00
using RecrownedAthenaeum.Data ;
using System.IO ;
2019-01-21 19:56:51 -06:00
using System.Text ;
2018-12-04 19:19:31 -06:00
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
2019-01-13 22:05:34 -06:00
[ContentProcessor(DisplayName = "Texture Atlas - RecrownedAthenaeum")]
2019-03-20 19:28:16 -05:00
class TextureAtlasProcessor : ContentProcessor < TextureAtlasData , TextureAtlasData >
2018-12-04 19:19:31 -06:00
{
2019-03-20 19:28:16 -05:00
public override TextureAtlasData Process ( TextureAtlasData input , ContentProcessorContext context )
2018-12-04 19:19:31 -06:00
{
2019-03-20 19:28:16 -05: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-04 19:19:31 -06:00
}
}
}