fixed up pipeline extension process because monogame is weird.

This commit is contained in:
2019-01-13 22:05:34 -06:00
parent 0b812f45fe
commit 4ac011f3cf
8 changed files with 34 additions and 36 deletions

View File

@@ -1,20 +1,22 @@
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using Newtonsoft.Json;
using System;
using TWrite = RecrownedAthenaeum.Pipeline.TextureAtlas.TextureAtlasData;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
[ContentTypeWriter]
class TextureAtlasWriter : ContentTypeWriter<byte[]>
class TextureAtlasWriter : ContentTypeWriter<TWrite>
{
public override string GetRuntimeReader(TargetPlatform targetPlatform)
{
return "RecrownedAthenaeum.Pipeline, TextureAtlasDataReader";
}
protected override void Write(ContentWriter output, byte[] value)
protected override void Write(ContentWriter output, TWrite value)
{
output.Write(value.Length);
output.Write(value);
output.Write(JsonConvert.SerializeObject(value));
}
}
}