Added setup system. Changed reader and writer for texture atlas and nine patch to have image and serialized data be in same file. Some refactors occurred as well.
This commit is contained in:
@@ -1,21 +1,22 @@
|
||||
using Microsoft.Xna.Framework.Content.Pipeline;
|
||||
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
|
||||
using Newtonsoft.Json;
|
||||
using RecrownedAthenaeum.Data;
|
||||
|
||||
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
|
||||
{
|
||||
[ContentTypeWriter]
|
||||
class TextureAtlasWriter : ContentTypeWriter<TextureAtlasData>
|
||||
class TextureAtlasWriter : ContentTypeWriter<TextureAtlasProcessor.Package>
|
||||
{
|
||||
public override string GetRuntimeReader(TargetPlatform targetPlatform)
|
||||
{
|
||||
return "RecrownedAthenaeum.ContentReaders.TextureAtlasDataReader, RecrownedAthenaeum";
|
||||
}
|
||||
|
||||
protected override void Write(ContentWriter output, TextureAtlasData value)
|
||||
protected override void Write(ContentWriter output, TextureAtlasProcessor.Package value)
|
||||
{
|
||||
output.Write(JsonConvert.SerializeObject(value));
|
||||
output.Write(value.textureBytes.Length);
|
||||
output.Write(value.textureBytes);
|
||||
output.Write(value.textureAtlasDataBytes.Length);
|
||||
output.Write(value.textureAtlasDataBytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user