recrownedgtk/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasWriter.cs

23 lines
826 B
C#
Raw Normal View History

using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
[ContentTypeWriter]
class TextureAtlasWriter : ContentTypeWriter<TextureAtlasProcessor.Package>
{
public override string GetRuntimeReader(TargetPlatform targetPlatform)
{
2019-01-21 05:06:25 +00:00
return "RecrownedAthenaeum.ContentReaders.TextureAtlasDataReader, RecrownedAthenaeum";
}
protected override void Write(ContentWriter output, TextureAtlasProcessor.Package value)
{
output.Write(value.textureBytes.Length);
output.Write(value.textureBytes);
output.Write(value.textureAtlasDataBytes.Length);
output.Write(value.textureAtlasDataBytes);
}
}
}