From 9ac8e945306d941ec5f1b8cf89b31d027bb6b100 Mon Sep 17 00:00:00 2001 From: Harrison Date: Sun, 16 Feb 2020 21:45:17 -0500 Subject: [PATCH] Removed pipeline stuff that was used with Monogame. --- .../NinePatch/NinePatchImporter.cs | 16 -------- .../NinePatch/NinePatchProcessor.cs | 19 --------- .../NinePatch/NinePatchWriter.cs | 26 ------------ .../RecrownedAthenaeum.Pipeline.csproj | 10 ----- .../TextureAtlas/TextureAtlasImporter.cs | 18 -------- .../TextureAtlas/TextureAtlasProcessor.cs | 21 ---------- .../TextureAtlas/TextureAtlasWriter.cs | 41 ------------------- 7 files changed, 151 deletions(-) delete mode 100644 RecrownedGTK.Pipeline/NinePatch/NinePatchImporter.cs delete mode 100644 RecrownedGTK.Pipeline/NinePatch/NinePatchProcessor.cs delete mode 100644 RecrownedGTK.Pipeline/NinePatch/NinePatchWriter.cs delete mode 100644 RecrownedGTK.Pipeline/RecrownedAthenaeum.Pipeline.csproj delete mode 100644 RecrownedGTK.Pipeline/TextureAtlas/TextureAtlasImporter.cs delete mode 100644 RecrownedGTK.Pipeline/TextureAtlas/TextureAtlasProcessor.cs delete mode 100644 RecrownedGTK.Pipeline/TextureAtlas/TextureAtlasWriter.cs diff --git a/RecrownedGTK.Pipeline/NinePatch/NinePatchImporter.cs b/RecrownedGTK.Pipeline/NinePatch/NinePatchImporter.cs deleted file mode 100644 index d56fb66..0000000 --- a/RecrownedGTK.Pipeline/NinePatch/NinePatchImporter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Microsoft.Xna.Framework.Content.Pipeline; -using Newtonsoft.Json; -using RecrownedGTK.Data; -using System.IO; - -namespace RecrownedGTK.Pipeline.NinePatch -{ - [ContentImporter(".9p", DisplayName = "Nine Patch Importer - RecrownedGTK", DefaultProcessor = "NinePatchProcessor")] - internal class NinePatchImporter : ContentImporter - { - public override NinePatchData Import(string filename, ContentImporterContext context) - { - return JsonConvert.DeserializeObject(File.ReadAllText(filename)); - } - } -} diff --git a/RecrownedGTK.Pipeline/NinePatch/NinePatchProcessor.cs b/RecrownedGTK.Pipeline/NinePatch/NinePatchProcessor.cs deleted file mode 100644 index a33818f..0000000 --- a/RecrownedGTK.Pipeline/NinePatch/NinePatchProcessor.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Microsoft.Xna.Framework.Content.Pipeline; -using Newtonsoft.Json; -using RecrownedGTK.Data; -using System.IO; -using System.Text; - -namespace RecrownedGTK.Pipeline.NinePatch -{ - [ContentImporter(DisplayName = "Nine Patch - RecrownedGTK")] - class NinePatchProcessor : ContentProcessor - { - public override NinePatchData Process(NinePatchData input, ContentProcessorContext context) - { - if (Path.GetFileNameWithoutExtension(context.SourceIdentity.SourceFilename) == Path.GetFileNameWithoutExtension(input.textureName)) throw new InvalidContentException("Ninepatch data and texture for the data can't have the same name."); - context.AddDependency(input.textureName); - return input; - } - } -} diff --git a/RecrownedGTK.Pipeline/NinePatch/NinePatchWriter.cs b/RecrownedGTK.Pipeline/NinePatch/NinePatchWriter.cs deleted file mode 100644 index 531aa62..0000000 --- a/RecrownedGTK.Pipeline/NinePatch/NinePatchWriter.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.Xna.Framework.Content.Pipeline; -using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler; -using Newtonsoft.Json; -using RecrownedGTK.Data; -using System.IO; - -namespace RecrownedGTK.Pipeline.NinePatch -{ - [ContentTypeWriter] - class NinePatchWriter : ContentTypeWriter - { - public override string GetRuntimeReader(TargetPlatform targetPlatform) - { - return "RecrownedGTK.ContentReaders.NinePatchDataReader, RecrownedGTK"; - } - - protected override void Write(ContentWriter output, NinePatchData value) - { - output.Write(Path.GetFileNameWithoutExtension(value.textureName)); - output.Write(value.left); - output.Write(value.right); - output.Write(value.bottom); - output.Write(value.top); - } - } -} diff --git a/RecrownedGTK.Pipeline/RecrownedAthenaeum.Pipeline.csproj b/RecrownedGTK.Pipeline/RecrownedAthenaeum.Pipeline.csproj deleted file mode 100644 index 5794b33..0000000 --- a/RecrownedGTK.Pipeline/RecrownedAthenaeum.Pipeline.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - netstandard2.0 - - - - - - - \ No newline at end of file diff --git a/RecrownedGTK.Pipeline/TextureAtlas/TextureAtlasImporter.cs b/RecrownedGTK.Pipeline/TextureAtlas/TextureAtlasImporter.cs deleted file mode 100644 index f5cd29c..0000000 --- a/RecrownedGTK.Pipeline/TextureAtlas/TextureAtlasImporter.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Microsoft.Xna.Framework.Content.Pipeline; -using Microsoft.Xna.Framework.Content.Pipeline.Graphics; -using Microsoft.Xna.Framework.Content.Pipeline.Processors; -using Newtonsoft.Json; -using RecrownedGTK.Data; -using System.IO; - -namespace RecrownedGTK.Pipeline.TextureAtlas -{ - [ContentImporter(".tatlas", DisplayName = "Texture Atlas Importer - RecrownedGTK", DefaultProcessor = "TextureAtlasProcessor")] - internal class TextureAtlasImporter : ContentImporter - { - public override TextureAtlasData Import(string filename, ContentImporterContext context) - { - return JsonConvert.DeserializeObject(File.ReadAllText(filename)); - } - } -} diff --git a/RecrownedGTK.Pipeline/TextureAtlas/TextureAtlasProcessor.cs b/RecrownedGTK.Pipeline/TextureAtlas/TextureAtlasProcessor.cs deleted file mode 100644 index 518437e..0000000 --- a/RecrownedGTK.Pipeline/TextureAtlas/TextureAtlasProcessor.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Microsoft.Xna.Framework.Content.Pipeline; -using Microsoft.Xna.Framework.Content.Pipeline.Graphics; -using Microsoft.Xna.Framework.Content.Pipeline.Processors; -using Newtonsoft.Json; -using RecrownedGTK.Data; -using System.IO; -using System.Text; - -namespace RecrownedGTK.Pipeline.TextureAtlas -{ - [ContentProcessor(DisplayName = "Texture Atlas - RecrownedGTK")] - class TextureAtlasProcessor : ContentProcessor - { - public override TextureAtlasData Process(TextureAtlasData input, ContentProcessorContext context) - { - 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; - } - } -} diff --git a/RecrownedGTK.Pipeline/TextureAtlas/TextureAtlasWriter.cs b/RecrownedGTK.Pipeline/TextureAtlas/TextureAtlasWriter.cs deleted file mode 100644 index ff75b90..0000000 --- a/RecrownedGTK.Pipeline/TextureAtlas/TextureAtlasWriter.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Microsoft.Xna.Framework.Content.Pipeline; -using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler; -using Newtonsoft.Json; -using RecrownedGTK.Data; -using System.IO; - -namespace RecrownedGTK.Pipeline.TextureAtlas -{ - [ContentTypeWriter] - class TextureAtlasWriter : ContentTypeWriter - { - public override string GetRuntimeReader(TargetPlatform targetPlatform) - { - return "RecrownedGTK.ContentReaders.TextureAtlasDataReader, RecrownedGTK"; - } - - protected override void Write(ContentWriter output, TextureAtlasData value) - { - output.Write(Path.GetFileNameWithoutExtension(value.textureName)); - output.Write(value.regions.Length); - - for (int i = 0; i < value.regions.Length; i++) - { - output.Write(value.regions[i].name); - output.Write(value.regions[i].bounds.X); - output.Write(value.regions[i].bounds.Y); - output.Write(value.regions[i].bounds.Width); - output.Write(value.regions[i].bounds.Height); - bool hasNPatch = value.regions[i].ninePatchData != null; - output.Write(hasNPatch); - if (hasNPatch) - { - output.Write(value.regions[i].ninePatchData.left); - output.Write(value.regions[i].ninePatchData.right); - output.Write(value.regions[i].ninePatchData.bottom); - output.Write(value.regions[i].ninePatchData.top); - } - } - } - } -}