2018-12-23 17:04:11 +00:00
|
|
|
|
using Microsoft.Xna.Framework.Content.Pipeline;
|
|
|
|
|
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
|
2019-01-14 04:05:34 +00:00
|
|
|
|
using Newtonsoft.Json;
|
2019-01-20 07:07:52 +00:00
|
|
|
|
using RecrownedAthenaeum.Data;
|
2018-12-23 17:04:11 +00:00
|
|
|
|
|
|
|
|
|
namespace RecrownedAthenaeum.Pipeline.NinePatch
|
|
|
|
|
{
|
|
|
|
|
[ContentTypeWriter]
|
2019-01-22 01:56:51 +00:00
|
|
|
|
class NinePatchWriter : ContentTypeWriter<NinePatchProcessor.Package>
|
2018-12-23 17:04:11 +00:00
|
|
|
|
{
|
|
|
|
|
public override string GetRuntimeReader(TargetPlatform targetPlatform)
|
|
|
|
|
{
|
2019-01-21 05:06:25 +00:00
|
|
|
|
return "RecrownedAthenaeum.ContentReaders.NinePatchDataReader, RecrownedAthenaeum";
|
2018-12-23 17:04:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
2019-01-22 01:56:51 +00:00
|
|
|
|
protected override void Write(ContentWriter output, NinePatchProcessor.Package value)
|
2018-12-23 17:04:11 +00:00
|
|
|
|
{
|
2019-01-22 01:56:51 +00:00
|
|
|
|
output.Write(value.textureBytes.Length);
|
|
|
|
|
output.Write(value.textureBytes);
|
|
|
|
|
output.Write(value.ninePatchDataBytes.Length);
|
|
|
|
|
output.Write(value.ninePatchDataBytes);
|
2018-12-23 17:04:11 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|